aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/ipmi/ipmi_kcs.h
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-06-06 15:45:51 +0200
committerFelix Held <felix-coreboot@felixheld.de>2019-06-21 12:53:44 +0000
commitffbc3b5f5fb0bdf57b6d5e3808e55e761241d8ba (patch)
tree3b93fdcfa5c19389535833cba6478becc6f0dce1 /src/drivers/ipmi/ipmi_kcs.h
parentc469712166257da7b159773b42f067090b63e34e (diff)
drivers/ipmi: Add chip ops
* Add chips ops for IPMI KCS. * Get IPMI version over KCS. * Generates ACPI SPMI table for IPMI KCS. * Generates SMBIOS type 38 for IPMI KCS. * Generates ACPI SPMI device for IPMI KCS on LPC device. * Add documentation To use this driver on BMC that support KCS on I/O: 1. Add an entry to the devicetree.cb: chip drivers/ipmi device pnp ca2.0 on end # IPMI KCS end 2. Select IPMI_KCS in Kconfig. 3. (Optional) enable LPC I/O decode for the given address. Tested on Wedge100s. Change-Id: I73cbd2058ccdc5395baf244f31345a85eb0047d7 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33255 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/drivers/ipmi/ipmi_kcs.h')
-rw-r--r--src/drivers/ipmi/ipmi_kcs.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/drivers/ipmi/ipmi_kcs.h b/src/drivers/ipmi/ipmi_kcs.h
index 3cd7609039..a194dd22e9 100644
--- a/src/drivers/ipmi/ipmi_kcs.h
+++ b/src/drivers/ipmi/ipmi_kcs.h
@@ -20,6 +20,10 @@
#define IPMI_NETFN_BRIDGE 0x02
#define IPMI_NETFN_SENSOREVENT 0x04
#define IPMI_NETFN_APPLICATION 0x06
+#define IPMI_BMC_GET_DEVICE_ID 0x01
+#define IPMI_IPMI_VERSION_MINOR(x) ((x) >> 4)
+#define IPMI_IPMI_VERSION_MAJOR(x) ((x) & 0xf)
+
#define IPMI_NETFN_FIRMWARE 0x08
#define IPMI_NETFN_STORAGE 0x0a
#define IPMI_NETFN_TRANSPORT 0x0c
@@ -29,4 +33,24 @@
extern int ipmi_kcs_message(int port, int netfn, int lun, int cmd,
const unsigned char *inmsg, int inlen,
unsigned char *outmsg, int outlen);
+
+struct ipmi_rsp {
+ uint8_t lun;
+ uint8_t cmd;
+ uint8_t completion_code;
+} __packed;
+
+/* Get Device ID */
+struct ipmi_devid_rsp {
+ struct ipmi_rsp resp;
+ uint8_t device_id;
+ uint8_t device_revision;
+ uint8_t fw_rev1;
+ uint8_t fw_rev2;
+ uint8_t ipmi_version;
+ uint8_t additional_device_support;
+ uint8_t manufacturer_id[3];
+ uint8_t product_id[2];
+} __packed;
+
#endif