mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 00:38:28 +00:00
hv: a few fixes for multiboot2 boot
- need to specify the load_addr in the multiboot2 address tag. GRUB needs it to correctly calculate the ACRN binary's load size if load_end_addr is a non-zero value. - multiboot2 can be enabled if hypervisor relocation is disabled. - print the name of the boot loader. This might be helpful if the boot loader, e.g. GRUB, inludes its version in the name string. Tracked-On: #4441 Signed-off-by: Victor Sun <victor.sun@intel.com> Signed-off-by: Zide Chen <zide.chen@intel.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
@@ -42,6 +42,7 @@ void init_vboot(void)
|
||||
{"PXELINUX", DIRECT_BOOT_MODE},
|
||||
};
|
||||
|
||||
printf("Detect bootloader: %s\n", mbi->mi_loader_name);
|
||||
for (i = 0U; i < BOOTLOADER_NUM; i++) {
|
||||
if (strncmp(mbi->mi_loader_name, vboot_bootloader_maps[i].bootloader_name,
|
||||
strnlen_s(vboot_bootloader_maps[i].bootloader_name, BOOTLOADER_NAME_SIZE)) == 0) {
|
||||
|
@@ -68,6 +68,10 @@ int32_t sanitize_multiboot_info(void)
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
if (acrn_mbi.mi_loader_name[0] == '\0') {
|
||||
pr_err("no bootloader name found!");
|
||||
ret = -EINVAL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user