From owner-freebsd-multimedia@FreeBSD.ORG Sun Jun 14 06:21:59 2009 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E5651065677 for ; Sun, 14 Jun 2009 06:21:59 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from hamlet.setfilepointer.com (hamlet.SetFilePointer.com [63.224.10.2]) by mx1.freebsd.org (Postfix) with SMTP id E2A2A8FC17 for ; Sun, 14 Jun 2009 06:21:58 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 1508 invoked from network); 14 Jun 2009 01:21:58 -0500 Received: from keira.kiwi-computer.com (HELO kiwi-computer.com) (63.224.10.3) by hamlet.setfilepointer.com with SMTP; 14 Jun 2009 01:21:58 -0500 Received: (qmail 68091 invoked by uid 2001); 14 Jun 2009 06:21:57 -0000 Date: Sun, 14 Jun 2009 01:21:57 -0500 From: "Rick C. Petty" To: Alexander Motin Message-ID: <20090614062157.GA67705@keira.kiwi-computer.com> References: <1242609781.00113421.1242598202@10.7.7.3> <4A122B72.80206@FreeBSD.org> <20090519184150.GA990@keira.kiwi-computer.com> <20090605020054.GA67365@keira.kiwi-computer.com> <4A28D79C.6070406@FreeBSD.org> <20090614050211.GA67556@keira.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090614050211.GA67556@keira.kiwi-computer.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-multimedia@freebsd.org Subject: Re: snd_hda works on i386, fails on amd64 (RELENG_7) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 06:21:59 -0000 On Fri, Jun 05, 2009 at 11:30:20AM +0300, Alexander Motin wrote: > Also you may try to change > sc->support_64bit = HDA_FLAG_MATCH(gcap, HDAC_GCAP_64OK); > line to > sc->support_64bit = 0; > , to strictly limit driver to 32bit addresses ignoring hardware > capabilities. Hmm, I looked at the place that queries support_64bit, in hdac_dma_alloc as part of the lowaddr to the bus_dma_tag_create(9) call: lowaddr = (sc->support_64bit) ? BUS_SPACE_MAXADDR : BUS_SPACE_MAXADDR_32BIT; ... On a whim, I tried manually setting lowaddr to BUS_SPACE_MAXADDR_24BIT and it worked! A binary search revealed that it breaks for me when lowaddr > 0x7FFFFFFF ... perhaps a 32-bit overflow bug related to DMA? Out of curiosity, how come this same test (for support_64bit) isn't needed before the bus_dma_tag_create() in hdac_attach? -- Rick C. Petty