Changeset 08f747e in mainline for kernel/arch/ia32/src/cpu/cpu.c
- Timestamp:
- 2010-11-26T21:49:30Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e423a2d, dac43be
- Parents:
- e4dbfda (diff), da55d5b (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
re4dbfda r08f747e 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 … … 140 140 if ((info.cpuid_ebx == AMD_CPUID_EBX) 141 141 && (info.cpuid_ecx == AMD_CPUID_ECX) 142 142 && (info.cpuid_edx == AMD_CPUID_EDX)) 143 143 CPU->arch.vendor = VendorAMD; 144 144 145 145 /* 146 146 * Check for Intel processor. 147 */ 147 */ 148 148 if ((info.cpuid_ebx == INTEL_CPUID_EBX) 149 149 && (info.cpuid_ecx == INTEL_CPUID_ECX) 150 150 && (info.cpuid_edx == INTEL_CPUID_EDX)) 151 151 CPU->arch.vendor = VendorIntel; 152 152 153 153 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 ;154 CPU->arch.family = (info.cpuid_eax >> 8) & 0x0fU; 155 CPU->arch.model = (info.cpuid_eax >> 4) & 0x0fU; 156 CPU->arch.stepping = (info.cpuid_eax >> 0) & 0x0fU; 157 157 } 158 158 }
Note:
See TracChangeset
for help on using the changeset viewer.