Changeset 43114c5 in mainline for arch/ia32/src/cpu/cpu.c


Ignore:
Timestamp:
2005-04-09T18:22:53Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8262010
Parents:
e6ba9a3f
Message:

Introduce macros CPU, THREAD, TASK and use them to replace the→cpu, the→thread, the→task.
Later on, this will make it possible to reference *current* cpu, thread and/or task without the aid from virtual memory.

File:
1 edited

Legend:

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

    re6ba9a3f r43114c5  
    6262void cpu_arch_init(void)
    6363{
    64         the->cpu->arch.tss = tss_p;
     64        CPU->arch.tss = tss_p;
    6565}
    6666
     
    7171        int i;
    7272
    73         the->cpu->arch.vendor = VendorUnknown;
     73        CPU->arch.vendor = VendorUnknown;
    7474        if (has_cpuid()) {
    7575                cpuid(0, &info);
     
    8282                    info.cpuid_edx==AMD_CPUID_EDX) {
    8383                       
    84                         the->cpu->arch.vendor = VendorAMD;
     84                        CPU->arch.vendor = VendorAMD;
    8585                }
    8686
     
    9292                    info.cpuid_edx==INTEL_CPUID_EDX) {
    9393
    94                         the->cpu->arch.vendor = VendorIntel;
     94                        CPU->arch.vendor = VendorIntel;
    9595
    9696                }
    9797                               
    9898                cpuid(1, &info);
    99                 the->cpu->arch.family = (info.cpuid_eax>>8)&0xf;
    100                 the->cpu->arch.model = (info.cpuid_eax>>4)&0xf;
    101                 the->cpu->arch.stepping = (info.cpuid_eax>>0)&0xf;                                             
     99                CPU->arch.family = (info.cpuid_eax>>8)&0xf;
     100                CPU->arch.model = (info.cpuid_eax>>4)&0xf;
     101                CPU->arch.stepping = (info.cpuid_eax>>0)&0xf;                                           
    102102        }
    103103}
Note: See TracChangeset for help on using the changeset viewer.