linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] efi/libstub: function description efi_allocate_pages()
@ 2020-02-16 17:13 Heinrich Schuchardt
  2020-02-16 17:33 ` Ard Biesheuvel
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2020-02-16 17:13 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: linux-efi, linux-kernel, Heinrich Schuchardt

Provide a Sphinx style function description for efi_allocate_pages().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/firmware/efi/libstub/mem.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/efi/libstub/mem.c b/drivers/firmware/efi/libstub/mem.c
index 5808c8764e64..c6a784ed640f 100644
--- a/drivers/firmware/efi/libstub/mem.c
+++ b/drivers/firmware/efi/libstub/mem.c
@@ -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)
--
2.25.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] efi/libstub: function description efi_allocate_pages()
  2020-02-16 17:13 [PATCH 1/1] efi/libstub: function description efi_allocate_pages() Heinrich Schuchardt
@ 2020-02-16 17:33 ` Ard Biesheuvel
  0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2020-02-16 17:33 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: linux-efi, Linux Kernel Mailing List

On Sun, 16 Feb 2020 at 18:13, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Provide a Sphinx style function description for efi_allocate_pages().
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Thanks Heinrich. I will put this on the pile.

> ---
>  drivers/firmware/efi/libstub/mem.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/efi/libstub/mem.c b/drivers/firmware/efi/libstub/mem.c
> index 5808c8764e64..c6a784ed640f 100644
> --- a/drivers/firmware/efi/libstub/mem.c
> +++ b/drivers/firmware/efi/libstub/mem.c
> @@ -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)
> --
> 2.25.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-16 17:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-16 17:13 [PATCH 1/1] efi/libstub: function description efi_allocate_pages() Heinrich Schuchardt
2020-02-16 17:33 ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).