From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XXHc4-0005DM-0L for mharc-grub-devel@gnu.org; Thu, 25 Sep 2014 18:34:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXHbu-0005DB-P9 for grub-devel@gnu.org; Thu, 25 Sep 2014 18:34:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXHbm-000210-UE for grub-devel@gnu.org; Thu, 25 Sep 2014 18:34:02 -0400 Received: from e24smtp01.br.ibm.com ([32.104.18.85]:33505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXHbm-00020D-I1 for grub-devel@gnu.org; Thu, 25 Sep 2014 18:33:54 -0400 Received: from /spool/local by e24smtp01.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Sep 2014 19:33:46 -0300 Received: from d24dlp01.br.ibm.com (9.18.248.204) by e24smtp01.br.ibm.com (10.172.0.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 25 Sep 2014 19:33:44 -0300 Received: from d24relay02.br.ibm.com (d24relay02.br.ibm.com [9.13.184.26]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id 5E8F93520050 for ; Thu, 25 Sep 2014 18:33:35 -0400 (EDT) Received: from d24av05.br.ibm.com (d24av05.br.ibm.com [9.18.232.44]) by d24relay02.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8PMWVFB25690142 for ; Thu, 25 Sep 2014 19:32:31 -0300 Received: from d24av05.br.ibm.com (localhost [127.0.0.1]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8PMXeYl015366 for ; Thu, 25 Sep 2014 18:33:41 -0400 Received: from beren.chocolate ([9.78.131.143]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s8PMXc45015054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 25 Sep 2014 18:33:40 -0400 Date: Thu, 25 Sep 2014 19:33:39 -0300 From: Paulo Flabiano Smorigo To: grub-devel@gnu.org Subject: [PATCH] Disable VSX instruction Message-ID: <20140925223336.GA24386@beren.chocolate> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.22.1 (2013-10-16) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14092522-1524-0000-0000-000000985977 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 32.104.18.85 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2014 22:34:10 -0000 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 --- 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 + + 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 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 #include +#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