linux-stable/drivers/firmware/efi
Ard Biesheuvel 3ea86495ae efi/arm: preserve early mapping of UEFI memory map longer for BGRT
The BGRT code validates the contents of the table against the UEFI
memory map, and so it expects it to be mapped when the code runs.

On ARM, this is currently not the case, since we tear down the early
mapping after efi_init() completes, and only create the permanent
mapping in arm_enable_runtime_services(), which executes as an early
initcall, but still leaves a window where the UEFI memory map is not
mapped.

So move the call to efi_memmap_unmap() from efi_init() to
arm_enable_runtime_services().

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
[will: fold in EFI_MEMMAP attribute check from Ard]
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-07-23 15:33:18 +01:00
..
libstub efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode 2018-06-22 10:58:27 +02:00
test License cleanup: add SPDX license identifiers to some files 2017-11-02 10:04:46 -07:00
apple-properties.c device property: Get rid of union aliasing 2018-05-17 12:47:21 +02:00
arm-init.c efi/arm: preserve early mapping of UEFI memory map longer for BGRT 2018-07-23 15:33:18 +01:00
arm-runtime.c efi/arm: preserve early mapping of UEFI memory map longer for BGRT 2018-07-23 15:33:18 +01:00
capsule-loader.c efi/capsule-loader: Don't output reset log when reset flags are not set 2018-05-14 08:57:49 +02:00
capsule.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
cper-arm.c efi/cper: Remove the INDENT_SP silliness 2018-05-14 08:57:47 +02:00
cper-x86.c efi: Decode IA32/X64 Context Info structure 2018-05-14 08:57:48 +02:00
cper.c efi: Decode IA32/X64 Processor Error Section 2018-05-14 08:57:47 +02:00
dev-path-parser.c efi: Add device path parser 2016-11-13 08:23:15 +01:00
efi-bgrt.c efi/bgrt: Use efi_mem_type() 2017-08-26 09:20:33 +02:00
efi-pstore.c pstore: Convert internal records to timespec64 2018-06-05 16:57:31 -07:00
efi.c efi: Use efi_mm in x86 as well as ARM 2018-03-12 10:05:01 +01:00
efibc.c efibc: Report more information in the error messages 2016-06-27 13:06:54 +02:00
efivars.c efi: Don't use spinlocks for efi vars 2016-09-09 16:08:42 +01:00
esrt.c efi/esrt: Fix handling of early ESRT table mapping 2018-03-12 10:05:01 +01:00
fake_mem.c x86/efi: Don't allocate memmap through memblock after mm_init() 2017-01-07 08:58:07 +01:00
Kconfig efi: Decode IA32/X64 Processor Error Section 2018-05-14 08:57:47 +02:00
Makefile efi: Decode IA32/X64 Processor Error Section 2018-05-14 08:57:47 +02:00
memattr.c x86/efi: Add support for EFI_MEMORY_ATTRIBUTES_TABLE 2017-02-01 08:45:44 +01:00
memmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
reboot.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
runtime-map.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
runtime-wrappers.c efi: Replace runtime services spinlock with semaphore 2016-09-09 16:08:43 +01:00
tpm.c efi: call get_event_log before ExitBootServices 2018-01-08 12:58:35 +02:00
vars.c efi: Don't use spinlocks for efi vars 2016-09-09 16:08:42 +01:00