xref: /freebsd/share/man/man4/ipmi.4 (revision 8847579c57d6aff2b3371c707dce7a2cee8389aa)
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 April 20, 2006
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
37.In sys/dev/ipmi.h
38.Ft int
39.Fn ioctl "int d" "IPMICTL_RECEIVE_MSG_TRUNC" "struct ipmi_recv *"
40.Ft int
41.Fn ioctl "int d" "IPMICTL_RECEIVE_MSG" "struct ipmi_recv *"
42.Ft int
43.Fn ioctl "int d" "IPMICTL_SEND_COMMAND" "struct ipmi_req *"
44.Ft int
45.Fn ioctl "int d" "IPMICTL_REGISTER_FOR_CMD" "struct ipmi_cmdspec *"
46.Ft int
47.Fn ioctl "int d" "IPMICTL_UNREGISTER_FOR_CMD" "struct ipmi_cmdspec *"
48.Ft int
49.Fn ioctl "int d" "IPMICTL_SET_GETS_EVENTS_CMD" "int *"
50.Ft int
51.Fn ioctl "int d" "IPMICTL_SET_MY_ADDRESS_CMD" "unsigned int *"
52.Ft int
53.Fn ioctl "int d" "IPMICTL_GET_MY_ADDRESS_CMD" "unsigned int *"
54.Ft int
55.Fn ioctl "int d" "IPMICTL_SET_MY_LUN_CMD" "unsigned int *"
56.Ft int
57.Fn ioctl "int d" "IPMICTL_GET_MY_LUN_CMD" "unsigned int *"
58.Sh DESCRIPTION
59The
60.Tn IPMI
61(Intelligent Platform Management Interface) is a standard for
62monitoring system hardware by permitting generic code to detect
63and monitor the sensors in a system.
64The
65.Tn IPMI
66standard offers watchdog support, an FRU database, and other
67support extensions.
68It is currently being adopted by the makers of many
69single board and embedded system manufacturers.
70.Pp
71The
72.Nm
73driver in
74.Fx
75is heavily adopted from the standard and
76.Lx
77driver; however, not all features described in the
78standard are supported.
79.Sh IOCTL
80Sending and receiving messages through the
81.Nm
82driver requires the use of IOCTLs.
83The IOCTLs are used due to the complexity of
84data sent to and from the device.
85Currently the following IOCTLs are defined:
86.Pp
87.Dv IPMI_IOC_MAGIC
88The magic IOCTL value for this interface.
89.Pp
90.Dv IPMICTL_RECEIVE_MSG_TRUNC
91Like
92.Dv RECEIVE_MSG
93but if the message can not fit into the buffer, it
94will truncate the contents instead of leaving the data
95in the buffer.
96.Pp
97.Dv IPMICTL_RECEIVE_MSG
98Receive a message.
99Possible error values:
100.Bl -tag -width Er
101.It Bq Er EAGAIN
102No messages are in the process queue.
103.It Bq Er EFAULT
104An address supplied was invalid.
105.It Bq Er EMSGSIZE
106The address could not fit in the message buffer and
107will remain in the buffer.
108.El
109.Pp
110.Dv IPMICTL_SEND_COMMAND
111Send a message to the interface.
112Possible error values:
113.Bl -tag -width Er
114.It Bq Er EFAULT
115An address supplied was invalid
116.It Bq Er ENOMEM
117Buffers could not be allowed for the command, out of memory.
118.El
119.Pp
120.Dv IPMICTL_SET_MY_ADDRESS_CMD
121Set the slave address for source messages.
122.Pp
123.Dv IPMICTL_GET_MY_ADDRESS_CMD
124Get the slave address for source messages.
125.Pp
126.Dv IPMICTL_SET_MY_LUN_CMD
127Set the slave LUN for source messages.
128.Pp
129.Dv IPMICTL_GET_MY_LUN_CMD
130Get the slave LUN for source messages.
131.Pp
132.Ss Unimplemented IOCTLS:
133.Pp
134.Dv IPMICTL_REGISTER_FOR_CMD
135Register to receive a specfic command
136Possible error values:
137.Bl -tag -width Er
138.It Bq Er EFAULT
139An supplied address was invalid.
140.It Bq Er EBUSY
141The network function/command is already in use.
142.It Bq Er ENOMEM
143Could not allocate memory.
144.El
145.Pp
146.Dv IPMICTL_UNREGISTER_FOR_CMD
147Unregister to receive a specific command
148Possible error values:
149.Bl -tag -width Er
150.It Bq Er EFAULT
151An address supplied was invalid.
152.It Bq Er ENOENT
153The network function/command was not found.
154.El
155.Pp
156.Ss Stub only IOCTL:
157.Pp
158.Dv IPMICTL_SET_GETS_EVENTS_CMD
159Set whether this interface receives events.
160Possible error values:
161.Bl -tag -width Er
162.It Bq Er EFAULT
163An address supplied was invalid.
164.El
165.Sh SEE ALSO
166.Xr ioctl 2 ,
167.Xr watchdog 4 ,
168.Xr watchdog 8 ,
169.Xr watchdogd 8 ,
170.Xr watchdog 9
171.Sh HISTORY
172The
173.Nm
174driver first appeared in
175.Fx 7.0 .
176.Sh AUTHORS
177.An -nosplit
178The
179.Nm
180driver was written by
181.An Doug Ambrisko Aq ambrisko@FreeBSD.org .
182This manual page was written by
183.An Tom Rhodes Aq trhodes@FreeBSD.org .
184.Sh BUGS
185Not all features of the MontaVista driver are supported.
186.Pp
187Currently, IPMB and BT modes are not implemented.
188