An
x86 (
IA-32)
assembler instruction which returns useful information about the
CPU present in the system. Information is returned to
EAX,
EBX,
ECX and
EDX, dependent on the original contents of EAX.
It was introduced with the
Pentium CPUs and backported to the lower-end
80486, partly to make the identification task of the developers easier. Prior to this, one would have to incrementally test particular
features of the x86 family, beginning with granpa 8086, seeing if
32 bit instructions were possible and so forth. Of course,
AMD also implemented the instruction on more recent CPUs.
When calling CPUID with EAX=0h, EAX:EBX:ECX:EDX will be filled with the following information :
XXXX:Genu:ineI:ntel for an
Intel CPU and XXXX:Auth:enti:cAMD for an AMD CPU, with XXXX a number being the highest accepted argument for CPUID. Therefore, 0005:Genu:ineI:ntel will accept 0h, 1h,2h,3h,4h and 5h as an argument. Other values are :
- UMC UMC UMC (United Microelectronics Corporation), made some 486s
- CyrixInstead(Now VIA)
- NexGenDriven(Now VIA)
- CentaurHauls(Now VIA)
- RiseRiseRise(Rise)
- GenuineTMx86(Transmeta)
When calling CPUID with EAX=1h, one will get some further information about
Family,
Model and
Stepping ID of the CPU, as well as info about the suported features.
The AMD families go like this :
- family 4 : Am486 and Am5x86
- family 5 (model) : AMD K5 (1/2/3), K6 (6/7), K6-2 (8) and K6-III (9)
- family 6 (model) : AMD Athlon (1/2/4), AMD Duron(3), Athlon MP(6), Mobile Athlon (6) and Mobile Duron (7)
The Intel families go like this :
When calling CPUID with EAX=2h, information about the caches.
When calling CPUID with EAX=3h, It will give the infamous
processor serial number on a Pentium !!!. The feature was removed in the P4.
Some extended arguments, apparently introduced by AMD, will return advanced identification strings.
Sources : Intel reference, AMD paper on CPU identification, and defunct web page from Google's cache