1*7505f70eSkettenis.\" $OpenBSD: ipmi.4,v 1.15 2020/03/29 11:24:53 kettenis Exp $ 2a986b7dcSmarco.\" 303db9981Sdlg.\" Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> 4a986b7dcSmarco.\" Text was heavily borrowed from the IPMI spec V1.5 5a986b7dcSmarco.\" 6a986b7dcSmarco.\" Permission to use, copy, modify, and distribute this software for any 7a986b7dcSmarco.\" purpose with or without fee is hereby granted, provided that the above 8a986b7dcSmarco.\" copyright notice and this permission notice appear in all copies. 9a986b7dcSmarco.\" 10a986b7dcSmarco.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11a986b7dcSmarco.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12a986b7dcSmarco.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13a986b7dcSmarco.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14a986b7dcSmarco.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15f142b043Sweerd.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16f142b043Sweerd.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17*7505f70eSkettenis.Dd $Mdocdate: March 29 2020 $ 18a986b7dcSmarco.Dt IPMI 4 19a986b7dcSmarco.Os 20a986b7dcSmarco.Sh NAME 21a986b7dcSmarco.Nm ipmi 22a986b7dcSmarco.Nd Intelligent Platform Management Interface driver 23a986b7dcSmarco.Sh SYNOPSIS 24a986b7dcSmarco.Cd "ipmi0 at mainbus0" 25ff9e2b32Skettenis.Cd "ipmi0 at acpi?" 26ff9e2b32Skettenis.Cd "ipmi0 at iic?" 27*7505f70eSkettenis.Cd "ipmi0 at fdt?" 28a986b7dcSmarco.Sh DESCRIPTION 29a986b7dcSmarcoThe 30a986b7dcSmarco.Nm 31a986b7dcSmarcoterm Intelligent Platform Management refers to autonomous monitoring and 32a986b7dcSmarcorecovery features implemented directly in platform management hardware and 334d9288b6Sjmcfirmware. 344d9288b6SjmcThe key characteristics of Intelligent Platform Management is that 354d9288b6Sjmcinventory, monitoring, logging, and recovery control functions are available 364d9288b6Sjmcindependent of the main processor, BIOS, and operating system. 37a986b7dcSmarco.Pp 384d9288b6SjmcPlatform status information can be obtained and recovery actions initiated 39a986b7dcSmarcounder situations where vendor "in-band" management mechanisms are unavailable. 404d9288b6SjmcThe independent monitoring, logging, and access functions available through IPMI 414d9288b6Sjmcprovide a level of manageability built in to the platform hardware. 424d9288b6SjmcThis can support systems where there is no systems management software 434d9288b6Sjmcavailable for a particular operating system. 44a986b7dcSmarco.Pp 454d9288b6SjmcAt the heart of the IPMI architecture is a microcontroller called 464d9288b6Sjmcthe Baseboard Management Controller (BMC). 474d9288b6SjmcThe BMC provides the intelligence behind Intelligent Platform Management. 484d9288b6SjmcThe BMC manages the interface between system management software 494d9288b6Sjmcand the platform management hardware, provides autonomous monitoring, 504d9288b6Sjmcevent logging, and recovery control and serves as the gateway 514d9288b6Sjmcbetween systems management software and hardware. 52a986b7dcSmarco.Sh IPMI MESSAGING 53a986b7dcSmarcoIPMI uses message-based interfaces for the different interfaces to the platform 544d9288b6Sjmcmanagement subsystems. 554d9288b6SjmcAll IPMI messages share the same fields in the message "payload", 564d9288b6Sjmcregardless of the interface (transport) that they're transferred over. 574d9288b6SjmcIPMI messaging uses a request/response protocol. 584d9288b6SjmcIPMI request messages are commonly referred to as commands. 594d9288b6SjmcThe use of request/response protocol facilitates the transfer of 604d9288b6SjmcIPMI messages over different transports. 614d9288b6SjmcIPMI commands are grouped into functional command sets 624d9288b6Sjmcusing a field called network function code. 639fd5aae0SjmcThere are command sets for sensor and event related commands, 644d9288b6Sjmcchassis commands etc. 654d9288b6SjmcThis functional grouping makes it easier to organize and manage 664d9288b6Sjmcthe assignment and allocation of command values. 67a986b7dcSmarco.Sh SENSOR MODEL 68a986b7dcSmarcoAccess to monitored information such as temperatures, voltages, fan status 694d9288b6Sjmcetc., is provided via the IPMI Sensor Model. 704d9288b6SjmcInstead of providing direct access to the monitoring hardware, 714d9288b6SjmcIPMI provides access by abstracted sensor commands 7278627a93Smarcosuch as the "Get Sensor Reading" command, 734d9288b6Sjmcimplemented via a management controller. 744d9288b6SjmcThis approach isolates the software from changes in the 75a986b7dcSmarcoplatform management hardware implementation. 76a986b7dcSmarco.Pp 774d9288b6SjmcSensors are classified according to the type of readings they provide 784d9288b6Sjmcand/or the type of events they generate. 794d9288b6SjmcA sensor can return either an analog or discrete reading. 804d9288b6SjmcSensor events can be discrete or threshold-based. 81a986b7dcSmarco.Sh SYSTEM EVENT LOG AND EVENT MESSAGES 824d9288b6SjmcThe BMC provides a centralized non-volatile System Event Log, or SEL. 834d9288b6SjmcHaving the SEL and logging functions managed by the BMC 844d9288b6Sjmchelps ensure that post-mortem logging information is available 854d9288b6Sjmcshould a failure occur that disables the systems processor(s). 86a986b7dcSmarco.Pp 8778627a93SmarcoA set of IPMI commands allows the SEL to be read and cleared 884d9288b6Sjmcand for events to be added to the SEL. 894d9288b6SjmcThe common request message (command) 904d9288b6Sjmcused for adding events to the SEL is referred to as an Event Message. 91a986b7dcSmarco.Sh SENSOR DATA RECORDS & CAPABILITIES COMMANDS 924d9288b6SjmcIPMI's extensibility and scalability mean that 934d9288b6Sjmceach platform implementation can have 945aa73275Sjmca different population of management controllers and sensors and 954d9288b6Sjmcdifferent event generation capabilities. 964d9288b6SjmcThe design of IPMI allows system 974d9288b6Sjmcmanagement software to retrieve information from the platform 984d9288b6Sjmcand automatically configure itself to the platform's capabilities. 99a986b7dcSmarco.Pp 1004d9288b6SjmcInformation that describes the platform management capabilities 1014d9288b6Sjmcis provided via two mechanisms: 1024d9288b6SjmcCapabilities Commands and Sensor Data Records (SDRs). 103a986b7dcSmarcoCapabilities commands are commands within the IPMI command sets that return 104a986b7dcSmarcofields that provide information on other commands and functions the controller 105a986b7dcSmarcocan handle. 106a986b7dcSmarco.Sh SYSTEMS INTERFACES 1074d9288b6SjmcIPMI defines three standardized systems interfaces that systems software uses 1084d9288b6Sjmcfor transferring IPMI messages to the BMC. 1094d9288b6SjmcIn order to support a variety of microcontrollers, 1104d9288b6SjmcIPMI offers a choice of systems interfaces. 1114d9288b6SjmcThe system interfaces are similar enough so that 1124d9288b6Sjmca single driver can handle all IPMI system interfaces. 1134d9288b6Sjmc.Bl -tag -width Ds 114a986b7dcSmarco.It Keyboard Controller Style (KCS) 1154d9288b6SjmcThe bit definitions and operation of the registers follows that used in the 1164d9288b6SjmcIntel 8742 Universal Peripheral Interface microcontroller. 1174d9288b6SjmcThe term "Keyboard Controller Style" reflects the fact that 1184d9288b6Sjmcthe 8742 interface was used as the legacy keyboard controller interface 1194d9288b6Sjmcin PC architecture computer systems. 1204d9288b6SjmcThis interface is available built in to several commercially available 1214d9288b6Sjmcmicrocontrollers. 122a7b2266dSjmcData is transferred across the KCS interface using a per-byte handshake. 123a986b7dcSmarco.It System Management Interface Chip (SMIC) 1244d9288b6SjmcThe SMIC interface provides an alternative 1254d9288b6Sjmcwhen the implementer wishes to use a microcontroller for the BMC 1264d9288b6Sjmcthat does not have the built-in hardware for a KCS interface. 1274d9288b6SjmcThis interface is a three I/O port interface that can be 1284d9288b6Sjmcimplemented using a simple ASIC, FPGA, or discrete logic devices. 1294d9288b6SjmcIt may also be built in to a custom-designed management controller. 1300fb1f3f5SjmcLike the KCS interface, 1314d9288b6Sjmca per-byte handshake is also used 1324d9288b6Sjmcfor transferring data across the SMIC interface. 133a986b7dcSmarco.It Block Transfer (BT) 1344d9288b6SjmcThis interface provides a higher performance system interface option. 1354d9288b6SjmcUnlike the KCS and SMIC interfaces, 1364d9288b6Sjmca per-block handshake is used for transferring data across the interface. 1374d9288b6SjmcThe BT interface also provides an alternative to using 1384d9288b6Sjmca controller with a built-in KCS interface. 1394d9288b6SjmcThe BT interface has three I/O mapped ports. 1404d9288b6SjmcA typical implementation includes hardware buffers for holding 1414d9288b6Sjmcupstream and downstream message blocks. 1424d9288b6SjmcThe BT interface can be implemented using an ASIC or FPGA 1434d9288b6Sjmcor may be built in to a custom-designed management controller. 144ff9e2b32Skettenis.It SMBus System Interface (SSIF) 145ff9e2b32SkettenisThe SSIF interface provides access to the BMC over an SMBus interface. 146a986b7dcSmarco.El 147073ed461Smarco.Sh WATCHDOG 1481770c888SjmcIPMI provides 149073ed461Smarco.Xr watchdog 4 1501770c888Sjmctimer functionality. 1511770c888SjmcOnce configured, if the watchdog is not reset within 1521770c888Sjmca certain period of time, 1531770c888Sjmcit will timeout and the server will reset. 1541770c888SjmcThe reset will occur regardless of the recoverability of the hang or crash. 1551770c888Sjmc.Pp 1561770c888SjmcExample of enabling a watchdog: 1571770c888Sjmc.Pp 1581770c888Sjmc.Dl # sysctl kern.watchdog.period=10 1591770c888Sjmc.Pp 1601770c888SjmcIn this case if the watchdog is not reset, 1611770c888Sjmcit'll reboot the server after roughly 10 seconds. 1621770c888Sjmc.Pp 1631770c888SjmcExample of disabling the watchdog: 1641770c888Sjmc.Pp 1651770c888Sjmc.Dl # sysctl kern.watchdog.period=0 1661770c888Sjmc.Sh SEE ALSO 1671770c888Sjmc.Xr watchdog 4 , 1681770c888Sjmc.Xr sensorsd 8 , 1691770c888Sjmc.Xr sysctl 8 170a986b7dcSmarco.Sh HISTORY 171a986b7dcSmarcoThe 172a986b7dcSmarco.Nm 173a986b7dcSmarcodriver first appeared in 174a986b7dcSmarco.Ox 3.9 175a986b7dcSmarcoand conforms to the IPMI 1.5 specification. 176a986b7dcSmarco.Sh AUTHORS 177a986b7dcSmarcoThe 178a986b7dcSmarco.Nm 1794d9288b6Sjmcdriver was written by 180e5cc2e7eSschwarze.An Jordan Hargrave Aq Mt jordan@openbsd.org . 181