RyzenAdj icon indicating copy to clipboard operation
RyzenAdj copied to clipboard

api: add per-core table offsets for Phoenix (0x4C0008)

Open plastininikolay opened this issue 2 months ago • 0 comments

get_core_power, get_core_volt, get_core_temp and get_core_clk return NaN on Phoenix. This adds the per-core offsets for PM table 0x4C0008. The layout matches Rembrandt (0x00400004): 8 floats per array, power at 0x7F4, voltage 0x814, temperature 0x834, clock 0x894.

For reference, the next arrays in the same block look like effective clock (0x8B4), C0 residency % (0x8D4) and CC6 % (0x8F4). I did not add those.

Tested on a Ryzen 9 7940HS (ASUS ROG Flow X13 GV302XV, Fedora 44, ryzen_smu) with a small program against libryzenadj, while taskset -c 2 pinned a busy loop to core 2:

table 0x004c0008
core 0: P=3.24 W  V=1.095 V  T=59.2 C  f=4.70 GHz   (another process was busy here)
core 1: P=0.02 W  V=0.677 V  T=53.0 C  f=1.88 GHz
core 2: P=3.52 W  V=1.088 V  T=66.2 C  f=4.70 GHz   (loaded)
core 3: P=0.04 W  V=0.677 V  T=53.0 C  f=1.88 GHz
...
core 8: P=nan W  V=nan V  T=nan C  f=nan GHz
cpufreq cpu2: 4690 MHz

Only 0x4C0008 is covered, because it is the only table version I can test.

I used AI assistance (Claude) to find the offsets and write the patch, and checked the results on my laptop.

plastininikolay avatar Sep 24 '26 09:09 plastininikolay