146470a38SPatrick Venture #pragma once 246470a38SPatrick Venture 346470a38SPatrick Venture #include <stdint.h> 446470a38SPatrick Venture 546470a38SPatrick Venture #include <cstddef> 646470a38SPatrick Venture 746470a38SPatrick Venture // IPMI commands for Chassis net functions. 846470a38SPatrick Venture enum ipmi_netfn_chassis_cmds 946470a38SPatrick Venture { 1046470a38SPatrick Venture IPMI_CMD_GET_CHASSIS_CAP = 0x00, 1146470a38SPatrick Venture // Chassis Status 1246470a38SPatrick Venture IPMI_CMD_CHASSIS_STATUS = 0x01, 1346470a38SPatrick Venture // Chassis Control 1446470a38SPatrick Venture IPMI_CMD_CHASSIS_CONTROL = 0x02, 1546470a38SPatrick Venture IPMI_CMD_CHASSIS_IDENTIFY = 0x04, 16ae4b040bSYong Li IPMI_CMD_SET_CHASSIS_CAP = 0x05, 1746470a38SPatrick Venture // Get capability bits 1846470a38SPatrick Venture IPMI_CMD_SET_SYS_BOOT_OPTIONS = 0x08, 1946470a38SPatrick Venture IPMI_CMD_GET_SYS_BOOT_OPTIONS = 0x09, 2046470a38SPatrick Venture IPMI_CMD_GET_POH_COUNTER = 0x0F, 2146470a38SPatrick Venture }; 2246470a38SPatrick Venture 2346470a38SPatrick Venture // Command specific completion codes 2446470a38SPatrick Venture enum ipmi_chassis_return_codes 2546470a38SPatrick Venture { 2646470a38SPatrick Venture IPMI_OK = 0x0, 2746470a38SPatrick Venture IPMI_CC_PARM_NOT_SUPPORTED = 0x80, 2846470a38SPatrick Venture }; 2946470a38SPatrick Venture 3046470a38SPatrick Venture // Generic completion codes, 3146470a38SPatrick Venture // see IPMI doc section 5.2 3246470a38SPatrick Venture enum ipmi_generic_return_codes 3346470a38SPatrick Venture { 3446470a38SPatrick Venture IPMI_OUT_OF_SPACE = 0xC4, 3546470a38SPatrick Venture }; 3646470a38SPatrick Venture 3746470a38SPatrick Venture // Various Chassis operations under a single command. 3846470a38SPatrick Venture enum ipmi_chassis_control_cmds : uint8_t 3946470a38SPatrick Venture { 4046470a38SPatrick Venture CMD_POWER_OFF = 0x00, 4146470a38SPatrick Venture CMD_POWER_ON = 0x01, 4246470a38SPatrick Venture CMD_POWER_CYCLE = 0x02, 4346470a38SPatrick Venture CMD_HARD_RESET = 0x03, 4446470a38SPatrick Venture CMD_PULSE_DIAGNOSTIC_INTR = 0x04, 4546470a38SPatrick Venture CMD_SOFT_OFF_VIA_OVER_TEMP = 0x05, 4646470a38SPatrick Venture }; 4746470a38SPatrick Venture enum class BootOptionParameter : size_t 4846470a38SPatrick Venture { 49*bfd8fc4bSjayaprakash Mutyala bootInfo = 0x4, 50*bfd8fc4bSjayaprakash Mutyala bootFlags = 0x5, 51*bfd8fc4bSjayaprakash Mutyala opalNetworkSettings = 0x61 5246470a38SPatrick Venture }; 5346470a38SPatrick Venture 5446470a38SPatrick Venture enum class BootOptionResponseSize : size_t 5546470a38SPatrick Venture { 56*bfd8fc4bSjayaprakash Mutyala bootFlags = 5, 57*bfd8fc4bSjayaprakash Mutyala opalNetworkSettings = 50 5846470a38SPatrick Venture }; 59f4e38515SYong Li 60f4e38515SYong Li enum class ChassisIDState : uint8_t 61f4e38515SYong Li { 62f4e38515SYong Li off = 0x0, 63f4e38515SYong Li temporaryOn = 0x1, 64f4e38515SYong Li indefiniteOn = 0x2, 65f4e38515SYong Li reserved = 0x3 66f4e38515SYong Li }; 67