make sure secondary CPU's stack is aligned with CPU STACK

secondary CPU's stack should be aligned with 16

Tracked-On: #2410
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Jason Chen CJ 2019-01-24 19:28:39 +08:00 committed by wenlingz
parent ee066a7f1c
commit c233bf54a2

View File

@ -45,6 +45,7 @@ void write_trampoline_stack_sym(uint16_t pcpu_id)
hva = (uint64_t *)(hpa2hva(trampoline_start16_paddr) + trampoline_relo_addr(secondary_cpu_stack));
stack_sym_addr = (uint64_t)&per_cpu(stack, pcpu_id)[CONFIG_STACK_SIZE - 1];
stack_sym_addr &= ~(CPU_STACK_ALIGN - 1UL);
*hva = stack_sym_addr;
clflush(hva);