Need to arbitrarily set PCI-PCI bridge memory window size.

Segher Boessenkool segher at kernel.crashing.org
Sat Jan 28 23:06:32 EST 2006


> We have designed a VME board based on the IBM 970 Maple design.
> For accessing VME, we use the PCI-VME Tundra Universe2 bridge.
> (http://www.tundra.com/Products/Bridges/UniverseII/index.cfm)

No free docs (well, registration required), so I have to do a bit
of guessing here...

> It's located on the PCI bus hanging from the AMD8111.
> The PCI-VME  bridge works by translating a range of PCI addresses
> (1Gbytes in my case) to VME.
> So I need the AMD8111 memory window  (PCI CFG off 0x20) to be wide
> enough to let that range
> of PCI addresses reach the subordinate PCI bus that holds the PCI-VME
> bridge.

Does the UniverseII device show that range in its PCI config regs, too?
If not, Linux will probably mess up the range on the PCI-PCI bridge
(on the 8111).

> The problem is that the PCI_VME controller BARs only defines and map 
> the
> chip  register sets (4KB).

Right.

> And it looks
> like  the ppc64  linux kernel will  set a memory window in the AMD8111
> just large enough to meet requirements of
> BARs from devices on the subordinate bus.
>
> Is there a way I can tell linux to program a wider window to let 
> through
> the PCI to VME range of addresses?

You can of course hack up the Linux source, but there's another
option.  You can set the 8111 PCI bus to be subtractively decoded,
i.e., all accesses that aren't claimed by anything else will go to
the PCI bus.  See the config reg devB:0x40, bit 5.

> Currently I manually program the AMD8111 from my VME driver, but it is
> just a hack. I have also tried to set
> the window from the firmware but linux doesn't care.

Yes, Linux _loves_ to reprogram your PCI bridges to what it thinks
are better settings.  That, combined with "weird" PCI devices is a
bit of a pain.  Sigh.


Segher




More information about the Linuxppc64-dev mailing list