Allocate a DMA channel.
Retrieve the system's DMA engine attributes with ddi_dmae_getattr(9F).
Lock the DMA object in memory (see physio(9F)).
This step is not necessary in block drivers for buffers coming from the file system, as the file system has already locked the data in memory.
Allocate DMA resources for the object.
Program the system DMA engine to perform the transfer with ddi_dmae_prog(9F).
Perform any required object synchronizations.
Stop the DMA engine with ddi_dmae_stop(9F).
Release the DMA resources.
Deallocate the DMA channel.
Free the DMA handle.
Certain hardware platforms may restrict DMA capabilities in a bus-specific way. Drivers should use ddi_slaveonly(9F) to determine if the device is in a slot in which DMA is possible. For an example, see "attach()".