The driver should perform these steps for third-party DMA.
Allocate a DMA channel.
Retrieve the system's DMA engine attributes with ddi_dmae_getattr(9F).
Lock the DMA object in memory. See the physio(9F) or ddi_umem_lock(9F) man page.
Allocate DMA resources for the object.
Use ddi_dmae_prog(9F) to program the system DMA engine to perform the transfer.
Perform any required object synchronizations.
Use ddi_dmae_stop(9F) to stop the DMA engine.
Release the DMA resources.
Deallocate the DMA channel.
Certain hardware platforms restrict DMA capabilities in a bus-specific way. Drivers should use ddi_slaveonly(9F) to determine whether the device is in a slot in which DMA is possible.