ddcpuid

x86 CPU Identification tool

This was initially used internally, so it's pretty unfriendly.

The best way to use this module would be:

CPUINFO info;     // Important to let the struct init to zero!
getLeaves(info);  // Get maximum CPUID leaves (mandatory step before info)
getVendor(info);  // Get vendor string (mandatory step before info)
getInfo(info);    // Fill CPUINFO structure (optional)

Then checking the corresponding field:

if (info.ext.amx_xfd) {
  // Intel AMX is available
} else {
  // Feature unavailable
}

See the CPUINFO structure for available fields.

For more information, it's encouraged to consult the technical manual.

Members

Enums

Vendor
enum Vendor

Vendor ID.

VirtVendor
enum VirtVendor

Virtual Vendor ID, used as the interface type.

Functions

asmcpuid
void asmcpuid(REGISTERS regs, uint level, uint sublevel)

Query processor with CPUID.

getInfo
void getInfo(CPUINFO info)

Fetch CPU information.

getLeaves
void getLeaves(CPUINFO info)

Get CPU leaf levels.

getVendor
void getVendor(CPUINFO info)

Fetch CPU vendor

Manifest constants

DDCPUID_PLATFORM
enum DDCPUID_PLATFORM;

Target platform

DDCPUID_PLATFORM
enum DDCPUID_PLATFORM;

Target platform

DDCPUID_VERSION
enum DDCPUID_VERSION;

Library version

Structs

CACHEINFO
struct CACHEINFO

CPU cache entry

CPUINFO
struct CPUINFO

CPU information structure

REGISTERS
struct REGISTERS

Registers structure used with the asmcpuid function.

Meta

Authors

dd86k (dd@dax.moe)

License

MIT