[PATCH v5 10/23] efi_loader: Drop reserved from priv_mem_desc
Ilias Apalodimas
ilias.apalodimas at linaro.org
Wed Dec 11 16:13:06 CET 2024
Hi Simon,
On Wed, 11 Dec 2024 at 15:54, Simon Glass <sjg at chromium.org> wrote:
>
> This field is not used. Drop it and set the value to 0 when the
> memory-map is requested.
Looking at the spec the reserved field is wrong. Instead you should
just remove it from struct efi_mem_desc
Thanks
/Ilias
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
> lib/efi_loader/efi_memory.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
> index 8211600f7f6..024361483a0 100644
> --- a/lib/efi_loader/efi_memory.c
> +++ b/lib/efi_loader/efi_memory.c
> @@ -35,7 +35,6 @@ efi_uintn_t efi_memory_map_key;
> * internal format is converted to the external struct efi_mem_desc format.
> *
> * @type (enum efi_memory_type): EFI memory-type
> - * @reserved: unused
> * @physical_start: Start address of region in physical memory
> * @num_pages: Number of EFI pages this record covers (each is EFI_PAGE_SIZE
> * bytes)
> @@ -43,7 +42,6 @@ efi_uintn_t efi_memory_map_key;
> */
> struct priv_mem_desc {
> u32 type;
> - u32 reserved;
> efi_physical_addr_t physical_start;
> u64 num_pages;
> u64 attribute;
> @@ -703,7 +701,7 @@ efi_status_t efi_get_memory_map(efi_uintn_t *memory_map_size,
> memory_map = &memory_map[map_entries - 1];
> list_for_each_entry(lmem, &efi_mem, link) {
> memory_map->type = lmem->desc.type;
> - memory_map->reserved = lmem->desc.reserved;
> + memory_map->reserved = 0;
> memory_map->physical_start = lmem->desc.physical_start;
>
> /* virtual and physical are always the same */
> --
> 2.34.1
>
More information about the U-Boot
mailing list