Skip to contentSkip to conversation

arm: Leave smccc calls in .text when efi_loader=n

PATCH New Alexander Graf 2 participants 2 messages Feb 11, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: Leave smccc calls in .text when efi_loader=n

Commit 81ea00838c6 ("efi_loader: PSCI reset and shutdown") put the SMCCC assembly code into the efi specific code section. This is wrong when we do not have EFI_LOADER enabled, as that strips efi runtime sections from the output binary

Fixes 81ea00838c6 ("efi_loader: PSCI reset and shutdown")
---
 arch/arm/cpu/armv7/smccc-call.S | 2 ++
 arch/arm/cpu/armv8/smccc-call.S | 2 ++
 2 files changed, 4 insertions(+)
arch/arm/cpu/armv7/smccc-call.S +2 -0
index eae69e36c3..f70728f2c4 100644
@@ -7,7 +7,9 @@
 #include <asm/opcodes-sec.h>
 #include <asm/opcodes-virt.h>
 
+#ifdef CONFIG_EFI_LOADER
 	.section	.text.efi_runtime
+#endif
 
 #define UNWIND(x...)
 	/*
arch/arm/cpu/armv8/smccc-call.S +2 -0
index 86de4b4089..dc92b28777 100644
@@ -6,7 +6,9 @@
 #include <linux/arm-smccc.h>
 #include <generated/asm-offsets.h>
 
+#ifdef CONFIG_EFI_LOADER
 	.section	.text.efi_runtime
+#endif
 
 	.macro SMCCC instr
 	.cfi_startproc
Signature · 1 line
2.12.3
#1 lore raw

PATCH 1/1 arm: Leave smccc calls in .text when efi_loader=n

Quoted 33 lines · Alexander Graf

Commit 81ea00838c6 ("efi_loader: PSCI reset and shutdown") put the SMCCC assembly code into the efi specific code section. This is wrong when we do not have EFI_LOADER enabled, as that strips efi runtime sections from the output binary

Fixes 81ea00838c6 ("efi_loader: PSCI reset and shutdown")
---
 arch/arm/cpu/armv7/smccc-call.S | 2 ++
 arch/arm/cpu/armv8/smccc-call.S | 2 ++
 2 files changed, 4 insertions(+)
arch/arm/cpu/armv7/smccc-call.S +2 -0
index eae69e36c3..f70728f2c4 100644
@@ -7,7 +7,9 @@
 #include <asm/opcodes-sec.h>
 #include <asm/opcodes-virt.h>
 
+#ifdef CONFIG_EFI_LOADER
 	.section	.text.efi_runtime
+#endif
 
 #define UNWIND(x...)
 	/*
arch/arm/cpu/armv8/smccc-call.S +0 -0
index 86de4b4089..dc92b28777 100644

arch/arm/cpu/armv8/smccc-call.S line 14

Quoted 9 lines
arch/arm/cpu/armv8/smccc-call.S +2 -0
@@ -6,7 +6,9 @@
 #include <linux/arm-smccc.h>
 #include <generated/asm-offsets.h>
 
+#ifdef CONFIG_EFI_LOADER
 	.section	.text.efi_runtime
+#endif
 
 	.macro SMCCC instr
 	.cfi_startproc

Thanks,
Michal

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs