efi: Add 'runtime' pointer to struct efi
authorArd Biesheuvel <ardb@kernel.org>
Tue, 21 Jan 2020 08:44:43 +0000 (09:44 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Sun, 23 Feb 2020 20:59:42 +0000 (21:59 +0100)
commit59f2a619a2db86111e8bb30f349aebff6eb75baa
treedc1aeac5b0479e863dd6feb11960d6680b8d4955
parent09308012d8546dda75e96c02bed19e2ba1e875fd
efi: Add 'runtime' pointer to struct efi

Instead of going through the EFI system table each time, just copy the
runtime services table pointer into struct efi directly. This is the
last use of the system table pointer in struct efi, allowing us to
drop it in a future patch, along with a fair amount of quirky handling
of the translated address.

Note that usually, the runtime services pointer changes value during
the call to SetVirtualAddressMap(), so grab the updated value as soon
as that call returns. (Mixed mode uses a 1:1 mapping, and kexec boot
enters with the updated address in the system table, so in those cases,
we don't need to do anything here)

Tested-by: Tony Luck <tony.luck@intel.com> # arch/ia64
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/x86/include/asm/efi.h
arch/x86/kernel/asm-offsets_32.c
arch/x86/platform/efi/efi.c
arch/x86/platform/efi/efi_32.c
arch/x86/platform/efi/efi_64.c
arch/x86/platform/efi/efi_stub_32.S
drivers/firmware/efi/arm-init.c
drivers/firmware/efi/runtime-wrappers.c
include/linux/efi.h