public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH u-boot] powerpc/mpc85xx: Disable AltiVec and VSX instructions
@ 2022-12-19 21:46 Pali Rohár
  2022-12-23 15:01 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Pali Rohár @ 2022-12-19 21:46 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot

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.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 arch/powerpc/cpu/mpc85xx/config.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/cpu/mpc85xx/config.mk b/arch/powerpc/cpu/mpc85xx/config.mk
index 482bb90cb120..71a98f05c902 100644
--- a/arch/powerpc/cpu/mpc85xx/config.mk
+++ b/arch/powerpc/cpu/mpc85xx/config.mk
@@ -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
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-23 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-19 21:46 [PATCH u-boot] powerpc/mpc85xx: Disable AltiVec and VSX instructions Pali Rohár
2022-12-23 15:01 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox