1 .\" Copyright (c) 2006-2008 Stanislav Sedov <stas@FreeBSD.org>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" $FreeBSD: release/10.0.0/share/man/man4/cpuctl.4 235317 2012-05-12 03:25:46Z gjb $
32 .Nd cpuctl pseudo device
34 To compile this driver into the kernel,
35 place the following lines in your kernel
37 .Bd -ragged -offset indent
41 Alternatively, to load the driver as a module
42 at boot time, place the following in
44 .Bd -literal -offset indent
50 presents interface to the system CPU.
51 It provides functionality to retrieve
52 CPUID information, read/write machine specific registers (MSR) and perform
55 For each CPU present in the system, the special device
57 with the appropriate index will be created.
58 For multicore CPUs such a
59 special device will be created for each core.
61 Currently, only x86_64 processors are supported.
63 All of the supported operations are invoked using the
66 Currently, the following ioctls are defined:
67 .Bl -tag -width CPUCTL_UPDATE
68 .It Dv CPUCTL_RDMSR Fa cpuctl_msr_args_t *args
69 .It Dv CPUCTL_WRMSR Fa cpuctl_msr_args_t *args
70 Read/write CPU machine specific register.
73 structure is defined in
78 int msr; /* MSR to read */
82 .It Dv CPUCTL_MSRSBIT Fa cpuctl_msr_args_t *args
83 .It Dv CPUCTL_MSRCBIT Fa cpuctl_msr_args_t *args
84 Set/clear MSR bits according to the mask given in the
87 .It Dv CPUCTL_CPUID Fa cpuctl_cpuid_args_t *args
88 Retrieve CPUID information.
89 Arguments are supplied in
93 int level; /* CPUID level */
95 } cpuctl_cpuid_args_t;
100 field indicates the CPUID level to retrieve information for, while the
102 field is used to store the received CPUID data.
103 .It Dv CPUCTL_UPDATE cpuctl_update_args_t *args
104 Update CPU firmware (microcode).
105 The structure is defined in
112 } cpuctl_update_args_t;
117 field should point to the firmware image of size
121 For additional information refer to
124 .Bl -tag -width /dev/cpuctl -compact
130 The operation requested is not supported by the device (e.g., unsupported
131 architecture or the CPU is disabled).
133 Incorrect request was supplied, or microcode image is not correct.
135 No physical memory was available to complete the request.
137 The firmware image address points outside the process address space.
145 driver first appeared in
150 module and this manual page were written by
151 .An Stanislav Sedov Aq Mt stas@FreeBSD.org .
153 Yes, probably, report if any.