Identification of 486 class CPUs checking for CPUID support




Identification of 486-class CPUs; checking for CPUID support




Identification of 486-class CPUs; checking for CPUID support
Copyright 1996 by Grzegorz Mazur
All the brand names used here belong to their owners.
The page was updated on 1996-05-20.



Revision history: 2000-09-01 - some corrections, IBM 486 SLC info
1996-05-20 - initial version, not yet finished



This part of article describes the routines for recognizing various 486-class
CPUs without CPUID support and checking for CPUID support.



Some backgroundBefore Intel (and later other vendors) introduced CPUID
instruction, 486-class CPUs were not too easy to recognize. While talking about
486-class CPUs we shall mention 4 vendors:

Intel
IBM
AMD
Cyrix/TI/ST (Cyrix designs also made by IBM)
UMC All UMC chips (well, not too many), new Intel and new AMD
chips support CPUID. Most of Cyrix and alike chips support their alternate ID
mechanism - DIR registers, which is more precise than CPUID on these CPUs.
The IBM 486 designs are based on 386 execution unit and do not provide the AC
bit in EFLAGS, so they are recognized as 386s by the previous parts of
identification algorithm. Like 386s, all 486-class CPUs and better chips
support the RESET signature identification mechanism. After hardware reset, the
chip signature is placed by microcode in EDX register. Unfortunately, there is
no way other than reset to obtain it, so the mechanism is not very useful unless
the BIOS stores the signature immediately after RESET, although it can usually
be used in real mode. Follow this link for details.



General algorithmFirst, we will check if CPU supports CPUID. If so, it
is new 486, Pentium or better chip, and we shall identify it using CPUID.
If we have Cyrix with CPUID, it is better to use DIR registers for more precise
identification.
If the CPU doesn't support CPUID, we will check for Cyrix family.
If our CPU has no CPUID and it is not Cyrix, it must be "Classic" Intel/AMD
chip.



Checking for CPUID supportThis is quite easy. Try to change the value
of CPUID bit (bit 21) in EFLAGS. If the bit can be toggled, CPUID is supported and
shall be used for precise identification. On Cyrix chips the bit cannot be
toggled if not explicitly allowed - please use this link ....(not ready yet)



Checking for Cyrix CPUPerform the Divide Test routine.
If flag value is 00 or 40 hex, we have Cyrix CPU.



Identification of "Classic" Intel/AMD 486If we cannot obtain RESET signature, we
cannot do too much here, but we still have some chances.
Our CPU can be either:

Intel 486 SX (but not SX2, which supports CPUID)
Intel 486DX
Intel DX2 (before 1995, newer support CPUID)
AMD 486 SX - quite rare chip
AMD 486 DX
AMD 486 DX2/DX4 NV8T (SV8B and 5x86 support CPUID) SX vs.DX can be
distinguished by testing for FPU presence.
There are also some bugs characteristic to early 486s, but unfortunately I
don't have any info on masks and steppings related to the bugs... (bugs will be
described soon).



Copyright 1996 by Grzegorz
Mazur


Wyszukiwarka