[PATCH] bcmstb: Make use of bootm_size rather than fdt_high

Tom Rini trini at konsulko.com
Wed Nov 19 15:55:22 CET 2025


Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS. However, this platform also has a large comment
block that explains that given previous stage loaders and other parts of
the memory map (that may not be in the device tree we see?), adjust this
to use bootm_size to restrict relocation to be below the CMA area and
update the comment to match.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
I've thought about this a bit, and if you really want to keep
fdt_high=0xffffffff here instead, the address passed along is 8-byte
aligned and I could see this being a legitimate user of the
functionality (we're in a restricted functionality area with a complex
map and incomplete information in our provided device trees). Thanks!

Cc: Thomas Fitzsimmons <fitzsim at fitzsim.org>
---
 include/configs/bcmstb.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/configs/bcmstb.h b/include/configs/bcmstb.h
index c9280927b3cd..ca59c364cd74 100644
--- a/include/configs/bcmstb.h
+++ b/include/configs/bcmstb.h
@@ -71,8 +71,8 @@ extern phys_addr_t prior_stage_fdt_address;
  *
  * We want to keep the ramdisk and FDT in the FIT image in-place, to
  * accommodate stblinux's bmem and CMA regions.  To accomplish this,
- * we set initrd_high and fdt_high to 0xffffffff, and the load and
- * entry addresses of the FIT ramdisk entry to 0x0.
+ * we set initrd_high to 0xffffffff, bootm_size to 0x7000000 and the
+ * load and entry addresses of the FIT ramdisk entry to 0x0.
  *
  * Overwriting the prior stage bootloader causes memory instability,
  * so the compressed initramfs needs to fit between the load address
@@ -121,7 +121,7 @@ extern phys_addr_t prior_stage_fdt_address;
 #define CFG_EXTRA_ENV_SETTINGS					\
 	"fdtsaveaddr=" __stringify(CONFIG_SYS_FDT_SAVE_ADDRESS) "\0"	\
 	"initrd_high=0xffffffff\0"					\
-	"fdt_high=0xffffffff\0"
+	"bootm_size=0x7000000\0"
 
 /*
  * Set fdtaddr to prior stage-provided DTB in board_late_init, when
-- 
2.43.0



More information about the U-Boot mailing list