Created attachment 206229 [details] devinfo System : FreeBSD 12.0-RELEASE-p8 r350525 GENERIC amd64 CPU : Ryzen 5 3600 Motherboard : MSI B450 Mortar After kldloading amdtemp, amdsmn, no temperatures appear under sysctl dev.cpu dmidecode -t processor # dmidecode 3.2 # SMBIOS entry point at 0xdce5e000 Found SMBIOS entry point in EFI, reading table from /dev/mem. SMBIOS 2.8 present. Handle 0x0015, DMI type 4, 48 bytes Processor Information Socket Designation: AM4 Type: Central Processor Family: Zen Manufacturer: Advanced Micro Devices, Inc. ID: 10 0F 87 00 FF FB 8B 17 Signature: Family 23, Model 113, Stepping 0 Flags: FPU (Floating-point unit on-chip) VME (Virtual mode extension) DE (Debugging extension) PSE (Page size extension) TSC (Time stamp counter) MSR (Model specific registers) PAE (Physical address extension) MCE (Machine check exception) CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call) MTRR (Memory type range registers) PGE (Page global enable) MCA (Machine check architecture) CMOV (Conditional move instruction supported) PAT (Page attribute table) PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) MMX (MMX technology supported) FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) HTT (Multi-threading) Version: AMD Ryzen 5 3600 6-Core Processor Voltage: 1.1 V External Clock: 100 MHz Max Speed: 4200 MHz Current Speed: 3600 MHz Status: Populated, Enabled Upgrade: Socket AM4 L1 Cache Handle: 0x0012 L2 Cache Handle: 0x0013 L3 Cache Handle: 0x0014 Serial Number: Unknown Asset Tag: Unknown Part Number: Unknown Core Count: 6 Core Enabled: 6 Thread Count: 12 Characteristics: 64-bit capable Multi-Core Hardware Thread Execute Protection Enhanced Virtualization Power/Performance Control Attachments : devinfo -v > output.txt pciconf -lv >> output.txt Let me know if you need any further details.
Please try the following patch. I believe it is all that is needed to add support for Zen 2 family 17h devices (such as Ryzen 3): https://people.freebsd.org/~cem/pr239607.amdtemp.zen2.0.patch
A commit references this bug: Author: cem Date: Tue Aug 6 03:54:28 UTC 2019 New revision: 350624 URL: https://svnweb.freebsd.org/changeset/base/350624 Log: amdtemp(4), amdsmn(4): Attach to Ryzen 3 (Zen 2) hostbridges PR: 239607 Reported by: "drclaw" <drclaw AT gmail.com> Changes: head/sys/dev/amdsmn/amdsmn.c head/sys/dev/amdtemp/amdtemp.c
@Conrad Thanks for resolving this so quickly! Could/should this be merged to stable/12,11 or did amdtemp et al only make it to 12? Re-open for MFC (at least to 12)
(In reply to Kubilay Kocak from comment #3) > @Conrad Thanks for resolving this so quickly! Could/should this be merged to > stable/12,11 or did amdtemp et al only make it to 12? > > Re-open for MFC (at least to 12) They're both in 12 thanks to mav and vangyzen. I don't do MFCs myself, but anyone else is welcome to.
Sorry for the delay. Finally got around to installing kernel with the patches, looks good here. Thanks for fixing so quickly :) % uname -a FreeBSD dutch 12.0-STABLE FreeBSD 12.0-STABLE #2 r350624M: Wed Aug 7 08:43:02 AEST 2019 root@dutch:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 % sysctl dev.cpu | grep -i temp dev.cpu.11.temperature: 40.1C dev.cpu.10.temperature: 40.1C dev.cpu.9.temperature: 40.1C dev.cpu.8.temperature: 40.1C dev.cpu.7.temperature: 40.1C dev.cpu.6.temperature: 40.1C dev.cpu.5.temperature: 40.1C dev.cpu.4.temperature: 40.1C dev.cpu.3.temperature: 40.1C dev.cpu.2.temperature: 40.1C dev.cpu.1.temperature: 40.1C dev.cpu.0.temperature: 40.1C
Cool, thanks for confirming the fix!
Still present in 12.1, updating to reflect. Patch works fine. Just applied and rebuilt kernel and my temps are back again.
Unless an EN or approval to merge support to releng/12.1 is possible, the feature/support will land in 12.2-RELEASE. It is apparently presently supported in CURRENT 12-STABLE (stable/12), effectively 'resolving' this issue, minus a merge to stable/11. Alexander/Eric: - Would you consider a merge to stable/11 ? - I couldn't find the MFC commit to stable/12 for this issue (base r350624), can you mention which one it was in "base r<revision>" comment formatting
Still WBNI if it made it into stable/12. The diff from r350624 applies cleanly and works: % sysctl dev.cpu.0.temperature dev.cpu.0.temperature: 34.2C
A commit references this bug: Author: mav Date: Mon Dec 9 17:13:17 UTC 2019 New revision: 355561 URL: https://svnweb.freebsd.org/changeset/base/355561 Log: MFC r350624 (by cem): amdtemp(4), amdsmn(4): Attach to Ryzen 3 (Zen 2) hostbridges PR: 239607 Changes: _U stable/12/ stable/12/sys/dev/amdsmn/amdsmn.c stable/12/sys/dev/amdtemp/amdtemp.c
A commit references this bug: Author: mav Date: Mon Dec 9 17:14:44 UTC 2019 New revision: 355562 URL: https://svnweb.freebsd.org/changeset/base/355562 Log: MFC r350624 (by cem): amdtemp(4), amdsmn(4): Attach to Ryzen 3 (Zen 2) hostbridges PR: 239607 Changes: _U stable/11/ stable/11/sys/dev/amdsmn/amdsmn.c stable/11/sys/dev/amdtemp/amdtemp.c
^Triage: Assign to committer that resolved. Thank you mav@ for the merges to stable/*
*** Bug 243406 has been marked as a duplicate of this bug. ***