/openbmc/pldm/requester/test/ |
H A D | mctp_endpoint_discovery_test.cpp | 16 static const pldm::Configurations& getConfigurations( in getConfigurations() 17 const pldm::MctpDiscovery& mctpDiscovery) in getConfigurations() 21 static void searchConfigurationFor(pldm::MctpDiscovery& mctpDiscovery, in searchConfigurationFor() 22 pldm::utils::DBusHandler& handler, in searchConfigurationFor() 23 pldm::MctpInfo& mctpInfo) in searchConfigurationFor() 31 auto& bus = pldm::utils::DBusHandler::getBus(); in TEST() 32 pldm::MockManager manager; in TEST() 36 auto mctpDiscoveryHandler = std::make_unique<pldm::MctpDiscovery>( in TEST() 37 bus, std::initializer_list<pldm::MctpDiscoveryHandlerIntf*>{&manager}); in TEST() 43 auto& bus = pldm::utils::DBusHandler::getBus(); in TEST() [all …]
|
/openbmc/pldm/pldmtool/ |
H A D | README.md | 3 pldmtool is a client tool that acts as a PLDM requester which runs on the BMC. 8 pldmtool supports the subcommands for PLDM types such as base, platform, bios, 12 - Consumes pldm/libpldm encode and decode functions. 14 - Enables writing functional test cases for PLDM stack. 16 please refer the [DMTF PLDM specifications](https://www.dmtf.org/) with respect 17 to the pldm types. 21 Source files in pldmtool repository are named with respect to the PLDM type. 29 pldmtool commands for corresponding PLDM type is constructed with the help of 30 encode request and decode response APIs which are implemented in pldm/libpldm. 34 Given a PLDM command "foo" of PLDM type "base" the pldmtool should consume [all …]
|
/openbmc/openbmc-test-automation/pldm/ |
H A D | test_pldm_base.robot | 3 Documentation Module to test PLDM base commands. 15 Verify Get PLDM Types 16 [Documentation] Verify supported PLDM types. 23 ${cmd}= Catenate ${pldm_output}[${i}][PLDM Type Code](${pldm_output}[${i}][PLDM Type]) 28 Verify Get PLDM Version For Base 29 [Documentation] Verify supported PLDM version for base type. 36 Verify Get PLDM Version For Platform 37 [Documentation] Verify supported PLDM version for platform type. 45 Verify Get PLDM Version For BIOS 46 [Documentation] Verify supported PLDM version for BIOS type. [all …]
|
/openbmc/docs/designs/ |
H A D | pldm-stack.md | 1 # PLDM stack on OpenBMC 16 This design aims to employ Platform Level Data Model (PLDM), a standard 17 application layer communication protocol defined by the DMTF. PLDM draws inputs 18 from IPMI, but it overcomes most of the latter's limitations. PLDM is also 21 channels, by defining hardware bindings. The solution of PLDM over MCTP also 24 PLDM's purpose is to enable all sorts of "inside the box communication": BMC - 30 PLDM is designed to be an effective interface and data model that provides 33 fan sensors can have a PLDM representation that can be used to monitor and 34 control the platform using a set of PLDM messages. PLDM defines data 37 PLDM groups commands under broader functions, and defines separate [all …]
|
/openbmc/libpldm/include/libpldm/ |
H A D | transport.h | 10 #include <libpldm/pldm.h> 17 * @brief Waits for a PLDM event. 19 * @pre The pldm transport instance must be initialised; otherwise, 34 * @brief Asynchronously send a PLDM message. Control is immediately returned to 37 * @pre The pldm transport instance must be initialised; otherwise, 42 * @param[in] ctx - pldm transport instance 43 * @param[in] tid - destination PLDM TID 44 * @param[in] pldm_msg - caller owned pointer to PLDM msg. If this is NULL, 46 * @param[in] msg_len - size of PLDM msg. If this is less than the minimum size 47 * of a PLDM msg PLDM_REQUESTER_NOT_REQ_MSG is returned. [all …]
|
H A D | base.h | 21 /** @brief PLDM Types 35 /** @brief PLDM Commands 50 /** @brief PLDM base codes 114 /** @brief PLDM transport protocol type 123 * The different message types supported by the PLDM specification. 126 PLDM_RESPONSE, //!< PLDM response 127 PLDM_REQUEST, //!< PLDM request 129 PLDM_ASYNC_REQUEST_NOTIFY, //!< Unacknowledged PLDM request messages 164 /** @brief Minimum length of response for a optional PLDM command 166 * For a optional PLDM command, the command handler might not be [all …]
|
/openbmc/pldm/requester/ |
H A D | README.md | 3 PLDM requester infrastructure enables the requester code in PLDM daemon to meet 4 the requirements of PLDM requesters. It provides the following features: 6 - Register a PLDM request and the response handler to be invoked on receiving 8 - The handling of the request and response is asynchronous. This means the PLDM 17 - Handle ERROR_NOT_READY completion code and retry the PLDM request after 250ms 20 The requester code needs to use the `registerRequest` API to register the PLDM 21 request. The destination endpoint ID, instance ID, PLDM type, PLDM command code, 22 PLDM request message (PLDM header and payload) and response function handler are 27 uint8_t command, pldm::Request&& requestMsg, 40 - If the response does not match with the PLDM instance ID, PLDM type and PLDM
|
H A D | request.hpp | 21 namespace pldm namespace 27 * The abstract base class for implementing the PLDM request retry logic. This 28 * class handles number of times the PLDM request needs to be retried if the 44 * @param[in] event - reference to PLDM daemon's main event loop 97 sdeventplus::Event& event; //!< reference to PLDM daemon's main event loop 103 /** @brief Sends the PLDM request message 126 * to send the PLDM request message over MCTP socket. 127 * This class encapsulates the PLDM request message, the number of times the 144 * @param[in] pldm_transport - PLDM transport object 147 * @param[in] event - reference to PLDM daemon's main event loop [all …]
|
/openbmc/pldm/docs/ |
H A D | code_flows.md | 5 ## BMC as PLDM responder 7 a) PLDM daemon receives PLDM request message from underlying transport (MCTP). 9 b) PLDM daemon routes message to message handler, based on the PLDM command. 22 f) The PLDM daemon sends the response message prepared at step e) to the remote 23 PLDM device. 25 ## BMC as PLDM requester 27 a) A BMC PLDM requester app prepares a PLDM request message. There would be 28 several requester apps (based on functionality/PLDM remote device). Each of them 32 b) BMC requester app requests PLDM daemon to send the request message to remote 33 PLDM device. [all …]
|
/openbmc/pldm/pldmd/ |
H A D | invoker.hpp | 10 namespace pldm namespace 21 /** @brief Register a handler for a PLDM Type 23 * @param[in] pldmType - PLDM type code 24 * @param[in] handler - PLDM Type handler 31 /** @brief Invoke a PLDM command handler 33 * @param[in] tid - PLDM request TID 34 * @param[in] pldmType - PLDM type code 35 * @param[in] pldmCommand - PLDM command code 36 * @param[in] request - PLDM request message 37 * @param[in] reqMsgLen - PLDM request message size [all …]
|
H A D | handler.hpp | 10 namespace pldm namespace 28 /** @brief Invoke a PLDM command handler 30 * @param[in] tid - PLDM request TID 31 * @param[in] pldmCommand - PLDM command code 32 * @param[in] request - PLDM request message 33 * @param[in] reqMsgLen - PLDM request message size 34 * @return PLDM response message 44 * @param[in] request - PLDM request message 46 * @return PLDM response message 60 /** @brief map of PLDM command code to handler - to be populated by derived [all …]
|
H A D | oem_ibm.hpp | 17 namespace pldm namespace 22 using namespace pldm::state_sensor; 23 using namespace pldm::dbus_api; 58 const pldm::utils::DBusHandler* dBusIntf, int mctp_fd, uint8_t mctp_eid, in OemIBM() 59 pldm_pdr* repo, pldm::InstanceIdDb& instanceIdDb, in OemIBM() 65 pldm::requester::Handler<pldm::requester::Request>* reqHandler) : in OemIBM() 99 codeUpdate = std::make_unique<pldm::responder::CodeUpdate>(dBusIntf); in createCodeUpdate() 107 std::make_unique<pldm::responder::SlotHandler>(event, repo); in createSlotHandler() 126 dynamic_cast<pldm::responder::oem_ibm_platform::Handler*>( in createOemIbmPlatformHandler() 146 oemIbmFruHandler = dynamic_cast<pldm::responder::oem_ibm_fru::Handler*>( in createOemIbmFruHandler() [all …]
|
H A D | dbus_impl_pdr.hpp | 3 #include "xyz/openbmc_project/PLDM/PDR/server.hpp" 13 namespace pldm namespace 19 sdbusplus::xyz::openbmc_project::PLDM::server::PDR>; 22 * @brief OpenBMC PLDM.PDR Implementation 24 * xyz.openbmc_project.PLDM.PDR DBus APIs. 45 * @param[in] tid - PLDM terminus ID. 46 * @param[in] entityID - entity that can be associated with PLDM State set. 47 * @param[in] stateSetId - value that identifies PLDM State set. 53 * @param[in] tid - PLDM terminus ID. 54 * @param[in] entityID - entity that can be associated with PLDM State set. [all …]
|
/openbmc/pldm/host-bmc/ |
H A D | dbus_to_event_handler.hpp | 11 namespace pldm namespace 16 std::map<SensorId, std::tuple<pldm::responder::pdr_utils::DbusMappings, 17 pldm::responder::pdr_utils::DbusValMaps>>; 21 std::map<pldm::pdr::SensorID, pldm::responder::pdr_utils::EventStates>; 26 * @brief This class can listen to the state sensor PDRs and send PLDM event 43 * @param[in] handler - PLDM request handler 46 int mctp_fd, uint8_t mctp_eid, pldm::InstanceIdDb& instanceIdDb, 47 pldm::requester::Handler<pldm::requester::Request>* handler); 54 void listenSensorEvent(const pldm::responder::pdr_utils::Repo& repo, 68 inline void updateSensorCacheMaps(pldm::pdr::SensorID sensorId, in updateSensorCacheMaps() [all …]
|
/openbmc/pldm/libpldmresponder/ |
H A D | fru_parser.hpp | 11 namespace pldm namespace 48 std::tuple<pldm::responder::dbus::Service, pldm::responder::dbus::RootPath, 49 pldm::responder::dbus::Interfaces>; 51 pldm::responder::dbus::Interface, pldm::responder::dbus::Property, 52 pldm::responder::dbus::PropertyType, pldm::responder::fru::FieldType>; 55 std::tuple<pldm::responder::fru::RecordType, 56 pldm::responder::fru::EncodingType, std::vector<FieldInfo>>; 64 * @brief Parses the PLDM FRU configuration files to populate the data 66 * inventory information into PLDM FRU Record. 90 /** @brief Get the information need to create PLDM FRU records for a [all …]
|
/openbmc/phosphor-dbus-interfaces/yaml/xyz/openbmc_project/PLDM/ |
H A D | Event.interface.yaml | 2 Implement to emit D-Bus signal for PLDM Event Messages. PLDM Event Messages 3 are PLDM monitoring and control messages that are used by a PLDM terminus to 4 synchronously or asynchronously report PLDM events to a central party called 5 the PLDM Event Receiver. 7 When the PLDM daemon receives a sensorEvent of type stateSensorState, it 10 This signal would be used by PLDM Requester apps on the BMC, which will rely 11 on this signal to determine state changes on a connected PLDM entity. 13 More information about PLDM Event Messages can be found at DSP0248 version 31 The sensorID is the value that is used in PDRs and PLDM sensor
|
/openbmc/pldm/common/test/ |
H A D | mocked_utils.hpp | 6 namespace pldm namespace 23 } // namespace pldm 28 static pldm::utils::ObjectValueTree getManagedObj(const char* /*service*/, in getManagedObj() 31 return pldm::utils::ObjectValueTree{}; in getManagedObj() 38 static pldm::utils::ObjectValueTree getManagedObj(const char* /*service*/, in getManagedObj() 41 return pldm::utils::ObjectValueTree{ in getManagedObj() 54 class MockdBusHandler : public pldm::utils::DBusHandler 61 (const pldm::utils::DBusMapping&, 62 const pldm::utils::PropertyValue&), 65 MOCK_METHOD(pldm::utils::PropertyValue, getDbusPropertyVariant, [all …]
|
/openbmc/pldm/fw-update/ |
H A D | manager.hpp | 15 namespace pldm namespace 23 * This class handles all the aspects of the PLDM FW update specification for 26 class Manager : public pldm::MctpDiscoveryHandlerIntf 37 * @brief Constructor for the PLDM Firmware Update Manager 43 * @param[in] handler - Reference to the PLDM request handler for processing 44 * PLDM requests 46 * managing PLDM instance IDs 48 explicit Manager(const pldm::utils::DBusHandler* dbusHandler, Event& event, in Manager() 50 pldm::InstanceIdDb& instanceIdDb) : in Manager() 98 /** @brief Handle PLDM request for the commands in the FW update [all …]
|
/openbmc/pldm/softoff/ |
H A D | softoff.cpp | 25 namespace pldm namespace 37 pldm::pdr::TerminusID TID = 0; 42 pldm::InstanceIdDb& instanceIdDb) : in SoftPowerOff() 63 pldm::pdr::EntityType entityType = entry.value("entityType", 0); in SoftPowerOff() 64 pldm::pdr::StateSetId stateSetId = entry.value("stateSetId", 0); in SoftPowerOff() 85 // Matches on the pldm StateSensorEvent signal in SoftPowerOff() 89 sdbusRule::path("/xyz/openbmc_project/pldm") + in SoftPowerOff() 90 sdbusRule::interface("xyz.openbmc_project.PLDM.Event"), in SoftPowerOff() 99 pldm::utils::PropertyValue propertyValue = in getHostState() 100 pldm::utils::DBusHandler().getDbusPropertyVariant( in getHostState() [all …]
|
/openbmc/pldm/platform-mc/test/ |
H A D | event_manager_test.cpp | 23 bus(pldm::utils::DBusHandler::getBus()), in EventManagerTest() 36 pldm::requester::Handler<pldm::requester::Request> reqHandler; 37 pldm::platform_mc::MockTerminusManager terminusManager; 38 pldm::platform_mc::MockEventManager eventManager; 39 pldm::platform_mc::PlatformManager platformManager; 40 pldm::platform_mc::TerminiMapper termini{}; 48 termini[tid] = std::make_shared<pldm::platform_mc::Terminus>( in TEST_F() 175 terminusManager.mapTid(pldm::MctpInfo(10, "", "", 1, std::nullopt)); in TEST_F() 177 termini[tid] = std::make_shared<pldm::platform_mc::Terminus>( in TEST_F() 367 pldm::MctpInfo(10, "", "", 1, std::nullopt), true); in TEST_F() [all …]
|
/openbmc/pldm/ |
H A D | README.md | 1 # PLDM - Platform Level Data Model 7 PLDM (Platform Level Data Model) is a key component of the OpenBMC project, 12 The OpenBMC PLDM project aims to implement the specifications defined by the 18 - **Standardized Messaging:** Adheres to the DMTF's PLDM specifications, 21 - **Modularity:** Supports multiple PLDM types, including base, FRU,Firmware 23 - **Extensibility:** Easily extendable to support new PLDM types and custom OEM 32 To build and run PLDM, you need the following dependencies: 41 To build the PLDM project, follow these steps: 59 ### To enable pldm verbosity 61 pldm daemon accepts a command line argument `--verbose` or `--v` or `-v` to [all …]
|
/openbmc/pldm/libpldmresponder/test/ |
H A D | mocked_bios.hpp | 9 class MockBIOSStringTable : public pldm::responder::bios::BIOSStringTable 19 void checkHeader(const pldm::responder::bios::Table& attrEntry, in checkHeader() 20 const pldm::responder::bios::Table& attrValueEntry) in checkHeader() 22 auto attrHeader = pldm::responder::bios::table::attribute::decodeHeader( in checkHeader() 25 pldm::responder::bios::table::attribute_value::decodeHeader( in checkHeader() 32 void checkEntry(pldm::responder::bios::Table& entry, in checkEntry() 33 pldm::responder::bios::Table& expectedEntry) in checkEntry() 50 void checkConstructEntry(pldm::responder::bios::BIOSAttribute& attribute, in checkConstructEntry() 51 pldm::responder::bios::BIOSStringTable& stringTable, in checkConstructEntry() 52 pldm::responder::bios::Table& expectedAttrEntry, in checkConstructEntry() [all …]
|
/openbmc/pldm/oem/ibm/libpldmresponder/ |
H A D | file_io.hpp | 26 namespace pldm namespace 84 * @param[in] command - PLDM command 92 * @return PLDM response message 125 pldm::utils::CustomFD fd(file); in transferAll() 165 "xyz.openbmc_project.PLDM.Provider.Certs.Authority.CSR"; 170 uint8_t hostEid, pldm::InstanceIdDb* instanceIdDb, in Handler() 171 pldm::requester::Handler<pldm::requester::Request>* handler) : in Handler() 247 pldm::utils::DBusHandler::getBus(), in Handler() 280 std::make_unique<pldm::requester::oem_ibm:: in Handler() 290 pldm::utils::DBusHandler::getBus(), in Handler() [all …]
|
/openbmc/pldm/platform-mc/ |
H A D | terminus_manager.hpp | 10 #include <libpldm/pldm.h> 20 namespace pldm namespace 42 * TerminusManager class to discover and initialize PLDM terminus. 56 pldm::InstanceIdDb& instanceIdDb, TerminiMapper& termini, in TerminusManager() 79 /** @brief Send request PLDM message to tid. The function will return when 85 * @param[in] request - request PLDM message 86 * @param[out] responseMsg - response PLDM message 87 * @param[out] responseLen - length of response PLDM message 88 * @return coroutine return_value - PLDM completion code 94 /** @brief Send request PLDM message to eid. The function will [all …]
|
/openbmc/pldm/oem/ibm/requester/ |
H A D | dbus_to_file_handler.hpp | 12 namespace pldm namespace 21 * @brief This class can process resource dump parameters and send PLDM 23 * as a pldm requester in oem-ibm path. 39 * @param[in] handler - PLDM request handler 42 int mctp_fd, uint8_t mctp_eid, pldm::InstanceIdDb* instanceIdDb, 44 pldm::requester::Handler<pldm::requester::Request>* handler); 86 /** @brief Pointer to an InstanceIdDb used to obtain PLDM instance id. */ 87 pldm::InstanceIdDb* instanceIdDb; 92 /** @brief PLDM request handler */ 93 pldm::requester::Handler<pldm::requester::Request>* handler; [all …]
|