xref: /freebsd/share/man/man4/ipmi.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
137b1ce13SDoug Ambrisko.\"
237b1ce13SDoug Ambrisko.\" Copyright (c) 2006 Tom Rhodes
337b1ce13SDoug Ambrisko.\" All rights reserved.
437b1ce13SDoug Ambrisko.\"
537b1ce13SDoug Ambrisko.\" Redistribution and use in source and binary forms, with or without
637b1ce13SDoug Ambrisko.\" modification, are permitted provided that the following conditions
737b1ce13SDoug Ambrisko.\" are met:
837b1ce13SDoug Ambrisko.\" 1. Redistributions of source code must retain the above copyright
937b1ce13SDoug Ambrisko.\"    notice, this list of conditions and the following disclaimer.
1037b1ce13SDoug Ambrisko.\" 2. Redistributions in binary form must reproduce the above copyright
1137b1ce13SDoug Ambrisko.\"    notice, this list of conditions and the following disclaimer in the
1237b1ce13SDoug Ambrisko.\"    documentation and/or other materials provided with the distribution.
1337b1ce13SDoug Ambrisko.\"
1437b1ce13SDoug Ambrisko.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1537b1ce13SDoug Ambrisko.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1637b1ce13SDoug Ambrisko.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1737b1ce13SDoug Ambrisko.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1837b1ce13SDoug Ambrisko.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1937b1ce13SDoug Ambrisko.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2037b1ce13SDoug Ambrisko.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2137b1ce13SDoug Ambrisko.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2237b1ce13SDoug Ambrisko.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2337b1ce13SDoug Ambrisko.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2437b1ce13SDoug Ambrisko.\" SUCH DAMAGE.
2537b1ce13SDoug Ambrisko.\"
26*2703928aSWarner Losh.Dd October 25, 2017
2737b1ce13SDoug Ambrisko.Dt IPMI 4
2837b1ce13SDoug Ambrisko.Os
2937b1ce13SDoug Ambrisko.Sh NAME
3037b1ce13SDoug Ambrisko.Nm ipmi
3137b1ce13SDoug Ambrisko.Nd "OpenIPMI compatible IPMI interface driver"
3237b1ce13SDoug Ambrisko.Sh SYNOPSIS
334ed06e74SChristian Brueffer.Cd "device ipmi"
3472d73315SDoug Ambrisko.Pp
3572d73315SDoug AmbriskoTo manually specify I/O attachment in
3672d73315SDoug Ambrisko.Pa /boot/device.hints :
3772d73315SDoug Ambrisko.Cd hint.ipmi.0.at="isa"
3872d73315SDoug Ambrisko.Cd hint.ipmi.0.port="0xCA2"
3972d73315SDoug Ambrisko.Cd hint.ipmi.0.spacing="8"
4072d73315SDoug Ambrisko.Cd hint.ipmi.0.mode="KCS"
4172d73315SDoug Ambrisko.Pp
4272d73315SDoug AmbriskoTo manually specify memory attachment in
4372d73315SDoug Ambrisko.Pa /boot/device.hints :
4472d73315SDoug Ambrisko.Cd hint.ipmi.0.at="isa"
4572d73315SDoug Ambrisko.Cd hint.ipmi.0.maddr="0xf0000000"
4672d73315SDoug Ambrisko.Cd hint.ipmi.0.spacing="8"
4772d73315SDoug Ambrisko.Cd hint.ipmi.0.mode="SMIC"
4872d73315SDoug Ambrisko.Pp
4972d73315SDoug AmbriskoMeaning of
5072d73315SDoug Ambrisko.Ar spacing :
5172d73315SDoug Ambrisko.Bl -tag -offset indent -compact -width 0x0
5272d73315SDoug Ambrisko.It 8
5372d73315SDoug Ambrisko8 bit alignment
5472d73315SDoug Ambrisko.It 16
5572d73315SDoug Ambrisko16 bit alignment
5672d73315SDoug Ambrisko.It 32
5772d73315SDoug Ambrisko32 bit alignment
5872d73315SDoug Ambrisko.El
5972d73315SDoug Ambrisko.Pp
6072d73315SDoug AmbriskoIf the
6172d73315SDoug Ambrisko.Ar port
6272d73315SDoug Ambriskoand
6372d73315SDoug Ambrisko.Ar spacing
6425972509SEdward Tomasz Napieralaare not specified the interface type default will be used.
6525972509SEdward Tomasz NapieralaOnly specify either the
6672d73315SDoug Ambrisko.Ar port
6772d73315SDoug Ambriskofor I/O access or
6872d73315SDoug Ambrisko.Ar maddr
6972d73315SDoug Ambriskofor memory access.
7037b1ce13SDoug Ambrisko.Sh DESCRIPTION
7137b1ce13SDoug AmbriskoThe
7237b1ce13SDoug Ambrisko.Tn IPMI
7337b1ce13SDoug Ambrisko(Intelligent Platform Management Interface) is a standard for
7437b1ce13SDoug Ambriskomonitoring system hardware by permitting generic code to detect
7537b1ce13SDoug Ambriskoand monitor the sensors in a system.
7637b1ce13SDoug AmbriskoThe
7737b1ce13SDoug Ambrisko.Tn IPMI
7837b1ce13SDoug Ambriskostandard offers watchdog support, an FRU database, and other
7937b1ce13SDoug Ambriskosupport extensions.
8037b1ce13SDoug AmbriskoIt is currently being adopted by the makers of many
8137b1ce13SDoug Ambriskosingle board and embedded system manufacturers.
8237b1ce13SDoug Ambrisko.Pp
8337b1ce13SDoug AmbriskoThe
8437b1ce13SDoug Ambrisko.Nm
8537b1ce13SDoug Ambriskodriver in
8637b1ce13SDoug Ambrisko.Fx
8737b1ce13SDoug Ambriskois heavily adopted from the standard and
88a4f3c153SRuslan Ermilov.Tn Linux
8937b1ce13SDoug Ambriskodriver; however, not all features described in the
9037b1ce13SDoug Ambriskostandard are supported.
911170c2feSWarner Losh.Pp
921170c2feSWarner LoshThe
931170c2feSWarner Losh.Nm
941170c2feSWarner Loshdriver implements the power cycling option to
951170c2feSWarner Losh.Xr shutdown 8
961170c2feSWarner Loshto implement power cycling of the system.
971170c2feSWarner LoshThe motherboard's BMC must support the chassis device and the optional
981170c2feSWarner Loshpower cycle subcomand of the chassis control command as described in section 28.3
99*2703928aSWarner Loshof the IPMI standard.
1001170c2feSWarner LoshThe length of time the system is off will be at least one second, but
1011170c2feSWarner Loshmay be longer if the power cycle interval has been set (see section 28.9).
102a4f3c153SRuslan Ermilov.Sh IOCTLS
10337b1ce13SDoug AmbriskoSending and receiving messages through the
10437b1ce13SDoug Ambrisko.Nm
105a4f3c153SRuslan Ermilovdriver requires the use of
106a4f3c153SRuslan Ermilov.Xr ioctl 2 .
107a4f3c153SRuslan ErmilovThe ioctls are used due to the complexity of
10837b1ce13SDoug Ambriskodata sent to and from the device.
109a4f3c153SRuslan ErmilovThe
110a4f3c153SRuslan Ermilov.Xr ioctl 2
111a4f3c153SRuslan Ermilovcommand codes below are defined in
112a4f3c153SRuslan Ermilov.In sys/ipmi.h .
113a4f3c153SRuslan ErmilovThe third argument to
114a4f3c153SRuslan Ermilov.Xr ioctl 2
115a4f3c153SRuslan Ermilovshould be a pointer to the type indicated.
11637b1ce13SDoug Ambrisko.Pp
117a4f3c153SRuslan ErmilovCurrently the following ioctls are supported:
118a4f3c153SRuslan Ermilov.Bl -tag -width indent
119a4f3c153SRuslan Ermilov.It Dv IPMICTL_RECEIVE_MSG Pq Vt "struct ipmi_recv"
12037b1ce13SDoug AmbriskoReceive a message.
12137b1ce13SDoug AmbriskoPossible error values:
12237b1ce13SDoug Ambrisko.Bl -tag -width Er
12337b1ce13SDoug Ambrisko.It Bq Er EAGAIN
12437b1ce13SDoug AmbriskoNo messages are in the process queue.
12537b1ce13SDoug Ambrisko.It Bq Er EFAULT
12637b1ce13SDoug AmbriskoAn address supplied was invalid.
12737b1ce13SDoug Ambrisko.It Bq Er EMSGSIZE
12837b1ce13SDoug AmbriskoThe address could not fit in the message buffer and
12937b1ce13SDoug Ambriskowill remain in the buffer.
13037b1ce13SDoug Ambrisko.El
131a4f3c153SRuslan Ermilov.It Dv IPMICTL_RECEIVE_MSG_TRUNC Pq Vt "struct ipmi_recv"
132a4f3c153SRuslan ErmilovLike
133a4f3c153SRuslan Ermilov.Dv IPMICTL_RECEIVE_MSG
134a4f3c153SRuslan Ermilovbut if the message cannot fit into the buffer, it
135a4f3c153SRuslan Ermilovwill truncate the contents instead of leaving the data
136a4f3c153SRuslan Ermilovin the buffer.
137a4f3c153SRuslan Ermilov.It Dv IPMICTL_SEND_COMMAND Pq Vt "struct ipmi_req"
13837b1ce13SDoug AmbriskoSend a message to the interface.
13937b1ce13SDoug AmbriskoPossible error values:
14037b1ce13SDoug Ambrisko.Bl -tag -width Er
14137b1ce13SDoug Ambrisko.It Bq Er EFAULT
14250d922a0SGlen BarberAn address supplied was invalid.
14337b1ce13SDoug Ambrisko.It Bq Er ENOMEM
14437b1ce13SDoug AmbriskoBuffers could not be allowed for the command, out of memory.
14537b1ce13SDoug Ambrisko.El
146a4f3c153SRuslan Ermilov.It Dv IPMICTL_SET_MY_ADDRESS_CMD Pq Vt "unsigned int"
14737b1ce13SDoug AmbriskoSet the slave address for source messages.
148a4f3c153SRuslan Ermilov.It Dv IPMICTL_GET_MY_ADDRESS_CMD Pq Vt "unsigned int"
14937b1ce13SDoug AmbriskoGet the slave address for source messages.
150a4f3c153SRuslan Ermilov.It Dv IPMICTL_SET_MY_LUN_CMD Pq Vt "unsigned int"
15137b1ce13SDoug AmbriskoSet the slave LUN for source messages.
152a4f3c153SRuslan Ermilov.It Dv IPMICTL_GET_MY_LUN_CMD Pq Vt "unsigned int"
15337b1ce13SDoug AmbriskoGet the slave LUN for source messages.
154a4f3c153SRuslan Ermilov.El
155a4f3c153SRuslan Ermilov.Ss Unimplemented Ioctls
156a4f3c153SRuslan Ermilov.Bl -tag -width indent
157a4f3c153SRuslan Ermilov.It Dv IPMICTL_REGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec"
15850d922a0SGlen BarberRegister to receive a specific command.
15937b1ce13SDoug AmbriskoPossible error values:
16037b1ce13SDoug Ambrisko.Bl -tag -width Er
16137b1ce13SDoug Ambrisko.It Bq Er EFAULT
16237b1ce13SDoug AmbriskoAn supplied address was invalid.
16337b1ce13SDoug Ambrisko.It Bq Er EBUSY
16437b1ce13SDoug AmbriskoThe network function/command is already in use.
16537b1ce13SDoug Ambrisko.It Bq Er ENOMEM
16637b1ce13SDoug AmbriskoCould not allocate memory.
16737b1ce13SDoug Ambrisko.El
168a4f3c153SRuslan Ermilov.It Dv IPMICTL_UNREGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec"
16950d922a0SGlen BarberUnregister to receive a specific command.
17037b1ce13SDoug AmbriskoPossible error values:
17137b1ce13SDoug Ambrisko.Bl -tag -width Er
17237b1ce13SDoug Ambrisko.It Bq Er EFAULT
17337b1ce13SDoug AmbriskoAn address supplied was invalid.
17437b1ce13SDoug Ambrisko.It Bq Er ENOENT
17537b1ce13SDoug AmbriskoThe network function/command was not found.
17637b1ce13SDoug Ambrisko.El
177a4f3c153SRuslan Ermilov.El
178a4f3c153SRuslan Ermilov.Ss Stub Only Ioctl
179a4f3c153SRuslan Ermilov.Bl -tag -width indent
180a4f3c153SRuslan Ermilov.It Dv IPMICTL_SET_GETS_EVENTS_CMD Pq Vt int
18137b1ce13SDoug AmbriskoSet whether this interface receives events.
18237b1ce13SDoug AmbriskoPossible error values:
18337b1ce13SDoug Ambrisko.Bl -tag -width Er
18437b1ce13SDoug Ambrisko.It Bq Er EFAULT
18537b1ce13SDoug AmbriskoAn address supplied was invalid.
18637b1ce13SDoug Ambrisko.El
187a4f3c153SRuslan Ermilov.El
18837b1ce13SDoug Ambrisko.Sh SEE ALSO
18937b1ce13SDoug Ambrisko.Xr ioctl 2 ,
19037b1ce13SDoug Ambrisko.Xr watchdog 4 ,
1911170c2feSWarner Losh.Xr reboot 8 ,
1921170c2feSWarner Losh.Xr shutdown 8 ,
19337b1ce13SDoug Ambrisko.Xr watchdog 8 ,
19437b1ce13SDoug Ambrisko.Xr watchdogd 8 ,
19537b1ce13SDoug Ambrisko.Xr watchdog 9
19637b1ce13SDoug Ambrisko.Sh HISTORY
19737b1ce13SDoug AmbriskoThe
19837b1ce13SDoug Ambrisko.Nm
19937b1ce13SDoug Ambriskodriver first appeared in
2002b57dc5aSGabor Kovesdan.Fx 6.2 .
20137b1ce13SDoug Ambrisko.Sh AUTHORS
2024ed06e74SChristian Brueffer.An -nosplit
20337b1ce13SDoug AmbriskoThe
20437b1ce13SDoug Ambrisko.Nm
20537b1ce13SDoug Ambriskodriver was written by
2066c899950SBaptiste Daroussin.An Doug Ambrisko Aq Mt ambrisko@FreeBSD.org .
20737b1ce13SDoug AmbriskoThis manual page was written by
2086c899950SBaptiste Daroussin.An Tom Rhodes Aq Mt trhodes@FreeBSD.org .
20937b1ce13SDoug Ambrisko.Sh BUGS
21037b1ce13SDoug AmbriskoNot all features of the MontaVista driver are supported.
21137b1ce13SDoug Ambrisko.Pp
21237b1ce13SDoug AmbriskoCurrently, IPMB and BT modes are not implemented.
213