aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2023-09-28 10:44:58 -0400
committerTom Rini <trini@konsulko.com>2023-09-28 12:48:48 -0400
commitfab622297d593804db72e814a781e31e50852c8f (patch)
tree6adc52d0fe780364598f4d11d4b4a8ab57fb5d4b
parent9f22f070983c988a91fa3f94ebed0b06b84e67af (diff)
downloadu-boot-TEST/malloc-runtime-cleanup-v3.zip
u-boot-TEST/malloc-runtime-cleanup-v3.tar.gz
u-boot-TEST/malloc-runtime-cleanup-v3.tar.bz2
malloc: Enable SYS_MALLOC_RUNTIME_INIT by default in SPLTEST/malloc-runtime-cleanup-v3
On boards with size restrictions, 1-2k can be a significant fraction of the binary size. Add a new SPL version of SYS_MALLOC_RUNTIME_INIT. As this trades text size for BSS size, enable it by default only for boards with at least 16k of BSS. Signed-off-by: Sean Anderson <sean.anderson@seco.com>
-rw-r--r--Kconfig11
1 files changed, 11 insertions, 0 deletions
diff --git a/Kconfig b/Kconfig
index 7aa8970..01972f4 100644
--- a/Kconfig
+++ b/Kconfig
@@ -381,6 +381,17 @@ config SYS_MALLOC_RUNTIME_INIT
reduce the size of U-Boot by letting malloc's data reside in .bss
instead of .data.
+config SPL_SYS_MALLOC_RUNTIME_INIT
+ bool "Initialize malloc's internal data at runtime in SPL"
+ default y if !SPL_BSS_LIMIT || SPL_BSS_MAX_SIZE >= 0x1000
+ depends on SPL
+ help
+ Initialize malloc's internal data structures at SPL runtime, rather
+ than at compile-time. This is necessary if relocating the malloc arena
+ from a smaller static memory to a large DDR memory. It can also reduce
+ the size of U-Boot by letting malloc's data reside in .bss instead of
+ .data.
+
config TOOLS_DEBUG
bool "Enable debug information for tools"
help