Subject: Re: access to external proms for PCI
To: Garrett D'Amore <email@example.com>
From: Allen Briggs <firstname.lastname@example.org>
Date: 12/17/2005 14:51:56
On Fri, Dec 16, 2005 at 09:13:53PM -0800, Garrett D'Amore wrote:
> There is a 3rd behavior, which I think is the *correct* behavior, and
> what I would like to do is change the PCI configuration code to do this
> by default:
> * ROMs disabled by default, but left with address space assigned
> (i.e. the addresses are assigned, but the decoder is left disabled).
I think this is a reasonable change. We started off with #1 (the really
bad idea) and found that it was ... a really bad idea and switched to #2
since there was, at the time, no reason to eat the address space for
ROMs that were not being enabled/used.
> So, to get this "correct" behavior, I'd change the code so that
> PCI_CONF_MAP_ROM means to actually *map* the ROMs. (I.e. no behavior
> Having this bit clear would still assign address space, but would not
> enable the decoder.
> If someone feels there is a case for leaving the ROM mapped and enabled,
> then I can create a new bit, say PCI_CONF_ENABLE_ROM, that actually
> enables the ROM.
Actually, I'd kind of rather see:
PCI_CONF_MAP_ROM maps but does not enable the ROM
PCI_CONF_ENABLE_ROM implies PCI_CONF_MAP_ROM and also enables
clear Neither maps or enables the ROM
Right now, we kind of have PCI_CONF_MAP_ROM implying PCI_CONF_ENABLE_ROM
in that we enable anything we map. The new flag would simply tune the
enable bit in setup_memwins().
I'd be happy to make the change. I'm chiefly at fault for the pci
configuration code there.
Use NetBSD! http://www.NetBSD.org/