[PATCH 4/5] efi_loader: use EfiBootServicesData for device path

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Tue Aug 17 18:02:24 CEST 2021


dp_alloc() was using a constant from the wrong enum resulting in creating
device paths in EfiReservedMemory.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 lib/efi_loader/efi_device_path.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 9c3ac712fe..cbdb466da4 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -68,7 +68,7 @@ static void *dp_alloc(size_t sz)
 {
 	void *buf;
 
-	if (efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, sz, &buf) !=
+	if (efi_allocate_pool(EFI_BOOT_SERVICES_DATA, sz, &buf) !=
 	    EFI_SUCCESS) {
 		debug("EFI: ERROR: out of memory in %s\n", __func__);
 		return NULL;
-- 
2.30.2



More information about the U-Boot mailing list