Skip to content

Commit 7cadc81

Browse files
committed
[Intel] Temperature thresholds are now decoded relative to the TCC Activation
1 parent 907486c commit 7cadc81

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

corefreqk.c

+16-6
Original file line numberDiff line numberDiff line change
@@ -8118,10 +8118,15 @@ void ThermalMonitor_IA32(CORE_RO *Core)
81188118
RDMSR(ThermInterrupt, MSR_IA32_THERM_INTERRUPT);
81198119

81208120
Core->ThermalPoint.Value[THM_THRESHOLD_1] = \
8121-
ThermInterrupt.Threshold1_Value;
8121+
Core->PowerThermal.Param.Offset[0]
8122+
- Core->PowerThermal.Param.Offset[1]
8123+
- ThermInterrupt.Threshold1_Value;
81228124

81238125
Core->ThermalPoint.Value[THM_THRESHOLD_2] = \
8124-
ThermInterrupt.Threshold2_Value;
8126+
Core->PowerThermal.Param.Offset[0]
8127+
- Core->PowerThermal.Param.Offset[1]
8128+
- ThermInterrupt.Threshold2_Value;
8129+
81258130
if (ThermInterrupt.Threshold1_Int) {
81268131
BITSET(LOCKLESS, Core->ThermalPoint.State, THM_THRESHOLD_1);
81278132
} else {
@@ -8199,10 +8204,15 @@ void ThermalMonitor_IA32(CORE_RO *Core)
81998204
RDMSR(ThermInterrupt, MSR_IA32_PACKAGE_THERM_INTERRUPT);
82008205

82018206
PUBLIC(RO(Proc))->ThermalPoint.Value[THM_THRESHOLD_1] = \
8202-
ThermInterrupt.Threshold1_Value;
8207+
Core->PowerThermal.Param.Offset[0]
8208+
- Core->PowerThermal.Param.Offset[1]
8209+
- ThermInterrupt.Threshold1_Value;
82038210

82048211
PUBLIC(RO(Proc))->ThermalPoint.Value[THM_THRESHOLD_2] = \
8205-
ThermInterrupt.Threshold2_Value;
8212+
Core->PowerThermal.Param.Offset[0]
8213+
- Core->PowerThermal.Param.Offset[1]
8214+
- ThermInterrupt.Threshold2_Value;
8215+
82068216
if (ThermInterrupt.Threshold1_Int) {
82078217
BITSET(LOCKLESS, PUBLIC(RO(Proc))->ThermalPoint.State,
82088218
THM_THRESHOLD_1);
@@ -8272,8 +8282,6 @@ void ThermalMonitor_Set(CORE_RO *Core)
82728282
Core->PowerThermal.Param.Offset[0] = 100;
82738283
}
82748284

8275-
ThermalMonitor_IA32(Core);
8276-
82778285
RDMSR(PfInfo, MSR_PLATFORM_INFO);
82788286

82798287
if (PfInfo.ProgrammableTj)
@@ -8297,6 +8305,8 @@ void ThermalMonitor_Set(CORE_RO *Core)
82978305
break;
82988306
}
82998307
}
8308+
8309+
ThermalMonitor_IA32(Core);
83008310
}
83018311

83028312
void CorePerfLimitReasons(CORE_RO *Core)

0 commit comments

Comments
 (0)