]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, ...)
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 3 Oct 2018 18:02:29 +0000 (20:02 +0200)
committerAlexander Graf <agraf@suse.de>
Tue, 16 Oct 2018 14:16:49 +0000 (16:16 +0200)
The first parameter of efi_allocate_pool is a memory type. It cannot be
EFI_ALLOCATE_ANY_PAGES. Use EFI_BOOT_SERVICES_DATA instead.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_boottime.c

index 97eb19cd14d2d3e93685abb08946f8ea073ddae6..fddfeb1a1a1616df8974efed6d656fae6347be68 100644 (file)
@@ -2023,7 +2023,7 @@ static efi_status_t EFIAPI efi_open_protocol_information(
 
        /* Copy entries */
        buffer_size = count * sizeof(struct efi_open_protocol_info_entry);
-       r = efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, buffer_size,
+       r = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, buffer_size,
                              (void **)entry_buffer);
        if (r != EFI_SUCCESS)
                goto out;
@@ -2080,7 +2080,7 @@ static efi_status_t EFIAPI efi_protocols_per_handle(
                size_t j = 0;
 
                buffer_size = sizeof(efi_guid_t *) * *protocol_buffer_count;
-               r = efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, buffer_size,
+               r = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, buffer_size,
                                      (void **)protocol_buffer);
                if (r != EFI_SUCCESS)
                        return EFI_EXIT(r);
@@ -2133,7 +2133,7 @@ static efi_status_t EFIAPI efi_locate_handle_buffer(
                              *buffer);
        if (r != EFI_BUFFER_TOO_SMALL)
                goto out;
-       r = efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, buffer_size,
+       r = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, buffer_size,
                              (void **)buffer);
        if (r != EFI_SUCCESS)
                goto out;