[U-Boot] [PATCH v2 5/6] spl: support using full malloc with SYS_MALLOC_F_LEN
Simon Glass
sjg at chromium.org
Fri Mar 22 07:53:30 UTC 2019
Hi,
On Sat, 16 Mar 2019 at 04:14, Simon Goldschmidt
<simon.k.r.goldschmidt at gmail.com> wrote:
>
> Some platforms (like socfpga A10) need a big hep before SDRAM is available
heap
> (e.g. because FAT is used). For such platforms, simple_malloc is often not
> a good option as it does not support freeing memory. These platforms often
Does the lack of free() actually cause any problems on this platform?
> use the non-Kconfig defines CONFIG_SYS_SPL_MALLOC_START (and its SIZE).
>
> This patch allows enabling CONFIG_SPL_SYS_MALLOC_F_LEN while leaving
> CONFIG_SPL_SYS_MALLOC_SIMPLE disabled. In this case, the full malloc heap
> is made available as early as the simple_malloc heap would be normally.
Why not init SDRAM before using FAT?
>
> This way, platforms can drop the non-Kconfig options to set up the full
> heap and rely on the same automatically calculated heap allocation used
> for simple heap.
>
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
> ---
>
> Changes in v2: None
>
> common/spl/spl.c | 5 +++++
> 1 file changed, 5 insertions(+)
Regards,
Simon
More information about the U-Boot
mailing list