PFREE_MAP_REGISTERS callback function (wdm.h)

The FreeMapRegisters routine releases a set of map registers that were saved from a call to AllocateAdapterChannel.

Syntax

PFREE_MAP_REGISTERS PfreeMapRegisters;

void PfreeMapRegisters(
  [in] PDMA_ADAPTER DmaAdapter,
  [in] PVOID MapRegisterBase,
  [in] ULONG NumberOfMapRegisters
)
{...}

Parameters

[in] DmaAdapter

Pointer to the DMA_ADAPTER structure returned by IoGetDmaAdapter that represents the bus-master adapter or DMA controller.

[in] MapRegisterBase

Specifies the map registers allocated for the DMA operation. The system passes this value to the driver's AdapterControl routine.

[in] NumberOfMapRegisters

Specifies the number of map registers to be released. This value must match the number specified in an earlier call to AllocateAdapterChannel.

Return value

None

Remarks

FreeMapRegisters is not a system routine that can be called directly by name. This routine is only callable by pointer from the address returned in a DMA_OPERATIONS structure. Drivers obtain the address of this routine by calling IoGetDmaAdapter.

When the driver of a bus-master device has completed the current packet-based DMA transfer request, it calls FreeMapRegisters to release the map registers previously allocated by a call to AllocateAdapterChannel and retained because its AdapterControl routine returned DeallocateObjectKeepRegisters. The driver must call FreeMapRegisters after calling FlushAdapterBuffers.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Desktop
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
IRQL DISPATCH_LEVEL
DDI compliance rules IrqlDispatch(storport), IrqlDispatch(storport), IrqlDispatch(wdm)

See also

AllocateAdapterChannel

DMA_ADAPTER

DMA_OPERATIONS

IoGetDmaAdapter

MapTransfer