[PATCH 08/10] arm64: dts: Make sure that all DTBs are 64bit aligned for 64bit systems

Michal Simek michal.simek at xilinx.com
Thu Aug 19 18:34:45 CEST 2021


Hi Andre,


On 8/19/21 6:10 PM, Andre Przywara wrote:
> On 8/19/21 12:19 PM, Michal Simek wrote:
> 
> Hi Michal,
> 
>> DTBs for 64bit systems should be also 64bit aligned.
> 
> What does "align" mean here, exactly? This is about generating .dtb
> *files*, right? dtc makes sure that the internal structures are properly
> aligned, so what else should be aligned here?
> 
>> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
>> ---
>>
>>   arch/arm/dts/Makefile | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
>> index 537c96bf5b35..8d4fc333ea7a 100644
>> --- a/arch/arm/dts/Makefile
>> +++ b/arch/arm/dts/Makefile
>> @@ -1,5 +1,9 @@
>>   # SPDX-License-Identifier: GPL-2.0+
>>   +ifdef CONFIG_PHYS_64BIT
>> +DTC_FLAGS += -a 0x8
> 
> By looking into the dtc source this looks like to make sure the *size*
> of the DTB is 8-byte aligned, is that the intention here, or even
> useful? If it is, it should apply unconditionally, not only to 64-bit
> systems.

The question is correct. I did it mostly for being safe that DTBs start
and end is 64bit aligned. I didn't hit any issue with not aligned end
and maybe it is not useful to do it. It was just more convenient for me
to work with also 64bit aligned image size.


Thanks,
Michal


More information about the U-Boot mailing list