hv:Move severl variable declaration for boot code

-- add header file ld_sym.h in include/arch/x86/boot/
-- move 'ld_bss_start/end' from cpu.h to ld_sym.h,
   avoid reverse dependency
-- move 'ld_text_end' from mmu.h to ld_sym.h
-- move 'ld_trampoline_load/start/end' to ld_sym.h

Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Mingqiang Chi
2019-01-24 11:22:02 +08:00
committed by Eddie Dong
parent c20d095a63
commit 6825043078
9 changed files with 22 additions and 10 deletions

View File

@@ -12,6 +12,7 @@
#include <e820.h>
#include <cpu_caps.h>
#include <security.h>
#include <ld_sym.h>
struct per_cpu_region per_cpu_data[CONFIG_MAX_PCPU_NUM] __aligned(PAGE_SIZE);
static uint16_t phys_cpu_num = 0U;
@@ -91,8 +92,7 @@ void init_cpu_pre(uint16_t pcpu_id_args)
start_tsc = rdtsc();
/* Clear BSS */
(void)memset(&ld_bss_start, 0U,
(size_t)(&ld_bss_end - &ld_bss_start));
(void)memset(&ld_bss_start, 0U, (size_t)(&ld_bss_end - &ld_bss_start));
/* Get CPU capabilities thru CPUID, including the physical address bit
* limit which is required for initializing paging.

View File

@@ -30,6 +30,7 @@
#include <hypervisor.h>
#include <reloc.h>
#include <e820.h>
#include <ld_sym.h>
static void *ppt_mmu_pml4_addr;
static uint8_t sanitized_page[PAGE_SIZE] __aligned(PAGE_SIZE);

View File

@@ -8,6 +8,7 @@
#include <trampoline.h>
#include <vm0_boot.h>
#include <e820.h>
#include <ld_sym.h>
static uint64_t trampoline_start16_paddr;