Skip to main content

Module cpu

Module cpu 

Source
Expand description

CPU identification utilities: CPUID wrapper, brand string, databases, vmid template, stepping extraction.

Structs§

CpuEntry
CpuStepping
CPU stepping information (model, family, ext-model).
CpuidResult

Statics§

AMD_RYZEN_DB
AMD Ryzen / Threadripper database.
INTEL_CORE_DB
Intel Core i3/i5/i7/i9 database.
INTEL_ULTRA_DB
Intel Core Ultra (Series 1 / Series 2) database.
INTEL_XEON_DB
Intel Xeon D/E/W series database.

Functions§

cpu_brand_string
Return the CPU brand string (from leaves 0x80000002-4). Empty on failure.
cpuid
fetch_steppings
Extract stepping info from CPUID leaf 1 EAX.
is_amd
Returns true if the CPU manufacturer is AMD.
is_celeron
Returns true if the CPU is a Celeron based on its brand string.
is_intel
Returns true if the CPU manufacturer is Intel.
is_leaf_supported
Check whether CPUID leaf leaf is supported by this CPU.
lookup_expected_threads
Look up the expected thread count for a given CPU brand string. Returns None if not found in any database.
vendor_string
Reconstruct a 12-byte vendor string from EBX/ECX/EDX of a CPUID result.
vmid_template
Matches vendor strings against 30+ known VM signatures. Returns (found: bool, brand: VMBrand).