Implementing DMA Drivers

Supporting DMA in a KMDF driver requires code in several of the driver’s event callback functions, as Figure 17-3 shows.

DMA implementation in KMDF drivers

Figure 17-3. DMA implementation in KMDF drivers

As the figure shows, DMA-related processing takes place in four phases:

  1. During driver initialization, typically in the EvtDriverDeviceAdd callback, the driver initializes and creates the DMA enabler object and common-buffer object that are required to support the DMA device.

  2. When an I/O request arrives that requires DMA, the driver creates a transaction object if it has not already done so and initiates the DMA transaction.

    This code typically is in the EvtIoRead ...

Get Developing Drivers with the Windows® Driver Foundation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.