API change for bus_dma

Andrew Gallatin gallatin at cs.duke.edu
Mon Jun 30 07:03:57 PDT 2003


Terry Lambert writes:
 > Andrew Gallatin wrote:
 > > Most sparc's have 2 different sorts of DMA modes.  One is cache
 > > coherent (aka DDI_DMA_CONSISTENT) -- this is what we all know and love
 > > from PC, alphas, macs, etc.
 > 
 > "contiguous"
 > 
 > 
 > > The other mode (DDI_DMA_STREAMING) allows non cache coherent DMA.
 > > This requires you to call ddi_dma_sync() between your last touch of
 > > the data and you starting a DMA read from a device.  And vice-versa
 > > for a DMA write.
 > 
 > "scatter/gather"
 > 
 > > The reason people use DDI_DMA_STREAMING is because coherent DMA
 > > bandwith tends to be abysmal on most sparcs.
 > 


The idea is that I want to establish a mapping that can be used many
times without any driver or kernel attention.  I don't want to do
anything in terms of a system call, or interrupt, etc, to sync the
cache with the state of the DMA'ed page before a DMA read or after a DMA
write.

For example, scatter gather mapping on alphas (if FreeBSD supported it
for PCI devices) would be fine with me since its cache-coherent and
doesn't require any ddi_dma_sync() operations.


Drew




More information about the freebsd-arch mailing list