]> git.proxmox.com Git - grub2.git/commitdiff
Disable VSX instruction
authorPaulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
Thu, 25 Sep 2014 22:33:39 +0000 (19:33 -0300)
committerColin Watson <cjwatson@debian.org>
Fri, 26 Sep 2014 12:38:48 +0000 (13:38 +0100)
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 <azanella@linux.vnet.ibm.com>
Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00078.html
Last-Update: 2014-09-26

Patch-Name: ppc64el-disable-vsx.patch

grub-core/kern/powerpc/ieee1275/startup.S

index 21c884b433897e1dae15b06d1340ce0280f77c31..b4d9c219f0668b650720e7e4711bcdc52cfe8d45 100644 (file)
@@ -20,6 +20,8 @@
 #include <grub/symbol.h>
 #include <grub/offsets.h>
 
+#define MSR_VSX 0x80
+
 .extern __bss_start
 .extern _end
 
        .globl  start, _start
 start:
 _start:
+ _start:
+
+    /* Disable VSX instruction */
+       mfmsr  0
+       oris   0,0,MSR_VSX
+       mtmsrd 0
+       isync
+
        li      2, 0
        li      13, 0