efi_loader: allow for removal of memory from the EFI map
With upcoming changes supporting pmem nodes, we need to remove the pmem area from the EFI memory map. Rename efi_add_memory_map_pg() to efi_update_memory_map(), and allow removing memory from the EFI memory map. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
@@ -878,6 +878,21 @@ efi_status_t efi_get_memory_map(efi_uintn_t *memory_map_size,
|
||||
/* Adds a range into the EFI memory map */
|
||||
efi_status_t efi_add_memory_map(u64 start, u64 size, int memory_type);
|
||||
|
||||
/**
|
||||
* efi_update_memory_map() - update the memory map by adding/removing pages
|
||||
*
|
||||
* @start: start address, must be a multiple of
|
||||
* EFI_PAGE_SIZE
|
||||
* @pages: number of pages to add
|
||||
* @memory_type: type of memory added
|
||||
* @overlap_conventional: region may only overlap free(conventional)
|
||||
* memory
|
||||
* @remove: remove memory map
|
||||
* Return: status code
|
||||
*/
|
||||
efi_status_t efi_update_memory_map(u64 start, u64 pages, int memory_type,
|
||||
bool overlap_conventional, bool remove);
|
||||
|
||||
/* Called by board init to initialize the EFI drivers */
|
||||
efi_status_t efi_driver_init(void);
|
||||
/* Called when a block device is added */
|
||||
|
Reference in New Issue
Block a user