MdeModulePkg/AcpiTableDxe: use pool allocations when possible
On AArch64 systems, page based allocations for memory types that are relevant to the OS are rounded up to 64 KB multiples. This wastes some space in the ACPI table memory allocator, since it uses page based allocations in order to be able to place the ACPI tables low in memory. Since the latter requirement does not exist on AArch64, switch to pool allocations for all ACPI tables except the root tables if the active allocation policy permits them to be anywhere in memory. The root tables will be handled in a subsequent patch. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
8cadcaa13d
commit
0e0ae47da6
@@ -55,18 +55,21 @@
|
||||
// Link is the linked list data.
|
||||
// Version is the versions of the ACPI tables that this table belongs in.
|
||||
// Table is a pointer to the table.
|
||||
// PageAddress is the address of the pages allocated for the table.
|
||||
// NumberOfPages is the number of pages allocated at PageAddress.
|
||||
// TableSize is the size of the table
|
||||
// Handle is used to identify a particular table.
|
||||
// PoolAllocation carries the allocation type:
|
||||
// FALSE: Table points to EFI_SIZE_TO_PAGES(TableSize) pages allocated using
|
||||
// gBS->AllocatePages ()
|
||||
// TRUE: Table points to TableSize bytes allocated using gBS->AllocatePool ()
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 Signature;
|
||||
LIST_ENTRY Link;
|
||||
EFI_ACPI_TABLE_VERSION Version;
|
||||
EFI_ACPI_COMMON_HEADER *Table;
|
||||
EFI_PHYSICAL_ADDRESS PageAddress;
|
||||
UINTN NumberOfPages;
|
||||
UINTN TableSize;
|
||||
UINTN Handle;
|
||||
BOOLEAN PoolAllocation;
|
||||
} EFI_ACPI_TABLE_LIST;
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user