]> git.baikalelectronics.ru Git - kernel.git/commit
efi: libstub: simplify efi_get_memory_map() and struct efi_boot_memmap
authorArd Biesheuvel <ardb@kernel.org>
Fri, 3 Jun 2022 13:29:22 +0000 (15:29 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 26 Sep 2022 20:30:17 +0000 (22:30 +0200)
commit99b04c4d745c5eb09e76ae82d3ccc7cf87ab8c43
treed80d86d36b10415ea62beaa1b0db7ecca6f749d6
parent197c4d2bfa3be81fc488fd71871219ceba7c8d5b
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>
drivers/firmware/efi/libstub/arm64-stub.c
drivers/firmware/efi/libstub/efi-stub-helper.c
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/fdt.c
drivers/firmware/efi/libstub/mem.c
drivers/firmware/efi/libstub/randomalloc.c
drivers/firmware/efi/libstub/relocate.c
drivers/firmware/efi/libstub/x86-stub.c
include/linux/efi.h