mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-06 08:04:55 +00:00
hv: drop the temperory stack for AP startup
By switching AP wakeup from broadcast to one by one, we could set correct stack for each AP and drop the temp stack used during AP boot. Tracked-On: #2034 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -108,14 +108,11 @@ void bsp_boot_init(void)
|
||||
SWITCH_TO(rsp, bsp_boot_post);
|
||||
}
|
||||
|
||||
static void cpu_secondary_post(void)
|
||||
void init_secondary_cpu(void)
|
||||
{
|
||||
uint16_t pcpu_id;
|
||||
|
||||
/* Release secondary boot spin-lock to allow one of the next CPU(s) to
|
||||
* perform this common initialization
|
||||
*/
|
||||
spinlock_release(&trampoline_spinlock);
|
||||
init_cpu_pre(INVALID_CPU_ID);
|
||||
|
||||
pcpu_id = get_cpu_id();
|
||||
|
||||
@@ -125,18 +122,3 @@ static void cpu_secondary_post(void)
|
||||
|
||||
enter_guest_mode(pcpu_id);
|
||||
}
|
||||
|
||||
/* NOTE: this function is using temp stack, and after SWITCH_TO(runtime_sp, to)
|
||||
* it will switch to runtime stack.
|
||||
*/
|
||||
void cpu_secondary_init(void)
|
||||
{
|
||||
uint64_t rsp;
|
||||
|
||||
init_cpu_pre(INVALID_CPU_ID);
|
||||
|
||||
/* Switch to run-time stack */
|
||||
rsp = (uint64_t)(&get_cpu_var(stack)[CONFIG_STACK_SIZE - 1]);
|
||||
rsp &= ~(CPU_STACK_ALIGN - 1UL);
|
||||
SWITCH_TO(rsp, cpu_secondary_post);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user