Skip to content

Commit a2120b8

Browse files
committed
Add AMD Zen5 multipliers support
1 parent fcb0b46 commit a2120b8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

libcpuid/hwmon_amd.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@ static int get_amd_multipliers(struct msr_info_t* info, uint32_t pstate, double*
169169
err += cpu_rdmsr_range(info->handle, pstate, 7, 0, &cpu_fid);
170170
*multiplier = ((double)cpu_fid / cpu_did) * 2;
171171
break;
172+
case 0x1A: /* Zen 5 */
173+
/* PPR for AMD Family 1Ah Model 02h C1, pages 235
174+
MSRC001_006[4...B][11:0] is cpu_fid
175+
CoreCOF is Core::X86::Msr::PStateDef[CpuFid[11:0]] *5 */
176+
err = cpu_rdmsr_range(info->handle, pstate, 11, 0, &cpu_fid);
177+
*multiplier = ((double)cpu_fid) * 0.05;
178+
break;
172179
default:
173180
warnf("get_amd_multipliers(): unsupported CPU extended family: %xh\n", info->id->x86.ext_family);
174181
err = 1;

0 commit comments

Comments
 (0)