Subject: kern/32467: pci configure should map expansion roms without enabling them
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <garrett_damore@tadpole.com>
List: netbsd-bugs
Date: 01/06/2006 18:30:00
>Number:         32467
>Category:       kern
>Synopsis:       pci configure should map expansion roms without enabling them
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 06 18:30:00 +0000 2006
>Originator:     Garrett D'Amore
>Release:        3.99.14
>Organization:
Tadpole Computer, Inc.
>Environment:
any machine which uses PCI_NETBSD_CONFIGURE has this problem
>Description:
The core problem is that the PCI_NETBSD_CONFIGURE is too limited, and does not assign address space for expansion ROMs by default.  This makes it impossible to write a driver which uses its own expansion ROM in a portable way.

The text of the discussion on tech-kern about this was started with

http://mail-index.netbsd.org/tech-kern/2005/12/16/0023.html

A lot of discussion ensued on the list, but the upshot is that we want to have a PCI_CONF_ENABLE_ROM that enables/disables the setting of the enable bit in the PCI expansion rom register.  Then we would have PCI_CONF_DEFAULT which does include the PCI_CONF_MAP_ROM, but not the PCI_CONF_ENABLE_ROM.

The various pci machdep layers that use PCI_CONF_ALL & ~PCI_CONF_MAP_ROM should be changed to use the PCI_CONF_DEFAULT.
>How-To-Repeat:

>Fix:
I will post a URL to diffs shortly.