Home
last modified time | relevance | path

Searched full:pdr (Results 1 – 25 of 169) sorted by relevance

1234567

/openbmc/pldm/libpldmresponder/
H A Dpdr_numeric_effecter.hpp21 /** @brief Parse PDR JSON file and generate numeric effecter PDR structure
23 * @param[in] json - the JSON Object with the numeric effecter PDR
25 * @param[out] repo - pdr::RepoInterface
40 pldm_numeric_effecter_value_pdr* pdr = in generateNumericEffecterPDR() local
42 if (!pdr) in generateNumericEffecterPDR()
44 error("Failed to get numeric effecter PDR."); in generateNumericEffecterPDR()
47 pdr->hdr.record_handle = 0; in generateNumericEffecterPDR()
48 pdr->hdr.version = 1; in generateNumericEffecterPDR()
49 pdr->hdr.type = PLDM_NUMERIC_EFFECTER_PDR; in generateNumericEffecterPDR()
50 pdr->hdr.record_change_num = 0; in generateNumericEffecterPDR()
[all …]
H A Dpdr_state_sensor.hpp21 /** @brief Parse PDR JSON file and generate state sensor PDR structure
23 * @param[in] json - the JSON Object with the state sensor PDR
25 * @param[out] repo - pdr::RepoInterface
45 … "Malformed PDR JSON return pdrEntry; no state set info for state sensor pdr '{STATE_SENSOR_PDR}'", in generateStateSensorPDR()
57 pldm_state_sensor_pdr* pdr = in generateStateSensorPDR() local
59 if (!pdr) in generateStateSensorPDR()
61 error("Failed to get state sensor PDR."); in generateStateSensorPDR()
64 pdr->hdr.record_handle = 0; in generateStateSensorPDR()
65 pdr->hdr.version = 1; in generateStateSensorPDR()
66 pdr->hdr.type = PLDM_STATE_SENSOR_PDR; in generateStateSensorPDR()
[all …]
H A Dpdr_state_effecter.hpp3 #include "pdr.hpp"
22 /** @brief Parse PDR JSON file and generate state effecter PDR structure
24 * @param[in] json - the JSON Object with the state effecter PDR
26 * @param[out] repo - pdr::RepoInterface
46 …"Malformed PDR JSON return pdrEntry; no state set info for state effecter pdr '{STATE_EFFECTER_PDR… in generateStateEffecterPDR()
58 pldm_state_effecter_pdr* pdr = new (entry.data()) in generateStateEffecterPDR() local
60 if (!pdr) in generateStateEffecterPDR()
62 error("Failed to get state effecter PDR."); in generateStateEffecterPDR()
65 pdr->hdr.record_handle = 0; in generateStateEffecterPDR()
66 pdr->hdr.version = 1; in generateStateEffecterPDR()
[all …]
H A Dpdr_utils.hpp6 #include <libpldm/pdr.h>
32 /** @struct Type ID associated with pdr
58 * PDR entry structure that acts as a PDR record structure in the PDR
59 * repository to handle PDR APIs.
84 /** @brief Parse PDR JSON file and output Json object
86 * @param[in] path - path of PDR JSON file
101 error("Error opening PDR JSON file at '{PATH}'", "PATH", path); in readJson()
109 * value for the effecter PDR enumeration attribute.
113 * @param[in] pv - Possible values for the effecter PDR enumeration attribute
123 * @brief Abstract class describing the interface API to the PDR repository,
[all …]
H A Dplatform_numeric_effecter.hpp4 #include "libpldmresponder/pdr.hpp"
26 /** @brief Function to get the effecter value by PDR factor coefficient, etc.
27 * @param[in] pdr - The structure of pldm_numeric_effecter_value_pdr.
36 const pldm_numeric_effecter_value_pdr* pdr, T& effecterValue, in getEffecterRawValue() argument
43 switch (pdr->effecter_data_size) in getEffecterRawValue()
48 round(effecterValue - pdr->offset) / pdr->resolution); in getEffecterRawValue()
49 if (pdr->min_settable.value_u8 < pdr->max_settable.value_u8 && in getEffecterRawValue()
50 (rawValue < pdr->min_settable.value_u8 || in getEffecterRawValue()
51 rawValue > pdr->max_settable.value_u8)) in getEffecterRawValue()
71 round(effecterValue - pdr->offset) / pdr->resolution); in getEffecterRawValue()
[all …]
H A Dplatform.cpp6 #include "pdr.hpp"
25 using namespace pldm::responder::pdr;
80 // A map of PDR type to a lambda that handles creation of that PDR type. in generate()
81 // The lambda essentially would parse the platform specific PDR JSONs to in generate()
82 // generate the PDR structures. This function iterates through the map to in generate()
83 // invoke all lambdas, so that all PDR types can be created. in generate()
140 … "PDR config directory '{PATH}' does not exist or empty for '{TYPE}' pdr, error - {ERROR}", in generate()
146 "Failed to parse PDR JSON file for '{TYPE}' pdr, error - {ERROR}", in generate()
154 "Failed to parse PDR JSON file for '{TYPE}' pdr, error - {ERROR}", in generate()
174 // Build FRU table if not built, since entity association PDR's in getPDR()
[all …]
H A Dpdr.hpp14 namespace pdr namespace
17 /** @brief Build (if not built already) and retrieve PDR by the PDR types
19 * @param[in] dir - directory housing platform specific PDR JSON files
22 * @return Repo - Instance of pdr::Repo
28 /** @brief Get the record of PDR by the record handle
30 * @param[in] pdrRepo - pdr::RepoInterface
31 * @param[in] recordHandle - The recordHandle value for the PDR to be
33 * @param[out] pdrEntry - PDR entry structure reference
35 * @return pldm_pdr_record - Instance of pdr::RepoInterface
42 } // namespace pdr
/openbmc/linux/drivers/soc/qcom/
H A Dpdr_interface.c43 /* control access to pdr lookup/indack lists */
75 struct pdr_handle *pdr = container_of(qmi, struct pdr_handle, in pdr_locator_new_server() local
78 mutex_lock(&pdr->lock); in pdr_locator_new_server()
80 pdr->locator_addr.sq_family = AF_QIPCRTR; in pdr_locator_new_server()
81 pdr->locator_addr.sq_node = svc->node; in pdr_locator_new_server()
82 pdr->locator_addr.sq_port = svc->port; in pdr_locator_new_server()
84 pdr->locator_init_complete = true; in pdr_locator_new_server()
85 mutex_unlock(&pdr->lock); in pdr_locator_new_server()
88 schedule_work(&pdr->locator_work); in pdr_locator_new_server()
96 struct pdr_handle *pdr = container_of(qmi, struct pdr_handle, in pdr_locator_del_server() local
[all …]
/openbmc/pldm/pldmtool/
H A Dpldm_platform_cmd.cpp96 …"Retrieve individual PDR, all PDRs, PDRs of a requested type or retrieve all PDRs of the requested… in GetPDR()
99 "retrieve individual PDRs from a PDR Repository\n" in GetPDR()
100 "eg: The recordHandle value for the PDR to be retrieved and 0 " in GetPDR()
101 "means get first PDR in the repository."); in GetPDR()
120 "retrieve all PDRs from a PDR repository"); in GetPDR()
178 // Retrieve all PDR records starting from the first in exec()
306 const std::map<pldm::pdr::EntityType, std::string> entityType = {
533 {PLDM_TERMINUS_LOCATOR_PDR, "Terminus Locator PDR"},
534 {PLDM_NUMERIC_SENSOR_PDR, "Numeric Sensor PDR"},
536 "Numeric Sensor Initialization PDR"},
[all …]
/openbmc/pldm/libpldmresponder/test/
H A Dlibpldmresponder_pdr_effecter_test.cpp14 using namespace pldm::responder::pdr;
42 // Check first PDR in TEST()
44 auto record2 = pdr::getRecordByHandle(outRepo, 2, e); in TEST()
46 pldm_state_effecter_pdr* pdr = new (e.data) pldm_state_effecter_pdr; in TEST() local
48 ASSERT_EQ(pdr->hdr.record_handle, 2); in TEST()
49 ASSERT_EQ(pdr->hdr.version, 1); in TEST()
50 ASSERT_EQ(pdr->hdr.type, PLDM_STATE_EFFECTER_PDR); in TEST()
51 ASSERT_EQ(pdr->hdr.record_change_num, 0); in TEST()
52 ASSERT_EQ(pdr->hdr.length, 23); in TEST()
54 ASSERT_EQ(pdr->terminus_handle, TERMINUS_HANDLE); in TEST()
[all …]
H A Dlibpldmresponder_pdr_sensor_test.cpp14 using namespace pldm::responder::pdr;
47 // Check first PDR in TEST()
49 auto record = pdr::getRecordByHandle(outRepo, 2, e); in TEST()
52 pldm_state_sensor_pdr* pdr = new (e.data) pldm_state_sensor_pdr; in TEST() local
53 EXPECT_EQ(pdr->hdr.record_handle, 2); in TEST()
54 EXPECT_EQ(pdr->hdr.version, 1); in TEST()
55 EXPECT_EQ(pdr->hdr.type, PLDM_STATE_SENSOR_PDR); in TEST()
56 EXPECT_EQ(pdr->hdr.record_change_num, 0); in TEST()
57 EXPECT_EQ(pdr->hdr.length, 17); in TEST()
59 EXPECT_EQ(pdr->sensor_id, 1); in TEST()
[all …]
/openbmc/pldm/oem/ibm/test/
H A Dlibpldmresponder_oem_platform_test.cpp6 #include "libpldmresponder/pdr.hpp"
17 #include <libpldm/pdr.h>
28 using namespace pldm::responder::pdr;
251 auto record1 = pdr::getRecordByHandle(inRepo, 1, e); in TEST()
254 pldm_state_effecter_pdr* pdr = in TEST() local
257 ASSERT_EQ(pdr->hdr.record_handle, 1); in TEST()
258 ASSERT_EQ(pdr->hdr.version, 1); in TEST()
259 ASSERT_EQ(pdr->hdr.type, PLDM_STATE_EFFECTER_PDR); in TEST()
260 ASSERT_EQ(pdr->hdr.record_change_num, 0); in TEST()
261 ASSERT_EQ(pdr->hdr.length, 16); in TEST()
[all …]
/openbmc/libpldm/include/libpldm/
H A Dpdr.h14 * opaque structure that acts as a handle to a PDR repository
19 * opaque structure that acts as a handle to a PDR record
24 /* Common PDR access APIs */
27 /** @brief Make a new PDR repository
38 /** @brief Destroy a PDR repository (and free up associated resources)
40 * @param[in/out] repo - pointer to opaque pointer acting as a PDR repo handle
44 /** @brief Get number of records in a PDR repository
48 * @param[in] repo - opaque pointer acting as a PDR repo handle
54 /** @brief Get size of a PDR repository, in bytes
58 * @param[in] repo - opaque pointer acting as a PDR repo handle
[all …]
/openbmc/libpldm/
H A DCHANGELOG.md49 - pdr: Add pldm_pdr_delete_by_effecter_id() API
52 - pdr: Add pldm_pdr_delete_by_sensor_id() API
53 - pdr: Add pldm_entity_association_tree_delete_node() API
72 - pdr: Stabilize pldm_pdr_delete_by_record_handle()
125 - pdr: Add pldm_pdr_delete_by_record_handle() API
128 - pdr: Add pldm_file_descriptor_pdr struct
167 - pdr: Indicates success or failure depending on the outcome of the entity
168 association PDR creation
178 - pdr: Remove PDR i
[all...]
/openbmc/pldm/pldmd/
H A Ddbus_impl_pdr.hpp3 #include "xyz/openbmc_project/PLDM/PDR/server.hpp"
5 #include <libpldm/pdr.h>
19 sdbusplus::xyz::openbmc_project::PLDM::server::PDR>;
21 /** @class Pdr
22 * @brief OpenBMC PLDM.PDR Implementation
24 * xyz.openbmc_project.PLDM.PDR DBus APIs.
26 class Pdr : public PdrIntf class
29 Pdr() = delete;
30 Pdr(const Pdr&) = delete;
31 Pdr& operator=(const Pdr&) = delete;
[all …]
/openbmc/linux/drivers/net/wireless/intersil/orinoco/
H A Dhermes_dld.c75 struct pdr { struct
79 char next[]; /* next PDR starts here */
107 /*** PDR Access functions ***/
110 pdr_id(const struct pdr *pdr) in pdr_id() argument
112 return le32_to_cpu(pdr->id); in pdr_id()
116 pdr_addr(const struct pdr *pdr) in pdr_addr() argument
118 return le32_to_cpu(pdr->addr); in pdr_addr()
122 pdr_len(const struct pdr *pdr) in pdr_len() argument
124 return le32_to_cpu(pdr->len); in pdr_len()
145 * Scan PDR for the record with the specified RECORD_ID.
[all …]
/openbmc/pldm/oem/ibm/libpldmresponder/
H A Doem_ibm_handler.cpp17 using namespace pldm::pdr;
28 pldm::pdr::EntityType entityType, EntityInstance entityInstance, in getOemStateSensorReadingsHandler()
189 pldm_state_effecter_pdr* pdr = in buildAllCodeUpdateEffecterPDR() local
191 if (!pdr) in buildAllCodeUpdateEffecterPDR()
193 error("Failed to get record by PDR type, error - {ERROR}", "ERROR", in buildAllCodeUpdateEffecterPDR()
198 pdr->hdr.record_handle = 0; in buildAllCodeUpdateEffecterPDR()
199 pdr->hdr.version = 1; in buildAllCodeUpdateEffecterPDR()
200 pdr->hdr.type = PLDM_STATE_EFFECTER_PDR; in buildAllCodeUpdateEffecterPDR()
201 pdr->hdr.record_change_num = 0; in buildAllCodeUpdateEffecterPDR()
202 pdr->hdr.length = sizeof(pldm_state_effecter_pdr) - sizeof(pldm_pdr_hdr); in buildAllCodeUpdateEffecterPDR()
[all …]
/openbmc/pldm/platform-mc/
H A Dterminus.cpp68 * terminus. The entity auxiliary name PDR of that terminus with the in findTerminusName()
123 for (auto& pdr : pdrs) in parseTerminusPDRs() local
125 auto pdrHdr = new (pdr.data()) pldm_pdr_hdr; in parseTerminusPDRs()
130 auto sensorAuxNames = parseSensorAuxiliaryNamesPDR(pdr); in parseTerminusPDRs()
134 "Failed to parse PDR with type {TYPE} handle {HANDLE}", in parseTerminusPDRs()
144 auto parsedPdr = parseNumericSensorPDR(pdr); in parseTerminusPDRs()
148 "Failed to parse PDR with type {TYPE} handle {HANDLE}", in parseTerminusPDRs()
158 auto parsedPdr = parseCompactNumericSensorPDR(pdr); in parseTerminusPDRs()
162 "Failed to parse PDR with type {TYPE} handle {HANDLE}", in parseTerminusPDRs()
167 auto sensorAuxNames = parseCompactNumericSensorNames(pdr); in parseTerminusPDRs()
[all …]
H A Dnumeric_sensor.cpp157 std::shared_ptr<pldm_numeric_sensor_value_pdr> pdr, std::string& sensorName, in NumericSensor() argument
160 if (!pdr) in NumericSensor()
165 sensorId = pdr->sensor_id; in NumericSensor()
168 setSensorUnit(pdr->base_unit); in NumericSensor()
211 getSensorDataValue(pdr->sensor_data_size, pdr->max_readable); in NumericSensor()
213 getSensorDataValue(pdr->sensor_data_size, pdr->min_readable); in NumericSensor()
214 hysteresis = getSensorDataValue(pdr->sensor_data_size, pdr->hysteresis); in NumericSensor()
226 if (pdr->supported_thresholds.bits.bit0) in NumericSensor()
230 getRangeFieldValue(pdr->range_field_format, pdr->warning_high); in NumericSensor()
233 if (pdr->supported_thresholds.bits.bit3) in NumericSensor()
[all …]
/openbmc/pldm/tools/visualize-pdr/
H A Dpldm_visualise_pdrs.py3 """Tool to visualize PLDM PDR's"""
119 """This function is responsible to parse the state sensor pdr
120 and the state effecter pdr dictionaries and creating the
169 def draw_entity_associations(pdr, counter): argument
172 PDR's received from the BMC.
175 pdr: list of entity association PDR's
176 counter: variable to capture the count of PDR's to unflatten
192 for value in pdr.values():
314 """Using pldmtool, generate (record handle, PDR) tuples for each record in
315 the PDR repository.
[all …]
/openbmc/pldm/host-bmc/
H A Dhost_pdr_handler.hpp26 // vector which would hold the PDR record handle data returned by
34 * PlatformEventMessage command to a host sensor PDR. This struct is a key
39 pdr::TerminusID terminusID;
40 pdr::SensorID sensorID;
54 using HostStateSensorMap = std::map<SensorEntry, pdr::SensorInfo>;
60 * receiving the PDRs, they are stored into the BMC's primary PDR repo.
77 std::tuple<pdr::TerminusID, pdr::EID, pdr::TerminusValidity>;
78 using TLPDRMap = std::map<pdr::TerminusHandle, TerminusInfo>;
84 * @param[in] repo - pointer to BMC's primary PDR repo
109 * @param[in] pdrTypes - list of PDR types that need to be looked up in the
[all …]
H A Dhost_pdr_handler.cpp35 uint16_t extractTerminusHandle(std::vector<uint8_t>& pdr) in extractTerminusHandle() argument
40 var = (T*)(pdr.data() + sizeof(pldm_pdr_hdr)); in extractTerminusHandle()
44 var = (T*)(pdr.data()); in extractTerminusHandle()
55 std::vector<uint8_t>& pdr) in updateContainerId() argument
64 t = (T*)(pdr.data() + sizeof(pldm_pdr_hdr)); in updateContainerId()
68 t = (T*)(pdr.data()); in updateContainerId()
200 error("Failed to encode get pdr request, response code '{RC}'", "RC", in getHostPDR()
220 pdr::EventState state) in handleStateSensorEvent()
233 const std::vector<uint8_t>& pdr, [[maybe_unused]] const uint32_t& size, in mergeEntityAssociations() argument
239 auto entityPdr = new (const_cast<uint8_t*>(pdr.data()) + in mergeEntityAssociations()
[all …]
/openbmc/pldm/common/test/
H A Dpldm_utils_test.cpp182 std::vector<uint8_t> pdr( in TEST() local
186 auto rec = new (pdr.data()) pldm_state_effecter_pdr; in TEST()
199 ASSERT_EQ(pldm_pdr_add(repo, pdr.data(), pdr.size(), false, 1, &handle), 0); in TEST()
203 EXPECT_EQ(pdr, record[0]); in TEST()
215 std::vector<uint8_t> pdr( in TEST() local
219 auto rec = new (pdr.data()) pldm_state_effecter_pdr; in TEST()
232 ASSERT_EQ(pldm_pdr_add(repo, pdr.data(), pdr.size(), false, 1, &handle), 0); in TEST()
248 std::vector<uint8_t> pdr( in TEST() local
264 std::vector<uint8_t> pdr( in TEST() local
268 auto rec = new (pdr.data()) pldm_state_effecter_pdr; in TEST()
[all …]
/openbmc/pldm/softoff/
H A Dsoftoff.cpp36 pldm::pdr::TerminusID TID = 0;
62 pldm::pdr::EntityType entityType = entry.value("entityType", 0); in SoftPowerOff()
63 pldm::pdr::StateSetId stateSetId = entry.value("stateSetId", 0); in SoftPowerOff()
127 pldm::pdr::TerminusID msgTID; in hostSoftOffComplete()
128 pldm::pdr::SensorID msgSensorID; in hostSoftOffComplete()
129 pldm::pdr::SensorOffset msgSensorOffset; in hostSoftOffComplete()
130 pldm::pdr::EventState msgEventState; in hostSoftOffComplete()
131 pldm::pdr::EventState msgPreviousEventState; in hostSoftOffComplete()
171 bool SoftPowerOff::getEffecterID(pldm::pdr::EntityType& entityType, in getEffecterID()
172 pldm::pdr::StateSetId& stateSetId) in getEffecterID()
[all …]
/openbmc/phosphor-dbus-interfaces/yaml/xyz/openbmc_project/PLDM/
H A DPDR.interface.yaml8 An implementation of this interface should maintain the primary PDR
11 A OpenBMC implementation should implement the xyz.openbmc_project.PLDM.PDR
14 More information about PDR can be found at DSP0248 version 1.2.0 section 25.
19 Obtain the state effecter PDR, for the input TID, entity ID and state
22 effecter PDRs are returned. More than one PDR can be returned for the
25 When the PDR for the given input TID, entity id and state set id is
59 Array of State Effecter PDRs, where a PDR is an array[byte].
70 Obtain the state sensor PDR, for the input TID, entity ID and state
73 PDRs are returned. More than one PDR can be returned for the same
76 When the PDR for the given input TID, entity id and state set id is
[all …]

1234567