blob: b290f21081a3c2135cef7f8f2b2a69b5228b3ac0 [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,
vishwa36993272015-11-20 12:43:49 -060011 // Chassis Control
12 IPMI_CMD_CHASSIS_CONTROL = 0x02,
Adriana Kobylak40814c62015-10-27 15:58:44 -050013 // Get capability bits
shgoupfd84fbbf2015-12-17 10:05:51 +080014 IPMI_CMD_SET_SYS_BOOT_OPTIONS = 0x08,
Adriana Kobylak40814c62015-10-27 15:58:44 -050015 IPMI_CMD_GET_SYS_BOOT_OPTIONS = 0x09,
16};
17
18// Command specific completion codes
19enum ipmi_chassis_return_codes
20{
shgoupfd84fbbf2015-12-17 10:05:51 +080021 IPMI_OK = 0x0,
Adriana Kobylak40814c62015-10-27 15:58:44 -050022 IPMI_CC_PARM_NOT_SUPPORTED = 0x80,
23};
24
shgoupfd84fbbf2015-12-17 10:05:51 +080025// Generic completion codes,
26// see IPMI doc section 5.2
27enum ipmi_generic_return_codes
28{
29 IPMI_OUT_OF_SPACE = 0xC4,
30};
31
vishwa36993272015-11-20 12:43:49 -060032// Various Chassis operations under a single command.
33enum ipmi_chassis_control_cmds : uint8_t
34{
35 CMD_POWER_OFF = 0x00,
36 CMD_POWER_ON = 0x01,
37 CMD_POWER_CYCLE = 0x02,
38 CMD_HARD_RESET = 0x03,
39 CMD_PULSE_DIAGNOSTIC_INTR = 0x04,
40 CMD_SOFT_OFF_VIA_OVER_TEMP = 0x05,
41};
Ratan Guptafd28dd72016-08-01 04:58:01 -050042enum class BootOptionParameter : size_t
43{
44 BOOT_FLAGS = 0x5,
45 OPAL_NETWORK_SETTINGS = 0x61
46};
47
48enum class BootOptionResponseSize : size_t
49{
50 BOOT_FLAGS = 5,
51 OPAL_NETWORK_SETTINGS = 26
52};
vishwa36993272015-11-20 12:43:49 -060053
Adriana Kobylak40814c62015-10-27 15:58:44 -050054#endif