mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-05 18:25:05 +00:00
HV: fix per-cpu stack relocation in trampoline.c
In write_trampoline_stack_sym(), when do relocation for pcpu's stack, it wrongly adds an offset. As a result, during booting, when non-BSP CPU (APs) tries to run trampoline code once they are waken up by BSP via SIPI, system hangs. Tracked-On: #2349 Signed-off-by: Chaohong guo <chaohong.guo@intel.com> Reviewed-By: Yin Fengwei <fengwei.yin@intel.com> Reviewed-by: Zide Chen <zide.chen@intel.com>
This commit is contained in:
parent
41dd38baf2
commit
8f22a6e89a
@ -45,7 +45,7 @@ void write_trampoline_stack_sym(uint16_t pcpu_id)
|
|||||||
hva = (uint64_t *)(hpa2hva(trampoline_start16_paddr) + trampoline_relo_addr(secondary_cpu_stack));
|
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 = (uint64_t)&per_cpu(stack, pcpu_id)[CONFIG_STACK_SIZE - 1];
|
||||||
*hva = stack_sym_addr + get_hv_image_delta();
|
*hva = stack_sym_addr;
|
||||||
|
|
||||||
clflush(hva);
|
clflush(hva);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user