]> git.proxmox.com Git - grub2.git/blob - debian/patches/ppc64el-disable-vsx.patch
Squash linuxefi* patches into a single patch
[grub2.git] / debian / patches / ppc64el-disable-vsx.patch
1 From 8d1ce15f28e65998352a3b4f11f9f08700027afa Mon Sep 17 00:00:00 2001
2 From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
3 Date: Thu, 25 Sep 2014 19:33:39 -0300
4 Subject: Disable VSX instruction
5
6 VSX bit is enabled by default for Power7 and Power8 CPU models,
7 so we need to disable them in order to avoid instruction exceptions.
8 Kernel will activate it when necessary.
9
10 * grub-core/kern/powerpc/ieee1275/startup.S: Disable VSX.
11
12 Also-By: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
13 Also-By: Colin Watson <cjwatson@debian.org>
14
15 Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00078.html
16 Last-Update: 2015-01-27
17
18 Patch-Name: ppc64el-disable-vsx.patch
19 ---
20 grub-core/kern/powerpc/ieee1275/startup.S | 12 ++++++++++++
21 1 file changed, 12 insertions(+)
22
23 diff --git a/grub-core/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S
24 index 21c884b43..de9a9601a 100644
25 --- a/grub-core/kern/powerpc/ieee1275/startup.S
26 +++ b/grub-core/kern/powerpc/ieee1275/startup.S
27 @@ -20,6 +20,8 @@
28 #include <grub/symbol.h>
29 #include <grub/offsets.h>
30
31 +#define MSR_VSX 0x80
32 +
33 .extern __bss_start
34 .extern _end
35
36 @@ -28,6 +30,16 @@
37 .globl start, _start
38 start:
39 _start:
40 + _start:
41 +
42 + /* Disable VSX instruction */
43 + mfmsr 0
44 + oris 0,0,MSR_VSX
45 + /* The "VSX Available" bit is in the lower half of the MSR, so we
46 + don't need mtmsrd, which in any case won't work in 32-bit mode. */
47 + mtmsr 0
48 + isync
49 +
50 li 2, 0
51 li 13, 0
52