[RFCv2 9/9] arm64: kexec: Enable kexec_pe_image
From: Pingfan Liu
Date: Mon Aug 19 2024 - 10:57:20 EST
Now, anything is ready, enable PE image loading on arm64
Signed-off-by: Pingfan Liu <piliu@xxxxxxxxxx>
Cc: Ard Biesheuvel <ardb@xxxxxxxxxx>
Cc: Mark Rutland <mark.rutland@xxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
To: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
---
arch/arm64/Kconfig | 4 ++++
arch/arm64/kernel/machine_kexec_file.c | 3 +++
2 files changed, 7 insertions(+)
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
};
--
2.41.0