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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user