Patrick Venture | 46470a3 | 2018-09-07 19:26:25 -0700 | [diff] [blame] | 1 | #pragma once |
Adriana Kobylak | 40814c6 | 2015-10-27 15:58:44 -0500 | [diff] [blame] | 2 | |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 3 | #include <stdint.h> |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 4 | |
Ratan Gupta | fd28dd7 | 2016-08-01 04:58:01 -0500 | [diff] [blame] | 5 | #include <cstddef> |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 6 | |
George Liu | 8f4717c | 2025-07-03 09:22:34 +0800 | [diff] [blame^] | 7 | // IPMI Command for a Net Function number as specified by IPMI V2.0 spec. |
| 8 | using Cmd = uint8_t; |
Adriana Kobylak | 40814c6 | 2015-10-27 15:58:44 -0500 | [diff] [blame] | 9 | |
George Liu | 8f4717c | 2025-07-03 09:22:34 +0800 | [diff] [blame^] | 10 | // ipmi function return the status code |
| 11 | using Cc = uint8_t; |
| 12 | |
| 13 | // Command specific completion codes |
| 14 | constexpr Cc ccParmNotSupported = 0xCD; |
| 15 | constexpr Cc failSetInProgress = 0x81; |
shgoupf | d84fbbf | 2015-12-17 10:05:51 +0800 | [diff] [blame] | 16 | |
vishwa | 3699327 | 2015-11-20 12:43:49 -0600 | [diff] [blame] | 17 | // Various Chassis operations under a single command. |
George Liu | 8f4717c | 2025-07-03 09:22:34 +0800 | [diff] [blame^] | 18 | constexpr Cmd cmdPowerOff = 0x00; |
| 19 | constexpr Cmd cmdPowerOn = 0x01; |
| 20 | constexpr Cmd cmdPowerCycle = 0x02; |
| 21 | constexpr Cmd cmdHardReset = 0x03; |
| 22 | constexpr Cmd cmdPulseDiagnosticInterrupt = 0x04; |
| 23 | constexpr Cmd cmdSoftOffViaOverTemp = 0x05; |
| 24 | |
Ratan Gupta | fd28dd7 | 2016-08-01 04:58:01 -0500 | [diff] [blame] | 25 | enum class BootOptionParameter : size_t |
| 26 | { |
John Wang | 97c62e1 | 2021-01-19 14:19:55 +0800 | [diff] [blame] | 27 | setInProgress = 0x0, |
Chen Yugang | 86ac499 | 2021-06-25 08:14:52 +0800 | [diff] [blame] | 28 | bootFlagValidClr = 0x3, |
jayaprakash Mutyala | bfd8fc4 | 2020-05-05 22:38:03 +0000 | [diff] [blame] | 29 | bootInfo = 0x4, |
| 30 | bootFlags = 0x5, |
| 31 | opalNetworkSettings = 0x61 |
Ratan Gupta | fd28dd7 | 2016-08-01 04:58:01 -0500 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | enum class BootOptionResponseSize : size_t |
| 35 | { |
huanghe | ab36928 | 2020-10-10 14:40:00 +0800 | [diff] [blame] | 36 | setInProgress = 3, |
jayaprakash Mutyala | bfd8fc4 | 2020-05-05 22:38:03 +0000 | [diff] [blame] | 37 | bootFlags = 5, |
| 38 | opalNetworkSettings = 50 |
Ratan Gupta | fd28dd7 | 2016-08-01 04:58:01 -0500 | [diff] [blame] | 39 | }; |
Yong Li | f4e3851 | 2019-05-21 14:46:55 +0800 | [diff] [blame] | 40 | |
| 41 | enum class ChassisIDState : uint8_t |
| 42 | { |
| 43 | off = 0x0, |
| 44 | temporaryOn = 0x1, |
| 45 | indefiniteOn = 0x2, |
| 46 | reserved = 0x3 |
| 47 | }; |