Re: Request for feedback on common data backstore in the kernel
- From: John Baldwin <jhb@xxxxxxxxxxx>
- Date: Wed, 26 Sep 2007 14:03:57 -0400
On Wednesday 26 September 2007 12:44:55 pm Hans Petter Selasky wrote:
What I meant was that USB dma directly into main memory. But then anotherPCI
device like an Ethernet device might want to forward that data by dma'ing ityou
out of main memory. The dma address as seen by the two different PCI devices
might not be the same.
I admit that I'm not an expert on how DMA is done on the Sparc, but could
explain a little bit more how a mbuf is loaded into DMA for a network cardon
the Sparc ?
What I'm looking for is a function that transforms a virtual memory address
and a bus-DMA tag into a physical address without blocking. If a mapping is
not possible I want that an error be returned so that I can bounce the data
using a pre-allocate buffer, and not a buffer allocated by bus_dma on the
fly.
bus_dma already preallocates bounce pages when you create a map. I would just
try using the existing bus_dma first w/o trying to use private buffers, etc.
That said, there is one case where this could be useful: for disk dumps it
might be nice to pre-allocate a known "safe" set of pages to use for bouncing
pages (such as on i386 with PAE with a controller that does 32-bit
addressing) that can't be mapped directly.
--
John Baldwin
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- References:
- Re: Request for feedback on common data backstore in the kernel
- From: John-Mark Gurney
- Re: Request for feedback on common data backstore in the kernel
- From: Hans Petter Selasky
- Re: Request for feedback on common data backstore in the kernel
- Prev by Date: Re: Request for feedback on common data backstore in the kernel
- Next by Date: Re: rwlocks: poor performance with adaptive spinning
- Previous by thread: Re: Request for feedback on common data backstore in the kernel
- Next by thread: Re: Request for feedback on common data backstore in the kernel
- Index(es):
Relevant Pages
|
|