mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
b4bd655493
The address range check may overflow if the memory region is located at the top of the 32-bit address space. This can e.g. be seen on TK1 if using the E1000 gigabit Ethernet driver where start and size are both 0x80000000 leading to the following messages: Apalis TK1 # tftpboot $loadaddr test_file Using e1000#0 device TFTP from server 192.168.10.1; our IP address is 192.168.10.2 Filename 'test_file'. Load address: 0x80408000 Loading: pci_hose_phys_to_bus: invalid physical address This patch fixes this by changing the order of the addition vs. subtraction in the range check just like already done in __pci_hose_bus_to_phys(). Reported-by: Ivan Mercier <ivan.mercier@nexvision.fr> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> |
||
---|---|---|
.. | ||
fsl_pci_init.c | ||
Kconfig | ||
Makefile | ||
pci-emul-uclass.c | ||
pci-uclass.c | ||
pci.c | ||
pci_auto.c | ||
pci_common.c | ||
pci_compat.c | ||
pci_ftpci100.c | ||
pci_gt64120.c | ||
pci_indirect.c | ||
pci_msc01.c | ||
pci_mvebu.c | ||
pci_rom.c | ||
pci_sandbox.c | ||
pci_sh4.c | ||
pci_sh7751.c | ||
pci_sh7780.c | ||
pci_tegra.c | ||
pci_x86.c | ||
pcie_imx.c | ||
pcie_layerscape.c | ||
tsi108_pci.c | ||
w83c553f.c |