1.1 --- a/Hardware/CPU/IntelCPU.cs Thu Aug 01 11:57:09 2013 +0000
1.2 +++ b/Hardware/CPU/IntelCPU.cs Sat Aug 03 13:12:07 2013 +0000
1.3 @@ -305,27 +305,26 @@
1.4
1.5 for (int i = 0; i < coreTemperatures.Length; i++) {
1.6 uint eax, edx;
1.7 - if (Ring0.RdmsrTx(
1.8 - IA32_THERM_STATUS_MSR, out eax, out edx,
1.9 - 1UL << cpuid[i][0].Thread)) {
1.10 - // if reading is valid
1.11 - if ((eax & 0x80000000) != 0) {
1.12 - // get the dist from tjMax from bits 22:16
1.13 - float deltaT = ((eax & 0x007F0000) >> 16);
1.14 - float tjMax = coreTemperatures[i].Parameters[0].Value;
1.15 - float tSlope = coreTemperatures[i].Parameters[1].Value;
1.16 - coreTemperatures[i].Value = tjMax - tSlope * deltaT;
1.17 - } else {
1.18 - coreTemperatures[i].Value = null;
1.19 - }
1.20 + // if reading is valid
1.21 + if (Ring0.RdmsrTx(IA32_THERM_STATUS_MSR, out eax, out edx,
1.22 + 1UL << cpuid[i][0].Thread) && (eax & 0x80000000) != 0)
1.23 + {
1.24 + // get the dist from tjMax from bits 22:16
1.25 + float deltaT = ((eax & 0x007F0000) >> 16);
1.26 + float tjMax = coreTemperatures[i].Parameters[0].Value;
1.27 + float tSlope = coreTemperatures[i].Parameters[1].Value;
1.28 + coreTemperatures[i].Value = tjMax - tSlope * deltaT;
1.29 + } else {
1.30 + coreTemperatures[i].Value = null;
1.31 }
1.32 }
1.33
1.34 if (packageTemperature != null) {
1.35 uint eax, edx;
1.36 - if (Ring0.RdmsrTx(
1.37 - IA32_PACKAGE_THERM_STATUS, out eax, out edx,
1.38 - 1UL << cpuid[0][0].Thread)) {
1.39 + // if reading is valid
1.40 + if (Ring0.RdmsrTx(IA32_PACKAGE_THERM_STATUS, out eax, out edx,
1.41 + 1UL << cpuid[0][0].Thread) && (eax & 0x80000000) != 0)
1.42 + {
1.43 // get the dist from tjMax from bits 22:16
1.44 float deltaT = ((eax & 0x007F0000) >> 16);
1.45 float tjMax = packageTemperature.Parameters[0].Value;