diff mbox series

[v2,29/39] efi: Add comments to struct efi_priv

Message ID 20210925003055.759305-14-sjg@chromium.org
State Superseded
Delegated to: Heinrich Schuchardt
Headers show
Series efi: Improvements to U-Boot running on top of UEFI | expand

Commit Message

Simon Glass Sept. 25, 2021, 12:30 a.m. UTC
This structure is uncommented. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 include/efi.h | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

Comments

Heinrich Schuchardt Oct. 23, 2021, 11:28 a.m. UTC | #1
On 9/25/21 02:30, Simon Glass wrote:
> This structure is uncommented. Fix it.

The commit message is incomplete. You are deleting field device path.

>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> (no changes since v1)
>
>   include/efi.h | 26 +++++++++++++++++++++++++-
>   1 file changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/include/efi.h b/include/efi.h
> index 908c5dc6ebd..3c215618dab 100644
> --- a/include/efi.h
> +++ b/include/efi.h
> @@ -400,15 +400,39 @@ static inline struct efi_mem_desc *efi_get_next_mem_desc(
>   	return (struct efi_mem_desc *)((ulong)desc + map->desc_size);
>   }
>
> +/**
> + * struct efi_priv - Information about the environment provided by EFI
> + *
> + * @parent_image: image passed into the EFI app or stub
> + * @sys_table: Pointer to system table
> + * @boot: Pointer to boot-services table
> + * @run: Pointer to runtime-services table
> + *
> + * Used by app only:

Sphinx will render this line *after* all parameters. Please, remove it.

<cite>
...
info_size
     Size of the info list, in bytes from info

next_hdr
     Pointer to where to put the next header when adding to the list

Description
-----------

Used by app only: Used by stub only:

struct efi_system_table *efi_get_sys_table(void)
</cite>

> + * @use_pool_for_malloc: true if all allocation should go through the EFI 'pool'
> + *	methods allocate_pool() and free_pool(); false to use 'pages' methods
> + *	allocate_pages() and free_pages()
> + * @ram_base: Base address of RAM (size CONFIG_EFI_RAM_SIZE)
> + * @image_data_type: Type of the loaded image (e.g. EFI_LOADER_CODE)
> + *
> + * Used by stub only:

Remove this line.

> + * @info: Header of the info list, holding info collected by the stub and passed
> + *	to U-Boot
> + * @info_size: Size of the info list, in bytes from @info
> + * @next_hdr: Pointer to where to put the next header when adding to the list
> + */
>   struct efi_priv {
>   	efi_handle_t parent_image;
> -	struct efi_device_path *device_path;

This change seems to be unrelated.

Best regards

Heinrich

>   	struct efi_system_table *sys_table;
>   	struct efi_boot_services *boot;
>   	struct efi_runtime_services *run;
> +
> +	/* app: */
>   	bool use_pool_for_malloc;
>   	unsigned long ram_base;
>   	unsigned int image_data_type;
> +
> +	/* stub: */
>   	struct efi_info_hdr *info;
>   	unsigned int info_size;
>   	void *next_hdr;
>
diff mbox series

Patch

diff --git a/include/efi.h b/include/efi.h
index 908c5dc6ebd..3c215618dab 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -400,15 +400,39 @@  static inline struct efi_mem_desc *efi_get_next_mem_desc(
 	return (struct efi_mem_desc *)((ulong)desc + map->desc_size);
 }
 
+/**
+ * struct efi_priv - Information about the environment provided by EFI
+ *
+ * @parent_image: image passed into the EFI app or stub
+ * @sys_table: Pointer to system table
+ * @boot: Pointer to boot-services table
+ * @run: Pointer to runtime-services table
+ *
+ * Used by app only:
+ * @use_pool_for_malloc: true if all allocation should go through the EFI 'pool'
+ *	methods allocate_pool() and free_pool(); false to use 'pages' methods
+ *	allocate_pages() and free_pages()
+ * @ram_base: Base address of RAM (size CONFIG_EFI_RAM_SIZE)
+ * @image_data_type: Type of the loaded image (e.g. EFI_LOADER_CODE)
+ *
+ * Used by stub only:
+ * @info: Header of the info list, holding info collected by the stub and passed
+ *	to U-Boot
+ * @info_size: Size of the info list, in bytes from @info
+ * @next_hdr: Pointer to where to put the next header when adding to the list
+ */
 struct efi_priv {
 	efi_handle_t parent_image;
-	struct efi_device_path *device_path;
 	struct efi_system_table *sys_table;
 	struct efi_boot_services *boot;
 	struct efi_runtime_services *run;
+
+	/* app: */
 	bool use_pool_for_malloc;
 	unsigned long ram_base;
 	unsigned int image_data_type;
+
+	/* stub: */
 	struct efi_info_hdr *info;
 	unsigned int info_size;
 	void *next_hdr;