On Tue, Jan 19, 2010 at 08:04:50PM +0100, Manuel Bouyer wrote: > On Tue, Jan 19, 2010 at 12:57:30PM -0600, David Young wrote: > > On Tue, Jan 19, 2010 at 12:57:57PM +0100, Manuel Bouyer wrote: > > > On Tue, Jan 19, 2010 at 12:50:55PM +0100, Christoph Egger wrote: > > > > Why are the *FIXUP options disabled by default in x86 kernels? > > > > > > Because on some systems it reprograms the BARs in a way which doesn't > > > work. I'm not sure the kernel can do this in a reasonable and safe > > > way anyway, it would need detailled knowledge of the hardware, > > > which may not be available. > > > > What detailed knowledge do you have in mind? > > For example, device for which the kernel has no drivers, but still > have registers mapped in I/O or memory space. > I'm sure PC hardware also have a few fun things I don't know about :)
I think that unless the BIOS "owns" a device for which the kernel has no drivers, we should feel free to change its PCI configuration. However, we should restore its configuration before relinquishing control of the device to the BIOS. I think that on a PC, ACPI can tell us if the BIOS owns a device? If the BIOS uses some USB host controller to provide an emulated PC keyboard controller, it would be very bad to relocate that host controller's registers by reprogramming its BARs! I think that either an ACPI resource, or a flag in the host controller's registers, tells us whether the BIOS uses the host controller. One possible problem with PCI_ADDR_FIXUP is that it is not choosy about the addresses it assigns to devices, but it uses an arbitrary range. (I have not checked this.) It may be better to create a pool of ranges by reclaiming all of the BARs, and then reassign from that pool. Dave -- David Young OJC Technologies [email protected] Urbana, IL * (217) 278-3933
