PsLinearToPhysical

Converts a linear address to a physical address.

Syntax

PULSE_STATUS PsLinearToPhysical(
 [in] PPS_ENGINE pEngine,
 [in] uint64_t PageTableAddress,
 [in] uint64_t Address,
 [out, optional] uint64_t* pPhysicalAddress
);

Parameters

PPS_ENGINE pEngine

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

uint64_t PageTableAddress

The target page-table root address. This page-table is used to perform the page walk for the specified address. The currently loaded page-table address is stored in the CR3 register.

uint64_t Address

The address value used to convert the linear address into a physical address.

uint64_t* pPhysicalAddress

Receives the resulting physical address.

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_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
Might happen if
  • The pEngine parameter is NULL.
PULSE_STATUS_INVALID_PACKET
0xC0000031
An invalid or unexpected packet was received in response.
PULSE_STATUS_INVALID_TRANSLATION
0xC0000021
Linear to physical address translation failed. Might happen if there is no valid translation to the physical address.
PULSE_STATUS_DEVICE_CONNECTION_LOST
0xC0000308
The connection to the transport was lost. Try restarting the engine or the transport.