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 Add Intel/AMD MONITOR/MWAIT leaf.



details:   https://anonhg.NetBSD.org/src/rev/ed49906ba975
branches:  trunk
changeset: 994791:ed49906ba975
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Nov 22 06:14:35 2018 +0000

description:
Add Intel/AMD MONITOR/MWAIT leaf.

diffstat:

 sys/arch/x86/include/specialreg.h |  20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r 0ac303f4ad2a -r ed49906ba975 sys/arch/x86/include/specialreg.h
--- a/sys/arch/x86/include/specialreg.h Thu Nov 22 04:51:41 2018 +0000
+++ b/sys/arch/x86/include/specialreg.h Thu Nov 22 06:14:35 2018 +0000
@@ -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.
  */



Home | Main Index | Thread Index | Old Index