Module x86::cpuid

source · []
Expand description

Support for the CPUID instructions.

Modules

Uses Rust’s cpuid function from the arch module.

Macros

Macro which queries cpuid directly.

Structs

Processor Power Management and RAS Capabilities (LEAF=0x8000_0007).

Describes any kind of cache (TLB, Data and Instruction caches plus prefetchers).

Iterates over cache information (LEAF=0x02).

Information about an individual cache in the hierarchy.

Iterator over caches (LEAF=0x04).

The main type used to query information about the CPU we’re running on.

Low-level data-structure to store result of cpuid instruction.

Deterministic Address Translation Structure

Deterministic Address Translation Structure Iterator (LEAF=0x18).

Direct cache access info (LEAF=0x09).

EBX:EAX and EDX:ECX provide information on the Enclave Page Cache (EPC) section

Structured Extended Feature Identifiers (LEAF=0x07).

Extended Processor and Processor Feature Identifiers (LEAF=0x8000_0001)

ExtendedState subleaf structure for things that need to be restored.

Information for saving/restoring extended register state (LEAF=0x0D).

Information about topology (LEAF=0x0B).

Gives information about the current level in the topology.

Processor and Processor Feature Identifiers (LEAF=0x01).

Information about Hypervisor (LEAF=0x4000_0001)

L1 Cache and TLB Information (LEAF=0x8000_0005).

L2/L3 Cache and TLB Information (LEAF=0x8000_0006).

L2 Cache Allocation Technology Enumeration Sub-leaf (LEAF=0x10, SUBLEAF=2).

L3 Cache Allocation Technology Enumeration Sub-leaf (LEAF=0x10, SUBLEAF=1).

Information about L3 cache monitoring.

Memory Bandwidth Allocation Enumeration Sub-leaf (LEAF=0x10, SUBLEAF=3).

Encrypted Memory Capabilities

Information about how monitor/mwait works on this CPU (LEAF=0x05).

Info about performance monitoring – how many counters etc. (LEAF=0x0A)

Processor name (LEAF=0x8000_0002..=0x8000_0004).

Processor Capacity Parameters and Extended Feature Identification (LEAF=0x8000_0008).

Processor Frequency Information (LEAF=0x16).

Processor Serial Number (LEAF=0x3).

Intel Processor Trace Information (LEAF=0x14).

Quality of service enforcement information (LEAF=0x10).

Intel Resource Director Technology RDT (LEAF=0x0F).

Intel SGX Capability Enumeration Leaf (LEAF=0x12).

Iterator over the SGX sub-leafs (ECX >= 2).

Iterator for SoC vendor attributes.

A vendor brand string as queried from the cpuid leaf.

SoC vendor specific information (LEAF=0x17).

Information about the SVM features that the processory supports (LEAF=0x8000_000A).

Query information about thermal and power management features of the CPU (LEAF=0x06).

Time Stamp Counter/Core Crystal Clock Information (LEAF=0x15).

Vendor Info String (LEAF=0x0)

Enums

Info about cache Associativity.

What type of cache are we dealing with?

Info about a what a given cache caches (instructions, data, etc.)

Deterministic Address Translation cache type (EDX bits 04 – 00)

Where the extended register state is stored.

What kidn of extended register state this is.

Identifies the different Hypervisor products.

Intel SGX EPC Enumeration Leaf

What type of core we have at this level in the topology (real CPU or hyper-threaded).

Constants

This table is taken from Intel manual (Section CPUID instruction).