source: grub-pc/trunk/fuentes/debian/patches/ppc64el-disable-vsx.patch @ 22

Last change on this file since 22 was 22, checked in by mabarracus, 4 years ago

updated version and apply net.ifnames=0 into debian/rules

File size: 1.4 KB
  • grub-core/kern/powerpc/ieee1275/startup.S

    From 7fdfd21bfaec8d01638942704949a651c73c2f41 Mon Sep 17 00:00:00 2001
    From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
    Date: Thu, 25 Sep 2014 19:33:39 -0300
    Subject: 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.
    
    Also-By: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
    Also-By: Colin Watson <cjwatson@debian.org>
    
    Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00078.html
    Last-Update: 2015-01-27
    
    Patch-Name: ppc64el-disable-vsx.patch
    ---
     grub-core/kern/powerpc/ieee1275/startup.S | 12 ++++++++++++
     1 file changed, 12 insertions(+)
    
    diff --git a/grub-core/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S
    index 21c884b..de9a960 100644
    a b  
    2020#include <grub/symbol.h>
    2121#include <grub/offsets.h>
    2222
     23#define MSR_VSX 0x80
     24
    2325.extern __bss_start
    2426.extern _end
    2527
     
    2830        .globl  start, _start
    2931start:
    3032_start:
     33 _start:
     34
     35    /* Disable VSX instruction */
     36        mfmsr  0
     37        oris   0,0,MSR_VSX
     38        /* The "VSX Available" bit is in the lower half of the MSR, so we
     39           don't need mtmsrd, which in any case won't work in 32-bit mode.  */
     40        mtmsr  0
     41        isync
     42
    3143        li      2, 0
    3244        li      13, 0
    3345
Note: See TracBrowser for help on using the repository browser.