]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: use EfiBootServicesData for DP to text
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 17 Aug 2021 14:15:34 +0000 (16:15 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 17 Aug 2021 15:24:08 +0000 (17:24 +0200)
Memory allocated in the implementation of the
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL must be of type EfiBootServicesData.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_device_path_to_text.c

index d46327a1c94e626c4f86269153d6902a977f246b..57fa9d97f712a27a97b5e9db01641407170badfe 100644 (file)
@@ -34,7 +34,7 @@ static u16 *efi_str_to_u16(char *str)
        efi_status_t ret;
 
        len = sizeof(u16) * (utf8_utf16_strlen(str) + 1);
-       ret = efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, len, (void **)&out);
+       ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, len, (void **)&out);
        if (ret != EFI_SUCCESS)
                return NULL;
        dst = out;