From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 25 May 2016 14:16:02 +0200 Subject: [U-Boot] [PATCH] spl: Allow settings malloc_f base address In-Reply-To: References: <1464135296-6598-1-git-send-email-marex@denx.de> Message-ID: <57459782.6090604@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/25/2016 05:30 AM, Simon Glass wrote: > Hi Marek, Hi! > On 24 May 2016 at 18:14, Marek Vasut wrote: >> Allow configuring the begining of the malloc_f area in SPL. >> This patch uses the same CONFIG_MALLOC_F_ADDR established by >> the sandbox. > > What is this used for? Is the existing scheme (using the stack space) > not suitable? I think it should move to Kconfig before being used more > widely. In case your stack is waaay too constrained, then this is not suitable, yep :( >> >> Signed-off-by: Marek Vasut >> Cc: Tom Rini >> Cc: Simon Glass >> --- >> common/spl/spl.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/common/spl/spl.c b/common/spl/spl.c >> index 93f9bd1..56c64d1 100644 >> --- a/common/spl/spl.c >> +++ b/common/spl/spl.c >> @@ -160,6 +160,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 >> -- >> 2.7.0 >> > > Regards, > Simon > -- Best regards, Marek Vasut