CPUCONTROL(8) | MidnightBSD System Manager's Manual | CPUCONTROL(8) |
cpucontrol
—
control utility for the
cpuctl(4)
device
cpucontrol |
[-v ] -m
msr device |
cpucontrol |
[-v ] -m
msr=value device |
cpucontrol |
[-v ] -m
msr&=mask device |
cpucontrol |
[-v ] -m
msr|=mask device |
cpucontrol |
[-v ] -i
level device |
cpucontrol |
[-v ] -i
level,level_type device |
cpucontrol |
[-vn ]
[-d datadir] -u
device |
cpucontrol |
-e device |
The cpucontrol
utility can be used to read
and write arbitrary machine-specific CPU registers via the
cpuctl(4) special device.
It can also be used to apply CPU firmware updates.
The following options are available:
-d
datadir-n
-m
msr-m
msr=value-m
msr&=mask-m
msr|=mask-i
level-i
level,level_type-u
cpucontrol
utility
will walk through the configured data directories and apply all firmware
updates available for this CPU.-e
CPUID
instruction.
-e
command after
the microcode update was applied to all CPUs in the system. The kernel
does not operate correctly if the features of processors are not
identical.-v
-h
The cpucontrol
utility exits 0 on
success, and >0 if an error occurs.
The command
“cpucontrol -m 0x10
/dev/cpuctl0
”
will read the contents of TSC MSR from CPU 0.
To set the CPU 0 TSC MSR register value to 0x1 issue
“cpucontrol -m 0x10=0x1
/dev/cpuctl0
”.
The following command will clear the second bit of TSC register:
“cpucontrol -m 0x10&=~0x02
/dev/cpuctl0
”.
The following command will set the forth and second bit of TSC register:
“cpucontrol -m 0x10|=0x0a
/dev/cpuctl0
”.
The command
“cpucontrol -i 0x1
/dev/cpuctl1
”
will retrieve the CPUID level 0x1 from CPU 1.
To perform firmware updates on CPU 0 from images located at /usr/local/share/cpuctl use the following command:
“cpucontrol -nd /usr/local/share/cpuctl -u
/dev/cpuctl0
”
The cpucontrol
utility first appeared in
FreeBSD 7.2.
The cpucontrol
utility and this manual
page was written by Stanislav Sedov
<stas@FreeBSD.org>.
January 5, 2018 | midnightbsd-3.1 |