diff mbox series

[1/1] efi_loader: ACPI tables must be in EfiACPIReclaimMemory

Message ID 20210221092121.26460-1-xypron.glpk@gmx.de
State New
Delegated to: Heinrich Schuchardt
Headers show
Series [1/1] efi_loader: ACPI tables must be in EfiACPIReclaimMemory | expand

Commit Message

Heinrich Schuchardt Feb. 21, 2021, 9:21 a.m. UTC
The UEFI spec does not allow ACPI tables to be in runtime services memory.
It recommends EfiACPIReclaimMemory.

Remove a superfluous check that the allocated pages are 16 byte aligned.
EFI pages are 4 KiB aligned.

Fixes: 86df34d42b05 ("efi_loader: Install ACPI configuration tables")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 lib/efi_loader/efi_acpi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--
2.30.0
diff mbox series

Patch

diff --git a/lib/efi_loader/efi_acpi.c b/lib/efi_loader/efi_acpi.c
index 585b2d2b63..a62c34009c 100644
--- a/lib/efi_loader/efi_acpi.c
+++ b/lib/efi_loader/efi_acpi.c
@@ -25,7 +25,7 @@  efi_status_t efi_acpi_register(void)

 	/* Reserve 64kiB page for ACPI */
 	ret = efi_allocate_pages(EFI_ALLOCATE_MAX_ADDRESS,
-				 EFI_RUNTIME_SERVICES_DATA, 16, &acpi);
+				 EFI_ACPI_RECLAIM_MEMORY, 16, &acpi);
 	if (ret != EFI_SUCCESS)
 		return ret;

@@ -34,7 +34,6 @@  efi_status_t efi_acpi_register(void)
 	 * a 4k-aligned address, so it is safe to assume that
 	 * write_acpi_tables() will write the table at that address.
 	 */
-	assert(!(acpi & 0xf));
 	write_acpi_tables(acpi);

 	/* And expose them to our EFI payload */