linux/drivers/pci/controller
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
..
cadence Merge branch 'remotes/lorenzo/pci/mmio-dma-ranges' 2019-11-28 08:54:53 -06:00
dwc PCI: dwc: Program outbound ATU upper limit register 2020-05-22 15:05:23 +01:00
mobiveil PCI: mobiveil: Fix unmet dependency warning for PCIE_MOBIVEIL_PLAT 2020-03-18 10:39:52 +00:00
Kconfig PCI: mobiveil: Modularize the Mobiveil PCIe Host Bridge IP driver 2020-02-21 11:53:22 +00:00
Makefile PCI: mobiveil: Modularize the Mobiveil PCIe Host Bridge IP driver 2020-02-21 11:53:22 +00:00
pci-aardvark.c Merge branch 'remotes/lorenzo/pci/mmio-dma-ranges' 2019-11-28 08:54:53 -06:00
pci-ftpci100.c PCI: ftpci100: Use inbound resources for setup 2019-11-20 17:00:14 +00:00
pci-host-common.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
pci-host-generic.c PCI: Fix comment typos 2019-04-13 11:17:15 -05:00
pci-hyperv-intf.c PCI: hv: Add a Hyper-V PCI interface driver for software backchannel interface 2019-08-22 00:25:12 -07:00
pci-hyperv.c PCI: hv: Introduce hv_msi_entry 2020-03-09 14:51:31 +00:00
pci-mvebu.c PCI: mvebu: mvebu_pcie_map_registers __iomem fix 2019-10-17 11:02:47 +01:00
pci-rcar-gen2.c
pci-tegra.c PCI: tegra: Use pci_parse_request_of_pci_ranges() 2020-02-24 13:47:44 +00:00
pci-thunder-ecam.c
pci-thunder-pem.c PCI: Remove unused includes and superfluous struct declaration 2019-11-21 07:49:29 -06:00
pci-v3-semi.c PCI: v3-semi: Use inbound resources for setup 2019-11-20 17:00:14 +00:00
pci-versatile.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
pci-xgene-msi.c
pci-xgene.c PCI: xgene: Use inbound resources for setup 2019-11-20 17:00:14 +00:00
pcie-altera-msi.c PCI: altera-msi: Allow building as module 2019-05-30 15:34:54 +01:00
pcie-altera.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
pcie-brcmstb.c pci-v5.7-changes 2020-04-03 14:25:02 -07:00
pcie-iproc-bcma.c
pcie-iproc-msi.c PCI: iproc-msi: Fix __iomem annotation in decode_msi_hwirq() 2019-10-17 11:01:24 +01:00
pcie-iproc-platform.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
pcie-iproc.c PCI: iproc: Apply quirk_paxc_bridge() for module as well as built-in 2019-12-12 17:21:36 -06:00
pcie-iproc.h PCI: iproc: Reject unconfigured physical functions from PAXC 2018-07-13 11:56:55 +01:00
pcie-mediatek.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
pcie-rcar.c Merge branch 'remotes/lorenzo/pci/mmio-dma-ranges' 2019-11-28 08:54:53 -06:00
pcie-rockchip-ep.c PCI: rockchip: Fix rockchip_pcie_ep_assert_intx() bitwise operations 2019-04-15 10:39:26 +01:00
pcie-rockchip-host.c PCI: rockchip: Fix IO outbound ATU register number 2019-12-12 15:25:37 -06:00
pcie-rockchip.c
pcie-rockchip.h Merge branch 'remotes/lorenzo/pci/mmio-dma-ranges' 2019-11-28 08:54:53 -06:00
pcie-tango.c
pcie-xilinx-nwl.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
pcie-xilinx.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
vmd.c PCI: vmd: Add two VMD Device IDs 2020-01-29 16:51:37 -06:00