blob: 87ef3a903b5f7cc06410c0c3769e9ad292fa1330 [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>
11#include <libpldm/file_io.h>
12#include <libpldm/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 Dixit49cfb132023-03-02 04:26:53 -0600120 error("File does not exist, path = {FILE_PATH}", "FILE_PATH",
121 path.string());
Deepak Kodihalli15211b42019-12-14 02:24:49 -0600122 encode_rw_file_memory_resp(instanceId, command, PLDM_ERROR, 0,
123 responsePtr);
124 return response;
125 }
George Liu83409572019-12-24 18:42:54 +0800126 pldm::utils::CustomFD fd(file);
Deepak Kodihalli15211b42019-12-14 02:24:49 -0600127
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530128 while (length > dma::maxSize)
129 {
Deepak Kodihalli15211b42019-12-14 02:24:49 -0600130 auto rc = intf->transferDataHost(fd(), offset, dma::maxSize, address,
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530131 upstream);
132 if (rc < 0)
133 {
Jinu Joy Thomas33705fd2019-07-02 16:03:05 +0530134 encode_rw_file_memory_resp(instanceId, command, PLDM_ERROR, 0,
135 responsePtr);
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530136 return response;
137 }
138
139 offset += dma::maxSize;
140 length -= dma::maxSize;
141 address += dma::maxSize;
142 }
143
Deepak Kodihalli15211b42019-12-14 02:24:49 -0600144 auto rc = intf->transferDataHost(fd(), offset, length, address, upstream);
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530145 if (rc < 0)
146 {
Jinu Joy Thomas33705fd2019-07-02 16:03:05 +0530147 encode_rw_file_memory_resp(instanceId, command, PLDM_ERROR, 0,
148 responsePtr);
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530149 return response;
150 }
151
Jinu Joy Thomas33705fd2019-07-02 16:03:05 +0530152 encode_rw_file_memory_resp(instanceId, command, PLDM_SUCCESS, origLength,
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530153 responsePtr);
154 return response;
155}
156
157} // namespace dma
158
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600159namespace oem_ibm
160{
Jayashankar Padathdb124362021-01-28 21:12:34 -0600161static constexpr auto dumpObjPath = "/xyz/openbmc_project/dump/resource/entry/";
162static constexpr auto resDumpEntry = "com.ibm.Dump.Entry.Resource";
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500163
164static constexpr auto certObjPath = "/xyz/openbmc_project/certs/ca/";
165static constexpr auto certAuthority =
166 "xyz.openbmc_project.PLDM.Provider.Certs.Authority.CSR";
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600167class Handler : public CmdHandler
168{
169 public:
Jayashankar Padathdb124362021-01-28 21:12:34 -0600170 Handler(oem_platform::Handler* oemPlatformHandler, int hostSockFd,
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930171 uint8_t hostEid, pldm::InstanceIdDb* instanceIdDb,
Sampa Misrac0c79482021-06-02 08:01:54 -0500172 pldm::requester::Handler<pldm::requester::Request>* handler) :
Jayashankar Padathdb124362021-01-28 21:12:34 -0600173 oemPlatformHandler(oemPlatformHandler),
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930174 hostSockFd(hostSockFd), hostEid(hostEid), instanceIdDb(instanceIdDb),
175 handler(handler)
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600176 {
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800177 handlers.emplace(
178 PLDM_READ_FILE_INTO_MEMORY,
179 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500180 return this->readFileIntoMemory(request, payloadLength);
181 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800182 handlers.emplace(
183 PLDM_WRITE_FILE_FROM_MEMORY,
184 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500185 return this->writeFileFromMemory(request, payloadLength);
186 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800187 handlers.emplace(
188 PLDM_WRITE_FILE_BY_TYPE_FROM_MEMORY,
189 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500190 return this->writeFileByTypeFromMemory(request, payloadLength);
191 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800192 handlers.emplace(
193 PLDM_READ_FILE_BY_TYPE_INTO_MEMORY,
194 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500195 return this->readFileByTypeIntoMemory(request, payloadLength);
196 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800197 handlers.emplace(
198 PLDM_READ_FILE_BY_TYPE,
199 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600200 return this->readFileByType(request, payloadLength);
201 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800202 handlers.emplace(
203 PLDM_WRITE_FILE_BY_TYPE,
204 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500205 return this->writeFileByType(request, payloadLength);
206 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800207 handlers.emplace(
208 PLDM_GET_FILE_TABLE,
209 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500210 return this->getFileTable(request, payloadLength);
211 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800212 handlers.emplace(
213 PLDM_READ_FILE,
214 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500215 return this->readFile(request, payloadLength);
216 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800217 handlers.emplace(
218 PLDM_WRITE_FILE,
219 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500220 return this->writeFile(request, payloadLength);
221 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800222 handlers.emplace(
223 PLDM_FILE_ACK,
224 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500225 return this->fileAck(request, payloadLength);
226 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800227 handlers.emplace(
228 PLDM_HOST_GET_ALERT_STATUS,
229 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500230 return this->getAlertStatus(request, payloadLength);
231 });
Delphine CC Chiud2e48992023-12-05 16:29:51 +0800232 handlers.emplace(
233 PLDM_NEW_FILE_AVAILABLE,
234 [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500235 return this->newFileAvailable(request, payloadLength);
236 });
Jayashankar Padathdb124362021-01-28 21:12:34 -0600237
Patrick Williams84b790c2022-07-22 19:26:56 -0500238 resDumpMatcher = std::make_unique<sdbusplus::bus::match_t>(
Jayashankar Padathdb124362021-01-28 21:12:34 -0600239 pldm::utils::DBusHandler::getBus(),
240 sdbusplus::bus::match::rules::interfacesAdded() +
241 sdbusplus::bus::match::rules::argNpath(0, dumpObjPath),
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930242 [this, hostSockFd, hostEid, instanceIdDb,
Patrick Williams84b790c2022-07-22 19:26:56 -0500243 handler](sdbusplus::message_t& msg) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500244 std::map<std::string,
245 std::map<std::string, std::variant<std::string, uint32_t>>>
246 interfaces;
247 sdbusplus::message::object_path path;
248 msg.read(path, interfaces);
249 std::string vspstring;
250 std::string password;
Jayashankar Padathdb124362021-01-28 21:12:34 -0600251
Patrick Williams6da4f912023-05-10 07:50:53 -0500252 for (auto& interface : interfaces)
253 {
254 if (interface.first == resDumpEntry)
Jayashankar Padathdb124362021-01-28 21:12:34 -0600255 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500256 for (const auto& property : interface.second)
Jayashankar Padathdb124362021-01-28 21:12:34 -0600257 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500258 if (property.first == "VSPString")
Jayashankar Padathdb124362021-01-28 21:12:34 -0600259 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500260 vspstring = std::get<std::string>(property.second);
Jayashankar Padathdb124362021-01-28 21:12:34 -0600261 }
Patrick Williams6da4f912023-05-10 07:50:53 -0500262 else if (property.first == "Password")
263 {
264 password = std::get<std::string>(property.second);
265 }
Jayashankar Padathdb124362021-01-28 21:12:34 -0600266 }
Patrick Williams6da4f912023-05-10 07:50:53 -0500267 dbusToFileHandlers
268 .emplace_back(
269 std::make_unique<
270 pldm::requester::oem_ibm::DbusToFileHandler>(
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930271 hostSockFd, hostEid, instanceIdDb, path,
Patrick Williams6da4f912023-05-10 07:50:53 -0500272 handler))
273 ->processNewResourceDump(vspstring, password);
274 break;
Jayashankar Padathdb124362021-01-28 21:12:34 -0600275 }
Patrick Williams6da4f912023-05-10 07:50:53 -0500276 }
Patrick Williamsa6756622023-10-20 11:19:15 -0500277 });
Patrick Williams84b790c2022-07-22 19:26:56 -0500278 vmiCertMatcher = std::make_unique<sdbusplus::bus::match_t>(
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500279 pldm::utils::DBusHandler::getBus(),
280 sdbusplus::bus::match::rules::interfacesAdded() +
281 sdbusplus::bus::match::rules::argNpath(0, certObjPath),
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930282 [this, hostSockFd, hostEid, instanceIdDb,
Patrick Williams84b790c2022-07-22 19:26:56 -0500283 handler](sdbusplus::message_t& msg) {
Patrick Williams6da4f912023-05-10 07:50:53 -0500284 std::map<std::string,
285 std::map<std::string, std::variant<std::string, uint32_t>>>
286 interfaces;
287 sdbusplus::message::object_path path;
288 msg.read(path, interfaces);
289 std::string csr;
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500290
Patrick Williams6da4f912023-05-10 07:50:53 -0500291 for (auto& interface : interfaces)
292 {
293 if (interface.first == certAuthority)
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500294 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500295 for (const auto& property : interface.second)
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500296 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500297 if (property.first == "CSR")
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500298 {
Patrick Williams6da4f912023-05-10 07:50:53 -0500299 csr = std::get<std::string>(property.second);
300 auto fileHandle =
301 sdbusplus::message::object_path(path)
302 .filename();
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500303
Patrick Williams6da4f912023-05-10 07:50:53 -0500304 dbusToFileHandlers
305 .emplace_back(
306 std::make_unique<pldm::requester::oem_ibm::
307 DbusToFileHandler>(
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930308 hostSockFd, hostEid, instanceIdDb, path,
309 handler))
Patrick Williams6da4f912023-05-10 07:50:53 -0500310 ->newCsrFileAvailable(csr, fileHandle);
311 break;
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500312 }
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500313 }
Patrick Williams6da4f912023-05-10 07:50:53 -0500314 break;
Varsha Kaverappa219ace92021-04-01 02:50:11 -0500315 }
Patrick Williams6da4f912023-05-10 07:50:53 -0500316 }
Patrick Williamsa6756622023-10-20 11:19:15 -0500317 });
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600318 }
Tom Joseph0c6d22c2019-06-26 09:58:41 +0530319
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600320 /** @brief Handler for readFileIntoMemory command
321 *
322 * @param[in] request - pointer to PLDM request payload
323 * @param[in] payloadLength - length of the message
324 *
325 * @return PLDM response message
326 */
327 Response readFileIntoMemory(const pldm_msg* request, size_t payloadLength);
Sampa Misra854e61f2019-08-22 04:36:47 -0500328
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600329 /** @brief Handler for writeFileIntoMemory command
330 *
331 * @param[in] request - pointer to PLDM request payload
332 * @param[in] payloadLength - length of the message
333 *
334 * @return PLDM response message
335 */
336 Response writeFileFromMemory(const pldm_msg* request, size_t payloadLength);
Sampa Misra854e61f2019-08-22 04:36:47 -0500337
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600338 /** @brief Handler for writeFileByTypeFromMemory command
339 *
340 * @param[in] request - pointer to PLDM request payload
341 * @param[in] payloadLength - length of the message
342 *
343 * @return PLDM response message
344 */
Deepak Kodihallif6d3a832019-11-19 07:00:29 -0600345
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600346 Response writeFileByTypeFromMemory(const pldm_msg* request,
347 size_t payloadLength);
Deepak Kodihalli75e02f82019-11-20 02:51:05 -0600348
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600349 /** @brief Handler for readFileByTypeIntoMemory command
350 *
351 * @param[in] request - pointer to PLDM request payload
352 * @param[in] payloadLength - length of the message
353 *
354 * @return PLDM response message
355 */
356 Response readFileByTypeIntoMemory(const pldm_msg* request,
357 size_t payloadLength);
vkaverap5b914c32019-06-30 22:23:54 -0500358
Sampa Misra18967162020-01-14 02:31:41 -0600359 /** @brief Handler for writeFileByType command
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600360 *
361 * @param[in] request - pointer to PLDM request payload
362 * @param[in] payloadLength - length of the message
363 *
364 * @return PLDM response message
365 */
366 Response readFileByType(const pldm_msg* request, size_t payloadLength);
vkaverap5b914c32019-06-30 22:23:54 -0500367
Sampa Misra18967162020-01-14 02:31:41 -0600368 Response writeFileByType(const pldm_msg* request, size_t payloadLength);
369
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600370 /** @brief Handler for GetFileTable command
371 *
372 * @param[in] request - pointer to PLDM request payload
373 * @param[in] payloadLength - length of the message payload
374 *
375 * @return PLDM response message
376 */
377 Response getFileTable(const pldm_msg* request, size_t payloadLength);
378
379 /** @brief Handler for readFile command
380 *
381 * @param[in] request - PLDM request msg
382 * @param[in] payloadLength - length of the message payload
383 *
384 * @return PLDM response message
385 */
386 Response readFile(const pldm_msg* request, size_t payloadLength);
387
388 /** @brief Handler for writeFile command
389 *
390 * @param[in] request - PLDM request msg
391 * @param[in] payloadLength - length of the message payload
392 *
393 * @return PLDM response message
394 */
395 Response writeFile(const pldm_msg* request, size_t payloadLength);
Deepak Kodihalli2da1bfe2019-12-14 08:28:09 -0600396
397 Response fileAck(const pldm_msg* request, size_t payloadLength);
George Liu89aad712020-03-12 13:34:51 +0800398
399 /** @brief Handler for getAlertStatus command
400 *
401 * @param[in] request - PLDM request msg
402 * @param[in] payloadLength - length of the message payload
403 *
404 * @return PLDM response message
405 */
406 Response getAlertStatus(const pldm_msg* request, size_t payloadLength);
Sampa Misra18967162020-01-14 02:31:41 -0600407
408 /** @brief Handler for newFileAvailable command
409 *
410 * @param[in] request - PLDM request msg
411 * @param[in] payloadLength - length of the message payload
412 *
413 * @return PLDM response message
414 */
415 Response newFileAvailable(const pldm_msg* request, size_t payloadLength);
Sampa Misraaea5dde2020-08-31 08:33:47 -0500416
417 private:
418 oem_platform::Handler* oemPlatformHandler;
Jayashankar Padathdb124362021-01-28 21:12:34 -0600419 int hostSockFd;
420 uint8_t hostEid;
Andrew Jefferya330b2f2023-05-04 14:55:37 +0930421 pldm::InstanceIdDb* instanceIdDb;
Jayashankar Padathdb124362021-01-28 21:12:34 -0600422 using DBusInterfaceAdded = std::vector<std::pair<
423 std::string,
424 std::vector<std::pair<std::string, std::variant<std::string>>>>>;
Sampa Misrac0c79482021-06-02 08:01:54 -0500425 std::unique_ptr<pldm::requester::oem_ibm::DbusToFileHandler>
426 dbusToFileHandler; //!< pointer to send request to Host
Patrick Williams84b790c2022-07-22 19:26:56 -0500427 std::unique_ptr<sdbusplus::bus::match_t>
Patrick Williams6da4f912023-05-10 07:50:53 -0500428 resDumpMatcher; //!< Pointer to capture the interface added signal
429 //!< for new resource dump
Patrick Williams84b790c2022-07-22 19:26:56 -0500430 std::unique_ptr<sdbusplus::bus::match_t>
Patrick Williams6da4f912023-05-10 07:50:53 -0500431 vmiCertMatcher; //!< Pointer to capture the interface added signal
432 //!< for new csr string
Sampa Misrac0c79482021-06-02 08:01:54 -0500433 /** @brief PLDM request handler */
434 pldm::requester::Handler<pldm::requester::Request>* handler;
435 std::vector<std::unique_ptr<pldm::requester::oem_ibm::DbusToFileHandler>>
436 dbusToFileHandlers;
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600437};
438
439} // namespace oem_ibm
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530440} // namespace responder
441} // namespace pldm