From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Thu, 14 Aug 2014 11:44:31 +0200 Subject: [U-Boot] [PATCH] pci: fix overflow in __pci_hose_bus_to_phys w/ large RAM In-Reply-To: <1407794968-32106-1-git-send-email-swarren@wwwdotorg.org> References: <1407794968-32106-1-git-send-email-swarren@wwwdotorg.org> Message-ID: <20140814114431.09e155fb@crub> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 11 Aug 2014 16:09:28 -0600 Stephen Warren wrote: > From: Stephen Warren > > 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 > --- > drivers/pci/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) applied to u-boot-staging/agust at denx.de. thanks! Anatolij