Subject: Re: Changing the BAR of a PCI device at driver load time
To: Vincent <10.50@free.fr>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-kern
Date: 09/08/2003 12:52:31
Vincent <10.50@free.fr> writes:

> However, in the process, I still not have the answer to my question :
> why does it not work at 0x80300000 whereas it should. I tried to
> brighten the PCI aperture window reprogramming the 82801 registers, and
> it failed (I'm not even sure the idoneous register was updated). Could
> it be the vicinity within the same megabyte range of a device on PCI bus
> 2 and another one on PCI bus 1 ?

PCI-to-PCI bridges divide up the memory with 1-MB granularity. If the
AGP bridge grabs the 0x803xxxxx range for that bus, then that address
range isn't usable on other buses.

If you run "pcictl /dev/pci0 list" and look for the PCI-PCI or PCI-AGP
bridges, you can dun "pcictl ... dump" on each of them to see the I/O
and memory ranges that they are programmed with.

Overall, it sounds like the BIOS is either programming the PCI ranges
improperly, or expects the OS to take care of it. Do you have a BIOS
option for "Plug and Play OS"? Does your kernel have any of the PCIBIOS
options (PCIBIOS, PCIBIOS_ADDR_FIXUP, etc)?

        - Nathan