From owner-freebsd-amd64@FreeBSD.ORG Mon Feb 11 20:31:31 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 2B88716A421 for ; Mon, 11 Feb 2008 20:31:31 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id B342E13C455 for ; Mon, 11 Feb 2008 20:31:30 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so595054uge.37 for ; Mon, 11 Feb 2008 12:31:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; bh=L9K2eU4odtJZnMDX0rLbaZMh5vXk4qVNM78kNBYvRZM=; b=oEhsQdW6rCL/0WH22QltsV+jOy3hIYOCTBLAAC02KH67mi8xBuObZZkUOnLLpspgsCpxyGR5/U3PglwF2nQX3AHG5eUkF0R92VqcMcmntfQaNj3mvfAtwrmMeZMf9Fs9jYZ+JBRNaK8zTT4iRQRzyWgz3IBRW2f+sccoBg61Gkw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; b=UlO5BOKbyEQRi5hQMPLk+34Y6K3nvv29fKrUNqa8X0NF1Sr1Gn1jrY9nZXU9ktead6kaIL+/AIYx20e/ItDNaQoolpFChLkVbdOzhplP4d8jQQHOM3x4IMQNDXSvTlbxXhXfTraLg54gJXYUUoy+bA85o+cA1GPBXHYM5h/I81s= Received: by 10.66.251.3 with SMTP id y3mr9488996ugh.88.1202761889149; Mon, 11 Feb 2008 12:31:29 -0800 (PST) Received: from ?89.214.167.223? ( [89.214.167.223]) by mx.google.com with ESMTPS id g11sm9106411gve.6.2008.02.11.12.31.26 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Feb 2008 12:31:28 -0800 (PST) Message-Id: <80242296-1201-4BA0-BCF9-736DB583EAE4@freebsd.org> From: Rui Paulo To: Scot Hetzel In-Reply-To: <790a9fff0802100919wa1018f2t3ec0e71efb62aa00@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Mon, 11 Feb 2008 20:31:24 +0000 References: <790a9fff0802100919wa1018f2t3ec0e71efb62aa00@mail.gmail.com> X-Mailer: Apple Mail (2.915) Sender: Rui Paulo 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: Mon, 11 Feb 2008 20:31:31 -0000 On Feb 10, 2008, at 5:19 PM, Scot Hetzel wrote: > On 2/10/08, 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. > > 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