busdma problem
Mark Tinguely
tinguely at casselton.net
Tue Feb 3 16:09:59 PST 2009
> On Fri, Jan 30, 2009 at 02:07:14PM -0800, Andrew Thompson wrote:
> > On Fri, Jan 30, 2009 at 09:31:47AM -0800, Andrew Thompson wrote:
> > > >> I am having an issue with busdma when bounce buffers are used. I have
> > > >> patched _bus_dmamap_sync_bp() to print out the details when a bounce
> > > >> happens and also print the driver buffer before and after.
> > > >>
> > > >> During normal dma everything is fine,
[Deleted items]
> > As suggested by Sam, this works properly when the buffer is malloc'd
> > instead of taken from the stack. So is this now a bug or a feature??
>
> As a test I removed the checking of KENTER_CACHE in
> arm/arm/pmap.c:pmap_kenter_internal() so all memory is uncached and now
> dma bounces to a stack variable work.
>
> busdma remaps the address nocache into vaddr_nocache pointer and uses
> that for the bcopy, obviously arm_remap_nocache() is not working
> correctly.
>
> Andrew
I suspected this was another occurrance of the same cache problem that
has been mentioned starting about 3 weeks ago. I even was going to ask
you if it was using arm_remap_nocache().
I have a new concept patch for the kernel caching issue at:
http://www.casselton.net/~tinguely/arm_pmap_unmanaged.diff
I am still waiting for a drive to build a -current machine. I will also
look at any other caching ideas that others have.
--Mark Tinguely.
More information about the freebsd-arm
mailing list