ddi_iopb_alloc() allocates memory for DMA transfers and should be used if the device accesses memory in a non-sequential fashion, or if synchronization
steps using ddi_dma_sync(9F) should be as lightweight as possible, due to frequent
use on small objects. This type of access is commonly known as consistent access. The allocation will obey the alignment and padding constraints as specified in the limits argument and other limits imposed by the system.
Note that you still must use DMA resource allocation functions (see ddi_dma_setup(9F)) to establish DMA resources for the memory allocated using ddi_iopb_alloc().
In order to make the view of a memory object shared between a CPU and a DMA device consistent, explicit synchronization steps using ddi_dma_sync(9F) or ddi_dma_free(9F) are still required. The DMA resources will be allocated so that these synchronization steps are as efficient
as possible.
ddi_iopb_free() frees up memory allocated by ddi_iopb_alloc().
|