[PATCH v2 4/5] efi: Use efi_mem_reserve() to reserve the memory attribute table

From: Ard Biesheuvel

Date: Wed Apr 01 2026 - 08:24:55 EST


From: Ard Biesheuvel <ardb@xxxxxxxxxx>

Use efi_mem_reserve() rather than memblock_reserve() to reserve the EFI
memory attributes table. This is needed on x86, where memblock_reserve()
is not sufficient for assets that may be placed in EFI boot services
data memory.

Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
---
drivers/firmware/efi/memattr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/memattr.c b/drivers/firmware/efi/memattr.c
index b83f1c5a9164..785b7fc687fe 100644
--- a/drivers/firmware/efi/memattr.c
+++ b/drivers/firmware/efi/memattr.c
@@ -75,7 +75,7 @@ void __init efi_memattr_init(void)
}

tbl_size = sizeof(*tbl) + tbl->num_entries * tbl->desc_size;
- memblock_reserve(efi_mem_attr_table, tbl_size);
+ efi_mem_reserve(efi_mem_attr_table, tbl_size);
set_bit(EFI_MEM_ATTR, &efi.flags);

unmap:
--
2.53.0.1118.gaef5881109-goog