I've tried to find online some info relating to this issue, but could not find anything. Is there an option to trigger an interrupt when a specified core temperature is reached? via MSR, or any other method.
Two basic mechanisms are discussed in Chapter 14 of Volume 3 of the Intel Architectures Software Developers Manual (document 325384, revision 071, October 2019).
- Section 14.7 discusses the MSRs associated with the core-level thermal throttling controls, including interrupt enable and set temperature.
- Section 14.8 discusses the MSRs associated with the package-level thermal throttling controls.
The IA32_THERM_INTERRUPT and IA32_PACKAGE_THERM_INTERRUPT MSRs control many different interrupts. Some of these appear to be directly tied to the corresponding thermal throttling mechanisms, while others appear to be independent. The two that look like exactly what you want are the "Threshold #1" and "Threshold #2" interrupts. The temperatures and enable bits for both are in the *_THERM_INTERRUPT MSRs, and they are not associated with any of the automatic throttling mechanisms.