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

Uros Stajic uros.stajic at htecgroup.com
Fri Mar 27 14:50:57 CET 2026


Hi,

On 3/17/26 14:47, Tom Rini wrote:
> 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

Thanks for checking. With current master I no longer see the issue that 
originally motivated this patch, so I will drop it from v6.

Best regards,
Uros


More information about the U-Boot mailing list