cpuid
CPU Identification
Returns processor information based on EAX value.
Details
Executes CPU identification, returning processor feature information and capabilities into EAX, EBX, ECX, and EDX based on the input value in EAX (and sometimes ECX). This is a privileged instruction in some contexts and causes a serializing event; it clears the pipeline and blocks out-of-order execution until completion. The exact output depends on the EAX input leaf and subleaf (ECX) values.
Pseudocode Operation
EAX, EBX, ECX, EDX ← cpuid_data[EAX, ECX];
Example
Encoding
Operands
Reference (Intel® SDM)
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| 0F A2 | CPUID | ZO | Valid Valid | Returns processor identification and feature information to the EAX, EBX, ECX, and EDX registers, as determined by input entered in EAX and, in some cases, ECX. |
Description
Operation
IA32_BIOS_SIGN_ID MSR := Update with installed microcode revision number; (* Note that for some leaf values in EAX, the subleaf value in ECX is ignored. *) (* Note that for invalid CPUID leaves and subleaves, the output values returned in EAX, EBX, ECX, and EDX are “Reserved” *) (* Refer to Volume 1, Chapter 21 for details surrounding CPUID_INFO() *) (EAX, EBX, ECX, EDX) := CPUID_INFO(EAX, ECX)
Flags Affected
None. Exceptions (All Operating Modes) #UD If the LOCK prefix is used. 1. On Intel 64 processors, CPUID clears the high 32 bits of the RAX/RBX/RCX/RDX registers in all modes. CPUID—CPU Identification Vol. 2A 3-203 In earlier IA-32 processors that do not support the CPUID instruction, execution of the instruction results in an invalid opcode (#UD) exception being generated. CPUID—CPU Identification Vol. 2A 3-204