mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
HV: enable multiboot module string as kernel bootargs
Previously the VM kernel bootargs for pre-launched VMs and direct boot mode of SOS VM are built-in hypervisor binary so end users have no way to change it. Now we provide another option that the multiboot module string could be used as bootargs also. This would bring convenience to end users when they use GRUB as bootloader because the bootargs could be configurable in GRUB menu. The usage is if there is any string follows configured kernel_mod_tag in module string, the string will be used as new kernel bootargs instead of built-in kernel bootargs. If there is no string follows kernel_mod_tag, then the built-in bootargs will be the default kernel bootargs. Please note kernel_mod_tag must be the first word in module string in any case, it is used to specify the module for which VM. Tracked-On: #4885 Signed-off-by: Victor Sun <victor.sun@intel.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -13,9 +13,11 @@
|
||||
#endif
|
||||
#include <e820.h>
|
||||
#include <zeropage.h>
|
||||
#include <vm_configurations.h>
|
||||
|
||||
#define MAX_BOOTARGS_SIZE 2048U
|
||||
#define MAX_MODULE_COUNT 4U
|
||||
/* The modules in multiboot are for kernel and ramdisk of pre-launched VMs and SOS VM */
|
||||
#define MAX_MODULE_NUM (2U * PRE_VM_NUM + 2U * SOS_VM_NUM)
|
||||
|
||||
/* extended flags for acrn multiboot info from multiboot2 */
|
||||
#define MULTIBOOT_INFO_HAS_EFI_MMAP 0x00010000U
|
||||
@@ -29,7 +31,7 @@ struct acrn_multiboot_info {
|
||||
|
||||
uint32_t mi_mods_count;
|
||||
const void *mi_mods_va;
|
||||
struct multiboot_module mi_mods[MAX_MODULE_COUNT];
|
||||
struct multiboot_module mi_mods[MAX_MODULE_NUM];
|
||||
|
||||
uint32_t mi_drives_length;
|
||||
uint32_t mi_drives_addr;
|
||||
|
Reference in New Issue
Block a user