Skip to content

Commit

Permalink
efi/libstub: Add function description of efi_allocate_pages()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heinrich Schuchardt authored and Ard Biesheuvel committed Feb 23, 2020
1 parent 2931d52 commit eaa6fc6
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions drivers/firmware/efi/libstub/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,20 @@ efi_status_t efi_get_memory_map(struct efi_boot_memmap *map)
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)
Expand Down

0 comments on commit eaa6fc6

Please sign in to comment.