CPUID

From Thomas-Krenn-Wiki
Jump to navigation Jump to search

The actual processor signature, which identifies a processor type, is often referred to as the CPUID. The CPUID Opcode itself is a "Processor supplementary capability'" for the x86 architecture that enables it for the software to recognize details of the processor. The software can determine the Processor signature and the availability of functions (such as MMX/SSE) by using the CPUID Opcode. For user and administrators is the processor identifier, also known as CPUID or processor signature, particularly relevant when it comes to finding the latest microcode version for the CPU in use.

CPUID Opcode

If the value 0x00 is in the EAX register when the CPUID opcode is called, the command writes the vendor ID to the EBX/ECD/EDX registers. However, if the value 0x01 is in the EAX register, the command overwrites the EAX register with the processor signature. (source: Intel)

The CPUID opcode is 0Fh, A2h (as two bytes or A20Fh as a single word). The value in the EAX register, and in some cases the ECX register, specifies what information should be returned. Here are some examples:

  • EAX-Register = 0x00 -> CPUID command returns vendor ID in EBX/ECD/EDX registers
  • EAX-Register = 0x01 -> CPUID command returns Processor Signature in EAX-register

Vendor ID

The following Processor Signature as well as the Vendor ID are both required for identification of a processor type. The Vendor IDs are for example:[1]

  • "AuthenticAMD" (AMD)
  • "GenuineIntel" (Intel)

The following Vendor IDs are common in virtual machines with virtualized hardware:

  • "KVMKVMKVM" (KVM)
  • "Microsoft Hv" (Microsoft Hyper-V)
  • "VMwareVMware" (VMware)
  • "XenVMMXenVMM" (Xen HVM)

Processor Signature

The processor signature requires the following information:

  • Type (0)
  • Extended Family, Family
  • Extended Model, Model
  • Stepping

The information are coded as follows in the EAX register:[2]

Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EAX descriptions Intel (reserved) Extended Family Ext. Model (res.) Type Family Model Stepping
EAX descriptions AMD (reserved) ExtFamily ExtModel (reserved) BaseFamily BaseModel Stepping
Example of Intel Xeon E3-1220 v6 0 0 0 9 0 6 e 9
Example of AMD EPYC 7251 8-Core 0 0 8 0 0 f 1 2

To display Family / Model / Stepping for users (e.g., /proc/cpuinfo under Linux), the information is compiled as follows:

/proc/cpuinfo output

(decimal, not hex)

Family Model Stepping
rule formulation Intel[2] IF Family_ID ≠ 0FH

THEN DisplayFamily = Family_ID;

ELSE DisplayFamily = Extended_Family_ID + Family_ID;

IF (Family_ID = 06H or Family_ID = 0FH)

THEN DisplayModel = (Extended_Model_ID « 4) + Model_ID;

ELSE DisplayModel = Model_ID;

Example of Intel Xeon E3-1220 v6 Ext. Family = 00h

Family = 06h

Display Family = 06h = 6 (decimal)

Anzeige Family (decimal): 6

Ext. Model = 09h

Model = 0eh

Display Model = 9eh (hex) = 158 (decimal)

Display Model (dezimal): 158

9
rule formulation AMD[3] Family[7:0]=({0000b,BaseFamily[3:0]}+ExtendedFamily[7:0]) Model[7:0]={ExtendedModel[3:0],BaseModel[3:0]}
example of AMD EPYC 7251 8-Core ExtFamily = 08h = 8 (decimal)

BaseFamily = 0fh = 15 (decimal)

Family = 8 + 15 = 23 (decimal)

Display Family (decimal): 23

ExtModel = 00h

BaseModel = 01h (hex)

Model = 01h (hex) = 1 (decimal)

Display Model (decimal): 1

2

Querying the processor signature

Microcode updates always refer to a certain processor type (processor signature). The processor signature can be read out in the following manner under the respective operating systems:

References

  1. CPUID (en.wikipedia.org)
  2. 2.0 2.1 Intel 64 and IA-32 Architectures Developer's Manual: Vol. 2A (www.intel.com) Seiten 3-190, 3-204, 3-205 (292, 306, 307 in PDF)
  3. Processor Programming Reference (PPR) for AMD Family 17h Model 01h, Revision B1 Processors Chapter 2.1.11.1 CPUID Instruction Function, Page 56

More information


Author: Werner Fischer

Werner Fischer, working in the Knowledge Transfer team at Thomas-Krenn, completed his studies of Computer and Media Security at FH Hagenberg in Austria. He is a regular speaker at many conferences like LinuxTag, OSMC, OSDC, LinuxCon, and author for various IT magazines. In his spare time he enjoys playing the piano and training for a good result at the annual Linz marathon relay.


Translator: Alina Ranzinger

Alina has been working at Thomas-Krenn.AG since 2024. After her training as multilingual business assistant, she got her job as assistant of the Product Management and is responsible for the translation of texts and for the organisation of the department.


Related articles

ATA Security Feature Set
PCI Express Mini Card (Mini PCIe)
Using UPS in data centers