[PATCH v3 4/5] board: bsh: imx8mn_bsh_smm_s2/s2pro: enlarge CONFIG_SPL_SYS_MALLOC_F_LEN
Hugo Villeneuve
hugo at hugovil.com
Thu Jun 12 14:59:10 CEST 2025
On Tue, 20 May 2025 09:11:26 -0300
Fabio Estevam <festevam at gmail.com> wrote:
> Hi Dario and Michael,
>
> On Tue, May 20, 2025 at 5:55 AM Dario Binacchi
> <dario.binacchi at amarulasolutions.com> wrote:
> >
> > The commit dda454e933c6 ("serial: mxc: Support bulk enabling clocks")
> > breaks the booting of the BSH SMM S2 board. The analysis of the issue
> > revealed memory allocation failures during the registration of UART4
> > clocks as well as other peripherals. Increasing SYS_MALLOC_F_LEN to
> > 0x10000 fixed the issue.
> >
> > Dropping this option allows it to be set to the default value of
> > CONFIG_SYS_MALLOC_F_LEN, which is set by default to 0x10000 on
> > i.MX8M platforms.
> >
> > Co-developed-by: Michael Trimarchi <michael at amarulasolutions.com>
> > Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>
> > Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> > ---
> >
> > (no changes since v1)
> >
> > configs/imx8mn_bsh_smm_s2_defconfig | 1 -
> > configs/imx8mn_bsh_smm_s2pro_defconfig | 1 -
> > 2 files changed, 2 deletions(-)
> >
> > diff --git a/configs/imx8mn_bsh_smm_s2_defconfig b/configs/imx8mn_bsh_smm_s2_defconfig
> > index 1c11d4705419..206d216394db 100644
> > --- a/configs/imx8mn_bsh_smm_s2_defconfig
> > +++ b/configs/imx8mn_bsh_smm_s2_defconfig
> > @@ -15,7 +15,6 @@ CONFIG_SYS_MONITOR_LEN=524288
> > CONFIG_SPL_SERIAL=y
> > CONFIG_SPL_DRIVERS_MISC=y
> > CONFIG_SPL_STACK=0x980000
> > -CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000
>
> Thanks for investigating this issue and getting to the root cause.
>
> Reviewed-by: Fabio Estevam <festevam at gmail.com>
>
> I'm adding Hugo to the Cc as the imx8mn_var_som_defconfig target also
> uses CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000.
>
> Hugo, please consider doing the same change on imx8mn_var_som_defconfig.
Hi Fabio,
sorry for the late response.
Yes, I also ran into the same problem and manually set
CONFIG_SPL_SYS_MALLOC_F_LEN to 128kB, as was done in commit
52472504e9c4 ("rockchip: rk3568: Fix alloc space exhausted in SPL").
I have now tested with the default value of 64kB (0x10000) by
removing CONFIG_SPL_SYS_MALLOC_F_LEN and it also works fine.
I will submit a patch for this.
Thank you,
Hugo.
More information about the U-Boot
mailing list