aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/ipmi/ipmi_kcs.h
diff options
context:
space:
mode:
authorMorgan Jang <Morgan_Jang@wiwynn.com>2019-11-06 10:24:47 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-11-22 10:39:05 +0000
commit50155024141f48cf3048272073d352906a2be0b6 (patch)
treea2f8cbccee03b4fe1ef1da0a64bf5b04e7e932b9 /src/drivers/ipmi/ipmi_kcs.h
parent45ecb0eba1452e3637e565a7d993bf717ca616a7 (diff)
src/drivers/ipmi: Implement BMC Get Self Test Result function
According to IPMI SPEC, it is recommended that BIOS includes provisions for checking and reporting on the basic health of BMC by executing the Get Self Test Results command and checking the result. TEST=Check the result in response data to confirm the BMC status is fine or not. Change-Id: I20349cec2e8e9420d177d725de2a5560d354fe47 Signed-off-by: Morgan Jang <Morgan_Jang@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36638 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Diffstat (limited to 'src/drivers/ipmi/ipmi_kcs.h')
-rw-r--r--src/drivers/ipmi/ipmi_kcs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/drivers/ipmi/ipmi_kcs.h b/src/drivers/ipmi/ipmi_kcs.h
index f35802e27b..b3775219c3 100644
--- a/src/drivers/ipmi/ipmi_kcs.h
+++ b/src/drivers/ipmi/ipmi_kcs.h
@@ -22,6 +22,12 @@
#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_BMC_GET_SELFTEST_RESULTS 0x04
+#define IPMI_APP_SELFTEST_RESERVED 0xFF
+#define IPMI_APP_SELFTEST_NO_ERROR 0x55
+#define IPMI_APP_SELFTEST_NOT_IMPLEMENTED 0x56
+#define IPMI_APP_SELFTEST_ERROR 0x57
+#define IPMI_APP_SELFTEST_FATAL_HW_ERROR 0x58
#define IPMI_NETFN_FIRMWARE 0x08
#define IPMI_NETFN_STORAGE 0x0a
@@ -52,4 +58,11 @@ struct ipmi_devid_rsp {
uint8_t product_id[2];
} __packed;
+/* Get Self Test Results */
+struct ipmi_selftest_rsp {
+ struct ipmi_rsp resp;
+ uint8_t result;
+ uint8_t param;
+} __packed;
+
#endif