From 3bd3ab90f5b92fa7676764fb5dfae7c10d0a2b46 Mon Sep 17 00:00:00 2001 From: Peter Shkenev Date: Sun, 1 Dec 2024 23:32:44 +0300 Subject: [PATCH] efi: pass correct size to SetVirtualAddressMap As per specification, it wants size in bytes, not amount of members. Signed-off-by: Peter Shkenev --- kernel/drivers/firmware/efi/efi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/drivers/firmware/efi/efi.cpp b/kernel/drivers/firmware/efi/efi.cpp index 0034bd20..3cd28bd8 100644 --- a/kernel/drivers/firmware/efi/efi.cpp +++ b/kernel/drivers/firmware/efi/efi.cpp @@ -230,7 +230,7 @@ void efi_init(EFI_SYSTEM_TABLE *system_table, EFI_MEMORY_DESCRIPTOR *descriptors efi_guard g; EFI_STATUS st = g.system_table()->RuntimeServices->SetVirtualAddressMap( - nr_maps, descriptor_size, descriptor_version, map); + nr_maps * descriptor_size, descriptor_size, descriptor_version, map); assert(st == EFI_SUCCESS); }