diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-02-16 20:13:40 +0300 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2020-02-23 23:57:15 +0300 |
commit | eaa6fc67e11c13e00799af9ca70d9fa3725c85e7 (patch) | |
tree | 070c29de9b8c5f694596aa96d347957b08ea74ac /drivers/firmware/efi/libstub/mem.c | |
parent | 2931d526d5674940d916a4b513a681ee3562e574 (diff) | |
download | linux-eaa6fc67e11c13e00799af9ca70d9fa3725c85e7.tar.xz |
efi/libstub: Add function description of efi_allocate_pages()
Provide a Sphinx style function description for efi_allocate_pages().
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Link: https://lore.kernel.org/r/20200216171340.6070-1-xypron.glpk@gmx.de
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/mem.c')
-rw-r--r-- | drivers/firmware/efi/libstub/mem.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/firmware/efi/libstub/mem.c b/drivers/firmware/efi/libstub/mem.c index 5808c8764e64..17060086913a 100644 --- a/drivers/firmware/efi/libstub/mem.c +++ b/drivers/firmware/efi/libstub/mem.c @@ -65,8 +65,20 @@ fail: return status; } -/* - * Allocate at the highest possible address that is not above 'max'. +/** + * efi_allocate_pages() - Allocate memory pages + * @size: minimum number of bytes to allocate + * @addr: On return the address of the first allocated page. The first + * allocated page has alignment EFI_ALLOC_ALIGN which is an + * architecture dependent multiple of the page size. + * @max: the address that the last allocated memory page shall not + * exceed + * + * Allocate pages as EFI_LOADER_DATA. The allocated pages are aligned according + * to EFI_ALLOC_ALIGN. The last allocated page will not exceed the address + * given by @max. + * + * Return: status code */ efi_status_t efi_allocate_pages(unsigned long size, unsigned long *addr, unsigned long max) |