summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/pbl.lds.S
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-05-31 19:51:57 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-06-06 11:42:53 +0200
commita3e42ff1571c8c52f5cc0f71c3749071bae6d498 (patch)
tree498cad882fb20c014563703e9215b88b7c407015 /arch/arm/lib/pbl.lds.S
parentb763981675d80e7c7d99d4973af8f4dd72b8e054 (diff)
downloadbarebox-a3e42ff1571c8c52f5cc0f71c3749071bae6d498.tar.gz
barebox-a3e42ff1571c8c52f5cc0f71c3749071bae6d498.tar.xz
ARM64: cpu: support 64-bit stack top in ENTRY_FUNCTION_WITHSTACK
ENTRY_FUNCTION_WITHSTACK was written with the naive assumption that there will always be some memory in the first 32-bit of the address space to be used as early stack. There are SoCs out there though with sole on-chip SRAM > 4G. Accommodate this by accepting full 64-bit stack pointers in ENTRY_FUNCTION_WITHSTACK. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230531175157.1442379-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Lior Weintraub <liorw@pliops.com>
Diffstat (limited to 'arch/arm/lib/pbl.lds.S')
-rw-r--r--arch/arm/lib/pbl.lds.S7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S
index 114ec7bc81..2b4b1d6a95 100644
--- a/arch/arm/lib/pbl.lds.S
+++ b/arch/arm/lib/pbl.lds.S
@@ -4,6 +4,7 @@
#include <linux/sizes.h>
#include <asm/barebox.lds.h>
#include <asm-generic/memory_layout.h>
+#include <asm-generic/pointer.h>
#ifdef CONFIG_PBL_RELOCATABLE
#define BASE 0x0
@@ -44,14 +45,14 @@ SECTIONS
. = ALIGN(4);
.rodata : { *(.rodata*) }
- . = ALIGN(4);
+ . = ALIGN(ASM_SZPTR);
__pbl_board_stack_top = .;
.rodata.pbl_board_stack_top : {
*(.pbl_board_stack_top_*)
/* Dummy for when BootROM sets up usable stack */
- LONG(0x00000000);
+ ASM_LD_PTR(0x00000000)
}
- ASSERT(. - __pbl_board_stack_top <= 8, "Only One PBL per Image allowed")
+ ASSERT(. - __pbl_board_stack_top <= 2 * ASM_SZPTR, "Only One PBL per Image allowed")
.barebox_imd : { BAREBOX_IMD }