Skip to contentSkip to conversation

powerpc/mpc85xx: Disable AltiVec and VSX instructions

PATCH In review Pali Rohár 2 participants 2 messages Dec 19, 2022 – Dec 23, 2022 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/mpc85xx: Disable AltiVec and VSX instructions

All vector instructions on powerpc mpc85xx must not be used because U-Boot does not enable them. Usage cause random crashes. SPE vector instructions are already disabled by compiler flags, so disable also AltiVec and VSX vector instructions.

Linux kernel disables AltiVec and VSX instructions too.

---
 arch/powerpc/cpu/mpc85xx/config.mk | 4 ++++
 1 file changed, 4 insertions(+)
arch/powerpc/cpu/mpc85xx/config.mk +4 -0
index 482bb90cb120..71a98f05c902 100644
@@ -13,6 +13,10 @@ PLATFORM_RELFLAGS += -msingle-pic-base -fno-jump-tables
 PLATFORM_CPPFLAGS += $(call cc-option,-mno-spe) \
 		     $(call cc-option,-mspe=no)
 
+# No AltiVec or VSX instructions when building u-boot
+PLATFORM_CPPFLAGS += $(call cc-option,-mno-altivec)
+PLATFORM_CPPFLAGS += $(call cc-option,-mno-vsx)
+
 ifdef CONFIG_E6500
 PLATFORM_CPPFLAGS += -mcpu=e6500
 else ifdef CONFIG_E5500
Signature · 1 line
2.20.1
#1 lore raw
Quoted 8 lines · Pali Rohár

All vector instructions on powerpc mpc85xx must not be used because U-Boot does not enable them. Usage cause random crashes. SPE vector instructions are already disabled by compiler flags, so disable also AltiVec and VSX vector instructions.

Linux kernel disables AltiVec and VSX instructions too.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom