diff options
| author | Ilias Apalodimas <[email protected]> | 2025-03-17 14:03:58 +0530 |
|---|---|---|
| committer | Ilias Apalodimas <[email protected]> | 2025-03-26 13:28:08 +0200 |
| commit | c5f6542aa8ae93b7705e27103a9fdaf8445e2915 (patch) | |
| tree | dd59bde3001d351d14827aefb621af0b8cdc68fe /include | |
| parent | 9c407347b496124849665aca6b76f48118891707 (diff) | |
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 <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/efi_loader.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h index e9c10819ba2..5f769786786 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -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 */ |
