summaryrefslogtreecommitdiff
path: root/src/arch/arm64/include
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2014-08-27 10:26:15 -0500
committerPatrick Georgi <pgeorgi@google.com>2015-03-27 08:03:52 +0100
commitaf46e80b0ecbd82c3492045061dd552a0e9c5a66 (patch)
tree605ccf9864651fdae40f21840ec9a28f9d3b6322 /src/arch/arm64/include
parentb3b1b5875ccac70a51647377e6444f5adce1adeb (diff)
downloadcoreboot-af46e80b0ecbd82c3492045061dd552a0e9c5a66.tar.xz
arm64: add smp_processor_id() declaration
In order to accomodate MP on arm64 one needs to be able to determine the current logical processor id. Because it depends on the SoC implementation the SoC needs to provide this implementation. BUG=chrome-os-partner:31545 BRANCH=None TEST=Built. Change-Id: I2f09df9bf7d4f829d8f45471bf7281a4ddba2fc8 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 6033e73d70c3b8296b36ff36b4b848b176917e12 Original-Change-Id: I9511b54b5a1ab340b0f1309b0d9976be68b50903 Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/214663 Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/9007 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch/arm64/include')
-rw-r--r--src/arch/arm64/include/armv8/arch/cpu.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/arch/arm64/include/armv8/arch/cpu.h b/src/arch/arm64/include/armv8/arch/cpu.h
index 5a8f14560d..70311dd194 100644
--- a/src/arch/arm64/include/armv8/arch/cpu.h
+++ b/src/arch/arm64/include/armv8/arch/cpu.h
@@ -40,13 +40,16 @@ struct cpu_info {
#endif
};
-struct cpuinfo_arm {
- uint8_t arm; /* CPU family */
- uint8_t arm_vendor; /* CPU vendor */
- uint8_t arm_model;
-};
-
#endif
struct cpu_info *cpu_info(void);
+
+/*
+ * Returns logical cpu in range [0:MAX_CPUS). SoC should define this.
+ * Additionally, this is needed early in arm64 init so it should not
+ * rely on a stack. Standard clobber list is fair game: x0-x7 and x0
+ * returns the logical cpu number.
+ */
+unsigned int smp_processor_id(void);
+
#endif /* __ARCH_CPU_H__ */