Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6-0]: src/sys/arch/x86 Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/67fe1c2c4f2e
branches:  netbsd-6-0
changeset: 775135:67fe1c2c4f2e
user:      snj <snj%NetBSD.org@localhost>
date:      Thu Jul 14 06:48:19 2016 +0000

description:
Pull up following revision(s) (requested by hannken in ticket #1361):
        sys/arch/x86/include/cpufunc.h: revision 1.19
        sys/arch/x86/x86/errata.c: revision 1.23
Adapt prototypes and usage of rdmsr_locked() and wrmsr_locked() to
their implementation.  Both functions don't take the passcode as
argument.
As wrmsr_locked() no longer writes the passcode to the msr the
erratum 721 on my Opteron 2356 really gets patched and cc1 no longer
crashes with SIGSEGV.

diffstat:

 sys/arch/x86/include/cpufunc.h |   6 +++---
 sys/arch/x86/x86/errata.c      |  10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (64 lines):

diff -r 5cc134f90d14 -r 67fe1c2c4f2e sys/arch/x86/include/cpufunc.h
--- a/sys/arch/x86/include/cpufunc.h    Thu Jul 14 06:43:35 2016 +0000
+++ b/sys/arch/x86/include/cpufunc.h    Thu Jul 14 06:48:19 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.h,v 1.13 2011/09/24 10:32:52 jym Exp $ */
+/*     $NetBSD: cpufunc.h,v 1.13.14.1 2016/07/14 06:48:19 snj Exp $    */
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -117,12 +117,12 @@
 #define        OPTERON_MSR_PASSCODE    0x9c5a203aU
 
 uint64_t       rdmsr(u_int);
-uint64_t       rdmsr_locked(u_int, u_int);
+uint64_t       rdmsr_locked(u_int);
 int            rdmsr_safe(u_int, uint64_t *);
 uint64_t       rdtsc(void);
 uint64_t       rdpmc(u_int);
 void           wrmsr(u_int, uint64_t);
-void           wrmsr_locked(u_int, u_int, uint64_t);
+void           wrmsr_locked(u_int, uint64_t);
 void           setfs(int);
 void           setusergs(int);
 
diff -r 5cc134f90d14 -r 67fe1c2c4f2e sys/arch/x86/x86/errata.c
--- a/sys/arch/x86/x86/errata.c Thu Jul 14 06:43:35 2016 +0000
+++ b/sys/arch/x86/x86/errata.c Thu Jul 14 06:48:19 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: errata.c,v 1.19.14.1 2012/04/09 18:02:25 riz Exp $     */
+/*     $NetBSD: errata.c,v 1.19.14.1.4.1 2016/07/14 06:48:19 snj Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.19.14.1 2012/04/09 18:02:25 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.19.14.1.4.1 2016/07/14 06:48:19 snj Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
@@ -294,7 +294,7 @@
 
        (void)ci;
 
-       val = rdmsr_locked(e->e_data1, OPTERON_MSR_PASSCODE);
+       val = rdmsr_locked(e->e_data1);
        if ((val & e->e_data2) != 0)
                return FALSE;
 
@@ -309,10 +309,10 @@
 
        (void)ci;
 
-       val = rdmsr_locked(e->e_data1, OPTERON_MSR_PASSCODE);
+       val = rdmsr_locked(e->e_data1);
        if ((val & e->e_data2) != 0)
                return FALSE;
-       wrmsr_locked(e->e_data1, OPTERON_MSR_PASSCODE, val | e->e_data2);
+       wrmsr_locked(e->e_data1, val | e->e_data2);
        aprint_debug_dev(ci->ci_dev, "erratum %d patched\n",
            e->e_num);
 



Home | Main Index | Thread Index | Old Index