summaryrefslogtreecommitdiffstats
path: root/systemintfcmds.hpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-09-07 19:26:25 -0700
committerPatrick Venture <venture@google.com>2018-09-25 10:06:33 -0700
commit46470a38d0a3b8f29cd8efc4af8a76adcace524a (patch)
treec3e2df8b2a238889aabb14b6ba4efd76c4607364 /systemintfcmds.hpp
parent87651333c451cfa8090273366be5ec62bd1a9eea (diff)
downloadphosphor-host-ipmid-46470a38d0a3b8f29cd8efc4af8a76adcace524a.tar.gz
phosphor-host-ipmid-46470a38d0a3b8f29cd8efc4af8a76adcace524a.zip
rename headers to match style
Moving headers from ".h" to ".hpp" Reworked the header inclusion a bit so that host-ipmid is treated as a library, and local headers aren't. renamed apphandler.h => apphandler.hpp renamed chassishandler.h => chassishandler.hpp renamed globalhandler.h => globalhandler.hpp renamed sensorhandler.h => sensorhandler.hpp renamed storageaddsel.h => storageaddsel.hpp renamed storagehandler.h => storagehandler.hpp renamed systemintfcmds.h => systemintfcmds.hpp Change-Id: I9d4ce3dd57e2e996800f9020a10cc10cdf2c3914 Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'systemintfcmds.hpp')
-rw-r--r--systemintfcmds.hpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/systemintfcmds.hpp b/systemintfcmds.hpp
new file mode 100644
index 0000000..c0b3318
--- /dev/null
+++ b/systemintfcmds.hpp
@@ -0,0 +1,43 @@
+#pragma once
+
+#include <stdint.h>
+
+// These are per skiboot ipmi-sel code
+
+// OEM_SEL type with Timestamp
+#define SEL_OEM_ID_0 0x55
+// SEL type is OEM and -not- general SEL
+#define SEL_RECORD_TYPE_OEM 0xC0
+// Minor command for soft shurdown
+#define SOFT_OFF 0x00
+// Major command for Any kind of power ops
+#define CMD_POWER 0x04
+// Major command for the heartbeat operation (verify host is alive)
+#define CMD_HEARTBEAT 0xFF
+
+// IPMI commands used via System Interface functions.
+enum ipmi_netfn_system_intf_cmds
+{
+ IPMI_CMD_SET_BMC_GLOBAL_ENABLES = 0x2E,
+ IPMI_CMD_GET_MSG_FLAGS = 0x31,
+ IPMI_CMD_READ_EVENT = 0x35,
+};
+
+// A Mechanism to tell host to shtudown hosts by sending this PEM SEL. Really
+// the only used fields by skiboot are:
+// id[0] / id[1] for ID_0 , ID_1
+// type : SEL_RECORD_TYPE_OEM as standard SELs are ignored by skiboot
+// cmd : CMD_POWER for power functions
+// data[0], specific commands. example Soft power off. power cycle, etc.
+struct oem_sel_timestamped
+{
+ /* SEL header */
+ uint8_t id[2];
+ uint8_t type;
+ uint8_t manuf_id[3];
+ uint8_t timestamp[4];
+ /* OEM SEL data (6 bytes) follows */
+ uint8_t netfun;
+ uint8_t cmd;
+ uint8_t data[4];
+};
OpenPOWER on IntegriCloud