Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 1 | #include "dbus_to_file_handler.hpp" |
| 2 | |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 3 | #include "common/utils.hpp" |
| 4 | |
Andrew Jeffery | 21f128d | 2024-01-15 15:34:26 +1030 | [diff] [blame] | 5 | #include <libpldm/oem/ibm/file_io.h> |
George Liu | c453e16 | 2022-12-21 17:16:23 +0800 | [diff] [blame] | 6 | |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 7 | #include <phosphor-logging/lg2.hpp> |
| 8 | |
| 9 | PHOSPHOR_LOG2_USING; |
| 10 | |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 11 | namespace pldm |
| 12 | { |
| 13 | namespace requester |
| 14 | { |
| 15 | namespace oem_ibm |
| 16 | { |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 17 | using namespace pldm::utils; |
| 18 | using namespace sdbusplus::bus::match::rules; |
| 19 | |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 20 | static constexpr auto resDumpProgressIntf = |
| 21 | "xyz.openbmc_project.Common.Progress"; |
| 22 | static constexpr auto resDumpStatus = |
| 23 | "xyz.openbmc_project.Common.Progress.OperationStatus.Failed"; |
| 24 | |
| 25 | DbusToFileHandler::DbusToFileHandler( |
Andrew Jeffery | fb8d194 | 2024-07-25 23:12:36 +0930 | [diff] [blame] | 26 | int /* mctp_fd */, uint8_t mctp_eid, pldm::InstanceIdDb* instanceIdDb, |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 27 | sdbusplus::message::object_path resDumpCurrentObjPath, |
| 28 | pldm::requester::Handler<pldm::requester::Request>* handler) : |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 29 | mctp_eid(mctp_eid), instanceIdDb(instanceIdDb), |
| 30 | resDumpCurrentObjPath(resDumpCurrentObjPath), handler(handler) |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 31 | {} |
| 32 | |
| 33 | void DbusToFileHandler::sendNewFileAvailableCmd(uint64_t fileSize) |
| 34 | { |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 35 | if (instanceIdDb == NULL) |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 36 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 37 | error( |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 38 | "Failed to send resource dump parameters as instance ID DB is not set"); |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 39 | pldm::utils::reportError( |
Manojkiran Eda | 92fb0b5 | 2024-04-17 10:48:17 +0530 | [diff] [blame] | 40 | "xyz.openbmc_project.bmc.pldm.InternalFailure"); |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 41 | return; |
| 42 | } |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 43 | auto instanceId = instanceIdDb->next(mctp_eid); |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 44 | std::vector<uint8_t> requestMsg( |
| 45 | sizeof(pldm_msg_hdr) + PLDM_NEW_FILE_REQ_BYTES); |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 46 | auto request = reinterpret_cast<pldm_msg*>(requestMsg.data()); |
| 47 | // Need to revisit this logic at the time of multiple resource dump support |
| 48 | uint32_t fileHandle = 1; |
| 49 | |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 50 | auto rc = |
| 51 | encode_new_file_req(instanceId, PLDM_FILE_TYPE_RESOURCE_DUMP_PARMS, |
| 52 | fileHandle, fileSize, request); |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 53 | if (rc != PLDM_SUCCESS) |
| 54 | { |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 55 | instanceIdDb->free(mctp_eid, instanceId); |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 56 | error("Failed to encode new file request with response code '{RC}'", |
| 57 | "RC", rc); |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 58 | return; |
| 59 | } |
| 60 | |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 61 | auto newFileAvailableRespHandler = [this](mctp_eid_t /*eid*/, |
| 62 | const pldm_msg* response, |
| 63 | size_t respMsgLen) { |
| 64 | if (response == nullptr || !respMsgLen) |
| 65 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 66 | error("Failed to receive response for NewFileAvailable command"); |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 67 | return; |
| 68 | } |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 69 | uint8_t completionCode{}; |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 70 | auto rc = decode_new_file_resp(response, respMsgLen, &completionCode); |
| 71 | if (rc || completionCode) |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 72 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 73 | error( |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 74 | "Failed to decode new file available response or remote terminus returned error, response code '{RC}' and completion code '{CC}'", |
Riya Dixit | 1e5c81e | 2024-05-03 07:54:00 -0500 | [diff] [blame] | 75 | "RC", rc, "CC", completionCode); |
Riya Dixit | 4f7eec8 | 2024-08-01 15:07:53 -0500 | [diff] [blame] | 76 | reportResourceDumpFailure("DecodeNewFileResp"); |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 77 | } |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 78 | }; |
| 79 | rc = handler->registerRequest( |
| 80 | mctp_eid, instanceId, PLDM_OEM, PLDM_NEW_FILE_AVAILABLE, |
| 81 | std::move(requestMsg), std::move(newFileAvailableRespHandler)); |
| 82 | if (rc) |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 83 | { |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 84 | error( |
| 85 | "Failed to send NewFileAvailable Request to Host, response code '{RC}'", |
| 86 | "RC", rc); |
Riya Dixit | 4f7eec8 | 2024-08-01 15:07:53 -0500 | [diff] [blame] | 87 | reportResourceDumpFailure("NewFileAvailableRequest"); |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 88 | } |
| 89 | } |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 90 | |
Riya Dixit | 4f7eec8 | 2024-08-01 15:07:53 -0500 | [diff] [blame] | 91 | void DbusToFileHandler::reportResourceDumpFailure(const std::string_view& str) |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 92 | { |
Riya Dixit | 4f7eec8 | 2024-08-01 15:07:53 -0500 | [diff] [blame] | 93 | std::string s = "xyz.openbmc_project.PLDM.Error.ReportResourceDumpFail."; |
| 94 | s += str; |
| 95 | |
| 96 | pldm::utils::reportError(s.c_str()); |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 97 | |
| 98 | PropertyValue value{resDumpStatus}; |
| 99 | DBusMapping dbusMapping{resDumpCurrentObjPath, resDumpProgressIntf, |
| 100 | "Status", "string"}; |
| 101 | try |
| 102 | { |
| 103 | pldm::utils::DBusHandler().setDbusProperty(dbusMapping, value); |
| 104 | } |
| 105 | catch (const std::exception& e) |
| 106 | { |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 107 | error("Failed to set resource dump operation status, error - {ERROR}", |
| 108 | "ERROR", e); |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 109 | } |
| 110 | } |
| 111 | |
| 112 | void DbusToFileHandler::processNewResourceDump( |
| 113 | const std::string& vspString, const std::string& resDumpReqPass) |
| 114 | { |
Jayashankar Padath | 99fa186 | 2021-11-10 09:45:06 -0600 | [diff] [blame] | 115 | try |
| 116 | { |
| 117 | std::string objPath = resDumpCurrentObjPath; |
| 118 | auto propVal = pldm::utils::DBusHandler().getDbusPropertyVariant( |
| 119 | objPath.c_str(), "Status", resDumpProgressIntf); |
| 120 | const auto& curResDumpStatus = std::get<ResDumpStatus>(propVal); |
| 121 | |
| 122 | if (curResDumpStatus != |
| 123 | "xyz.openbmc_project.Common.Progress.OperationStatus.InProgress") |
| 124 | { |
| 125 | return; |
| 126 | } |
| 127 | } |
| 128 | catch (const sdbusplus::exception_t& e) |
| 129 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 130 | error( |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 131 | "Error '{ERROR}' found in getting current resource dump status while initiating a new resource dump with object path '{PATH}' and interface {INTERFACE}", |
| 132 | "ERROR", e, "PATH", resDumpCurrentObjPath, "INTERFACE", |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 133 | resDumpProgressIntf); |
Jayashankar Padath | 99fa186 | 2021-11-10 09:45:06 -0600 | [diff] [blame] | 134 | } |
| 135 | |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 136 | namespace fs = std::filesystem; |
| 137 | const fs::path resDumpDirPath = "/var/lib/pldm/resourcedump"; |
| 138 | |
| 139 | if (!fs::exists(resDumpDirPath)) |
| 140 | { |
| 141 | fs::create_directories(resDumpDirPath); |
| 142 | } |
| 143 | |
| 144 | // Need to reconsider this logic to set the value as "1" when we have the |
| 145 | // support to handle multiple resource dumps |
| 146 | fs::path resDumpFilePath = resDumpDirPath / "1"; |
| 147 | |
| 148 | std::ofstream fileHandle; |
| 149 | fileHandle.open(resDumpFilePath, std::ios::out | std::ofstream::binary); |
| 150 | |
| 151 | if (!fileHandle) |
| 152 | { |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 153 | error("Failed to open resource dump file '{PATH}'", "PATH", |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 154 | resDumpFilePath); |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 155 | PropertyValue value{resDumpStatus}; |
| 156 | DBusMapping dbusMapping{resDumpCurrentObjPath, resDumpProgressIntf, |
| 157 | "Status", "string"}; |
| 158 | try |
| 159 | { |
| 160 | pldm::utils::DBusHandler().setDbusProperty(dbusMapping, value); |
| 161 | } |
| 162 | catch (const std::exception& e) |
| 163 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 164 | error( |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 165 | "Failed to set resource dump operation status, error - {ERROR}", |
| 166 | "ERROR", e); |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 167 | } |
| 168 | return; |
| 169 | } |
| 170 | |
| 171 | // Fill up the file with resource dump parameters and respective sizes |
| 172 | auto fileFunc = [&fileHandle](auto& paramBuf) { |
| 173 | uint32_t paramSize = paramBuf.size(); |
| 174 | fileHandle.write((char*)¶mSize, sizeof(paramSize)); |
| 175 | fileHandle << paramBuf; |
| 176 | }; |
| 177 | fileFunc(vspString); |
| 178 | fileFunc(resDumpReqPass); |
| 179 | |
Pavithra Barithaya | c047f80 | 2021-11-30 01:55:03 -0600 | [diff] [blame] | 180 | std::string str; |
| 181 | if (!resDumpReqPass.empty()) |
| 182 | { |
| 183 | str = getAcfFileContent(); |
| 184 | } |
| 185 | |
| 186 | fileFunc(str); |
| 187 | |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 188 | fileHandle.close(); |
| 189 | size_t fileSize = fs::file_size(resDumpFilePath); |
| 190 | |
| 191 | sendNewFileAvailableCmd(fileSize); |
| 192 | } |
| 193 | |
Pavithra Barithaya | c047f80 | 2021-11-30 01:55:03 -0600 | [diff] [blame] | 194 | std::string DbusToFileHandler::getAcfFileContent() |
| 195 | { |
| 196 | std::string str; |
| 197 | static constexpr auto acfDirPath = "/etc/acf/service.acf"; |
| 198 | if (fs::exists(acfDirPath)) |
| 199 | { |
| 200 | std::ifstream file; |
| 201 | file.open(acfDirPath); |
| 202 | std::stringstream acfBuf; |
| 203 | acfBuf << file.rdbuf(); |
| 204 | str = acfBuf.str(); |
| 205 | file.close(); |
| 206 | } |
| 207 | return str; |
| 208 | } |
| 209 | |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 210 | void DbusToFileHandler::newCsrFileAvailable(const std::string& csr, |
| 211 | const std::string fileHandle) |
| 212 | { |
| 213 | namespace fs = std::filesystem; |
| 214 | std::string dirPath = "/var/lib/ibm/bmcweb"; |
| 215 | const fs::path certDirPath = dirPath; |
| 216 | |
| 217 | if (!fs::exists(certDirPath)) |
| 218 | { |
| 219 | fs::create_directories(certDirPath); |
| 220 | fs::permissions(certDirPath, |
| 221 | fs::perms::others_read | fs::perms::owner_write); |
| 222 | } |
| 223 | |
| 224 | fs::path certFilePath = certDirPath / ("CSR_" + fileHandle); |
| 225 | std::ofstream certFile; |
| 226 | |
| 227 | certFile.open(certFilePath, std::ios::out | std::ofstream::binary); |
| 228 | |
| 229 | if (!certFile) |
| 230 | { |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 231 | error("Failed to open certificate file '{PATH}'", "PATH", certFilePath); |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 232 | return; |
| 233 | } |
| 234 | |
| 235 | // Add csr to file |
| 236 | certFile << csr << std::endl; |
| 237 | |
| 238 | certFile.close(); |
| 239 | uint32_t fileSize = fs::file_size(certFilePath); |
| 240 | |
| 241 | newFileAvailableSendToHost(fileSize, (uint32_t)stoi(fileHandle), |
| 242 | PLDM_FILE_TYPE_CERT_SIGNING_REQUEST); |
| 243 | } |
| 244 | |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 245 | void DbusToFileHandler::newFileAvailableSendToHost( |
| 246 | const uint32_t fileSize, const uint32_t fileHandle, const uint16_t type) |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 247 | { |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 248 | if (instanceIdDb == NULL) |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 249 | { |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 250 | error("Failed to send csr to remote terminus."); |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 251 | pldm::utils::reportError( |
Manojkiran Eda | 92fb0b5 | 2024-04-17 10:48:17 +0530 | [diff] [blame] | 252 | "xyz.openbmc_project.bmc.pldm.InternalFailure"); |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 253 | return; |
| 254 | } |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 255 | auto instanceId = instanceIdDb->next(mctp_eid); |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 256 | std::vector<uint8_t> requestMsg( |
| 257 | sizeof(pldm_msg_hdr) + PLDM_NEW_FILE_REQ_BYTES); |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 258 | auto request = reinterpret_cast<pldm_msg*>(requestMsg.data()); |
| 259 | |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 260 | auto rc = |
| 261 | encode_new_file_req(instanceId, type, fileHandle, fileSize, request); |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 262 | if (rc != PLDM_SUCCESS) |
| 263 | { |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 264 | instanceIdDb->free(mctp_eid, instanceId); |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 265 | error("Failed to encode new file request with response code '{RC}'", |
| 266 | "RC", rc); |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 267 | return; |
| 268 | } |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 269 | auto newFileAvailableRespHandler = [](mctp_eid_t /*eid*/, |
| 270 | const pldm_msg* response, |
| 271 | size_t respMsgLen) { |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 272 | if (response == nullptr || !respMsgLen) |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 273 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 274 | error( |
| 275 | "Failed to receive response for NewFileAvailable command for vmi"); |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 276 | return; |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 277 | } |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 278 | uint8_t completionCode{}; |
| 279 | auto rc = decode_new_file_resp(response, respMsgLen, &completionCode); |
| 280 | if (rc || completionCode) |
| 281 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 282 | error( |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 283 | "Failed to decode new file available response for vmi or remote terminus returned error, response code '{RC}' and completion code '{CC}'", |
Riya Dixit | 1e5c81e | 2024-05-03 07:54:00 -0500 | [diff] [blame] | 284 | "RC", rc, "CC", completionCode); |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 285 | pldm::utils::reportError( |
Riya Dixit | 4f7eec8 | 2024-08-01 15:07:53 -0500 | [diff] [blame] | 286 | "xyz.openbmc_project.PLDM.Error.DecodeNewFileResponseFail"); |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 287 | } |
| 288 | }; |
| 289 | rc = handler->registerRequest( |
| 290 | mctp_eid, instanceId, PLDM_OEM, PLDM_NEW_FILE_AVAILABLE, |
| 291 | std::move(requestMsg), std::move(newFileAvailableRespHandler)); |
| 292 | if (rc) |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 293 | { |
Riya Dixit | fc84f63 | 2024-04-06 14:00:02 -0500 | [diff] [blame] | 294 | error( |
| 295 | "Failed to send NewFileAvailable Request to Host for vmi, response code '{RC}'", |
| 296 | "RC", rc); |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 297 | pldm::utils::reportError( |
Riya Dixit | 4f7eec8 | 2024-08-01 15:07:53 -0500 | [diff] [blame] | 298 | "xyz.openbmc_project.PLDM.Error.NewFileAvailableRequestFail"); |
Varsha Kaverappa | 219ace9 | 2021-04-01 02:50:11 -0500 | [diff] [blame] | 299 | } |
| 300 | } |
| 301 | |
Jayashankar Padath | db12436 | 2021-01-28 21:12:34 -0600 | [diff] [blame] | 302 | } // namespace oem_ibm |
| 303 | } // namespace requester |
| 304 | } // namespace pldm |