In general, the driver should perform the following steps for first-party DMA.
Allocate a DMA channel.
Configure the channel with ddi_dmae_1stparty(9F).
Ensure the DMA object is locked in memory (see physio(9F) or ddi_umem_lock(9F)).
Allocate DMA resources for the object.
Program the DMA engine on the device and start it (this is device specific). When the transfer is complete, continue the bus-master operation.
Perform any required object synchronizations.
Release the DMA resources.
Deallocate the DMA channel.