xen/arm: PCI host bridge discovery within XEN on ARM
authorRahul Singh <rahul.singh@arm.com>
Wed, 6 Oct 2021 17:40:30 +0000 (18:40 +0100)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Thu, 7 Oct 2021 19:47:25 +0000 (12:47 -0700)
commit6ec9176d94ae64f9eeb0d1805d2fd97298496330
treedd2bde92da158037f8b22353818b4830d1994eff
parent15517ed61f55be6039aedcc99720ee07c772ed44
xen/arm: PCI host bridge discovery within XEN on ARM

XEN during boot will read the PCI device tree node “reg” property
and will map the PCI config space to the XEN memory.

As of now only "pci-host-ecam-generic" compatible board is supported.

"linux,pci-domain" device tree property assigns a fixed PCI domain
number to a host bridge, otherwise an unstable (across boots) unique
number will be assigned by Linux. XEN access the PCI devices based on
Segment:Bus:Device:Function. A Segment number in the XEN is same as a
domain number in Linux. Segment number and domain number has to be in
sync to access the correct PCI devices.

XEN will read the “linux,pci-domain” property from the device tree node
and configure the host bridge segment number accordingly. If this
property is not available XEN will allocate the unique segment number
to the host bridge.

Signed-off-by: Rahul Singh <rahul.singh@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/pci/Makefile
xen/arch/arm/pci/ecam.c [new file with mode: 0644]
xen/arch/arm/pci/pci-access.c [new file with mode: 0644]
xen/arch/arm/pci/pci-host-common.c [new file with mode: 0644]
xen/arch/arm/pci/pci-host-generic.c [new file with mode: 0644]
xen/include/asm-arm/pci.h