1.4.4 Address Mappings and MDLs

HalTranslateBusAddress

Returns the corresponding physical address in system memory for a given bus-relative logical address.

MmGetPhysicalAddress

Returns the corresponding physical address for a given valid virtual address.

MmGetMdlVirtualAddress

Returns a (possibly invalid) virtual address for a buffer described by a given MDL; the returned address, used as an index to a physical address entry in the MDL, can be input to IoMapTransfer for drivers that use DMA.

MmGetSystemAddressForMdl

Returns a system-space virtual address that maps the physical pages described by a given MDL for drivers whose devices must use PIO.

MmBuildMdlForNonPagedPool

Fills in the corresponding physical addresses of a given MDL that specifies a range of virtual addresses in nonpaged pool.

MmGetMdlByteCount

Returns the length in bytes of the buffer mapped by a given MDL.

MmGetMdlByteOffset

Returns the byte offset within a page of the buffer described by a given MDL.

MmMapLockedPages

Maps already locked physical pages, described by a given MDL, to a returned virtual address range.

MmUnmapLockedPages

Releases a mapping set up by MmMapLockedPages.

MmIsAddressValid

Returns whether a page fault will occur if a read or write is done at the given virtual address.

MmSizeOfMdl

Returns the number of bytes required for an MDL describing the buffer specified by the given virtual address and length in bytes.

MmCreateMdl

Allocates and initializes an MDL describing a buffer specified by the given virtual address and length in bytes; returns a pointer to the MDL.

MmPrepareMdlForReuse

Reinitializes a caller-created MDL for reuse.

MmInitializeMdl

Initializes a caller-created MDL to describe a buffer specified by the given virtual address and length in bytes.

MmMapIoSpace

Maps a physical address range to a cached or noncached virtual address range in nonpaged system space.

MmUnmapIoSpace

Unmaps a virtual address range from a physical address range.

MmProbeAndLockPages

Probes the pages specified in an MDL for a particular kind of access, makes the pages resident, and locks them in memory; returns the MDL updated with corresponding physical addresses. (Usually, only highest-level drivers call this routine.)

MmUnlockPages

Unlocks the previously probed and locked pages specified in an MDL.

IoAllocateMdl

Allocates an MDL large enough to map the starting address and length supplied by the caller; optionally associates the MDL with a given IRP.

IoBuildPartialMdl

Builds an MDL for the specified starting virtual address and length in bytes from a given source MDL. Drivers that split large transfer requests into a number of smaller transfers can call this routine.

IoFreeMdl

Releases a given MDL allocated by the caller.