[U-Boot] [PATCH 2/4] ARM: mx6: Prevent overflow in DRAM size detection
Stefano Babic
sbabic at denx.de
Wed Aug 20 12:22:24 CEST 2014
On 04/08/2014 01:47, Marek Vasut wrote:
> 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 at denx.de>
> ---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list