mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
hv: remove de-privilege boot mode support and remove vboot wrappers
Now ACRN supports direct boot mode, which could be SBL/ABL, or GRUB boot. Thus the vboot wrapper layer can be removed and the direct boot functions don't need to be wrapped in direct_boot.c: - remove call to init_vboot(), and call e820_alloc_memory() directly at the time when the trampoline buffer is actually needed. - Similarly, call CPU_IRQ_ENABLE() instead of the wrapper init_vboot_irq(). - remove get_ap_trampoline_buf(), since the existing function get_trampoline_start16_paddr() returns the exact same value. - merge init_general_vm_boot_info() into init_vm_boot_info(). - remove vm_sw_loader pointer, and call direct_boot_sw_loader() directly. - move get_rsdp_ptr() from vboot_wrapper.c to multiboot.c, and remove the wrapper over two boot modes. Tracked-On: #5197 Signed-off-by: Zide Chen <zide.chen@intel.com>
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#include <mmu.h>
|
||||
#include <logmsg.h>
|
||||
#include <vboot_info.h>
|
||||
#include <vboot.h>
|
||||
#include <board.h>
|
||||
#include <sgx.h>
|
||||
#include <sbuf.h>
|
||||
@@ -33,11 +32,10 @@
|
||||
#include <vacpi.h>
|
||||
#include <platform_caps.h>
|
||||
#include <mmio_dev.h>
|
||||
#include <trampoline.h>
|
||||
#include <assign.h>
|
||||
#include <vgpio.h>
|
||||
|
||||
vm_sw_loader_t vm_sw_loader;
|
||||
|
||||
/* Local variables */
|
||||
|
||||
static struct acrn_vm vm_array[CONFIG_MAX_VM_NUM] __aligned(PAGE_SIZE);
|
||||
@@ -349,12 +347,9 @@ static void prepare_sos_vm_memmap(struct acrn_vm *vm)
|
||||
}
|
||||
|
||||
/* unmap AP trampoline code for security
|
||||
* 'allocate_pages()' in depri boot mode or
|
||||
* 'e820_alloc_memory()' in direct boot
|
||||
* mode will ensure the base address of tramploline
|
||||
* code be page-aligned.
|
||||
* This buffer is guaranteed to be page aligned.
|
||||
*/
|
||||
ept_del_mr(vm, pml4_page, get_ap_trampoline_buf(), CONFIG_LOW_RAM_SIZE);
|
||||
ept_del_mr(vm, pml4_page, get_trampoline_start16_paddr(), CONFIG_LOW_RAM_SIZE);
|
||||
|
||||
/* unmap PCIe MMCONFIG region since it's owned by hypervisor */
|
||||
pci_mmcfg = get_mmcfg_region();
|
||||
|
Reference in New Issue
Block a user