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)
getInfo(info);    // Fill CPUINFO structure (optional)

Then checking the corresponding field:

if (info.extensions.amx.xfd) {
  // Intel AMX with AMX_XFD is available
} else {
  // Feature unavailable
}

See the CPUINFO structure for available fields.

To further understand these fields, 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

ddcpuid_baseline
const(char)* ddcpuid_baseline(CPUINFO info)
Undocumented in source. Be warned that the author may not have intended to support it.
ddcpuid_cpuinfo
void ddcpuid_cpuinfo(CPUINFO info)

Fetch CPU information.

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

Query processor with CPUID.

ddcpuid_leaves
void ddcpuid_leaves(CPUINFO info)

Get CPU leaf levels.

trace
void trace(const(char)* fmt, ...)

Trace application

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 ddcpuid function.

VendorString
struct VendorString
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
VirtVendorString
struct VirtVendorString
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta

Authors

dd86k (dd@dax.moe)