mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-09-04 08:15:09 +00:00
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:
@@ -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;
|
||||
|
@@ -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")]
|
Reference in New Issue
Block a user