From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 1 19:48:15 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 40BCF106566B; Mon, 1 Aug 2011 19:48:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-hackers@freebsd.org Date: Mon, 1 Aug 2011 15:48:00 -0400 User-Agent: KMail/1.6.2 References: <201107312128.29322.lobo@bsd.com.br> <201108011223.55772.jkim@FreeBSD.org> <4E36F88C.7050404@FreeBSD.org> In-Reply-To: <4E36F88C.7050404@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201108011548.03059.jkim@FreeBSD.org> Cc: Andriy Gapon Subject: Re: Phenom II 975 BE shows 0 celsius X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 19:48:15 -0000 On Monday 01 August 2011 03:03 pm, Andriy Gapon wrote: > [cc list trimmed] > > on 01/08/2011 19:23 Jung-uk Kim said the following: > > I gave up the DiodeOffset recently because a lot of BIOSes do not > > set any meaningful values. Instead, I added a tunable for that. > > Please see the attached patch, which is also available from here: > > > > http://people.freebsd.org/~jkim/amdtemp.diff > > I haven't tried your patch yet, but already have a few comments :-) > > - at least on head pci_cfgregread() is public via > x86/include/pci_cfgreg.h That's cool. Thanks. > - I am not sure if you really need it; shouldn't pci_read_config() > just work since amdtemp attaches under pci bus? amdtemp(4) attaches under PCI bus but its sibling on function 2 isn't easy to address, i.e., hostbN. > - about erratum 319 - I feel like objecting to amdtemp_force_enable > approach; given the wide spread of AM2+ and AM3 in consumer boards, > and the very important fact that I have AM2+ and I have never > observed (with my own eyes) incorrect reading from amdtemp, and the > less important fact that the output of amdtemp is not used for > anything critical (for anything at all, in fact) in the base > system, and that that would be a kind of POLA violation (which is > PITA) - I propose to just print some warning message on the > affected systems; at most, export that warning as a sysctl node I have mixed feeling about this because I own a system with such CPU/motherboard combo, too. I also believe it works well but errata is errata. If vendor says we shouldn't use it, then we shouldn't. In fact, I am just following Linux as an example here but I have no problem with turning this into a warning message, either. AMD says it shouldn't be interpreted as physical temperature but we are doing it anyway. ;-) Jung-uk Kim > Finally, I promise to test this patch soon-ish. > Thank you for digging into this!