Message ID | 20210420064648.994075-2-joel@jms.id.au |
---|---|
State | New |
Headers | show |
Series | Use HACE to accelerate sha512 | expand |
Hello, On 4/20/21 8:46 AM, Joel Stanley wrote: > 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). Could it be a HW problem ? C. > > 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@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 >
On Tue, 20 Apr 2021 at 08:53, Cédric Le Goater <clg@kaod.org> wrote: > > Hello, > > On 4/20/21 8:46 AM, Joel Stanley wrote: > > 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). > > Could it be a HW problem ? This was testing in Qemu, so probably not. We model the full 88KB in Qemu.
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
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@jms.id.au> --- configs/ast2600_openbmc_spl_emmc_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)