linux_dsm_epyc7002/arch/powerpc/platforms/powernv
Benjamin Herrenschmidt 184cd4a3b9 powerpc/powernv: PCI support for p7IOC under OPAL v2
This adds support for p7IOC (and possibly other IODA v1 IO Hubs)
using OPAL v2 interfaces.

We completely take over resource assignment and assign them using an
algorithm that hands out device BARs in a way that makes them fit in
individual segments of the M32 window of the bridge, which enables us
to assign individual PEs to devices and functions.

The current implementation gives out a PE per functions on PCIe, and a
PE for the entire bridge for PCIe to PCI-X bridges.

This can be adjusted / fine tuned later.

We also setup DMA resources (32-bit only for now) and MSIs (both 32-bit
and 64-bit MSI are supported).

The DMA allocation tries to divide the available 256M segments of the
32-bit DMA address space "fairly" among PEs. This is done using a
"weight" heuristic which assigns less value to things like OHCI USB
controllers than, for example SCSI RAID controllers. This algorithm
will probably want some fine tuning for specific devices or device
types.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-11-25 14:53:15 +11:00
..
Kconfig powerpc/powernv: Basic support for OPAL 2011-09-20 16:09:50 +10:00
Makefile powerpc/powernv: PCI support for p7IOC under OPAL v2 2011-11-25 14:53:15 +11:00
opal-nvram.c powerpc/powernv: Add RTC and NVRAM support plus RTAS fallbacks 2011-09-20 16:09:57 +10:00
opal-rtc.c powerpc/powernv: Add RTC and NVRAM support plus RTAS fallbacks 2011-09-20 16:09:57 +10:00
opal-takeover.S powerpc/powernv: Add OPAL takeover from PowerVM 2011-09-20 16:09:47 +10:00
opal-wrappers.S powerpc/powernv: Basic support for OPAL 2011-09-20 16:09:50 +10:00
opal.c powerpc/powernv: Machine check and other system interrupts 2011-09-20 16:10:03 +10:00
pci-ioda.c powerpc/powernv: PCI support for p7IOC under OPAL v2 2011-11-25 14:53:15 +11:00
pci-p5ioc2.c powerpc/powernv: Implement MSI support for p5ioc2 PCIe 2011-09-20 16:12:44 +10:00
pci.c powerpc/powernv: PCI support for p7IOC under OPAL v2 2011-11-25 14:53:15 +11:00
pci.h powerpc/powernv: PCI support for p7IOC under OPAL v2 2011-11-25 14:53:15 +11:00
powernv.h powerpc/powernv: Add support for p5ioc2 PCI-X and PCIe 2011-09-20 16:10:04 +10:00
setup.c powerpc/powernv: Add support for p5ioc2 PCI-X and PCIe 2011-09-20 16:10:04 +10:00
smp.c powerpc/powernv: Basic support for OPAL 2011-09-20 16:09:50 +10:00