summaryrefslogtreecommitdiffstats
path: root/include/linux/efi.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-06-03 15:29:22 +0200
committerArd Biesheuvel <ardb@kernel.org>2022-09-26 22:30:17 +0200
commiteab3126571ed1e3e57ce0f066b566af472ebc47a (patch)
treed80d86d36b10415ea62beaa1b0db7ecca6f749d6 /include/linux/efi.h
parentf80d26043af91ceb5036c478101c015edb9e7630 (diff)
downloadlinux-eab3126571ed1e3e57ce0f066b566af472ebc47a.tar.gz
linux-eab3126571ed1e3e57ce0f066b566af472ebc47a.tar.bz2
linux-eab3126571ed1e3e57ce0f066b566af472ebc47a.zip
efi: libstub: simplify efi_get_memory_map() and struct efi_boot_memmap
Currently, struct efi_boot_memmap is a struct that is passed around between callers of efi_get_memory_map() and the users of the resulting data, and which carries pointers to various variables whose values are provided by the EFI GetMemoryMap() boot service. This is overly complex, and it is much easier to carry these values in the struct itself. So turn the struct into one that carries these data items directly, including a flex array for the variable number of EFI memory descriptors that the boot service may return. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r--include/linux/efi.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index d2b84c2fec39..f1b3e0d1b3fa 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -518,6 +518,15 @@ typedef union {
efi_system_table_32_t mixed_mode;
} efi_system_table_t;
+struct efi_boot_memmap {
+ unsigned long map_size;
+ unsigned long desc_size;
+ u32 desc_ver;
+ unsigned long map_key;
+ unsigned long buff_size;
+ efi_memory_desc_t map[];
+};
+
/*
* Architecture independent structure for describing a memory map for the
* benefit of efi_memmap_init_early(), and for passing context between