PsCpuId

Executes the CPUID instruction and returns its results.

Syntax

PULSE_STATUS PsCpuId(
 [in] PPS_ENGINE pEngine,
 [in] uint32_t Leaf,
 [in] uint32_t Subleaf,
 [out] PPS_CPUID_DATA pCpuIdData
);

Parameters

PPS_ENGINE pEngine

An opaque handle to an engine created by the EngCreateEngine function.

uint32_t Leaf

CPUID leaf to be queried with the CPUID instruction.

uint32_t Subleaf

CPUID sub-leaf to be queried with the CPUID instruction.

PPS_CPUID_DATA pCpuIdData

A pointer to the PS_CPUID_DATA structure holding the results of the execution of the CPUID instruction.

Return value

If the function succeeds, the return value is PULSE_STATUS_SUCCESS.

If it fails, it returns one of the PULSE_STATUS values. Possible return codes include, but are not limited to, the following:

PULSE_STATUS_INSUFFICIENT_RESOURCES
0xC0000002
One of the memory allocations failed during initialization.
PULSE_STATUS_READ_FAILED
0xC0000003
Transport communication failed during a read operation.
PULSE_STATUS_WRITE_FAILED
0xC0000004
Transport communication failed during a write operation.
PULSE_STATUS_TIMEOUT
0xC0000007
Might happen if
  • Transport I/O timed out.
  • No response was received from the debuggee within the request timeout period.
PULSE_STATUS_INVALID_PARAMETER
0xC0000010
The pEngine parameter is NULL.
PULSE_STATUS_INVALID_PACKET
0xC0000031
An invalid or unexpected packet was received in response.
PULSE_STATUS_DEVICE_CONNECTION_LOST
0xC0000308
The connection to the transport was lost. Try restarting the engine or the transport.

Remarks

Even though the CPUID instruction is executed in VMX-root mode the result is adjusted to reflect the value that the guest debuggee would get.

The result of executing the CPUID instruction may vary between CPU cores due to differences in microarchitecture or microcode versions.