AMD CPU/APU temperature driver

From: Rozhuk Ivan <rozhuk.im_at_gmail.com>
Date: Mon, 6 Mar 2017 05:04:31 +0300
Hi!


New amdtemp driver needs more testers!


https://reviews.freebsd.org/D9759

Fast buld/install:
...download and apply patch...
kldunload amdtemp
cd /usr/src/sys/modules/amdtemp/
make
make install
make cleandir
kldload amdtemp


rus/eng: http://netlab.dhis.org/wiki/ru:software:freebsd:amdtemp


Read methods:
 - D18F3xE4 Thermtrip Status Register (TTS)
 - D18F3x64 Hardware Thermal Control (HTC) - tunables only, no temperature
 - D18F3xA4 Reported Temperature Control Register (RTC)
 - SB-TSI - Temperature Sensor Interface via CPU registers (TSI)
 - TSI via SMBus - not supported yet



Tunables:

D18F3xE4 Thermtrip Status Register
 - TjOffset (RD) - This field is the offset from CurTmp used to normalize to Tcontrol.
 - DiodeOffset (RD) - Thermal diode offset is used to correct the measurement made by an external temperature sensor.
 - ThermtpEn (RD) - The THERMTRIP state is supported by the processor.
 - Thermtrip (RD) - The processor has entered the THERMTRIP state.

D18F3x64 Hardware Thermal Control (HTC)
 - HtcTmpLmt (RD, Kelvin) - HTC temperature limit
 - HtcHystLmt (RW, Kelvin) - 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).
 - HtcEn (RW) - HTC is enabled; the processor is capable of entering the HTC-active state.
 - HtcLock (RW) - HtcPstateLimit, HtcHystLmt, HtcTmpLmt, and HtcEn are read-only.
 - HtcSlewSel (RW) - HTC slew-controlled temperature select.
 - HtcPstateLimit (RW) - HTC P-state limit select.
 - HtcAct (RW) - The processor is currently in the HTC-active state.
 - HtcActSts (RW) - 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.
 - PslApicHiEn (RW) - P-state limit higher value change APIC interrupt enable.
 - PslApicLoEn (RW) - P-state limit lower value change APIC interrupt enable.

D18F3xA4 Reported Temperature Control Register
 - CurTmp (RD, Kelvin) - Provides the current control temperature, Tctl, after the slew-rate controls have been applied.
 - CurTmpTjSel (RW, Kelvin) - Specifies a value used to create Tctl.
 - TmpSlewDnEn (RW) - Temperature slew downward enable.
 - TmpMaxDiffUp (RW) - Specifies the maximum difference, (Tctlm - Tctl), when Tctl immediatly updates to Tctlm.
 - PerStepTimeDn (RW) - Specifies the time that Tctlm must remain below Tctl before applying a 0.125 downward step.
 - PerStepTimeUp (RW) - Specifies the time that Tctlm must remain above Tctl before applying a 0.125 upward step.

SB-TSI registers
 - cpu_temperature (RD, Kelvin) - CPU Temperature
 - high_temperature_threshold (RD, Kelvin) - High Temperature Threshold
 - low_temperature_threshold (RD, Kelvin) - Low Temperature Threshold
 - cpu_temperature_offset_hi (RW) - CPU Temperature Offset High Byte
 - cpu_temperature_offset_lo (RW) - CPU Temperature Offset Low Byte
 - status (RW) - SB-TSI Status
 - cfg3 (RW) - SB-TSI Configuration Register 0x03
 - cfg9 (RW) - SB-TSI Configuration Register 0x09
 - upd_rate (RW) - Update Rate
 - timeout_cfg (RW) - Timeout Configuration
 - alert_threshold (RW) - Alert Threshold
 - alert_cfg (RW) - Alert Configuration
 - manufacture_id (RD) - Manufacture ID
 - revision (RD) - SB-TSI Revision
Received on Mon Mar 06 2017 - 01:04:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:10 UTC