The following patch fixes the the detection of the on-die temp sensor
for Atom E6xx CPUs (and possibly other Atom CPUs). The code was only
matching processors where the model began with "Intel" but this Atom
CPU model begins with "Genuine Intel" so I've updated the logic to
match.

Now I get:

# sysctl hw
hw.machine=amd64
hw.model=Genuine Intel(R) CPU @ 1.60GHz
hw.ncpu=2
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0:937db626fa67a9f0
hw.diskcount=1
hw.sensors.cpu0.temp0=66.00 degC
hw.sensors.cpu1.temp0=66.00 degC
hw.cpuspeed=600
hw.setperf=0
hw.physmem=2146304000
hw.usermem=2146287616
hw.ncpufound=2
hw.allowpowerdown=1

This only seems to affect the amd64 port, I can't find similar logic in
the i386 port.

Matt

--- sys/arch/amd64/amd64/identcpu.c.orig        2013-01-14 22:23:43.000000000 
+0000
+++ sys/arch/amd64/amd64/identcpu.c     2013-01-14 22:33:21.000000000 +0000
@@ -506,7 +506,8 @@
                if (ci->ci_feature_sefflags & SEFF0EBX_SMAP)
                        replacesmap();
        }
-       if (!strncmp(mycpu_model, "Intel", 5)) {
+       if (!strncmp(mycpu_model, "Intel", 5) ||
+           !strncmp(mycpu_model, "Genuine Intel", 13)) {
                u_int32_t cflushsz;
 
                CPUID(0x01, dummy, cflushsz, dummy, dummy);

Reply via email to