From owner-freebsd-sparc64@FreeBSD.ORG Fri Jan 4 21:54:30 2008 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1813B16A41A for ; Fri, 4 Jan 2008 21:54:30 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 8B5B413C45D for ; Fri, 4 Jan 2008 21:54:29 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.1/8.14.1/ALCHEMY.FRANKEN.DE) with ESMTP id m04LsRTu043206; Fri, 4 Jan 2008 22:54:27 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.1/8.14.1/Submit) id m04LsRXY043205; Fri, 4 Jan 2008 22:54:27 +0100 (CET) (envelope-from marius) Date: Fri, 4 Jan 2008 22:54:27 +0100 From: Marius Strobl To: Pyun YongHyeon Message-ID: <20080104215427.GA42961@alchemy.franken.de> References: <47786A7B.5060209@sasktel.net> <20071231062634.GA20276@cdnetworks.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071231062634.GA20276@cdnetworks.co.kr> User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@freebsd.org Subject: Re: bus_dma lowaddr problems with snd_t4dwave X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:54:30 -0000 On Mon, Dec 31, 2007 at 03:26:34PM +0900, Pyun YongHyeon wrote: > On Sun, Dec 30, 2007 at 08:05:15PM -0800, Stephen Hurd wrote: > > After installing FreeBSD 7.0-rc1 on my Blade 100, I decided to take a > > stab at getting the on board audio to work. The bit that prevents the > > driver from working is that bus_dmamap_load() fails when lowaddr is is > > not somewhere over 3GB. The Trident cards apparently require the DMA > > address to be in the low 1GB. > > > > Yes, the hardware sucks. You'd better to use newer audio cards that > do not have DMA address limitations(e.g. Envy24HT). Last time I > checked snd_envy24ht(4) has bus_dma(9) issues so I'm not sure whether > it works or not(Had no time to fix it due to other pending works). > > Long time ago I also tried to make PCI t4dwave(4) work on AXe. The > DVMA base address on AXe was beyond scope of DMA address space of > Trident 4DWave hardware. I even tried to lower the DVMA base address > by poking PCR_TAS. With that change DVMA base address was lowered but > other hardwares on the box(e.g. ethernet) didn't work at all. I guess > that comes from the region overlapping among devices and this would be > one of reason why FreeBSD just get the DVMA base address from > firmware. > > > Are there no bounce pages on sparc64? > > I think problem is DVMA base address. I have no idea how Sun solved > this issue. If we can solve this issue lots of PCI audio hardwares > would work. > I think one could make them work by adding support for the IOMMU pass-through mode, but I don't think that would be worth the effort; as you mentioned just get a decent sound card that does 32-bit DMA, those driven by snd_es137x(4) work just fine. As for the on-board M5451 found in some sun4u machines their DMA engine actually does 31-bit DMA and the 31th bit can be controlled via the PCI config space of the accompanying ISA bridge according to Linux (actually the 31th bit is set to 1 by the firmware on the sun4u machines I checked, that's probably why the OpenSolaris sada driver just sets up for 32-bit DMA). Unfortunately that's not sufficient to make snd_t4dwave(4) work with them; when trying to play something the M5451 fires one interrupt and that's it. Given that there are several reports of play interrupt timeouts with M5451 on i386 I guess that's generally a bug of snd_t4dwave(4) and not related to the DMA address limitations. Marius