Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/include expose the {rd, wr}msr functions to user...



details:   https://anonhg.NetBSD.org/src/rev/a7013109c615
branches:  trunk
changeset: 451242:a7013109c615
user:      christos <christos%NetBSD.org@localhost>
date:      Sat May 11 12:58:17 2019 +0000

description:
expose the {rd,wr}msr functions to userland and install the header for
the benefit of cpuctl (fix the build).

diffstat:

 sys/arch/x86/include/Makefile  |   3 ++-
 sys/arch/x86/include/cpufunc.h |  15 +++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (58 lines):

diff -r 0feb0850c2e6 -r a7013109c615 sys/arch/x86/include/Makefile
--- a/sys/arch/x86/include/Makefile     Sat May 11 12:24:42 2019 +0000
+++ b/sys/arch/x86/include/Makefile     Sat May 11 12:58:17 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.22 2018/02/17 13:01:23 kamil Exp $
+#      $NetBSD: Makefile,v 1.23 2019/05/11 12:58:17 christos Exp $
 
 INCSDIR=/usr/include/x86
 
@@ -9,6 +9,7 @@
        cpu_extended_state.h \
        cpu_rng.h \
        cpu_ucode.h \
+       cpufunc.h \
        cputypes.h \
        cpuvar.h \
        float.h \
diff -r 0feb0850c2e6 -r a7013109c615 sys/arch/x86/include/cpufunc.h
--- a/sys/arch/x86/include/cpufunc.h    Sat May 11 12:24:42 2019 +0000
+++ b/sys/arch/x86/include/cpufunc.h    Sat May 11 12:58:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.h,v 1.28 2019/05/09 17:09:50 bouyer Exp $      */
+/*     $NetBSD: cpufunc.h,v 1.29 2019/05/11 12:58:17 christos Exp $    */
 
 /*
  * Copyright (c) 1998, 2007, 2019 The NetBSD Foundation, Inc.
@@ -329,6 +329,12 @@
  */
 #define        OPTERON_MSR_PASSCODE    0x9c5a203aU
 
+uint64_t       rdmsr_locked(u_int);
+int            rdmsr_safe(u_int, uint64_t *);
+void           wrmsr_locked(u_int, uint64_t);
+
+#endif /* _KERNEL */
+
 static inline uint64_t
 rdmsr(u_int msr)
 {
@@ -343,9 +349,6 @@
        return (low | ((uint64_t)high << 32));
 }
 
-uint64_t       rdmsr_locked(u_int);
-int            rdmsr_safe(u_int, uint64_t *);
-
 static inline void
 wrmsr(u_int msr, uint64_t val)
 {
@@ -360,8 +363,4 @@
        );
 }
 
-void           wrmsr_locked(u_int, uint64_t);
-
-#endif /* _KERNEL */
-
 #endif /* !_X86_CPUFUNC_H_ */



Home | Main Index | Thread Index | Old Index