CPUCONTROL(8)
π cpucontrol(8): the cpuctl(4) control bestie π
Okay so this is the manual page for cpucontrol, section 8 of your system-manager bestie era. It's giving βpoke CPU registers and apply firmware updatesβ energy. Let's go, no cap. π
π NAME π
cpucontrol β control utility for the cpuctl(4) device. That's the whole name, periodt.
β¨ SYNOPSIS β¨
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
π¦ DESCRIPTION π¦
Bestie, 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. Iconic. π
The following options are available:
-d datadirβ Directory paths where to look for microcode images. The option can be specified multiple times. The paths are added in order of the options appearance on the command line, default directories are appended after the user-supplied paths.-nβ Do not look for the microcode images in the standard directories. Currently standard directory to look for the microcode update files is/usr/local/share/cpucontrol.-m msrβ Show value of the specified MSR. MSR register number should be given as a hexadecimal number. The high word is printed first, then the low word is printed second.-m msr=valueβ Store the value in the specified MSR register. The value argument can be prefixed with~operator. In this case the inverted value of argument will be stored in the register.-m msr&=maskβ Store the result of bitwise AND operation between mask and the current MSR value in the MSR register. The mask argument can be prefixed with~operator. In this case the inverted value of mask will be used.-m msr|=maskβ Store the result of bitwise OR operation between mask and the current MSR value in the MSR register. The mask argument can be prefixed with~operator. In this case the inverted value of mask will be used.-i levelβ Retrieve CPUID info. Level should be given as a hex number.-i level,level_typeβ Retrieve CPUID info. Level and level_type should be given as hex numbers.-uβ Apply CPU firmware updates. Thecpucontrolutility will walk through the configured data directories and apply all firmware updates available for this CPU.-eβ Re-evaluate the kernel flags indicating the present CPU features. This command is typically executed after a firmware update was applied which changes information reported by the CPUID instruction.-vβ Increase the verbosity level.-hβ Show help message.
β οΈ Only execute the -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. Like, fr fr, don't skip this warning bestie. π
π EXIT STATUS π
The cpucontrol utility exits 0 on success, and >0 if an error occurs. That's it. β
π EXAMPLES π
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
π¦ SEE ALSO π¦
cpuctl(4)β go read it, bestie. π
πΈ HISTORY πΈ
The cpucontrol utility first appeared in FreeBSD 7.2. A classic. π
π«Ά AUTHORS π«Ά
The cpucontrol utility and this manual page was written by Stanislav Sedov <stas@FreeBSD.org>. Legend behavior. π
π Cute sign-off: this page comes from Debian, dated January 5, 2018, and it's CPUCONTROL(8), periodt. π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2006, 2008 Stanislav Sedov <stas@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms