]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
image: check "bootm_low" and "bootm_size" if "initrd_high" is missing
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 17 Dec 2015 08:19:35 +0000 (17:19 +0900)
committerTom Rini <trini@konsulko.com>
Wed, 13 Jan 2016 14:54:46 +0000 (09:54 -0500)
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>
common/image.c

index c36927fca8eb6beda1a9c05bab75ff1a2d33721b..d63d9e016986f8931312c3708d97ffc45b53b99f 100644 (file)
@@ -1113,8 +1113,7 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len,
                if (initrd_high == ~0)
                        initrd_copy_to_ram = 0;
        } else {
-               /* not set, no restrictions to load high */
-               initrd_high = ~0;
+               initrd_high = getenv_bootm_mapsize() + getenv_bootm_low();
        }