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:
Yin Fengwei
2018-12-11 17:46:02 +08:00
committed by wenlingz
parent 74849cd983
commit 69dc939243
9 changed files with 48 additions and 85 deletions

View File

@@ -207,9 +207,9 @@ extern uint8_t ld_bss_end;
/* In trampoline range, hold the jump target which trampline will jump to */
extern uint64_t main_entry[1];
extern uint64_t secondary_cpu_stack[1];
extern int32_t ibrs_type;
extern spinlock_t trampoline_spinlock;
/*
* To support per_cpu access, we use a special struct "per_cpu_region" to hold

View File

@@ -9,6 +9,6 @@
#define SP_BOTTOM_MAGIC 0x696e746cUL
void bsp_boot_init(void);
void cpu_secondary_init(void);
void init_secondary_cpu(void);
#endif /* INIT_H*/

View File

@@ -8,6 +8,7 @@
extern uint64_t read_trampoline_sym(const void *sym);
extern void write_trampoline_sym(const void *sym, uint64_t val);
extern void write_trampoline_stack_sym(uint16_t pcpu_id);
extern uint64_t prepare_trampoline(void);
/* external symbols that are helpful for relocation */
@@ -22,7 +23,6 @@ extern uint8_t cpu_boot_page_tables_ptr;
extern uint8_t trampoline_pdpt_addr;
extern uint8_t trampoline_gdt_ptr;
extern uint8_t trampoline_start64_fixup;
extern uint8_t trampoline_spinlock_ptr;
extern uint64_t trampoline_start16_paddr;