Subject: Re: PCI_MAPREG_TYPE_ROM... or the lack of it
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-kern
Date: 02/25/2006 14:52:49
garrett_damore@tadpole.com said:
> The pci_mapreg_map() manual page indicates that you can map a ROM
> using PCI_MAPREG_TYPE_ROM.
> Currently this won't work.  There is no PCI_MAPREG_TYPE_ROM macro
> defined. 

I didn't follow the thread, so I don't know in which circumstances
you want to map PCI ROMs.
I'd recommend however to be very careful with this and never
allow to do this in generic code in a running system.
To cite from the PCI spec (3.0, pg. 228):
  In order to minimize the number of address decoders needed, a device
  may share a decoder between the Expansion ROM [BAR] and other [BARs].
  When expansion ROM decode is enabled [...] device independent
  software must not access the device through any other [BARs].

best regards
Matthias