Changed the Intel core temperature reading to evaluate the "Reading Valid" bit 31 for package level sensors as well (undocumented).

This commit is contained in:
Michael Möller
2013-08-03 13:12:07 +00:00
parent 7513405fba
commit fb67ee38dc
2 changed files with 17 additions and 18 deletions

View File

@@ -305,11 +305,10 @@ namespace OpenHardwareMonitor.Hardware.CPU {
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) {
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;
@@ -319,13 +318,13 @@ namespace OpenHardwareMonitor.Hardware.CPU {
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;

View File

@@ -10,5 +10,5 @@
using System.Reflection;
[assembly: AssemblyVersion("0.6.0.5")]
[assembly: AssemblyInformationalVersion("0.6.0.5 Alpha")]
[assembly: AssemblyVersion("0.6.0.6")]
[assembly: AssemblyInformationalVersion("0.6.0.6 Alpha")]