aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2022-04-08 10:28:05 +0200
committerTom Rini <trini@konsulko.com>2022-04-21 14:32:40 -0400
commitb616947052178f358bbb07d368ba3399fce9d495 (patch)
treeabe743325cfde91d63e1c96c50664f5127cd710b
parente50f66e364be80e02dd0834b84b830f3aade82ea (diff)
downloadu-boot-b616947052178f358bbb07d368ba3399fce9d495.zip
u-boot-b616947052178f358bbb07d368ba3399fce9d495.tar.gz
u-boot-b616947052178f358bbb07d368ba3399fce9d495.tar.bz2
SPL: Do not enable SPL_SYS_MALLOC_SIMPLE without SPL_FRAMEWORK by default
On P2020 board is SPL malloc simple always failing with error and loops: SD boot... alloc space exhausted Bad trap at PC: f8f8b5f0, SR: 21200, vector=d00 NIP: 00000000 XER: 00000000 LR: 00000000 REGS: f8f8b5f0 TRAP: 20000000 DAR: 00000000 MSR: 00021200 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00 GPR00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 GPR08: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 GPR24: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Call backtrace: Exception in kernel pc f8f8b5f0 signal 0 Inspection showed that gd->malloc_limit is zero. And it is because generally SPL_FRAMEWORK initialize SPL's gd->malloc_limit. But when SPL_FRAMEWORK is not enabled then in most cases nobody initialize gd->malloc_limit and so SPL malloc simple does not work. So disable SPL_SYS_MALLOC_SIMPLE by default when SPL_FRAMEWORK is not enabled. SPL_SYS_MALLOC_SIMPLE can be disabled only by setting SPL_SYS_MALLOC_F_LEN to zero. So do it. This change fixes SPL error "alloc space exhausted" on P2020 board. Signed-off-by: Pali Rohár <pali@kernel.org>
-rw-r--r--Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kconfig b/Kconfig
index 429e5d3..bdae59e 100644
--- a/Kconfig
+++ b/Kconfig
@@ -283,6 +283,7 @@ config SYS_MALLOC_LEN
config SPL_SYS_MALLOC_F_LEN
hex "Size of malloc() pool in SPL"
depends on SYS_MALLOC_F && SPL
+ default 0 if !SPL_FRAMEWORK
default 0x2800 if RCAR_GEN3
default SYS_MALLOC_F_LEN
help