From owner-freebsd-current@freebsd.org Thu Feb 13 07:00:31 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CBA0024F408 for ; Thu, 13 Feb 2020 07:00:31 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48J6pk60Wlz4Z2n for ; Thu, 13 Feb 2020 07:00:30 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 01D70H4P042619 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 12 Feb 2020 23:00:23 -0800 (PST) (envelope-from bsd-lists@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 Cc: Andrea Venturoli In-Reply-To: <0cb099c9-2a93-d244-ba72-a517dc16fe37@netfence.it> From: Chris Reply-To: bsd-lists@BSDforge.com To: Subject: Re: Which AMD CPUs are supported -- temperature Date: Wed, 12 Feb 2020 23:00:23 -0800 Message-Id: <54fe8d386cc038020b43d3bf99173b5f@udns.ultimatedns.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48J6pk60Wlz4Z2n X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of bsd-lists@BSDforge.com has no SPF policy when checking 24.113.41.81) smtp.mailfrom=bsd-lists@BSDforge.com X-Spamd-Result: default: False [-1.41 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[bsd-lists@BSDforge.com]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.955,0]; IP_SCORE(-0.37)[ip: (-0.71), ipnet: 24.113.0.0/16(-0.36), asn: 11404(-0.74), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[BSDforge.com]; REPLYTO_ADDR_EQ_FROM(0.00)[]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-0.99)[-0.988,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 07:00:31 -0000 On Thu, 13 Feb 2020 07:00:36 +0100 Andrea Venturoli ml@netfence=2Eit said > On 2020-02-12 23:17, Chris wrote: >=20 > > # dmidecode -t4 | grep AMD > > Manufacturer: AMD > > Version: AMD Athlon(tm) II X4 630 Processor > > # sysctl -a | grep tempe > > dev=2Ecpu=2E3=2Etemperature: 33=2E5C > > dev=2Ecpu=2E2=2Etemperature: 33=2E5C > > dev=2Ecpu=2E1=2Etemperature: 33=2E5C > > dev=2Ecpu=2E0=2Etemperature: 33=2E5C >=20 > Also works here: >=20 > > cat /var/run/dmesg=2Eboot > > =2E=2E=2E > > CPU: AMD Phenom(tm) II X4 965 Processor (3415=2E38-MHz K8-class CPU) > > sysctl -a|grep temp > > dev=2Ecpu=2E3=2Etemperature: 43=2E6C > > dev=2Ecpu=2E2=2Etemperature: 43=2E6C > > dev=2Ecpu=2E1=2Etemperature: 43=2E6C > > dev=2Ecpu=2E0=2Etemperature: 43=2E6C >=20 >=20 >=20 >=20 >=20 >=20 > >=20 > > # # # BROKEN > > # dmidecode -t4 | grep AMD > > Manufacturer: AuthenticAMD > > Version: AMD Athlon(tm) X4 860K Quad Core Processor > > # sysctl -a | grep tempe > > dev=2Ecpu=2E3=2Etemperature: 13=2E1C > > dev=2Ecpu=2E2=2Etemperature: 13=2E1C > > dev=2Ecpu=2E1=2Etemperature: 13=2E1C > > dev=2Ecpu=2E0=2Etemperature: 13=2E1C > >=20 > > All but one is in the same class=2E But one in that same > > class doesn't work=2E The FX class also works fine=2E > > I'm puzzled=2E=2E=2E :( >=20 Thanks for the reply! > This reminds me of my first Ryzen 2: 11=2E3 would not get the temperature= =20 > right, but 12=2E1 did=2E > If I understand correctly, AMD just gives a temperature reading in the=20 > same way on all CPUs, but different models require different adjustment= =20 > to that value (with some offset and/or other calculations); see=20 > /usr/src/sys/dev/amdtemp/amdtemp=2Ec=2E Heh, since I first discovered that I wasn't getting correct output, I went straight to svn=2Efreebsd=2Eorg/head and started walking the revisions on amdtemp=2Ec -- even many proposals -- https://reviews=2Efreebsd=2Eorg/D9759 for example=2E But I've grown weary of building world && kernels in hopes of finding just the right revision=2E :P > Perhaps this CPU needs a formula which FreeBSD's driver does not have? > Of course this is a wild guess, as I have not access to the specs=2E This is what I gathered from reading the source && comments=2E I read one where "linux" suggests it starts at -28C=2E So if I add +28 to my current output, that puts it about where I would expect it to be=2E But like you say; it's all guesswork without the specs=2E The CPU in question returns the following in dmesg(8), in case anyone cares= : AMD Athlon(tm) X4 860K Quad Core Processor (3700=2E07-MHz K8-class CPU) Origin=3D"AuthenticAMD" Id=3D0x630f01 Family=3D0x15 Model=3D0x30 Steppi= ng=3D1 Features=3D0x178bfbff Features2=3D0x3e98320b AMD Features=3D0x2e500800 AMD Features2=3D0xfebbfff,DBE,PTSC> Structured Extended Features=3D0x9 XSAVE Features=3D0x1 SVM: Features=3D0x1cff,PauseFilterThreshold> Revision=3D1, ASIDs=3D65536 Thanks again! --Chris >=20 > bye > =09av=2E