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