Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10897
-gerrit
commit 7c9eba16a7da49de650905e43a81c4f761086b7a Author: Furquan Shaikh furquan@google.com Date: Fri Jul 10 15:25:26 2015 -0700
arm64: Define stage_entry as weak symbol
This allows SoCs/CPUs to have custom stage_entry in order to apply any fixups that need to run before standard cpu reset procedure.
BUG=chrome-os-partner:41877 BRANCH=None TEST=Compiles successfully
Change-Id: Iaae7636349140664b19e81b0082017b63b13f45b Signed-off-by: Patrick Georgi pgeorgi@chromium.org Original-Commit-Id: 498d04b0e9a3394943f03cad603c30ae8b3805d4 Original-Change-Id: I9a005502d4cfcb76017dcae3a655efc0c8814a93 Original-Signed-off-by: Furquan Shaikh furquan@google.com Original-Reviewed-on: https://chromium-review.googlesource.com/284867 Original-Trybot-Ready: Furquan Shaikh furquan@chromium.org Original-Tested-by: Furquan Shaikh furquan@chromium.org Original-Reviewed-by: Aaron Durbin adurbin@chromium.org Original-Commit-Queue: Furquan Shaikh furquan@chromium.org --- src/arch/arm64/include/arch/asm.h | 4 ++++ src/arch/arm64/stage_entry.S | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/arch/arm64/include/arch/asm.h b/src/arch/arm64/include/arch/asm.h index 0dc2974..851f3f9 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 5ff2c4e..4e15dbb 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)