u-boot/boot
Marek Vasut a96d565725 image: fdt: Fix DT relocation handling with multiple DRAM banks with gap
The current implementation of boot_relocate_fdt() places DT at the
highest usable DRAM address, which is calculated as:
  env_get_bootm_low() + env_get_bootm_mapsize()
which by default becomes gd->ram_base + gd->ram_size.

Systems like i.MX53 can have multiple DRAM banks with gap between them,
e.g. have DRAM at 0x70000000-0x8fffffff and 0xb0000000-0xcfffffff , so
for them the calculated highest DRAM address is 0xafffffff, which is
exactly in the gap and thus not usable.

Fix this by iterating over all DRAM banks and tracking the remaining
amount of the total mapping size obtained from env_get_bootm_mapsize().
Limit the maximum LMB area size to each bank, to avoid using nonexistent
DRAM.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
2022-04-20 11:14:39 -04:00
..
android_ab.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
boot_fit.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
bootm_os.c bootm: Tidy up use of autostart env var 2021-11-16 14:35:09 -05:00
bootm.c cmd: bootm: add a stage pre-load 2022-03-31 14:12:01 -04:00
bootretry.c Convert CONFIG_BOOT_RETRY_TIME et al to Kconfig 2022-03-18 12:48:17 -04:00
common_fit.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
fdt_region.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
image-android-dt.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
image-android.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image-board.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
image-cipher.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image-fdt.c image: fdt: Fix DT relocation handling with multiple DRAM banks with gap 2022-04-20 11:14:39 -04:00
image-fit-sig.c tools: Pass the key blob around 2022-01-26 08:50:44 -07:00
image-fit.c image-fit: don't check free() argument 2022-04-19 14:51:11 -04:00
image-host.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image-pre-load.c boot: image: add a stage pre-load 2022-03-31 14:12:01 -04:00
image-sig.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image.c tools: mkimage: Add Allwinner TOC0 support 2022-04-04 23:24:17 +01:00
Kconfig arm: init: save previous bootloader data 2022-04-04 14:53:26 -04:00
Makefile boot: image: add a stage pre-load 2022-03-31 14:12:01 -04:00
pxe_utils.c cmd: pxe_utils: sysboot: replace cls command by video_clear in PXE parser 2022-04-11 11:39:19 -04:00