summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-05-28 20:10:59 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-05-28 20:10:59 +0000
commit9720dcf9b0f447cb8683388f03629410cd4b255a (patch)
treec9a4d56527132ba0a2a541b86cba5cb56dee2931 /sys/arch/i386/include
parent86241f3476e7a76d21eda4b22cb2da3381bab123 (diff)
Save the cpuid(6) eax bits in the cpu_info and report the SENSOR and ARAT
bits from it. ok krw@ kettenis@
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r--sys/arch/i386/include/cpu.h3
-rw-r--r--sys/arch/i386/include/specialreg.h8
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 14033d378d0..623154e993d 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.139 2015/04/18 22:16:21 kettenis Exp $ */
+/* $OpenBSD: cpu.h,v 1.140 2015/05/28 20:10:58 guenther Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -118,6 +118,7 @@ struct cpu_info {
u_int32_t ci_model; /* extended cpuid model */
u_int32_t ci_feature_flags; /* X86 CPUID feature bits */
u_int32_t ci_feature_sefflags; /* more CPUID feature bits */
+ u_int32_t ci_feature_tpmflags; /* thermal & power bits */
u_int32_t cpu_class; /* CPU class */
u_int32_t ci_cflushsz; /* clflush cache-line size */
diff --git a/sys/arch/i386/include/specialreg.h b/sys/arch/i386/include/specialreg.h
index 3bb33b3f4ce..7f1f341dfdf 100644
--- a/sys/arch/i386/include/specialreg.h
+++ b/sys/arch/i386/include/specialreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specialreg.h,v 1.50 2015/03/25 20:59:30 kettenis Exp $ */
+/* $OpenBSD: specialreg.h,v 1.51 2015/05/28 20:10:58 guenther Exp $ */
/* $NetBSD: specialreg.h,v 1.7 1994/10/27 04:16:26 cgd Exp $ */
/*-
@@ -178,6 +178,12 @@
#define SEFF0EBX_SMAP 0x00100000 /* Supervisor mode access prevent */
/*
+ * Thermal and Power Management (CPUID function 0x6) EAX bits
+ */
+#define TPM_SENSOR 0x00000001 /* Digital temp sensor */
+#define TPM_ARAT 0x00000004 /* APIC Timer Always Running */
+
+/*
* "Architectural Performance Monitoring" bits (CPUID function 0x0a):
* EAX bits
*/