mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
HV: add acpi module support for pre-launched VM
Previously we use a pre-defined structure as vACPI table for pre-launched VM, the structure is initialized by HV code. Now change the method to use a pre-loaded multiboot module instead. The module file will be generated by acrn-config tool and loaded to GPA 0x7ff00000, a hardcoded RSDP table at GPA 0x000f2400 will point to the XSDT table which at GPA 0x7ff00080; Tracked-On: #5266 Signed-off-by: Victor Sun <victor.sun@intel.com> Signed-off-by: Shuang Zheng <shuang.zheng@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -187,6 +187,7 @@ int32_t direct_boot_sw_loader(struct acrn_vm *vm)
|
||||
struct sw_kernel_info *sw_kernel = &(vm->sw.kernel_info);
|
||||
struct sw_module_info *bootargs_info = &(vm->sw.bootargs_info);
|
||||
struct sw_module_info *ramdisk_info = &(vm->sw.ramdisk_info);
|
||||
struct sw_module_info *acpi_info = &(vm->sw.acpi_info);
|
||||
/* get primary vcpu */
|
||||
struct acrn_vcpu *vcpu = vcpu_from_vid(vm, BSP_CPU_ID);
|
||||
|
||||
@@ -216,6 +217,10 @@ int32_t direct_boot_sw_loader(struct acrn_vm *vm)
|
||||
(uint64_t)bootargs_info->load_addr,
|
||||
(strnlen_s((char *)bootargs_info->src_addr, MAX_BOOTARGS_SIZE) + 1U));
|
||||
}
|
||||
/* Copy Guest OS ACPI to its load location */
|
||||
if (acpi_info->size == ACPI_MODULE_SIZE) {
|
||||
(void)copy_to_gpa(vm, acpi_info->src_addr, (uint64_t)acpi_info->load_addr, ACPI_MODULE_SIZE);
|
||||
}
|
||||
switch (vm->sw.kernel_type) {
|
||||
case KERNEL_BZIMAGE:
|
||||
prepare_loading_bzimage(vm, vcpu);
|
||||
|
Reference in New Issue
Block a user