mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-09-03 07:45:35 +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,27 +305,26 @@ namespace OpenHardwareMonitor.Hardware.CPU {
|
|||||||
|
|
||||||
for (int i = 0; i < coreTemperatures.Length; i++) {
|
for (int i = 0; i < coreTemperatures.Length; i++) {
|
||||||
uint eax, edx;
|
uint eax, edx;
|
||||||
if (Ring0.RdmsrTx(
|
// if reading is valid
|
||||||
IA32_THERM_STATUS_MSR, out eax, out edx,
|
if (Ring0.RdmsrTx(IA32_THERM_STATUS_MSR, out eax, out edx,
|
||||||
1UL << cpuid[i][0].Thread)) {
|
1UL << cpuid[i][0].Thread) && (eax & 0x80000000) != 0)
|
||||||
// if reading is valid
|
{
|
||||||
if ((eax & 0x80000000) != 0) {
|
// get the dist from tjMax from bits 22:16
|
||||||
// get the dist from tjMax from bits 22:16
|
float deltaT = ((eax & 0x007F0000) >> 16);
|
||||||
float deltaT = ((eax & 0x007F0000) >> 16);
|
float tjMax = coreTemperatures[i].Parameters[0].Value;
|
||||||
float tjMax = coreTemperatures[i].Parameters[0].Value;
|
float tSlope = coreTemperatures[i].Parameters[1].Value;
|
||||||
float tSlope = coreTemperatures[i].Parameters[1].Value;
|
coreTemperatures[i].Value = tjMax - tSlope * deltaT;
|
||||||
coreTemperatures[i].Value = tjMax - tSlope * deltaT;
|
} else {
|
||||||
} else {
|
coreTemperatures[i].Value = null;
|
||||||
coreTemperatures[i].Value = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (packageTemperature != null) {
|
if (packageTemperature != null) {
|
||||||
uint eax, edx;
|
uint eax, edx;
|
||||||
if (Ring0.RdmsrTx(
|
// if reading is valid
|
||||||
IA32_PACKAGE_THERM_STATUS, out eax, out edx,
|
if (Ring0.RdmsrTx(IA32_PACKAGE_THERM_STATUS, out eax, out edx,
|
||||||
1UL << cpuid[0][0].Thread)) {
|
1UL << cpuid[0][0].Thread) && (eax & 0x80000000) != 0)
|
||||||
|
{
|
||||||
// get the dist from tjMax from bits 22:16
|
// get the dist from tjMax from bits 22:16
|
||||||
float deltaT = ((eax & 0x007F0000) >> 16);
|
float deltaT = ((eax & 0x007F0000) >> 16);
|
||||||
float tjMax = packageTemperature.Parameters[0].Value;
|
float tjMax = packageTemperature.Parameters[0].Value;
|
||||||
|
@@ -10,5 +10,5 @@
|
|||||||
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.6.0.5")]
|
[assembly: AssemblyVersion("0.6.0.6")]
|
||||||
[assembly: AssemblyInformationalVersion("0.6.0.5 Alpha")]
|
[assembly: AssemblyInformationalVersion("0.6.0.6 Alpha")]
|
Reference in New Issue
Block a user