summaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-05-19 15:09:22 -0400
committerTom Rini <[email protected]>2022-06-06 12:09:10 -0400
commit9b5f9aeb3b48dbc059272168635a397ea5096a31 (patch)
tree9f3fc638f4e7a06729799b4fc4cf29bd3618baa1 /common/spl
parentca8a329a1b7f3195ee56fee4c0906ee883383dfa (diff)
Convert CONFIG_SPL_BSS_MAX_SIZE et al to Kconfig
This converts the following to Kconfig: CONFIG_SPL_BSS_MAX_SIZE CONFIG_SPL_MAX_FOOTPRINT Note that the da850evm platforms were violating the "only use one" rule here, and so now hard-code their BSS limit. Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/Kconfig38
1 files changed, 38 insertions, 0 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index ff8690d4f6a..48af2a3d483 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -105,6 +105,44 @@ config SPL_PAD_TO
0, meaning to append the SPL payload without any padding, or >=
CONFIG_SPL_MAX_SIZE.
+choice
+ prompt "Enforce SPL BSS limit"
+ depends on SPL && !PPC
+ default SPL_BSS_LIMIT
+ help
+ In some platforms we only want to enforce a limit on the size of the
+ BSS in memory. On other platforms we need to enforce a limit on the
+ whole of the memory allocation as we're strictly limited to a small
+ typically non-DRAM location. Finally, other platforms do not enforce
+ a memory limit within SPL.
+
+config SPL_NO_BSS_LIMIT
+ bool "Do not enforce a build time limit on the size of the BSS"
+
+config SPL_BSS_LIMIT
+ bool "Enforce a limit on the size of the BSS only"
+
+config SPL_FOOTPRINT_LIMIT
+ bool "Enforce a limit on the whole of memory allocated to SPL, BSS included"
+
+endchoice
+
+config SPL_BSS_MAX_SIZE
+ hex "Maximum size in memory allocated to the SPL BSS"
+ depends on SPL_BSS_LIMIT
+ default 0x100000 if ARCH_MX6 || RISCV
+ default 0x80000 if ARCH_OMAP2PLUS || ARCH_SUNXI
+ help
+ When non-zero, the linker checks that the actual memory used by SPL
+ from __bss_start to __bss_end does not exceed it.
+
+config SPL_MAX_FOOTPRINT
+ hex "Maximum size in memory allocated to the SPL, BSS included"
+ depends on SPL_FOOTPRINT_LIMIT
+ help
+ When non-zero, the linker checks that the actual memory used by SPL
+ from _start to __bss_end does not exceed it.
+
config SPL_SYS_STACK_F_CHECK_BYTE
hex
default 0xaa