summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/arm64/cpu.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/arch/arm64/cpu.c b/src/arch/arm64/cpu.c
index f90c759559..e3bc19d163 100644
--- a/src/arch/arm64/cpu.c
+++ b/src/arch/arm64/cpu.c
@@ -30,13 +30,9 @@
#include <stdlib.h>
#include <arch/cpu.h>
-/* Return the cpu struct which is at the high memory address of the stack.
- */
+static struct cpu_info cpu_infos[CONFIG_MAX_CPUS];
+
struct cpu_info *cpu_info(void)
{
- uintptr_t addr = ALIGN((uintptr_t)__builtin_frame_address(0),
- CONFIG_STACK_SIZE);
- addr -= sizeof(struct cpu_info);
- return (void *)addr;
+ return &cpu_infos[smp_processor_id()];
}
-