4 * Licensed under the terms of the GNU GPL License version 2.
10 void get_cpu_info_basics(struct cpudata *cpu)
12 unsigned int maxi, maxei, vendor, address_bits;
15 cpuid(cpu->number, 0, &maxi, &vendor, NULL, NULL);
16 maxi &= 0xffff; /* The high-order word is non-zero on some Cyrix CPUs */
17 cpu->cpuid_level = maxi;
21 /* Everything that supports cpuid supports these. */
22 cpuid(cpu->number, 1, &eax, NULL, NULL, NULL);
23 cpu->stepping = eax & 0xf;
24 cpu->model = (eax >> 4) & 0xf;
25 cpu->family = (eax >> 8) & 0xf;
27 cpuid(cpu->number, 0x80000000, &maxei, NULL, NULL, NULL);
30 cpuid(cpu->number, 0xC0000000, &maxei, NULL, NULL, NULL);
33 cpuid(cpu->number, 0x80000008,&address_bits, NULL, NULL, NULL);
34 cpu->phyaddr_bits = address_bits & 0xFF;
35 cpu->viraddr_bits = (address_bits >> 8) & 0xFF;
39 cpu->vendor = VENDOR_INTEL;
42 cpu->vendor = VENDOR_AMD;
45 cpu->vendor = VENDOR_CYRIX;
48 cpu->vendor = VENDOR_CENTAUR;
51 cpu->vendor = VENDOR_NATSEMI;
55 cpu->vendor = VENDOR_RISE;
58 cpu->vendor = VENDOR_SIS;
61 printf("Unknown vendor (%x)\n", vendor);
66 void identify(struct cpudata *cpu)
68 switch (cpu->vendor) {
79 identify_centaur(cpu);
82 identify_natsemi(cpu);
90 case VENDOR_TRANSMETA:
96 void show_info(struct cpudata *cpu)
98 if ((cpu->efamily != 0) || (cpu->emodel != 0))
99 printf("Extended Family: %u Extended Model: %u ",
100 cpu->efamily, cpu->emodel);
101 printf("Family: %u Model: %u Stepping: %u\n",
102 cpu->family, model(cpu), cpu->stepping);
103 if (cpu->vendor == VENDOR_INTEL)
104 display_basic_Intel_info(cpu);
105 printf("CPU Model (x86info's best guess): %s\n", cpu->name);
110 switch (cpu->vendor) {
112 display_AMD_info(cpu);
116 display_Cyrix_info(cpu);
120 display_centaur_info(cpu);
124 display_extended_Intel_info(cpu);