Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Feb 2008 17:36:58 +0000
From:      Thomas Hurst <tom.hurst@clara.net>
To:        Rui Paulo <rpaulo@FreeBSD.org>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: CFT: k8temp driver
Message-ID:  <20080210173658.GA29898@voi.aagh.net>
In-Reply-To: <A611E395-3531-4026-B8B3-5EFA72BA48E1@FreeBSD.org>
References:  <A611E395-3531-4026-B8B3-5EFA72BA48E1@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Rui Paulo (rpaulo@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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080210173658.GA29898>