Commit 20e072f37402c17741f67d9693eaabdd835b80f2

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent 69b41388ba

image: check "bootm_low" and "bootm_size" if "initrd_high" is missing

To boot Linux, we should prevent Initramdisk and FDT from going too
high.

Currently, boot_relocate_fdt() checks "fdt_high" environment first,
and then falls back to getenv_bootm_mapsize() + getenv_bootm_low()
if "fdt_high" is missing.

On the other hand, boot_ramdisk_high() only checks "initrd_high" to
get the address limit for the Initramdisk.  We also want to let this
case fall back to getenv_bootm_mapsize() + getenv_bootm_low().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

... ... @@ -1113,8 +1113,7 @@
1113 1113 if (initrd_high == ~0)
1114 1114 initrd_copy_to_ram = 0;
1115 1115 } else {
1116   - /* not set, no restrictions to load high */
1117   - initrd_high = ~0;
  1116 + initrd_high = getenv_bootm_mapsize() + getenv_bootm_low();
1118 1117 }
1119 1118  
1120 1119