Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 1 | |
| 2 | #include "platform.hpp" |
| 3 | |
Sampa Misra | aea5dde | 2020-08-31 08:33:47 -0500 | [diff] [blame] | 4 | #include "libpldm/entity.h" |
| 5 | #include "libpldm/state_set.h" |
| 6 | |
Tom Joseph | b70a196 | 2020-07-13 12:56:31 +0530 | [diff] [blame] | 7 | #include "common/types.hpp" |
Deepak Kodihalli | d130e1a | 2020-06-17 05:55:32 -0500 | [diff] [blame] | 8 | #include "common/utils.hpp" |
Tom Joseph | c4959c3 | 2020-04-20 19:50:16 +0530 | [diff] [blame] | 9 | #include "event_parser.hpp" |
Sampa Misra | 12afe11 | 2020-05-25 11:40:44 -0500 | [diff] [blame] | 10 | #include "pdr.hpp" |
George Liu | 456c9a2 | 2020-01-13 11:36:22 +0800 | [diff] [blame] | 11 | #include "pdr_numeric_effecter.hpp" |
George Liu | a287072 | 2020-02-11 11:09:30 +0800 | [diff] [blame] | 12 | #include "pdr_state_effecter.hpp" |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 13 | #include "pdr_state_sensor.hpp" |
George Liu | 362c18d | 2020-05-14 09:46:36 +0800 | [diff] [blame] | 14 | #include "pdr_utils.hpp" |
George Liu | eccb0c5 | 2020-01-14 11:09:56 +0800 | [diff] [blame] | 15 | #include "platform_numeric_effecter.hpp" |
George Liu | 0d7aca8 | 2020-03-30 15:01:36 +0800 | [diff] [blame] | 16 | #include "platform_state_effecter.hpp" |
George Liu | 362c18d | 2020-05-14 09:46:36 +0800 | [diff] [blame] | 17 | #include "platform_state_sensor.hpp" |
George Liu | 8340957 | 2019-12-24 18:42:54 +0800 | [diff] [blame] | 18 | |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 19 | namespace pldm |
| 20 | { |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 21 | namespace responder |
| 22 | { |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 23 | namespace platform |
| 24 | { |
| 25 | |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 26 | using InternalFailure = |
| 27 | sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure; |
| 28 | |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 29 | static const Json empty{}; |
| 30 | |
George Liu | a287072 | 2020-02-11 11:09:30 +0800 | [diff] [blame] | 31 | void Handler::addDbusObjMaps( |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 32 | uint16_t id, |
| 33 | std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps> dbusObj, |
| 34 | TypeId typeId) |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 35 | { |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 36 | if (typeId == TypeId::PLDM_SENSOR_ID) |
| 37 | { |
| 38 | sensorDbusObjMaps.emplace(id, dbusObj); |
| 39 | } |
| 40 | else |
| 41 | { |
| 42 | effecterDbusObjMaps.emplace(id, dbusObj); |
| 43 | } |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 44 | } |
| 45 | |
George Liu | a287072 | 2020-02-11 11:09:30 +0800 | [diff] [blame] | 46 | const std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps>& |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 47 | Handler::getDbusObjMaps(uint16_t id, TypeId typeId) const |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 48 | { |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 49 | if (typeId == TypeId::PLDM_SENSOR_ID) |
| 50 | { |
| 51 | return sensorDbusObjMaps.at(id); |
| 52 | } |
| 53 | else |
| 54 | { |
| 55 | return effecterDbusObjMaps.at(id); |
| 56 | } |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 57 | } |
| 58 | |
George Liu | 36e8135 | 2020-07-01 14:40:30 +0800 | [diff] [blame] | 59 | void Handler::generate(const pldm::utils::DBusHandler& dBusIntf, |
| 60 | const std::string& dir, Repo& repo) |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 61 | { |
Deepak Kodihalli | c6e49c4 | 2020-07-01 03:39:27 -0500 | [diff] [blame] | 62 | if (!fs::exists(dir)) |
| 63 | { |
| 64 | return; |
| 65 | } |
| 66 | |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 67 | // A map of PDR type to a lambda that handles creation of that PDR type. |
| 68 | // The lambda essentially would parse the platform specific PDR JSONs to |
| 69 | // generate the PDR structures. This function iterates through the map to |
| 70 | // invoke all lambdas, so that all PDR types can be created. |
George Liu | a287072 | 2020-02-11 11:09:30 +0800 | [diff] [blame] | 71 | |
| 72 | const std::map<Type, generatePDR> generateHandlers = { |
| 73 | {PLDM_STATE_EFFECTER_PDR, |
George Liu | 36e8135 | 2020-07-01 14:40:30 +0800 | [diff] [blame] | 74 | [this](const DBusHandler& dBusIntf, const auto& json, |
| 75 | RepoInterface& repo) { |
| 76 | pdr_state_effecter::generateStateEffecterPDR< |
| 77 | pldm::utils::DBusHandler, Handler>(dBusIntf, json, *this, |
| 78 | repo); |
George Liu | 456c9a2 | 2020-01-13 11:36:22 +0800 | [diff] [blame] | 79 | }}, |
| 80 | {PLDM_NUMERIC_EFFECTER_PDR, |
George Liu | 36e8135 | 2020-07-01 14:40:30 +0800 | [diff] [blame] | 81 | [this](const DBusHandler& dBusIntf, const auto& json, |
| 82 | RepoInterface& repo) { |
| 83 | pdr_numeric_effecter::generateNumericEffecterPDR< |
| 84 | pldm::utils::DBusHandler, Handler>(dBusIntf, json, *this, |
| 85 | repo); |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 86 | }}, |
| 87 | {PLDM_STATE_SENSOR_PDR, [this](const DBusHandler& dBusIntf, |
| 88 | const auto& json, RepoInterface& repo) { |
| 89 | pdr_state_sensor::generateStateSensorPDR<pldm::utils::DBusHandler, |
| 90 | Handler>(dBusIntf, json, |
| 91 | *this, repo); |
George Liu | a287072 | 2020-02-11 11:09:30 +0800 | [diff] [blame] | 92 | }}}; |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 93 | |
| 94 | Type pdrType{}; |
| 95 | for (const auto& dirEntry : fs::directory_iterator(dir)) |
| 96 | { |
| 97 | try |
| 98 | { |
| 99 | auto json = readJson(dirEntry.path().string()); |
| 100 | if (!json.empty()) |
| 101 | { |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 102 | auto effecterPDRs = json.value("effecterPDRs", empty); |
| 103 | for (const auto& effecter : effecterPDRs) |
| 104 | { |
| 105 | pdrType = effecter.value("pdrType", 0); |
George Liu | 36e8135 | 2020-07-01 14:40:30 +0800 | [diff] [blame] | 106 | generateHandlers.at(pdrType)(dBusIntf, effecter, repo); |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 107 | } |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 108 | |
| 109 | auto sensorPDRs = json.value("sensorPDRs", empty); |
| 110 | for (const auto& sensor : sensorPDRs) |
| 111 | { |
| 112 | pdrType = sensor.value("pdrType", 0); |
| 113 | generateHandlers.at(pdrType)(dBusIntf, sensor, repo); |
| 114 | } |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 115 | } |
| 116 | } |
| 117 | catch (const InternalFailure& e) |
| 118 | { |
| 119 | std::cerr << "PDR config directory does not exist or empty, TYPE= " |
| 120 | << pdrType << "PATH= " << dirEntry |
| 121 | << " ERROR=" << e.what() << "\n"; |
| 122 | } |
| 123 | catch (const Json::exception& e) |
| 124 | { |
| 125 | std::cerr << "Failed parsing PDR JSON file, TYPE= " << pdrType |
| 126 | << " ERROR=" << e.what() << "\n"; |
| 127 | pldm::utils::reportError( |
| 128 | "xyz.openbmc_project.bmc.pldm.InternalFailure"); |
| 129 | } |
| 130 | catch (const std::exception& e) |
| 131 | { |
| 132 | std::cerr << "Failed parsing PDR JSON file, TYPE= " << pdrType |
| 133 | << " ERROR=" << e.what() << "\n"; |
| 134 | pldm::utils::reportError( |
| 135 | "xyz.openbmc_project.bmc.pldm.InternalFailure"); |
| 136 | } |
| 137 | } |
| 138 | } |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 139 | |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 140 | Response Handler::getPDR(const pldm_msg* request, size_t payloadLength) |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 141 | { |
Tom Joseph | 33e9c7e | 2020-06-11 22:09:52 +0530 | [diff] [blame] | 142 | // Build FRU table if not built, since entity association PDR's are built |
| 143 | // when the FRU table is constructed. |
| 144 | if (fruHandler) |
| 145 | { |
| 146 | fruHandler->buildFRUTable(); |
| 147 | } |
| 148 | |
George Liu | d680ae0 | 2020-07-17 09:11:14 +0800 | [diff] [blame] | 149 | if (!pdrCreated) |
| 150 | { |
| 151 | generateTerminusLocatorPDR(pdrRepo); |
| 152 | generate(*dBusIntf, pdrJsonsDir, pdrRepo); |
Sagar Srinivas | 78a225a | 2020-08-27 00:52:20 -0500 | [diff] [blame] | 153 | if (oemPlatformHandler != nullptr) |
| 154 | { |
| 155 | oemPlatformHandler->buildOEMPDR(pdrRepo); |
| 156 | } |
| 157 | |
George Liu | d680ae0 | 2020-07-17 09:11:14 +0800 | [diff] [blame] | 158 | pdrCreated = true; |
| 159 | } |
| 160 | |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 161 | Response response(sizeof(pldm_msg_hdr) + PLDM_GET_PDR_MIN_RESP_BYTES, 0); |
| 162 | auto responsePtr = reinterpret_cast<pldm_msg*>(response.data()); |
| 163 | |
| 164 | if (payloadLength != PLDM_GET_PDR_REQ_BYTES) |
| 165 | { |
George Liu | fb8611d | 2019-12-06 10:14:15 +0800 | [diff] [blame] | 166 | return CmdHandler::ccOnlyResponse(request, PLDM_ERROR_INVALID_LENGTH); |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 167 | } |
| 168 | |
| 169 | uint32_t recordHandle{}; |
| 170 | uint32_t dataTransferHandle{}; |
| 171 | uint8_t transferOpFlag{}; |
| 172 | uint16_t reqSizeBytes{}; |
| 173 | uint16_t recordChangeNum{}; |
| 174 | |
George Liu | fb8611d | 2019-12-06 10:14:15 +0800 | [diff] [blame] | 175 | auto rc = decode_get_pdr_req(request, payloadLength, &recordHandle, |
| 176 | &dataTransferHandle, &transferOpFlag, |
| 177 | &reqSizeBytes, &recordChangeNum); |
| 178 | if (rc != PLDM_SUCCESS) |
| 179 | { |
| 180 | return CmdHandler::ccOnlyResponse(request, rc); |
| 181 | } |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 182 | |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 183 | uint16_t respSizeBytes{}; |
| 184 | uint8_t* recordData = nullptr; |
| 185 | try |
| 186 | { |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 187 | pdr_utils::PdrEntry e; |
| 188 | auto record = pdr::getRecordByHandle(pdrRepo, recordHandle, e); |
| 189 | if (record == NULL) |
| 190 | { |
| 191 | return CmdHandler::ccOnlyResponse( |
| 192 | request, PLDM_PLATFORM_INVALID_RECORD_HANDLE); |
| 193 | } |
| 194 | |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 195 | if (reqSizeBytes) |
| 196 | { |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 197 | respSizeBytes = e.size; |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 198 | if (respSizeBytes > reqSizeBytes) |
| 199 | { |
| 200 | respSizeBytes = reqSizeBytes; |
| 201 | } |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 202 | recordData = e.data; |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 203 | } |
| 204 | response.resize(sizeof(pldm_msg_hdr) + PLDM_GET_PDR_MIN_RESP_BYTES + |
| 205 | respSizeBytes, |
| 206 | 0); |
| 207 | responsePtr = reinterpret_cast<pldm_msg*>(response.data()); |
Deepak Kodihalli | 22b5a7d | 2020-03-17 23:28:41 -0500 | [diff] [blame] | 208 | rc = encode_get_pdr_resp( |
| 209 | request->hdr.instance_id, PLDM_SUCCESS, e.handle.nextRecordHandle, |
| 210 | 0, PLDM_START_AND_END, respSizeBytes, recordData, 0, responsePtr); |
George Liu | fb8611d | 2019-12-06 10:14:15 +0800 | [diff] [blame] | 211 | if (rc != PLDM_SUCCESS) |
| 212 | { |
| 213 | return ccOnlyResponse(request, rc); |
| 214 | } |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 215 | } |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 216 | catch (const std::exception& e) |
| 217 | { |
Sampa Misra | aa8ae72 | 2019-12-12 03:20:40 -0600 | [diff] [blame] | 218 | std::cerr << "Error accessing PDR, HANDLE=" << recordHandle |
| 219 | << " ERROR=" << e.what() << "\n"; |
George Liu | fb8611d | 2019-12-06 10:14:15 +0800 | [diff] [blame] | 220 | return CmdHandler::ccOnlyResponse(request, PLDM_ERROR); |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 221 | } |
| 222 | return response; |
| 223 | } |
| 224 | |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 225 | Response Handler::setStateEffecterStates(const pldm_msg* request, |
| 226 | size_t payloadLength) |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 227 | { |
| 228 | Response response( |
| 229 | sizeof(pldm_msg_hdr) + PLDM_SET_STATE_EFFECTER_STATES_RESP_BYTES, 0); |
| 230 | auto responsePtr = reinterpret_cast<pldm_msg*>(response.data()); |
| 231 | uint16_t effecterId; |
| 232 | uint8_t compEffecterCnt; |
| 233 | constexpr auto maxCompositeEffecterCnt = 8; |
| 234 | std::vector<set_effecter_state_field> stateField(maxCompositeEffecterCnt, |
| 235 | {0, 0}); |
| 236 | |
| 237 | if ((payloadLength > PLDM_SET_STATE_EFFECTER_STATES_REQ_BYTES) || |
| 238 | (payloadLength < sizeof(effecterId) + sizeof(compEffecterCnt) + |
| 239 | sizeof(set_effecter_state_field))) |
| 240 | { |
George Liu | fb8611d | 2019-12-06 10:14:15 +0800 | [diff] [blame] | 241 | return CmdHandler::ccOnlyResponse(request, PLDM_ERROR_INVALID_LENGTH); |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 242 | } |
| 243 | |
| 244 | int rc = decode_set_state_effecter_states_req(request, payloadLength, |
| 245 | &effecterId, &compEffecterCnt, |
| 246 | stateField.data()); |
| 247 | |
George Liu | fb8611d | 2019-12-06 10:14:15 +0800 | [diff] [blame] | 248 | if (rc != PLDM_SUCCESS) |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 249 | { |
George Liu | fb8611d | 2019-12-06 10:14:15 +0800 | [diff] [blame] | 250 | return CmdHandler::ccOnlyResponse(request, rc); |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 251 | } |
| 252 | |
George Liu | fb8611d | 2019-12-06 10:14:15 +0800 | [diff] [blame] | 253 | stateField.resize(compEffecterCnt); |
| 254 | const pldm::utils::DBusHandler dBusIntf; |
Sampa Misra | aea5dde | 2020-08-31 08:33:47 -0500 | [diff] [blame] | 255 | uint16_t entityType{}; |
| 256 | uint16_t entityInstance{}; |
| 257 | uint16_t stateSetId{}; |
| 258 | |
| 259 | if (isOemStateEffecter(*this, effecterId, compEffecterCnt, entityType, |
| 260 | entityInstance, stateSetId) && |
| 261 | oemPlatformHandler != nullptr) |
| 262 | { |
Sampa Misra | 3a0e3b9 | 2020-10-21 05:58:00 -0500 | [diff] [blame] | 263 | rc = oemPlatformHandler->oemSetStateEffecterStatesHandler( |
Varsha Kaverappa | 3fbd39e | 2020-09-28 01:40:22 -0500 | [diff] [blame] | 264 | entityType, entityInstance, stateSetId, compEffecterCnt, stateField, |
| 265 | effecterId); |
Sampa Misra | aea5dde | 2020-08-31 08:33:47 -0500 | [diff] [blame] | 266 | } |
| 267 | else |
| 268 | { |
| 269 | rc = platform_state_effecter::setStateEffecterStatesHandler< |
| 270 | pldm::utils::DBusHandler, Handler>(dBusIntf, *this, effecterId, |
| 271 | stateField); |
| 272 | } |
George Liu | fb8611d | 2019-12-06 10:14:15 +0800 | [diff] [blame] | 273 | if (rc != PLDM_SUCCESS) |
| 274 | { |
| 275 | return CmdHandler::ccOnlyResponse(request, rc); |
| 276 | } |
| 277 | |
| 278 | rc = encode_set_state_effecter_states_resp(request->hdr.instance_id, rc, |
| 279 | responsePtr); |
| 280 | if (rc != PLDM_SUCCESS) |
| 281 | { |
| 282 | return ccOnlyResponse(request, rc); |
| 283 | } |
| 284 | |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 285 | return response; |
| 286 | } |
| 287 | |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 288 | Response Handler::platformEventMessage(const pldm_msg* request, |
| 289 | size_t payloadLength) |
| 290 | { |
| 291 | uint8_t formatVersion{}; |
| 292 | uint8_t tid{}; |
| 293 | uint8_t eventClass{}; |
| 294 | size_t offset{}; |
| 295 | |
| 296 | auto rc = decode_platform_event_message_req( |
| 297 | request, payloadLength, &formatVersion, &tid, &eventClass, &offset); |
| 298 | if (rc != PLDM_SUCCESS) |
| 299 | { |
| 300 | return CmdHandler::ccOnlyResponse(request, rc); |
| 301 | } |
| 302 | |
| 303 | try |
| 304 | { |
| 305 | const auto& handlers = eventHandlers.at(eventClass); |
| 306 | for (const auto& handler : handlers) |
| 307 | { |
| 308 | auto rc = |
| 309 | handler(request, payloadLength, formatVersion, tid, offset); |
| 310 | if (rc != PLDM_SUCCESS) |
| 311 | { |
| 312 | return CmdHandler::ccOnlyResponse(request, rc); |
| 313 | } |
| 314 | } |
| 315 | } |
| 316 | catch (const std::out_of_range& e) |
| 317 | { |
| 318 | return CmdHandler::ccOnlyResponse(request, PLDM_ERROR_INVALID_DATA); |
| 319 | } |
| 320 | |
| 321 | Response response( |
| 322 | sizeof(pldm_msg_hdr) + PLDM_PLATFORM_EVENT_MESSAGE_RESP_BYTES, 0); |
| 323 | auto responsePtr = reinterpret_cast<pldm_msg*>(response.data()); |
| 324 | |
| 325 | rc = encode_platform_event_message_resp(request->hdr.instance_id, rc, |
| 326 | PLDM_EVENT_NO_LOGGING, responsePtr); |
| 327 | if (rc != PLDM_SUCCESS) |
| 328 | { |
| 329 | return ccOnlyResponse(request, rc); |
| 330 | } |
| 331 | |
| 332 | return response; |
| 333 | } |
| 334 | |
| 335 | int Handler::sensorEvent(const pldm_msg* request, size_t payloadLength, |
Tom Joseph | c4959c3 | 2020-04-20 19:50:16 +0530 | [diff] [blame] | 336 | uint8_t /*formatVersion*/, uint8_t tid, |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 337 | size_t eventDataOffset) |
| 338 | { |
| 339 | uint16_t sensorId{}; |
| 340 | uint8_t eventClass{}; |
| 341 | size_t eventClassDataOffset{}; |
| 342 | auto eventData = |
| 343 | reinterpret_cast<const uint8_t*>(request->payload) + eventDataOffset; |
| 344 | auto eventDataSize = payloadLength - eventDataOffset; |
| 345 | |
| 346 | auto rc = decode_sensor_event_data(eventData, eventDataSize, &sensorId, |
| 347 | &eventClass, &eventClassDataOffset); |
| 348 | if (rc != PLDM_SUCCESS) |
| 349 | { |
| 350 | return rc; |
| 351 | } |
| 352 | |
Zahed Hossain | 75330f3 | 2020-03-24 02:15:03 -0500 | [diff] [blame] | 353 | auto eventClassData = reinterpret_cast<const uint8_t*>(request->payload) + |
| 354 | eventDataOffset + eventClassDataOffset; |
| 355 | auto eventClassDataSize = |
| 356 | payloadLength - eventDataOffset - eventClassDataOffset; |
| 357 | |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 358 | if (eventClass == PLDM_STATE_SENSOR_STATE) |
| 359 | { |
| 360 | uint8_t sensorOffset{}; |
| 361 | uint8_t eventState{}; |
| 362 | uint8_t previousEventState{}; |
| 363 | |
Zahed Hossain | 75330f3 | 2020-03-24 02:15:03 -0500 | [diff] [blame] | 364 | rc = decode_state_sensor_data(eventClassData, eventClassDataSize, |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 365 | &sensorOffset, &eventState, |
| 366 | &previousEventState); |
Zahed Hossain | 75330f3 | 2020-03-24 02:15:03 -0500 | [diff] [blame] | 367 | if (rc != PLDM_SUCCESS) |
| 368 | { |
| 369 | return PLDM_ERROR; |
| 370 | } |
| 371 | |
Chicago Duan | fe4d88b | 2020-06-12 16:44:13 +0800 | [diff] [blame] | 372 | // Emitting state sensor event signal |
| 373 | emitStateSensorEventSignal(tid, sensorId, sensorOffset, eventState, |
| 374 | previousEventState); |
| 375 | |
Tom Joseph | c4959c3 | 2020-04-20 19:50:16 +0530 | [diff] [blame] | 376 | // If there are no HOST PDR's, there is no further action |
| 377 | if (hostPDRHandler == NULL) |
| 378 | { |
| 379 | return PLDM_SUCCESS; |
| 380 | } |
| 381 | |
| 382 | // Handle PLDM events for which PDR is available |
| 383 | SensorEntry sensorEntry{tid, sensorId}; |
Tom Joseph | b70a196 | 2020-07-13 12:56:31 +0530 | [diff] [blame] | 384 | |
| 385 | pldm::pdr::EntityInfo entityInfo{}; |
| 386 | pldm::pdr::CompositeSensorStates compositeSensorStates{}; |
| 387 | |
Tom Joseph | c4959c3 | 2020-04-20 19:50:16 +0530 | [diff] [blame] | 388 | try |
| 389 | { |
Tom Joseph | b70a196 | 2020-07-13 12:56:31 +0530 | [diff] [blame] | 390 | std::tie(entityInfo, compositeSensorStates) = |
Tom Joseph | c4959c3 | 2020-04-20 19:50:16 +0530 | [diff] [blame] | 391 | hostPDRHandler->lookupSensorInfo(sensorEntry); |
Tom Joseph | c4959c3 | 2020-04-20 19:50:16 +0530 | [diff] [blame] | 392 | } |
Tom Joseph | c4959c3 | 2020-04-20 19:50:16 +0530 | [diff] [blame] | 393 | catch (const std::out_of_range& e) |
| 394 | { |
Tom Joseph | b70a196 | 2020-07-13 12:56:31 +0530 | [diff] [blame] | 395 | // If there is no mapping for tid, sensorId combination, try |
| 396 | // PLDM_TID_RESERVED, sensorId for terminus that is yet to |
| 397 | // implement TL PDR. |
| 398 | try |
| 399 | { |
| 400 | sensorEntry.terminusID = PLDM_TID_RESERVED; |
| 401 | std::tie(entityInfo, compositeSensorStates) = |
| 402 | hostPDRHandler->lookupSensorInfo(sensorEntry); |
| 403 | } |
| 404 | // If there is no mapping for events return PLDM_SUCCESS |
| 405 | catch (const std::out_of_range& e) |
| 406 | { |
| 407 | return PLDM_SUCCESS; |
| 408 | } |
Zahed Hossain | 75330f3 | 2020-03-24 02:15:03 -0500 | [diff] [blame] | 409 | } |
Tom Joseph | b70a196 | 2020-07-13 12:56:31 +0530 | [diff] [blame] | 410 | |
| 411 | if (sensorOffset >= compositeSensorStates.size()) |
| 412 | { |
| 413 | return PLDM_ERROR_INVALID_DATA; |
| 414 | } |
| 415 | |
| 416 | const auto& possibleStates = compositeSensorStates[sensorOffset]; |
| 417 | if (possibleStates.find(eventState) == possibleStates.end()) |
| 418 | { |
| 419 | return PLDM_ERROR_INVALID_DATA; |
| 420 | } |
| 421 | |
| 422 | const auto& [containerId, entityType, entityInstance] = entityInfo; |
| 423 | events::StateSensorEntry stateSensorEntry{containerId, entityType, |
| 424 | entityInstance, sensorOffset}; |
Pavithra Barithaya | 3aec997 | 2020-12-14 01:55:44 -0600 | [diff] [blame] | 425 | return hostPDRHandler->handleStateSensorEvent(stateSensorEntry, |
| 426 | eventState); |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 427 | } |
| 428 | else |
| 429 | { |
| 430 | return PLDM_ERROR_INVALID_DATA; |
| 431 | } |
| 432 | |
| 433 | return PLDM_SUCCESS; |
| 434 | } |
| 435 | |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 436 | int Handler::pldmPDRRepositoryChgEvent(const pldm_msg* request, |
| 437 | size_t payloadLength, |
| 438 | uint8_t /*formatVersion*/, |
| 439 | uint8_t /*tid*/, size_t eventDataOffset) |
| 440 | { |
| 441 | uint8_t eventDataFormat{}; |
| 442 | uint8_t numberOfChangeRecords{}; |
| 443 | size_t dataOffset{}; |
| 444 | |
| 445 | auto eventData = |
| 446 | reinterpret_cast<const uint8_t*>(request->payload) + eventDataOffset; |
| 447 | auto eventDataSize = payloadLength - eventDataOffset; |
| 448 | |
| 449 | auto rc = decode_pldm_pdr_repository_chg_event_data( |
| 450 | eventData, eventDataSize, &eventDataFormat, &numberOfChangeRecords, |
| 451 | &dataOffset); |
| 452 | if (rc != PLDM_SUCCESS) |
| 453 | { |
| 454 | return rc; |
| 455 | } |
| 456 | |
| 457 | PDRRecordHandles pdrRecordHandles; |
Deepak Kodihalli | 7246e0c | 2020-07-08 06:40:18 -0500 | [diff] [blame] | 458 | |
| 459 | if (eventDataFormat == FORMAT_IS_PDR_TYPES) |
| 460 | { |
| 461 | return PLDM_ERROR_INVALID_DATA; |
| 462 | } |
| 463 | |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 464 | if (eventDataFormat == FORMAT_IS_PDR_HANDLES) |
| 465 | { |
| 466 | uint8_t eventDataOperation{}; |
| 467 | uint8_t numberOfChangeEntries{}; |
| 468 | |
| 469 | auto changeRecordData = eventData + dataOffset; |
| 470 | auto changeRecordDataSize = eventDataSize - dataOffset; |
| 471 | |
| 472 | while (changeRecordDataSize) |
| 473 | { |
| 474 | rc = decode_pldm_pdr_repository_change_record_data( |
| 475 | changeRecordData, changeRecordDataSize, &eventDataOperation, |
| 476 | &numberOfChangeEntries, &dataOffset); |
| 477 | |
| 478 | if (rc != PLDM_SUCCESS) |
| 479 | { |
| 480 | return rc; |
| 481 | } |
| 482 | |
| 483 | if (eventDataOperation == PLDM_RECORDS_ADDED) |
| 484 | { |
| 485 | rc = getPDRRecordHandles( |
| 486 | reinterpret_cast<const ChangeEntry*>(changeRecordData + |
| 487 | dataOffset), |
| 488 | changeRecordDataSize - dataOffset, |
| 489 | static_cast<size_t>(numberOfChangeEntries), |
| 490 | pdrRecordHandles); |
| 491 | |
| 492 | if (rc != PLDM_SUCCESS) |
| 493 | { |
| 494 | return rc; |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | changeRecordData += |
| 499 | dataOffset + (numberOfChangeEntries * sizeof(ChangeEntry)); |
| 500 | changeRecordDataSize -= |
| 501 | dataOffset + (numberOfChangeEntries * sizeof(ChangeEntry)); |
| 502 | } |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 503 | } |
Deepak Kodihalli | 7246e0c | 2020-07-08 06:40:18 -0500 | [diff] [blame] | 504 | if (hostPDRHandler) |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 505 | { |
Deepak Kodihalli | 7246e0c | 2020-07-08 06:40:18 -0500 | [diff] [blame] | 506 | hostPDRHandler->fetchPDR(std::move(pdrRecordHandles)); |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 507 | } |
| 508 | |
| 509 | return PLDM_SUCCESS; |
| 510 | } |
| 511 | |
| 512 | int Handler::getPDRRecordHandles(const ChangeEntry* changeEntryData, |
| 513 | size_t changeEntryDataSize, |
| 514 | size_t numberOfChangeEntries, |
| 515 | PDRRecordHandles& pdrRecordHandles) |
| 516 | { |
| 517 | if (numberOfChangeEntries > (changeEntryDataSize / sizeof(ChangeEntry))) |
| 518 | { |
| 519 | return PLDM_ERROR_INVALID_DATA; |
| 520 | } |
| 521 | for (size_t i = 0; i < numberOfChangeEntries; i++) |
| 522 | { |
| 523 | pdrRecordHandles.push_back(changeEntryData[i]); |
| 524 | } |
| 525 | return PLDM_SUCCESS; |
| 526 | } |
| 527 | |
George Liu | eccb0c5 | 2020-01-14 11:09:56 +0800 | [diff] [blame] | 528 | Response Handler::setNumericEffecterValue(const pldm_msg* request, |
| 529 | size_t payloadLength) |
| 530 | { |
| 531 | Response response(sizeof(pldm_msg_hdr) + |
| 532 | PLDM_SET_NUMERIC_EFFECTER_VALUE_RESP_BYTES); |
| 533 | uint16_t effecterId{}; |
| 534 | uint8_t effecterDataSize{}; |
| 535 | uint8_t effecterValue[4] = {}; |
| 536 | |
| 537 | if ((payloadLength > sizeof(effecterId) + sizeof(effecterDataSize) + |
| 538 | sizeof(union_effecter_data_size)) || |
| 539 | (payloadLength < sizeof(effecterId) + sizeof(effecterDataSize) + 1)) |
| 540 | { |
| 541 | return ccOnlyResponse(request, PLDM_ERROR_INVALID_LENGTH); |
| 542 | } |
| 543 | |
| 544 | int rc = decode_set_numeric_effecter_value_req( |
| 545 | request, payloadLength, &effecterId, &effecterDataSize, |
| 546 | reinterpret_cast<uint8_t*>(&effecterValue)); |
| 547 | |
| 548 | if (rc == PLDM_SUCCESS) |
| 549 | { |
| 550 | const pldm::utils::DBusHandler dBusIntf; |
| 551 | rc = platform_numeric_effecter::setNumericEffecterValueHandler< |
| 552 | pldm::utils::DBusHandler, Handler>(dBusIntf, *this, effecterId, |
| 553 | effecterDataSize, effecterValue, |
| 554 | sizeof(effecterValue)); |
| 555 | } |
| 556 | |
| 557 | return ccOnlyResponse(request, rc); |
| 558 | } |
| 559 | |
Sampa Misra | 12afe11 | 2020-05-25 11:40:44 -0500 | [diff] [blame] | 560 | void Handler::generateTerminusLocatorPDR(Repo& repo) |
| 561 | { |
| 562 | std::vector<uint8_t> pdrBuffer(sizeof(pldm_terminus_locator_pdr)); |
| 563 | |
| 564 | auto pdr = reinterpret_cast<pldm_terminus_locator_pdr*>(pdrBuffer.data()); |
| 565 | |
| 566 | pdr->hdr.record_handle = 0; |
| 567 | pdr->hdr.version = 1; |
| 568 | pdr->hdr.type = PLDM_TERMINUS_LOCATOR_PDR; |
| 569 | pdr->hdr.record_change_num = 0; |
| 570 | pdr->hdr.length = sizeof(pldm_terminus_locator_pdr) - sizeof(pldm_pdr_hdr); |
| 571 | pdr->terminus_handle = BmcPldmTerminusHandle; |
| 572 | pdr->validity = PLDM_TL_PDR_VALID; |
| 573 | pdr->tid = BmcTerminusId; |
| 574 | pdr->container_id = 0x0; |
| 575 | pdr->terminus_locator_type = PLDM_TERMINUS_LOCATOR_TYPE_MCTP_EID; |
| 576 | pdr->terminus_locator_value_size = |
| 577 | sizeof(pldm_terminus_locator_type_mctp_eid); |
| 578 | auto locatorValue = reinterpret_cast<pldm_terminus_locator_type_mctp_eid*>( |
| 579 | pdr->terminus_locator_value); |
| 580 | locatorValue->eid = BmcMctpEid; |
| 581 | |
| 582 | PdrEntry pdrEntry{}; |
| 583 | pdrEntry.data = pdrBuffer.data(); |
| 584 | pdrEntry.size = pdrBuffer.size(); |
| 585 | repo.addRecord(pdrEntry); |
| 586 | } |
George Liu | 362c18d | 2020-05-14 09:46:36 +0800 | [diff] [blame] | 587 | |
| 588 | Response Handler::getStateSensorReadings(const pldm_msg* request, |
| 589 | size_t payloadLength) |
| 590 | { |
| 591 | uint16_t sensorId{}; |
| 592 | bitfield8_t sensorRearm{}; |
| 593 | uint8_t reserved{}; |
| 594 | |
| 595 | if (payloadLength != PLDM_GET_SENSOR_READING_REQ_BYTES) |
| 596 | { |
| 597 | return ccOnlyResponse(request, PLDM_ERROR_INVALID_LENGTH); |
| 598 | } |
| 599 | |
| 600 | int rc = decode_get_state_sensor_readings_req( |
| 601 | request, payloadLength, &sensorId, &sensorRearm, &reserved); |
| 602 | |
| 603 | if (rc != PLDM_SUCCESS) |
| 604 | { |
| 605 | return ccOnlyResponse(request, rc); |
| 606 | } |
| 607 | |
| 608 | // 0x01 to 0x08 |
Sampa Misra | aea5dde | 2020-08-31 08:33:47 -0500 | [diff] [blame] | 609 | uint8_t sensorRearmCount = getBitfieldCount(sensorRearm); |
| 610 | std::vector<get_sensor_state_field> stateField(sensorRearmCount); |
George Liu | 362c18d | 2020-05-14 09:46:36 +0800 | [diff] [blame] | 611 | uint8_t comSensorCnt{}; |
| 612 | const pldm::utils::DBusHandler dBusIntf; |
Sampa Misra | aea5dde | 2020-08-31 08:33:47 -0500 | [diff] [blame] | 613 | |
| 614 | uint16_t entityType{}; |
| 615 | uint16_t entityInstance{}; |
| 616 | uint16_t stateSetId{}; |
| 617 | |
| 618 | if (isOemStateSensor(*this, sensorId, sensorRearmCount, comSensorCnt, |
| 619 | entityType, entityInstance, stateSetId) && |
| 620 | oemPlatformHandler != nullptr) |
| 621 | { |
| 622 | rc = oemPlatformHandler->getOemStateSensorReadingsHandler( |
| 623 | entityType, entityInstance, stateSetId, comSensorCnt, stateField); |
| 624 | } |
| 625 | else |
| 626 | { |
| 627 | rc = platform_state_sensor::getStateSensorReadingsHandler< |
| 628 | pldm::utils::DBusHandler, Handler>(dBusIntf, *this, sensorId, |
| 629 | sensorRearmCount, comSensorCnt, |
| 630 | stateField); |
| 631 | } |
George Liu | 362c18d | 2020-05-14 09:46:36 +0800 | [diff] [blame] | 632 | |
| 633 | if (rc != PLDM_SUCCESS) |
| 634 | { |
| 635 | return ccOnlyResponse(request, rc); |
| 636 | } |
| 637 | |
| 638 | Response response(sizeof(pldm_msg_hdr) + |
| 639 | PLDM_GET_STATE_SENSOR_READINGS_MIN_RESP_BYTES + |
| 640 | sizeof(get_sensor_state_field) * comSensorCnt); |
| 641 | auto responsePtr = reinterpret_cast<pldm_msg*>(response.data()); |
| 642 | rc = encode_get_state_sensor_readings_resp(request->hdr.instance_id, rc, |
| 643 | comSensorCnt, stateField.data(), |
| 644 | responsePtr); |
| 645 | if (rc != PLDM_SUCCESS) |
| 646 | { |
| 647 | return ccOnlyResponse(request, rc); |
| 648 | } |
| 649 | |
| 650 | return response; |
| 651 | } |
| 652 | |
Sampa Misra | aea5dde | 2020-08-31 08:33:47 -0500 | [diff] [blame] | 653 | bool isOemStateSensor(Handler& handler, uint16_t sensorId, |
| 654 | uint8_t sensorRearmCount, uint8_t& compSensorCnt, |
| 655 | uint16_t& entityType, uint16_t& entityInstance, |
| 656 | uint16_t& stateSetId) |
| 657 | { |
| 658 | pldm_state_sensor_pdr* pdr = nullptr; |
| 659 | |
| 660 | std::unique_ptr<pldm_pdr, decltype(&pldm_pdr_destroy)> stateSensorPdrRepo( |
| 661 | pldm_pdr_init(), pldm_pdr_destroy); |
| 662 | Repo stateSensorPDRs(stateSensorPdrRepo.get()); |
| 663 | getRepoByType(handler.getRepo(), stateSensorPDRs, PLDM_STATE_SENSOR_PDR); |
| 664 | if (stateSensorPDRs.empty()) |
| 665 | { |
| 666 | std::cerr << "Failed to get record by PDR type\n"; |
| 667 | return false; |
| 668 | } |
| 669 | |
| 670 | PdrEntry pdrEntry{}; |
| 671 | auto pdrRecord = stateSensorPDRs.getFirstRecord(pdrEntry); |
| 672 | while (pdrRecord) |
| 673 | { |
| 674 | pdr = reinterpret_cast<pldm_state_sensor_pdr*>(pdrEntry.data); |
| 675 | assert(pdr != NULL); |
| 676 | if (pdr->sensor_id != sensorId) |
| 677 | { |
| 678 | pdr = nullptr; |
| 679 | pdrRecord = stateSensorPDRs.getNextRecord(pdrRecord, pdrEntry); |
| 680 | continue; |
| 681 | } |
| 682 | auto tmpEntityType = pdr->entity_type; |
| 683 | auto tmpEntityInstance = pdr->entity_instance; |
| 684 | auto tmpCompSensorCnt = pdr->composite_sensor_count; |
| 685 | auto tmpPossibleStates = |
| 686 | reinterpret_cast<state_sensor_possible_states*>( |
| 687 | pdr->possible_states); |
| 688 | auto tmpStateSetId = tmpPossibleStates->state_set_id; |
| 689 | |
| 690 | if (sensorRearmCount > tmpCompSensorCnt) |
| 691 | { |
| 692 | std::cerr << "The requester sent wrong sensorRearm" |
| 693 | << " count for the sensor, SENSOR_ID=" << sensorId |
| 694 | << "SENSOR_REARM_COUNT=" << (uint16_t)sensorRearmCount |
| 695 | << "\n"; |
| 696 | break; |
| 697 | } |
| 698 | |
| 699 | if ((tmpEntityType >= PLDM_OEM_ENTITY_TYPE_START && |
| 700 | tmpEntityType <= PLDM_OEM_ENTITY_TYPE_END) || |
| 701 | (tmpStateSetId >= PLDM_OEM_STATE_SET_ID_START && |
| 702 | tmpStateSetId < PLDM_OEM_STATE_SET_ID_END)) |
| 703 | { |
| 704 | entityType = tmpEntityType; |
| 705 | entityInstance = tmpEntityInstance; |
| 706 | stateSetId = tmpStateSetId; |
| 707 | compSensorCnt = tmpCompSensorCnt; |
| 708 | return true; |
| 709 | } |
| 710 | else |
| 711 | { |
| 712 | return false; |
| 713 | } |
| 714 | } |
| 715 | return false; |
| 716 | } |
| 717 | |
| 718 | bool isOemStateEffecter(Handler& handler, uint16_t effecterId, |
| 719 | uint8_t compEffecterCnt, uint16_t& entityType, |
| 720 | uint16_t& entityInstance, uint16_t& stateSetId) |
| 721 | { |
| 722 | pldm_state_effecter_pdr* pdr = nullptr; |
| 723 | |
| 724 | std::unique_ptr<pldm_pdr, decltype(&pldm_pdr_destroy)> stateEffecterPdrRepo( |
| 725 | pldm_pdr_init(), pldm_pdr_destroy); |
| 726 | Repo stateEffecterPDRs(stateEffecterPdrRepo.get()); |
| 727 | getRepoByType(handler.getRepo(), stateEffecterPDRs, |
| 728 | PLDM_STATE_EFFECTER_PDR); |
| 729 | if (stateEffecterPDRs.empty()) |
| 730 | { |
| 731 | std::cerr << "Failed to get record by PDR type\n"; |
| 732 | return false; |
| 733 | } |
| 734 | |
| 735 | PdrEntry pdrEntry{}; |
| 736 | auto pdrRecord = stateEffecterPDRs.getFirstRecord(pdrEntry); |
| 737 | while (pdrRecord) |
| 738 | { |
| 739 | pdr = reinterpret_cast<pldm_state_effecter_pdr*>(pdrEntry.data); |
| 740 | assert(pdr != NULL); |
| 741 | if (pdr->effecter_id != effecterId) |
| 742 | { |
| 743 | pdr = nullptr; |
| 744 | pdrRecord = stateEffecterPDRs.getNextRecord(pdrRecord, pdrEntry); |
| 745 | continue; |
| 746 | } |
| 747 | |
| 748 | auto tmpEntityType = pdr->entity_type; |
| 749 | auto tmpEntityInstance = pdr->entity_instance; |
| 750 | auto tmpPossibleStates = |
| 751 | reinterpret_cast<state_effecter_possible_states*>( |
| 752 | pdr->possible_states); |
| 753 | auto tmpStateSetId = tmpPossibleStates->state_set_id; |
| 754 | |
| 755 | if (compEffecterCnt > pdr->composite_effecter_count) |
| 756 | { |
| 757 | std::cerr << "The requester sent wrong composite effecter" |
| 758 | << " count for the effecter, EFFECTER_ID=" << effecterId |
| 759 | << "COMP_EFF_CNT=" << (uint16_t)compEffecterCnt << "\n"; |
| 760 | return false; |
| 761 | } |
| 762 | |
| 763 | if ((tmpEntityType >= PLDM_OEM_ENTITY_TYPE_START && |
| 764 | tmpEntityType <= PLDM_OEM_ENTITY_TYPE_END) || |
| 765 | (tmpStateSetId >= PLDM_OEM_STATE_SET_ID_START && |
| 766 | tmpStateSetId < PLDM_OEM_STATE_SET_ID_END)) |
| 767 | { |
| 768 | entityType = tmpEntityType; |
| 769 | entityInstance = tmpEntityInstance; |
| 770 | stateSetId = tmpStateSetId; |
| 771 | return true; |
| 772 | } |
| 773 | else |
| 774 | { |
| 775 | return false; |
| 776 | } |
| 777 | } |
| 778 | return false; |
| 779 | } |
| 780 | |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 781 | } // namespace platform |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 782 | } // namespace responder |
| 783 | } // namespace pldm |