EVT_WDF_RESERVE_DMA callback function (wdfdmatransaction.h)

[Applies to KMDF only]

The EvtReserveDma event callback function is called when the framework has reserved resources to execute and release a transaction. Reserved resources include map registers and the WDM DMA adapter's lock.

Syntax

EVT_WDF_RESERVE_DMA EvtWdfReserveDma;

void EvtWdfReserveDma(
  [in] WDFDMATRANSACTION DmaTransaction,
  [in] PVOID Context
)
{...}

Parameters

[in] DmaTransaction

A handle to the DMA transaction object that represents the transaction to which DMA resources were assigned.

[in] Context

The context pointer that the driver specified in a previous call to WdfDmaTransactionAllocateResources.

Return value

None

Remarks

Drivers register an EvtReserveDma event callback function by calling WdfDmaTransactionAllocateResources.

The framework calls a driver's EvtReserveDma event callback function when DMA resources have been assigned for exclusive use with the associated transaction object. The driver can initialize and execute the transaction multiple times while holding this reservation.

A driver typically initializes and then initiates the transaction from within its EvtReserveDma event callback function. For more information about the reservation sequence, see Reserving DMA Resources.

The driver may call WdfDmaTransactionFreeResources from within EvtReserveDma.

On operating systems earlier than Windows 8, EvtReserveDma must be used with an enabler that specifies a packet-mode DMA enabler. Starting with Windows 8, EvtReserveDma can also be used with an enabler that specifies a system-mode DMA enabler.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.11
Header wdfdmatransaction.h (include Wdf.h)
IRQL DISPATCH_LEVEL

See also

WdfDmaTransactionAllocateResources

WdfDmaTransactionFreeResources