[U-Boot] [PATCH] arm: Leave smccc calls in .text when efi_loader=n

Michal Simek monstr at monstr.eu
Mon Feb 11 14:56:08 UTC 2019


On 11. 02. 19 15:13, Alexander Graf wrote:
> 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
> 
> Reported-by: Michal Simek <monstr at monstr.eu>
> Fixes: 81ea00838c6 ("efi_loader: PSCI reset and shutdown")
> Signed-off-by: Alexander Graf <agraf at suse.de>
> ---
>  arch/arm/cpu/armv7/smccc-call.S | 2 ++
>  arch/arm/cpu/armv8/smccc-call.S | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/smccc-call.S b/arch/arm/cpu/armv7/smccc-call.S
> index eae69e36c3..f70728f2c4 100644
> --- a/arch/arm/cpu/armv7/smccc-call.S
> +++ b/arch/arm/cpu/armv7/smccc-call.S
> @@ -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...)
>  	/*
> diff --git a/arch/arm/cpu/armv8/smccc-call.S b/arch/arm/cpu/armv8/smccc-call.S
> index 86de4b4089..dc92b28777 100644
> --- a/arch/arm/cpu/armv8/smccc-call.S
> +++ b/arch/arm/cpu/armv8/smccc-call.S
> @@ -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
> 

Reported-by: Siva Durga Prasad Paladugu <siva.durga.paladugu at xilinx.com>
Tested-by: Michal Simek <monstr at monstr.eu>

Thanks,
Michal


-- 
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



More information about the U-Boot mailing list