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.

Signed-off-by: Corey Minyard <minyard@acm.org>
Tested-by: Andrew Manley <andrew.manley@sealingtech.com>
Reviewed-by: Andrew Manley <andrew.manley@sealingtech.com>
This commit is contained in:
Corey Minyard
2021-09-24 11:42:56 -05:00
committed by Corey Minyard
parent 1e4071f628
commit 059747c245
3 changed files with 328 additions and 33 deletions

View File

@@ -80,6 +80,20 @@ struct ipmi_ipmb_addr {
unsigned char lun;
};
/*
* Used for messages received directly from an IPMB that have not gone
* through a MC. This is for systems that sit right on an IPMB so
* they can receive commands and respond to them.
*/
#define IPMI_IPMB_DIRECT_ADDR_TYPE 0x81
struct ipmi_ipmb_direct_addr {
int addr_type;
short channel;
unsigned char slave_addr;
unsigned char rs_lun;
unsigned char rq_lun;
};
/*
* A LAN Address. This is an address to/from a LAN interface bridged
* by the BMC, not an address actually out on the LAN.