Skip to contentSkip to conversation

boot_cpu_data.x86_vendor corruption on dual AMD

DISCUSSION Mikael Pettersson 2 participants 2 messages Mar 13, 2002 – Mar 21, 2002

lore
Share & tools
lore
#0 lore raw

I'm involved with debugging a driver problem which only appears on dual AMD systems. When the driver's module_init() is called, boot_cpu_data.x86_vendor is 0 (Intel) instead of 2 (AMD), causing incorrect code to be selected and eventually an oops.

We've so far traced it to the call to smp_init() in init/main.c. Before this call, boot_cpu_data.x86_vendor is 2 (correct), but after the call, the field is 0.

I've been looking through the code but haven't found any obvious bug candidates, so we've resorted to debug printouts and binary search. (I'm giving directions, another person is doing the tests at a remote site, so progress is slow.)

The kernel in question is 2.4.18, but we've seen this in other 2.4 kernels too. Choice of compiler (gcc-2.96-98/egcs-2.91.66) and CONFIG_MK7 on or off doesn't seem to make any difference. The box (Tyan) is otherwise stable, and the CPUs are Athlon MPs.

/Mikael

#1 lore raw
Quoted 8 lines · Mikael Pettersson

I'm involved with debugging a driver problem which only appears on dual AMD systems. When the driver's module_init() is called, boot_cpu_data.x86_vendor is 0 (Intel) instead of 2 (AMD), causing incorrect code to be selected and eventually an oops.

We've so far traced it to the call to smp_init() in init/main.c. Before this call, boot_cpu_data.x86_vendor is 2 (correct), but after the call, the field is 0.

Code in arch/i386/kernel/head.S (look below checkCPUtype) clears
boot_cpu_data.x86_vendor and it does not get reconstructed after secondary bootstraps. A common x86_vendor does not make sense anyway, at least in principle (the whole cpu_data handling needs a rework but I have no time to continue what I started last year and nobody else seems to work on it either). Wouldn't current_cpu_data.x86_vendor suffice? That will work for sure.

Signature · 3 lines
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email protected], PGP key available        +