API change for bus_dma
Hiten Pandya
hmp at FreeBSD.ORG
Sat Jul 12 19:14:43 PDT 2003
On Fri, Jun 27, 2003 at 04:41:03PM -0400, Andrew Gallatin wrote:
>
> Scott Long writes:
> >
> > As you hinted below, BUS_DMA_NOWAIT does what you want. It will return
> > ENOMEM to the caller if the bounce buffers cannot be pre-allocated
> > during bus_dmamap_load().
>
> OK, thanks. I looks like sparc64 also returns ENOMEM if it runs out of
> sgmap space..
>
> One more question: What's the FreeBSD equivalent of Solaris'
> DDI_DMA_CONSISTENT and DDI_DMA_STREAMING?
As of now, the only one which comes to mind is NetBSD which
supports such an equivalence; known as BUS_DMA_STREAMING.
From what I can recall, the client sets the flag upon call of a
DMA memory allocation or DMA load function. The flag is to be
used if the client is doing sequential, uni-directional
transfers that are regulated by some sort of alignment and size
constraint. According to the NetBSD code, it also "takes
advantage" of middle-man I/O cache hardware... I am not sure if
the NetBSD bus_dma assumes coherency or not.
Only a very few platforms support this...
For DDI_DMA_CONSISTENT, I think it would be BUS_DMA_COHERENT
which is what you are looking for if I am reading the Solaris
2.6 DDI docs correctly.
Hope this helps in the slightest.
Cheers.
-- Hiten (hmp at FreeBSD.ORG)
More information about the freebsd-arch
mailing list