17 #ifndef __LIBICUID_H__ 18 #define __LIBICUID_H__ 50 void cpuid(uint32_t eax, uint32_t *regs);
#define VENDOR_STR_MAX
Definition: icuid_limits.h:21
uint32_t l1_instruction_cache
Definition: icuid.h:396
uint32_t l1_data_cache
Definition: icuid.h:390
uint32_t l3_associativity
Definition: icuid.h:417
uint8_t type
Definition: icuid.h:363
xfeature_t
XSAVE Features, used to determine if a particular feature is supported and enabled by the OS...
Definition: icuid.h:303
#define BRAND_STR_MAX
Definition: icuid_limits.h:22
#define XFEATURE_FLAGS_MAX
Definition: icuid_limits.h:24
uint32_t cpuid_max_ext
Definition: icuid.h:372
cpu_vendor_t vendor
Definition: icuid.h:350
uint64_t icuid_xgetbv(const uint32_t xcr)
Run the xgetbv instruction.
uint32_t l2_cacheline
Definition: icuid.h:423
uint8_t ext_family
Definition: icuid.h:359
uint32_t virtual_address_bits
Definition: icuid.h:432
uint8_t ext_model
Definition: icuid.h:361
void cpuid(uint32_t eax, uint32_t *regs)
Run the cpuid instruction.
#define MAX_INTEL_ET_LEVEL
Definition: icuid_limits.h:28
#define MAX_CPUID_LEVEL
Definition: icuid_limits.h:25
uint32_t l3_cacheline
Definition: icuid.h:426
int cpuid_serialize_raw_data(cpuid_raw_data_t *raw, const char *file)
Writes the raw CPUID info to a file or stdout.
Definition: icuid.c:123
cpu_vendor_t
CPU vendor, as we determined from the Vendor String.
Definition: icuid.h:279
int icuid_identify(cpuid_raw_data_t *raw, cpuid_data_t *data)
Identifies the CPU.
Definition: icuid.c:243
uint32_t l3_cache
Definition: icuid.h:408
#define MAX_EXT_CPUID_LEVEL
Definition: icuid_limits.h:26
uint8_t model
Definition: icuid.h:355
uint32_t cpuid_max_basic
Definition: icuid.h:370
uint8_t family
Definition: icuid.h:353
uint32_t l2_cache
Definition: icuid.h:402
uint32_t l1_associativity
Definition: icuid.h:411
uint32_t logical_cpus
Definition: icuid.h:384
const char * codename
Definition: icuid.h:367
uint32_t signature
Definition: icuid.h:365
void cpuid_ext(uint32_t *regs)
Run the cpuid instruction with custom register values.
int cpuid_get_raw_data(cpuid_raw_data_t *raw)
Obtains the raw CPUID info from the CPU.
Definition: icuid.c:31
uint32_t physical_address_bits
Definition: icuid.h:429
cpuid_feature_t
CPU feature bits.
Definition: icuid.h:97
#define CPU_FLAGS_MAX
Definition: icuid_limits.h:23
int cpuid_is_supported(void)
Check if the cpuid instruction is supported.
uint32_t l1_cacheline
Definition: icuid.h:420
const char * cpu_feature_str(cpuid_feature_t feature)
Returns the short form of the CPU feature flag.
Definition: features.c:36
uint8_t stepping
Definition: icuid.h:357
uint32_t cores
Definition: icuid.h:377
#define MAX_INTEL_DC_LEVEL
Definition: icuid_limits.h:27
uint32_t l2_associativity
Definition: icuid.h:414
int cpuid_deserialize_raw_data(cpuid_raw_data_t *raw, const char *file)
Reads the raw CPUID info to a file or stdin.
Definition: icuid.c:165