Module Name: src
Committed By: msaitoh
Date: Thu Nov 22 06:14:35 UTC 2018
Modified Files:
src/sys/arch/x86/include: specialreg.h
Log Message:
Add Intel/AMD MONITOR/MWAIT leaf.
To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/x86/include/specialreg.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/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.134 src/sys/arch/x86/include/specialreg.h:1.135
--- src/sys/arch/x86/include/specialreg.h:1.134 Wed Nov 21 12:18:53 2018
+++ src/sys/arch/x86/include/specialreg.h Thu Nov 22 06:14:35 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: specialreg.h,v 1.134 2018/11/21 12:18:53 msaitoh Exp $ */
+/* $NetBSD: specialreg.h,v 1.135 2018/11/22 06:14:35 msaitoh Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -282,6 +282,24 @@
#define CPUID_DCP_COMPLEX __BIT(2) /* Complex cache indexing */
/*
+ * Intel/AMD MONITOR/MWAIT
+ * Fn0000_0005
+ */
+/* %eax */
+#define CPUID_MON_MINSIZE __BITS(15, 0) /* Smallest monitor-line size */
+/* %ebx */
+#define CPUID_MON_MAXSIZE __BITS(15, 0) /* Largest monitor-line size */
+/* %ecx */
+#define CPUID_MON_EMX __BIT(0) /* MONITOR/MWAIT Extensions */
+#define CPUID_MON_IBE __BIT(1) /* Interrupt as Break Event */
+
+#define CPUID_MON_FLAGS "\20" \
+ "\1" "EMX" "\2" "IBE"
+
+/* %edx: number of substates for specific C-state */
+#define CPUID_MON_SUBSTATE(edx, cstate) (((edx) >> (cstate * 4)) & 0x0000000f)
+
+/*
* Intel/AMD Digital Thermal Sensor and
* Power Management, Fn0000_0006 - %eax.
*/