summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/asm-offsets_32.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-01-21 09:44:43 +0100
committerArd Biesheuvel <ardb@kernel.org>2020-02-23 21:59:42 +0100
commit59f2a619a2db86111e8bb30f349aebff6eb75baa (patch)
treedc1aeac5b0479e863dd6feb11960d6680b8d4955 /arch/x86/kernel/asm-offsets_32.c
parent09308012d8546dda75e96c02bed19e2ba1e875fd (diff)
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>
Diffstat (limited to 'arch/x86/kernel/asm-offsets_32.c')
-rw-r--r--arch/x86/kernel/asm-offsets_32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c
index 82826f2275cc..2b4256ebe86e 100644
--- a/arch/x86/kernel/asm-offsets_32.c
+++ b/arch/x86/kernel/asm-offsets_32.c
@@ -3,6 +3,8 @@
# error "Please do not build this file directly, build asm-offsets.c instead"
#endif
+#include <linux/efi.h>
+
#include <asm/ucontext.h>
#define __SYSCALL_I386(nr, sym, qual) [nr] = 1,
@@ -64,4 +66,7 @@ void foo(void)
BLANK();
DEFINE(__NR_syscall_max, sizeof(syscalls) - 1);
DEFINE(NR_syscalls, sizeof(syscalls));
+
+ BLANK();
+ DEFINE(EFI_svam, offsetof(efi_runtime_services_t, set_virtual_address_map));
}