Correctly define CONFIG_SPL_MAX_FOOTPRINT to make the default arm linker script for SPL check the total SRAM size available for SPL (code, data, bss, heap, global data).
The previously existing define CONFIG_SPL_MAX_SIZE seems to only check the binary size (which is without bss, heap and gd). Signed-off-by: Simon Goldschmidt <simon.k.r.goldschm...@gmail.com> --- include/configs/socfpga_common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 2330143cf1..9103d0a966 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -242,6 +242,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void); #define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR #define CONFIG_SPL_MAX_SIZE CONFIG_SYS_INIT_RAM_SIZE +/* Check total size of SPL including BSS, malloc area and gd */ +#include <generated/generic-asm-offsets.h> +#define CONFIG_SPL_MAX_FOOTPRINT (CONFIG_SYS_INIT_SP_ADDR - \ + CONFIG_SYS_INIT_RAM_ADDR - \ + CONFIG_SYS_MALLOC_F_LEN - \ + GENERATED_GBL_DATA_SIZE) + #if defined(CONFIG_TARGET_SOCFPGA_ARRIA10) /* SPL memory allocation configuration, this is for FAT implementation */ #ifndef CONFIG_SYS_SPL_MALLOC_START -- 2.17.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot