smp: Align secondary_stacks & export to header

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-09-15 21:59:50 +09:00
parent aa11841808
commit 571a19c9a3
2 changed files with 5 additions and 3 deletions

View file

@ -8,8 +8,6 @@
#define CPU_START_OFF 0x54000
#define SECONDARY_STACK_SIZE 0x4000
struct spin_table {
u64 mpidr;
u64 flag;
@ -20,7 +18,7 @@ struct spin_table {
void *_reset_stack;
static u8 secondary_stacks[MAX_CPUS][SECONDARY_STACK_SIZE] ALIGNED(64);
u8 secondary_stacks[MAX_CPUS][SECONDARY_STACK_SIZE] ALIGNED(0x4000);
static int target_cpu;
static struct spin_table spin_table[MAX_CPUS];

View file

@ -4,9 +4,13 @@
#define __SMP_H__
#include "types.h"
#include "utils.h"
#define MAX_CPUS 8
#define SECONDARY_STACK_SIZE 0x10000
extern u8 secondary_stacks[MAX_CPUS][SECONDARY_STACK_SIZE];
void smp_secondary_entry(void);
void smp_start_secondaries(void);