All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] boot: image-fdt: Restore suppression of irrelevant ERROR message
@ 2026-06-27 20:48 Jonas Karlman
  2026-06-29 17:33 ` Randolph Sapp
  0 siblings, 1 reply; 8+ messages in thread
From: Jonas Karlman @ 2026-06-27 20:48 UTC (permalink / raw)
  To: Tom Rini, Randolph Sapp, Simon Glass, Ilias Apalodimas
  Cc: Quentin Schulz, Jonas Karlman, u-boot

The commit 623f6c5b6ab7 ("boot: image-fdt: free old dtb reservations")
removed the suppression of ERROR messages when -EINVAL is returned due
to the memory region not being part of the LMB memory map.

This causes an irrelevant ERROR message during boot, e.g.:

  Model: Radxa ROCK 3B
  [...]
  ERROR: reserving fdt memory region failed (addr=10f000 size=100 flags=2): -22

or

  Model: Rockchip RK3288 Asus Tinker Board S
  [...]
  ERROR: reserving fdt memory region failed (addr=fe000000 size=1000000 flags=4): -22

FDT correctly contains reserved-memory for 10f000 or fe000000 and U-Boot
correctly does not make these regions available in the LMB memory map:

  memory[0]      [0x200000-0xefffffff], 0xefe00000 bytes, flags: none
  memory[1]      [0x100000000-0x1ffffffff], 0x100000000 bytes, flags: none

or

  memory[0]      [0x0-0x7fffffff], 0x80000000 bytes, flags: none

Ignore -EINVAL errors to restore suppression of this irrelevant ERROR
message when memory region is not part of the LMB memory map.

Fixes: 623f6c5b6ab7 ("boot: image-fdt: free old dtb reservations")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
 boot/image-fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 9e0e0f93edd3..603294215b89 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -95,7 +95,7 @@ static void boot_fdt_handle_region(u64 addr, u64 size, u32 flags, bool free)
 		debug("   %s fdt memory region: addr=%llx size=%llx flags=%x\n",
 		      free ? "freed" : "reserved", (unsigned long long)addr,
 		      (unsigned long long)size, flags);
-	} else {
+	} else if (free || ret != -EINVAL) {
 		printf("ERROR: %s fdt memory region failed (addr=%llx size=%llx flags=%x): %ld\n",
 		       free ? "freeing" : "reserving", (unsigned long long)addr,
 		       (unsigned long long)size, flags, ret);
-- 
2.54.0


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

end of thread, other threads:[~2026-06-29 22:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-27 20:48 [PATCH] boot: image-fdt: Restore suppression of irrelevant ERROR message Jonas Karlman
2026-06-29 17:33 ` Randolph Sapp
2026-06-29 18:14   ` Jonas Karlman
2026-06-29 18:37     ` Randolph Sapp
2026-06-29 19:08       ` Jonas Karlman
2026-06-29 20:19         ` Randolph Sapp
2026-06-29 20:57           ` Jonas Karlman
2026-06-29 22:29             ` Randolph Sapp

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.