Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
This function returns EBUSY if there are any DMA maps still associated with dmat . DMA Map Management Routines, Part 1 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