summaryrefslogtreecommitdiffstats
path: root/arch/x86/platform
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <nsaenz@amazon.com>2024-11-12 19:52:17 +0100
committerArd Biesheuvel <ardb@kernel.org>2024-11-15 17:40:00 +0100
commit21b1a7f7ae2f53c914f584a72a85cb4f71227e28 (patch)
tree0c14133f5d625efe93e5eacf1600c768b08aa52b /arch/x86/platform
parentx86/efi: Drop support for the EFI_PROPERTIES_TABLE (diff)
downloadlinux-21b1a7f7ae2f53c914f584a72a85cb4f71227e28.tar.xz
linux-21b1a7f7ae2f53c914f584a72a85cb4f71227e28.zip
x86/efi: Apply EFI Memory Attributes after kexec
Kexec bypasses EFI's switch to virtual mode. In exchange, it has its own routine, kexec_enter_virtual_mode(), which replays the mappings made by the original kernel. Unfortunately, that function fails to reinstate EFI's memory attributes, which would've otherwise been set after entering virtual mode. Remediate this by calling efi_runtime_update_mappings() within kexec's routine. Signed-off-by: Nicolas Saenz Julienne <nsaenz@amazon.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/x86/platform')
-rw-r--r--arch/x86/platform/efi/efi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 375ebd78296a..a7ff189421c3 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -765,6 +765,7 @@ static void __init kexec_enter_virtual_mode(void)
efi_sync_low_kernel_mappings();
efi_native_runtime_setup();
+ efi_runtime_update_mappings();
#endif
}