Module Name: src
Committed By: christos
Date: Sat May 11 12:58:17 UTC 2019
Modified Files:
src/sys/arch/x86/include: Makefile cpufunc.h
Log Message:
expose the {rd,wr}msr functions to userland and install the header for
the benefit of cpuctl (fix the build).
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x86/include/Makefile
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/x86/include/cpufunc.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/include/Makefile
diff -u src/sys/arch/x86/include/Makefile:1.22 src/sys/arch/x86/include/Makefile:1.23
--- src/sys/arch/x86/include/Makefile:1.22 Sat Feb 17 08:01:23 2018
+++ src/sys/arch/x86/include/Makefile Sat May 11 08:58:17 2019
@@ -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 @@ INCS= aout_machdep.h \
cpu_extended_state.h \
cpu_rng.h \
cpu_ucode.h \
+ cpufunc.h \
cputypes.h \
cpuvar.h \
float.h \
Index: src/sys/arch/x86/include/cpufunc.h
diff -u src/sys/arch/x86/include/cpufunc.h:1.28 src/sys/arch/x86/include/cpufunc.h:1.29
--- src/sys/arch/x86/include/cpufunc.h:1.28 Thu May 9 13:09:50 2019
+++ src/sys/arch/x86/include/cpufunc.h Sat May 11 08:58:17 2019
@@ -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 @@ void x86_reset(void);
*/
#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 @@ rdmsr(u_int msr)
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 @@ wrmsr(u_int msr, uint64_t val)
);
}
-void wrmsr_locked(u_int, uint64_t);
-
-#endif /* _KERNEL */
-
#endif /* !_X86_CPUFUNC_H_ */