x86 CPU identification and quirks

(permanently under construction - some links may not work)

by Grzegorz Mazur
All the brand names used here are the property of their owners.

 

 

Last updates: 2000-09-18

The hypertext article contains description of x86 CPU identification algorithm developed by me, based on many different sources of information. The algorithm does not depend on instruction timing, all used tests rely solely on the behavior of CPU.

Description of identification algorithm

Introduction
Problem overview, conventions, coding techniques.
Identifying 8086/88, V20/30, 80186/188, 80286 and checking for 386+
A set of tests that identify 16-bit CPUs and finally check for 32-bit machines.
Behavioral identification of 386 and alikes and checking for 486+
How to identify different 386 chips in a safe way.
Identification of 486 class CPUs
Checking for CPUID support. Identifying 486s without CPUID
Identification of Cyrix and alikes
Identifying Cyrix, IBM, Texas Instruments and SGS-Thomson CPUs. Decoding DIR information.
Identification of 486+ CPUs based on CPUID
Getting and decoding CPUID information.
Identification of 386+ machines based on reset signature
Recovering reset signature on a PC. Decoding signature information.

Useful CPU quirks

Common undocumented instructions
SALC, AAM, AAD.
386 and 486 bugs and strange instructions
POPA/POPAD, 32-bit MUL, IDIV, REP INSB, XBTS/IBTS, CMPXCHG.
32-bit forms of 16-bit instructions and vice versa
SMSW, PUSH seg, BSWAP.
Flags after DIVide
Different behavior of DIV instruction used for CPU detection..
ET bit in CR0
Useful for 386 SX<->DX recognition.

 

 

What I don't know - info wanted

There are several things I don't know, but I would like to. People submitting information on the topics listed below will be rewarded in some way, at least by listing their names..

Go to x86 stuff index.

The End

Copyright 1996 by Grzegorz Mazur
All names used in the article are property of their owners.