Skip to contentSkip to conversation

bcmstb: Make use of bootm_size rather than fdt_high

PATCH In review Tom Rini 1 participant 2 messages Nov 19, 2025 – Dec 4, 2025

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 bcmstb: Make use of bootm_size rather than fdt_high

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.

---
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 <[email protected]>
---
 include/configs/bcmstb.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/configs/bcmstb.h +3 -3
index c9280927b3cd..ca59c364cd74 100644
@@ -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
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 10 lines · Tom Rini

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.

[...]

Applied to u-boot/next, thanks!

[1/1] bcmstb: Make use of bootm_size rather than fdt_high

      commit: 39b10f534f0fa016b228c8b76d090fd2d62d2378
Signature · 1 line
Tom