summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/efi.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-10-01 20:09:24 +0300
committerArd Biesheuvel <ardb@kernel.org>2022-11-18 11:14:09 +0300
commitfdc6d38d64a20c542b1867ebeb8dd03b98829336 (patch)
treee51907c7c373e89d471f8f382173278cfc0033c8 /arch/x86/include/asm/efi.h
parent4059ba656ce5c13c8ca345955712152ae41420c8 (diff)
downloadlinux-fdc6d38d64a20c542b1867ebeb8dd03b98829336.tar.xz
efi: memmap: Move manipulation routines into x86 arch tree
The EFI memory map is a description of the memory layout as provided by the firmware, and only x86 manipulates it in various different ways for its own memory bookkeeping. So let's move the memmap routines that are only used by x86 into the x86 arch tree. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/efi.h')
-rw-r--r--arch/x86/include/asm/efi.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index 981eaf535703..f29d1450edf4 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -417,6 +417,18 @@ static inline void efi_fake_memmap(void)
}
#endif
+extern int __init efi_memmap_alloc(unsigned int num_entries,
+ struct efi_memory_map_data *data);
+extern void __efi_memmap_free(u64 phys, unsigned long size,
+ unsigned long flags);
+#define __efi_memmap_free __efi_memmap_free
+
+extern int __init efi_memmap_install(struct efi_memory_map_data *data);
+extern int __init efi_memmap_split_count(efi_memory_desc_t *md,
+ struct range *range);
+extern void __init efi_memmap_insert(struct efi_memory_map *old_memmap,
+ void *buf, struct efi_mem_range *mem);
+
#define arch_ima_efi_boot_mode \
({ extern struct boot_params boot_params; boot_params.secure_boot; })