public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] spl: Allow settings malloc_f base address
@ 2016-05-25  0:14 Marek Vasut
  2016-05-25  3:30 ` Simon Glass
  2016-06-03 13:59 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Marek Vasut @ 2016-05-25  0:14 UTC (permalink / raw)
  To: u-boot

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 | 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] spl: Allow settings malloc_f base address
  2016-05-25  0:14 [U-Boot] [PATCH] spl: Allow settings malloc_f base address Marek Vasut
@ 2016-05-25  3:30 ` Simon Glass
  2016-05-25 12:16   ` Marek Vasut
  2016-06-03 13:59 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Simon Glass @ 2016-05-25  3:30 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On 24 May 2016 at 18:14, Marek Vasut <marex@denx.de> 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.

>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> ---
>  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] spl: Allow settings malloc_f base address
  2016-05-25  3:30 ` Simon Glass
@ 2016-05-25 12:16   ` Marek Vasut
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2016-05-25 12:16 UTC (permalink / raw)
  To: u-boot

On 05/25/2016 05:30 AM, Simon Glass wrote:
> Hi Marek,

Hi!

> On 24 May 2016 at 18:14, Marek Vasut <marex@denx.de> 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 <marex@denx.de>
>> Cc: Tom Rini <trini@konsulko.com>
>> Cc: Simon Glass <sjg@chromium.org>
>> ---
>>  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] spl: Allow settings malloc_f base address
  2016-05-25  0:14 [U-Boot] [PATCH] spl: Allow settings malloc_f base address Marek Vasut
  2016-05-25  3:30 ` Simon Glass
@ 2016-06-03 13:59 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-06-03 13:59 UTC (permalink / raw)
  To: u-boot

On Wed, May 25, 2016 at 02:14:56AM +0200, 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.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160603/dd22e5c9/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-03 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25  0:14 [U-Boot] [PATCH] spl: Allow settings malloc_f base address Marek Vasut
2016-05-25  3:30 ` Simon Glass
2016-05-25 12:16   ` Marek Vasut
2016-06-03 13:59 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox