blob: c0e82a1b8fa32f993b2129ff93e9157b56b12b86 [file] [log] [blame]
Adriana Kobylak40814c62015-10-27 15:58:44 -05001#ifndef __HOST_IPMI_CHASSIS_HANDLER_H__
2#define __HOST_IPMI_CHASSIS_HANDLER_H__
3
vishwa36993272015-11-20 12:43:49 -06004#include <stdint.h>
Ratan Guptafd28dd72016-08-01 04:58:01 -05005#include <cstddef>
vishwa36993272015-11-20 12:43:49 -06006
Adriana Kobylak40814c62015-10-27 15:58:44 -05007// IPMI commands for Chassis net functions.
8enum ipmi_netfn_app_cmds
9{
Nan Li8d15fb42016-08-16 22:29:40 +080010 IPMI_CMD_GET_CHASSIS_CAP = 0x00,
Nan Lifdd8ec52016-08-28 03:57:40 +080011 // Chassis Status
12 IPMI_CMD_CHASSIS_STATUS = 0x01,
Tom Joseph5110c122018-03-23 17:55:40 +053013 // Chassis Control
14 IPMI_CMD_CHASSIS_CONTROL = 0x02,
15 IPMI_CMD_CHASSIS_IDENTIFY = 0x04,
Adriana Kobylak40814c62015-10-27 15:58:44 -050016 // Get capability bits
shgoupfd84fbbf2015-12-17 10:05:51 +080017 IPMI_CMD_SET_SYS_BOOT_OPTIONS = 0x08,
Adriana Kobylak40814c62015-10-27 15:58:44 -050018 IPMI_CMD_GET_SYS_BOOT_OPTIONS = 0x09,
19};
20
21// Command specific completion codes
22enum ipmi_chassis_return_codes
23{
shgoupfd84fbbf2015-12-17 10:05:51 +080024 IPMI_OK = 0x0,
Adriana Kobylak40814c62015-10-27 15:58:44 -050025 IPMI_CC_PARM_NOT_SUPPORTED = 0x80,
26};
27
shgoupfd84fbbf2015-12-17 10:05:51 +080028// Generic completion codes,
29// see IPMI doc section 5.2
30enum ipmi_generic_return_codes
31{
32 IPMI_OUT_OF_SPACE = 0xC4,
33};
34
vishwa36993272015-11-20 12:43:49 -060035// Various Chassis operations under a single command.
36enum ipmi_chassis_control_cmds : uint8_t
37{
Marri Devender Raob93e9802018-05-07 00:59:25 -050038 CMD_POWER_OFF = 0x00,
39 CMD_POWER_ON = 0x01,
40 CMD_POWER_CYCLE = 0x02,
41 CMD_HARD_RESET = 0x03,
42 CMD_PULSE_DIAGNOSTIC_INTR = 0x04,
43 CMD_SOFT_OFF_VIA_OVER_TEMP = 0x05,
vishwa36993272015-11-20 12:43:49 -060044};
Ratan Guptafd28dd72016-08-01 04:58:01 -050045enum class BootOptionParameter : size_t
46{
Tom Josephf536c902017-09-25 18:08:15 +053047 BOOT_INFO = 0x4,
Ratan Guptafd28dd72016-08-01 04:58:01 -050048 BOOT_FLAGS = 0x5,
49 OPAL_NETWORK_SETTINGS = 0x61
50};
51
52enum class BootOptionResponseSize : size_t
53{
54 BOOT_FLAGS = 5,
Ratan Gupta6ec7daa2017-07-15 14:13:01 +053055 OPAL_NETWORK_SETTINGS = 50
Ratan Guptafd28dd72016-08-01 04:58:01 -050056};
vishwa36993272015-11-20 12:43:49 -060057
Adriana Kobylak40814c62015-10-27 15:58:44 -050058#endif