diff options
author | Marek Vasut <marex@denx.de> | 2014-08-04 01:45:46 +0200 |
---|---|---|
committer | Ye.Li <B37916@freescale.com> | 2015-02-05 11:22:52 +0800 |
commit | a3066bc4516901a7e8b624b8b5e04e2cc31dcb58 (patch) | |
tree | c7fdc54192ad263e865b9c001eebeca35d6ba71b /arch/avr32 | |
parent | c1c8ba37d87493c16ec1a12bc36d47f909e0e733 (diff) | |
download | u-boot-imx-a3066bc4516901a7e8b624b8b5e04e2cc31dcb58.zip u-boot-imx-a3066bc4516901a7e8b624b8b5e04e2cc31dcb58.tar.gz u-boot-imx-a3066bc4516901a7e8b624b8b5e04e2cc31dcb58.tar.bz2 |
ARM: Fix overflow in MMU setup
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 <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
(cherry picked from commit 221a49d5bd4a512596c03bbc59fb28f4ef48bf6e)
Diffstat (limited to 'arch/avr32')
0 files changed, 0 insertions, 0 deletions