HV: modularization improve UEFI macro control code

1. in UEFI bsp code, not need UEFI macro; it is controlled in makefile.
2. in vm/acpi/interrupt code, unify the API name for SBL & UEFI.
3. remove unnecessary header including and unused code.

Tracked-On: #1842
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Minggui Cao
2019-01-24 14:03:23 +08:00
committed by wenlingz
parent 2a25f4e9fc
commit 723ff1f4ee
17 changed files with 43 additions and 66 deletions

View File

@@ -5,7 +5,6 @@
*/
#include <hypervisor.h>
#include <bsp_extern.h>
#include <multiboot.h>
#include <reloc.h>
#include <e820.h>

View File

@@ -6,7 +6,6 @@
#include <hypervisor.h>
#include <schedule.h>
#include <vm0_boot.h>
#include <security.h>
#include <virtual_cr.h>

View File

@@ -9,7 +9,6 @@
#include <multiboot.h>
#include <e820.h>
#include <vtd.h>
#include <vm0_boot.h>
vm_sw_loader_t vm_sw_loader;
@@ -142,11 +141,7 @@ int32_t create_vm(uint16_t vm_id, struct acrn_vm_config *vm_config, struct acrn_
rebuild_sos_vm_e820();
prepare_sos_vm_memmap(vm);
#ifndef CONFIG_EFI_STUB
status = init_vm_boot_info(vm);
#else
status = efi_boot_init();
#endif
if (status == 0) {
init_iommu_sos_vm_domain(vm);
} else {

View File

@@ -468,7 +468,6 @@ void interrupt_init(uint16_t pcpu_id)
set_idt(idtd);
init_lapic(pcpu_id);
init_default_irqs(pcpu_id);
#ifndef CONFIG_EFI_STUB
CPU_IRQ_ENABLE();
#endif
bsp_init_irq();
}

View File

@@ -6,7 +6,6 @@
#include <hypervisor.h>
#include <reloc.h>
#include <trampoline.h>
#include <vm0_boot.h>
#include <e820.h>
#include <ld_sym.h>
@@ -108,11 +107,7 @@ uint64_t prepare_trampoline(void)
uint64_t size, dest_pa, i;
size = (uint64_t)(&ld_trampoline_end - &ld_trampoline_start);
#ifndef CONFIG_EFI_STUB
dest_pa = e820_alloc_low_memory(CONFIG_LOW_RAM_SIZE);
#else
dest_pa = (uint64_t)get_ap_trampoline_buf();
#endif
dest_pa = bsp_get_ap_trampoline();
pr_dbg("trampoline code: %llx size %x", dest_pa, size);

View File

@@ -7,7 +7,6 @@
*/
#include <hypervisor.h>
#include <vm0_boot.h>
#include <cpu.h>
/**