Bug 281962 - amdsmn(4), amdtemp(4): add support for AMD Family 19h Models 40h-4Fh
Summary: amdsmn(4), amdtemp(4): add support for AMD Family 19h Models 40h-4Fh
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-09 15:06 UTC by Matthias Lanter
Modified: 2024-10-20 15:25 UTC (History)
1 user (show)

See Also:


Attachments
Patch for amdsmn.c and amdtemp.c to support AMD Ryzen 7 "Rembrandt" (2.18 KB, patch)
2024-10-09 15:06 UTC, Matthias Lanter
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Lanter 2024-10-09 15:06:17 UTC
Created attachment 254112 [details]
Patch for amdsmn.c and amdtemp.c to support AMD Ryzen 7 "Rembrandt"

The attached patch adds support for AMD Ryzen 7 "Rembrandt" processors (family 0x19, model 0x40-0x4f) to the amdsmn(4) and amdtemp(4) drivers, enabling temperature readings of these CPUs via sysctl. The sensors work the same as for the "Raphael" processors (model 0x60-0x6f), only the PCI device ID differs.

The patch applies cleanly to (15-) current, 14-stable, including 14.1-RELEASE.
It should also work with 13, as only the PCI device ID is changed.

Tested with Ryzen 7 PRO 6850U (family 0x19, model 0x44, https://bsd-hardware.info/?probe=0a2c02f944).

Kernel messages:
CPU: AMD Ryzen 7 PRO 6850U with Radeon Graphics      (2695.04-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0xa40f41  Family=0x19  Model=0x44  Stepping=1
[...]
amdsmn0: <AMD Family 19h System Management Network> on hostb0
amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb0

$ sysctl dev.amdtemp
dev.amdtemp.0.core0.sensor0: 48.5C
dev.amdtemp.0.sensor_offset: 0
dev.amdtemp.0.%parent: hostb0
dev.amdtemp.0.%pnpinfo: 
dev.amdtemp.0.%location: 
dev.amdtemp.0.%driver: amdtemp
dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors
dev.amdtemp.%parent: 

$ sysctl dev.cpu.0
dev.cpu.0.temperature: 48.5C
dev.cpu.0.cx_method: C1/hlt C2/io C3/io
dev.cpu.0.cx_usage_counters: 49971 0 0
dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 42529us
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_supported: C1/1/1 C2/2/18 C3/3/350
dev.cpu.0.freq_levels: 2700/3240 1800/1980 1600/1600
dev.cpu.0.freq: 1600
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=ACPI0007 _UID=0 _CID=none
dev.cpu.0.%location: handle=\_SB_.PLTF.C000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-10-13 13:23:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=ecbe99e1627627b6797153899e4d95fde3e230e2

commit ecbe99e1627627b6797153899e4d95fde3e230e2
Author:     Matthias Lanter <freebsd@lanter-it.ch>
AuthorDate: 2024-10-13 13:21:19 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-10-13 13:21:19 +0000

    amdtemp: add support for AMD Family 19h Models 40h-4Fh

    PR:             281962
    MFC after:      2 weeks

 sys/dev/amdtemp/amdtemp.c | 3 +++
 1 file changed, 3 insertions(+)
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-10-13 13:23:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a76e28d10f8516a2e796bba3fff4257b150bc259

commit a76e28d10f8516a2e796bba3fff4257b150bc259
Author:     Matthias Lanter <freebsd@lanter-it.ch>
AuthorDate: 2024-10-13 13:20:01 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-10-13 13:20:01 +0000

    amdsmn: add support for AMD Family 19h Models 40h-4Fh

    PR:             281962
    MFC after:      2 weeks

 sys/dev/amdsmn/amdsmn.c | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-10-20 15:25:20 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=6bd08ccc9b09ae5da4cb2561244ab57576752cd1

commit 6bd08ccc9b09ae5da4cb2561244ab57576752cd1
Author:     Matthias Lanter <freebsd@lanter-it.ch>
AuthorDate: 2024-10-13 13:20:01 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-10-20 15:22:46 +0000

    amdsmn: add support for AMD Family 19h Models 40h-4Fh

    PR:             281962
    MFC after:      2 weeks

    (cherry picked from commit a76e28d10f8516a2e796bba3fff4257b150bc259)

 sys/dev/amdsmn/amdsmn.c | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-10-20 15:25:21 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=745965ffb69e37101c8c0453a681ad4ae4b6ff9f

commit 745965ffb69e37101c8c0453a681ad4ae4b6ff9f
Author:     Matthias Lanter <freebsd@lanter-it.ch>
AuthorDate: 2024-10-13 13:21:19 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-10-20 15:22:41 +0000

    amdtemp: add support for AMD Family 19h Models 40h-4Fh

    PR:             281962
    MFC after:      2 weeks

    (cherry picked from commit ecbe99e1627627b6797153899e4d95fde3e230e2)

 sys/dev/amdtemp/amdtemp.c | 3 +++
 1 file changed, 3 insertions(+)