diff mbox series

[RFCv2,9/9] arm64: kexec: Enable kexec_pe_image

Message ID 20240819145417.23367-10-piliu@redhat.com
State New
Headers show
Series UEFI emulator for kexec | expand

Commit Message

Pingfan Liu Aug. 19, 2024, 2:53 p.m. UTC
Now, anything is ready, enable PE image loading on arm64

Signed-off-by: Pingfan Liu <piliu@redhat.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
To: linux-arm-kernel@lists.infradead.org
---
 arch/arm64/Kconfig                     | 4 ++++
 arch/arm64/kernel/machine_kexec_file.c | 3 +++
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 5d91259ee7b53..fb6de7b4cd008 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1550,6 +1550,10 @@  config ARCH_SELECTS_KEXEC_FILE
 	depends on KEXEC_FILE
 	select HAVE_IMA_KEXEC if IMA
 
+config ARCH_SELECTS_KEXEC_PEIMAGE
+	def_bool y
+	depends on KEXEC_FILE
+
 config ARCH_SUPPORTS_KEXEC_SIG
 	def_bool y
 
diff --git a/arch/arm64/kernel/machine_kexec_file.c b/arch/arm64/kernel/machine_kexec_file.c
index 9fca3a35f04d5..c259d871b8e33 100644
--- a/arch/arm64/kernel/machine_kexec_file.c
+++ b/arch/arm64/kernel/machine_kexec_file.c
@@ -24,6 +24,9 @@ 
 
 const struct kexec_file_ops * const kexec_file_loaders[] = {
 	&kexec_image_ops,
+#ifdef CONFIG_ARCH_SELECTS_KEXEC_PEIMAGE
+	&pe_image_ops,
+#endif
 	NULL
 };