blob: aa2a55dc62b990d7fffc086d97097008cb9ad04d [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,
vishwabmcba0bd5f2015-09-30 16:50:23 +053030};
31
vishwa36993272015-11-20 12:43:49 -060032// A Mechanism to tell host to shtudown hosts by sending this PEM SEL. Really
33// the only used fields by skiboot are:
34// id[0] / id[1] for ID_0 , ID_1
35// type : SEL_RECORD_TYPE_OEM as standard SELs are ignored by skiboot
36// cmd : CMD_POWER for power functions
37// data[0], specific commands. example Soft power off. power cycle, etc.
38struct oem_sel_timestamped
39{
40 /* SEL header */
41 uint8_t id[2];
42 uint8_t type;
43 uint8_t manuf_id[3];
44 uint8_t timestamp[4];
45 /* OEM SEL data (6 bytes) follows */
46 uint8_t netfun;
47 uint8_t cmd;
48 uint8_t data[4];
49};
vishwabmcba0bd5f2015-09-30 16:50:23 +053050#endif