grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
To: grub-devel@gnu.org
Cc: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
Subject: [PATCH] Disable VSX instruction
Date: Thu, 25 Sep 2014 18:28:01 -0300	[thread overview]
Message-ID: <1411680481-24782-1-git-send-email-pfsmorigo@linux.vnet.ibm.com> (raw)

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.

Also-By: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
---
 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  <pfsmorigo@linux.vnet.ibm.com>
+
+	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  <cjwatson@ubuntu.com>
 
 	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 interrupt instruction */
+	mfmsr  0
+	oris   0,0,MSR_VSX
+	mtmsrd 0
+	isync
+
 	li      2, 0
 	li      13, 0
 
-- 
1.8.1.4



             reply	other threads:[~2014-09-25 22:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 21:28 Paulo Flabiano Smorigo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-09-25 22:33 [PATCH] Disable VSX instruction Paulo Flabiano Smorigo
2014-09-26 10:14 ` Colin Watson
2014-09-26 13:52   ` Paulo Flabiano Smorigo
2014-09-27  4:41     ` Andrei Borzenkov
2014-09-29 12:14       ` Paulo Flabiano Smorigo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411680481-24782-1-git-send-email-pfsmorigo@linux.vnet.ibm.com \
    --to=pfsmorigo@linux.vnet.ibm.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).