arm64: versal: Fix LTO for mini_ospi/mini_qspi
authorPranav Tilak <pranav.vinaytilak@amd.com>
Mon, 8 Dec 2025 13:54:24 +0000 (14:54 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 8 Dec 2025 15:05:15 +0000 (09:05 -0600)
commitf2c148e0df3a50c74130b4cd0c9bd3d02ba375b2
tree483654db6f2bc79f1bd56cd6e95d95754975a294
parentae184121e00b131b84c04885cecfded18e320a8d
arm64: versal: Fix LTO for mini_ospi/mini_qspi

With LTO enabled, mini U-Boot was hanging during reloc_fdt().
The initial stack pointer was placed too low, and the FDT memcpy
destination was carved only 4KB above it. This left insufficient
margin, causing the FDT copy to overwrite the live early stack
and corrupt execution before relocation.

To fix this, increase the malloc heap from 8KB to 12KB and raise the
initial stack pointer by 4KB. Together these adjustments increase
the separation between the early stack and the FDT region during
the pre-relocation phase, eliminating the overlap and fixing the
hang on mini builds (QSPI/OSPI).

Signed-off-by: Pranav Tilak <pranav.vinaytilak@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
configs/xilinx_versal_mini_ospi_defconfig
configs/xilinx_versal_mini_qspi_defconfig