Changeset eb522e8 in mainline for kernel/arch/ia32/src/cpu/cpu.c
- Timestamp:
- 2011-06-01T08:43:42Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d6c1f1
- Parents:
- 9e2e715 (diff), e51a514 (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
-
kernel/arch/ia32/src/cpu/cpu.c
r9e2e715 reb522e8 49 49 * Contains only non-MP-Specification specific SMP code. 50 50 */ 51 #define AMD_CPUID_EBX 0x6874754152 #define AMD_CPUID_ECX 0x444d416353 #define AMD_CPUID_EDX 0x69746e6551 #define AMD_CPUID_EBX UINT32_C(0x68747541) 52 #define AMD_CPUID_ECX UINT32_C(0x444d4163) 53 #define AMD_CPUID_EDX UINT32_C(0x69746e65) 54 54 55 #define INTEL_CPUID_EBX 0x756e654756 #define INTEL_CPUID_ECX 0x6c65746e57 #define INTEL_CPUID_EDX 0x49656e6955 #define INTEL_CPUID_EBX UINT32_C(0x756e6547) 56 #define INTEL_CPUID_ECX UINT32_C(0x6c65746e) 57 #define INTEL_CPUID_EDX UINT32_C(0x49656e69) 58 58 59 59 … … 92 92 void cpu_arch_init(void) 93 93 { 94 cpuid_extended_feature_info efi;95 94 cpu_info_t info; 96 95 uint32_t help = 0; … … 104 103 105 104 CPU->arch.fi.word = info.cpuid_edx; 106 efi.word = info.cpuid_ecx;107 105 108 106 if (CPU->arch.fi.bits.fxsr) … … 140 138 if ((info.cpuid_ebx == AMD_CPUID_EBX) 141 139 && (info.cpuid_ecx == AMD_CPUID_ECX) 142 140 && (info.cpuid_edx == AMD_CPUID_EDX)) 143 141 CPU->arch.vendor = VendorAMD; 144 142 145 143 /* 146 144 * Check for Intel processor. 147 */ 145 */ 148 146 if ((info.cpuid_ebx == INTEL_CPUID_EBX) 149 147 && (info.cpuid_ecx == INTEL_CPUID_ECX) 150 148 && (info.cpuid_edx == INTEL_CPUID_EDX)) 151 149 CPU->arch.vendor = VendorIntel; 152 150 153 151 cpuid(INTEL_CPUID_STANDARD, &info); 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 ;152 CPU->arch.family = (info.cpuid_eax >> 8) & 0x0fU; 153 CPU->arch.model = (info.cpuid_eax >> 4) & 0x0fU; 154 CPU->arch.stepping = (info.cpuid_eax >> 0) & 0x0fU; 157 155 } 158 156 }
Note:
See TracChangeset
for help on using the changeset viewer.