Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 1 | /* |
| 2 | // Copyright (c) 2018 Intel Corporation |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #pragma once |
| 18 | |
Vernon Mauery | 98bbf69 | 2019-09-16 11:14:59 -0700 | [diff] [blame] | 19 | #include <ipmid/api-types.hpp> |
Suryakanth Sekar | d509eb9 | 2018-11-15 17:44:11 +0530 | [diff] [blame] | 20 | #include <user_channel/user_layer.hpp> |
Vernon Mauery | 98bbf69 | 2019-09-16 11:14:59 -0700 | [diff] [blame] | 21 | namespace ipmi |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 22 | { |
Vernon Mauery | 98bbf69 | 2019-09-16 11:14:59 -0700 | [diff] [blame] | 23 | namespace intel |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 24 | { |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 25 | |
Vernon Mauery | 98bbf69 | 2019-09-16 11:14:59 -0700 | [diff] [blame] | 26 | static constexpr NetFn netFnGeneral = netFnOemOne; |
| 27 | static constexpr NetFn netFnPlatform = netFnOemTwo; |
| 28 | static constexpr NetFn netFnApp = netFnOemEight; |
| 29 | |
| 30 | namespace general |
| 31 | { |
| 32 | static constexpr Cmd cmdRestoreConfiguration = 0x02; |
| 33 | static constexpr Cmd cmdGetSmSignal = 0x14; |
| 34 | static constexpr Cmd cmdSetSmSignal = 0x15; |
| 35 | static constexpr Cmd cmdSetBIOSID = 0x26; |
| 36 | static constexpr Cmd cmdGetOEMDeviceInfo = 0x27; |
| 37 | static constexpr Cmd cmdSetColdRedundancyConfig = 0x2d; |
| 38 | static constexpr Cmd cmdGetColdRedundancyConfig = 0x2e; |
| 39 | static constexpr Cmd cmdGetAICSlotFRUIDSlotPosRecords = 0x31; |
| 40 | static constexpr Cmd cmdGetMultiNodeRole = 0x33; |
| 41 | static constexpr Cmd cmdGetMultiNodeId = 0x36; |
| 42 | static constexpr Cmd cmdSetSystemGUID = 0x41; |
| 43 | static constexpr Cmd cmdDisableBMCSystemReset = 0x42; |
| 44 | static constexpr Cmd cmdGetBMCResetDisables = 0x43; |
| 45 | static constexpr Cmd cmdSendEmbeddedFWUpdStatus = 0x44; |
| 46 | static constexpr Cmd cmdSlotI2CMasterWriteRead = 0x52; |
| 47 | static constexpr Cmd cmdSetPowerRestoreDelay = 0x54; |
| 48 | static constexpr Cmd cmdGetPowerRestoreDelay = 0x55; |
| 49 | static constexpr Cmd cmdSetFaultIndication = 0x57; |
| 50 | static constexpr Cmd cmdSetOEMUser2Activation = 0x5A; |
| 51 | static constexpr Cmd cmdSetSpecialUserPassword = 0x5F; |
| 52 | static constexpr Cmd cmdSetShutdownPolicy = 0x60; |
| 53 | static constexpr Cmd cmdGetShutdownPolicy = 0x62; |
| 54 | static constexpr Cmd cmdGetMultiNodePresence = 0x63; |
AppaRao Puli | 2897206 | 2019-11-11 02:04:45 +0530 | [diff] [blame] | 55 | static constexpr Cmd cmdGetBufferSize = 0x66; |
Vernon Mauery | 98bbf69 | 2019-09-16 11:14:59 -0700 | [diff] [blame] | 56 | static constexpr Cmd cmdSetFanConfig = 0x89; |
| 57 | static constexpr Cmd cmdGetFanConfig = 0x8a; |
| 58 | static constexpr Cmd cmdSetFanSpeedOffset = 0x8c; |
| 59 | static constexpr Cmd cmdGetFanSpeedOffset = 0x8d; |
| 60 | static constexpr Cmd cmdSetDimmOffset = 0x8e; |
| 61 | static constexpr Cmd cmdGetDimmOffset = 0x8f; |
| 62 | static constexpr Cmd cmdSetFscParameter = 0x90; |
| 63 | static constexpr Cmd cmdGetFscParameter = 0x91; |
| 64 | static constexpr Cmd cmdGetChassisIdentifier = 0x92; |
| 65 | static constexpr Cmd cmdReadBaseBoardProductId = 0x93; |
| 66 | static constexpr Cmd cmdGetProcessorErrConfig = 0x9A; |
| 67 | static constexpr Cmd cmdSetProcessorErrConfig = 0x9B; |
| 68 | static constexpr Cmd cmdSetManufacturingData = 0xA1; |
| 69 | static constexpr Cmd cmdGetManufacturingData = 0xA2; |
| 70 | static constexpr Cmd cmdGetLEDStatus = 0xB0; |
| 71 | static constexpr Cmd cmdControlBmcServices = 0xB1; |
| 72 | static constexpr Cmd cmdGetBmcServiceStatus = 0xB2; |
| 73 | static constexpr Cmd cmdGetSecurityMode = 0xB3; |
| 74 | static constexpr Cmd cmdSetSecurityMode = 0xB4; |
| 75 | static constexpr Cmd cmdMtmKeepAlive = 0xB5; |
srikanta mondal | 2030d7c | 2020-05-03 17:25:25 +0000 | [diff] [blame] | 76 | static constexpr Cmd cmdOEMGetReading = 0xE2; |
Kuiying Wang | 6d6dc7a | 2020-04-02 10:15:19 +0800 | [diff] [blame] | 77 | static constexpr Cmd cmdSetBIOSCap = 0xD3; |
| 78 | static constexpr Cmd cmdGetBIOSCap = 0xD4; |
| 79 | static constexpr Cmd cmdSetPayload = 0xD5; |
| 80 | static constexpr Cmd cmdGetPayload = 0xD6; |
| 81 | static constexpr Cmd cmdSetBIOSPwdHashInfo = 0xD7; |
| 82 | static constexpr Cmd cmdGetBIOSPwdHash = 0xD8; |
Vernon Mauery | 98bbf69 | 2019-09-16 11:14:59 -0700 | [diff] [blame] | 83 | static constexpr Cmd cmdGetNmiStatus = 0xE5; |
| 84 | static constexpr Cmd cmdSetEfiBootOptions = 0xEA; |
| 85 | static constexpr Cmd cmdGetEfiBootOptions = 0xEB; |
| 86 | static constexpr Cmd cmdSetNmiStatus = 0xED; |
Cheng C Yang | 4e6ee15 | 2019-09-25 10:27:44 +0800 | [diff] [blame] | 87 | static constexpr Cmd cmdGetPSUVersion = 0xEF; |
Vernon Mauery | 98bbf69 | 2019-09-16 11:14:59 -0700 | [diff] [blame] | 88 | } // namespace general |
| 89 | |
| 90 | namespace platform |
| 91 | { |
| 92 | static constexpr Cmd cmdCfgHostSerialPortSpeed = 0x90; |
Yong Li | 068b4f2 | 2019-09-17 16:32:18 +0800 | [diff] [blame] | 93 | static constexpr Cmd cmdClearCMOS = 0x91; |
Vernon Mauery | 98bbf69 | 2019-09-16 11:14:59 -0700 | [diff] [blame] | 94 | } // namespace platform |
| 95 | |
| 96 | namespace app |
| 97 | { |
| 98 | static constexpr Cmd cmdMdrStatus = 0x20; |
| 99 | static constexpr Cmd cmdMdrComplete = 0x21; |
| 100 | static constexpr Cmd cmdMdrEvent = 0x22; |
| 101 | static constexpr Cmd cmdMdrRead = 0x23; |
| 102 | static constexpr Cmd cmdMdrWrite = 0x24; |
| 103 | static constexpr Cmd cmdMdrLock = 0x25; |
| 104 | static constexpr Cmd cmdMdrIIAgentStatus = 0x30; |
| 105 | static constexpr Cmd cmdMdrIIGetDir = 0x31; |
| 106 | static constexpr Cmd cmdMdrIIGetDataInfo = 0x32; |
| 107 | static constexpr Cmd cmdMdrIILockData = 0x33; |
| 108 | static constexpr Cmd cmdMdrIIUnlockData = 0X34; |
| 109 | static constexpr Cmd cmdMdrIIGetDataBlock = 0x35; |
| 110 | static constexpr Cmd cmdMdrIISendDir = 0x38; |
| 111 | static constexpr Cmd cmdMdrIISendDataInfoOffer = 0x39; |
| 112 | static constexpr Cmd cmdMdrIISendDataInfo = 0x3a; |
| 113 | static constexpr Cmd cmdMdrIIDataStart = 0x3b; |
| 114 | static constexpr Cmd cmdMdrIIDataDone = 0x3c; |
| 115 | static constexpr Cmd cmdMdrIISendDataBlock = 0x3d; |
Rajashekar Gade Reddy | 2b664d5 | 2020-03-23 22:09:00 +0530 | [diff] [blame] | 116 | static constexpr Cmd cmdSlotIpmb = 0x51; |
Vernon Mauery | 98bbf69 | 2019-09-16 11:14:59 -0700 | [diff] [blame] | 117 | } // namespace app |
| 118 | |
| 119 | } // namespace intel |
| 120 | |
| 121 | } // namespace ipmi |
| 122 | |
| 123 | // FIXME: put these in the cpp files that use them |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 124 | enum class IPMIIntelOEMReturnCodes |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 125 | { |
| 126 | ipmiCCPayloadActive = 0x80, |
| 127 | ipmiCCInvalidPCIESlotID = 0x80, |
| 128 | ipmiCCParameterNotSupported = 0x80, |
| 129 | ipmiCCPayloadAlreadyDeactivated = 0x80, |
| 130 | ipmiCCSetInProcess = 0x81, |
| 131 | ipmiCCPayloadDisable = 0x81, |
| 132 | ipmiCCLostArbitration = 0x81, |
| 133 | ipmiCCInvalidCablePortIndex = 0x81, |
| 134 | ipmiCCHealthStatusNotAvailable = 0x81, |
| 135 | ipmiCCBusError = 0x82, |
| 136 | ipmiCCReadOnly = 0x82, |
| 137 | ipmiCCWriteOnly = 0x82, |
| 138 | ipmiCCNoCablePresent = 0x82, |
| 139 | ipmiCCDataCollectionInProgress = 0x82, |
| 140 | ipmiCCPayloadActivationLimitReached = 0x82, |
| 141 | ipmiCCNACKOnWrite = 0x83, |
| 142 | ipmiCCDataCollectionFailed = 0x83, |
| 143 | ipmiCCCanNotActivateWithEncrption = 0x83, |
| 144 | ipmiCCCanNotActivateWithoutEncryption = 0x84, |
| 145 | ipmiCCInvalidChecksum = 0x85, |
| 146 | ipmiCCNoCabledPCIEPortsAvailable = 0xC2, |
| 147 | |
| 148 | }; |
| 149 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 150 | enum class IPMIReturnCodeExt |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 151 | { |
| 152 | ipmiCCInvalidLUN = 0xC2, |
| 153 | ipmiCCTimeout = 0xC3, |
| 154 | ipmiCCStorageLeak = 0xC4, |
| 155 | ipmiCCRequestDataTruncated = 0xC6, |
| 156 | ipmiCCRequestDataFieldLengthLimitExceeded = 0xC8, |
| 157 | ipmiCCCanNotReturnNumberOfRequestedDataBytes = 0xCA, |
| 158 | ipmiCCRequestSensorDataRecordNotFound = 0xCB, |
| 159 | ipmiCCDestinationUnavailable = 0xD3, |
| 160 | ipmiCCParamterNotSupportInPresentState = 0xD5, |
| 161 | }; |
| 162 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 163 | static constexpr const uint8_t maxBIOSIDLength = 0xFF; |
| 164 | static constexpr const uint8_t maxCPUNum = 4; |
Chalapathi | 899bfd1 | 2020-04-15 15:07:02 +0000 | [diff] [blame] | 165 | static constexpr const char* biosActiveObjPath = |
| 166 | "/xyz/openbmc_project/software/bios_active"; |
Yong Li | 2742b85 | 2019-12-16 14:55:11 +0800 | [diff] [blame] | 167 | static constexpr const char* biosVersionIntf = |
| 168 | "xyz.openbmc_project.Software.Version"; |
| 169 | static constexpr const char* biosVersionProp = "Version"; |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 170 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 171 | static constexpr const char* powerRestoreDelayObjPath = |
| 172 | "/xyz/openbmc_project/control/power_restore_delay"; |
| 173 | static constexpr const char* powerRestoreDelayIntf = |
| 174 | "xyz.openbmc_project.Control.Power.RestoreDelay"; |
| 175 | static constexpr const char* powerRestoreDelayProp = "PowerRestoreDelay"; |
| 176 | static constexpr const char* processorErrConfigObjPath = |
| 177 | "/xyz/openbmc_project/control/processor_error_config"; |
| 178 | static constexpr const char* processorErrConfigIntf = |
| 179 | "xyz.openbmc_project.Control.Processor.ErrConfig"; |
Jason M. Bills | b02bf09 | 2019-08-15 13:01:56 -0700 | [diff] [blame] | 180 | static constexpr const char* bmcResetDisablesPath = |
| 181 | "/xyz/openbmc_project/control/bmc_reset_disables"; |
| 182 | static constexpr const char* bmcResetDisablesIntf = |
| 183 | "xyz.openbmc_project.Control.ResetDisables"; |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 184 | |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 185 | static constexpr const char* postCodesObjPath = |
| 186 | "/xyz/openbmc_project/State/Boot/PostCode"; |
| 187 | static constexpr const char* postCodesIntf = |
| 188 | "xyz.openbmc_project.State.Boot.PostCode"; |
| 189 | |
Kuiying Wang | 45f0498 | 2018-12-26 09:23:08 +0800 | [diff] [blame] | 190 | static constexpr const char* identifyLEDObjPath = |
| 191 | "/xyz/openbmc_project/led/physical/identify"; |
| 192 | static constexpr const char* ledIntf = "xyz.openbmc_project.Led.Physical"; |
| 193 | static constexpr const char* statusAmberObjPath = |
| 194 | "/xyz/openbmc_project/led/physical/status_amber"; |
| 195 | static constexpr const char* statusGreenObjPath = |
| 196 | "/xyz/openbmc_project/led/physical/status_green"; |
| 197 | |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 198 | static constexpr const uint8_t noShutdownOnOCOT = 0; |
| 199 | static constexpr const uint8_t shutdownOnOCOT = 1; |
| 200 | static constexpr const uint8_t noShutdownPolicySupported = 0; |
| 201 | static constexpr const uint8_t shutdownPolicySupported = 1; |
| 202 | static constexpr const char* oemShutdownPolicyIntf = |
Yong Li | 0669d19 | 2019-05-06 14:01:46 +0800 | [diff] [blame] | 203 | "com.intel.Control.OCOTShutdownPolicy"; |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 204 | static constexpr const char* oemShutdownPolicyObjPath = |
Yong Li | 0669d19 | 2019-05-06 14:01:46 +0800 | [diff] [blame] | 205 | "/com/intel/control/ocotshutdown_policy_config"; |
| 206 | static constexpr const char* oemShutdownPolicyObjPathProp = "OCOTPolicy"; |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 207 | |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 208 | static constexpr const char* fwGetEnvCmd = "/sbin/fw_printenv"; |
| 209 | static constexpr const char* fwSetEnvCmd = "/sbin/fw_setenv"; |
| 210 | static constexpr const char* fwHostSerailCfgEnvName = "hostserialcfg"; |
| 211 | |
James Feist | 91244a6 | 2019-02-19 15:04:54 -0800 | [diff] [blame] | 212 | constexpr const char* settingsBusName = "xyz.openbmc_project.Settings"; |
| 213 | |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 214 | static constexpr const uint8_t getHostSerialCfgCmd = 0; |
| 215 | static constexpr const uint8_t setHostSerialCfgCmd = 1; |
| 216 | |
| 217 | // parameters: |
| 218 | // 0: host serial port 1 and 2 normal speed |
| 219 | // 1: host serial port 1 high spend, port 2 normal speed |
| 220 | // 2: host serial port 1 normal spend, port 2 high speed |
| 221 | // 3: host serial port 1 and 2 high speed |
| 222 | static constexpr const uint8_t HostSerialCfgParamMax = 3; |
Suryakanth Sekar | d509eb9 | 2018-11-15 17:44:11 +0530 | [diff] [blame] | 223 | static constexpr uint8_t ipmiDefaultUserId = 2; |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 224 | |
Jia, Chunhui | cc49b54 | 2019-03-20 15:41:07 +0800 | [diff] [blame] | 225 | static constexpr const uint8_t selEvtTargetMask = 0xF0; |
| 226 | static constexpr const uint8_t selEvtTargetShift = 4; |
| 227 | |
| 228 | static constexpr const uint8_t targetInstanceMask = 0x0E; |
| 229 | static constexpr const uint8_t targetInstanceShift = 1; |
| 230 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 231 | enum class IPMINetfnIntelOEMAppCmd |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 232 | { |
| 233 | mdrStatus = 0x20, |
| 234 | mdrComplete = 0x21, |
| 235 | mdrEvent = 0x22, |
| 236 | mdrRead = 0x23, |
| 237 | mdrWrite = 0x24, |
| 238 | mdrLock = 0x25, |
| 239 | mdr2AgentStatus = 0x30, |
| 240 | mdr2GetDir = 0x31, |
| 241 | mdr2GetDataInfo = 0x32, |
| 242 | mdr2LockData = 0x33, |
| 243 | mdr2UnlockData = 0x34, |
| 244 | mdr2GetDataBlock = 0x35, |
| 245 | mdr2SendDir = 0x38, |
| 246 | mdr2SendDataInfoOffer = 0x39, |
| 247 | mdr2SendDataInfo = 0x3a, |
| 248 | mdr2DataStart = 0x3b, |
| 249 | mdr2DataDone = 0x3c, |
| 250 | mdr2SendDataBlock = 0x3d, |
| 251 | }; |
| 252 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 253 | enum class OEMDevEntityType |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 254 | { |
| 255 | biosId, |
| 256 | devVer, |
| 257 | sdrVer, |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 258 | }; |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 259 | |
Jia, Chunhui | cc49b54 | 2019-03-20 15:41:07 +0800 | [diff] [blame] | 260 | enum class FWUpdateTarget : uint8_t |
| 261 | { |
| 262 | targetBMC = 0x0, |
| 263 | targetBIOS = 0x1, |
| 264 | targetME = 0x2, |
| 265 | targetOEMEWS = 0x4, |
| 266 | }; |
| 267 | |
Jason M. Bills | 42bd9c8 | 2019-06-28 16:39:34 -0700 | [diff] [blame] | 268 | enum class CPUStatus |
| 269 | { |
| 270 | disabled = 0x0, |
| 271 | enabled = 0x1, |
| 272 | notPresent = 0x3, |
| 273 | }; |
| 274 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 275 | #pragma pack(push, 1) |
| 276 | struct GUIDData |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 277 | { |
| 278 | uint8_t node1; |
| 279 | uint8_t node2; |
| 280 | uint8_t node3; |
| 281 | uint8_t node4; |
| 282 | uint8_t node5; |
| 283 | uint8_t node6; |
| 284 | uint8_t clock1; |
| 285 | uint8_t clock2; |
| 286 | uint8_t timeHigh1; |
| 287 | uint8_t timeHigh2; |
| 288 | uint8_t timeMid1; |
| 289 | uint8_t timeMid2; |
| 290 | uint8_t timeLow1; |
| 291 | uint8_t timeLow2; |
| 292 | uint8_t timeLow3; |
| 293 | uint8_t timeLow4; |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 294 | }; |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 295 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 296 | struct DeviceInfo |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 297 | { |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 298 | uint8_t biosIDLength; |
| 299 | uint8_t biosId[maxBIOSIDLength]; |
| 300 | }; |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 301 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 302 | struct SetPowerRestoreDelayReq |
| 303 | { |
| 304 | uint8_t byteMSB; |
| 305 | uint8_t byteLSB; |
| 306 | }; |
| 307 | |
| 308 | struct GetPowerRestoreDelayRes |
| 309 | { |
| 310 | uint8_t byteMSB; |
| 311 | uint8_t byteLSB; |
| 312 | }; |
| 313 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 314 | struct GetOemDeviceInfoRes |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 315 | { |
| 316 | uint8_t resDatalen; |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 317 | uint8_t data[maxBIOSIDLength]; |
| 318 | }; |
| 319 | |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 320 | struct GetOEMShutdownPolicyRes |
| 321 | { |
| 322 | uint8_t policy; |
| 323 | uint8_t policySupport; |
| 324 | }; |
Kuiying Wang | 45f0498 | 2018-12-26 09:23:08 +0800 | [diff] [blame] | 325 | |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 326 | struct CfgHostSerialReq |
| 327 | { |
| 328 | uint8_t command; |
| 329 | uint8_t parameter; |
| 330 | }; |
Kuiying Wang | 45f0498 | 2018-12-26 09:23:08 +0800 | [diff] [blame] | 331 | #pragma pack(pop) |
James Feist | 91244a6 | 2019-02-19 15:04:54 -0800 | [diff] [blame] | 332 | |
Zhu, Yunge | be560b0 | 2019-04-21 21:19:21 -0400 | [diff] [blame] | 333 | // |
| 334 | // Fault type enumeration |
| 335 | // |
| 336 | enum class RemoteFaultType |
| 337 | { |
| 338 | fan, // 0 |
| 339 | temperature, // 1 |
| 340 | power, // 2 |
| 341 | driveslot, // 3 |
| 342 | software, // 4 |
| 343 | memory, // 5 |
| 344 | max = 6 // 6 |
| 345 | }; |
| 346 | |
| 347 | // Enumeration for remote fault states as required by the HSC |
| 348 | // |
| 349 | enum class RemoteFaultState |
| 350 | { |
| 351 | // fault indicators |
| 352 | fanLEDs, |
| 353 | cpu1DimmLeds, |
| 354 | cpu2DimmLeds, |
| 355 | cpu3DimmLeds, |
| 356 | cpu4DimmLeds, |
| 357 | maxFaultState, |
| 358 | }; |
| 359 | |
| 360 | enum class DimmFaultType |
| 361 | { |
| 362 | cpu1cpu2Dimm, |
| 363 | cpu3cpu4Dimm, |
| 364 | maxFaultGroup, |
| 365 | }; |
| 366 | |
James Feist | 5f957ca | 2019-03-14 15:33:55 -0700 | [diff] [blame] | 367 | enum class setFscParamFlags : uint8_t |
| 368 | { |
| 369 | tcontrol = 0x1, |
| 370 | pwmOffset = 0x2, |
| 371 | maxPwm = 0x3, |
| 372 | cfm = 0x4 |
Jia, Chunhui | cc49b54 | 2019-03-20 15:41:07 +0800 | [diff] [blame] | 373 | }; |
Vernon Mauery | a3702c1 | 2019-05-22 13:20:59 -0700 | [diff] [blame] | 374 | |
James Feist | 63efafa | 2019-07-24 12:39:21 -0700 | [diff] [blame] | 375 | enum class dimmOffsetTypes : uint8_t |
| 376 | { |
| 377 | staticCltt = 0x0, |
| 378 | dimmPower = 0x2 |
| 379 | }; |
| 380 | |
Vernon Mauery | a3702c1 | 2019-05-22 13:20:59 -0700 | [diff] [blame] | 381 | // FIXME: this stuff needs to be rewritten |
| 382 | enum IPMI_INTEL_OEM_RETURN_CODES |
| 383 | { |
| 384 | IPMI_CC_OEM_PAYLOAD_ACTIVE = 0x80, |
| 385 | IPMI_CC_OEM_INVALID_PCIE_SLOTID = 0x80, |
| 386 | IPMI_CC_OEM_PARAMETER_NOT_SUPPORTED = 0x80, |
| 387 | IPMI_CC_OEM_PAYLOAD_ALREADY_DEACTIVATED = 0x80, |
| 388 | IPMI_CC_OEM_SET_IN_PROCESS = 0x81, |
| 389 | IPMI_CC_OEM_PAYLOAD_DISABLE = 0x81, |
| 390 | IPMI_CC_OEM_LOST_ARBITRATION = 0x81, |
| 391 | IPMI_CC_OEM_INVALID_CABLE_PORT_INDEX = 0x81, |
| 392 | IPMI_CC_OEM_HEALTH_STATUS_NOT_AVAILABLE = 0x81, |
| 393 | IPMI_CC_OEM_BUS_ERROR = 0x82, |
| 394 | IPMI_CC_OEM_READ_ONLY = 0x82, |
| 395 | IPMI_CC_OEM_WRITE_ONLY = 0x82, |
| 396 | IPMI_CC_OEM_NO_CABLE_PRESENT = 0x82, |
| 397 | IPMI_CC_OEM_DATA_COLLECTION_IN_PROGRESS = 0x82, |
| 398 | IPMI_CC_OEM_PAYLOAD_ACTIVATION_LIMIT_REACH = 0x82, |
| 399 | IPMI_CC_OEM_NACK_ON_WRITE = 0x83, |
| 400 | IPMI_CC_OEM_DATA_COLLECTION_FAILED = 0x83, |
| 401 | IPMI_CC_OEM_CAN_NOT_ACTIVATE_WITH_ENCRYPTION = 0x83, |
| 402 | IPMI_CC_OEM_CAN_NOT_ACTIVATE_WITHOUT_ENCRYPTION = 0x84, |
| 403 | IPMI_CC_OEM_INVALID_CHECKSUM = 0x85, |
| 404 | IPMI_CC_OEM_NO_CABLED_PCIE_PORTS_AVAILABLE = 0xC2, |
| 405 | }; |
| 406 | |
| 407 | enum IPMI_RETURN_CODE_EXT |
| 408 | { |
| 409 | IPMI_CC_INVALID_LUN = 0xC2, |
| 410 | IPMI_CC_STORGE_LEAK = 0xC4, |
| 411 | IPMI_CC_REQUEST_DATA_TRUNCATED = 0xC6, |
| 412 | IPMI_CC_REQUEST_DATA_FIELD_LENGTH_LIMIT_EXCEEDED = 0xC8, |
| 413 | IPMI_CC_CANNOT_RETURN_NUMBER_OF_REQUESTED_DATA_BYTES = 0xCA, |
| 414 | IPMI_CC_REQUEST_SENSOR_DATA_RECORD_NOT_FOUND = 0xCB, |
| 415 | IPMI_CC_DESTINATION_UNAVAILABLE = 0xD3, |
| 416 | IPMI_CC_PARAMETER_NOT_SUPPORT_IN_PRESENT_STATE = 0xD5, |
| 417 | }; |