History

ipmi: Add support for IPMB direct messages

An application has come up that has a device sitting right on the IPMB that would like to communicate with the BMC on the IPMB using normal IPMI commands. Sending these commands and handling the responses is easy enough, no modifications are needed to the IPMI infrastructure. But if this is an application that also needs to receive IPMB commands and respond, some way is needed to handle these incoming commands and send the responses. Currently, the IPMI message handler only sends commands to the interface and only receives responses from interface. This change extends the interface to receive commands/responses and send commands/responses. These are formatted differently in support of receiving/sending IPMB messages directly.

Corey Minyard committed 5 years ago

Commit 059747c1 parent 1e4071f3 files · +328 −33Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/ipmi.h+14−0
@@ -80,6 +80,20 @@ struct ipmi_ipmb_addr { · 79 unmodified lines
8080 unsigned char lun;
8181 };
8282
83+/*
84+ * Used for messages received directly from an IPMB that have not gone
85+ * through a MC. This is for systems that sit right on an IPMB so
86+ * they can receive commands and respond to them.
87+ */
88+#define IPMI_IPMB_DIRECT_ADDR_TYPE 0x81
89+struct ipmi_ipmb_direct_addr {
90+ int addr_type;
91+ short channel;
92+ unsigned char slave_addr;
93+ unsigned char rs_lun;
94+ unsigned char rq_lun;
95+};
96+
8397 /*
8498 * A LAN Address. This is an address to/from a LAN interface bridged
8599 * by the BMC, not an address actually out on the LAN.