From: Simon Glass Date: Fri, 27 Feb 2015 22:06:37 -0700 Subject: [U-Boot] [PATCH 13/29] Correct malloc_limit value for pre-relocation malloc() In-Reply-To: <1425100013-4796-1-git-send-email-sjg@chromium.org> References: <1425100013-4796-1-git-send-email-sjg@chromium.org> Message-ID: <1425100013-4796-14-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The limit is measured from the start of the malloc() area and is not an absolute address. Correct this. Signed-off-by: Simon Glass --- This bug has been there for a while but was not causing problems. I have been meaning to send a patch for a while. common/spl/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index cd75bbc..c655332 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -146,7 +146,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 -- 2.2.0.rc0.207.ga3a616c