1*46470a38SPatrick Venture #pragma once
2*46470a38SPatrick Venture 
3*46470a38SPatrick Venture #include <stdint.h>
4*46470a38SPatrick Venture 
5*46470a38SPatrick Venture #include <cstddef>
6*46470a38SPatrick Venture 
7*46470a38SPatrick Venture // IPMI commands for Chassis net functions.
8*46470a38SPatrick Venture enum ipmi_netfn_chassis_cmds
9*46470a38SPatrick Venture {
10*46470a38SPatrick Venture     IPMI_CMD_GET_CHASSIS_CAP = 0x00,
11*46470a38SPatrick Venture     // Chassis Status
12*46470a38SPatrick Venture     IPMI_CMD_CHASSIS_STATUS = 0x01,
13*46470a38SPatrick Venture     // Chassis Control
14*46470a38SPatrick Venture     IPMI_CMD_CHASSIS_CONTROL = 0x02,
15*46470a38SPatrick Venture     IPMI_CMD_CHASSIS_IDENTIFY = 0x04,
16*46470a38SPatrick Venture     // Set Power Restore Policy
17*46470a38SPatrick Venture     IPMI_CMD_SET_RESTORE_POLICY = 0x06,
18*46470a38SPatrick Venture     // Get capability bits
19*46470a38SPatrick Venture     IPMI_CMD_SET_SYS_BOOT_OPTIONS = 0x08,
20*46470a38SPatrick Venture     IPMI_CMD_GET_SYS_BOOT_OPTIONS = 0x09,
21*46470a38SPatrick Venture     IPMI_CMD_GET_POH_COUNTER = 0x0F,
22*46470a38SPatrick Venture };
23*46470a38SPatrick Venture 
24*46470a38SPatrick Venture // Command specific completion codes
25*46470a38SPatrick Venture enum ipmi_chassis_return_codes
26*46470a38SPatrick Venture {
27*46470a38SPatrick Venture     IPMI_OK = 0x0,
28*46470a38SPatrick Venture     IPMI_CC_PARM_NOT_SUPPORTED = 0x80,
29*46470a38SPatrick Venture };
30*46470a38SPatrick Venture 
31*46470a38SPatrick Venture // Generic completion codes,
32*46470a38SPatrick Venture // see IPMI doc section 5.2
33*46470a38SPatrick Venture enum ipmi_generic_return_codes
34*46470a38SPatrick Venture {
35*46470a38SPatrick Venture     IPMI_OUT_OF_SPACE = 0xC4,
36*46470a38SPatrick Venture };
37*46470a38SPatrick Venture 
38*46470a38SPatrick Venture // Various Chassis operations under a single command.
39*46470a38SPatrick Venture enum ipmi_chassis_control_cmds : uint8_t
40*46470a38SPatrick Venture {
41*46470a38SPatrick Venture     CMD_POWER_OFF = 0x00,
42*46470a38SPatrick Venture     CMD_POWER_ON = 0x01,
43*46470a38SPatrick Venture     CMD_POWER_CYCLE = 0x02,
44*46470a38SPatrick Venture     CMD_HARD_RESET = 0x03,
45*46470a38SPatrick Venture     CMD_PULSE_DIAGNOSTIC_INTR = 0x04,
46*46470a38SPatrick Venture     CMD_SOFT_OFF_VIA_OVER_TEMP = 0x05,
47*46470a38SPatrick Venture };
48*46470a38SPatrick Venture enum class BootOptionParameter : size_t
49*46470a38SPatrick Venture {
50*46470a38SPatrick Venture     BOOT_INFO = 0x4,
51*46470a38SPatrick Venture     BOOT_FLAGS = 0x5,
52*46470a38SPatrick Venture     OPAL_NETWORK_SETTINGS = 0x61
53*46470a38SPatrick Venture };
54*46470a38SPatrick Venture 
55*46470a38SPatrick Venture enum class BootOptionResponseSize : size_t
56*46470a38SPatrick Venture {
57*46470a38SPatrick Venture     BOOT_FLAGS = 5,
58*46470a38SPatrick Venture     OPAL_NETWORK_SETTINGS = 50
59*46470a38SPatrick Venture };
60