diff options
author | Marek Vasut <marex@denx.de> | 2014-08-04 01:47:09 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-08-20 12:21:57 +0200 |
commit | fcfdfdd58c67dbade1bafb48e393be2f432be33a (patch) | |
tree | 044770d229f62e24132990e5cc32baf4ab20a5d8 /arch/blackfin | |
parent | 68968901e79f91a2516ffa091959d0378526f838 (diff) | |
download | u-boot-imx-fcfdfdd58c67dbade1bafb48e393be2f432be33a.zip u-boot-imx-fcfdfdd58c67dbade1bafb48e393be2f432be33a.tar.gz u-boot-imx-fcfdfdd58c67dbade1bafb48e393be2f432be33a.tar.bz2 |
ARM: mx6: Prevent overflow in DRAM size detection
The MX6 DRAM controller can be configured to handle 4GiB of DRAM, but
only 3840 MiB of that can be really used. In case the controller is
configured to operate a 4GiB module, the imx_ddr_size() function will
correctly compute that there is 4GiB of DRAM in the system. Firstly,
the return value is 32-bit, so the function will effectively return
zero. Secondly, the MX6 cannot address the full 4GiB, but only 3840MiB
of all that. Thus, clamp the returned size to 3840MiB in such case.
Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'arch/blackfin')
0 files changed, 0 insertions, 0 deletions