summaryrefslogtreecommitdiff
path: root/identify.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2008-07-02 02:44:04 -0400
committerDave Jones <davej@redhat.com>2008-07-02 02:44:04 -0400
commitd24cbeb2b2a2c85522a0f5d0f2da370347ec8147 (patch)
treeeb3332b27980008c8e0791f8d30c655d52713b67 /identify.c
parent99627521294298c59a3fa42e9f778bde7810bdb0 (diff)
* Vastly rework the core cpuid handling on uniprocessor.
- No more nasty pages and pages of assembly - x86-64 'just works' * cpuid takes 32 bit registers. always. wtf were we passing around longs? * implement cpuid4() * start using cpuid4 to determine number of cores.
Diffstat (limited to 'identify.c')
-rw-r--r--identify.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/identify.c b/identify.c
index ce49b60..95fd055 100644
--- a/identify.c
+++ b/identify.c
@@ -9,7 +9,7 @@
void identify(struct cpudata *cpu)
{
- unsigned long maxi, maxei, vendor;
+ unsigned int maxi, maxei, vendor;
cpuid(cpu->number, 0, &maxi, &vendor, NULL, NULL);
maxi &= 0xffff; /* The high-order word is non-zero on some Cyrix CPUs */
@@ -45,20 +45,20 @@ void identify(struct cpudata *cpu)
Identify_SiS(cpu);
break;
default:
- printf("Unknown vendor (%lx)\n", vendor);
+ printf("Unknown vendor (%x)\n", vendor);
return;
}
}
-static void dumpregs (int cpunum, unsigned int begin, unsigned int end)
+static void dumpregs(int cpunum, unsigned int begin, unsigned int end)
{
unsigned int i;
- unsigned long eax, ebx, ecx, edx;
+ unsigned int eax, ebx, ecx, edx;
/* Dump all the CPUID results in raw hex */
for (i=begin; i<=end; i++) {
cpuid(cpunum, i, &eax, &ebx, &ecx, &edx);
- printf("eax in: 0x%08x, eax = %08lx ebx = %08lx ecx = %08lx edx = %08lx\n", i, eax, ebx, ecx, edx);
+ printf("eax in: 0x%08x, eax = %08x ebx = %08x ecx = %08x edx = %08x\n", i, eax, ebx, ecx, edx);
}
printf("\n");
}
@@ -129,4 +129,3 @@ void show_info(struct cpudata *cpu)
if (show_mtrr)
dump_mtrrs(cpu);
}
-