vishwabmc | ba0bd5f | 2015-09-30 16:50:23 +0530 | [diff] [blame] | 1 | #ifndef __HOST_IPMI_APP_HANDLER_H__ |
| 2 | #define __HOST_IPMI_APP_HANDLER_H__ |
| 3 | |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 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 | |
Adriana Kobylak | dfc8d77 | 2015-10-20 09:34:48 -0500 | [diff] [blame] | 17 | // IPMI commands for App net functions. |
vishwabmc | ba0bd5f | 2015-09-30 16:50:23 +0530 | [diff] [blame] | 18 | enum ipmi_netfn_app_cmds |
| 19 | { |
| 20 | // Get capability bits |
Adriana Kobylak | dfc8d77 | 2015-10-20 09:34:48 -0500 | [diff] [blame] | 21 | IPMI_CMD_GET_DEVICE_ID = 0x01, |
| 22 | IPMI_CMD_SET_ACPI = 0x06, |
Adriana Kobylak | d100ee5 | 2015-10-20 17:02:37 -0500 | [diff] [blame] | 23 | IPMI_CMD_GET_DEVICE_GUID = 0x08, |
Adriana Kobylak | dfc8d77 | 2015-10-20 09:34:48 -0500 | [diff] [blame] | 24 | IPMI_CMD_RESET_WD = 0x22, |
| 25 | IPMI_CMD_SET_WD = 0x24, |
| 26 | IPMI_CMD_SET_BMC_GLOBAL_ENABLES = 0x2E, |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 27 | IPMI_CMD_GET_MSG_FLAGS = 0x31, |
Adriana Kobylak | dfc8d77 | 2015-10-20 09:34:48 -0500 | [diff] [blame] | 28 | IPMI_CMD_READ_EVENT = 0x35, |
| 29 | IPMI_CMD_GET_CAP_BIT = 0x36, |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 30 | IPMI_CMD_GET_CHAN_INFO = 0x42, |
| 31 | |
vishwabmc | ba0bd5f | 2015-09-30 16:50:23 +0530 | [diff] [blame] | 32 | }; |
| 33 | |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 34 | // 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. |
| 40 | struct 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 | }; |
vishwabmc | ba0bd5f | 2015-09-30 16:50:23 +0530 | [diff] [blame] | 52 | #endif |