linux/drivers/pci/controller/dwc
Alan Mikhak 668b4490a3 PCI: dwc: Program outbound ATU upper limit register
Function dw_pcie_prog_outbound_atu_unroll() does not program the upper
32-bit ATU limit register. Since ATU programming functions limit the
size of the translated region to 4GB by using a u32 size parameter,
these issues may combine into undefined behavior for resource sizes
with non-zero upper 32-bits.

For example, a 128GB address space starting at physical CPU address of
0x2000000000 with size of 0x2000000000 needs the following values
programmed into the lower and upper 32-bit limit registers:
 0x3fffffff in the upper 32-bit limit register
 0xffffffff in the lower 32-bit limit register

Currently, only the lower 32-bit limit register is programmed with a
value of 0xffffffff but the upper 32-bit limit register is not being
programmed. As a result, the upper 32-bit limit register remains at its
default value after reset of 0x0.

These issues may combine to produce undefined behavior since the ATU
limit address may be lower than the ATU base address. Programming the
upper ATU limit address register prevents such undefined behavior despite
the region size getting truncated due to the 32-bit size limit.

Link: https://lore.kernel.org/r/1585785493-23210-1-git-send-email-alan.mikhak@sifive.com
Signed-off-by: Alan Mikhak <alan.mikhak@sifive.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
2020-05-22 15:05:23 +01:00
..
Kconfig PCI: tegra: Add support for PCIe endpoint mode in Tegra194 2020-03-31 09:13:17 +01:00
Makefile PCI: dwc: intel: PCIe RC controller driver 2020-01-09 11:57:18 +00:00
pci-dra7xx.c PCI: dwc: pci-dra7xx: Fix MSI IRQ handling 2020-03-27 14:40:23 +00:00
pci-exynos.c PCI: exynos: Rename Exynos to lowercase 2020-01-13 13:46:15 +00:00
pci-imx6.c Merge branch 'remotes/lorenzo/pci/misc' 2019-09-23 16:10:26 -05:00
pci-keystone.c PCI: keystone: Allow AM654 PCIe Endpoint to raise MSI-X interrupt 2020-04-02 17:57:10 +01:00
pci-layerscape-ep.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2019-10-14 10:22:26 -05:00
pci-layerscape.c PCI: layerscape: Add LS1028a support 2019-11-08 10:45:00 +00:00
pci-meson.c PCI: amlogic: Use AXG PCIE 2020-03-04 11:00:06 +00:00
pcie-al.c PCI: dwc: al: Add Amazon Annapurna Labs PCIe controller driver 2019-09-16 14:16:44 +01:00
pcie-armada8k.c PCI: armada8x: Propagate errors for optional PHYs 2019-09-04 15:42:38 +01:00
pcie-artpec6.c PCI: artpec6: Configure FTS with dwc helper function 2020-01-09 11:57:29 +00:00
pcie-designware-ep.c PCI: dwc: Clean up computing of msix_tbl 2020-05-05 10:55:54 +01:00
pcie-designware-host.c Merge branch 'remotes/lorenzo/pci/mmio-dma-ranges' 2019-11-28 08:54:53 -06:00
pcie-designware-plat.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2019-10-14 10:22:26 -05:00
pcie-designware.c PCI: dwc: Program outbound ATU upper limit register 2020-05-22 15:05:23 +01:00
pcie-designware.h PCI: dwc: Program outbound ATU upper limit register 2020-05-22 15:05:23 +01:00
pcie-hisi.c PCI: dwc: Make hisi_pcie_platform_ops static 2020-05-05 11:02:46 +01:00
pcie-histb.c PCI: histb: Propagate errors for optional regulators 2019-09-04 15:43:09 +01:00
pcie-intel-gw.c PCI: dwc: intel: PCIe RC controller driver 2020-01-09 11:57:18 +00:00
pcie-kirin.c PCI: kirin: Make structure kirin_dw_pcie_ops constant 2019-08-21 11:45:14 +01:00
pcie-qcom.c PCI: qcom: Fix the fixup of PCI_VENDOR_ID_QCOM 2020-02-26 10:59:29 +00:00
pcie-spear13xx.c PCI: spear13xx: Drop unnecessary root_bus_nr setting 2018-07-13 14:10:55 +01:00
pcie-tegra194.c PCI: tegra: Print -EPROBE_DEFER error message at debug level 2020-04-02 17:57:10 +01:00
pcie-uniphier.c PCI: uniphier: remove module code from built-in driver 2020-01-13 16:38:50 +00:00