Changeset 4a537dd in mainline
- Timestamp:
- 2009-10-22T15:12:57Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e000b8d
- Parents:
- c696ad1a
- Location:
- kernel/arch/ia32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/include/cpu.h
rc696ad1a r4a537dd 50 50 #include <arch/pm.h> 51 51 #include <arch/asm.h> 52 #include <arch/cpuid.h> 52 53 53 54 typedef struct { … … 56 57 unsigned int model; 57 58 unsigned int stepping; 59 cpuid_feature_info fi; 60 58 61 tss_t *tss; 59 62 -
kernel/arch/ia32/src/cpu/cpu.c
rc696ad1a r4a537dd 92 92 void cpu_arch_init(void) 93 93 { 94 cpuid_feature_info fi;95 94 cpuid_extended_feature_info efi; 96 95 cpu_info_t info; … … 104 103 cpuid(INTEL_CPUID_STANDARD, &info); 105 104 106 fi.word = info.cpuid_edx;105 CPU->arch.fi.word = info.cpuid_edx; 107 106 efi.word = info.cpuid_ecx; 108 107 109 if ( fi.bits.fxsr)108 if (CPU->arch.fi.bits.fxsr) 110 109 fpu_fxsr(); 111 110 else 112 111 fpu_fsr(); 113 112 114 if ( fi.bits.sse) {113 if (CPU->arch.fi.bits.sse) { 115 114 asm volatile ( 116 115 "mov %%cr4, %[help]\n" … … 122 121 } 123 122 124 /* Setup fast SYSENTER/SYSEXIT syscalls */ 125 syscall_setup_cpu(); 123 if (CPU->arch.fi.bits.sep) { 124 /* Setup fast SYSENTER/SYSEXIT syscalls */ 125 syscall_setup_cpu(); 126 } 126 127 } 127 128 -
kernel/arch/ia32/src/proc/scheduler.c
rc696ad1a r4a537dd 61 61 SP_DELTA]; 62 62 63 /* Set kernel stack for CP3 -> CPL0 switch via SYSENTER */ 64 write_msr(IA32_MSR_SYSENTER_ESP, kstk); 63 if (CPU->arch.fi.bits.sep) { 64 /* Set kernel stack for CP3 -> CPL0 switch via SYSENTER */ 65 write_msr(IA32_MSR_SYSENTER_ESP, kstk); 66 } 65 67 66 68 /* Set kernel stack for CPL3 -> CPL0 switch via interrupt */
Note:
See TracChangeset
for help on using the changeset viewer.