efi/arm: map UEFI memory map even w/o runtime services enabled
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Mon, 23 Jul 2018 01:57:31 +0000 (10:57 +0900)
committerWill Deacon <will.deacon@arm.com>
Mon, 23 Jul 2018 14:34:11 +0000 (15:34 +0100)
commit20d12cf990618845e76d3f24daaebd15d65a5e46
tree3914dcd12cd8d9fdcb82aaf07201dba65f71e129
parent3ea86495aef2f6de26b7cb1599ba350dd6a0c521
efi/arm: map UEFI memory map even w/o runtime services enabled

Under the current implementation, UEFI memory map will be mapped and made
available in virtual mappings only if runtime services are enabled.
But in a later patch, we want to use UEFI memory map in acpi_os_ioremap()
to create mappings of ACPI tables using memory attributes described in
UEFI memory map.
See the following commit:
    arm64: acpi: fix alignment fault in accessing ACPI tables

So, as a first step, arm_enter_runtime_services() is modified, alongside
Ard's patch[1], so that UEFI memory map will not be freed even if
efi=noruntime.

[1] https://marc.info/?l=linux-efi&m=152930773507524&w=2

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/firmware/efi/arm-runtime.c