
With start.o being compiled to A32 for ARMv7 (and no Thumb mode), we need to ensure that the call to save_boot_params_ret either happens from ARM mode or uses an interwork branch.
To keep things simple, we force bootrom.o to always be A32 code by setting specific CFLAGS for this compilation unit. Note that marking save_boot_params_ret with the 'target(arm)'-function attribute did not generate an interwork branch when calling save_boot_params_ret.
Reported-by: Andy Yan andy.yan@rock-chips.com Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
---
Changes in v2: None
arch/arm/mach-rockchip/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index f8b23ea..405b30c 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -4,6 +4,12 @@ # SPDX-License-Identifier: GPL-2.0+ #
+# The bootrom-helper needs to be ARM (i.e. not Thumb code) due to the +# way setjmp/longjmp is implemented. +ifndef CONFIG_ARM64 +CFLAGS_bootrom.o := -marm +endif + # We don't want the bootrom-helper present in a full U-Boot build, as # this may have entered from ATF with the stack-pointer pointing to # inaccessible/protected memory (and the bootrom-helper assumes that