From: Paulo Flabiano Smorigo Date: Thu, 25 Sep 2014 22:33:39 +0000 (-0300) Subject: Disable VSX instruction X-Git-Tag: archive/raspbian/2.12-8+rpi1~49 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6940f33e676b8b07b1b187b0a8347f136baa108c;p=grub2.git Disable VSX instruction VSX bit is enabled by default for Power7 and Power8 CPU models, so we need to disable them in order to avoid instruction exceptions. Kernel will activate it when necessary. * grub-core/kern/powerpc/ieee1275/startup.S: Disable VSX. Also-By: Adhemerval Zanella Also-By: Colin Watson Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00078.html Last-Update: 2015-01-27 Patch-Name: ppc64el-disable-vsx.patch Gbp-Pq: Name ppc64el-disable-vsx.patch --- diff --git a/grub-core/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S index 21c884b..de9a960 100644 --- a/grub-core/kern/powerpc/ieee1275/startup.S +++ b/grub-core/kern/powerpc/ieee1275/startup.S @@ -20,6 +20,8 @@ #include #include +#define MSR_VSX 0x80 + .extern __bss_start .extern _end @@ -28,6 +30,16 @@ .globl start, _start start: _start: + _start: + + /* Disable VSX instruction */ + mfmsr 0 + oris 0,0,MSR_VSX + /* The "VSX Available" bit is in the lower half of the MSR, so we + don't need mtmsrd, which in any case won't work in 32-bit mode. */ + mtmsr 0 + isync + li 2, 0 li 13, 0