- 论坛徽章:
- 0
|
关于cpuid,刚才查到相关资料,共享一下:
Application level processor identification information is available in a register file termed: CPUID.
This register file is divided into a fixed region, registers 0 to 4, and a variable region, register 5 and
above. The CPUID[3].number field indicates the maximum number of 8-byte registers containing
processor specific information.
The CPUID registers are unprivileged and accessed using the indirect mov (from) instruction. All
registers beyond register CPUID[3].number are reserved and raise a Reserved Register/Field fault
if they are accessed. Writes are not permitted and no instruction exists for such an operation.
Vendor information is located in CPUID registers 0 and 1 and specify a vendor name, in ASCII, for
the processor implementation (Figure 3-10). All bytes after the end of the string up to the 16th byte
are zero. Earlier ASCII characters are placed in lower number register and lower numbered byte
positions.
CPUID register 2 is an ignored register (reads from this register return zero).
CPUID register 3 contains several fields indicating version information related to the processor
implementation.
CPUID register 4 provides general application-level information about processor features.
获取cpuid寄存器的汇编指令为:
_UInt64 _Asm_mov_from_cpuid (_UInt64 r3 [,_Asm_fence]); |
|