mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-04-09 13:53:24 +00:00
Provide EFI support for SOS could cause weird issues. For example, hypervisor works based on E820 table whereras it's possible that the memory map from EFI table is not aligned with E820 table. The SOS kernel kaslr will try to find the random address for extracted kernel image in EFI table first. So it's possible that none-RAM in E820 is picked for extracted kernel image. This will make kernel boot fail. This patch removes EFI support for SOS by not passing struct boot_efi_info to SOS kernel zeropage, and reserve a memory to store RSDP table for SOS and pass the RSDP address to SOS kernel zeropage for SOS to locate ACPI table. The patch requires SOS kernel version be high than 4.20, otherwise the kernel might fail to find the RSDP. Tracked-On: #5626 Signed-off-by: Victor Sun <victor.sun@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
54 lines
1.3 KiB
C
54 lines
1.3 KiB
C
/*
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef MULTIBOOT_H
|
|
#define MULTIBOOT_H
|
|
|
|
#include <multiboot_std.h>
|
|
|
|
/* TODO: MAX_MMAP_ENTRIES shall be config by config tool, and same as E820_MAX_ENTRIES */
|
|
#define MAX_MMAP_ENTRIES 32U
|
|
|
|
#define MAX_BOOTARGS_SIZE 2048U
|
|
|
|
/* The modules in multiboot are: Pre-launched VM: kernel/ramdisk/acpi; SOS VM: kernel/ramdisk */
|
|
#define MAX_MODULE_NUM (3U * PRE_VM_NUM + 2U * SOS_VM_NUM)
|
|
|
|
/* The vACPI module size is fixed to 1MB */
|
|
#define ACPI_MODULE_SIZE MEM_1M
|
|
|
|
#ifndef ASSEMBLER
|
|
|
|
#include <vm_configurations.h>
|
|
|
|
struct acrn_multiboot_info {
|
|
uint32_t mi_flags; /* the flags is back-compatible with multiboot1 */
|
|
|
|
const char *mi_cmdline;
|
|
const char *mi_loader_name;
|
|
|
|
uint32_t mi_mods_count;
|
|
const void *mi_mods_va;
|
|
struct multiboot_module mi_mods[MAX_MODULE_NUM];
|
|
|
|
uint32_t mi_drives_length;
|
|
uint32_t mi_drives_addr;
|
|
|
|
uint32_t mi_mmap_entries;
|
|
const void *mi_mmap_va;
|
|
struct multiboot_mmap mi_mmap_entry[MAX_MMAP_ENTRIES];
|
|
|
|
const void *mi_acpi_rsdp_va;
|
|
};
|
|
|
|
void init_acrn_multiboot_info(uint32_t magic, uint32_t info);
|
|
int32_t sanitize_acrn_multiboot_info(uint32_t magic, uint32_t info);
|
|
struct acrn_multiboot_info *get_acrn_multiboot_info(void);
|
|
|
|
#endif /* ASSEMBLER */
|
|
|
|
#endif /* MULTIBOOT_H */
|