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