From af46e80b0ecbd82c3492045061dd552a0e9c5a66 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 27 Aug 2014 10:26:15 -0500 Subject: 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 Original-Commit-Id: 6033e73d70c3b8296b36ff36b4b848b176917e12 Original-Change-Id: I9511b54b5a1ab340b0f1309b0d9976be68b50903 Original-Signed-off-by: Aaron Durbin Original-Reviewed-on: https://chromium-review.googlesource.com/214663 Original-Reviewed-by: Furquan Shaikh Reviewed-on: http://review.coreboot.org/9007 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/arch/arm64/include/armv8/arch/cpu.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/arch') 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__ */ -- cgit v1.2.3