The MmUnmapIoSpace routine unmaps a specified range of physical addresses previously mapped by MmMapIoSpace.
VOID
MmUnmapIoSpace(
IN PVOID BaseAddress,
IN SIZE_T NumberOfBytes
);
None
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
If a driver calls MmMapIoSpace during device start-up, it must call MmUnmapIoSpace when it receives a PnP stop-device or remove-device IRP for the same device object.
Callers of MmUnmapIoSpace must be running at IRQL = PASSIVE_LEVEL.