commit | d878c9a932eae626aced58128357fc6155f88739 | [log] [tgz] |
---|---|---|
author | Stephen Warren <swarren@nvidia.com> | Mon Aug 11 16:09:28 2014 -0600 |
committer | Anatolij Gustschin <agust@denx.de> | Thu Aug 14 11:38:47 2014 +0200 |
tree | ad1b5e6967b3a7d9b141d3fd89104f66ddb53839 | |
parent | 686dca0fc4eb077b089c7507f899097d001c8ce3 [diff] |
pci: fix overflow in __pci_hose_bus_to_phys w/ large RAM If a 32-bit system has 2GB of RAM, and the base address of that RAM is 2GB, then start+size will overflow a 32-bit value (to a value of 0). To avoid such an overflow, convert __pci_hose_bus_to_phys() to calculate the offset of a bus address into a PCI region, rather than comparing a bus address against the end of a PCI region. Signed-off-by: Stephen Warren <swarren@nvidia.com>