efi: Add a flags parameter to efi_memory_map

In preparation for garbage collecting dynamically allocated EFI memory
maps, where the allocation method of memblock vs slab needs to be
recalled, convert the existing 'late' flag into a 'flags' bitmask.

Arrange for the flag to be passed via 'struct efi_memory_map_data'. This
structure grows additional flags in follow-on changes.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200113172245.27925-11-ardb@kernel.org
This commit is contained in:
Dan Williams
2020-01-13 18:22:42 +01:00
committed by Ingo Molnar
parent 62b605b53a
commit 26c0e44a21
2 changed files with 20 additions and 15 deletions

View File

@@ -767,6 +767,7 @@ struct efi_memory_map_data {
unsigned long size;
unsigned long desc_version;
unsigned long desc_size;
unsigned long flags;
};
struct efi_memory_map {
@@ -776,7 +777,8 @@ struct efi_memory_map {
int nr_map;
unsigned long desc_version;
unsigned long desc_size;
bool late;
#define EFI_MEMMAP_LATE (1UL << 0)
unsigned long flags;
};
struct efi_mem_range {