linux-stable/drivers/firmware/efi
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
..
libstub arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines 2022-11-10 23:14:14 +01:00
test efi/efi_test: read RuntimeServicesSupported 2020-12-09 08:37:27 +01:00
apple-properties.c efi: fix return value of __setup handlers 2022-03-01 09:02:21 +01:00
arm-runtime.c efi: runtime: Don't assume virtual mappings are missing if VA == PA == 0 2022-10-21 11:09:41 +02:00
capsule-loader.c efi: capsule-loader: Fix use-after-free in efi_capsule_write 2022-09-07 18:23:56 +02:00
capsule.c efi: capsule: clean scatter-gather entries from the D-cache 2020-12-09 08:37:27 +01:00
cper-arm.c
cper-x86.c x86/mce, cper: Pass x86 CPER through the MCA handling chain 2020-11-21 12:05:41 +01:00
cper.c efi/cper: Reformat CPER memory error location to more readable 2022-04-08 11:36:16 +02:00
dev-path-parser.c efi/dev-path-parser: Refactor _UID handling to use acpi_dev_uid_to_integer() 2022-09-19 18:34:42 +02:00
earlycon.c
efi-bgrt.c
efi-init.c efi/arm: libstub: move ARM specific code out of generic routines 2022-09-27 13:26:16 +02:00
efi-pstore.c efi: pstore: Omit efivars caching EFI varstore access layer 2022-06-24 20:40:19 +02:00
efi.c efi: random: reduce seed size to 32 bytes 2022-10-24 10:21:02 +02:00
efibc.c efi: efibc: Guard against allocation failure 2022-09-20 18:42:55 +02:00
embedded-firmware.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
esrt.c efi: use default_groups in kobj_type 2022-01-06 21:19:05 +01:00
fake_mem.c
fake_mem.h
fdtparams.c efi/fdt: fix panic when no valid fdt found 2021-05-22 14:03:42 +02:00
Kconfig efi: libstub: Remove zboot signing from build options 2022-10-21 11:09:40 +02:00
Makefile efi: vars: Remove deprecated 'efivars' sysfs interface 2022-06-24 20:40:19 +02:00
memattr.c efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared 2021-05-22 14:05:13 +02:00
memmap.c drivers: fix typo in firmware/efi/memmap.c 2022-06-28 20:00:11 +02:00
mokvar-table.c efi/mokvar: move up init order 2022-03-08 13:55:52 +02:00
rci2-table.c
reboot.c efi: Fix efi_power_off() not being run before acpi_power_off() when necessary 2022-07-10 17:41:06 +02:00
riscv-runtime.c efi: runtime: Don't assume virtual mappings are missing if VA == PA == 0 2022-10-21 11:09:41 +02:00
runtime-map.c efi: use default_groups in kobj_type 2022-01-06 21:19:05 +01:00
runtime-wrappers.c efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock() 2021-10-05 13:07:01 +02:00
sysfb_efi.c efi: sysfb_efi: remove unnecessary <asm/efi.h> include 2022-06-21 18:11:43 +02:00
tpm.c efi/tpm: Pass correct address to memblock_reserve 2022-10-24 08:04:25 +02:00
vars.c efi: efivars: Fix variable writes with unsupported query_variable_store() 2022-10-28 18:26:30 +02:00
x86_fake_mem.c efi/fake_mem: arrange for a resource entry per efi_fake_mem instance 2020-10-13 18:38:27 -07:00