Re: Which AMD CPUs are supported -- temperature

From: Chris <bsd-lists_at_BSDforge.com>
Date: Wed, 12 Feb 2020 23:00:23 -0800
On Thu, 13 Feb 2020 07:00:36 +0100 Andrea Venturoli ml_at_netfence.it said

> On 2020-02-12 23:17, Chris wrote:
> 
> > # dmidecode -t4 | grep AMD
> > Manufacturer: AMD
> > Version: AMD Athlon(tm) II X4 630 Processor
> > # sysctl -a | grep tempe
> > dev.cpu.3.temperature: 33.5C
> > dev.cpu.2.temperature: 33.5C
> > dev.cpu.1.temperature: 33.5C
> > dev.cpu.0.temperature: 33.5C
> 
> Also works here:
> 
> > cat /var/run/dmesg.boot
> > ...
> > CPU: AMD Phenom(tm) II X4 965 Processor (3415.38-MHz K8-class CPU)
> > sysctl -a|grep temp
> > dev.cpu.3.temperature: 43.6C
> > dev.cpu.2.temperature: 43.6C
> > dev.cpu.1.temperature: 43.6C
> > dev.cpu.0.temperature: 43.6C
> 
> 
> 
> 
> 
> 
> > 
> > # # # BROKEN
> > # dmidecode -t4 | grep AMD
> > Manufacturer: AuthenticAMD
> > Version: AMD Athlon(tm) X4 860K Quad Core Processor
> > # sysctl -a | grep tempe
> > dev.cpu.3.temperature: 13.1C
> > dev.cpu.2.temperature: 13.1C
> > dev.cpu.1.temperature: 13.1C
> > dev.cpu.0.temperature: 13.1C
> > 
> > All but one is in the same class. But one in that same
> > class doesn't work. The FX class also works fine.
> > I'm puzzled... :(
> 
Thanks for the reply!

> This reminds me of my first Ryzen 2: 11.3 would not get the temperature 
> right, but 12.1 did.
> If I understand correctly, AMD just gives a temperature reading in the 
> same way on all CPUs, but different models require different adjustment 
> to that value (with some offset and/or other calculations); see 
> /usr/src/sys/dev/amdtemp/amdtemp.c.

Heh, since I first discovered that I wasn't getting correct output,
I went straight to svn.freebsd.org/head and started walking the revisions
on amdtemp.c -- even many proposals -- https://reviews.freebsd.org/D9759
for example. But I've grown weary of building world && kernels in hopes
of finding just the right revision. :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.
This is what I gathered from reading the source && comments. I read one
where "linux" suggests it starts at -28C. So if I add +28 to my current
output, that puts it about where I would expect it to be. But like you say;
it's all guesswork without the specs.

The CPU in question returns the following in dmesg(8), in case anyone cares:

AMD Athlon(tm) X4 860K Quad Core Processor (3700.07-MHz K8-class CPU)
Origin="AuthenticAMD"  Id=0x630f01  Family=0x15  Model=0x30  Stepping=1
Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,
CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
Features2=0x3e98320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,POPCNT,
AESNI,XSAVE,OSXSAVE,AVX,F16C>
AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
AMD Features2=0xfebbfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,
XOP,SKINIT,WDT,LWP,FMA4,TCE,NodeId,TBM,Topology,PCXC,PNXC,<b25>,DBE,PTSC>
Structured Extended Features=0x9<FSGSBASE,BMI1>
XSAVE Features=0x1<XSAVEOPT>
SVM: Features=0x1cff<NP,LbrVirt,SVML,NRIPS,TscRateMsr,VmcbClean,FlushByAsid,DecodeAssist,PauseFilter,
<b11>,PauseFilterThreshold>
Revision=1, ASIDs=65536


Thanks again!

--Chris
> 
>  bye
> 	av.
Received on Thu Feb 13 2020 - 06:00:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:23 UTC