soc/intel_adsp: Use the correct MP stack pointer
The kernel passes the CPU's interrupt stack expected that it will start on that, so do it. Pass the initial stack pointer from the SOC layer in the variable "z_mp_stack_top" and set it in the assembly startup before calling z_mp_entry(). Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
14d008775a
commit
613594e68c
2 changed files with 10 additions and 3 deletions
|
@ -61,13 +61,14 @@ struct cpustart_rec {
|
|||
uint32_t cpu;
|
||||
|
||||
arch_cpustart_t fn;
|
||||
char *stack_top;
|
||||
void *arg;
|
||||
uint32_t vecbase;
|
||||
|
||||
uint32_t alive;
|
||||
};
|
||||
|
||||
char *z_mp_stack_top;
|
||||
|
||||
#ifdef CONFIG_KERNEL_COHERENCE
|
||||
/* Coherence guarantees that normal .data will be coherent and that it
|
||||
* won't overlap any cached memory.
|
||||
|
@ -158,11 +159,12 @@ void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
|
|||
|
||||
start_rec.cpu = cpu_num;
|
||||
start_rec.fn = fn;
|
||||
start_rec.stack_top = Z_THREAD_STACK_BUFFER(stack) + sz;
|
||||
start_rec.arg = arg;
|
||||
start_rec.vecbase = vecbase;
|
||||
start_rec.alive = 0;
|
||||
|
||||
z_mp_stack_top = Z_THREAD_STACK_BUFFER(stack) + sz;
|
||||
|
||||
#ifdef CONFIG_IPM_CAVS_IDC
|
||||
idc = device_get_binding(DT_LABEL(DT_INST(0, intel_cavs_idc)));
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue