MmGetPhysicalAddress function (ntddk.h)

The MmGetPhysicalAddress routine returns the physical address corresponding to a valid nonpaged virtual address.

Syntax

PHYSICAL_ADDRESS MmGetPhysicalAddress(
  [in] PVOID BaseAddress
);

Parameters

[in] BaseAddress

Pointer to the virtual address for which to return the physical address.

Return value

MmGetPhysicalAddress returns the physical address that corresponds to the given virtual address.

Do not use this routine to obtain physical addresses for use with DMA operations. For information about the proper techniques for performing DMA operations, see Adapter Objects and DMA.

Remarks

Callers of MmGetPhysicalAddress can be running at any IRQL, provided that the BaseAddress value is valid.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header ntddk.h (include Ntddk.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL Any level (see Remarks section)

See also

MmIsAddressValid

MmIsNonPagedSystemAddressValid

MmMapIoSpace

MmProbeAndLockPages