Skip to content

RFC ipmi_bmc: framework for IPMI on BMCs

Brendan Higgins lkml openbmc 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ipmi_bmc: framework for BT IPMI on BMCsdrivers/char/ipmi_bmc/Makefile drivers/char/ipmi_bmc/ipmi_bmc.c include/linux/ipmi_bmc.h+479 -07 replies
2/4ipmi_bmc: device interface to IPMI BMC frameworkdrivers/char/ipmi_bmc/Kconfig drivers/char/ipmi_bmc/Makefile drivers/char/ipmi_bmc/ipmi_bmc_devintf.c+248 -00 replies
3/4ipmi_bmc: bt-i2c: port driver to IPMI BMC frameworkdrivers/char/ipmi_bmc/ipmi_bmc_bt_i2c.c+28 -1740 replies
4/4ipmi_bmc: bt-aspeed: port driver to IPMI BMC frameworkdrivers/char/ipmi_bmc/ipmi_bmc_bt_aspeed.c include/uapi/linux/bt-bmc.h+74 -2024 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC v1 0/4] ipmi_bmc: framework for IPMI on BMCs

This introduces a framework for implementing the BMC side of the IPMI protocol, roughly mirroring the host side OpenIPMI framework; it attempts to abstract away hardware interfaces, such as Block Transfer interface hardware implementations from IPMI command handlers.

It does this by implementing the traditional driver model of a bus with devices; however, in this case a struct ipmi_bmc_bus represents a hardware interface, where a struct ipmi_bmc_device represents a handler. A handler filters messages by registering a function which returns whether a given message matches the handler; it also has the concept of a default handler which is forwarded all messages which are not matched by some other interface.

In this patchset, we introduce an example of a default handler: a misc device file interface which implements the same interface as the the device file interface used by the Aspeed BT driver.

Currently, OpenBMC handles all IPMI message routing and handling in userland; the existing drivers simply provide a file interface for the hardware on the device. In this patchset, we propose a common file interface to be shared by all IPMI hardware interfaces, but also a framework for implementing handlers at the kernel level, similar to how the existing OpenIPMI framework supports both kernel users, as well as misc device file interface.

This patchset depends on the "ipmi: bt-i2c: added IPMI Block Transfer over I2C" patchset, which can be found here:
https://www.mail-archive.com/[email protected]/msg1461960.html
However, I can fix this if desired.

Tested on the AST2500 EVB.