mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 16:57:20 +00:00
config_tools: add a new entry MAX_EFI_MMAP_ENTRIES
It is used to specify the maximum number of EFI memmap entries. On some platforms, like Tiger Lake, the number of EFI memmap entries becomes 268 when the BIOS settings are changed. The current value of MAX_EFI_MMAP_ENTRIES (256) defined in hypervisor is not big enough to cover such cases. As the number of EFI memmap entries depends on the platforms and the BIOS settings, this patch introduces a new entry MAX_EFI_MMAP_ENTRIES in configurations so that it can be adjusted for different cases. Tracked-On: #6442 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#include <logmsg.h>
|
||||
|
||||
static uint16_t hv_memdesc_nr;
|
||||
static struct efi_memory_desc hv_memdesc[MAX_EFI_MMAP_ENTRIES];
|
||||
static struct efi_memory_desc hv_memdesc[CONFIG_MAX_EFI_MMAP_ENTRIES];
|
||||
|
||||
static void sort_efi_mmap_entries(void)
|
||||
{
|
||||
@@ -37,8 +37,8 @@ void init_efi_mmap_entries(struct efi_info *uefi_info)
|
||||
uint32_t entry = 0U;
|
||||
|
||||
while ((void *)efi_memdesc < (efi_memmap + uefi_info->memmap_size)) {
|
||||
if (entry >= MAX_EFI_MMAP_ENTRIES) {
|
||||
pr_err("Too many efi memmap entries, entries up %d are ignored.", MAX_EFI_MMAP_ENTRIES);
|
||||
if (entry >= CONFIG_MAX_EFI_MMAP_ENTRIES) {
|
||||
pr_err("Too many efi memmap entries, entries up %d are ignored.", CONFIG_MAX_EFI_MMAP_ENTRIES);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -8,8 +8,6 @@
|
||||
#define EFI_MMAP_H
|
||||
#include <types.h>
|
||||
|
||||
#define MAX_EFI_MMAP_ENTRIES 256U
|
||||
|
||||
void init_efi_mmap_entries(struct efi_info *uefi_info);
|
||||
|
||||
uint32_t get_efi_mmap_entries_count(void);
|
||||
|
Reference in New Issue
Block a user