blob: 93de2c04aeca9cc51882e1ea5412e01462a0f85d [file] [log] [blame]
Patrick Venture46470a32018-09-07 19:26:25 -07001#pragma once
Adriana Kobylak40814c62015-10-27 15:58:44 -05002
vishwa36993272015-11-20 12:43:49 -06003#include <stdint.h>
Patrick Venture0b02be92018-08-31 11:55:55 -07004
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.
Kuiying Wang49a33f92018-07-26 16:24:22 +08008enum ipmi_netfn_chassis_cmds
Adriana Kobylak40814c62015-10-27 15:58:44 -05009{
Patrick Venture0b02be92018-08-31 11:55:55 -070010 IPMI_CMD_GET_CHASSIS_CAP = 0x00,
Nan Lifdd8ec52016-08-28 03:57:40 +080011 // Chassis Status
Patrick Venture0b02be92018-08-31 11:55:55 -070012 IPMI_CMD_CHASSIS_STATUS = 0x01,
Tom Joseph5110c122018-03-23 17:55:40 +053013 // Chassis Control
Patrick Venture0b02be92018-08-31 11:55:55 -070014 IPMI_CMD_CHASSIS_CONTROL = 0x02,
15 IPMI_CMD_CHASSIS_IDENTIFY = 0x04,
Yong Liae4b0402018-11-02 11:12:14 +080016 IPMI_CMD_SET_CHASSIS_CAP = 0x05,
Adriana Kobylak40814c62015-10-27 15:58:44 -050017 // Get capability bits
shgoupfd84fbbf2015-12-17 10:05:51 +080018 IPMI_CMD_SET_SYS_BOOT_OPTIONS = 0x08,
Adriana Kobylak40814c62015-10-27 15:58:44 -050019 IPMI_CMD_GET_SYS_BOOT_OPTIONS = 0x09,
Patrick Venture0b02be92018-08-31 11:55:55 -070020 IPMI_CMD_GET_POH_COUNTER = 0x0F,
Adriana Kobylak40814c62015-10-27 15:58:44 -050021};
22
23// Command specific completion codes
24enum ipmi_chassis_return_codes
25{
shgoupfd84fbbf2015-12-17 10:05:51 +080026 IPMI_OK = 0x0,
Adriana Kobylak40814c62015-10-27 15:58:44 -050027 IPMI_CC_PARM_NOT_SUPPORTED = 0x80,
28};
29
shgoupfd84fbbf2015-12-17 10:05:51 +080030// Generic completion codes,
31// see IPMI doc section 5.2
32enum ipmi_generic_return_codes
33{
34 IPMI_OUT_OF_SPACE = 0xC4,
35};
36
vishwa36993272015-11-20 12:43:49 -060037// Various Chassis operations under a single command.
38enum ipmi_chassis_control_cmds : uint8_t
39{
Patrick Venture0b02be92018-08-31 11:55:55 -070040 CMD_POWER_OFF = 0x00,
41 CMD_POWER_ON = 0x01,
42 CMD_POWER_CYCLE = 0x02,
43 CMD_HARD_RESET = 0x03,
44 CMD_PULSE_DIAGNOSTIC_INTR = 0x04,
45 CMD_SOFT_OFF_VIA_OVER_TEMP = 0x05,
vishwa36993272015-11-20 12:43:49 -060046};
Ratan Guptafd28dd72016-08-01 04:58:01 -050047enum class BootOptionParameter : size_t
48{
jayaprakash Mutyalabfd8fc42020-05-05 22:38:03 +000049 bootInfo = 0x4,
50 bootFlags = 0x5,
51 opalNetworkSettings = 0x61
Ratan Guptafd28dd72016-08-01 04:58:01 -050052};
53
54enum class BootOptionResponseSize : size_t
55{
jayaprakash Mutyalabfd8fc42020-05-05 22:38:03 +000056 bootFlags = 5,
57 opalNetworkSettings = 50
Ratan Guptafd28dd72016-08-01 04:58:01 -050058};
Yong Lif4e38512019-05-21 14:46:55 +080059
60enum class ChassisIDState : uint8_t
61{
62 off = 0x0,
63 temporaryOn = 0x1,
64 indefiniteOn = 0x2,
65 reserved = 0x3
66};