summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/entry.c')
-rw-r--r--arch/arm/cpu/entry.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/arch/arm/cpu/entry.c b/arch/arm/cpu/entry.c
index 30df95f078..0b447de801 100644
--- a/arch/arm/cpu/entry.c
+++ b/arch/arm/cpu/entry.c
@@ -24,16 +24,19 @@
* be fine.
*/
+/*
+ * It can be hard to convince GCC to not use old stack pointer after
+ * we modify it with arm_setup_stack() on ARM64, so we implement the
+ * low level details in assembly
+ */
+void __noreturn __barebox_arm_entry(unsigned long membase,
+ unsigned long memsize,
+ void *boarddata,
+ unsigned long sp);
+
void NAKED __noreturn barebox_arm_entry(unsigned long membase,
- unsigned long memsize, void *boarddata)
+ unsigned long memsize, void *boarddata)
{
- arm_setup_stack(arm_mem_stack_top(membase, membase + memsize));
- arm_early_mmu_cache_invalidate();
-
- if (IS_ENABLED(CONFIG_PBL_MULTI_IMAGES))
- barebox_multi_pbl_start(membase, memsize, boarddata);
- else if (IS_ENABLED(CONFIG_PBL_SINGLE_IMAGE))
- barebox_single_pbl_start(membase, memsize, boarddata);
- else
- barebox_non_pbl_start(membase, memsize, boarddata);
+ __barebox_arm_entry(membase, memsize, boarddata,
+ arm_mem_stack_top(membase, membase + memsize));
}