blob: 82c09bccc5378ce064dd5029cc83f48c22251381 [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
George Liu8f4717c2025-07-03 09:22:34 +08007// IPMI Command for a Net Function number as specified by IPMI V2.0 spec.
8using Cmd = uint8_t;
Adriana Kobylak40814c62015-10-27 15:58:44 -05009
George Liu8f4717c2025-07-03 09:22:34 +080010// ipmi function return the status code
11using Cc = uint8_t;
12
13// Command specific completion codes
14constexpr Cc ccParmNotSupported = 0xCD;
15constexpr Cc failSetInProgress = 0x81;
shgoupfd84fbbf2015-12-17 10:05:51 +080016
vishwa36993272015-11-20 12:43:49 -060017// Various Chassis operations under a single command.
George Liu8f4717c2025-07-03 09:22:34 +080018constexpr Cmd cmdPowerOff = 0x00;
19constexpr Cmd cmdPowerOn = 0x01;
20constexpr Cmd cmdPowerCycle = 0x02;
21constexpr Cmd cmdHardReset = 0x03;
22constexpr Cmd cmdPulseDiagnosticInterrupt = 0x04;
23constexpr Cmd cmdSoftOffViaOverTemp = 0x05;
24
Ratan Guptafd28dd72016-08-01 04:58:01 -050025enum class BootOptionParameter : size_t
26{
John Wang97c62e12021-01-19 14:19:55 +080027 setInProgress = 0x0,
Chen Yugang86ac4992021-06-25 08:14:52 +080028 bootFlagValidClr = 0x3,
jayaprakash Mutyalabfd8fc42020-05-05 22:38:03 +000029 bootInfo = 0x4,
30 bootFlags = 0x5,
31 opalNetworkSettings = 0x61
Ratan Guptafd28dd72016-08-01 04:58:01 -050032};
33
34enum class BootOptionResponseSize : size_t
35{
huangheab369282020-10-10 14:40:00 +080036 setInProgress = 3,
jayaprakash Mutyalabfd8fc42020-05-05 22:38:03 +000037 bootFlags = 5,
38 opalNetworkSettings = 50
Ratan Guptafd28dd72016-08-01 04:58:01 -050039};
Yong Lif4e38512019-05-21 14:46:55 +080040
41enum class ChassisIDState : uint8_t
42{
43 off = 0x0,
44 temporaryOn = 0x1,
45 indefiniteOn = 0x2,
46 reserved = 0x3
47};