summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/arm64/include/arch/asm.h4
-rw-r--r--src/arch/arm64/stage_entry.S8
2 files changed, 11 insertions, 1 deletions
diff --git a/src/arch/arm64/include/arch/asm.h b/src/arch/arm64/include/arch/asm.h
index 0dc297447f..851f3f94c7 100644
--- a/src/arch/arm64/include/arch/asm.h
+++ b/src/arch/arm64/include/arch/asm.h
@@ -41,4 +41,8 @@
*/
#define CPU_RESET_ENTRY(name) ENTRY_WITH_ALIGN(name, 6)
+#define ENTRY_WEAK(name) \
+ ENTRY(name) \
+ .weak name \
+
#endif /* __ARM_ARM64_ASM_H */
diff --git a/src/arch/arm64/stage_entry.S b/src/arch/arm64/stage_entry.S
index 5ff2c4e12e..4e15dbbddb 100644
--- a/src/arch/arm64/stage_entry.S
+++ b/src/arch/arm64/stage_entry.S
@@ -228,6 +228,12 @@ CPU_RESET_ENTRY(arm64_cpu_startup_resume)
b arm64_c_environment
ENDPROC(arm64_cpu_startup_resume)
-ENTRY(stage_entry)
+/*
+ * stage_entry is defined as a weak symbol to allow SoCs/CPUs to define a custom
+ * entry point to perform any fixups that need to be done immediately after
+ * power on reset. In case SoC/CPU does not need any custom-defined entrypoint,
+ * this weak symbol can be used to jump directly to arm64_cpu_startup.
+ */
+ENTRY_WEAK(stage_entry)
b arm64_cpu_startup
ENDPROC(stage_entry)