FreeBSD Bugzilla – Attachment 186809 Details for
Bug 218262
[hwpstate] does not set overclocked frequency on AMD Ryzen CPU
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
zenstate.c
zenstate.c (text/x-csrc), 612 bytes, created by
Val Packett
on 2017-09-29 21:38:59 UTC
(
hide
)
Description:
zenstate.c
Filename:
MIME Type:
Creator:
Val Packett
Created:
2017-09-29 21:38:59 UTC
Size:
612 bytes
patch
obsolete
>// before running: # kldload cpuctl >#include <stdio.h> >#include <stdint.h> >#include <fcntl.h> >#include <unistd.h> >#include <sys/ioctl.h> >#include <sys/cpuctl.h> > >int main() { > cpuctl_msr_args_t setp0 = { 0xc0010062, 0 }, getp = { 0xc0010063, 0 }; > for (int cpu = 0; cpu < 15; cpu++) { > char path[32]; > sprintf((char*)&path, "/dev/cpuctl%d", cpu); > int fd = open(path, O_RDWR); > printf("%s wrmsr return %d\n", path, ioctl(fd, CPUCTL_WRMSR, &setp0)); > printf("%s rdmsr return %d", path, ioctl(fd, CPUCTL_RDMSR, &getp)); > printf(" value %lx\n", getp.data); > close(fd); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 218262
: 186809