From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 30 Aug 2014 11:14:26 -0400 Subject: [U-Boot] ARM: Fix overflow in MMU setup In-Reply-To: <1407109546-5367-1-git-send-email-marex@denx.de> References: <1407109546-5367-1-git-send-email-marex@denx.de> Message-ID: <20140830151426.GI19374@bill-the-cat> 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, Aug 04, 2014 at 01:45:46AM +0200, Marek Vasut wrote: > The patch fixes a corner case where adding size to DRAM start resulted > in a value (1 << 32), which in turn overflew the u32 computation, which > resulted in 0 and it therefore prevented correct setup of the MMU tables. > > The addition of DRAM bank start and it's size can end up right at the end > of the address space in the special case of a machine with enough memory. > To prevent this overflow, shift the start and size separately and add them > only after they were shifted. > > Hopefully, we only have systems in tree which have DRAM size aligned to > 1MiB boundary. If not, this patch would break such systems. On the other > hand, such system would be broken by design anyway. > > Signed-off-by: Marek Vasut > Cc: Albert ARIBAUD Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: