All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] image: usage of value ~0UL for intrd_high
@ 2021-01-09 18:06 Heinrich Schuchardt
  2021-01-09 18:47 ` Andy Shevchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Heinrich Schuchardt @ 2021-01-09 18:06 UTC (permalink / raw)
  To: u-boot

The comment for initrd_high in the coding and in README were contradicting
and neither fully described what the coding does.

Clarify the usage of the special value ~0UL for the environment variable
initrd_high.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 README         | 3 ++-
 common/image.c | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/README b/README
index 7b73a1c973..fe58f1ab98 100644
--- a/README
+++ b/README
@@ -3310,7 +3310,8 @@ List of environment variables (most likely not complete):

 		  setenv initrd_high 00c00000

-		  If you set initrd_high to 0xFFFFFFFF, this is an
+		  If you set initrd_high to 0xFFFFFFFF on a 32-bit systems
+		  or 0xFFFFFFFFFFFFFFFF on a 64-bit systems, this is an
 		  indication to U-Boot that all addresses are legal
 		  for the Linux kernel, including addresses in flash
 		  memory. In this case U-Boot will NOT COPY the
diff --git a/common/image.c b/common/image.c
index 451fc689a8..007e4e987a 100644
--- a/common/image.c
+++ b/common/image.c
@@ -1362,8 +1362,10 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len,

 	s = env_get("initrd_high");
 	if (s) {
-		/* a value of "no" or a similar string will act like 0,
-		 * turning the "load high" feature off. This is intentional.
+		/*
+		 * A value of 0xffffffffffffffff on 64-bit or 0xffffffff
+		 * on 32-bit systems will disable the copying of the initial
+		 * RAM disk to high memory.
 		 */
 		initrd_high = simple_strtoul(s, NULL, 16);
 		if (initrd_high == ~0)
--
2.29.2

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

end of thread, other threads:[~2021-01-15 18:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 18:06 [PATCH 1/1] image: usage of value ~0UL for intrd_high Heinrich Schuchardt
2021-01-09 18:47 ` Andy Shevchenko
2021-01-09 18:58   ` Tom Rini
2021-01-09 19:33     ` Heinrich Schuchardt
2021-01-09 19:40       ` Tom Rini
2021-01-09 19:59         ` Heinrich Schuchardt
2021-01-09 21:23           ` Tom Rini
2021-01-09 23:23             ` Heinrich Schuchardt
2021-01-10 12:07               ` Adam Ford
2021-01-10 15:36               ` Andy Shevchenko
2021-01-10 12:05             ` Heinrich Schuchardt
2021-01-10 13:43               ` Tom Rini
2021-01-10 16:20                 ` Heinrich Schuchardt
2021-01-15 18:43                   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.