Subject: Re: auich driver support of Intel 82801DB AC97 Audio
To: Alicia da Conceicao <alicia@engine.ca>
From: Frederick Bruckman <fredb@immanent.net>
List: port-i386
Date: 12/16/2003 22:53:07
On Tue, 16 Dec 2003, Alicia da Conceicao wrote:

> However on my sub-notebook it fails with the following boot messages:
>
> ===========================================================================
> auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
> auich0: can't map codec i/o space
> ===========================================================================
>
> Could it be a problem with the interrupt allocation NetBSD is trying to
> get on my laptop?

From looking at ".../src/sys/dev/pci/auich.c", the interrupt thing
comes later (in NetBSD, at least).

> Any suggestions as to why the NetBSD auich driver fails on my sub-
> notebook?  Could it be that the ACPI driver is suppose to provide the
> auich driver with the proper IRQ?  Any ideas as to how to fix this
> problem?

It actually looks like the kernel memory allocator is failing to
allocate a chunk of kernel memory. You'll be able to see clearly
if that's the case, if you build a kernel with "options KMEMSTATS".
"vmstat -m" will have entries in the "fail" column. If that bears out,
then try building a kernel with "options NKMEMPAGES" somewhat higher
than the default value, which can be viewed with "sysctl vm.nkmempages".
Adjust as needed.

It's not quite that you really run out of memory; it's more that the
pool gets fragmented, even early in the boot sequence. For instance,
I have a 486 with 64MB that's doing RAID. At some point in the past
year, its NKMEMPAGES had to be bumped to 6000 in order for the SMC
ethernet card to work. Interestingly 1) "vmstat -m" never showed it
coming close to using up all the available kernel memory, and 2) the
actual usage went down, after increasing NKMEMPAGES a little. I take
all that to mean that the available memory was fragmented.

Frederick