summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2008-02-14 14:14:59 +0000
committerrpaulo <rpaulo@FreeBSD.org>2008-02-14 14:14:59 +0000
commit6137f591eda97a3f40f8d6b1425fb907dd3ebb01 (patch)
tree93c239d9d3564ccb88c93cb7f22efa40a8b170e7 /sys
parentfda3d327bb53def2427bfd1e96bf8bf1fd4b91ac (diff)
downloadFreeBSD-src-6137f591eda97a3f40f8d6b1425fb907dd3ebb01.zip
FreeBSD-src-6137f591eda97a3f40f8d6b1425fb907dd3ebb01.tar.gz
Don't attach to non Core CPUs. This is needed because on the PIII,
querying the number of sensors returns > 0. PR: 120541 Approved by: njl (mentor)
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/coretemp/coretemp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/coretemp/coretemp.c b/sys/dev/coretemp/coretemp.c
index ceaa41d..7bb7b63 100644
--- a/sys/dev/coretemp/coretemp.c
+++ b/sys/dev/coretemp/coretemp.c
@@ -143,6 +143,15 @@ coretemp_attach(device_t dev)
cpu_model += ((cpu_id >> 16) & 0xf) << 4;
cpu_mask = cpu_id & 15;
+ /*
+ * Some CPUs, namely the PIII, don't have thermal sensors, but
+ * report them when the CPUID check is performed in
+ * coretemp_identify(). This leads to a later GPF when the sensor
+ * is queried via a MSR, so we stop here.
+ */
+ if (cpu_model < 0xe)
+ return (ENXIO);
+
#if 0 /*
* XXXrpaulo: I have this CPU model and when it returns from C3
* coretemp continues to function properly.
OpenPOWER on IntegriCloud