hv: cleanup cpu.c and cpu.h

- move all relocatoin code from cpu.c and cpu.h to reloc.c and reloc.h
- no any logic changes

Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Yin fengwei <fengwei.yin@intel.com>
This commit is contained in:
Zide Chen
2018-06-28 14:32:43 -07:00
committed by lijinxia
parent 6c9e451b41
commit 5cb9972919
4 changed files with 91 additions and 92 deletions

View File

@@ -149,26 +149,12 @@
/**********************************/
/* EXTERNAL VARIABLES */
/**********************************/
extern const uint8_t _ld_trampoline_load[];
extern uint8_t _ld_trampoline_start[];
extern uint8_t _ld_trampoline_end[];
extern const uint64_t _ld_trampoline_size;
extern uint8_t _ld_bss_start[];
extern uint8_t _ld_bss_end[];
extern uint8_t trampoline_fixup_cs[];
extern uint8_t trampoline_fixup_ip[];
extern uint8_t trampoline_fixup_target[];
extern uint8_t CPU_Boot_Page_Tables_Start[];
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[];
/* In trampoline range, hold the jump target which trampline will jump to */
extern uint64_t main_entry[1];
extern uint64_t trampoline_start16_paddr;
extern int ibrs_type;
extern spinlock_t trampoline_spinlock;