1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
<table class="head">
<tr>
<td class="head-ltitle">IPMI(4)</td>
<td class="head-vol">Device Drivers Manual</td>
<td class="head-rtitle">IPMI(4)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">ipmi</code> — <span class="Nd">OpenIPMI
compatible IPMI interface driver</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">device ipmi</code></p>
<p class="Pp">To manually specify I/O attachment in
<span class="Pa">/boot/device.hints</span>:
<br/>
<code class="Cd">hint.ipmi.0.at="isa"</code>
<br/>
<code class="Cd">hint.ipmi.0.port="0xCA2"</code>
<br/>
<code class="Cd">hint.ipmi.0.spacing="8"</code>
<br/>
<code class="Cd">hint.ipmi.0.mode="KCS"</code></p>
<p class="Pp">To manually specify memory attachment in
<span class="Pa">/boot/device.hints</span>:
<br/>
<code class="Cd">hint.ipmi.0.at="isa"</code>
<br/>
<code class="Cd">hint.ipmi.0.maddr="0xf0000000"</code>
<br/>
<code class="Cd">hint.ipmi.0.spacing="8"</code>
<br/>
<code class="Cd">hint.ipmi.0.mode="SMIC"</code></p>
<p class="Pp">Meaning of <var class="Ar">spacing</var>:</p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
<dt>8</dt>
<dd>8 bit alignment</dd>
<dt>16</dt>
<dd>16 bit alignment</dd>
<dt>32</dt>
<dd>32 bit alignment</dd>
</dl>
</div>
<p class="Pp">If the <var class="Ar">port</var> and
<var class="Ar">spacing</var> are not specified the interface type default
will be used. Only specify either the <var class="Ar">port</var> for I/O
access or <var class="Ar">maddr</var> for memory access.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The IPMI (Intelligent Platform Management Interface) is a standard
for monitoring system hardware by permitting generic code to detect and
monitor the sensors in a system. The IPMI standard offers watchdog support,
an FRU database, and other support extensions. It is currently being adopted
by the makers of many single board and embedded system manufacturers.</p>
<p class="Pp">The <code class="Nm">ipmi</code> driver in
<span class="Ux">FreeBSD</span> is heavily adopted from the standard and
Linux driver; however, not all features described in the standard are
supported.</p>
<p class="Pp">The <code class="Nm">ipmi</code> driver implements the power
cycling option to <a class="Xr">shutdown(8)</a> to implement power cycling
of the system. The motherboard's BMC must support the chassis device and the
optional power cycle subcomand of the chassis control command as described
in section 28.3 of the IPMI standard. The length of time the system is off
will be at least one second, but may be longer if the power cycle interval
has been set (see section 28.9).</p>
</section>
<section class="Sh">
<h1 class="Sh" id="IOCTLS"><a class="permalink" href="#IOCTLS">IOCTLS</a></h1>
<p class="Pp">Sending and receiving messages through the
<code class="Nm">ipmi</code> driver requires the use of
<a class="Xr">ioctl(2)</a>. The ioctls are used due to the complexity of
data sent to and from the device. The <a class="Xr">ioctl(2)</a> command
codes below are defined in
<code class="In"><<a class="In">sys/ipmi.h</a>></code>. The third
argument to <a class="Xr">ioctl(2)</a> should be a pointer to the type
indicated.</p>
<p class="Pp">Currently the following ioctls are supported:</p>
<dl class="Bl-tag">
<dt id="IPMICTL_RECEIVE_MSG"><a class="permalink" href="#IPMICTL_RECEIVE_MSG"><code class="Dv">IPMICTL_RECEIVE_MSG</code></a>
(<var class="Vt">struct ipmi_recv</var>)</dt>
<dd>Receive a message. Possible error values:
<dl class="Bl-tag">
<dt>[<code class="Er">EAGAIN</code>]</dt>
<dd>No messages are in the process queue.</dd>
<dt>[<code class="Er">EFAULT</code>]</dt>
<dd>An address supplied was invalid.</dd>
<dt>[<code class="Er">EMSGSIZE</code>]</dt>
<dd>The address could not fit in the message buffer and will remain in the
buffer.</dd>
</dl>
</dd>
<dt id="IPMICTL_RECEIVE_MSG_TRUNC"><a class="permalink" href="#IPMICTL_RECEIVE_MSG_TRUNC"><code class="Dv">IPMICTL_RECEIVE_MSG_TRUNC</code></a>
(<var class="Vt">struct ipmi_recv</var>)</dt>
<dd>Like <code class="Dv">IPMICTL_RECEIVE_MSG</code> but if the message cannot
fit into the buffer, it will truncate the contents instead of leaving the
data in the buffer.</dd>
<dt id="IPMICTL_SEND_COMMAND"><a class="permalink" href="#IPMICTL_SEND_COMMAND"><code class="Dv">IPMICTL_SEND_COMMAND</code></a>
(<var class="Vt">struct ipmi_req</var>)</dt>
<dd>Send a message to the interface. Possible error values:
<dl class="Bl-tag">
<dt>[<code class="Er">EFAULT</code>]</dt>
<dd>An address supplied was invalid.</dd>
<dt>[<code class="Er">ENOMEM</code>]</dt>
<dd>Buffers could not be allowed for the command, out of memory.</dd>
</dl>
</dd>
<dt id="IPMICTL_SET_MY_ADDRESS_CMD"><a class="permalink" href="#IPMICTL_SET_MY_ADDRESS_CMD"><code class="Dv">IPMICTL_SET_MY_ADDRESS_CMD</code></a>
(<var class="Vt">unsigned int</var>)</dt>
<dd>Set the slave address for source messages.</dd>
<dt id="IPMICTL_GET_MY_ADDRESS_CMD"><a class="permalink" href="#IPMICTL_GET_MY_ADDRESS_CMD"><code class="Dv">IPMICTL_GET_MY_ADDRESS_CMD</code></a>
(<var class="Vt">unsigned int</var>)</dt>
<dd>Get the slave address for source messages.</dd>
<dt id="IPMICTL_SET_MY_LUN_CMD"><a class="permalink" href="#IPMICTL_SET_MY_LUN_CMD"><code class="Dv">IPMICTL_SET_MY_LUN_CMD</code></a>
(<var class="Vt">unsigned int</var>)</dt>
<dd>Set the slave LUN for source messages.</dd>
<dt id="IPMICTL_GET_MY_LUN_CMD"><a class="permalink" href="#IPMICTL_GET_MY_LUN_CMD"><code class="Dv">IPMICTL_GET_MY_LUN_CMD</code></a>
(<var class="Vt">unsigned int</var>)</dt>
<dd>Get the slave LUN for source messages.</dd>
</dl>
<section class="Ss">
<h2 class="Ss" id="Unimplemented_Ioctls"><a class="permalink" href="#Unimplemented_Ioctls">Unimplemented
Ioctls</a></h2>
<dl class="Bl-tag">
<dt id="IPMICTL_REGISTER_FOR_CMD"><a class="permalink" href="#IPMICTL_REGISTER_FOR_CMD"><code class="Dv">IPMICTL_REGISTER_FOR_CMD</code></a>
(<var class="Vt">struct ipmi_cmdspec</var>)</dt>
<dd>Register to receive a specific command. Possible error values:
<dl class="Bl-tag">
<dt>[<code class="Er">EFAULT</code>]</dt>
<dd>An supplied address was invalid.</dd>
<dt>[<code class="Er">EBUSY</code>]</dt>
<dd>The network function/command is already in use.</dd>
<dt>[<code class="Er">ENOMEM</code>]</dt>
<dd>Could not allocate memory.</dd>
</dl>
</dd>
<dt id="IPMICTL_UNREGISTER_FOR_CMD"><a class="permalink" href="#IPMICTL_UNREGISTER_FOR_CMD"><code class="Dv">IPMICTL_UNREGISTER_FOR_CMD</code></a>
(<var class="Vt">struct ipmi_cmdspec</var>)</dt>
<dd>Unregister to receive a specific command. Possible error values:
<dl class="Bl-tag">
<dt>[<code class="Er">EFAULT</code>]</dt>
<dd>An address supplied was invalid.</dd>
<dt>[<code class="Er">ENOENT</code>]</dt>
<dd>The network function/command was not found.</dd>
</dl>
</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="Stub_Only_Ioctl"><a class="permalink" href="#Stub_Only_Ioctl">Stub
Only Ioctl</a></h2>
<dl class="Bl-tag">
<dt id="IPMICTL_SET_GETS_EVENTS_CMD"><a class="permalink" href="#IPMICTL_SET_GETS_EVENTS_CMD"><code class="Dv">IPMICTL_SET_GETS_EVENTS_CMD</code></a>
(<var class="Vt">int</var>)</dt>
<dd>Set whether this interface receives events. Possible error values:
<dl class="Bl-tag">
<dt>[<code class="Er">EFAULT</code>]</dt>
<dd>An address supplied was invalid.</dd>
</dl>
</dd>
</dl>
</section>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">ioctl(2)</a>, <a class="Xr">watchdog(4)</a>,
<a class="Xr">reboot(8)</a>, <a class="Xr">shutdown(8)</a>,
<a class="Xr">watchdog(8)</a>, <a class="Xr">watchdogd(8)</a>,
<a class="Xr">watchdog(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">ipmi</code> driver first appeared in
<span class="Ux">FreeBSD 6.2</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">The <code class="Nm">ipmi</code> driver was written by
<span class="An">Doug Ambrisko</span>
<<a class="Mt" href="mailto:ambrisko@FreeBSD.org">ambrisko@FreeBSD.org</a>>.
This manual page was written by <span class="An">Tom Rhodes</span>
<<a class="Mt" href="mailto:trhodes@FreeBSD.org">trhodes@FreeBSD.org</a>>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp">Not all features of the MontaVista driver are supported.</p>
<p class="Pp">Currently, IPMB and BT modes are not implemented.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">October 25, 2017</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|