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 cpu;          // CPUINFO.init or memset
ddcpuid_leaves(cpu);  // Get maximum CPUID leaves (mandatory step before info)
ddcpuid_cpuinfo(cpu); // Fill CPUINFO structure (optional)

Then checking the corresponding field:

if (cpu.amx_xfd) {
  // Intel AMX with AMX_XFD is available
}

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 cpu)
Undocumented in source. Be warned that the author may not have intended to support it.
ddcpuid_cpuinfo
void ddcpuid_cpuinfo(CPUINFO cpu)

Fetch CPU information.

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

Query processor with CPUID.

ddcpuid_leaves
void ddcpuid_leaves(CPUINFO cpu)

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

Cache entry.

CPUINFO
struct CPUINFO

CPU information structure

REGISTERS
struct REGISTERS

Registers structure used with the ddcpuid function.

VendorString
struct VendorString

Vendor string structure.

VirtVendorString
struct VirtVendorString

Virtualization vendor string structure.

Meta

Authors

dd86k (dd@dax.moe)