[U-Boot] [PATCH 4/5] board_init.c: fix simple malloc by storing malloc_limit
Marek Vasut
marex at denx.de
Mon Aug 6 12:43:02 UTC 2018
On 08/05/2018 09:34 PM, Simon Goldschmidt wrote:
> board_init_f_init_reserve() sets gd->malloc_base but does
> not set gd->malloc_limit. This results in malloc_simple()
> failing, so let's set this here.
>
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
> ---
>
> common/init/board_init.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/common/init/board_init.c b/common/init/board_init.c
> index 526fee35ff..a9b21a7111 100644
> --- a/common/init/board_init.c
> +++ b/common/init/board_init.c
> @@ -123,6 +123,7 @@ void board_init_f_init_reserve(ulong base)
> #if CONFIG_VAL(SYS_MALLOC_F_LEN)
> /* go down one 'early malloc arena' */
> gd->malloc_base = base;
> + gd->malloc_limit = CONFIG_VAL(SYS_MALLOC_F_LEN);
> /* next alloc will be higher by one 'early malloc arena' size */
> base += CONFIG_VAL(SYS_MALLOC_F_LEN);
> #endif
+CC Simon, I'd like at least one A-B/R-B on this since this is quite
intrusive change.
This should be a separate patch from this series too.
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list