Re: New Cyrix patch for 2.0.33

Rafael R. Reilova (rreilova@ececs.uc.edu)
Tue, 26 May 1998 16:46:24 -0500 (EST)


On Tue, 26 May 1998, Phil's Kernel Account wrote:

> On Tue, 26 May 1998, Rafael R. Reilova wrote:
>
> #Hi Phil,
>
> Hi Rafael! :)
>
> #If more manufacturers start using ports 0x22 and 0x23, the we are really
> #in for trouble, unless we are certain that we are dealing with a Cyrix.
> #Cyrix assures that the port access won't generate external I/O for writes
> #(if done correctly, of course), but first we need to know that it IS a
> #Cyrix, which is a problem for CPUs with the cpuid off by default.
>
> Right. And really, the ONLY place you're gonna see a Cyrix with cpuid off
> is a Cx6x86. Everything else has cpuid on by default. The way I want to do
> it is simple.
>
> Is cpuid on?
> if not test for BX @ 0x22, 0x23
> if not there
> turn on cpuid
> if there
> scream and yell about some stupid intel trick
>
> now granted, that's REALLY simplified, but that's the basics of it.

Granted, this would detect the case of BX on a CPU w/o cpuid correctly.
But there is no such abomination out there (yet). In any case, I'm
curious, how do you go about detecting BX at such an early stage (no PCI
or anything yet)?

> #So it would be possible to have a BX-Cyrix(w/ cpuid) combo, but not a
> #Cyrix w/o cpuid enabled and some random hardware at the same ports.
> #Unless we test for every possible thing that may happen to lie at those
> #addresses (currently only the BX chipset, but who knows what the hardware
> #guys might come up with next).
>
> I'd rather deal with the hardware idiots when they screw up like that, and
> not before. ;)

I agree. My point is that we don't want to start adding detection code
for every single possible thing that may exist out there, unless it is
absolutely necessary. This low-level stuff has a really strong tendecy to
interact and break things (as the BX-Cyrix case proved). If we can work
on the BX chipset in C somewhere else the better.

> #The assumptions made in Andre Balsa's patch are:
> #1) basically that nothing without cpuid will ever be on a BX chipset (if
> #this proves to be false, then I see you have a valid point).
>
> It just may be. I'd rather take care of that small problem now, while
> we've got a chance.

I'd rather wait and see, and also put it in big red letters in the code.
"This code assumes that anything running on BX will have cpuid available".
Either way would be correct (for now). :)

>
> #2) any CPU that preserves flags across division and doesn't have cpuid, is
> #probably a Cyrix and we may play with 0x22,0x23 ports (True w/ current
> #hardware).
>
> *VERY* close. Any CPU that does 0x22,0x23 and lacks cpuid on by default is
> a Cx6x86. Any CPU that does 0x22,0x23 can be assumed to be a Cyrix. I
> gotta be a nitpicker. ;)
>

True, but how do you know it does 0x22,0x23 *without* using 0x22,0x23?
That why the current code uses the flags across division test.

Cheers,

--
Rafael

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