
On 6/11/20 5:10 AM, Michal Simek wrote:
From: Ashok Reddy Soma ashok.reddy.soma@xilinx.com
There is no technical reason to add additional 4k space for FDT. This space is completely unused and just increase memory requirements. This is problematic on systems with limited memory resources as Xilinx Zynq CSE/ZynqMP mini and Versal mini configurations.
I haven't looked into whether it's useful to reserve extra space yet. But I have to say I find it extremely unlikely that 4K space usage is problematic for a system large enough to run U-Boot, unless this is part of a much larger push to trim memory usage.
The patch is removing additional 4k space and also increasing alignment to 64 to be aligned with 64bit systems.
diff --git a/common/board_f.c b/common/board_f.c
gd->fdt_size = ALIGN(fdt_totalsize(gd->fdt_blob) + 0x1000, 32);
gd->fdt_size = ALIGN(fdt_totalsize(gd->fdt_blob), 64);
So IIRC the alignment parameter is bytes not bits. I don't follow why a 64-bit system would need 64-byte alignment? IIRC, the stack alignment requirement is only 16 bytes, so the presumably isn't what this change is trying to fix.
I'd suggest making the alignment-change and extra-size-removal patches separate patches so that any issues caused by the change can easily be tracked to one of the separate logical changes by git bisect etc.