linux/drivers/firmware/efi/libstub
Ard Biesheuvel 550b33cfd4 arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines
Ampere Altra machines are reported to misbehave when the SetTime() EFI
runtime service is called after ExitBootServices() but before calling
SetVirtualAddressMap(). Given that the latter is horrid, pointless and
explicitly documented as optional by the EFI spec, we no longer invoke
it at boot if the configured size of the VA space guarantees that the
EFI runtime memory regions can remain mapped 1:1 like they are at boot
time.

On Ampere Altra machines, this results in SetTime() calls issued by the
rtc-efi driver triggering synchronous exceptions during boot.  We can
now recover from those without bringing down the system entirely, due to
commit 23715a26c8 ("arm64: efi: Recover from synchronous
exceptions occurring in firmware"). However, it would be better to avoid
the issue entirely, given that the firmware appears to remain in a funny
state after this.

So attempt to identify these machines based on the 'family' field in the
type #1 SMBIOS record, and call SetVirtualAddressMap() unconditionally
in that case.

Tested-by: Alexandru Elisei <alexandru.elisei@gmail.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2022-11-10 23:14:14 +01:00
..
alignedmem.c efi/libstub: Fix gcc error around __umoddi3 for 32 bit builds 2020-07-09 09:45:09 +03:00
arm32-stub.c efi: libstub: pass image handle to handle_kernel_image() 2022-05-03 15:31:28 +02:00
arm64-stub.c arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines 2022-11-10 23:14:14 +01:00
efi-stub-helper.c efi/arm64: libstub: avoid SetVirtualAddressMap() when possible 2022-09-27 13:26:16 +02:00
efi-stub.c efi: libstub: fix up the last remaining open coded boot service call 2022-09-27 13:26:16 +02:00
efistub.h arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines 2022-11-10 23:14:14 +01:00
fdt.c efi: runtime: Don't assume virtual mappings are missing if VA == PA == 0 2022-10-21 11:09:41 +02:00
file.c Second shared stable tag between EFI and LoongArch trees 2022-09-27 13:26:13 +02:00
gop.c efi/gop: Add an option to list out the available GOP modes 2020-05-20 19:09:20 +02:00
intrinsics.c efi/libstub: use EFI provided memcpy/memset routines 2022-09-17 15:13:21 +02:00
loongarch-stub.c efi/loongarch: libstub: remove dependency on flattened DT 2022-09-27 13:22:49 +02:00
Makefile arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines 2022-11-10 23:14:14 +01:00
Makefile.zboot efi: libstub: Remove zboot signing from build options 2022-10-21 11:09:40 +02:00
mem.c efi: libstub: install boot-time memory map as config table 2022-09-27 13:22:49 +02:00
pci.c efi/libstub: Correct comment typos 2020-05-06 11:27:55 +02:00
random.c efi: random: Use 'ACPI reclaim' memory for random seed 2022-10-24 10:23:28 +02:00
randomalloc.c efi: libstub: install boot-time memory map as config table 2022-09-27 13:22:49 +02:00
relocate.c efi: libstub: install boot-time memory map as config table 2022-09-27 13:22:49 +02:00
riscv-stub.c riscv/efi_stub: Add 64bit boot-hartid support on RV64 2022-07-19 16:39:19 -07:00
secureboot.c efi: libstub: check Shim mode using MokSBStateRT 2022-09-22 10:15:44 +02:00
skip_spaces.c efi/libstub: Fix missing-prototype warning for skip_spaces() 2020-06-15 19:43:58 +02:00
smbios.c arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines 2022-11-10 23:14:14 +01:00
string.c efi/libstub: Fix missing-prototypes in string.c 2020-09-25 23:29:04 +02:00
systable.c efi/libstub: move efi_system_table global var into separate object 2022-09-19 11:19:35 +02:00
tpm.c More EFI changes for v5.8: 2020-05-25 15:11:14 +02:00
vsprintf.c isystem: ship and use stdarg.h 2021-08-19 09:02:55 +09:00
x86-stub.c efi: libstub: Give efi_main() asmlinkage qualification 2022-10-21 11:09:40 +02:00
zboot-header.S efi/libstub: implement generic EFI zboot 2022-09-20 09:50:30 +02:00
zboot.c efi: zboot: create MemoryMapped() device path for the parent if needed 2022-09-27 13:26:16 +02:00
zboot.lds efi: libstub: Fix incorrect payload size in zboot header 2022-10-21 11:09:41 +02:00