CFT: k8temp driver

Rui Paulo rpaulo at freebsd.org
Mon Feb 11 12:31:31 PST 2008


On Feb 10, 2008, at 5:19 PM, Scot Hetzel wrote:

> On 2/10/08, Rui Paulo <rpaulo at freebsd.org> 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:
>>        http://people.freebsd.org/~rpaulo/k8temp.tgz
>>
>> 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.

Seems to be working, thanks for testing.
-49 means "temperature invalid", BTW.

Regards.
--
Rui Paulo






More information about the freebsd-amd64 mailing list