summaryrefslogtreecommitdiff
path: root/drivers/pci/controller/dwc/pci-dra7xx.c
diff options
context:
space:
mode:
authorAlan Mikhak <alan.mikhak@sifive.com>2020-04-02 02:58:13 +0300
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2020-05-22 17:05:23 +0300
commit668b4490a3a56f062172096692ebe9d12e26be5c (patch)
tree4819239ed6954abf07e91d37b9bdf57f379843c0 /drivers/pci/controller/dwc/pci-dra7xx.c
parent819482a96790d25fca97ec5c752400edbef05753 (diff)
downloadlinux-668b4490a3a56f062172096692ebe9d12e26be5c.tar.xz
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>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-dra7xx.c')
0 files changed, 0 insertions, 0 deletions