]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/ipmi.4
Remove $FreeBSD$: two-line nroff pattern
[FreeBSD/FreeBSD.git] / share / man / man4 / ipmi.4
1 .\"
2 .\" Copyright (c) 2006 Tom Rhodes
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .Dd October 25, 2017
27 .Dt IPMI 4
28 .Os
29 .Sh NAME
30 .Nm ipmi
31 .Nd "OpenIPMI compatible IPMI interface driver"
32 .Sh SYNOPSIS
33 .Cd "device ipmi"
34 .Pp
35 To manually specify I/O attachment in
36 .Pa /boot/device.hints :
37 .Cd hint.ipmi.0.at="isa"
38 .Cd hint.ipmi.0.port="0xCA2"
39 .Cd hint.ipmi.0.spacing="8"
40 .Cd hint.ipmi.0.mode="KCS"
41 .Pp
42 To manually specify memory attachment in
43 .Pa /boot/device.hints :
44 .Cd hint.ipmi.0.at="isa"
45 .Cd hint.ipmi.0.maddr="0xf0000000"
46 .Cd hint.ipmi.0.spacing="8"
47 .Cd hint.ipmi.0.mode="SMIC"
48 .Pp
49 Meaning of
50 .Ar spacing :
51 .Bl -tag -offset indent -compact -width 0x0
52 .It 8
53 8 bit alignment
54 .It 16
55 16 bit alignment
56 .It 32
57 32 bit alignment
58 .El
59 .Pp
60 If the
61 .Ar port
62 and
63 .Ar spacing
64 are not specified the interface type default will be used.
65 Only specify either the
66 .Ar port
67 for I/O access or
68 .Ar maddr
69 for memory access.
70 .Sh DESCRIPTION
71 The
72 .Tn IPMI
73 (Intelligent Platform Management Interface) is a standard for
74 monitoring system hardware by permitting generic code to detect
75 and monitor the sensors in a system.
76 The
77 .Tn IPMI
78 standard offers watchdog support, an FRU database, and other
79 support extensions.
80 It is currently being adopted by the makers of many
81 single board and embedded system manufacturers.
82 .Pp
83 The
84 .Nm
85 driver in
86 .Fx
87 is heavily adopted from the standard and
88 .Tn Linux
89 driver; however, not all features described in the
90 standard are supported.
91 .Pp
92 The
93 .Nm
94 driver implements the power cycling option to
95 .Xr shutdown 8
96 to implement power cycling of the system.
97 The motherboard's BMC must support the chassis device and the optional
98 power cycle subcomand of the chassis control command as described in section 28.3
99 of the IPMI standard.
100 The length of time the system is off will be at least one second, but
101 may be longer if the power cycle interval has been set (see section 28.9).
102 .Sh IOCTLS
103 Sending and receiving messages through the
104 .Nm
105 driver requires the use of
106 .Xr ioctl 2 .
107 The ioctls are used due to the complexity of
108 data sent to and from the device.
109 The
110 .Xr ioctl 2
111 command codes below are defined in
112 .In sys/ipmi.h .
113 The third argument to
114 .Xr ioctl 2
115 should be a pointer to the type indicated.
116 .Pp
117 Currently the following ioctls are supported:
118 .Bl -tag -width indent
119 .It Dv IPMICTL_RECEIVE_MSG Pq Vt "struct ipmi_recv"
120 Receive a message.
121 Possible error values:
122 .Bl -tag -width Er
123 .It Bq Er EAGAIN
124 No messages are in the process queue.
125 .It Bq Er EFAULT
126 An address supplied was invalid.
127 .It Bq Er EMSGSIZE
128 The address could not fit in the message buffer and
129 will remain in the buffer.
130 .El
131 .It Dv IPMICTL_RECEIVE_MSG_TRUNC Pq Vt "struct ipmi_recv"
132 Like
133 .Dv IPMICTL_RECEIVE_MSG
134 but if the message cannot fit into the buffer, it
135 will truncate the contents instead of leaving the data
136 in the buffer.
137 .It Dv IPMICTL_SEND_COMMAND Pq Vt "struct ipmi_req"
138 Send a message to the interface.
139 Possible error values:
140 .Bl -tag -width Er
141 .It Bq Er EFAULT
142 An address supplied was invalid.
143 .It Bq Er ENOMEM
144 Buffers could not be allowed for the command, out of memory.
145 .El
146 .It Dv IPMICTL_SET_MY_ADDRESS_CMD Pq Vt "unsigned int"
147 Set the slave address for source messages.
148 .It Dv IPMICTL_GET_MY_ADDRESS_CMD Pq Vt "unsigned int"
149 Get the slave address for source messages.
150 .It Dv IPMICTL_SET_MY_LUN_CMD Pq Vt "unsigned int"
151 Set the slave LUN for source messages.
152 .It Dv IPMICTL_GET_MY_LUN_CMD Pq Vt "unsigned int"
153 Get the slave LUN for source messages.
154 .El
155 .Ss Unimplemented Ioctls
156 .Bl -tag -width indent
157 .It Dv IPMICTL_REGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec"
158 Register to receive a specific command.
159 Possible error values:
160 .Bl -tag -width Er
161 .It Bq Er EFAULT
162 An supplied address was invalid.
163 .It Bq Er EBUSY
164 The network function/command is already in use.
165 .It Bq Er ENOMEM
166 Could not allocate memory.
167 .El
168 .It Dv IPMICTL_UNREGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec"
169 Unregister to receive a specific command.
170 Possible error values:
171 .Bl -tag -width Er
172 .It Bq Er EFAULT
173 An address supplied was invalid.
174 .It Bq Er ENOENT
175 The network function/command was not found.
176 .El
177 .El
178 .Ss Stub Only Ioctl
179 .Bl -tag -width indent
180 .It Dv IPMICTL_SET_GETS_EVENTS_CMD Pq Vt int
181 Set whether this interface receives events.
182 Possible error values:
183 .Bl -tag -width Er
184 .It Bq Er EFAULT
185 An address supplied was invalid.
186 .El
187 .El
188 .Sh SEE ALSO
189 .Xr ioctl 2 ,
190 .Xr watchdog 4 ,
191 .Xr reboot 8 ,
192 .Xr shutdown 8 ,
193 .Xr watchdog 8 ,
194 .Xr watchdogd 8 ,
195 .Xr watchdog 9
196 .Sh HISTORY
197 The
198 .Nm
199 driver first appeared in
200 .Fx 6.2 .
201 .Sh AUTHORS
202 .An -nosplit
203 The
204 .Nm
205 driver was written by
206 .An Doug Ambrisko Aq Mt ambrisko@FreeBSD.org .
207 This manual page was written by
208 .An Tom Rhodes Aq Mt trhodes@FreeBSD.org .
209 .Sh BUGS
210 Not all features of the MontaVista driver are supported.
211 .Pp
212 Currently, IPMB and BT modes are not implemented.