Changes in kernel/arch/ia32/src/cpu/cpu.c [4eb260a:d99c1d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/cpu/cpu.c
r4eb260a rd99c1d2 49 49 * Contains only non-MP-Specification specific SMP code. 50 50 */ 51 #define AMD_CPUID_EBX UINT32_C(0x68747541)52 #define AMD_CPUID_ECX UINT32_C(0x444d4163)53 #define AMD_CPUID_EDX UINT32_C(0x69746e65)51 #define AMD_CPUID_EBX 0x68747541 52 #define AMD_CPUID_ECX 0x444d4163 53 #define AMD_CPUID_EDX 0x69746e65 54 54 55 #define INTEL_CPUID_EBX UINT32_C(0x756e6547)56 #define INTEL_CPUID_ECX UINT32_C(0x6c65746e)57 #define INTEL_CPUID_EDX UINT32_C(0x49656e69)55 #define INTEL_CPUID_EBX 0x756e6547 56 #define INTEL_CPUID_ECX 0x6c65746e 57 #define INTEL_CPUID_EDX 0x49656e69 58 58 59 59 … … 92 92 void cpu_arch_init(void) 93 93 { 94 cpuid_extended_feature_info efi; 94 95 cpu_info_t info; 95 96 uint32_t help = 0; … … 103 104 104 105 CPU->arch.fi.word = info.cpuid_edx; 106 efi.word = info.cpuid_ecx; 105 107 106 108 if (CPU->arch.fi.bits.fxsr) … … 138 140 if ((info.cpuid_ebx == AMD_CPUID_EBX) 139 141 && (info.cpuid_ecx == AMD_CPUID_ECX) 140 142 && (info.cpuid_edx == AMD_CPUID_EDX)) 141 143 CPU->arch.vendor = VendorAMD; 142 144 143 145 /* 144 146 * Check for Intel processor. 145 */ 147 */ 146 148 if ((info.cpuid_ebx == INTEL_CPUID_EBX) 147 149 && (info.cpuid_ecx == INTEL_CPUID_ECX) 148 150 && (info.cpuid_edx == INTEL_CPUID_EDX)) 149 151 CPU->arch.vendor = VendorIntel; 150 152 151 153 cpuid(INTEL_CPUID_STANDARD, &info); 152 CPU->arch.family = (info.cpuid_eax >> 8) & 0x0f U;153 CPU->arch.model = (info.cpuid_eax >> 4) & 0x0f U;154 CPU->arch.stepping = (info.cpuid_eax >> 0) & 0x0f U;154 CPU->arch.family = (info.cpuid_eax >> 8) & 0x0f; 155 CPU->arch.model = (info.cpuid_eax >> 4) & 0x0f; 156 CPU->arch.stepping = (info.cpuid_eax >> 0) & 0x0f; 155 157 } 156 158 }
Note:
See TracChangeset
for help on using the changeset viewer.