Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/cpu/cpu.c

    r4a537dd radd04f7  
    9292void cpu_arch_init(void)
    9393{
     94        cpuid_feature_info fi;
    9495        cpuid_extended_feature_info efi;
    9596        cpu_info_t info;
     
    101102        CPU->fpu_owner = NULL;
    102103       
    103         cpuid(INTEL_CPUID_STANDARD, &info);
     104        cpuid(1, &info);
    104105       
    105         CPU->arch.fi.word = info.cpuid_edx;
     106        fi.word = info.cpuid_edx;
    106107        efi.word = info.cpuid_ecx;
    107108       
    108         if (CPU->arch.fi.bits.fxsr)
     109        if (fi.bits.fxsr)
    109110                fpu_fxsr();
    110111        else
    111112                fpu_fsr();
    112113       
    113         if (CPU->arch.fi.bits.sse) {
     114        if (fi.bits.sse) {
    114115                asm volatile (
    115116                        "mov %%cr4, %[help]\n"
     
    121122        }
    122123       
    123         if (CPU->arch.fi.bits.sep) {
    124                 /* Setup fast SYSENTER/SYSEXIT syscalls */
    125                 syscall_setup_cpu();
    126         }
     124        /* Setup fast SYSENTER/SYSEXIT syscalls */
     125        syscall_setup_cpu();
    127126}
    128127
     
    133132        CPU->arch.vendor = VendorUnknown;
    134133        if (has_cpuid()) {
    135                 cpuid(INTEL_CPUID_LEVEL, &info);
     134                cpuid(0, &info);
    136135
    137136                /*
     
    151150                        CPU->arch.vendor = VendorIntel;
    152151               
    153                 cpuid(INTEL_CPUID_STANDARD, &info);
     152                cpuid(1, &info);
    154153                CPU->arch.family = (info.cpuid_eax >> 8) & 0x0f;
    155154                CPU->arch.model = (info.cpuid_eax >> 4) & 0x0f;
Note: See TracChangeset for help on using the changeset viewer.