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