cpuid_eax damages registers (2.4.7pre7)

Julian Anastasov
2001-07-18T10:46:28Z

Hello,

I don't know whether cpuid_eax (2.4.7pre) should preserve the
registers changed from cpuid but I have an oops on boot with 2.4.7pre7 in
squash_the_stupid_serial_number where cpuid_eax changes ebx and the
parameter "c" is loaded with "Genu". The following change fixes the
problem:

from:

c->cpuid_level = cpuid_eax(0);

to:

unsigned int dummy;

cpuid(0, &c->cpuid_level, &dummy, &dummy, &dummy);

but I'm not sure in the definitions of these cpuid_XXX funcs. I see
that they are used at many places. IMO, they have to preserve the
registers.

Regards

--
Julian Anastasov <ja@ssi.bg>