Re: BX chipsets and 2.0.34pre

Kurt Garloff (garloff@kg1.ping.de)
Thu, 21 May 1998 01:19:41 +0200


On Wed, May 20, 1998 at 10:44:28PM +0100, Alan Cox wrote:
> If you are having problems with 2.0.34 then we think (thanks especially to
> Larry Augustin) we've found the problem. Back out the Cyrix patch in
> arch/i386/kernel/head.S
>
> Intel seem to have cunningly arranged that the Cyrix check stuff using I/O
> 0x22/0x23 happens to completely screw the settings on a BX motherboard, making
> 2.0.34pre* do weird things.
>
> I'll release another prepatch tomorrow (UK time) that will drop the Cyrix
> probing. Hopefully that will sort out the remaining 2.0.34 bug reports on
> the IDE, irq loss and weird crashes with BX

Why not try a division of 5 by 2 and see if the flags are preserved by the
CPU before accessing IOports 0x22/3 ? This is standard to detect Cyrix CPUs.
Here are a few lines from my (patched) head.S

/*
* A Cyrix preserves flags in cases where other CPUs change
* them in undefined ways. We need to know this since we may
* need to enable the CPUID instruction at least. (Cyrix chips
* prior to M2 have CPUID disabled by default, the Cx486s
* didn't have it at all.)
*/
xor %ax,%ax
sahf
movb $5,%ax
movb $2,%bx
div %bl
lahf
cmpb $2,%ah
jne nocyrix

/*
* It behaves like a Cyrix so put "Cyrix" in the vendor id
* field. It may be overwritten later with the real thing
* if CPUID works.
*/
movl $0x69727943,SYMBOL_NAME(x86_vendor_id) # low 4 chars
movl $0x00000078,SYMBOL_NAME(x86_vendor_id)+4 # next 4 chars
/* No we can assume it's safe to access IOports 0x22/23 */

-- 
Kurt Garloff, Dortmund 
<K.Garloff@ping.de>
PGP key on http://student.physik.uni-dortmund.de/homepages/garloff

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