From: Simon Goldschmidt Date: Fri, 22 Mar 2019 20:57:38 +0100 Subject: [U-Boot] [PATCH v2 0/6] spl: full-featured heap cleanups Message-ID: <20190322195744.26812-1-simon.k.r.goldschmidt@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Some platforms cannot use simple malloc even in very early stages, e.g. when using FAT before DRAM is available. Such platforms currently often use non-Kconfig defines to initialize full malloc and rely on simple heap before that. This series makes some adjustments to ensure SPL behaves the same with simple or full malloc: when CONFIG_SPL_SYS_MALLOC_F_LEN is != 0, both heap types can be used (by changing CONFIG_SPL_SYS_MALLOC_SIMPLE), without manually supplying an address range for the full heap. Changes in v2: - make CONFIG_SPL_CLEAR_BSS_F depend on ARM for now - add CONFIG_SPL_CLEAR_BSS_F implementation for arm64 also - use if() instead of #if - adapt documentation to using CONFIG_SPL_SYS_MALLOC_F_LEN for full-featured heap as well - ensure SPL_CLEAR_BSS_F is set when using SYS_MALLOC_F_LEN for full featured heap (or else, the heap status stored in bss will be overwritten between board_init_f and board_init_r) - fixed summary ("stack" -> "heap") - enable CONFIG_SPL_CLEAR_BSS_F for socfpga_arria10 using full malloc early in SPL Simon Goldschmidt (6): spl: add Kconfig option to clear bss early spl: arm: implement SPL_CLEAR_BSS_F dlmalloc: fix malloc range at end of ram dlmalloc: be compatible to tiny printf spl: support using full malloc with SYS_MALLOC_F_LEN arm: socfpga: a10: move SPL heap size to Kconfig Kconfig | 24 ++++++++++++++-------- README | 15 ++++++++++---- arch/arm/lib/crt0.S | 22 +++++++++++++++++++++ arch/arm/lib/crt0_64.S | 14 +++++++++++++ common/dlmalloc.c | 6 +++++- common/spl/Kconfig | 12 +++++++++++ common/spl/spl.c | 10 ++++++++-- configs/socfpga_arria10_defconfig | 2 ++ drivers/core/Kconfig | 33 +++++++++++++++---------------- include/configs/socfpga_common.h | 14 ------------- 10 files changed, 106 insertions(+), 46 deletions(-) -- 2.17.1