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

Tom Rini
2026-03-17T13:47:45Z

[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

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@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]