Changeset 1787e527 in mainline for kernel/arch/ia32/src/cpu/cpu.c
- Timestamp:
- 2009-11-16T21:22:54Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5ebdf94
- Parents:
- fcbd1be (diff), 9c70ed6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified kernel/arch/ia32/src/cpu/cpu.c ¶
rfcbd1be r1787e527 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; … … 102 101 CPU->fpu_owner = NULL; 103 102 104 cpuid( 1, &info);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 … … 132 133 CPU->arch.vendor = VendorUnknown; 133 134 if (has_cpuid()) { 134 cpuid( 0, &info);135 cpuid(INTEL_CPUID_LEVEL, &info); 135 136 136 137 /* … … 150 151 CPU->arch.vendor = VendorIntel; 151 152 152 cpuid( 1, &info);153 cpuid(INTEL_CPUID_STANDARD, &info); 153 154 CPU->arch.family = (info.cpuid_eax >> 8) & 0x0f; 154 155 CPU->arch.model = (info.cpuid_eax >> 4) & 0x0f;
Note:
See TracChangeset
for help on using the changeset viewer.