blob: d603aaa840f032d7f8bec3634a48af5f88c7aa31 [file] [log] [blame]
Tom9e5232e2016-11-07 12:14:51 +05301#ifndef __SYSTEM_INTF_CMDS_HANDLER_H__
2#define __SYSTEM_INTF_CMDS_HANDLER_H__
3
4#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
Andrew Geissler12866372017-03-21 22:58:28 -050016// Major command for the heartbeat operation (verify host is alive)
17#define CMD_HEARTBEAT 0xFF
Tom9e5232e2016-11-07 12:14:51 +053018
19// IPMI commands used via System Interface functions.
20enum ipmi_netfn_system_intf_cmds
21{
22 IPMI_CMD_SET_BMC_GLOBAL_ENABLES = 0x2E,
23 IPMI_CMD_GET_MSG_FLAGS = 0x31,
24 IPMI_CMD_READ_EVENT = 0x35,
25};
26
27// A Mechanism to tell host to shtudown hosts by sending this PEM SEL. Really
28// the only used fields by skiboot are:
29// id[0] / id[1] for ID_0 , ID_1
30// type : SEL_RECORD_TYPE_OEM as standard SELs are ignored by skiboot
31// cmd : CMD_POWER for power functions
32// data[0], specific commands. example Soft power off. power cycle, etc.
33struct oem_sel_timestamped
34{
35 /* SEL header */
36 uint8_t id[2];
37 uint8_t type;
38 uint8_t manuf_id[3];
39 uint8_t timestamp[4];
40 /* OEM SEL data (6 bytes) follows */
41 uint8_t netfun;
42 uint8_t cmd;
43 uint8_t data[4];
44};
45
46#endif