diff options
author | Aaron Durbin <adurbin@chromium.org> | 2014-10-28 17:01:28 -0500 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-09 14:40:06 +0200 |
commit | 03c657f288a908691b0b0c07fc3ff3d0ec3612fb (patch) | |
tree | 563af55ded80952270e485cc671876b36120c78c /src/arch/arm64/include/armv8 | |
parent | 32005aa9587db57e2ddaf5dfcbe6280f6c876580 (diff) | |
download | coreboot-03c657f288a908691b0b0c07fc3ff3d0ec3612fb.tar.xz |
arm64: add mpidr field to cpu_info struct
The cpu_info struct can be easily obtained at runtime
based on smp_processor_id(). To allow easier mapping
between cpu_info and PSCI entities add the mpidr info
to the cpu_info struct.
BUG=chrome-os-partner:32136
BRANCH=None
TEST=Built and booted in SMP. Noted MPIDR messages for each cpu.
Change-Id: I390392a391d953a3b144b56b42e7b81f90d5fec1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: d091706f64f1fc4b1b72b1825cab82a5d3cbf23e
Original-Change-Id: Ib10ee4413d467b22050edec5388c0cae57128911
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/226481
Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: http://review.coreboot.org/9388
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/arch/arm64/include/armv8')
-rw-r--r-- | src/arch/arm64/include/armv8/arch/cpu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/arch/arm64/include/armv8/arch/cpu.h b/src/arch/arm64/include/armv8/arch/cpu.h index fc31903f52..d4ff907495 100644 --- a/src/arch/arm64/include/armv8/arch/cpu.h +++ b/src/arch/arm64/include/armv8/arch/cpu.h @@ -24,6 +24,7 @@ #if !defined(__PRE_RAM__) #include <arch/barrier.h> +#include <arch/mpidr.h> #include <device/device.h> enum { @@ -62,6 +63,7 @@ struct cpu_info { unsigned int online; /* Current assumption is that id matches smp_processor_id(). */ unsigned int id; + uint64_t mpidr; }; /* Obtain cpu_info for current executing CPU. */ @@ -93,6 +95,7 @@ static inline int cpu_online(struct cpu_info *ci) static inline void cpu_mark_online(struct cpu_info *ci) { + ci->mpidr = read_affinity_mpidr(); store_release(&ci->online, 1); } |