Subject: Re: 64-bit memory fun with an adaptec 3950U2B..
To: Frank van der Linden <frank@wins.uva.nl>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-kern
Date: 03/14/2000 08:38:11
Frank van der Linden <frank@wins.uva.nl> writes:
> I've also been told that on Alphas, when a 32bit adaptec card is put
> into a 64bit slot, pci_mem_find will find 64bit memory. So I think
> that pci_mem_find should find either type, and only fail if the
> upper word is != 0.
I think the latter half of the last sentence is just what i was
getting at. The need to specify the exact type, to match, is a
historical annoyance in the interface.
there's actually something to be said for "use the provided
description (memory, i/o, subtype, whatever) only if it's provided."
i.e. have a common function to do memory and I/O, that only does the
strict BAR checking if the caller wants it.
there are already examples where you don't know at driver-coding time
what kind of region you want (and those cases right now look at the
BAR, to see what to pass in!), and that'll probably only get worse,
e.g. the PCI spec says for comm/modem devices that the BAR can be
either I/O or memory space, right?
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.