public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] image: check "bootm_low" and "bootm_size" if "initrd_high" is missing
@ 2015-12-17  8:19 Masahiro Yamada
  2016-01-04 19:59 ` Tom Rini
  2016-01-13 21:55 ` Tom Rini
  0 siblings, 2 replies; 5+ messages in thread
From: Masahiro Yamada @ 2015-12-17  8:19 UTC (permalink / raw)
  To: u-boot

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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/common/image.c b/common/image.c
index c36927f..d63d9e0 100644
--- a/common/image.c
+++ b/common/image.c
@@ -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();
 	}
 
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-13 21:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-17  8:19 [U-Boot] [PATCH] image: check "bootm_low" and "bootm_size" if "initrd_high" is missing Masahiro Yamada
2016-01-04 19:59 ` Tom Rini
2016-01-08 16:12   ` Masahiro Yamada
2016-01-13 13:11     ` Tom Rini
2016-01-13 21:55 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox