From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 14:25:57 2011 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56AD3106564A for ; Mon, 1 Aug 2011 14:25:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A26968FC17 for ; Mon, 1 Aug 2011 14:25:56 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA27720; Mon, 01 Aug 2011 17:14:40 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4E36B4CF.3060308@FreeBSD.org> Date: Mon, 01 Aug 2011 17:14:39 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110705 Thunderbird/5.0 MIME-Version: 1.0 To: Mario Lobo References: <201107312128.29322.lobo@bsd.com.br> In-Reply-To: <201107312128.29322.lobo@bsd.com.br> X-Enigmail-Version: 1.2pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@FreeBSD.org, FreeBSD Questions Subject: Re: Phenom II 975 BE shows 0 celsius X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 14:25:57 -0000 on 01/08/2011 03:28 Mario Lobo said the following: > Hi to all > > In my desktop machine, I had an AM2+ ASROCK mobo with Phenom II 955 BE that > showed each core temperature perfectly under FBSD 8-STABLE, via > dev.cpu.x.temp. amdtemp.ko loaded. > > Unfortunately this Mobo died and only found AM3 boards for which my phenom 955 > doesn't fit. So I got an ASUS M4A88T-V EVO with a Phenom II 975 BE. > > Funny thing. An AM3 phenom II fits on an AM2 board but an AM3 board doesn't > accept an AM2/AM2+ phenom II :(. > > Anyway, now, under the very same system, it shows 0 degrees on dev.cpu.x.temp > for all cores. Sorry, I've got lost in all the config changes. So what system do you have now? Can please also provide CPU-related information from dmesg? > I've been looking through k8temp and amdtemp src code. I am definitely not > sure of this but I believe something might have happened to those: > > From k8temp.h > > K10_THERM_REG 0xa4 > K10_THERMTRIP_REG 0xe4 > K10_CURTMP(val) (((val) >> 21) & 0xfff) > K10_THERMTRIP(val) ((val >> 1) & 1) > > From amdtemp.c > > /* > * Register control (K8 family) > */ > #define AMDTEMP_REG0F 0xe4 > #define AMDTEMP_REG_SELSENSOR 0x40 > #define AMDTEMP_REG_SELCORE 0x04 > > /* > * Register control (K10 & K11) family > */ > #define AMDTEMP_REG 0xa4 > > > Output of k8temp -dn: > > CPUID: Vendor: AuthenticAMD, 0x100f43: Model=04 Family=f+1 Stepping=3 > Advanced Power Management=0x1f9 > Temperature sensor: Yes > Frequency ID control: No > Voltage ID control: No > THERMTRIP support: Yes > HW Thermal control: Yes > SW Thermal control: Yes > 100MHz multipliers: Yes > HW P-State control: Yes > TSC Invariant: Yes > Temp=c0fef > ThermTrip=1fc00c30 > 0 > > I keep a small win7 partition to test little things like this and see if the > same thing happens there, and it doesn't, so I concluded that the sensors are > there and are working. > > One thing is worth noting though. I have used a free gadget that shows > activity/temp for each core. It worked fine with the previous MB/CPU.That ALSO > stopped working with this new MB. Like FBSD, it shows 0 degrees for any core > too, although it correctly displays each core load. Most likely that gadget just re-uses OS-provided information. > The only windows tool that correctly shows the temperature are the ASUS tools > that came with the mobo. > > Other than that, everything is working fine! The only thing I had to fix was > the fstab ada location. > > I know this is not a big thing but I got accustomed to keeping an eye on those > temperatures. > > I have googled for a few days now searching for Thermal register address or > offsets for the Phenom II 975 BE, or anything related to this problem and > found nothing. Every search on AMD site was fruitless. I could not find a > single bit of tech info on this processor there, or any other tech info for > that matter. http://support.amd.com/us/Processor_TechDocs/31116.pdf > Would any one have any pointers/clues/suggestions on this? I would try to add some printfs (or used dtrace - whichever is easier for you) to see what's going on. Or you can even use pciconf to directly sneak a peek at what's reported by the hardware, e.g.: # pciconf -r pci0:0:24:3 0xa4 1c881880 You can read the BKDG to see how to interpret the value - search for F3xA4. See F3xE4 for offset calculation. Hopefully you should be able to see if hardware reports sane value and how the amdtemp ends up reporting 0°C. -- Andriy Gapon