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.goldschm...@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
-- 
2.17.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to