mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
efi_loader: Change return type of efi_add_memory_map()
We currently have some inconsistent use of efi_add_memory_map() throughout the code. In particular the return value of efi_add_memory_map() is not interpreted the same way by various users in the codebase. This patch does the following: - Changes efi_add_memory_map() to return efi_status_t. - Adds a method description to efi_add_memory_map(). - Changes efi_add_memory_map() to return EFI_SUCCESS - Returns non-zero for error in efi_add_memory_map() - Updates efi_allocate_pages() to new efi_add_memory_map() - Updates efi_free_pages() to new efi_add_memory_map() - Updates efi_carve_out_dt_rsv() to new efi_add_memory_map() - Updates efi_add_runtime_mmio() to new efi_add_memory_map() Fixes:5d00995c36
("efi_loader: Implement memory allocation and map") Fixes:74c16acce3
("efi_loader: Don't allocate from memory holes") Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Alexander Graf <agraf@csgraf.de> Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
committed by
Heinrich Schuchardt
parent
112464f325
commit
b225c92fd0
@@ -169,8 +169,8 @@ static void efi_carve_out_dt_rsv(void *fdt)
|
||||
|
||||
pages = efi_size_in_pages(size + (addr & EFI_PAGE_MASK));
|
||||
addr &= ~EFI_PAGE_MASK;
|
||||
if (!efi_add_memory_map(addr, pages, EFI_RESERVED_MEMORY_TYPE,
|
||||
false))
|
||||
if (efi_add_memory_map(addr, pages, EFI_RESERVED_MEMORY_TYPE,
|
||||
false) != EFI_SUCCESS)
|
||||
printf("FDT memrsv map %d: Failed to add to map\n", i);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user