summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStefan Brüns <stefan.bruens@rwth-aachen.de>2016-10-09 22:17:18 +0200
committerAlexander Graf <agraf@suse.de>2016-10-18 09:08:07 +0200
commitead1274b7f9578e346b3cdcb3d9e2002ef8f0e75 (patch)
tree2bd5c709a3dbbac929d8b056ddfa4141b404a04c /include
parent991d62fa73a35598a8939a83dd84369168220d35 (diff)
downloadu-boot-imx-ead1274b7f9578e346b3cdcb3d9e2002ef8f0e75.zip
u-boot-imx-ead1274b7f9578e346b3cdcb3d9e2002ef8f0e75.tar.gz
u-boot-imx-ead1274b7f9578e346b3cdcb3d9e2002ef8f0e75.tar.bz2
efi_loader: Move efi_allocate_pool implementation to efi_memory.c
We currently handle efi_allocate_pool() in our boot time service file. In the following patch, pool allocation will receive additional internal semantics that we should preserve inside efi_memory.c instead. As foundation for those changes, split the function into an externally facing efi_allocate_pool_ext() for use by payloads and an internal helper efi_allocate_pool() in efi_memory.c that handles the actual allocation. While at it, change the magic 0xfff / 12 constants to the more obvious EFI_PAGE_MASK/SHIFT defines. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/efi_loader.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 9738835..f0473ab 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -119,6 +119,9 @@ efi_status_t efi_allocate_pages(int type, int memory_type, unsigned long pages,
uint64_t *memory);
/* EFI memory free function. Not implemented today */
efi_status_t efi_free_pages(uint64_t memory, unsigned long pages);
+/* EFI memory allocator for small allocations */
+efi_status_t efi_allocate_pool(int pool_type, unsigned long size,
+ void **buffer);
/* Returns the EFI memory map */
efi_status_t efi_get_memory_map(unsigned long *memory_map_size,
struct efi_mem_desc *memory_map,