CFT: k8temp driver

Carl Johan Gustavsson carl.gustavsson at bahnhofbredband.se
Sun Feb 10 13:21:20 PST 2008


Rui Paulo 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.
> -- 
> Rui Paulo
>
Hi!

Tested it seems to work just fine! I gathered this info:

# uname -a
FreeBSD sleipner.home.swe 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #0: Sat
Feb  2 22:02:17 CET 2008    
carl at sleipner.home.swe:/usr/home/carl/usr.obj/usr/src/sys/SLEIPNER_7  i386

exerpt from dmesg:
CPU: Dual Core AMD Opteron(tm) Processor 165    (1808.34-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x20f32  Stepping = 2
 
Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x1<SSE3>
  AMD Features=0xe2500800<SYSCALL,NX,MMX+,FFXSR,LM,3DNow!+,3DNow!>
  AMD Features2=0x3<LAHF,CMP>
  Cores per package: 2
...
k8temp0: <AMD K8 Thermal Sensors> on hostb3
k8temp0: 44 41 44 41


# sysctl dev.k8temp
dev.k8temp.0.%desc: AMD K8 Thermal Sensors
dev.k8temp.0.%driver: k8temp
dev.k8temp.0.%parent: hostb3
dev.k8temp.0.sensor0.core0: 44
dev.k8temp.0.sensor0.core1: 40
dev.k8temp.0.sensor1.core0: 45
dev.k8temp.0.sensor1.core1: 45

It's tested in i386 now, but I can provide data for amd64 using the same
cpu if you want.

Thanks for your work! It's a very handy feature.

/cjg



More information about the freebsd-amd64 mailing list