[PATCH v5 7/8] libfdt: Allow non-64b aligned memreserve entries

Tom Rini trini at konsulko.com
Tue Mar 17 14:47:36 CET 2026


On Tue, Mar 17, 2026 at 05:06:55PM +0800, Leo Liang wrote:
> Hi Uros,
> 
> On Wed, Dec 24, 2025 at 03:47:17PM +0000, Uros Stajic wrote:
> > From: Chao-ying Fu <cfu at mips.com>
> > 
> > Although memreserve entries in an FDT are 64-bit aligned relative to the
> > start of the FDT, we cannot guarantee that the FDT itself is 64-bit aligned
> > in memory. This is especially common when using a FIT image, where the
> > alignment of the embedded DTB cannot be controlled.
> > 
> > On systems that do not support unaligned 64-bit memory accesses, this leads
> > to faults when accessing the memreserve section before the FDT is relocated.
> > To resolve this, copy the 64-bit values into suitably aligned on-stack
> > variables before accessing them.

Yes, and so you must align the device tree first. We should have
addressed all of these problems in current master now. If we have not,
please explain what the use case you're encountering now is.

[snip]
> Hi Tom,
> 
> Should we accept this patch in u-boot?

No, we cannot, thanks for checking.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260317/ae76c11b/attachment.sig>


More information about the U-Boot mailing list