blob: e455583469e771f973fa4eced82390ef52d89671 [file] [log] [blame]
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +05301#pragma once
2
Deepak Kodihallid130e1a2020-06-17 05:55:32 -05003#include "common/utils.hpp"
Jayashankar Padathdb124362021-01-28 21:12:34 -06004#include "oem/ibm/requester/dbus_to_file_handler.hpp"
Sampa Misraaea5dde2020-08-31 08:33:47 -05005#include "oem_ibm_handler.hpp"
Deepak Kodihalli1521f6d2020-06-16 08:51:02 -05006#include "pldmd/handler.hpp"
Sampa Misrac0c79482021-06-02 08:01:54 -05007#include "requester/handler.hpp"
Deepak Kodihallibc669f12019-11-28 08:52:07 -06008
Deepak Kodihalli15211b42019-12-14 02:24:49 -06009#include <fcntl.h>
George Liuc453e162022-12-21 17:16:23 +080010#include <libpldm/base.h>
Andrew Jeffery21f128d2024-01-15 15:34:26 +103011#include <libpldm/oem/ibm/file_io.h>
12#include <libpldm/oem/ibm/host.h>
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053013#include <stdint.h>
Deepak Kodihalli15211b42019-12-14 02:24:49 -060014#include <sys/stat.h>
15#include <sys/types.h>
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053016#include <unistd.h>
17
Riya Dixit49cfb132023-03-02 04:26:53 -060018#include <phosphor-logging/lg2.hpp>
19
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053020#include <filesystem>
Deepak Kodihalli15211b42019-12-14 02:24:49 -060021#include <iostream>
Priyanga8b976652019-06-27 11:30:33 -050022#include <vector>
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053023
Riya Dixit49cfb132023-03-02 04:26:53 -060024PHOSPHOR_LOG2_USING;
25
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053026namespace pldm
27{
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053028namespace responder
29{
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053030namespace dma
31{
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053032// The minimum data size of dma transfer in bytes
33constexpr uint32_t minSize = 16;
34
Deepak Kodihalli4c164b02020-03-07 03:23:31 -060035constexpr size_t maxSize = DMA_MAXSIZE;
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053036
37namespace fs = std::filesystem;
38
39/**
40 * @class DMA
41 *
42 * Expose API to initiate transfer of data by DMA
43 *
44 * This class only exposes the public API transferDataHost to transfer data
45 * between BMC and host using DMA. This allows for mocking the transferDataHost
46 * for unit testing purposes.
47 */
48class DMA
49{
50 public:
51 /** @brief API to transfer data between BMC and host using DMA
52 *
53 * @param[in] path - pathname of the file to transfer data from or to
54 * @param[in] offset - offset in the file
55 * @param[in] length - length of the data to transfer
56 * @param[in] address - DMA address on the host
57 * @param[in] upstream - indicates direction of the transfer; true indicates
58 * transfer to the host
59 *
60 * @return returns 0 on success, negative errno on failure
61 */
Deepak Kodihalli15211b42019-12-14 02:24:49 -060062 int transferDataHost(int fd, uint32_t offset, uint32_t length,
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053063 uint64_t address, bool upstream);
Ravi Tejace1c96f2020-10-05 23:13:01 -050064
65 /** @brief API to transfer data on to unix socket from host using DMA
66 *
67 * @param[in] path - pathname of the file to transfer data from or to
68 * @param[in] length - length of the data to transfer
69 * @param[in] address - DMA address on the host
70 *
71 * @return returns 0 on success, negative errno on failure
72 */
73 int transferHostDataToSocket(int fd, uint32_t length, uint64_t address);
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053074};
75
76/** @brief Transfer the data between BMC and host using DMA.
77 *
78 * There is a max size for each DMA operation, transferAll API abstracts this
79 * and the requested length is broken down into multiple DMA operations if the
80 * length exceed max size.
81 *
82 * @tparam[in] T - DMA interface type
83 * @param[in] intf - interface passed to invoke DMA transfer
84 * @param[in] command - PLDM command
85 * @param[in] path - pathname of the file to transfer data from or to
86 * @param[in] offset - offset in the file
87 * @param[in] length - length of the data to transfer
88 * @param[in] address - DMA address on the host
89 * @param[in] upstream - indicates direction of the transfer; true indicates
90 * transfer to the host
Jinu Joy Thomas33705fd2019-07-02 16:03:05 +053091 * @param[in] instanceId - Message's instance id
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053092 * @return PLDM response message
93 */
94
95template <class DMAInterface>
96Response transferAll(DMAInterface* intf, uint8_t command, fs::path& path,
97 uint32_t offset, uint32_t length, uint64_t address,
Jinu Joy Thomas33705fd2019-07-02 16:03:05 +053098 bool upstream, uint8_t instanceId)
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053099{
100 uint32_t origLength = length;
101 Response response(sizeof(pldm_msg_hdr) + PLDM_RW_FILE_MEM_RESP_BYTES, 0);
102 auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
103
Deepak Kodihalli15211b42019-12-14 02:24:49 -0600104 int flags{};
105 if (upstream)
106 {
107 flags = O_RDONLY;
108 }
109 else if (fs::exists(path))
110 {
111 flags = O_RDWR;
112 }
113 else
114 {
115 flags = O_WRONLY;
116 }
117 int file = open(path.string().c_str(), flags);
118 if (file == -1)
119 {
Riya Dixitfc84f632024-04-06 14:00:02 -0500120 error("File at path '{PATH}' does not exist", "PATH", path.string());
Deepak Kodihalli15211b42019-12-14 02:24:49 -0600121 encode_rw_file_memory_resp(instanceId, command, PLDM_ERROR, 0,
122 responsePtr);
123 return response;
124 }
George Liu83409572019-12-24 18:42:54 +0800125 pldm::utils::CustomFD fd(file);
Deepak Kodihalli15211b42019-12-14 02:24:49 -0600126
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530127 while (length > dma::maxSize)
128 {
Deepak Kodihalli15211b42019-12-14 02:24:49 -0600129 auto rc = intf->transferDataHost(fd(), offset, dma::maxSize, address,
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530130 upstream);
131 if (rc < 0)
132 {
Jinu Joy Thomas33705fd2019-07-02 16:03:05 +0530133 encode_rw_file_memory_resp(instanceId, command, PLDM_ERROR, 0,
134 responsePtr);
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530135 return response;
136 }
137
138 offset += dma::maxSize;
139 length -= dma::maxSize;
140 address += dma::maxSize;
141 }
142
Deepak Kodihalli15211b42019-12-14 02:24:49 -0600143 auto rc = intf->transferDataHost(fd(), offset, length, address, upstream);
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530144 if (rc < 0)
145 {
Jinu Joy Thomas33705fd2019-07-02 16:03:05 +0530146 encode_rw_file_memory_resp(instanceId, command, PLDM_ERROR, 0,
147 responsePtr);
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530148 return response;
149 }
150
Jinu Joy Thomas33705fd2019-07-02 16:03:05 +0530151 encode_rw_file_memory_resp(instanceId, command, PLDM_SUCCESS, origLength,
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530152 responsePtr);
153 return response;
154}
155
156} // namespace dma
157
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600158namespace oem_ibm
159{
Jayashankar Padathdb124362021-01-28 21:12:34 -0600160static constexpr auto dumpObjPath = "/xyz/openbmc_project/dump/resource/entry/";
161static constexpr auto resDumpEntry = "com.ibm.Dump.Entry.Resource";
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500162
163static constexpr auto certObjPath = "/xyz/openbmc_project/certs/ca/";
164static constexpr auto certAuthority =
165 "xyz.openbmc_project.PLDM.Provider.Certs.Authority.CSR";
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600166class Handler : public CmdHandler
167{
168 public:
Jayashankar Padathdb124362021-01-28 21:12:34 -0600169 Handler(oem_platform::Handler* oemPlatformHandler, int hostSockFd,
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930170 uint8_t hostEid, pldm::InstanceIdDb* instanceIdDb,
Sampa Misrac0c79482021-06-02 08:01:54 -0500171 pldm::requester::Handler<pldm::requester::Request>* handler) :
Jayashankar Padathdb124362021-01-28 21:12:34 -0600172 oemPlatformHandler(oemPlatformHandler),
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930173 hostSockFd(hostSockFd), hostEid(hostEid), instanceIdDb(instanceIdDb),
174 handler(handler)
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600175 {
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800176 handlers.emplace(
177 PLDM_READ_FILE_INTO_MEMORY,
178 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500179 return this->readFileIntoMemory(request, payloadLength);
180 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800181 handlers.emplace(
182 PLDM_WRITE_FILE_FROM_MEMORY,
183 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500184 return this->writeFileFromMemory(request, payloadLength);
185 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800186 handlers.emplace(
187 PLDM_WRITE_FILE_BY_TYPE_FROM_MEMORY,
188 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500189 return this->writeFileByTypeFromMemory(request, payloadLength);
190 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800191 handlers.emplace(
192 PLDM_READ_FILE_BY_TYPE_INTO_MEMORY,
193 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500194 return this->readFileByTypeIntoMemory(request, payloadLength);
195 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800196 handlers.emplace(
197 PLDM_READ_FILE_BY_TYPE,
198 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600199 return this->readFileByType(request, payloadLength);
200 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800201 handlers.emplace(
202 PLDM_WRITE_FILE_BY_TYPE,
203 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500204 return this->writeFileByType(request, payloadLength);
205 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800206 handlers.emplace(
207 PLDM_GET_FILE_TABLE,
208 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500209 return this->getFileTable(request, payloadLength);
210 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800211 handlers.emplace(
212 PLDM_READ_FILE,
213 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500214 return this->readFile(request, payloadLength);
215 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800216 handlers.emplace(
217 PLDM_WRITE_FILE,
218 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500219 return this->writeFile(request, payloadLength);
220 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800221 handlers.emplace(
222 PLDM_FILE_ACK,
223 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500224 return this->fileAck(request, payloadLength);
225 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800226 handlers.emplace(
227 PLDM_HOST_GET_ALERT_STATUS,
228 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500229 return this->getAlertStatus(request, payloadLength);
230 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800231 handlers.emplace(
232 PLDM_NEW_FILE_AVAILABLE,
233 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500234 return this->newFileAvailable(request, payloadLength);
235 });
Jayashankar Padathdb124362021-01-28 21:12:34 -0600236
Patrick Williams84b790c2022-07-22 19:26:56 -0500237 resDumpMatcher = std::make_unique<sdbusplus::bus::match_t>(
Jayashankar Padathdb124362021-01-28 21:12:34 -0600238 pldm::utils::DBusHandler::getBus(),
239 sdbusplus::bus::match::rules::interfacesAdded() +
240 sdbusplus::bus::match::rules::argNpath(0, dumpObjPath),
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930241 [this, hostSockFd, hostEid, instanceIdDb,
Patrick Williams84b790c2022-07-22 19:26:56 -0500242 handler](sdbusplus::message_t& msg) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500243 std::map<std::string,
244 std::map<std::string, std::variant<std::string, uint32_t>>>
245 interfaces;
246 sdbusplus::message::object_path path;
247 msg.read(path, interfaces);
248 std::string vspstring;
249 std::string password;
Jayashankar Padathdb124362021-01-28 21:12:34 -0600250
Pavithra Barithaya15b94112024-04-10 02:42:12 -0500251 for (const auto& interface : interfaces)
Patrick Williams6da4f912023-05-10 07:50:53 -0500252 {
253 if (interface.first == resDumpEntry)
Jayashankar Padathdb124362021-01-28 21:12:34 -0600254 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500255 for (const auto& property : interface.second)
Jayashankar Padathdb124362021-01-28 21:12:34 -0600256 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500257 if (property.first == "VSPString")
Jayashankar Padathdb124362021-01-28 21:12:34 -0600258 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500259 vspstring = std::get<std::string>(property.second);
Jayashankar Padathdb124362021-01-28 21:12:34 -0600260 }
Patrick Williams6da4f912023-05-10 07:50:53 -0500261 else if (property.first == "Password")
262 {
263 password = std::get<std::string>(property.second);
264 }
Jayashankar Padathdb124362021-01-28 21:12:34 -0600265 }
Patrick Williams6da4f912023-05-10 07:50:53 -0500266 dbusToFileHandlers
267 .emplace_back(
268 std::make_unique<
269 pldm::requester::oem_ibm::DbusToFileHandler>(
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930270 hostSockFd, hostEid, instanceIdDb, path,
Patrick Williams6da4f912023-05-10 07:50:53 -0500271 handler))
272 ->processNewResourceDump(vspstring, password);
273 break;
Jayashankar Padathdb124362021-01-28 21:12:34 -0600274 }
Patrick Williams6da4f912023-05-10 07:50:53 -0500275 }
Patrick Williamsa6756622023-10-20 11:19:15 -0500276 });
Patrick Williams84b790c2022-07-22 19:26:56 -0500277 vmiCertMatcher = std::make_unique<sdbusplus::bus::match_t>(
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500278 pldm::utils::DBusHandler::getBus(),
279 sdbusplus::bus::match::rules::interfacesAdded() +
280 sdbusplus::bus::match::rules::argNpath(0, certObjPath),
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930281 [this, hostSockFd, hostEid, instanceIdDb,
Patrick Williams84b790c2022-07-22 19:26:56 -0500282 handler](sdbusplus::message_t& msg) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500283 std::map<std::string,
284 std::map<std::string, std::variant<std::string, uint32_t>>>
285 interfaces;
286 sdbusplus::message::object_path path;
287 msg.read(path, interfaces);
288 std::string csr;
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500289
Pavithra Barithaya15b94112024-04-10 02:42:12 -0500290 for (const auto& interface : interfaces)
Patrick Williams6da4f912023-05-10 07:50:53 -0500291 {
292 if (interface.first == certAuthority)
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500293 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500294 for (const auto& property : interface.second)
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500295 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500296 if (property.first == "CSR")
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500297 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500298 csr = std::get<std::string>(property.second);
299 auto fileHandle =
300 sdbusplus::message::object_path(path)
301 .filename();
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500302
Patrick Williams6da4f912023-05-10 07:50:53 -0500303 dbusToFileHandlers
304 .emplace_back(
305 std::make_unique<pldm::requester::oem_ibm::
306 DbusToFileHandler>(
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930307 hostSockFd, hostEid, instanceIdDb, path,
308 handler))
Patrick Williams6da4f912023-05-10 07:50:53 -0500309 ->newCsrFileAvailable(csr, fileHandle);
310 break;
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500311 }
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500312 }
Patrick Williams6da4f912023-05-10 07:50:53 -0500313 break;
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500314 }
Patrick Williams6da4f912023-05-10 07:50:53 -0500315 }
Patrick Williamsa6756622023-10-20 11:19:15 -0500316 });
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600317 }
Tom Joseph0c6d22c2019-06-26 09:58:41 +0530318
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600319 /** @brief Handler for readFileIntoMemory command
320 *
321 * @param[in] request - pointer to PLDM request payload
322 * @param[in] payloadLength - length of the message
323 *
324 * @return PLDM response message
325 */
326 Response readFileIntoMemory(const pldm_msg* request, size_t payloadLength);
Sampa Misra854e61f2019-08-22 04:36:47 -0500327
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600328 /** @brief Handler for writeFileIntoMemory command
329 *
330 * @param[in] request - pointer to PLDM request payload
331 * @param[in] payloadLength - length of the message
332 *
333 * @return PLDM response message
334 */
335 Response writeFileFromMemory(const pldm_msg* request, size_t payloadLength);
Sampa Misra854e61f2019-08-22 04:36:47 -0500336
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600337 /** @brief Handler for writeFileByTypeFromMemory command
338 *
339 * @param[in] request - pointer to PLDM request payload
340 * @param[in] payloadLength - length of the message
341 *
342 * @return PLDM response message
343 */
Deepak Kodihallif6d3a832019-11-19 07:00:29 -0600344
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600345 Response writeFileByTypeFromMemory(const pldm_msg* request,
346 size_t payloadLength);
Deepak Kodihalli75e02f82019-11-20 02:51:05 -0600347
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600348 /** @brief Handler for readFileByTypeIntoMemory command
349 *
350 * @param[in] request - pointer to PLDM request payload
351 * @param[in] payloadLength - length of the message
352 *
353 * @return PLDM response message
354 */
355 Response readFileByTypeIntoMemory(const pldm_msg* request,
356 size_t payloadLength);
vkaverap5b914c32019-06-30 22:23:54 -0500357
Sampa Misra18967162020-01-14 02:31:41 -0600358 /** @brief Handler for writeFileByType command
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600359 *
360 * @param[in] request - pointer to PLDM request payload
361 * @param[in] payloadLength - length of the message
362 *
363 * @return PLDM response message
364 */
365 Response readFileByType(const pldm_msg* request, size_t payloadLength);
vkaverap5b914c32019-06-30 22:23:54 -0500366
Sampa Misra18967162020-01-14 02:31:41 -0600367 Response writeFileByType(const pldm_msg* request, size_t payloadLength);
368
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600369 /** @brief Handler for GetFileTable command
370 *
371 * @param[in] request - pointer to PLDM request payload
372 * @param[in] payloadLength - length of the message payload
373 *
374 * @return PLDM response message
375 */
376 Response getFileTable(const pldm_msg* request, size_t payloadLength);
377
378 /** @brief Handler for readFile command
379 *
380 * @param[in] request - PLDM request msg
381 * @param[in] payloadLength - length of the message payload
382 *
383 * @return PLDM response message
384 */
385 Response readFile(const pldm_msg* request, size_t payloadLength);
386
387 /** @brief Handler for writeFile command
388 *
389 * @param[in] request - PLDM request msg
390 * @param[in] payloadLength - length of the message payload
391 *
392 * @return PLDM response message
393 */
394 Response writeFile(const pldm_msg* request, size_t payloadLength);
Deepak Kodihalli2da1bfe2019-12-14 08:28:09 -0600395
396 Response fileAck(const pldm_msg* request, size_t payloadLength);
George Liu89aad712020-03-12 13:34:51 +0800397
398 /** @brief Handler for getAlertStatus command
399 *
400 * @param[in] request - PLDM request msg
401 * @param[in] payloadLength - length of the message payload
402 *
403 * @return PLDM response message
404 */
405 Response getAlertStatus(const pldm_msg* request, size_t payloadLength);
Sampa Misra18967162020-01-14 02:31:41 -0600406
407 /** @brief Handler for newFileAvailable command
408 *
409 * @param[in] request - PLDM request msg
410 * @param[in] payloadLength - length of the message payload
411 *
412 * @return PLDM response message
413 */
414 Response newFileAvailable(const pldm_msg* request, size_t payloadLength);
Sampa Misraaea5dde2020-08-31 08:33:47 -0500415
416 private:
417 oem_platform::Handler* oemPlatformHandler;
Jayashankar Padathdb124362021-01-28 21:12:34 -0600418 int hostSockFd;
419 uint8_t hostEid;
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930420 pldm::InstanceIdDb* instanceIdDb;
Jayashankar Padathdb124362021-01-28 21:12:34 -0600421 using DBusInterfaceAdded = std::vector<std::pair<
422 std::string,
423 std::vector<std::pair<std::string, std::variant<std::string>>>>>;
Sampa Misrac0c79482021-06-02 08:01:54 -0500424 std::unique_ptr<pldm::requester::oem_ibm::DbusToFileHandler>
425 dbusToFileHandler; //!< pointer to send request to Host
Patrick Williams84b790c2022-07-22 19:26:56 -0500426 std::unique_ptr<sdbusplus::bus::match_t>
Patrick Williams6da4f912023-05-10 07:50:53 -0500427 resDumpMatcher; //!< Pointer to capture the interface added signal
428 //!< for new resource dump
Patrick Williams84b790c2022-07-22 19:26:56 -0500429 std::unique_ptr<sdbusplus::bus::match_t>
Patrick Williams6da4f912023-05-10 07:50:53 -0500430 vmiCertMatcher; //!< Pointer to capture the interface added signal
431 //!< for new csr string
Sampa Misrac0c79482021-06-02 08:01:54 -0500432 /** @brief PLDM request handler */
433 pldm::requester::Handler<pldm::requester::Request>* handler;
434 std::vector<std::unique_ptr<pldm::requester::oem_ibm::DbusToFileHandler>>
435 dbusToFileHandlers;
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600436};
437
438} // namespace oem_ibm
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530439} // namespace responder
440} // namespace pldm