grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Disable VSX instruction


From: Paulo Flabiano Smorigo
Subject: [PATCH] Disable VSX instruction
Date: Thu, 25 Sep 2014 19:33:39 -0300
User-agent: Mutt/1.5.22.1 (2013-10-16)

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 <address@hidden>
---
 ChangeLog                                 | 10 ++++++++++
 grub-core/kern/powerpc/ieee1275/startup.S | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 192e8bc..c1b0637 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-09-25  Paulo Flabiano Smroigo  <address@hidden>
+
+       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.
+
 2014-09-25  Colin Watson  <address@hidden>
 
        Fix in-tree --platform=none
diff --git a/grub-core/kern/powerpc/ieee1275/startup.S 
b/grub-core/kern/powerpc/ieee1275/startup.S
index 21c884b..c4621a6 100644
--- a/grub-core/kern/powerpc/ieee1275/startup.S
+++ b/grub-core/kern/powerpc/ieee1275/startup.S
@@ -20,6 +20,8 @@
 #include <grub/symbol.h>
 #include <grub/offsets.h>
 
+#define MSR_VSX 0x80
+
 .extern __bss_start
 .extern _end
 
@@ -28,6 +30,14 @@
        .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
 
-- 
1.8.1.4


-- 
Paulo Flabiano Smorigo
IBM Linux Technology Center




reply via email to

[Prev in Thread] Current Thread [Next in Thread]