[PATCH u-boot v2019.04-aspeed-openbmc v2 01/10] configs/ast2600: Make early malloc pool larger

Joel Stanley joel at jms.id.au
Tue Apr 20 16:46:39 AEST 2021


The size of the early (pre-DRAM) SRAM heap in u-boot proper is extended
to 8KB.

Testing found that the DRAM driver would perform an allocation that
exceeded the limits, due to the probing of the HACE driver increasing
memory presssure. As SRAM is unused when u-boot proper is running, it
can all be allocated.

(In theory the entire 88KB of SRAM is free, but testing showed more than
60KB would break booting. Finding out why is TODO).

The SPL early heap is fixed to 0x800, the default before this change.
Testing shows that:

  SPL malloc() before relocation used 0x794 bytes (1 KB)

So 2KB should be enough.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 configs/ast2600_openbmc_spl_emmc_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configs/ast2600_openbmc_spl_emmc_defconfig b/configs/ast2600_openbmc_spl_emmc_defconfig
index 6daf6343478b..5a4d66da1cea 100644
--- a/configs/ast2600_openbmc_spl_emmc_defconfig
+++ b/configs/ast2600_openbmc_spl_emmc_defconfig
@@ -24,12 +24,13 @@ CONFIG_ASPEED_KERNEL_FIT_DRAM_BASE=0x83000000
 CONFIG_TARGET_EVB_AST2600A1=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x800
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x5000
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x800
 CONFIG_SPL=y
 CONFIG_SPL_STACK_R_ADDR=0x90300000
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
-- 
2.30.2



More information about the openbmc mailing list