]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - usr.sbin/cpucontrol/cpucontrol.8
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / usr.sbin / cpucontrol / cpucontrol.8
1 .\" Copyright (c) 2006, 2008 Stanislav Sedov <stas@FreeBSD.org>.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
12 .\"
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
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd August 4, 2008
28 .Dt CPUCONTROL 8
29 .Os
30 .Sh NAME
31 .Nm cpucontrol
32 .Nd control utility for the
33 .Xr cpuctl 4
34 device.
35 .Sh SYNOPSIS
36 .Nm
37 .Op Fl vh
38 .Fl m Ar msr Ns Op = Ns Ar value
39 .Bk
40 .Ar device
41 .Ek
42 .Nm
43 .Op Fl vh
44 .Fl i Ar level
45 .Bk
46 .Ar device
47 .Ek
48 .Nm
49 .Op Fl vh
50 .Op Fl d Ar datadir
51 .Fl u
52 .Bk
53 .Ar device
54 .Ek
55 .Sh DESCRIPTION
56 The
57 .Nm
58 utility can be used to read and write arbitrary machine-specific
59 CPU registers via the
60 .Xr cpuctl 4
61 special device.
62 It can also be used to apply CPU firmware updates.
63 .Pp
64 The following options are available:
65 .Bl -tag -width indent
66 .It Fl d Ar datadir
67 Where to look for microcode images.
68 The option can be specified multiple times.
69 .It Fl m Ar msr Ns Op = Ns Ar value
70 Read/write the specified MSR.
71 Both the MSR and the value should be given as a hex number.
72 .It Fl i Ar level
73 Retrieve CPUID info.
74 Level should be given as a hex number.
75 .It Fl u
76 Apply CPU firmware updates.
77 The
78 .Nm
79 utility will walk through the configured data directories
80 and apply all firmware updates available for this CPU.
81 .It Fl v
82 Increase the verbosity level.
83 .It Fl h
84 Show help message.
85 .El
86 .Sh EXIT STATUS
87 .Ex -std
88 .Sh EXAMPLES
89 The command
90 .Pp
91 .Dq Li "cpucontrol -m 0x10 /dev/cpuctl0"
92 .Pp
93 will read the contents of TSC MSR from CPU 0.
94 .Pp
95 To set the CPU 0 TSC MSR register value to 0x1 issue
96 .Pp
97 .Dq Li "cpucontrol -m 0x10=0x1 /dev/cpuctl0"
98 .Pp
99 The command
100 .Pp
101 .Dq Li "cpucontrol -i 0x1 /dev/cpuctl1"
102 .Pp
103 will retrieve the CPUID level 0x1 from CPU 1.
104 .Pp
105 To perform firmware updates on CPU 0 from images located at
106 .Pa /usr/local/share/cpuctl/
107 use the following command:
108 .Pp
109 .Dq Li "cpucontrol -d /usr/local/share/cpuctl/ -u /dev/cpuctl0"
110 .Sh SEE ALSO
111 .Xr cpuctl 4
112 .Sh HISTORY
113 The
114 .Nm
115 utility first appeared in
116 .Fx 8.0 .
117 .Sh BUGS
118 Yes, probably, report if any.
119 .Sh AUTHORS
120 The
121 .Nm
122 utility and this manual page was written by
123 .An Stanislav Sedov Aq stas@FreeBSD.org .