mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 15:45:05 +00:00
HV: init mmap info with multiboot2
Initialize mmap info of acrn mbi when boot from multiboot2 protocol, with this patch acrn hv could boot from multiboot2; Tracked-On: #4419 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
#define BOOT_H_
|
||||
|
||||
#include <multiboot.h>
|
||||
#ifdef CONFIG_MULTIBOOT2
|
||||
#include <multiboot2.h>
|
||||
#endif
|
||||
#include <e820.h>
|
||||
|
||||
#define MAX_BOOTARGS_SIZE 2048U
|
||||
@@ -37,6 +40,15 @@ static inline bool boot_from_multiboot1(void)
|
||||
return ((boot_regs[0] == MULTIBOOT_INFO_MAGIC) && (boot_regs[1] != 0U));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MULTIBOOT2
|
||||
static inline bool boot_from_multiboot2(void)
|
||||
{
|
||||
return ((boot_regs[0] == MULTIBOOT2_INFO_MAGIC) && (boot_regs[1] != 0U));
|
||||
}
|
||||
|
||||
int32_t multiboot2_to_acrn_mbi(struct acrn_multiboot_info *mbi, void *mb2_info);
|
||||
#endif
|
||||
|
||||
struct acrn_multiboot_info *get_multiboot_info(void);
|
||||
int32_t sanitize_multiboot_info(void);
|
||||
void parse_hv_cmdline(void);
|
||||
|
||||
Reference in New Issue
Block a user