summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-08-23 19:44:12 +0300
committerTom Rini <trini@konsulko.com>2021-08-23 19:44:12 +0300
commit4865db07169126ca0205f1a6265adf01bd69b3df (patch)
tree0e655eaf50b9edc572509c8feea58b2401fc01f9 /lib
parent18f4e858762d3fc858c1a076616208aa4ab6c9be (diff)
parent9a4b3c8e914dbb9d06640d8e04db8a06dedca051 (diff)
downloadu-boot-4865db07169126ca0205f1a6265adf01bd69b3df.tar.xz
Merge tag 'efi-2021-10-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2021-10-rc3 Documentation: * Rename Freescale to NXP * Document structures used for the UEFI TCG2 protocol UEFI: * Device paths must use EfiBootServicesData
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_device_path.c2
-rw-r--r--lib/efi_loader/efi_device_path_to_text.c2
-rw-r--r--lib/efi_loader/efi_memory.c5
3 files changed, 5 insertions, 4 deletions
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;
diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
index d46327a1c9..57fa9d97f7 100644
--- a/lib/efi_loader/efi_device_path_to_text.c
+++ b/lib/efi_loader/efi_device_path_to_text.c
@@ -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;
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index be2f655dff..f4acbee4f9 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -454,7 +454,8 @@ static uint64_t efi_find_free_memory(uint64_t len, uint64_t max_addr)
* @memory allocated memory
* @return status code
*/
-efi_status_t efi_allocate_pages(int type, int memory_type,
+efi_status_t efi_allocate_pages(enum efi_allocate_type type,
+ enum efi_memory_type memory_type,
efi_uintn_t pages, uint64_t *memory)
{
u64 len = pages << EFI_PAGE_SHIFT;
@@ -556,7 +557,7 @@ efi_status_t efi_free_pages(uint64_t memory, efi_uintn_t pages)
* @buffer: allocated memory
* Return: status code
*/
-efi_status_t efi_allocate_pool(int pool_type, efi_uintn_t size, void **buffer)
+efi_status_t efi_allocate_pool(enum efi_memory_type pool_type, efi_uintn_t size, void **buffer)
{
efi_status_t r;
u64 addr;