mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 02:08:04 +00:00
HV: modularization to refine boot/bsp related code.
1. add static for local functions and variables. 2. move vm_sw_loader from vcpu to vm 3. refine uefi.c to follow the code rules. 4. separate uefi.c for vm0 boot and bsp two parts. bsp layer just access native HW related, can't access vm/vcpu, vm0 boot part can access vm / vcpu data structure. 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:
@@ -9,8 +9,6 @@
|
||||
#include <vm0_boot.h>
|
||||
#include <security.h>
|
||||
|
||||
vm_sw_loader_t vm_sw_loader;
|
||||
|
||||
inline uint64_t vcpu_get_gpreg(const struct acrn_vcpu *vcpu, uint32_t reg)
|
||||
{
|
||||
const struct run_context *ctx =
|
||||
|
@@ -9,6 +9,9 @@
|
||||
#include <multiboot.h>
|
||||
#include <e820.h>
|
||||
#include <vtd.h>
|
||||
#include <vm0_boot.h>
|
||||
|
||||
vm_sw_loader_t vm_sw_loader;
|
||||
|
||||
/* Local variables */
|
||||
|
||||
@@ -101,6 +104,8 @@ int32_t create_vm(struct vm_description *vm_desc, struct acrn_vm **rtn_vm)
|
||||
|
||||
#ifndef CONFIG_EFI_STUB
|
||||
status = init_vm_boot_info(vm);
|
||||
#else
|
||||
status = efi_boot_init();
|
||||
#endif
|
||||
if (status == 0) {
|
||||
init_iommu_vm0_domain(vm);
|
||||
|
Reference in New Issue
Block a user