public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] image: Don't relocate ramdisk to highmem
@ 2013-07-10 23:47 Thierry Reding
  2013-07-11  9:46 ` Wolfgang Denk
  0 siblings, 1 reply; 10+ messages in thread
From: Thierry Reding @ 2013-07-10 23:47 UTC (permalink / raw)
  To: u-boot

From: Thierry Reding <treding@nvidia.com>

The Linux kernel cannot unpack a ramdisk that's stored in high memory.
Unless the initrd_high environment variable is explicitly set, abide by
that restriction using the getenv_bootm_low() and getenv_bootm_mapsize()
helpers.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 common/image.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/image.c b/common/image.c
index e91c89e..bc79b43 100644
--- a/common/image.c
+++ b/common/image.c
@@ -1090,8 +1090,8 @@ 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;
+		/* make sure to put ramdisk in low memory */
+		initrd_high = getenv_bootm_low() + getenv_bootm_mapsize();
 	}
 
 
-- 
1.8.1.5

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

end of thread, other threads:[~2013-07-11 20:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-10 23:47 [U-Boot] [PATCH] image: Don't relocate ramdisk to highmem Thierry Reding
2013-07-11  9:46 ` Wolfgang Denk
2013-07-11 12:39   ` Tom Rini
2013-07-11 15:00     ` Thierry Reding
2013-07-11 18:21       ` Wolfgang Denk
2013-07-11 18:29         ` Tom Rini
2013-07-11 19:06         ` Stephen Warren
2013-07-11 20:55           ` Wolfgang Denk
2013-07-11 19:08         ` Thierry Reding
2013-07-11 20:57           ` Wolfgang Denk

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