mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-04-30 04:33:58 +00:00
In previous implementation we leave MAX_EFI_MMAP_ENTRIES in config tool and let end user to configure it. However it is hard for end user to understand how to configure it, also it is hard for board_inspector to get this value automatically because this info is only meaningful during the kernel boot stage and there is no such info available after boot in Linux toolset. This patch hardcode the value to 350, and ASSERT if the board need more efi mmap entries to run ACRN. User could modify the MAX_EFI_MMAP_ENTRIES macro in case ASSERT occurs in DEBUG stage. The More size of hv_memdesc[] only consume very little memory, the overhead is (size * sizeof(struct efi_memory_desc)), i.e. (size * 40) in bytes. Tracked-On: #6442 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@Intel.com>
19 lines
350 B
C
19 lines
350 B
C
/*
|
|
* Copyright (C) 2021 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef EFI_MMAP_H
|
|
#define EFI_MMAP_H
|
|
#include <types.h>
|
|
|
|
#define MAX_EFI_MMAP_ENTRIES 350U
|
|
|
|
void init_efi_mmap_entries(struct efi_info *uefi_info);
|
|
|
|
uint32_t get_efi_mmap_entries_count(void);
|
|
const struct efi_memory_desc *get_efi_mmap_entry(void);
|
|
|
|
#endif
|