blob: a17ee7f8032bc4da6ddeb8f1c1b7bd067e2b1706 [file] [log] [blame]
vishwabmcba0bd5f2015-09-30 16:50:23 +05301#ifndef __HOST_IPMI_APP_HANDLER_H__
2#define __HOST_IPMI_APP_HANDLER_H__
3
vishwa36993272015-11-20 12:43:49 -06004#include <stdint.h>
5
6// These are per skiboot ipmi-sel code
7
8// OEM_SEL type with Timestamp
9#define SEL_OEM_ID_0 0x55
10// SEL type is OEM and -not- general SEL
11#define SEL_RECORD_TYPE_OEM 0xC0
12// Minor command for soft shurdown
13#define SOFT_OFF 0x00
14// Major command for Any kind of power ops
15#define CMD_POWER 0x04
16
Adriana Kobylakdfc8d772015-10-20 09:34:48 -050017// IPMI commands for App net functions.
vishwabmcba0bd5f2015-09-30 16:50:23 +053018enum ipmi_netfn_app_cmds
19{
20 // Get capability bits
Adriana Kobylakdfc8d772015-10-20 09:34:48 -050021 IPMI_CMD_GET_DEVICE_ID = 0x01,
22 IPMI_CMD_SET_ACPI = 0x06,
Adriana Kobylakd100ee52015-10-20 17:02:37 -050023 IPMI_CMD_GET_DEVICE_GUID = 0x08,
Adriana Kobylakdfc8d772015-10-20 09:34:48 -050024 IPMI_CMD_RESET_WD = 0x22,
25 IPMI_CMD_SET_WD = 0x24,
26 IPMI_CMD_SET_BMC_GLOBAL_ENABLES = 0x2E,
vishwa36993272015-11-20 12:43:49 -060027 IPMI_CMD_GET_MSG_FLAGS = 0x31,
Adriana Kobylakdfc8d772015-10-20 09:34:48 -050028 IPMI_CMD_READ_EVENT = 0x35,
29 IPMI_CMD_GET_CAP_BIT = 0x36,
Chris Austenc2cd29d2016-02-05 20:02:29 -060030 IPMI_CMD_GET_CHAN_INFO = 0x42,
31
vishwabmcba0bd5f2015-09-30 16:50:23 +053032};
33
vishwa36993272015-11-20 12:43:49 -060034// A Mechanism to tell host to shtudown hosts by sending this PEM SEL. Really
35// the only used fields by skiboot are:
36// id[0] / id[1] for ID_0 , ID_1
37// type : SEL_RECORD_TYPE_OEM as standard SELs are ignored by skiboot
38// cmd : CMD_POWER for power functions
39// data[0], specific commands. example Soft power off. power cycle, etc.
40struct oem_sel_timestamped
41{
42 /* SEL header */
43 uint8_t id[2];
44 uint8_t type;
45 uint8_t manuf_id[3];
46 uint8_t timestamp[4];
47 /* OEM SEL data (6 bytes) follows */
48 uint8_t netfun;
49 uint8_t cmd;
50 uint8_t data[4];
51};
vishwabmcba0bd5f2015-09-30 16:50:23 +053052#endif