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 | |
Suryakanth Sekar | d509eb9 | 2018-11-15 17:44:11 +0530 | [diff] [blame] | 19 | #include <user_channel/user_layer.hpp> |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 20 | enum class IPMINetfnIntelOEMGeneralCmd |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 21 | { |
| 22 | cmdSetBIOSID = 0x26, |
| 23 | cmdGetOEMDeviceInfo = 0x27, |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 24 | cmdGetAICSlotFRUIDSlotPosRecords = 0x31, |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 25 | cmdSetSystemGUID = 0x41, |
Jia, Chunhui | cc49b54 | 2019-03-20 15:41:07 +0800 | [diff] [blame] | 26 | cmdSendEmbeddedFWUpdStatus = 0x44, |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 27 | cmdSetPowerRestoreDelay = 0x54, |
| 28 | cmdGetPowerRestoreDelay = 0x55, |
Zhu, Yunge | be560b0 | 2019-04-21 21:19:21 -0400 | [diff] [blame] | 29 | cmdSetFaultIndication = 0x57, |
Suryakanth Sekar | d509eb9 | 2018-11-15 17:44:11 +0530 | [diff] [blame] | 30 | cmdSetOEMUser2Activation = 0x5A, |
Richard Marian Thomaiyar | fc5e985 | 2019-04-14 15:06:27 +0530 | [diff] [blame] | 31 | cmdSetSpecialUserPassword = 0x5F, |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 32 | cmdSetShutdownPolicy = 0x60, |
| 33 | cmdGetShutdownPolicy = 0x62, |
James Feist | 91244a6 | 2019-02-19 15:04:54 -0800 | [diff] [blame] | 34 | cmdSetFanConfig = 0x89, |
| 35 | cmdGetFanConfig = 0x8a, |
James Feist | acc8a4e | 2019-04-02 14:23:57 -0700 | [diff] [blame] | 36 | cmdSetFanSpeedOffset = 0x8c, |
| 37 | cmdGetFanSpeedOffset = 0x8d, |
James Feist | 5f957ca | 2019-03-14 15:33:55 -0700 | [diff] [blame] | 38 | cmdSetFscParameter = 0x90, |
| 39 | cmdGetFscParameter = 0x91, |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 40 | cmdGetChassisIdentifier = 0x92, |
Richard Marian Thomaiyar | ea537d5 | 2019-04-24 21:33:48 +0530 | [diff] [blame] | 41 | cmdReadBaseBoardProductId = 0x93, |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 42 | cmdGetProcessorErrConfig = 0x9A, |
| 43 | cmdSetProcessorErrConfig = 0x9B, |
Kuiying Wang | 45f0498 | 2018-12-26 09:23:08 +0800 | [diff] [blame] | 44 | cmdGetLEDStatus = 0xB0, |
Chen Yugang | 39736d5 | 2019-07-12 16:24:33 +0800 | [diff] [blame] | 45 | cmdGetNmiStatus = 0xE5, |
| 46 | cmdSetNmiStatus = 0xED, |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 47 | }; |
| 48 | |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 49 | enum class IPMINetfnIntelOEMPlatformCmd |
| 50 | { |
| 51 | cmdCfgHostSerialPortSpeed = 0x90, |
| 52 | }; |
| 53 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 54 | enum class IPMIIntelOEMReturnCodes |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 55 | { |
| 56 | ipmiCCPayloadActive = 0x80, |
| 57 | ipmiCCInvalidPCIESlotID = 0x80, |
| 58 | ipmiCCParameterNotSupported = 0x80, |
| 59 | ipmiCCPayloadAlreadyDeactivated = 0x80, |
| 60 | ipmiCCSetInProcess = 0x81, |
| 61 | ipmiCCPayloadDisable = 0x81, |
| 62 | ipmiCCLostArbitration = 0x81, |
| 63 | ipmiCCInvalidCablePortIndex = 0x81, |
| 64 | ipmiCCHealthStatusNotAvailable = 0x81, |
| 65 | ipmiCCBusError = 0x82, |
| 66 | ipmiCCReadOnly = 0x82, |
| 67 | ipmiCCWriteOnly = 0x82, |
| 68 | ipmiCCNoCablePresent = 0x82, |
| 69 | ipmiCCDataCollectionInProgress = 0x82, |
| 70 | ipmiCCPayloadActivationLimitReached = 0x82, |
| 71 | ipmiCCNACKOnWrite = 0x83, |
| 72 | ipmiCCDataCollectionFailed = 0x83, |
| 73 | ipmiCCCanNotActivateWithEncrption = 0x83, |
| 74 | ipmiCCCanNotActivateWithoutEncryption = 0x84, |
| 75 | ipmiCCInvalidChecksum = 0x85, |
| 76 | ipmiCCNoCabledPCIEPortsAvailable = 0xC2, |
| 77 | |
| 78 | }; |
| 79 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 80 | enum class IPMIReturnCodeExt |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 81 | { |
| 82 | ipmiCCInvalidLUN = 0xC2, |
| 83 | ipmiCCTimeout = 0xC3, |
| 84 | ipmiCCStorageLeak = 0xC4, |
| 85 | ipmiCCRequestDataTruncated = 0xC6, |
| 86 | ipmiCCRequestDataFieldLengthLimitExceeded = 0xC8, |
| 87 | ipmiCCCanNotReturnNumberOfRequestedDataBytes = 0xCA, |
| 88 | ipmiCCRequestSensorDataRecordNotFound = 0xCB, |
| 89 | ipmiCCDestinationUnavailable = 0xD3, |
| 90 | ipmiCCParamterNotSupportInPresentState = 0xD5, |
| 91 | }; |
| 92 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 93 | constexpr const uint8_t netfunIntelAppOEM = 0x3E; |
| 94 | static constexpr ipmi_netfn_t netfnIntcOEMGeneral = |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 95 | NETFUN_NONE; // Netfun_none. In our platform, we use it as "intel oem |
| 96 | // general". The code is 0x30 |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 97 | |
| 98 | // Intel OEM Platform code is 0x32 |
| 99 | static constexpr ipmi_netfn_t netfnIntcOEMPlatform = NETFUN_OEM; |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 100 | static constexpr const uint8_t maxBIOSIDLength = 0xFF; |
| 101 | static constexpr const uint8_t maxCPUNum = 4; |
| 102 | static constexpr const char* biosObjPath = "/xyz/openbmc_project/bios"; |
| 103 | static constexpr const char* biosIntf = |
| 104 | "xyz.openbmc_project.Inventory.Item.Bios"; |
| 105 | static constexpr const char* biosProp = "BiosId"; |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 106 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 107 | static constexpr const char* powerRestoreDelayObjPath = |
| 108 | "/xyz/openbmc_project/control/power_restore_delay"; |
| 109 | static constexpr const char* powerRestoreDelayIntf = |
| 110 | "xyz.openbmc_project.Control.Power.RestoreDelay"; |
| 111 | static constexpr const char* powerRestoreDelayProp = "PowerRestoreDelay"; |
| 112 | static constexpr const char* processorErrConfigObjPath = |
| 113 | "/xyz/openbmc_project/control/processor_error_config"; |
| 114 | static constexpr const char* processorErrConfigIntf = |
| 115 | "xyz.openbmc_project.Control.Processor.ErrConfig"; |
| 116 | |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 117 | static constexpr const char* postCodesObjPath = |
| 118 | "/xyz/openbmc_project/State/Boot/PostCode"; |
| 119 | static constexpr const char* postCodesIntf = |
| 120 | "xyz.openbmc_project.State.Boot.PostCode"; |
| 121 | |
Kuiying Wang | 45f0498 | 2018-12-26 09:23:08 +0800 | [diff] [blame] | 122 | static constexpr const char* identifyLEDObjPath = |
| 123 | "/xyz/openbmc_project/led/physical/identify"; |
| 124 | static constexpr const char* ledIntf = "xyz.openbmc_project.Led.Physical"; |
| 125 | static constexpr const char* statusAmberObjPath = |
| 126 | "/xyz/openbmc_project/led/physical/status_amber"; |
| 127 | static constexpr const char* statusGreenObjPath = |
| 128 | "/xyz/openbmc_project/led/physical/status_green"; |
| 129 | |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 130 | static constexpr const uint8_t noShutdownOnOCOT = 0; |
| 131 | static constexpr const uint8_t shutdownOnOCOT = 1; |
| 132 | static constexpr const uint8_t noShutdownPolicySupported = 0; |
| 133 | static constexpr const uint8_t shutdownPolicySupported = 1; |
| 134 | static constexpr const char* oemShutdownPolicyIntf = |
Yong Li | 0669d19 | 2019-05-06 14:01:46 +0800 | [diff] [blame] | 135 | "com.intel.Control.OCOTShutdownPolicy"; |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 136 | static constexpr const char* oemShutdownPolicyObjPath = |
Yong Li | 0669d19 | 2019-05-06 14:01:46 +0800 | [diff] [blame] | 137 | "/com/intel/control/ocotshutdown_policy_config"; |
| 138 | static constexpr const char* oemShutdownPolicyObjPathProp = "OCOTPolicy"; |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 139 | |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 140 | static constexpr const char* fwGetEnvCmd = "/sbin/fw_printenv"; |
| 141 | static constexpr const char* fwSetEnvCmd = "/sbin/fw_setenv"; |
| 142 | static constexpr const char* fwHostSerailCfgEnvName = "hostserialcfg"; |
| 143 | |
James Feist | 91244a6 | 2019-02-19 15:04:54 -0800 | [diff] [blame] | 144 | constexpr const char* settingsBusName = "xyz.openbmc_project.Settings"; |
| 145 | |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 146 | static constexpr const uint8_t getHostSerialCfgCmd = 0; |
| 147 | static constexpr const uint8_t setHostSerialCfgCmd = 1; |
| 148 | |
| 149 | // parameters: |
| 150 | // 0: host serial port 1 and 2 normal speed |
| 151 | // 1: host serial port 1 high spend, port 2 normal speed |
| 152 | // 2: host serial port 1 normal spend, port 2 high speed |
| 153 | // 3: host serial port 1 and 2 high speed |
| 154 | static constexpr const uint8_t HostSerialCfgParamMax = 3; |
Suryakanth Sekar | d509eb9 | 2018-11-15 17:44:11 +0530 | [diff] [blame] | 155 | static constexpr uint8_t ipmiDefaultUserId = 2; |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 156 | |
Jia, Chunhui | cc49b54 | 2019-03-20 15:41:07 +0800 | [diff] [blame] | 157 | static constexpr const uint8_t selEvtTargetMask = 0xF0; |
| 158 | static constexpr const uint8_t selEvtTargetShift = 4; |
| 159 | |
| 160 | static constexpr const uint8_t targetInstanceMask = 0x0E; |
| 161 | static constexpr const uint8_t targetInstanceShift = 1; |
| 162 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 163 | enum class IPMINetfnIntelOEMAppCmd |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 164 | { |
| 165 | mdrStatus = 0x20, |
| 166 | mdrComplete = 0x21, |
| 167 | mdrEvent = 0x22, |
| 168 | mdrRead = 0x23, |
| 169 | mdrWrite = 0x24, |
| 170 | mdrLock = 0x25, |
| 171 | mdr2AgentStatus = 0x30, |
| 172 | mdr2GetDir = 0x31, |
| 173 | mdr2GetDataInfo = 0x32, |
| 174 | mdr2LockData = 0x33, |
| 175 | mdr2UnlockData = 0x34, |
| 176 | mdr2GetDataBlock = 0x35, |
| 177 | mdr2SendDir = 0x38, |
| 178 | mdr2SendDataInfoOffer = 0x39, |
| 179 | mdr2SendDataInfo = 0x3a, |
| 180 | mdr2DataStart = 0x3b, |
| 181 | mdr2DataDone = 0x3c, |
| 182 | mdr2SendDataBlock = 0x3d, |
| 183 | }; |
| 184 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 185 | enum class OEMDevEntityType |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 186 | { |
| 187 | biosId, |
| 188 | devVer, |
| 189 | sdrVer, |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 190 | }; |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 191 | |
Jia, Chunhui | cc49b54 | 2019-03-20 15:41:07 +0800 | [diff] [blame] | 192 | enum class FWUpdateTarget : uint8_t |
| 193 | { |
| 194 | targetBMC = 0x0, |
| 195 | targetBIOS = 0x1, |
| 196 | targetME = 0x2, |
| 197 | targetOEMEWS = 0x4, |
| 198 | }; |
| 199 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 200 | #pragma pack(push, 1) |
| 201 | struct GUIDData |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 202 | { |
| 203 | uint8_t node1; |
| 204 | uint8_t node2; |
| 205 | uint8_t node3; |
| 206 | uint8_t node4; |
| 207 | uint8_t node5; |
| 208 | uint8_t node6; |
| 209 | uint8_t clock1; |
| 210 | uint8_t clock2; |
| 211 | uint8_t timeHigh1; |
| 212 | uint8_t timeHigh2; |
| 213 | uint8_t timeMid1; |
| 214 | uint8_t timeMid2; |
| 215 | uint8_t timeLow1; |
| 216 | uint8_t timeLow2; |
| 217 | uint8_t timeLow3; |
| 218 | uint8_t timeLow4; |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 219 | }; |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 220 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 221 | struct DeviceInfo |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 222 | { |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 223 | uint8_t biosIDLength; |
| 224 | uint8_t biosId[maxBIOSIDLength]; |
| 225 | }; |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 226 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 227 | struct SetPowerRestoreDelayReq |
| 228 | { |
| 229 | uint8_t byteMSB; |
| 230 | uint8_t byteLSB; |
| 231 | }; |
| 232 | |
| 233 | struct GetPowerRestoreDelayRes |
| 234 | { |
| 235 | uint8_t byteMSB; |
| 236 | uint8_t byteLSB; |
| 237 | }; |
| 238 | |
| 239 | struct GetOemDeviceInfoReq |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 240 | { |
| 241 | uint8_t entityType; |
| 242 | uint8_t countToRead; |
| 243 | uint8_t offset; |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 244 | }; |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 245 | |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 246 | struct GetOemDeviceInfoRes |
Jia, Chunhui | a835eaa | 2018-09-05 09:00:41 +0800 | [diff] [blame] | 247 | { |
| 248 | uint8_t resDatalen; |
Jason M. Bills | 6479604 | 2018-10-03 16:51:55 -0700 | [diff] [blame] | 249 | uint8_t data[maxBIOSIDLength]; |
| 250 | }; |
| 251 | |
| 252 | struct SetProcessorErrConfigReq |
| 253 | { |
| 254 | uint8_t resetCfg; // Reset Configuration |
| 255 | // [0]: CATERR Reset Enabled |
| 256 | // 0b: Disabled |
| 257 | // 1b: Enabled |
| 258 | // [1]: ERR2 Reset Enabled |
| 259 | // 0b: Disabled |
| 260 | // 1b: Enabled |
| 261 | // [7:2]: Reserved |
| 262 | uint8_t reserved; // Reserved |
| 263 | uint8_t |
| 264 | resetErrorOccurrenceCounts; // Reset Error Occurrence Counts |
| 265 | //[0]: Reset CPU Error Counts |
| 266 | // 0b: Keep CPU Error Counts |
| 267 | // 1b: Reset all CPU Error Counts to zero |
| 268 | //[7:1]: Reserved |
| 269 | }; |
| 270 | |
| 271 | struct GetProcessorErrConfigRes |
| 272 | { |
| 273 | uint8_t resetCfg; // Reset Configuration |
| 274 | // [0]: CATERR Reset Enabled |
| 275 | // 0b: Disabled |
| 276 | // 1b: Enabled |
| 277 | // [1]: ERR2 Reset Enabled |
| 278 | // 0b: Disabled |
| 279 | // 1b: Enabled |
| 280 | // [7:2]: Reserved |
| 281 | uint8_t reserved; // Reserved |
| 282 | char caterrStatus[maxCPUNum]; // for all CPUs including the non-legacy |
| 283 | // socket CPU CPU CATERR (Core Error) |
| 284 | // occurrence |
| 285 | // [5:0]: Error Occurrence Count |
| 286 | // [7:6]: CPU Status |
| 287 | // 00b: Disabled |
| 288 | // 01b: Enabled |
| 289 | // 11b: Not Present |
| 290 | }; |
Yong Li | 703922d | 2018-11-06 13:25:31 +0800 | [diff] [blame] | 291 | |
| 292 | struct GetOEMShutdownPolicyRes |
| 293 | { |
| 294 | uint8_t policy; |
| 295 | uint8_t policySupport; |
| 296 | }; |
Kuiying Wang | 45f0498 | 2018-12-26 09:23:08 +0800 | [diff] [blame] | 297 | |
James Feist | 91244a6 | 2019-02-19 15:04:54 -0800 | [diff] [blame] | 298 | struct SetFanConfigReq |
| 299 | { |
| 300 | uint8_t selectedProfile; |
| 301 | uint8_t flags; |
| 302 | // other parameters from previous generation are not supported |
| 303 | }; |
Yong Li | 23737fe | 2019-02-19 08:49:55 +0800 | [diff] [blame] | 304 | struct CfgHostSerialReq |
| 305 | { |
| 306 | uint8_t command; |
| 307 | uint8_t parameter; |
| 308 | }; |
Kuiying Wang | 45f0498 | 2018-12-26 09:23:08 +0800 | [diff] [blame] | 309 | #pragma pack(pop) |
James Feist | 91244a6 | 2019-02-19 15:04:54 -0800 | [diff] [blame] | 310 | |
Zhu, Yunge | be560b0 | 2019-04-21 21:19:21 -0400 | [diff] [blame] | 311 | // |
| 312 | // Fault type enumeration |
| 313 | // |
| 314 | enum class RemoteFaultType |
| 315 | { |
| 316 | fan, // 0 |
| 317 | temperature, // 1 |
| 318 | power, // 2 |
| 319 | driveslot, // 3 |
| 320 | software, // 4 |
| 321 | memory, // 5 |
| 322 | max = 6 // 6 |
| 323 | }; |
| 324 | |
| 325 | // Enumeration for remote fault states as required by the HSC |
| 326 | // |
| 327 | enum class RemoteFaultState |
| 328 | { |
| 329 | // fault indicators |
| 330 | fanLEDs, |
| 331 | cpu1DimmLeds, |
| 332 | cpu2DimmLeds, |
| 333 | cpu3DimmLeds, |
| 334 | cpu4DimmLeds, |
| 335 | maxFaultState, |
| 336 | }; |
| 337 | |
| 338 | enum class DimmFaultType |
| 339 | { |
| 340 | cpu1cpu2Dimm, |
| 341 | cpu3cpu4Dimm, |
| 342 | maxFaultGroup, |
| 343 | }; |
| 344 | |
James Feist | 91244a6 | 2019-02-19 15:04:54 -0800 | [diff] [blame] | 345 | enum class setFanProfileFlags : uint8_t |
| 346 | { |
| 347 | setFanProfile = 7, |
| 348 | setPerfAcousMode = 6, |
| 349 | // reserved [5:3] |
| 350 | performAcousSelect = 2 |
| 351 | // reserved [1:0] |
James Feist | 5f957ca | 2019-03-14 15:33:55 -0700 | [diff] [blame] | 352 | }; |
| 353 | |
| 354 | enum class setFscParamFlags : uint8_t |
| 355 | { |
| 356 | tcontrol = 0x1, |
| 357 | pwmOffset = 0x2, |
| 358 | maxPwm = 0x3, |
| 359 | cfm = 0x4 |
Jia, Chunhui | cc49b54 | 2019-03-20 15:41:07 +0800 | [diff] [blame] | 360 | }; |
Vernon Mauery | a3702c1 | 2019-05-22 13:20:59 -0700 | [diff] [blame] | 361 | |
| 362 | // FIXME: this stuff needs to be rewritten |
| 363 | enum IPMI_INTEL_OEM_RETURN_CODES |
| 364 | { |
| 365 | IPMI_CC_OEM_PAYLOAD_ACTIVE = 0x80, |
| 366 | IPMI_CC_OEM_INVALID_PCIE_SLOTID = 0x80, |
| 367 | IPMI_CC_OEM_PARAMETER_NOT_SUPPORTED = 0x80, |
| 368 | IPMI_CC_OEM_PAYLOAD_ALREADY_DEACTIVATED = 0x80, |
| 369 | IPMI_CC_OEM_SET_IN_PROCESS = 0x81, |
| 370 | IPMI_CC_OEM_PAYLOAD_DISABLE = 0x81, |
| 371 | IPMI_CC_OEM_LOST_ARBITRATION = 0x81, |
| 372 | IPMI_CC_OEM_INVALID_CABLE_PORT_INDEX = 0x81, |
| 373 | IPMI_CC_OEM_HEALTH_STATUS_NOT_AVAILABLE = 0x81, |
| 374 | IPMI_CC_OEM_BUS_ERROR = 0x82, |
| 375 | IPMI_CC_OEM_READ_ONLY = 0x82, |
| 376 | IPMI_CC_OEM_WRITE_ONLY = 0x82, |
| 377 | IPMI_CC_OEM_NO_CABLE_PRESENT = 0x82, |
| 378 | IPMI_CC_OEM_DATA_COLLECTION_IN_PROGRESS = 0x82, |
| 379 | IPMI_CC_OEM_PAYLOAD_ACTIVATION_LIMIT_REACH = 0x82, |
| 380 | IPMI_CC_OEM_NACK_ON_WRITE = 0x83, |
| 381 | IPMI_CC_OEM_DATA_COLLECTION_FAILED = 0x83, |
| 382 | IPMI_CC_OEM_CAN_NOT_ACTIVATE_WITH_ENCRYPTION = 0x83, |
| 383 | IPMI_CC_OEM_CAN_NOT_ACTIVATE_WITHOUT_ENCRYPTION = 0x84, |
| 384 | IPMI_CC_OEM_INVALID_CHECKSUM = 0x85, |
| 385 | IPMI_CC_OEM_NO_CABLED_PCIE_PORTS_AVAILABLE = 0xC2, |
| 386 | }; |
| 387 | |
| 388 | enum IPMI_RETURN_CODE_EXT |
| 389 | { |
| 390 | IPMI_CC_INVALID_LUN = 0xC2, |
| 391 | IPMI_CC_STORGE_LEAK = 0xC4, |
| 392 | IPMI_CC_REQUEST_DATA_TRUNCATED = 0xC6, |
| 393 | IPMI_CC_REQUEST_DATA_FIELD_LENGTH_LIMIT_EXCEEDED = 0xC8, |
| 394 | IPMI_CC_CANNOT_RETURN_NUMBER_OF_REQUESTED_DATA_BYTES = 0xCA, |
| 395 | IPMI_CC_REQUEST_SENSOR_DATA_RECORD_NOT_FOUND = 0xCB, |
| 396 | IPMI_CC_DESTINATION_UNAVAILABLE = 0xD3, |
| 397 | IPMI_CC_PARAMETER_NOT_SUPPORT_IN_PRESENT_STATE = 0xD5, |
| 398 | }; |
| 399 | |
| 400 | constexpr unsigned char NETFUN_INTEL_APP_OEM = 0x3E; |
| 401 | |
| 402 | enum IPMI_NETFN_INTEL_OEM_APP_CMD |
| 403 | { |
| 404 | MDR_STATUS = 0x20, |
| 405 | MDR_COMPLETE = 0x21, |
| 406 | MDR_EVENT = 0x22, |
| 407 | MDR_READ = 0x23, |
| 408 | MDR_WRITE = 0x24, |
| 409 | MDR_LOCK = 0x25, |
| 410 | MDRII_AGENT_STATUS = 0x30, |
| 411 | MDRII_GET_DIR = 0x31, |
| 412 | MDRII_GET_DATA_INFO = 0x32, |
| 413 | MDRII_LOCK_DATA = 0x33, |
| 414 | MDRII_UNLOCK_DATA = 0x34, |
| 415 | MDRII_GET_DATA_BLOCK = 0x35, |
| 416 | MDRII_SEND_DIR = 0x38, |
| 417 | MDRII_SEND_DATA_INFO_OFFER = 0x39, |
| 418 | MDRII_SEND_DATA_INFO = 0x3a, |
| 419 | MDRII_DATA_START = 0x3b, |
| 420 | MDRII_DATA_DONE = 0x3c, |
| 421 | MDRII_SEND_DATA_BLOCK = 0x3d, |
| 422 | }; |
| 423 | |
| 424 | enum class IPMINetFnIntelOemGeneralCmds |
| 425 | { |
| 426 | GetSmSignal = 0x14, |
| 427 | SetSmSignal = 0x15, |
| 428 | BmcControlServices = 0xC0, |
| 429 | SetSensorOverride = 0xEE, |
| 430 | }; |