[U-Boot] [PATCH v2 4/7] efi_loader: Update efi_allocate_pages() to new efi_add_memory_map()

Bryan O'Donoghue pure.logic at nexus-software.ie
Sun Jul 14 22:29:28 UTC 2019


efi_add_memory_map() now returns efi_status_t not the passed uint64_t
address on success. We need to capture that change in efi_allocate_pages().

Signed-off-by: Bryan O'Donoghue <pure.logic at nexus-software.ie>
---
 lib/efi_loader/efi_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index c1d7b88997..4ce3dd8f8c 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -455,7 +455,7 @@ efi_status_t efi_allocate_pages(int type, int memory_type,
 	}
 
 	/* Reserve that map in our memory maps */
-	if (efi_add_memory_map(addr, pages, memory_type, true) != addr)
+	if (efi_add_memory_map(addr, pages, memory_type, true) != EFI_SUCCESS)
 		/* Map would overlap, bail out */
 		return  EFI_OUT_OF_RESOURCES;
 
-- 
2.22.0



More information about the U-Boot mailing list