From owner-freebsd-arm@FreeBSD.ORG Fri Jan 30 17:45:18 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 B81D31065675 for ; Fri, 30 Jan 2009 17:45:18 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 91D3F8FC14 for ; Fri, 30 Jan 2009 17:45:18 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n0UHIBW3047550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Jan 2009 09:18:12 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <49833653.60509@freebsd.org> Date: Fri, 30 Jan 2009 09:18:11 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Andrew Thompson References: <20090130072649.GF73709@citylink.fud.org.nz> In-Reply-To: <20090130072649.GF73709@citylink.fud.org.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist 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: Fri, 30 Jan 2009 17:45:19 -0000 Andrew Thompson wrote: > Hi, > > > 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, > > Before: 0xc7c1ab40 data=c1:4b:a4:80:c0:5d:ed:78:00:00:08:0d:c1:1f:46:78:00:00:20:02:00:00:20:02: > [...do dma...] > After: 0xc7c1ab40 data=2c:03:4e:00:6f:00:76:00:61:00:74:00:65:00:6c:00:20:00:57:00:69:00:72:00: > > The buffer 2c:03:4e:00:... is the correct response from the hardware. > When a bounce buffer is used I see the correct data come in and be > bcopy'd to my memory region but it is not visible when read later. > > Before: 0xc7c29b40 data=c1:50:19:00:c0:5d:ed:f8:00:00:08:0d:c1:1f:46:78:00:00:20:02:00:00:20:02: > dma bounced 0x1271000 -> 0xc7c29b40 len=193 data=2c:03:4e:00:6f:00:76:00:61:00:74:00:65:00:6c:00:20:00:57:00:69:00:72:00: > After: 0xc7c29b40 data=c1:50:19:00:c0:5d:ed:f8:00:00:08:0d:c1:1f:46:78:00:00:20:02:00:00:20:02: > > > This is on an xscale ixp425 with 128m memory, the PCI dma tag is limited > to 64m. > > What device is involved? Is this on HEAD? Sam