From: Simon Glass Date: Sat, 28 Feb 2015 05:06:37 +0000 (-0700) Subject: Correct malloc_limit value for pre-relocation malloc() X-Git-Tag: KARO-TXSD-2017-03-15~4700^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=293f16b1e7f6006f192950a94830e3a14c979c4d;p=karo-tx-uboot.git Correct malloc_limit value for pre-relocation malloc() The limit is measured from the start of the malloc() area and is not an absolute address. Correct this. Signed-off-by: Simon Glass --- diff --git a/common/spl/spl.c b/common/spl/spl.c index 8e1fb40c47..af1336ce10 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -158,7 +158,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2) CONFIG_SYS_SPL_MALLOC_SIZE); gd->flags |= GD_FLG_FULL_MALLOC_INIT; #elif defined(CONFIG_SYS_MALLOC_F_LEN) - gd->malloc_limit = gd->malloc_base + CONFIG_SYS_MALLOC_F_LEN; + gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN; gd->malloc_ptr = 0; #endif #ifdef CONFIG_SPL_DM