feat: dj with the ryzen_smu kernel module on a few systems and I have a patch that improves monitoring support for newer/less-covered PM tables. - #408
Open
inode64 wants to merge 6 commits into
Conversation
…ve a patch that improves monitoring support for newer/less-covered PM tables.
Tested systems:
- Dragon Range / Raphael-compatible system
- PM table: `0x540104`
- SMU FW: `4.84.4.0`
- AMD EPYC 4344P
- Family/model: Zen 4, model 97
- PM table: `0x540104`
- SMU FW: `84.79.225`
- AMD Ryzen 5 3400G / Picasso
- PM table: `0x1e0004`
- SMU FW: `4.30.92.0`
Main changes:
- Added support for reading `pm_table_version` and `pm_table_size` from the `ryzen_smu` sysfs interface.
- Added a fallback path for PM table version/address handling when using the kernel module on families where the usual SMU table messages are not available.
- Added SMU firmware version reporting using SMU message `0x2` with `arg0 = 1`.
- Fixed PM table initialization for `0x540104`: offset `0x0` is legitimately zero on this table, so the empty-table check now uses offset `0x8`.
- Added monitored values for `0x540104`, including:
- fast PPT limit/value
- socket power
- SoC voltage
- FCLK
- MEM clock
- Tctl limit/value
- VDD TDC value
- per-core power, voltage, temperature, requested clock, effective clock, C0, CC1 and C6 residency
- Added conservative VDD TDC/EDC limit detection for `0x540104`:
- `TDC LIMIT VDD` from `0x20` when the value is plausible
- `EDC LIMIT VDD` from `0xF4` when the value is plausible
- sentinel/unlimited values like `1000A` are hidden instead of displayed as real limits
- Improved Tctl reporting for `0x540104`:
- Dragon Range/Raphael systems track Tctl at `0x2C`
- EPYC 4004 tracks the real loaded Tctl at `0xF8`
- the code now uses the higher plausible value, matching `k10temp` on the EPYC system
- Added Picasso `0x1e0004` monitoring improvements:
- fixed Tctl value using the hotter core from the later temperature block
- added per-core power, voltage, temperature and clock
- added GFX clock
- added MEM clock
- Made the `--info` output cleaner:
- extended values are only printed when the getter returns a valid value
- per-core columns are dynamic, so unsupported columns are not shown as `nan`
- Added portable x86_64 build options:
- `ENABLE_IPO=OFF`
- `STRIP_X86_ISA_NOTE=ON`
- this avoids binaries being rejected on older x86_64 CPUs because of an overly strict `.note.gnu.property` ISA marker
Validation:
- The portable binary was tested remotely on:
- Ryzen 5 3400G / Picasso
- EPYC 4344P / PM table `0x540104`
- On the EPYC 4344P, loaded `k10temp` reported around `82.8-83.1 C`, and RyzenAdj now reports `THM VALUE CORE 83.062`, matching the kernel sensor.
- On Picasso, the new per-core table and corrected Tctl were validated against `sensors`, `cpufreq` and PM table dumps.
Some values are intentionally still hidden as `nan` because I could not validate stable offsets yet, especially STAPM/slow PPT on `0x540104` and some SoC/EDC value fields.
* Ryzen AI 9 HX 370, Strix Point * Ryzen 5 3400G, Picasso * Ryzen 5 7600X, Raphael * EPYC 4344P * EPYC 4584PX * EPYC 4244P * EPYC 4465P, Fire Range * Ryzen 5 PRO 3600, Matisse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tested systems:
0x5401044.84.4.00x54010484.79.2250x1e00044.30.92.0Main changes:
pm_table_versionandpm_table_sizefrom theryzen_smusysfs interface.0x2witharg0 = 1.0x540104: offset0x0is legitimately zero on this table, so the empty-table check now uses offset0x8.0x540104, including:0x540104:TDC LIMIT VDDfrom0x20when the value is plausibleEDC LIMIT VDDfrom0xF4when the value is plausible1000Aare hidden instead of displayed as real limits0x540104:0x2C0xF8k10tempon the EPYC system0x1e0004monitoring improvements:--infooutput cleaner:nanENABLE_IPO=OFFSTRIP_X86_ISA_NOTE=ON.note.gnu.propertyISA markerValidation:
0x540104k10tempreported around82.8-83.1 C, and RyzenAdj now reportsTHM VALUE CORE 83.062, matching the kernel sensor.sensors,cpufreqand PM table dumps.Some values are intentionally still hidden as
nanbecause I could not validate stable offsets yet, especially STAPM/slow PPT on0x540104and some SoC/EDC value fields.