Changeset 20b8bf3 in mainline for kernel/arch/amd64/src/cpu/cpu.c
- Timestamp:
- 2008-03-19T20:41:56Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e13daa5d
- Parents:
- d4f572e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/cpu/cpu.c
rd4f572e r20b8bf3 125 125 { 126 126 CPU->arch.tss = tss_p; 127 CPU->arch.tss->iomap_base = &CPU->arch.tss->iomap[0] - ((uint8_t *) CPU->arch.tss); 127 CPU->arch.tss->iomap_base = &CPU->arch.tss->iomap[0] - 128 ((uint8_t *) CPU->arch.tss); 128 129 CPU->fpu_owner = NULL; 129 130 } … … 140 141 * Check for AMD processor. 141 142 */ 142 if (info.cpuid_ebx==AMD_CPUID_EBX && info.cpuid_ecx==AMD_CPUID_ECX && info.cpuid_edx==AMD_CPUID_EDX) { 143 if (info.cpuid_ebx == AMD_CPUID_EBX && 144 info.cpuid_ecx == AMD_CPUID_ECX && 145 info.cpuid_edx == AMD_CPUID_EDX) { 143 146 CPU->arch.vendor = VendorAMD; 144 147 } … … 147 150 * Check for Intel processor. 148 151 */ 149 if (info.cpuid_ebx==INTEL_CPUID_EBX && info.cpuid_ecx==INTEL_CPUID_ECX && info.cpuid_edx==INTEL_CPUID_EDX) { 152 if (info.cpuid_ebx == INTEL_CPUID_EBX && 153 info.cpuid_ecx == INTEL_CPUID_ECX && 154 info.cpuid_edx == INTEL_CPUID_EDX) { 150 155 CPU->arch.vendor = VendorIntel; 151 156 } 152 157 153 158 cpuid(1, &info); 154 CPU->arch.family = (info.cpuid_eax >>8)&0xf;155 CPU->arch.model = (info.cpuid_eax >>4)&0xf;156 CPU->arch.stepping = (info.cpuid_eax >>0)&0xf;159 CPU->arch.family = (info.cpuid_eax >> 8) & 0xf; 160 CPU->arch.model = (info.cpuid_eax >> 4) & 0xf; 161 CPU->arch.stepping = (info.cpuid_eax >> 0) & 0xf; 157 162 } 158 163 } … … 161 166 { 162 167 printf("cpu%d: (%s family=%d model=%d stepping=%d) %dMHz\n", 163 m->id, vendor_str[m->arch.vendor], m->arch.family, m->arch.model, m->arch.stepping,164 168 m->id, vendor_str[m->arch.vendor], m->arch.family, m->arch.model, 169 m->arch.stepping, m->frequency_mhz); 165 170 } 166 171
Note:
See TracChangeset
for help on using the changeset viewer.