Re: New Cyrix patch for 2.0.33

Rafael R. Reilova (rreilova@ececs.uc.edu)
Mon, 25 May 1998 21:46:31 -0500 (EST)


Phil's Kernel Account wrote:

> On Sun, 24 May 1998, [ISO-8859-1] André Derrick Balsa wrote:
>
> #Hello Alan,
>
> Hey! We're getting to know eachother pretty good! :)
>
> #Alan Cox wrote:
> #....
> #> No the xor/sahf/movb thing passes for some PII's (Im beginning to wonder
> #> if this is a conspiracy) - Intel a) now pass the divide check and b)
> #> happen to put a very critical BX register at 0x22/0x23 - basically
> #> the cyrix test turns off the bus arbitrators
> #OK, I basically followed the algorithm that you outlined in another
> #email:
> #
> #if has cpuid
> # do cpuid
> #else
> # if cyrix 6x86(L)
> # turn on cpuid/slop
> # else
> # do the 486/386 probe
> #endif
>
> Which is wrong. At least now, thanks to Intel's "ingenuity." *snort*
> Apparently, the BX chipset was DESIGNED to behave like that, to inform the
> computers that it's a "Genuine Intel" chipset. As if I gave a flying fsck;
> the box I type this on is a VIA VXpro+, and my real workstation is
> KR-859CF based. I don't want Intel. Anyways, back on topic. :)

Is almost correct except for a few details, see below.

> The correct method at this point would be this...
>
> turn on cpuid
> if it works
> if vendor == cyrix, amd, or centaur
> do not probe for BX
> else
> probe 486/386
> endif

This won't work because the way you turn cpuid on 6x86L is by accessing
the same ports that are now shared by the BX chipset (0x22,0x23). Blindly
turning the cpuid on is what's currently causing the problem (I shouldn't
say blindly, there is the flags across division test, but that is not
sufficient anymore).

The correct algorithm, which is implemented in the posted patch is:

1. if has cpuid
do cpuid
else
probe 486/386
if !386 && flags are preserved across divison
attempt enabling cpuid (do the dangerous 0x22,0x23 port stuff)
goto 1
end if
end if
2. if vendor == Cyrix
do cyrix DEVID detection stuff (more 0x22,0x23 stuff)
end if

This way, there no way of misdetecting a Pentium II for a Cyrix and play
around with the BX ports. Since all Pentium II and MMX *have* cpuid.
Cyrixes with the cpuid off by default get a second round at the cpuid
code. Once we have cpuid all is well, since Cyrix specific code can be
trivially excluded. I believe the patch to be quite ingenious and correct.

Cheers,

--
Rafael

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu