pub struct CpuId { /* fields omitted */ }
Expand description
The main type used to query information about the CPU we’re running on.
Other structs can be accessed by going through this type.
Return new CpuId struct with custom reader function.
This is useful for example when testing code or if we want to interpose
on the CPUID calls this library makes.
Return information about the vendor (LEAF=0x00).
This leaf will contain a ASCII readable string such as “GenuineIntel”
for Intel CPUs or “AuthenticAMD” for AMD CPUs.
✅ AMD ✅ Intel
Query a set of features that are available on this CPU (LEAF=0x01).
✅ AMD ✅ Intel
Query basic information about caches (LEAF=0x02).
❌ AMD ✅ Intel
Retrieve serial number of processor (LEAF=0x03).
❌ AMD ✅ Intel
Retrieve more elaborate information about caches (LEAF=0x04).
As opposed to get_cache_info, this will tell us
about associativity, set size, line size of each level in the cache
hierarchy.
❌ AMD ✅ Intel
Information about how monitor/mwait works on this CPU (LEAF=0x05).
🟡 AMD ✅ Intel
Query information about thermal and power management features of the CPU (LEAF=0x06).
🟡 AMD ✅ Intel
Find out about more features supported by this CPU (LEAF=0x07).
🟡 AMD ✅ Intel
Direct cache access info (LEAF=0x09).
❌ AMD ✅ Intel
Info about performance monitoring (LEAF=0x0A).
❌ AMD ✅ Intel
Information about topology (LEAF=0x0B).
✅ AMD ✅ Intel
Information for saving/restoring extended register state (LEAF=0x0D).
✅ AMD ✅ Intel
Quality of service monitoring information (LEAF=0x0F).
❌ AMD ✅ Intel
Quality of service enforcement information (LEAF=0x10).
❌ AMD ✅ Intel
Information about secure enclave support (LEAF=0x12).
❌ AMD ✅ Intel
Intel Processor Trace Enumeration Information (LEAF=0x14).
❌ AMD ✅ Intel
Time Stamp Counter/Core Crystal Clock Information (LEAF=0x15).
❌ AMD ✅ Intel
Processor Frequency Information (LEAF=0x16).
❌ AMD ✅ Intel
Contains SoC vendor specific information (LEAF=0x17).
❌ AMD ✅ Intel
Query deterministic address translation feature (LEAF=0x18).
❌ AMD ✅ Intel
Returns information provided by the hypervisor, if running
in a virtual environment (LEAF=0x4000_00xx).
Needs to be a virtual CPU to be supported.
Extended Processor and Processor Feature Identifiers (LEAF=0x8000_0001).
✅ AMD 🟡 Intel
Retrieve processor brand string (LEAF=0x8000_000{2..4}).
✅ AMD ✅ Intel
L1 Instruction Cache Information (LEAF=0x8000_0005)
✅ AMD ❌ Intel (reserved)
L2/L3 Cache and TLB Information (LEAF=0x8000_0006).
✅ AMD 🟡 Intel
Advanced Power Management Information (LEAF=0x8000_0007).
✅ AMD 🟡 Intel
Processor Capacity Parameters and Extended Feature Identification (LEAF=0x8000_0008).
✅ AMD 🟡 Intel
Informations about memory encryption support (LEAF=0x8000_001F)
✅ AMD ❌ Intel (reserved)
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.