PVOID
MmGetSystemAddressForMdl(
IN PMDL Mdl
);
MmGetSystemAddressForMdl returns a nonpaged system-space virtual address for the buffer described by the MDL. It maps the physical pages described by a given MDL into system space, if they are not already mapped to system space.
MmGetSystemAddressForMdl returns the base system-space virtual address that maps the physical pages described by the given MDL.
Drivers of PIO devices call this routine to translate a virtual address range, described by the MDL at Irp->MdlAddress, for a user buffer to a system-space address range.
A caller running at IRQL DISPATCH_LEVEL must supply an MDL that maps nonpageable virtual addresses. The input MDL must describe an already locked-down user-space buffer returned by MmProbeAndLockPages, a locked-down buffer returned by MmBuildMdlForNonPagedPool, or system-space memory allocated from nonpaged pool, contiguous memory, noncached memory, or a zone buffer.
The returned base address has the same offset as the virtual address in the MDL.
Callers of MmGetSystemAddressForMdl must be running at IRQL <= DISPATCH_LEVEL.