- * According to AMD OSRR for 17H, section 4.2.1, bits 31-21 of this register
- * provide the current temp. bit 19, when clear, means the temp is reported in
- * a range 0.."225C" (probable typo for 255C), and when set changes the range
- * to -49..206C.
+ * The default value of the HTC temperature threshold (Tctl_max) is specified
+ * in the AMD Family 14h Processor Power and Thermal Datasheet.
*/
-#define AMDTEMP_17H_CUR_TMP 0x59800
-#define AMDTEMP_17H_CUR_TMP_RANGE_SEL (1 << 19)
-#define AMDTEMP_17H_CUR_TMP_RANGE_OFF 490
+/* D18F3x64 Hardware Thermal Control (HTC) */
+#define AMD_REG_HTC_CTRL 0x64
+union reg_amd_htc_desc {
+ uint32_t u32;
+ struct reg_amd_htc_bits {
+ uint32_t HtcEn:1; /* 0 rw 1=HTC is enabled; the processor is capable of entering the HTC-active state. */
+ uint32_t r0:3; /* 3:1 Reserved. */
+ uint32_t HtcAct:1; /* 4 ro 1=The processor is currently in the HTC-active state. */
+ uint32_t HtcActSts:1; /* 5 ro Read; set-by-hardware; write-1-to-clear. Reset: 0. This bit is set by hardware when the processor enters the HTC-active state. It is cleared by writing a 1 to it. */
+ uint32_t HtcHystLmt:4; /* 27:24 rw HTC hysteresis. The processor exits the HTC active state when the temperature selected by HtcSlewSel is less than the HTC temperature limit (HtcTmpLmt) minus the HTC hysteresis (HtcHystLmt). */