Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cpuctl(8) [netbsd man page]

CPUCTL(8)						    BSD System Manager's Manual 						 CPUCTL(8)

NAME
cpuctl -- program to control CPUs SYNOPSIS
cpuctl command [arguments] DESCRIPTION
The cpuctl command can be used to control and inspect the state of CPUs in the system. The first argument, command, specifies the action to take. Valid commands are: identify cpu Output information on the specified CPU's features and capabilities. Not available on all architectures. list For each CPU in the system, display the current state and time of the last state change. offline cpuno Set the specified CPU off line. Unbound LWPs (lightweight processes) will not be executed on the CPU while it is off line. Bound LWPs will continue to be executed on the CPU, and device interrupts routed to the CPU will continue to be handled. A future release of the system may allow device interrupts to be re-routed away from individual CPUs. At least one CPU in the system must remain on line. online cpuno Set the specified CPU on line, making it available to run unbound LWPs. ucode [file] This applies the microcode patch on all CPUs. The default filename is used if no filename is specified. The identify com- mand prints the installed version on that CPU. On success the identify command show different ucode versions before and after this command. FILES
/dev/cpuctl control device /libdata/firmware/x86/amd/ The directory to install the microcode file for AMD CPUs into. The default filename is microcode_amd.bin for CPU families 0x10 to 0x14. The default filename is microcode_amd_famXXh.bin where XX is the CPU family starting with 15 (hex). Get it from http://www.amd64.org/support/microcode.html EXAMPLES
Run cpuctl identify 0 and you should see something like this: cpu0: UCode version: 0x1000080 After applying the microcode patch with cpuctl ucode you can see with cpuctl identify 0 that the patch got applied: cpu0: UCode version: 0x1000083 SEE ALSO
psrset(8), schedctl(8) HISTORY
The cpuctl command first appeared in NetBSD 5.0. BSD
January 13, 2012 BSD

Check Out this Related Man Page

CPUCTL(4)						   BSD Kernel Interfaces Manual 						 CPUCTL(4)

NAME
cpuctl -- cpuctl pseudo device SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device cpuctl Alternatively, to load the driver as a module at boot time, place the following in loader.conf(5): cpuctl_load="YES" DESCRIPTION
The special device /dev/cpuctl presents interface to the system CPU. It provides functionality to retrieve CPUID information, read/write machine specific registers (MSR) and perform CPU firmware updates. For each CPU present in the system, the special device /dev/cpuctl%d with the appropriate index will be created. For multicore CPUs such a special device will be created for each core. Currently, only i386 and amd64 processors are supported. IOCTL INTERFACE
All of the supported operations are invoked using the ioctl(2) system call. Currently, the following ioctls are defined: CPUCTL_RDMSR cpuctl_msr_args_t *args CPUCTL_WRMSR cpuctl_msr_args_t *args Read/write CPU machine specific register. The cpuctl_msr_args_t structure is defined in <sys/cpuctl.h> as: typedef struct { int msr; /* MSR to read */ uint64_t data; } cpuctl_msr_args_t; CPUCTL_MSRSBIT cpuctl_msr_args_t *args CPUCTL_MSRCBIT cpuctl_msr_args_t *args Set/clear MSR bits according to the mask given in the data field. CPUCTL_CPUID cpuctl_cpuid_args_t *args Retrieve CPUID information. Arguments are supplied in the following struct: typedef struct { int level; /* CPUID level */ uint32_t data[4]; } cpuctl_cpuid_args_t; The level field indicates the CPUID level to retrieve information for, while the data field is used to store the received CPUID data. CPUCTL_UPDATE cpuctl_update_args_t *args Update CPU firmware (microcode). The structure is defined in <sys/cpuctl.h> as: typedef struct { void *data; size_t size; } cpuctl_update_args_t; The data field should point to the firmware image of size size. For additional information refer to cpuctl.h. RETURN VALUES
[ENXIO] The operation requested is not supported by the device (e.g. unsupported architecture or the CPU is disabled) [EINVAL] Incorrect request was supplied, or microcode image is not correct. [ENOMEM] No physical memory was available to complete the request. [EFAULT] The firmware image address points outside the process address space. FILES
/dev/cpuctl SEE ALSO
hwpmc(4), cpucontrol(8) HISTORY
The cpuctl driver first appeared in FreeBSD 7.2. BUGS
Yes, probably, report if any. AUTHORS
The cpuctl module and this manual page were written by Stanislav Sedov <stas@FreeBSD.org>. BSD
June 30, 2009 BSD
Man Page