Re: New Cyrix patch for 2.0.33

Phil's Kernel Account (kernel@eiterra.nls.net)
Mon, 25 May 1998 23:30:09 -0400 (EDT)


On Mon, 25 May 1998, Rafael R. Reilova wrote:

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

Doh! Something tells me I need to write these emails when I'm actually
100% coherent, a rare occurance. ;P

#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).

Doh! That's right! I left my BX docs at work unfortunately, but if you
PROBE the 0x22/0x23 ports *CORRECTLY* on the BX chipset, it will return
something.

#The correct algorithm, which is implemented in the posted patch is:
^
Almost :)

#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.

This WILL work. Without a doubt. However, a little messy, IMHO. I think
that I'd rather do something like this...

1. if has cpuid
do cpuid
else
probe 486/386
if !386 && flags are preserved across divison
check for BX @ 0x22/0x23
if !BX
enable cpuid
goto 1
end if
end if

Much happier and cleaner, IMHO. :)

-Phil R. Jaenke (kernel@nls.net / prj@nls.net)
TheGuyInCharge(tm), Ketyra Designs - We get paid to break stuff :)
Linux pkrea.ketyra.INT 2.0.33 #15 Sat Apr 18 00:40:21 EDT 1998 i586
Linux eiterra.nls.net 2.1.98 #15 Fri May 1 18:21:00 EDT 1998 i586
- Linus says for 'brave people only.' I say 'keep a backup.' - :)
! I reserve the right to bill spammers for my time and disk space !

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