Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jun 2009 01:21:57 -0500
From:      "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: snd_hda works on i386, fails on amd64 (RELENG_7)
Message-ID:  <20090614062157.GA67705@keira.kiwi-computer.com>
In-Reply-To: <20090614050211.GA67556@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>

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



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