public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] image: Don't relocate ramdisk to highmem
Date: Wed, 10 Jul 2013 16:47:51 -0700	[thread overview]
Message-ID: <1373500071-6476-1-git-send-email-thierry.reding@gmail.com> (raw)

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

             reply	other threads:[~2013-07-10 23:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 23:47 Thierry Reding [this message]
2013-07-11  9:46 ` [U-Boot] [PATCH] image: Don't relocate ramdisk to highmem 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1373500071-6476-1-git-send-email-thierry.reding@gmail.com \
    --to=thierry.reding@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox