# HG changeset patch # User moel.mich # Date 1375535527 0 # Node ID 3bba187d41c27464555d987e9e8204a4e6d74069 # Parent 4865cf06a7faf2c5221658f17d48a834e031812c Changed the Intel core temperature reading to evaluate the "Reading Valid" bit 31 for package level sensors as well (undocumented). diff -r 4865cf06a7fa -r 3bba187d41c2 Hardware/CPU/IntelCPU.cs --- a/Hardware/CPU/IntelCPU.cs Thu Aug 01 11:57:09 2013 +0000 +++ b/Hardware/CPU/IntelCPU.cs Sat Aug 03 13:12:07 2013 +0000 @@ -305,27 +305,26 @@ for (int i = 0; i < coreTemperatures.Length; i++) { uint eax, edx; - if (Ring0.RdmsrTx( - IA32_THERM_STATUS_MSR, out eax, out edx, - 1UL << cpuid[i][0].Thread)) { - // if reading is valid - if ((eax & 0x80000000) != 0) { - // get the dist from tjMax from bits 22:16 - float deltaT = ((eax & 0x007F0000) >> 16); - float tjMax = coreTemperatures[i].Parameters[0].Value; - float tSlope = coreTemperatures[i].Parameters[1].Value; - coreTemperatures[i].Value = tjMax - tSlope * deltaT; - } else { - coreTemperatures[i].Value = null; - } + // if reading is valid + if (Ring0.RdmsrTx(IA32_THERM_STATUS_MSR, out eax, out edx, + 1UL << cpuid[i][0].Thread) && (eax & 0x80000000) != 0) + { + // get the dist from tjMax from bits 22:16 + float deltaT = ((eax & 0x007F0000) >> 16); + float tjMax = coreTemperatures[i].Parameters[0].Value; + float tSlope = coreTemperatures[i].Parameters[1].Value; + coreTemperatures[i].Value = tjMax - tSlope * deltaT; + } else { + coreTemperatures[i].Value = null; } } if (packageTemperature != null) { uint eax, edx; - if (Ring0.RdmsrTx( - IA32_PACKAGE_THERM_STATUS, out eax, out edx, - 1UL << cpuid[0][0].Thread)) { + // if reading is valid + if (Ring0.RdmsrTx(IA32_PACKAGE_THERM_STATUS, out eax, out edx, + 1UL << cpuid[0][0].Thread) && (eax & 0x80000000) != 0) + { // get the dist from tjMax from bits 22:16 float deltaT = ((eax & 0x007F0000) >> 16); float tjMax = packageTemperature.Parameters[0].Value; diff -r 4865cf06a7fa -r 3bba187d41c2 Properties/AssemblyVersion.cs --- a/Properties/AssemblyVersion.cs Thu Aug 01 11:57:09 2013 +0000 +++ b/Properties/AssemblyVersion.cs Sat Aug 03 13:12:07 2013 +0000 @@ -10,5 +10,5 @@ using System.Reflection; -[assembly: AssemblyVersion("0.6.0.5")] -[assembly: AssemblyInformationalVersion("0.6.0.5 Alpha")] \ No newline at end of file +[assembly: AssemblyVersion("0.6.0.6")] +[assembly: AssemblyInformationalVersion("0.6.0.6 Alpha")] \ No newline at end of file