efi: Add efi_memmap_install() for installing new EFI memory maps
authorMatt Fleming <matt@codeblueprint.co.uk>
Wed, 22 Jun 2016 15:54:00 +0000 (16:54 +0100)
committerMatt Fleming <matt@codeblueprint.co.uk>
Fri, 9 Sep 2016 15:07:47 +0000 (16:07 +0100)
commitc45f4da33a297f85435f8dccb26a24852ea01bb9
tree3bf0927904747a9b36b57058e1dce31e87f87dab
parent60863c0d1a96b740048cc7d94a2d00d6f89ba3d8
efi: Add efi_memmap_install() for installing new EFI memory maps

While efi_memmap_init_{early,late}() exist for architecture code to
install memory maps from firmware data and for the virtual memory
regions respectively, drivers don't care which stage of the boot we're
at and just want to swap the existing memmap for a modified one.

efi_memmap_install() abstracts the details of how the new memory map
should be mapped and the existing one unmapped.

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>
Cc: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
drivers/firmware/efi/fake_mem.c
drivers/firmware/efi/memmap.c
include/linux/efi.h