From owner-freebsd-arm@FreeBSD.ORG Wed Feb 4 00:09:58 2009 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD3B9106564A for ; Wed, 4 Feb 2009 00:09:58 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 8B5708FC1B for ; Wed, 4 Feb 2009 00:09:58 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id n1409vPd033382; Tue, 3 Feb 2009 18:09:57 -0600 (CST) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1233706198; bh=oHb/k4K5H4sdaAi/9H3gT3xTcqILm9N/w7amZ1V FFaQ=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=NzQYpXPO ajOdVR+sHsTSetDFrAe8H31vwNzNed6Vj99Dsh62yvXX1kw5nGfnG/y+EGrRFbgwgFp nrAv5nQtiSULHYr2jdgePacfv38YEPYko4pV3Wf5WaOo0NCYHGDVOtp1glFHo2+GqVu vtPHXY76FCF8WYSBdANpJ62dS861E= Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n1409v7K033380; Tue, 3 Feb 2009 18:09:57 -0600 (CST) (envelope-from tinguely) Date: Tue, 3 Feb 2009 18:09:57 -0600 (CST) From: Mark Tinguely Message-Id: <200902040009.n1409v7K033380@casselton.net> To: sam@freebsd.org, thompsa@freebsd.org In-Reply-To: <20090203233028.GA68871@citylink.fud.org.nz> Cc: arm@freebsd.org Subject: Re: busdma problem X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 00:09:59 -0000 > 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.