blob: 8643ae4641a65f9ca9ea334a791ea33ef5f6bda0 [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,
Nan Lifdd8ec52016-08-28 03:57:40 +080011 // Chassis Status
12 IPMI_CMD_CHASSIS_STATUS = 0x01,
Tom Joseph5110c122018-03-23 17:55:40 +053013 // Chassis Control
14 IPMI_CMD_CHASSIS_CONTROL = 0x02,
15 IPMI_CMD_CHASSIS_IDENTIFY = 0x04,
Adriana Kobylak40814c62015-10-27 15:58:44 -050016 // Get capability bits
shgoupfd84fbbf2015-12-17 10:05:51 +080017 IPMI_CMD_SET_SYS_BOOT_OPTIONS = 0x08,
Adriana Kobylak40814c62015-10-27 15:58:44 -050018 IPMI_CMD_GET_SYS_BOOT_OPTIONS = 0x09,
Nagaraju Gorugantia59d83f2018-04-06 05:55:42 -050019 IPMI_CMD_GET_POH_COUNTER = 0x0F,
Adriana Kobylak40814c62015-10-27 15:58:44 -050020};
21
22// Command specific completion codes
23enum ipmi_chassis_return_codes
24{
shgoupfd84fbbf2015-12-17 10:05:51 +080025 IPMI_OK = 0x0,
Adriana Kobylak40814c62015-10-27 15:58:44 -050026 IPMI_CC_PARM_NOT_SUPPORTED = 0x80,
27};
28
shgoupfd84fbbf2015-12-17 10:05:51 +080029// Generic completion codes,
30// see IPMI doc section 5.2
31enum ipmi_generic_return_codes
32{
33 IPMI_OUT_OF_SPACE = 0xC4,
34};
35
vishwa36993272015-11-20 12:43:49 -060036// Various Chassis operations under a single command.
37enum ipmi_chassis_control_cmds : uint8_t
38{
Marri Devender Raob93e9802018-05-07 00:59:25 -050039 CMD_POWER_OFF = 0x00,
40 CMD_POWER_ON = 0x01,
41 CMD_POWER_CYCLE = 0x02,
42 CMD_HARD_RESET = 0x03,
43 CMD_PULSE_DIAGNOSTIC_INTR = 0x04,
44 CMD_SOFT_OFF_VIA_OVER_TEMP = 0x05,
vishwa36993272015-11-20 12:43:49 -060045};
Ratan Guptafd28dd72016-08-01 04:58:01 -050046enum class BootOptionParameter : size_t
47{
Tom Josephf536c902017-09-25 18:08:15 +053048 BOOT_INFO = 0x4,
Ratan Guptafd28dd72016-08-01 04:58:01 -050049 BOOT_FLAGS = 0x5,
50 OPAL_NETWORK_SETTINGS = 0x61
51};
52
53enum class BootOptionResponseSize : size_t
54{
55 BOOT_FLAGS = 5,
Ratan Gupta6ec7daa2017-07-15 14:13:01 +053056 OPAL_NETWORK_SETTINGS = 50
Ratan Guptafd28dd72016-08-01 04:58:01 -050057};
vishwa36993272015-11-20 12:43:49 -060058
Adriana Kobylak40814c62015-10-27 15:58:44 -050059#endif