From owner-freebsd-amd64@FreeBSD.ORG Sun Feb 10 17:53:24 2008 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7799E16A418; Sun, 10 Feb 2008 17:53:24 +0000 (UTC) (envelope-from tom.hurst@clara.net) Received: from spork.qfe3.net (spork.qfe3.net [212.13.207.101]) by mx1.freebsd.org (Postfix) with ESMTP id 56B8113C4CC; Sun, 10 Feb 2008 17:53:24 +0000 (UTC) (envelope-from tom.hurst@clara.net) Received: from [81.104.123.28] (helo=voi.aagh.net) by spork.qfe3.net with esmtp (Exim 4.66 (FreeBSD)) (envelope-from ) id 1JOG6t-000KV5-AI; Sun, 10 Feb 2008 17:36:59 +0000 Received: from freaky by voi.aagh.net with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1JOG6s-0009it-TN; Sun, 10 Feb 2008 17:36:58 +0000 Date: Sun, 10 Feb 2008 17:36:58 +0000 From: Thomas Hurst To: Rui Paulo Message-ID: <20080210173658.GA29898@voi.aagh.net> Mail-Followup-To: Rui Paulo , freebsd-amd64@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Not much. User-Agent: Mutt/1.5.17 (2007-11-01) Sender: Thomas Hurst Cc: freebsd-amd64@freebsd.org Subject: Re: CFT: k8temp driver X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2008 17:53:24 -0000 * 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/