xref: /freebsd/share/man/man4/ipmi.4 (revision 5dae51da3da0cc94d17bd67b308fad304ebec7e0)
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.\" $FreeBSD$
27.\"
28.Dd July 10, 2007
29.Dt IPMI 4
30.Os
31.Sh NAME
32.Nm ipmi
33.Nd "OpenIPMI compatible IPMI interface driver"
34.Sh SYNOPSIS
35.Cd "device ipmi"
36.Pp
37To manually specify I/O attachment in
38.Pa /boot/device.hints :
39.Cd hint.ipmi.0.at="isa"
40.Cd hint.ipmi.0.port="0xCA2"
41.Cd hint.ipmi.0.spacing="8"
42.Cd hint.ipmi.0.mode="KCS"
43.Pp
44To manually specify memory attachment in
45.Pa /boot/device.hints :
46.Cd hint.ipmi.0.at="isa"
47.Cd hint.ipmi.0.maddr="0xf0000000"
48.Cd hint.ipmi.0.spacing="8"
49.Cd hint.ipmi.0.mode="SMIC"
50.Pp
51Meaning of
52.Ar spacing :
53.Bl -tag -offset indent -compact -width 0x0
54.It 8
558 bit alignment
56.It 16
5716 bit alignment
58.It 32
5932 bit alignment
60.El
61.Pp
62If the
63.Ar port
64and
65.Ar spacing
66are not specified the interface type default will be used.
67Only specify either the
68.Ar port
69for I/O access or
70.Ar maddr
71for memory access.
72.Sh DESCRIPTION
73The
74.Tn IPMI
75(Intelligent Platform Management Interface) is a standard for
76monitoring system hardware by permitting generic code to detect
77and monitor the sensors in a system.
78The
79.Tn IPMI
80standard offers watchdog support, an FRU database, and other
81support extensions.
82It is currently being adopted by the makers of many
83single board and embedded system manufacturers.
84.Pp
85The
86.Nm
87driver in
88.Fx
89is heavily adopted from the standard and
90.Tn Linux
91driver; however, not all features described in the
92standard are supported.
93.Sh IOCTLS
94Sending and receiving messages through the
95.Nm
96driver requires the use of
97.Xr ioctl 2 .
98The ioctls are used due to the complexity of
99data sent to and from the device.
100The
101.Xr ioctl 2
102command codes below are defined in
103.In sys/ipmi.h .
104The third argument to
105.Xr ioctl 2
106should be a pointer to the type indicated.
107.Pp
108Currently the following ioctls are supported:
109.Bl -tag -width indent
110.It Dv IPMICTL_RECEIVE_MSG Pq Vt "struct ipmi_recv"
111Receive a message.
112Possible error values:
113.Bl -tag -width Er
114.It Bq Er EAGAIN
115No messages are in the process queue.
116.It Bq Er EFAULT
117An address supplied was invalid.
118.It Bq Er EMSGSIZE
119The address could not fit in the message buffer and
120will remain in the buffer.
121.El
122.It Dv IPMICTL_RECEIVE_MSG_TRUNC Pq Vt "struct ipmi_recv"
123Like
124.Dv IPMICTL_RECEIVE_MSG
125but if the message cannot fit into the buffer, it
126will truncate the contents instead of leaving the data
127in the buffer.
128.It Dv IPMICTL_SEND_COMMAND Pq Vt "struct ipmi_req"
129Send a message to the interface.
130Possible error values:
131.Bl -tag -width Er
132.It Bq Er EFAULT
133An address supplied was invalid.
134.It Bq Er ENOMEM
135Buffers could not be allowed for the command, out of memory.
136.El
137.It Dv IPMICTL_SET_MY_ADDRESS_CMD Pq Vt "unsigned int"
138Set the slave address for source messages.
139.It Dv IPMICTL_GET_MY_ADDRESS_CMD Pq Vt "unsigned int"
140Get the slave address for source messages.
141.It Dv IPMICTL_SET_MY_LUN_CMD Pq Vt "unsigned int"
142Set the slave LUN for source messages.
143.It Dv IPMICTL_GET_MY_LUN_CMD Pq Vt "unsigned int"
144Get the slave LUN for source messages.
145.El
146.Ss Unimplemented Ioctls
147.Bl -tag -width indent
148.It Dv IPMICTL_REGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec"
149Register to receive a specific command.
150Possible error values:
151.Bl -tag -width Er
152.It Bq Er EFAULT
153An supplied address was invalid.
154.It Bq Er EBUSY
155The network function/command is already in use.
156.It Bq Er ENOMEM
157Could not allocate memory.
158.El
159.It Dv IPMICTL_UNREGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec"
160Unregister to receive a specific command.
161Possible error values:
162.Bl -tag -width Er
163.It Bq Er EFAULT
164An address supplied was invalid.
165.It Bq Er ENOENT
166The network function/command was not found.
167.El
168.El
169.Ss Stub Only Ioctl
170.Bl -tag -width indent
171.It Dv IPMICTL_SET_GETS_EVENTS_CMD Pq Vt int
172Set whether this interface receives events.
173Possible error values:
174.Bl -tag -width Er
175.It Bq Er EFAULT
176An address supplied was invalid.
177.El
178.El
179.Sh SEE ALSO
180.Xr ioctl 2 ,
181.Xr watchdog 4 ,
182.Xr watchdog 8 ,
183.Xr watchdogd 8 ,
184.Xr watchdog 9
185.Sh HISTORY
186The
187.Nm
188driver first appeared in
189.Fx 6.2 .
190.Sh AUTHORS
191.An -nosplit
192The
193.Nm
194driver was written by
195.An Doug Ambrisko Aq Mt ambrisko@FreeBSD.org .
196This manual page was written by
197.An Tom Rhodes Aq Mt trhodes@FreeBSD.org .
198.Sh BUGS
199Not all features of the MontaVista driver are supported.
200.Pp
201Currently, IPMB and BT modes are not implemented.
202