summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2007-05-29 06:31:45 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2007-05-29 06:31:45 +0000
commit05f81c945b10f986b9e4ca4939581b2d66e70814 (patch)
treeda613429f60c21cd49f4a3e115dae7fc10c9adfd /sys/arch/amd64/include
parent3623ba65f6f3938704e0176cf7e3d6dfdaf6a179 (diff)
Some improvements for better intel cpu support.
Add EST support from i386, minus the tables Also add in support for CPU temperature sensors, based on diff to tech by Pierre Riteau. ok deraadt gwk
Diffstat (limited to 'sys/arch/amd64/include')
-rw-r--r--sys/arch/amd64/include/cpu.h9
-rw-r--r--sys/arch/amd64/include/specialreg.h15
2 files changed, 22 insertions, 2 deletions
diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h
index ef0bce98095..c99ec07058f 100644
--- a/sys/arch/amd64/include/cpu.h
+++ b/sys/arch/amd64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.29 2007/05/10 17:59:24 deraadt Exp $ */
+/* $OpenBSD: cpu.h,v 1.30 2007/05/29 06:31:44 tedu Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
@@ -55,6 +55,7 @@
#include <sys/device.h>
#include <sys/lock.h>
#include <sys/sched.h>
+#include <sys/sensors.h>
struct cpu_info {
struct device *ci_dev;
@@ -127,6 +128,9 @@ struct cpu_info {
struct x86_64_tss ci_doubleflt_tss;
char *ci_doubleflt_stack;
+
+ struct ksensordev ci_sensordev;
+ struct ksensor ci_sensor;
};
#define CPUF_BSP 0x0001 /* CPU is the original BSP */
@@ -308,6 +312,9 @@ void x86_bus_space_mallocok(void);
void k8_powernow_init(struct cpu_info *);
void k8_powernow_setperf(int);
+void est_init(struct cpu_info *);
+void est_setperf(int);
+
#ifdef MULTIPROCESSOR
/* mp_setperf.c */
void mp_setperf_init(void);
diff --git a/sys/arch/amd64/include/specialreg.h b/sys/arch/amd64/include/specialreg.h
index 6b24513bef4..cdc85739ed6 100644
--- a/sys/arch/amd64/include/specialreg.h
+++ b/sys/arch/amd64/include/specialreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specialreg.h,v 1.8 2007/04/27 01:57:16 dlg Exp $ */
+/* $OpenBSD: specialreg.h,v 1.9 2007/05/29 06:31:44 tedu Exp $ */
/* $NetBSD: specialreg.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */
/* $NetBSD: x86/specialreg.h,v 1.2 2003/04/25 21:54:30 fvdl Exp $ */
@@ -173,6 +173,7 @@
#define MSR_BIOS_SIGN 0x08b
#define MSR_PERFCTR0 0x0c1
#define MSR_PERFCTR1 0x0c2
+#define MSR_FSB_FREQ 0x0cd /* Core Duo/Solo only */
#define MSR_MTRRcap 0x0fe
#define MSR_BBL_CR_ADDR 0x116 /* PII+ only */
#define MSR_BBL_CR_DECC 0x118 /* PII+ only */
@@ -188,6 +189,14 @@
#define MSR_MCG_CTL 0x17b
#define MSR_EVNTSEL0 0x186
#define MSR_EVNTSEL1 0x187
+#define MSR_PERF_STATUS 0x198 /* Pentium M */
+#define MSR_PERF_CTL 0x199 /* Pentium M */
+#define MSR_THERM_CONTROL 0x19a
+#define MSR_THERM_INTERRUPT 0x19b
+#define MSR_THERM_STATUS 0x19c
+#define MSR_THERM_STATUS_VALID_BIT 0x80000000
+#define MSR_THERM_STATUS_TEMP(msr) ((msr >> 16) & 0x7f)
+#define MSR_THERM2_CTL 0x19d /* Pentium M */
#define MSR_DEBUGCTLMSR 0x1d9
#define MSR_LASTBRANCHFROMIP 0x1db
#define MSR_LASTBRANCHTOIP 0x1dc
@@ -620,3 +629,7 @@
#define K7_BP1_MATCH 0xdd
#define K7_BP2_MATCH 0xde
#define K7_BP3_MATCH 0xdf
+
+/* not documented anywhere, see intelcore_update_sensor() */
+#define MSR_TEMPERATURE_TARGET 0xee
+#define MSR_TEMPERATURE_TARGET_LOW_BIT 0x40000000