CFT: k8temp driver
Thomas Hurst
tom.hurst at clara.net
Sun Feb 10 09:53:24 PST 2008
* Rui Paulo (rpaulo at FreeBSD.org) wrote:
> 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.
Works for me:
dev.k8temp.0.sensor0.core0: 45
dev.k8temp.0.sensor0.core1: 44
dev.k8temp.0.sensor1.core0: 45
dev.k8temp.0.sensor1.core1: 45
dev.k8temp.1.sensor0.core0: 40
dev.k8temp.1.sensor0.core1: 43
dev.k8temp.1.sensor1.core0: 40
dev.k8temp.1.sensor1.core1: 40
I wrote a userspace implementation (in ports as sysutils/k8temp), which
gives:
CPU 0 Core 0 Sensor 0: 43c
CPU 0 Core 1 Sensor 0: 46c
CPU 1 Core 0 Sensor 0: 41c
CPU 1 Core 1 Sensor 0: 40c
You'll note it doesn't show two sensors per core; in get_temp() I check
the selection took by verifying the final 4 byte read contains the
selections I just wrote. Maybe I shouldn't bother, I can't remember if
the docs say the selections are supposed to be reflected in the read,
though they clearly are for core selection or it wouldn't work.
sysutils/k8temp should work in all the other BSD's too, if anyone
fancies testing..
--
Thomas 'Freaky' Hurst
http://hur.st/
More information about the freebsd-amd64
mailing list