spl: Allow settings malloc_f base address
PATCH 1/1 spl: Allow settings malloc_f base address
Allow configuring the begining of the malloc_f area in SPL. This patch uses the same CONFIG_MALLOC_F_ADDR established by the sandbox.
--- common/spl/spl.c | 3 +++ 1 file changed, 3 insertions(+)
common/spl/spl.c +3 -0
@@ -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
Signature · 1 line
2.7.0
PATCH 1/1 spl: Allow settings malloc_f base address
Hi Marek,
Quoted 3 lines · Marek Vasut
Allow configuring the begining of the
malloc_farea in SPL. This patch uses the sameCONFIG_MALLOC_F_ADDRestablished 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.
Quoted 23 lines
Signed-off-by Marek Vasut <[email protected]>Cc Tom Rini <[email protected]>Cc Simon Glass <[email protected]>--- common/spl/spl.c | 3 +++ 1 file changed, 3 insertions(+)common/spl/spl.c +3
-1@@ -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 --
Quoted 2 lines
2.7.0
Regards,
Simon
PATCH 1/1 spl: Allow settings malloc_f base address
Quoted 1 line · Simon Glass
Hi Marek,
Hi!
Quoted 8 lines · Marek Vasut
Quoted 3 lines
Allow configuring the begining of the
malloc_farea in SPL. This patch uses the sameCONFIG_MALLOC_F_ADDRestablished by the sandbox.What is this used for? Is the existing scheme (using the stack space) not suitable? I think it should move to
Kconfigbefore being used more widely.
In case your stack is waaay too constrained, then this is not suitable, yep :(
Quoted 29 lines
Quoted 23 lines
Signed-off-by Marek Vasut <[email protected]>Cc Tom Rini <[email protected]>Cc Simon Glass <[email protected]>--- common/spl/spl.c | 3 +++ 1 file changed, 3 insertions(+)common/spl/spl.c +3
-1@@ -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 --Quoted 2 lines
2.7.0
Regards,
Simon
Signature · 2 lines
Best regards, Marek Vasut
Quoted 7 lines · Marek Vasut
Allow configuring the begining of the
malloc_farea in SPL. This patch uses the sameCONFIG_MALLOC_F_ADDRestablished by the sandbox.Signed-off-by Marek Vasut <[email protected]>Cc Tom Rini <[email protected]>Cc Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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>