path: root/src/arch/arm64/include/arch
diff options
authorAaron Durbin <adurbin@chromium.org>2014-09-18 13:48:49 -0500
committerPatrick Georgi <pgeorgi@google.com>2015-03-28 07:05:35 +0100
commitdee1996d6c3b4006f4e1d93ab1ffbcb98e30800f (patch)
tree44c348c2a3ebab967142f742414dea5b2d7b6d1b /src/arch/arm64/include/arch
parentb30c9b1c9a676c3b85ac1de9cbc1c5f4424d6297 (diff)
arm64: provide entry points for BSP and non-BSP
It's helpful to differentiate the startup paths for the BSP and the non-BSP. Therefore have c_entry be an 2 element array of function pointers. The non-BSP paths have an entry point one instruction after stage/module entry. BUG=chrome-os-partner:30785 BRANCH=None TEST=Built and booted to kernel. Change-Id: I40bb40462906f1b1eaf2db8584985095e8ac0bae Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: ce10f954041b3fd581ad8a3d82dee567b68637fe Original-Change-Id: Ia573b1095dca5f69e371bf1ddf6b6df72fa3b52e Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/218844 Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/9090 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch/arm64/include/arch')
1 files changed, 15 insertions, 3 deletions
diff --git a/src/arch/arm64/include/arch/stages.h b/src/arch/arm64/include/arch/stages.h
index 97714926e..fd633e484 100644
--- a/src/arch/arm64/include/arch/stages.h
+++ b/src/arch/arm64/include/arch/stages.h
@@ -20,18 +20,30 @@
#ifndef __ARCH_STAGES_H
#define __ARCH_STAGES_H
+#include <stdint.h>
extern void main(void);
void stage_entry(void);
void stage_exit(void *);
void jmp_to_elf_entry(void *entry, unsigned long buffer, unsigned long size);
-/* C entry point for all arm64 stages. */
-void arm64_init(void);
/* This function is called upon initial entry of each stage. It is called prior
* to main(). That means all of the common infrastructure will most likely not
* be available to be used (such as console). */
void arm64_soc_init(void);
+ * Stages and rmodules have 2 entry points: BSP and non-BSP. Provided
+ * a pointer the correct non-BSP entry point will be returned. The
+ * first instruction is for BSP and the 2nd is for non-BSP. Instructions
+ * are all 32-bit on arm64.
+ */
+static inline void *secondary_entry_point(void *e)
+ uintptr_t nonbsp = (uintptr_t)e;
+ return (void *)(nonbsp + sizeof(uint32_t));