cvs commit: src/sys/amd64/include specialreg.h src/sys/conf files.amd64 files.i386 src/sys/dev/coretemp coretemp.c src/sys/i386/include specialreg.h src/sys/modules Makefile src/sys/modules/coretemp Makefile src/sys/amd64/conf NOTES ...

Dag-Erling Smørgrav des at des.no
Wed Aug 15 14:39:52 PDT 2007


Henrik Brix Andersen <henrik at brixandersen.dk> writes:
> $ dmesg | grep coretemp
> coretemp0: <CPU On-Die Thermal Sensors> on cpu0
> coretemp1: <CPU On-Die Thermal Sensors> on cpu1
>
> $ sysctl dev.cpu.0.temperature
> dev.cpu.0.temperature: -50
>
> $ sysctl dev.cpu.1.temperature
> dev.cpu.1.temperature: -49

This means Tj(max) is not properly detected.  The CPU actually reports
the temperature as a delta from the maximum rated operating temperature
in degrees Celsius; you're seeing the raw value.

Actually, the bug is easy to see:

	if ((cpu_model == 0xf && cpu_mask > 3) || cpu_model == 0xe) {
		msr = rdmsr(MSR_IA32_EXT_CONFIG);
		if ((msr >> 30) & 0x1)
			sc->sc_tjmax = 85;
	} else
		sc->sc_tjmax = 100;

Initializing sc->sc_tjmax to 100 before the outer if test should fix
this.  Could you please test the attached patch?

> The ACPI thermal zones seem to provide much more realistic readings:
>
> $ sysctl hw.acpi.thermal.tz0.temperature
> hw.acpi.thermal.tz0.temperature: 65.0C
>
> $ sysctl hw.acpi.thermal.tz1.temperature
> hw.acpi.thermal.tz1.temperature: 67.0C

Those are not the same temperature sensors.  The actual temperature in
your CPU is around 50 degrees Celsius.  The ACPI thermal zones are
probably sensors on the motherboard.

DES
-- 
Dag-Erling Smørgrav - des at des.no

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tjmax.diff
Type: text/x-patch
Size: 751 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20070815/05af0dd1/tjmax.bin


More information about the cvs-src mailing list