linux/drivers/firmware/efi
Matt Fleming dca0f971ea efi: Add efi_memmap_init_late() for permanent EFI memmap
Drivers need a way to access the EFI memory map at runtime. ARM and
arm64 currently provide this by remapping the EFI memory map into the
vmalloc space before setting up the EFI virtual mappings.

x86 does not provide this functionality which has resulted in the code
in efi_mem_desc_lookup() where it will manually map individual EFI
memmap entries if the memmap has already been torn down on x86,

  /*
   * If a driver calls this after efi_free_boot_services,
   * ->map will be NULL, and the target may also not be mapped.
   * So just always get our own virtual map on the CPU.
   *
   */
  md = early_memremap(p, sizeof (*md));

There isn't a good reason for not providing a permanent EFI memory map
for runtime queries, especially since the EFI regions are not mapped
into the standard kernel page tables.

Tested-by: Dave Young <dyoung@redhat.com> [kexec/kdump]
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> [arm]
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Peter Jones <pjones@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
2016-09-09 16:07:43 +01:00
..
libstub arm64 updates for 4.7: 2016-05-16 17:17:24 -07:00
arm-init.c efi: Refactor efi_memmap_init_early() into arch-neutral code 2016-09-09 16:06:38 +01:00
arm-runtime.c efi: Add efi_memmap_init_late() for permanent EFI memmap 2016-09-09 16:07:43 +01:00
capsule-loader.c efi/capsule: Allocate whole capsule into virtual memory 2016-08-11 13:55:36 +02:00
capsule.c efi/capsule: Allocate whole capsule into virtual memory 2016-08-11 13:55:36 +02:00
cper.c efi: Handle memory error structures produced based on old versions of standard 2015-07-15 13:30:38 +01:00
efi-pstore.c efi-pstore: implement efivars_pstore_exit() 2016-06-02 11:25:31 -07:00
efi.c efi: Add efi_memmap_init_late() for permanent EFI memmap 2016-09-09 16:07:43 +01:00
efibc.c efibc: Report more information in the error messages 2016-06-27 13:06:54 +02:00
efivars.c efi: Merge boolean flag arguments 2016-05-07 07:06:13 +02:00
esrt.c efi/esrt: Don't preformat name 2015-12-14 15:24:03 +00:00
fake_mem.c efi: Refactor efi_memmap_init_early() into arch-neutral code 2016-09-09 16:06:38 +01:00
Kconfig efi: Add misc char driver interface to update EFI firmware 2016-04-28 11:34:05 +02:00
Makefile efi: Add misc char driver interface to update EFI firmware 2016-04-28 11:34:05 +02:00
memattr.c efi: Implement generic support for the Memory Attributes table 2016-04-28 11:33:54 +02:00
reboot.c efi: Add 'capsule' update support 2016-04-28 11:34:03 +02:00
runtime-map.c efi: Fix error handling in add_sysfs_runtime_map_entry() 2015-05-05 16:20:13 +01:00
runtime-wrappers.c efi: Convert efi_call_virt() to efi_call_virt_pointer() 2016-06-27 13:06:56 +02:00
vars.c efi: Merge boolean flag arguments 2016-05-07 07:06:13 +02:00