summaryrefslogtreecommitdiff
path: root/src/arch/arm64/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm64/include')
-rw-r--r--src/arch/arm64/include/armv8/arch/cpu.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/arch/arm64/include/armv8/arch/cpu.h b/src/arch/arm64/include/armv8/arch/cpu.h
index d2623857aa..8d071adc61 100644
--- a/src/arch/arm64/include/armv8/arch/cpu.h
+++ b/src/arch/arm64/include/armv8/arch/cpu.h
@@ -66,6 +66,19 @@ struct cpu_info {
/* Obtain cpu_info for current executing CPU. */
struct cpu_info *cpu_info(void);
+extern struct cpu_info *bsp_cpu_info;
+
+/* Ran only by BSP at initial boot strapping. */
+static inline void cpu_set_bsp(void)
+{
+ bsp_cpu_info = cpu_info();
+}
+
+static inline int cpu_is_bsp(void)
+{
+ return cpu_info() == bsp_cpu_info;
+}
+
/* Control routines for starting CPUs. */
struct cpu_control_ops {
/* Return the maximum number of CPUs supported. */