Writing Device Drivers

First-Party DMA

In general, the driver should perform the following steps for first-party DMA.

  1. Allocate a DMA channel.

  2. Configure the channel with ddi_dmae_1stparty(9F).

  3. Ensure the DMA object is locked in memory (see physio(9F) or ddi_umem_lock(9F)).

  4. Allocate DMA resources for the object.

  5. Program the DMA engine on the device and start it (this is device specific). When the transfer is complete, continue the bus-master operation.

  6. Perform any required object synchronizations.

  7. Release the DMA resources.

  8. Deallocate the DMA channel.