Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F131728006
D12082.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
955 B
Referenced Files
None
Subscribers
None
D12082.diff
View Options
Index: head/sys/x86/cpufreq/hwpstate.c
===================================================================
--- head/sys/x86/cpufreq/hwpstate.c
+++ head/sys/x86/cpufreq/hwpstate.c
@@ -83,6 +83,10 @@
#define AMD_10H_11H_CUR_DID(msr) (((msr) >> 6) & 0x07)
#define AMD_10H_11H_CUR_FID(msr) ((msr) & 0x3F)
+#define AMD_17H_CUR_VID(msr) (((msr) >> 14) & 0xFF)
+#define AMD_17H_CUR_DID(msr) (((msr) >> 8) & 0x3F)
+#define AMD_17H_CUR_FID(msr) ((msr) & 0xFF)
+
#define HWPSTATE_DEBUG(dev, msg...) \
do{ \
if(hwpstate_verbose) \
@@ -426,6 +430,15 @@
case 0x15:
case 0x16:
hwpstate_set[i].freq = (100 * (fid + 0x10)) >> did;
+ break;
+ case 0x17:
+ did = AMD_17H_CUR_DID(msr);
+ if (did == 0) {
+ HWPSTATE_DEBUG(dev, "unexpected did: 0\n");
+ did = 1;
+ }
+ fid = AMD_17H_CUR_FID(msr);
+ hwpstate_set[i].freq = (200 * fid) / did;
break;
default:
HWPSTATE_DEBUG(dev, "get_info_from_msr: AMD family"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 11, 4:51 PM (20 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23584890
Default Alt Text
D12082.diff (955 B)
Attached To
Mode
D12082: Add powerd(8) support for AMD family 17h (Zen) CPUs
Attached
Detach File
Event Timeline
Log In to Comment