linux/arch/powerpc
Benjamin Herrenschmidt c1f343028d powerpc/pci: Reserve legacy regions on PCI
There's a problem on some embedded platforms when we re-assign
everything on PCI, such as 44x. The generic code tries to avoid
assigning devices to addresses overlapping the low legacy
addresses such as VGA hard decoded areas using constants that
are unfortunately no good for us, as they don't take into account
the address translation we do to access PCI busses.

Thus we end up allocating things like IO BARs to 0, which is
technically legal, but will shadow hard decoded ports for use
by things like VGA cards.

This works around it by attempting to reserve legacy regions
before we try to assign addresses.

NOTE: This may have nasty side effects in cases I haven't tested
yet:

 - We try to use FW mappings (ie. powermac) and the FW has allocated
a conflicting address over those legacy regions. This will typically
happen. I would expect the new code to just fail with an informative
message without harm but I haven't had a chance to test that scenario
yet.

 - A device with fixed BARs overlapping those legacy addresses such
as an IDE controller in legacy mode is in the system. I don't know
for sure yet what will happen there, I have to test :-)

Ideally, we should change PCIBIOS_MIN_IO/MIN_MEM accross the board
to take a bus pointer so they can provide appropriate per-bus translated
values to the generic code but that's a more invasive patch. I will
do that in the future, but in the meantime, this fixes the problem
locally

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-08 16:25:07 +11:00
..
boot Merge commit 'origin/master' into next 2009-01-08 16:24:38 +11:00
configs
include/asm Merge commit 'origin/master' into next 2009-01-08 16:24:38 +11:00
kernel powerpc/pci: Reserve legacy regions on PCI 2009-01-08 16:25:07 +11:00
kvm
lib
math-emu
mm
oprofile
platforms Merge commit 'origin/master' into next 2009-01-08 16:24:38 +11:00
sysdev Merge commit 'origin/master' into next 2009-01-08 16:24:38 +11:00
xmon
Kconfig
Kconfig.debug
Makefile