Completely rewritten amdtemp driver.
There is no longer binding to the processor ID, all the new processors will be supported without the need to modify the code.
sensor_offset - can be customized for each sensor separately.
Register values can be found in the documentation on the processor.
kldunload amdtemp cd /usr/src/sys/modules/amdtemp/ make make install make cleandir
Load module:
kldload amdtemp
Auto load on system start: /boot/loader.conf
amdtemp_load="YES"
Or add kld_list to: /etc/rc.conf, example:
kld_list="amdtemp"
Show temperature:
# sysctl dev.cpu | grep temperature dev.cpu.0.temperature: 56.0C dev.cpu.1.temperature: 56.0C
Show all:
# sysctl dev.amdtemp dev.amdtemp.%parent: dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors dev.amdtemp.0.%driver: amdtemp dev.amdtemp.0.%location: dev.amdtemp.0.%pnpinfo: dev.amdtemp.0.%parent: hostb4 dev.amdtemp.0.htc.HtcTmpLmt: 100.0C dev.amdtemp.0.htc.HtcHystLmt: 3.0C dev.amdtemp.0.htc.HtcEn: 1 dev.amdtemp.0.htc.HtcLock: 0 dev.amdtemp.0.htc.HtcSlewSel: 0 dev.amdtemp.0.htc.HtcPstateLimit: 2 dev.amdtemp.0.htc.HtcAct: 0 dev.amdtemp.0.htc.HtcActSts: 0 dev.amdtemp.0.htc.PslApicHiEn: 0 dev.amdtemp.0.htc.PslApicLoEn: 0 dev.amdtemp.0.rtc.CurTmp: 56.0C dev.amdtemp.0.rtc.CurTmpTjSel: 7.0C dev.amdtemp.0.rtc.TmpSlewDnEn: 1 dev.amdtemp.0.rtc.TmpMaxDiffUp: 3 dev.amdtemp.0.rtc.PerStepTimeDn: 15 dev.amdtemp.0.rtc.PerStepTimeUp: 15 dev.amdtemp.0.rtc.sensor_offset: 0 dev.amdtemp.0.tsi.sensor0.cpu_temperature: 56.0C dev.amdtemp.0.tsi.sensor0.high_temperature_threshold: 70.0C dev.amdtemp.0.tsi.sensor0.low_temperature_threshold: 0.0C dev.amdtemp.0.tsi.sensor0.cpu_temperature_offset_hi: 0 dev.amdtemp.0.tsi.sensor0.cpu_temperature_offset_lo: 0 dev.amdtemp.0.tsi.sensor0.status: 0 dev.amdtemp.0.tsi.sensor0.cfg3: 0 dev.amdtemp.0.tsi.sensor0.cfg9: 0 dev.amdtemp.0.tsi.sensor0.upd_rate: 8 dev.amdtemp.0.tsi.sensor0.timeout_cfg: 128 dev.amdtemp.0.tsi.sensor0.alert_threshold: 0 dev.amdtemp.0.tsi.sensor0.alert_cfg: 0 dev.amdtemp.0.tsi.sensor0.manufacture_id: 0 dev.amdtemp.0.tsi.sensor0.revision: 2 dev.amdtemp.0.tsi.sensor0.sensor_offset: 0 dev.amdtemp.0.tsi.sensor1.cpu_temperature: 56.0C dev.amdtemp.0.tsi.sensor1.high_temperature_threshold: 70.0C dev.amdtemp.0.tsi.sensor1.low_temperature_threshold: 0.0C dev.amdtemp.0.tsi.sensor1.cpu_temperature_offset_hi: 0 dev.amdtemp.0.tsi.sensor1.cpu_temperature_offset_lo: 0 dev.amdtemp.0.tsi.sensor1.status: 0 dev.amdtemp.0.tsi.sensor1.cfg3: 0 dev.amdtemp.0.tsi.sensor1.cfg9: 0 dev.amdtemp.0.tsi.sensor1.upd_rate: 8 dev.amdtemp.0.tsi.sensor1.timeout_cfg: 128 dev.amdtemp.0.tsi.sensor1.alert_threshold: 0 dev.amdtemp.0.tsi.sensor1.alert_cfg: 0 dev.amdtemp.0.tsi.sensor1.manufacture_id: 0 dev.amdtemp.0.tsi.sensor1.revision: 2 dev.amdtemp.0.tsi.sensor1.sensor_offset: 0 dev.amdtemp.0.tsi.sensor2.cpu_temperature: 56.0C dev.amdtemp.0.tsi.sensor2.high_temperature_threshold: 70.0C dev.amdtemp.0.tsi.sensor2.low_temperature_threshold: 0.0C dev.amdtemp.0.tsi.sensor2.cpu_temperature_offset_hi: 0 dev.amdtemp.0.tsi.sensor2.cpu_temperature_offset_lo: 0 dev.amdtemp.0.tsi.sensor2.status: 0 dev.amdtemp.0.tsi.sensor2.cfg3: 0 dev.amdtemp.0.tsi.sensor2.cfg9: 0 dev.amdtemp.0.tsi.sensor2.upd_rate: 8 dev.amdtemp.0.tsi.sensor2.timeout_cfg: 128 dev.amdtemp.0.tsi.sensor2.alert_threshold: 0 dev.amdtemp.0.tsi.sensor2.alert_cfg: 0 dev.amdtemp.0.tsi.sensor2.manufacture_id: 0 dev.amdtemp.0.tsi.sensor2.revision: 2 dev.amdtemp.0.tsi.sensor2.sensor_offset: 0 dev.amdtemp.0.tsi.sensor3.cpu_temperature: 56.0C dev.amdtemp.0.tsi.sensor3.high_temperature_threshold: 70.0C dev.amdtemp.0.tsi.sensor3.low_temperature_threshold: 0.0C dev.amdtemp.0.tsi.sensor3.cpu_temperature_offset_hi: 0 dev.amdtemp.0.tsi.sensor3.cpu_temperature_offset_lo: 0 dev.amdtemp.0.tsi.sensor3.status: 0 dev.amdtemp.0.tsi.sensor3.cfg3: 0 dev.amdtemp.0.tsi.sensor3.cfg9: 0 dev.amdtemp.0.tsi.sensor3.upd_rate: 8 dev.amdtemp.0.tsi.sensor3.timeout_cfg: 128 dev.amdtemp.0.tsi.sensor3.alert_threshold: 0 dev.amdtemp.0.tsi.sensor3.alert_cfg: 0 dev.amdtemp.0.tsi.sensor3.manufacture_id: 0 dev.amdtemp.0.tsi.sensor3.revision: 2 dev.amdtemp.0.tsi.sensor3.sensor_offset: 0 dev.amdtemp.0.tsi.sensor4.cpu_temperature: 56.0C dev.amdtemp.0.tsi.sensor4.high_temperature_threshold: 70.0C dev.amdtemp.0.tsi.sensor4.low_temperature_threshold: 0.0C dev.amdtemp.0.tsi.sensor4.cpu_temperature_offset_hi: 0 dev.amdtemp.0.tsi.sensor4.cpu_temperature_offset_lo: 0 dev.amdtemp.0.tsi.sensor4.status: 0 dev.amdtemp.0.tsi.sensor4.cfg3: 0 dev.amdtemp.0.tsi.sensor4.cfg9: 0 dev.amdtemp.0.tsi.sensor4.upd_rate: 8 dev.amdtemp.0.tsi.sensor4.timeout_cfg: 128 dev.amdtemp.0.tsi.sensor4.alert_threshold: 0 dev.amdtemp.0.tsi.sensor4.alert_cfg: 0 dev.amdtemp.0.tsi.sensor4.manufacture_id: 0 dev.amdtemp.0.tsi.sensor4.revision: 2 dev.amdtemp.0.tsi.sensor4.sensor_offset: 0 dev.amdtemp.0.tsi.sensor5.cpu_temperature: 56.0C dev.amdtemp.0.tsi.sensor5.high_temperature_threshold: 70.0C dev.amdtemp.0.tsi.sensor5.low_temperature_threshold: 0.0C dev.amdtemp.0.tsi.sensor5.cpu_temperature_offset_hi: 0 dev.amdtemp.0.tsi.sensor5.cpu_temperature_offset_lo: 0 dev.amdtemp.0.tsi.sensor5.status: 0 dev.amdtemp.0.tsi.sensor5.cfg3: 0 dev.amdtemp.0.tsi.sensor5.cfg9: 0 dev.amdtemp.0.tsi.sensor5.upd_rate: 8 dev.amdtemp.0.tsi.sensor5.timeout_cfg: 128 dev.amdtemp.0.tsi.sensor5.alert_threshold: 0 dev.amdtemp.0.tsi.sensor5.alert_cfg: 0 dev.amdtemp.0.tsi.sensor5.manufacture_id: 0 dev.amdtemp.0.tsi.sensor5.revision: 2 dev.amdtemp.0.tsi.sensor5.sensor_offset: 0 dev.amdtemp.0.tsi.sensor6.cpu_temperature: 56.0C dev.amdtemp.0.tsi.sensor6.high_temperature_threshold: 70.0C dev.amdtemp.0.tsi.sensor6.low_temperature_threshold: 0.0C dev.amdtemp.0.tsi.sensor6.cpu_temperature_offset_hi: 0 dev.amdtemp.0.tsi.sensor6.cpu_temperature_offset_lo: 0 dev.amdtemp.0.tsi.sensor6.status: 0 dev.amdtemp.0.tsi.sensor6.cfg3: 0 dev.amdtemp.0.tsi.sensor6.cfg9: 0 dev.amdtemp.0.tsi.sensor6.upd_rate: 8 dev.amdtemp.0.tsi.sensor6.timeout_cfg: 128 dev.amdtemp.0.tsi.sensor6.alert_threshold: 0 dev.amdtemp.0.tsi.sensor6.alert_cfg: 0 dev.amdtemp.0.tsi.sensor6.manufacture_id: 0 dev.amdtemp.0.tsi.sensor6.revision: 2 dev.amdtemp.0.tsi.sensor6.sensor_offset: 0 dev.amdtemp.0.tsi.sensor7.cpu_temperature: 56.0C dev.amdtemp.0.tsi.sensor7.high_temperature_threshold: 70.0C dev.amdtemp.0.tsi.sensor7.low_temperature_threshold: 0.0C dev.amdtemp.0.tsi.sensor7.cpu_temperature_offset_hi: 0 dev.amdtemp.0.tsi.sensor7.cpu_temperature_offset_lo: 0 dev.amdtemp.0.tsi.sensor7.status: 0 dev.amdtemp.0.tsi.sensor7.cfg3: 0 dev.amdtemp.0.tsi.sensor7.cfg9: 0 dev.amdtemp.0.tsi.sensor7.upd_rate: 8 dev.amdtemp.0.tsi.sensor7.timeout_cfg: 128 dev.amdtemp.0.tsi.sensor7.alert_threshold: 0 dev.amdtemp.0.tsi.sensor7.alert_cfg: 0 dev.amdtemp.0.tsi.sensor7.manufacture_id: 0 dev.amdtemp.0.tsi.sensor7.revision: 2 dev.amdtemp.0.tsi.sensor7.sensor_offset: 0