[PATCH v5 01/23] efi: Define fields in struct efi_mem_desc
Ilias Apalodimas
ilias.apalodimas at linaro.org
Wed Dec 11 15:45:00 CET 2024
Hi Simon,
[...]
> u32 reserved;
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index 39809eac1bc..ee0cdd36500 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -788,8 +788,10 @@ efi_status_t efi_add_memory_map(u64 start, u64 size, int memory_type);
> /**
> * efi_add_memory_map_pg() - add pages to the memory map
> *
> - * @start: start address, must be a multiple of
> - * EFI_PAGE_SIZE
> + * @start: start address, must be a multiple of EFI_PAGE_SIZE. Note that this
> + * is actually a pointer provided as an integer. To pass in an address, pass
> + * in (ulong)map_to_sysmem(addr)
Why is this a pointer? This is the physical address of the hardware.
Thanks
/Ilias
> + *
> * @pages: number of pages to add
> * @memory_type: type of memory added
> * @overlap_conventional: region may only overlap free(conventional)
> diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
> index e493934c713..f1154f73e05 100644
> --- a/lib/efi_loader/efi_memory.c
> +++ b/lib/efi_loader/efi_memory.c
> @@ -384,7 +384,9 @@ efi_status_t efi_add_memory_map_pg(u64 start, u64 pages,
> /**
> * efi_add_memory_map() - add memory area to the memory map
> *
> - * @start: start address of the memory area
> + * @start: start address of the memory area. Note that this is
> + * actually a pointer provided as an integer. To pass in
> + * an address, pass in (ulong)map_to_sysmem(addr)
> * @size: length in bytes of the memory area
> * @memory_type: type of memory added
> *
> --
> 2.34.1
>
More information about the U-Boot
mailing list