grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Disable VSX instruction
@ 2014-09-25 22:33 Paulo Flabiano Smorigo
  2014-09-26 10:14 ` Colin Watson
  0 siblings, 1 reply; 6+ messages in thread
From: Paulo Flabiano Smorigo @ 2014-09-25 22:33 UTC (permalink / raw)
  To: grub-devel

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>
---
 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 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



^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] Disable VSX instruction
@ 2014-09-25 21:28 Paulo Flabiano Smorigo
  0 siblings, 0 replies; 6+ messages in thread
From: Paulo Flabiano Smorigo @ 2014-09-25 21:28 UTC (permalink / raw)
  To: grub-devel; +Cc: Paulo Flabiano Smorigo

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



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

end of thread, other threads:[~2014-09-29 12:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2014-09-25 21:28 Paulo Flabiano Smorigo

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).