aboutsummaryrefslogtreecommitdiff
path: root/include/efi_loader.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2021-08-17 15:05:31 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2021-08-17 17:24:08 +0200
commit49d225e7bf3a26adfe6093978c04e454c82bd955 (patch)
tree0147c9de5eb3ac88a38deafdad07509eed59bd21 /include/efi_loader.h
parentc91737b7f1a5180b8944eea2121347ef6429b17c (diff)
downloadu-boot-49d225e7bf3a26adfe6093978c04e454c82bd955.zip
u-boot-49d225e7bf3a26adfe6093978c04e454c82bd955.tar.gz
u-boot-49d225e7bf3a26adfe6093978c04e454c82bd955.tar.bz2
efi_loader: use correct type for AllocatePages, AllocatePool
Use enum efi_memory_type and enum_allocate_type in the definitions of the efi_allocate_pages(), efi_allocate_pool(). In the external UEFI API leave the type as int as the UEFI specification explicitely requires that enums use a 32bit type. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r--include/efi_loader.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 32cb8d0..c440962 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -676,13 +676,14 @@ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid);
/* Generic EFI memory allocator, call this to get memory */
void *efi_alloc(uint64_t len, int memory_type);
/* More specific EFI memory allocator, called by EFI payloads */
-efi_status_t efi_allocate_pages(int type, int memory_type, efi_uintn_t pages,
- uint64_t *memory);
+efi_status_t efi_allocate_pages(enum efi_allocate_type type,
+ enum efi_memory_type memory_type,
+ efi_uintn_t pages, uint64_t *memory);
/* EFI memory free function. */
efi_status_t efi_free_pages(uint64_t memory, efi_uintn_t pages);
/* EFI memory allocator for small allocations */
-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 pool memory free function. */
efi_status_t efi_free_pool(void *buffer);
/* Returns the EFI memory map */