Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Feb 2009 18:09:57 -0600 (CST)
From:      Mark Tinguely <tinguely@casselton.net>
To:        sam@freebsd.org, thompsa@freebsd.org
Cc:        arm@freebsd.org
Subject:   Re: busdma problem
Message-ID:  <200902040009.n1409v7K033380@casselton.net>
In-Reply-To: <20090203233028.GA68871@citylink.fud.org.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
>  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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902040009.n1409v7K033380>