spl: Allow settings malloc_f base address
authorMarek Vasut <marex@denx.de>
Wed, 25 May 2016 00:14:56 +0000 (02:14 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 3 Jun 2016 01:21:42 +0000 (21:21 -0400)
Allow configuring the begining of the malloc_f area in SPL.
This patch uses the same CONFIG_MALLOC_F_ADDR established by
the sandbox.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
common/spl/spl.c

index bdde716..780c081 100644 (file)
@@ -192,6 +192,9 @@ int spl_init(void)
 
        debug("spl_init()\n");
 #if defined(CONFIG_SYS_MALLOC_F_LEN)
+#ifdef CONFIG_MALLOC_F_ADDR
+       gd->malloc_base = CONFIG_MALLOC_F_ADDR;
+#endif
        gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN;
        gd->malloc_ptr = 0;
 #endif