Tom | 9e5232e | 2016-11-07 12:14:51 +0530 | [diff] [blame] | 1 | #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 |
| 16 | |
| 17 | // IPMI commands used via System Interface functions. |
| 18 | enum ipmi_netfn_system_intf_cmds |
| 19 | { |
| 20 | IPMI_CMD_SET_BMC_GLOBAL_ENABLES = 0x2E, |
| 21 | IPMI_CMD_GET_MSG_FLAGS = 0x31, |
| 22 | IPMI_CMD_READ_EVENT = 0x35, |
| 23 | }; |
| 24 | |
| 25 | // A Mechanism to tell host to shtudown hosts by sending this PEM SEL. Really |
| 26 | // the only used fields by skiboot are: |
| 27 | // id[0] / id[1] for ID_0 , ID_1 |
| 28 | // type : SEL_RECORD_TYPE_OEM as standard SELs are ignored by skiboot |
| 29 | // cmd : CMD_POWER for power functions |
| 30 | // data[0], specific commands. example Soft power off. power cycle, etc. |
| 31 | struct oem_sel_timestamped |
| 32 | { |
| 33 | /* SEL header */ |
| 34 | uint8_t id[2]; |
| 35 | uint8_t type; |
| 36 | uint8_t manuf_id[3]; |
| 37 | uint8_t timestamp[4]; |
| 38 | /* OEM SEL data (6 bytes) follows */ |
| 39 | uint8_t netfun; |
| 40 | uint8_t cmd; |
| 41 | uint8_t data[4]; |
| 42 | }; |
| 43 | |
| 44 | #endif |