aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/IPMI.txt
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-05-14 14:18:08 -0400
committerJonathan Corbet <corbet@lwn.net>2017-07-14 15:51:40 -0400
commitf5981a5c59a90780138ea844ba3362bb72210808 (patch)
treefce643dfdf6352ef5332d957cef54e8491e4ae27 /Documentation/IPMI.txt
parent877b638ff814205ff256173295bb79a220f9ad0e (diff)
IPMI.txt: standardize document format
Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - fix document type; - add missing markups for subitems; - mark literal blocks; - add whitespaces and blank lines where needed; - use bulleted list markups where neded. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/IPMI.txt')
-rw-r--r--Documentation/IPMI.txt76
1 files changed, 44 insertions, 32 deletions
diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt
index 6962cab997ef..aa77a25a0940 100644
--- a/Documentation/IPMI.txt
+++ b/Documentation/IPMI.txt
@@ -1,9 +1,8 @@
1=====================
2The Linux IPMI Driver
3=====================
1 4
2 The Linux IPMI Driver 5:Author: Corey Minyard <minyard@mvista.com> / <minyard@acm.org>
3 ---------------------
4 Corey Minyard
5 <minyard@mvista.com>
6 <minyard@acm.org>
7 6
8The Intelligent Platform Management Interface, or IPMI, is a 7The Intelligent Platform Management Interface, or IPMI, is a
9standard for controlling intelligent devices that monitor a system. 8standard for controlling intelligent devices that monitor a system.
@@ -141,7 +140,7 @@ Addressing
141---------- 140----------
142 141
143The IPMI addressing works much like IP addresses, you have an overlay 142The IPMI addressing works much like IP addresses, you have an overlay
144to handle the different address types. The overlay is: 143to handle the different address types. The overlay is::
145 144
146 struct ipmi_addr 145 struct ipmi_addr
147 { 146 {
@@ -153,7 +152,7 @@ to handle the different address types. The overlay is:
153The addr_type determines what the address really is. The driver 152The addr_type determines what the address really is. The driver
154currently understands two different types of addresses. 153currently understands two different types of addresses.
155 154
156"System Interface" addresses are defined as: 155"System Interface" addresses are defined as::
157 156
158 struct ipmi_system_interface_addr 157 struct ipmi_system_interface_addr
159 { 158 {
@@ -166,7 +165,7 @@ straight to the BMC on the current card. The channel must be
166IPMI_BMC_CHANNEL. 165IPMI_BMC_CHANNEL.
167 166
168Messages that are destined to go out on the IPMB bus use the 167Messages that are destined to go out on the IPMB bus use the
169IPMI_IPMB_ADDR_TYPE address type. The format is 168IPMI_IPMB_ADDR_TYPE address type. The format is::
170 169
171 struct ipmi_ipmb_addr 170 struct ipmi_ipmb_addr
172 { 171 {
@@ -184,16 +183,16 @@ spec.
184Messages 183Messages
185-------- 184--------
186 185
187Messages are defined as: 186Messages are defined as::
188 187
189struct ipmi_msg 188 struct ipmi_msg
190{ 189 {
191 unsigned char netfn; 190 unsigned char netfn;
192 unsigned char lun; 191 unsigned char lun;
193 unsigned char cmd; 192 unsigned char cmd;
194 unsigned char *data; 193 unsigned char *data;
195 int data_len; 194 int data_len;
196}; 195 };
197 196
198The driver takes care of adding/stripping the header information. The 197The driver takes care of adding/stripping the header information. The
199data portion is just the data to be send (do NOT put addressing info 198data portion is just the data to be send (do NOT put addressing info
@@ -208,7 +207,7 @@ block of data, even when receiving messages. Otherwise the driver
208will have no place to put the message. 207will have no place to put the message.
209 208
210Messages coming up from the message handler in kernelland will come in 209Messages coming up from the message handler in kernelland will come in
211as: 210as::
212 211
213 struct ipmi_recv_msg 212 struct ipmi_recv_msg
214 { 213 {
@@ -246,6 +245,7 @@ and the user should not have to care what type of SMI is below them.
246 245
247 246
248Watching For Interfaces 247Watching For Interfaces
248^^^^^^^^^^^^^^^^^^^^^^^
249 249
250When your code comes up, the IPMI driver may or may not have detected 250When your code comes up, the IPMI driver may or may not have detected
251if IPMI devices exist. So you might have to defer your setup until 251if IPMI devices exist. So you might have to defer your setup until
@@ -256,6 +256,7 @@ and tell you when they come and go.
256 256
257 257
258Creating the User 258Creating the User
259^^^^^^^^^^^^^^^^^
259 260
260To use the message handler, you must first create a user using 261To use the message handler, you must first create a user using
261ipmi_create_user. The interface number specifies which SMI you want 262ipmi_create_user. The interface number specifies which SMI you want
@@ -272,6 +273,7 @@ closing the device automatically destroys the user.
272 273
273 274
274Messaging 275Messaging
276^^^^^^^^^
275 277
276To send a message from kernel-land, the ipmi_request_settime() call does 278To send a message from kernel-land, the ipmi_request_settime() call does
277pretty much all message handling. Most of the parameter are 279pretty much all message handling. Most of the parameter are
@@ -321,6 +323,7 @@ though, since it is tricky to manage your own buffers.
321 323
322 324
323Events and Incoming Commands 325Events and Incoming Commands
326^^^^^^^^^^^^^^^^^^^^^^^^^^^^
324 327
325The driver takes care of polling for IPMI events and receiving 328The driver takes care of polling for IPMI events and receiving
326commands (commands are messages that are not responses, they are 329commands (commands are messages that are not responses, they are
@@ -367,7 +370,7 @@ in the system. It discovers interfaces through a host of different
367methods, depending on the system. 370methods, depending on the system.
368 371
369You can specify up to four interfaces on the module load line and 372You can specify up to four interfaces on the module load line and
370control some module parameters: 373control some module parameters::
371 374
372 modprobe ipmi_si.o type=<type1>,<type2>.... 375 modprobe ipmi_si.o type=<type1>,<type2>....
373 ports=<port1>,<port2>... addrs=<addr1>,<addr2>... 376 ports=<port1>,<port2>... addrs=<addr1>,<addr2>...
@@ -437,7 +440,7 @@ default is one. Setting to 0 is useful with the hotmod, but is
437obviously only useful for modules. 440obviously only useful for modules.
438 441
439When compiled into the kernel, the parameters can be specified on the 442When compiled into the kernel, the parameters can be specified on the
440kernel command line as: 443kernel command line as::
441 444
442 ipmi_si.type=<type1>,<type2>... 445 ipmi_si.type=<type1>,<type2>...
443 ipmi_si.ports=<port1>,<port2>... ipmi_si.addrs=<addr1>,<addr2>... 446 ipmi_si.ports=<port1>,<port2>... ipmi_si.addrs=<addr1>,<addr2>...
@@ -474,16 +477,22 @@ The driver supports a hot add and remove of interfaces. This way,
474interfaces can be added or removed after the kernel is up and running. 477interfaces can be added or removed after the kernel is up and running.
475This is done using /sys/modules/ipmi_si/parameters/hotmod, which is a 478This is done using /sys/modules/ipmi_si/parameters/hotmod, which is a
476write-only parameter. You write a string to this interface. The string 479write-only parameter. You write a string to this interface. The string
477has the format: 480has the format::
481
478 <op1>[:op2[:op3...]] 482 <op1>[:op2[:op3...]]
479The "op"s are: 483
484The "op"s are::
485
480 add|remove,kcs|bt|smic,mem|i/o,<address>[,<opt1>[,<opt2>[,...]]] 486 add|remove,kcs|bt|smic,mem|i/o,<address>[,<opt1>[,<opt2>[,...]]]
481You can specify more than one interface on the line. The "opt"s are: 487
488You can specify more than one interface on the line. The "opt"s are::
489
482 rsp=<regspacing> 490 rsp=<regspacing>
483 rsi=<regsize> 491 rsi=<regsize>
484 rsh=<regshift> 492 rsh=<regshift>
485 irq=<irq> 493 irq=<irq>
486 ipmb=<ipmb slave addr> 494 ipmb=<ipmb slave addr>
495
487and these have the same meanings as discussed above. Note that you 496and these have the same meanings as discussed above. Note that you
488can also use this on the kernel command line for a more compact format 497can also use this on the kernel command line for a more compact format
489for specifying an interface. Note that when removing an interface, 498for specifying an interface. Note that when removing an interface,
@@ -496,7 +505,7 @@ The SMBus Driver (SSIF)
496The SMBus driver allows up to 4 SMBus devices to be configured in the 505The SMBus driver allows up to 4 SMBus devices to be configured in the
497system. By default, the driver will only register with something it 506system. By default, the driver will only register with something it
498finds in DMI or ACPI tables. You can change this 507finds in DMI or ACPI tables. You can change this
499at module load time (for a module) with: 508at module load time (for a module) with::
500 509
501 modprobe ipmi_ssif.o 510 modprobe ipmi_ssif.o
502 addr=<i2caddr1>[,<i2caddr2>[,...]] 511 addr=<i2caddr1>[,<i2caddr2>[,...]]
@@ -535,7 +544,7 @@ the smb_addr parameter unless you have DMI or ACPI data to tell the
535driver what to use. 544driver what to use.
536 545
537When compiled into the kernel, the addresses can be specified on the 546When compiled into the kernel, the addresses can be specified on the
538kernel command line as: 547kernel command line as::
539 548
540 ipmb_ssif.addr=<i2caddr1>[,<i2caddr2>[...]] 549 ipmb_ssif.addr=<i2caddr1>[,<i2caddr2>[...]]
541 ipmi_ssif.adapter=<adapter1>[,<adapter2>[...]] 550 ipmi_ssif.adapter=<adapter1>[,<adapter2>[...]]
@@ -565,9 +574,9 @@ Some users need more detailed information about a device, like where
565the address came from or the raw base device for the IPMI interface. 574the address came from or the raw base device for the IPMI interface.
566You can use the IPMI smi_watcher to catch the IPMI interfaces as they 575You can use the IPMI smi_watcher to catch the IPMI interfaces as they
567come or go, and to grab the information, you can use the function 576come or go, and to grab the information, you can use the function
568ipmi_get_smi_info(), which returns the following structure: 577ipmi_get_smi_info(), which returns the following structure::
569 578
570struct ipmi_smi_info { 579 struct ipmi_smi_info {
571 enum ipmi_addr_src addr_src; 580 enum ipmi_addr_src addr_src;
572 struct device *dev; 581 struct device *dev;
573 union { 582 union {
@@ -575,7 +584,7 @@ struct ipmi_smi_info {
575 void *acpi_handle; 584 void *acpi_handle;
576 } acpi_info; 585 } acpi_info;
577 } addr_info; 586 } addr_info;
578}; 587 };
579 588
580Currently special info for only for SI_ACPI address sources is 589Currently special info for only for SI_ACPI address sources is
581returned. Others may be added as necessary. 590returned. Others may be added as necessary.
@@ -590,7 +599,7 @@ Watchdog
590 599
591A watchdog timer is provided that implements the Linux-standard 600A watchdog timer is provided that implements the Linux-standard
592watchdog timer interface. It has three module parameters that can be 601watchdog timer interface. It has three module parameters that can be
593used to control it: 602used to control it::
594 603
595 modprobe ipmi_watchdog timeout=<t> pretimeout=<t> action=<action type> 604 modprobe ipmi_watchdog timeout=<t> pretimeout=<t> action=<action type>
596 preaction=<preaction type> preop=<preop type> start_now=x 605 preaction=<preaction type> preop=<preop type> start_now=x
@@ -635,7 +644,7 @@ watchdog device is closed. The default value of nowayout is true
635if the CONFIG_WATCHDOG_NOWAYOUT option is enabled, or false if not. 644if the CONFIG_WATCHDOG_NOWAYOUT option is enabled, or false if not.
636 645
637When compiled into the kernel, the kernel command line is available 646When compiled into the kernel, the kernel command line is available
638for configuring the watchdog: 647for configuring the watchdog::
639 648
640 ipmi_watchdog.timeout=<t> ipmi_watchdog.pretimeout=<t> 649 ipmi_watchdog.timeout=<t> ipmi_watchdog.pretimeout=<t>
641 ipmi_watchdog.action=<action type> 650 ipmi_watchdog.action=<action type>
@@ -675,6 +684,7 @@ also get a bunch of OEM events holding the panic string.
675 684
676 685
677The field settings of the events are: 686The field settings of the events are:
687
678* Generator ID: 0x21 (kernel) 688* Generator ID: 0x21 (kernel)
679* EvM Rev: 0x03 (this event is formatting in IPMI 1.0 format) 689* EvM Rev: 0x03 (this event is formatting in IPMI 1.0 format)
680* Sensor Type: 0x20 (OS critical stop sensor) 690* Sensor Type: 0x20 (OS critical stop sensor)
@@ -683,18 +693,20 @@ The field settings of the events are:
683* Event Data 1: 0xa1 (Runtime stop in OEM bytes 2 and 3) 693* Event Data 1: 0xa1 (Runtime stop in OEM bytes 2 and 3)
684* Event data 2: second byte of panic string 694* Event data 2: second byte of panic string
685* Event data 3: third byte of panic string 695* Event data 3: third byte of panic string
696
686See the IPMI spec for the details of the event layout. This event is 697See the IPMI spec for the details of the event layout. This event is
687always sent to the local management controller. It will handle routing 698always sent to the local management controller. It will handle routing
688the message to the right place 699the message to the right place
689 700
690Other OEM events have the following format: 701Other OEM events have the following format:
691Record ID (bytes 0-1): Set by the SEL. 702
692Record type (byte 2): 0xf0 (OEM non-timestamped) 703* Record ID (bytes 0-1): Set by the SEL.
693byte 3: The slave address of the card saving the panic 704* Record type (byte 2): 0xf0 (OEM non-timestamped)
694byte 4: A sequence number (starting at zero) 705* byte 3: The slave address of the card saving the panic
695The rest of the bytes (11 bytes) are the panic string. If the panic string 706* byte 4: A sequence number (starting at zero)
696is longer than 11 bytes, multiple messages will be sent with increasing 707 The rest of the bytes (11 bytes) are the panic string. If the panic string
697sequence numbers. 708 is longer than 11 bytes, multiple messages will be sent with increasing
709 sequence numbers.
698 710
699Because you cannot send OEM events using the standard interface, this 711Because you cannot send OEM events using the standard interface, this
700function will attempt to find an SEL and add the events there. It 712function will attempt to find an SEL and add the events there. It