summaryrefslogtreecommitdiffstats
path: root/apphandler.h
diff options
context:
space:
mode:
authorvishwa <vishwanath@in.ibm.com>2015-11-20 12:43:49 -0600
committervishwa <vishwanath@in.ibm.com>2015-11-24 11:45:50 -0600
commit3699327a1dbbfe8a8fd751266fd72dc7bf515108 (patch)
treef2ab0c129b252ac4958d0544abd1f39a47ba3494 /apphandler.h
parent6872af6e32a93ff54544b2d32302bb236cd891a5 (diff)
downloadphosphor-host-ipmid-3699327a1dbbfe8a8fd751266fd72dc7bf515108.tar.gz
phosphor-host-ipmid-3699327a1dbbfe8a8fd751266fd72dc7bf515108.zip
IPMI soft power off
Diffstat (limited to 'apphandler.h')
-rw-r--r--apphandler.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/apphandler.h b/apphandler.h
index 35a2b20..aa2a55d 100644
--- a/apphandler.h
+++ b/apphandler.h
@@ -1,6 +1,19 @@
#ifndef __HOST_IPMI_APP_HANDLER_H__
#define __HOST_IPMI_APP_HANDLER_H__
+#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
+
// IPMI commands for App net functions.
enum ipmi_netfn_app_cmds
{
@@ -11,9 +24,27 @@ enum ipmi_netfn_app_cmds
IPMI_CMD_RESET_WD = 0x22,
IPMI_CMD_SET_WD = 0x24,
IPMI_CMD_SET_BMC_GLOBAL_ENABLES = 0x2E,
+ IPMI_CMD_GET_MSG_FLAGS = 0x31,
IPMI_CMD_READ_EVENT = 0x35,
IPMI_CMD_GET_CAP_BIT = 0x36,
-
};
+// 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];
+};
#endif
OpenPOWER on IntegriCloud