April 2012
Intermediate to advanced
352 pages
8h
English
The FreeBSD kernel provides four functions for loading a buffer into the device visible address associated with a DMA map:
bus_dmamap_load
bus_dmamap_load_mbuf
bus_dmamap_load_mbuf_sg
bus_dmamap_load_uio
Before I describe these functions, an explanation of bus_dma_segment structures is needed.
A bus_dma_segment structure describes a single DMA segment.
typedef struct bus_dma_segment {
bus_addr_t
ds_addr;
bus_size_t
ds_len;
} bus_dma_segment_t;The ds_addr field contains its device visible address ...