efi: Define fields in struct efi_mem_desc

There is quite a bit of confusion in the EFI code as to whether a field
contains an address or a pointer. As a first step towards resolving
this, document the memory-descriptor struct, indicating that it holds
pointers, not addresses.

Dro the same for efi_add_memory_map() as it is widely used, as well as
efi_add_memory_map_pg() which is only used by lmb

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2024-12-11 06:53:55 -07:00
parent b456c88526
commit aa7ec78ed7
3 changed files with 28 additions and 3 deletions

View File

@@ -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)
*
* @pages: number of pages to add
* @memory_type: type of memory added
* @overlap_conventional: region may only overlap free(conventional)