CFT: k8temp driver

Scot Hetzel swhetzel at
Sun Feb 10 09:48:50 PST 2008

On 2/10/08, Rui Paulo <rpaulo at> wrote:
> Hi,
>  Some AMD systems have two thermal sensors on both cores. I wrote a
>  simple driver to access these temperatures, but I don't have a system
>  to test. If anyone has a AMD K8 system, I would love if you could test
>  the k8temp driver that I wrote based on the Linux one.
>  Get it at:
>  Compile/test with:
>         $ tar xzvf k8temp.tgz && cd k8temp
>         $ make SYSDIR=/path/to/src/sys
>         # kldload ./k8temp.ko
>  This is still pre-alpha quality, so please don't use it on a
>  production system.
>  Thanks in advance.

I have been using sysutils/k8temp from ports to get the temperature
for my system:

# k8temp -d
CPUID: Vendor: AuthenticAMD, Id=0x20f42 Model=4 Family=15 Stepping=2
Advanced Power Management=0x3f
   Temperature sensor: Yes
 Frequency ID control: Yes
   Voltage ID control: Yes
    THERMTRIP support: Yes
   HW Thermal control: Yes
   SW Thermal control: Yes
   100MHz multipliers: No
   HW P-State control: No
        TSC Invariant: No
Thermtrip=0x00000b24 (CurTmp=0x00 (-49c) TjOffset=0x00 DiodeOffset=0x0b (0c))
Thermtrip=0x006d0b20 (CurTmp=0x6d (60c) TjOffset=0x00 DiodeOffset=0x0b (0c))
CPU 0 Core 1 Sensor 0: 60c

After compiling and loading the module, I am seeing these temperatures
in the sysctl tree:

# sysctl dev.k8temp
dev.k8temp.0.%desc: AMD K8 Thermal Sensors
dev.k8temp.0.%driver: k8temp
dev.k8temp.0.%parent: hostb4
dev.k8temp.0.sensor0.core0: 59
dev.k8temp.0.sensor0.core1: -49
dev.k8temp.0.sensor1.core0: 59
dev.k8temp.0.sensor1.core1: 59

Thanks for creating the k8temp module.


More information about the freebsd-amd64 mailing list