summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2024-09-20 09:24:33 +0200
committerTom Rini <[email protected]>2024-10-03 11:52:16 -0600
commita3403e6fbf80412a04ddbb033b3235aa03b04efa (patch)
tree2493e748e122614f1c6a78d1efd67f1b58e1e929
parent5d93d8137ddfcb58f23d6038feefca27f656a463 (diff)
armv8: Support not having separate BSS
Separate BSS is current mandatory on armv8 but this is not useful for early boot phases. Add support for the combined BSS. Use an #ifdef to avoid using CONFIG_SPL_BSS_START_ADDR which is not valid in this case. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
-rw-r--r--arch/arm/cpu/armv8/u-boot-spl.lds12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds
index 215cedd69a8..fed69644b55 100644
--- a/arch/arm/cpu/armv8/u-boot-spl.lds
+++ b/arch/arm/cpu/armv8/u-boot-spl.lds
@@ -13,8 +13,10 @@
MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE,
LENGTH = IMAGE_MAX_SIZE }
+#ifdef CONFIG_SPL_SEPARATE_BSS
MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR,
LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
+#endif
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
OUTPUT_ARCH(aarch64)
@@ -56,12 +58,22 @@ SECTIONS
_end = .;
_image_binary_end = .;
+#ifdef CONFIG_SPL_SEPARATE_BSS
.bss : {
__bss_start = .;
*(.bss*)
. = ALIGN(8);
__bss_end = .;
} >.sdram
+#else
+ .bss (NOLOAD) : {
+ __bss_start = .;
+ *(.bss*)
+ . = ALIGN(8);
+ __bss_end = .;
+ } >.sram
+#endif
+ __bss_size = __bss_end - __bss_start;
/DISCARD/ : { *(.rela*) }
/DISCARD/ : { *(.dynsym) }