Page MenuHomeFreeBSD

cpufreq(4): calculate power if P-state info comes from MSR
ClosedPublic

Authored by jo_bruelltuete.com on May 18 2023, 12:44 AM.
Tags
None
Referenced Files
F82155348: D40140.diff
Fri, Apr 26, 12:34 AM
Unknown Object (File)
Jan 5 2024, 11:13 AM
Unknown Object (File)
Dec 20 2023, 4:50 AM
Unknown Object (File)
Dec 13 2023, 2:47 AM
Unknown Object (File)
Nov 4 2023, 3:58 AM
Unknown Object (File)
Oct 3 2023, 3:51 AM
Unknown Object (File)
Aug 15 2023, 12:01 AM
Unknown Object (File)
Jul 1 2023, 6:08 AM
Subscribers

Details

Test Plan

The numbers coming out match what my BIOS comes up with.
And looking at the sparse documentation available, the calculation is spec'd by AMD.

dev.cpu.0.freq_levels: 3600/3960 2800/2800 2200/1980
dev.cpu.0.freq: 2200

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jo_bruelltuete.com added inline comments.
sys/x86/cpufreq/hwpstate_amd.c
484

is there an integer-pow available in kernel mode?

This revision is now accepted and ready to land.May 22 2023, 4:23 PM

hi @markj, thanks for review.
feel free to commit if you are happy with this.