mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +00:00
hv: modularization: change of multiboot API.
The init_multiboot_info() and sanitize_multiboot_ifno() APIs now require parameters instead of implicitly relying on global boot variables. Tracked-On: #5661 Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <types.h>
|
||||
#include <errno.h>
|
||||
#include <boot.h>
|
||||
#include <multiboot.h>
|
||||
#include <pgtable.h>
|
||||
#include "multiboot_priv.h"
|
||||
@@ -37,10 +36,11 @@ static void mb2_mods_to_mbi(struct acrn_multiboot_info *mbi,
|
||||
/**
|
||||
* @pre mbi != NULL && mb2_tag_efi64 != 0
|
||||
*/
|
||||
static void mb2_efi64_to_mbi(struct acrn_multiboot_info *mbi, const struct multiboot2_tag_efi64 *mb2_tag_efi64)
|
||||
static void mb2_efi64_to_mbi(struct acrn_multiboot_info *mbi, const struct multiboot2_tag_efi64 *mb2_tag_efi64,
|
||||
char *sig)
|
||||
{
|
||||
mbi->mi_efi_info.efi_systab = (uint32_t)(uint64_t)mb2_tag_efi64->pointer;
|
||||
mbi->mi_efi_info.efi_loader_signature = (uint32_t)(uint64_t)efiloader_sig;
|
||||
mbi->mi_efi_info.efi_loader_signature = (uint32_t)(uint64_t)sig;
|
||||
mbi->mi_flags |= MULTIBOOT_INFO_HAS_EFI64;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ static void mb2_efimmap_to_mbi(struct acrn_multiboot_info *mbi,
|
||||
/**
|
||||
* @pre mbi != NULL
|
||||
*/
|
||||
int32_t multiboot2_to_acrn_mbi(struct acrn_multiboot_info *mbi, void *mb2_info)
|
||||
int32_t multiboot2_to_acrn_mbi(struct acrn_multiboot_info *mbi, void *mb2_info, char *sig)
|
||||
{
|
||||
int32_t ret = 0;
|
||||
struct multiboot2_tag *mb2_tag, *mb2_tag_end;
|
||||
@@ -92,7 +92,7 @@ int32_t multiboot2_to_acrn_mbi(struct acrn_multiboot_info *mbi, void *mb2_info)
|
||||
mbi->mi_acpi_rsdp_va = ((struct multiboot2_tag_new_acpi *)mb2_tag)->rsdp;
|
||||
break;
|
||||
case MULTIBOOT2_TAG_TYPE_EFI64:
|
||||
mb2_efi64_to_mbi(mbi, (const struct multiboot2_tag_efi64 *)mb2_tag);
|
||||
mb2_efi64_to_mbi(mbi, (const struct multiboot2_tag_efi64 *)mb2_tag, sig);
|
||||
break;
|
||||
case MULTIBOOT2_TAG_TYPE_EFI_MMAP:
|
||||
mb2_efimmap_to_mbi(mbi, (const struct multiboot2_tag_efi_mmap *)mb2_tag);
|
||||
|
||||
Reference in New Issue
Block a user