Adriana Kobylak | 40814c6 | 2015-10-27 15:58:44 -0500 | [diff] [blame] | 1 | #ifndef __HOST_IPMI_CHASSIS_HANDLER_H__ |
| 2 | #define __HOST_IPMI_CHASSIS_HANDLER_H__ |
| 3 | |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 4 | #include <stdint.h> |
Ratan Gupta | fd28dd7 | 2016-08-01 04:58:01 -0500 | [diff] [blame] | 5 | #include <cstddef> |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 6 | |
Adriana Kobylak | 40814c6 | 2015-10-27 15:58:44 -0500 | [diff] [blame] | 7 | // IPMI commands for Chassis net functions. |
| 8 | enum ipmi_netfn_app_cmds |
| 9 | { |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 10 | // Chassis Control |
| 11 | IPMI_CMD_CHASSIS_CONTROL = 0x02, |
Adriana Kobylak | 40814c6 | 2015-10-27 15:58:44 -0500 | [diff] [blame] | 12 | // Get capability bits |
shgoupf | d84fbbf | 2015-12-17 10:05:51 +0800 | [diff] [blame] | 13 | IPMI_CMD_SET_SYS_BOOT_OPTIONS = 0x08, |
Adriana Kobylak | 40814c6 | 2015-10-27 15:58:44 -0500 | [diff] [blame] | 14 | IPMI_CMD_GET_SYS_BOOT_OPTIONS = 0x09, |
| 15 | }; |
| 16 | |
| 17 | // Command specific completion codes |
| 18 | enum ipmi_chassis_return_codes |
| 19 | { |
shgoupf | d84fbbf | 2015-12-17 10:05:51 +0800 | [diff] [blame] | 20 | IPMI_OK = 0x0, |
Adriana Kobylak | 40814c6 | 2015-10-27 15:58:44 -0500 | [diff] [blame] | 21 | IPMI_CC_PARM_NOT_SUPPORTED = 0x80, |
| 22 | }; |
| 23 | |
shgoupf | d84fbbf | 2015-12-17 10:05:51 +0800 | [diff] [blame] | 24 | // Generic completion codes, |
| 25 | // see IPMI doc section 5.2 |
| 26 | enum ipmi_generic_return_codes |
| 27 | { |
| 28 | IPMI_OUT_OF_SPACE = 0xC4, |
| 29 | }; |
| 30 | |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 31 | // Various Chassis operations under a single command. |
| 32 | enum ipmi_chassis_control_cmds : uint8_t |
| 33 | { |
| 34 | CMD_POWER_OFF = 0x00, |
| 35 | CMD_POWER_ON = 0x01, |
| 36 | CMD_POWER_CYCLE = 0x02, |
| 37 | CMD_HARD_RESET = 0x03, |
| 38 | CMD_PULSE_DIAGNOSTIC_INTR = 0x04, |
| 39 | CMD_SOFT_OFF_VIA_OVER_TEMP = 0x05, |
| 40 | }; |
Ratan Gupta | fd28dd7 | 2016-08-01 04:58:01 -0500 | [diff] [blame] | 41 | enum class BootOptionParameter : size_t |
| 42 | { |
| 43 | BOOT_FLAGS = 0x5, |
| 44 | OPAL_NETWORK_SETTINGS = 0x61 |
| 45 | }; |
| 46 | |
| 47 | enum class BootOptionResponseSize : size_t |
| 48 | { |
| 49 | BOOT_FLAGS = 5, |
| 50 | OPAL_NETWORK_SETTINGS = 26 |
| 51 | }; |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 52 | |
Adriana Kobylak | 40814c6 | 2015-10-27 15:58:44 -0500 | [diff] [blame] | 53 | #endif |