NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/58372: Temperature reading broken on Intel Core 2 Duo E6300 (patch provided)



>Number:         58372
>Category:       kern
>Synopsis:       Temperature reading broken on Intel Core 2 Duo E6300 (patch provided)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 27 06:50:00 +0000 2024
>Originator:     Sotiris Lamprinidis
>Release:        netbsd-10
>Organization:
>Environment:
NetBSD 10.0_STABLE amd64
>Description:
On a core2duo E6300 machine the Tjmax cannot be detected and set to 0, consequently displaying negative temperatures in envstat. Using the table from [1] for processor signature 000006Fxh and MSR_IA32_PLATFORM_ID(0x17)[28] == 0 this is a non-mobile processor and according to [2,pp.77] Tjmax is 74.1 at its TDP. 

References
[1]: mobile intel core2 processor detection table (https://web.archive.org/web/20110608131711/http://software.intel.com/en-us/articles/mobile-intel-core2-processor-detection-table/)
[2]: intel pentium dual-core processor e6000 and e5000 series datasheet (https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/pentium-dual-core-e6000-e5000-datasheet.pdf)
>How-To-Repeat:

>Fix:
Index: sys/arch/x86/x86/coretemp.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/coretemp.c,v
retrieving revision 1.38.4.1
diff -u -r1.38.4.1 coretemp.c
--- sys/arch/x86/x86/coretemp.c 29 Jul 2023 10:58:02 -0000      1.38.4.1
+++ sys/arch/x86/x86/coretemp.c 27 Jun 2024 06:39:49 -0000
@@ -285,6 +285,14 @@
                 */
                if (rdmsr_safe(MSR_IA32_PLATFORM_ID, &msr) != 0)
                        goto notee;
+
+               if (((ci->ci_signature & __BITS(4, 32)) == 0x006f0) &&
+                               ((msr & __BIT(28)) == 0)) {
+                       /* core duo 65nm */
+                       sc->sc_tjmax = 74;
+                       return;
+               }
+
                if ((model < 0x17) && ((msr & __BIT(28)) == 0))
                        goto notee;
 



Home | Main Index | Thread Index | Old Index