As mentioned earlier, DMA maps represent memory areas (that is to say, DMA segments) that have been allocated according to the properties of a DMA tag and are within device visible address space.
DMA maps can be managed with the following functions:
#include <machine/bus.h> int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp); int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map);
The bus_dmamap_create
function creates a DMA map based on the DMA tag dmat
and stores the result in mapp
. The flags
argument modifies bus_dmamap_create
’s behavior. Table 12-2 displays its only valid value.
Table 12-2. bus_dmamap_create Symbolic Constants
Constant | Description |
---|---|
| Causes cache synchronization operations to be as cheap as possible for your DMA buffers; this flag is implemented only on sparc64. |
The bus_dmamap_destroy
function tears down the DMA map map
. The dmat
argument is the DMA tag that map
was based on.
3.141.244.201