On 11/13/25 4:49 PM, Tom Rini wrote:

Hello Tom,

diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 3f0ac54f76f..e88525a3846 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -189,6 +189,10 @@ int boot_relocate_fdt(char **of_flat_tree, ulong *of_size)
                        /* All ones means use fdt in place */
                        of_start = fdt_blob;
                        addr = map_to_sysmem(fdt_blob);
+                       if (addr & 7) {
+                               printf("WARNING: The 'fdt_high' environment variable 
is set to ~0 and DT is at non-8-byte aligned address.\nWARNING: This system will likely 
fail to boot. Unset 'fdt_high' environment variable and submit fix upstream.\n");
+                       }
+
                        err = lmb_alloc_mem(LMB_MEM_ALLOC_ADDR, 0, &addr,
                                            of_len, LMB_NONE);
                        if (err) {

I think we need to yell about it sooner.

I don't think so, for two reasons:

- If the user uses e.g. bootz to boot their kernel, which on arm32 is still sadly happening, they wouldn't trigger this problem at all and they wouldn't care about whichever way their fdt_high is set.

- If the user sets 'fdt_high' as part of their boot command, they would not get any warning print if we warn earlier, but they would get one when they boot and trigger this affected code path.

Maybe we need warnings in two locations ?

Today (and for quite some
years) if you pass a 4 byte and not 8 byte aligned DT to Linux, it fails
to boot or breaks in loud

Worse, not loud, but silent.

and odd ways. This has in turn lead to much
time spent and some of our older threads with the libfdt folks years
ago. So I think we need something earlier in code where we're seeing
that fdt_high is set to ~0 and that's where we say "Stop doing this, it
will be removed soon".

We cannot remove this functionality, someone might actually depend on it for whatever reason. It is part of the command line ABI now.

[...]

Reply via email to