[coreboot-gerrit] New patch to review for coreboot: 0e14942 arm64: add indirection to C entry point
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Mar 26 10:48:32 CET 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9015
-gerrit
commit 0e14942db1dc6d3defb97bed658aa03cce786e30
Author: Aaron Durbin <adurbin at chromium.org>
Date: Wed Aug 27 15:52:01 2014 -0500
arm64: add indirection to C entry point
To allow setting the entry point for the secondary CPUs
provide a pointer, c_entry, which contains the location
to branch to after setting up the stack.
BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and booted to the kernel on ryu.
Change-Id: I03e54b081aa5ff70b90fbd7f1b243fdb4f42c5a6
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Original-Commit-Id: f692c5814ea5c7ff4895576e1db8361ff3b7d9fb
Original-Change-Id: Ic2f6c79cde708b24c379345aed1e2cc0760ccad8
Original-Signed-off-by: Aaron Durbin <adurbin at chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/214771
Original-Reviewed-by: Furquan Shaikh <furquan at chromium.org>
---
src/arch/arm64/c_entry.c | 8 ++++++++
src/arch/arm64/stage_entry.S | 8 +++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/arch/arm64/c_entry.c b/src/arch/arm64/c_entry.c
index f08a585..3e9d44e 100644
--- a/src/arch/arm64/c_entry.c
+++ b/src/arch/arm64/c_entry.c
@@ -20,6 +20,14 @@
#include <arch/stages.h>
#include <arch/cpu.h>
+
+/*
+ * This variable holds entry point for CPUs starting up. Before the other
+ * CPUs are brought up this value will change to provide the secondary
+ * code path.
+ */
+void (*c_entry)(void) = &arm64_init;
+
void __attribute__((weak)) arm64_soc_init(void)
{
/* Default weak implementation does nothing. */
diff --git a/src/arch/arm64/stage_entry.S b/src/arch/arm64/stage_entry.S
index 8613655..e323de5 100644
--- a/src/arch/arm64/stage_entry.S
+++ b/src/arch/arm64/stage_entry.S
@@ -99,7 +99,13 @@ ENTRY(arm64_c_environment)
bl cpu_get_stack
mov sp, x0
- b arm64_init
+ /* Get entry point by dereferencing c_entry. */
+ ldr x0, 1f
+ ldr x0, [x0]
+ br x0
+.align 3
+ 1:
+ .quad c_entry
ENDPROC(arm64_c_environment)
CPU_RESET_ENTRY(arm64_cpu_startup)
More information about the coreboot-gerrit
mailing list