1 #pragma once 2 3 #include <stdint.h> 4 5 #include <cstddef> 6 7 // Command specific completion codes 8 enum ipmi_chassis_return_codes 9 { 10 IPMI_OK = 0x0, 11 IPMI_CC_PARM_NOT_SUPPORTED = 0x80, 12 IPMI_CC_FAIL_SET_IN_PROGRESS = 0x81, 13 }; 14 15 // Generic completion codes, 16 // see IPMI doc section 5.2 17 enum ipmi_generic_return_codes 18 { 19 IPMI_OUT_OF_SPACE = 0xC4, 20 }; 21 22 // Various Chassis operations under a single command. 23 enum ipmi_chassis_control_cmds : uint8_t 24 { 25 CMD_POWER_OFF = 0x00, 26 CMD_POWER_ON = 0x01, 27 CMD_POWER_CYCLE = 0x02, 28 CMD_HARD_RESET = 0x03, 29 CMD_PULSE_DIAGNOSTIC_INTR = 0x04, 30 CMD_SOFT_OFF_VIA_OVER_TEMP = 0x05, 31 }; 32 enum class BootOptionParameter : size_t 33 { 34 setInProgress = 0x0, 35 bootFlagValidClr = 0x3, 36 bootInfo = 0x4, 37 bootFlags = 0x5, 38 opalNetworkSettings = 0x61 39 }; 40 41 enum class BootOptionResponseSize : size_t 42 { 43 setInProgress = 3, 44 bootFlags = 5, 45 opalNetworkSettings = 50 46 }; 47 48 enum class ChassisIDState : uint8_t 49 { 50 off = 0x0, 51 temporaryOn = 0x1, 52 indefiniteOn = 0x2, 53 reserved = 0x3 54 }; 55