#
366507c8 |
| 03-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I95f756bab7f403af49a94011bbb1fe4e51f985ad Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I95f756bab7f403af49a94011bbb1fe4e51f985ad Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
b3b84b49 |
| 23-Aug-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-deprecated-headers check
Some headers from C library were deprecated in C++ and are no longer welcome in C++ codebases. Some have no effect in C++ [1].
[1]: https://rel
clang-tidy: Enable modernize-deprecated-headers check
Some headers from C library were deprecated in C++ and are no longer welcome in C++ codebases. Some have no effect in C++ [1].
[1]: https://releases.llvm.org/13.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-deprecated-headers.html
Change-Id: Ia3b1df10175e2e661c8fffb82e357c9db81b2e9c Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
#
16c2a0a0 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I8c84201cb2343a8c8a5507a49de0721a1bee7063 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
89644441 |
| 31-Mar-2024 |
Riya Dixit <riyadixitagra@gmail.com> |
libpldmresponder: Improving Logs (lg2)
This commit corrects the severity level of logs and also formats the message string, fixing the ill-defined message string of the logs as mentioned in the anti
libpldmresponder: Improving Logs (lg2)
This commit corrects the severity level of logs and also formats the message string, fixing the ill-defined message string of the logs as mentioned in the anti-pattern document [1]. Additionally, based on the requirement this commit adds more debug information to logs.
[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#ill-defined-data-structuring-in-lg2-message-strings
Change-Id: I7dc5c308a8cd76573995e07d01d1a6037bca31ba Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
show more ...
|
#
ae933cc2 |
| 21-Feb-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Add support for Previous State in Sensor events
Previously, the sensor events generated by the PLDM stack only included the current state of the sensor without any reference to the previous state.
Add support for Previous State in Sensor events
Previously, the sensor events generated by the PLDM stack only included the current state of the sensor without any reference to the previous state.
This commit introduces a new feature to address this limitation by caching the previous states of all sensors.
The enhancement ensures that platform event messages(sensor events) now contain the correct previous state information alongside the current state.
Behavior Model: 1. Upon the initial occurrence of a sensor event, both the current state and the previous state are identical, adhering to the specification. 2. Subsequently, when the PLDM stack sends out sensor events, it retrieves the previous state from its cache and populates it accordingly.
Testing: 1. Example: Change the value of a sensor, such as dimm8 identify, to false using busctl. Tx: 81 02 0a 01 00 00 4d 00 01 00 [ 01 01 ] - Note: Initially, both the event state and the previous state are 01.
2. Change the value of dimm8 identify to true. Tx: 81 02 0a 01 00 00 4d 00 01 00 [ 02 01 ] - Result: Event state: 02, Previous state: 01.
3. Change the value of dimm8 identify back to false. Tx: 81 02 0a 01 00 00 4d 00 01 00 [ 01 02 ] - Result: Event state: 01, Previous state: 02.
4. Similar results can be obtained using the getStateSensorReadings command for the same sensor at respective times.
Change-Id: Ic93a55e61fd5128cecc698b3555a6639876882ed Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
#
6ece21fb |
| 10-Oct-2023 |
Archana Kakani <archana.kakani@ibm.com> |
libpldmresponder:Support GetNumericEffecterValue responder
The GetNumericEffecterValue command is used to return the present numeric setting of a PLDM Numeric Effecter. This commit adds responder su
libpldmresponder:Support GetNumericEffecterValue responder
The GetNumericEffecterValue command is used to return the present numeric setting of a PLDM Numeric Effecter. This commit adds responder support for GetNumericEffecterValue Cmd as mentioned in Section22.3 of DSP0248_1.2.0. Currently "effecterOperationalState" field in the response msg is set to "enabled-noUpdatePending". Actual value can be fetched once the support for EffecterEvent/SetNumericEffecterEnable is added.
Test: Using pldmtool raw command Success Case: pldmtool raw -d 0x80 0x02 0x32 0x23 00 pldmtool: Tx: 08 01 80 02 32 23 00 pldmtool: Rx: 08 01 00 02 32 00 00 01 03 03 Failure Case: pldmtool raw -d 0x80 0x02 0x32 0x25 0x00 pldmtool: Tx: 08 01 80 02 32 25 00 pldmtool: Rx: 08 01 00 02 32 80
Change-Id: I64a7205d8f69e3925b75b02558a0857b63c70ebf Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
show more ...
|
#
682ee18c |
| 25-Dec-2020 |
George Liu <liuxiwei@inspur.com> |
Handle FRU records from host
- Get FRU record table from host and traverse the entity structure from the FRU record set PDR, and create D-Bus object.
- When the FRU field type is a PLDM_OEM_FRU_F
Handle FRU records from host
- Get FRU record table from host and traverse the entity structure from the FRU record set PDR, and create D-Bus object.
- When the FRU field type is a PLDM_OEM_FRU_FIELD_TYPE_LOCATION_CODE , the location code is used to populate the xyz.openbmc_project.Inventory.Decorator.LocationCode D-Bus interface for the corresponding FRU.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I482c4d371f76b4881109ef420dfd9543e1aa810b
show more ...
|
#
6da4f91b |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I61b093f75011417cc9c7acf9605200f4fa429bac Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
49cfb138 |
| 02-Mar-2023 |
Riya Dixit <riyadixitagra@gmail.com> |
PLDM: Implementing Phosphor-Logging/LG2 logging
This commit adds changes in PLDM for implementing structured LG2 logging, thereby moving away from std::cout/cerr practice of logging which are output
PLDM: Implementing Phosphor-Logging/LG2 logging
This commit adds changes in PLDM for implementing structured LG2 logging, thereby moving away from std::cout/cerr practice of logging which are output streams and not logging mechanism.
PLDM now can make use of lg2 features like accurate CODE LINE Number and CODE_FUNCTION Name and better detailing in json object values which can be used in log tracking.
More detailed logging change: https://gist.github.com/riyadixitagra/c251685c1ba84248181891f7bc282395
Tested: Ran a power off, on, cycle, and reset-reload.
Change-Id: I0485035f15f278c3fd172f0581b053c1c37f3a5b Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
show more ...
|
#
c453e164 |
| 21-Dec-2022 |
George Liu <liuxiwei@inspur.com> |
libpldm: Correct reference to libpldm header files
When relying on header files from external libraries, #include<> should be used instead of #include "" to avoid ambiguity.
Tested: Built pldm succ
libpldm: Correct reference to libpldm header files
When relying on header files from external libraries, #include<> should be used instead of #include "" to avoid ambiguity.
Tested: Built pldm successfully after enabling ibm-oem
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ia1997de7e0f61564055bbd837f4e24c8f14e55a5
show more ...
|
#
5079ac4a |
| 19-Aug-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
treewide: remove 'using namespace' from headers
Using namespace at global scope in a header file violates the cpp core guidelines. Quoting the guidelines:
"Doing so takes away an #includer’s abi
treewide: remove 'using namespace' from headers
Using namespace at global scope in a header file violates the cpp core guidelines. Quoting the guidelines:
"Doing so takes away an #includer’s ability to effectively disambiguate and to use alternatives. It also makes #included headers order-dependent as they might have different meaning when included in different orders."
For further reading: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-using-directive
The guidelines don't call out using using namespace from namespace scope, but it is only marginally less problematic and still unexpected, so this patch removes those as well.
The process used to do the update is roughly:
1 - git grep 'using namespace' **.hpp 2 - For each instance, remove the offending 'using namespace' line 3 - build 4 - add 'using namespace' to cpp files or fully resolve types in hpp files until the project builds again.
Further cleanup is possible - for example cpp files could be scrubbed for unnecessary namespace qualification - this was not done here to make review as simple as possible.
Change-Id: I4931f5e78a1b5b74b4a4774c035a549f4d59b91a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
#
c1230ca1 |
| 03-Aug-2021 |
George Liu <liuxiwei@inspur.com> |
Remove getBitfieldCount method
Remove the getBitfieldCount method and use the C++20 feature `std::popcount` to get the number of bits of 1.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id
Remove getBitfieldCount method
Remove the getBitfieldCount method and use the C++20 feature `std::popcount` to get the number of bits of 1.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I71a5c1a9e10f508ce58a01ec8dc17ed5d96ed8a5
show more ...
|
#
362c18dd |
| 13-May-2020 |
George Liu <liuxiwei@inspur.com> |
libpldmresponder: Implement GetStateSensorReadings
Register the getStateSensorReadings method and get the state sensor PDR structure according to the SensorId property.
Tested with JSON file: https
libpldmresponder: Implement GetStateSensorReadings
Register the getStateSensorReadings method and get the state sensor PDR structure according to the SensorId property.
Tested with JSON file: https://gist.github.com/lxwinspur/6a40abea7330c25e4d49826e890c4be9
pldmtool raw -d 0x80 0x02 0x21 0x01 0x00 0x01 0x00 Request Message: 08 01 80 02 21 01 00 01 00 Response Message: 08 01 00 02 21 00 01 03 00 00 00
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I4faeb1e85f9fd4a2745f592d37be38c28112f5b9
show more ...
|
#
adbe1726 |
| 09-May-2020 |
George Liu <liuxiwei@inspur.com> |
Add parsing JSON for State Sensor PDR
According to spec DSP0248_1.2.0: 28.6 and sensor_pdr.json, parse JSON and generate PDR structure.
Tested with JSON file: https://gist.github.com/lxwinspur/6a40
Add parsing JSON for State Sensor PDR
According to spec DSP0248_1.2.0: 28.6 and sensor_pdr.json, parse JSON and generate PDR structure.
Tested with JSON file: https://gist.github.com/lxwinspur/6a40abea7330c25e4d49826e890c4be9
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I654913b6fa07f34f405f7dd41a5f1ac0ae2706fb
show more ...
|
#
d130e1a3 |
| 17-Jun-2020 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
common: code re-org
Move common files under a common/ directory.
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I0eaf91d4ee94c1e78228da0c50892f82e91912fa
|
#
6492f524 |
| 15-Jun-2020 |
George Liu <liuxiwei@inspur.com> |
clang-format: update to latest from docs repo
Since `Cpp11` is an alias for `Latest` and we should tend towards using the latest C++ standard, update the C++ standard to Latest.
https://github.com/
clang-format: update to latest from docs repo
Since `Cpp11` is an alias for `Latest` and we should tend towards using the latest C++ standard, update the C++ standard to Latest.
https://github.com/llvm/llvm-project/commit/e5032567903de19962333c4bf7d2edceaf4f9824#diff-b49a097415dff2837d9626d422c58ba8R82 https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format
Also, other OpenBMC repos are doing the same.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I449e88bb4e1e262060110e1a8f3e8db3ddfc74cf
show more ...
|
#
b4268607 |
| 17-Apr-2020 |
Tom Joseph <tomjoseph@in.ibm.com> |
pldm_events: Parse state sensor PDRs from the Host PDR
Parse the State Sensor PDRs from the host firmware and build the HostStateSensorMap data structure which will be used to lookup the sensor info
pldm_events: Parse state sensor PDRs from the Host PDR
Parse the State Sensor PDRs from the host firmware and build the HostStateSensorMap data structure which will be used to lookup the sensor info for the sensorEventType in the PlatformEventMessage command. Also clear the HostStateSensorMap when the host powers off.
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com> Change-Id: Id85a73f1a0a1caf4b4155a8d235b3e807383e53a
show more ...
|
#
a2870726 |
| 10-Feb-2020 |
George Liu <liuxiwei@inspur.com> |
pldm: Optimized parsing of PDR JSON files
Move the generateStateEffecterRepo method of parse JSON to pdr_state_effecter.hpp.
Tested with JSON files: https://gist.github.com/lxwinspur/2c3fd68cdb35e
pldm: Optimized parsing of PDR JSON files
Move the generateStateEffecterRepo method of parse JSON to pdr_state_effecter.hpp.
Tested with JSON files: https://gist.github.com/lxwinspur/2c3fd68cdb35e06480c4a5f7890e3a06#file-effecter_pdr-json.
pldmtool platform GetPDR -d 1 Encode request successfully Request Message: 08 01 80 02 51 01 00 00 00 00 00 00 00 01 80 00 00 00 Success in creating the socket : RC = 3 Success in connecting to socket : RC = 0 Success in sending message type as pldm to mctp : RC = 0 Write to socket successful : RC = 18 Total length:18 Loopback response message: 08 01 80 02 51 01 00 00 00 00 00 00 00 01 80 00 00 00 On first recv(),response == request : RC = 0 Total length: 46 Shutdown Socket successful : RC = 0 Response Message: 08 01 00 02 51 00 02 00 00 00 00 00 00 00 01 1d 00 01 00 00 00 01 0b 00 00 13 00 00 00 01 00 21 00 00 00 00 00 00 00 00 00 01 c4 00 01 06 Parsed Response Msg: nextRecordHandle: 2 responseCount: 29 recordHandle: 1 PDRHeaderVersion: 1 PDRType: 11 recordChangeNumber: 0 dataLength: 19 PLDMTerminusHandle: 0 effecterID: 1 entityType: 33 entityInstanceNumber: 0 containerID: 0 effecterSemanticID: 0 effecterInit: 0 effecterDescriptionPDR: false compositeEffecterCount: 1 stateSetID: 196 possibleStatesSize: 1 possibleStates: 6
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I8428ed042fb0a90ecc448073f059f66360066306
show more ...
|
#
1ec85d4b |
| 12-Feb-2020 |
George Liu <liuxiwei@inspur.com> |
pdr: Update D-Bus mapping structure
For most PDR types, the D-Bus object structure(paths, interfaces, and properties) should be defined in the JSON file instead of hard-coded.
Tested with JSON file
pdr: Update D-Bus mapping structure
For most PDR types, the D-Bus object structure(paths, interfaces, and properties) should be defined in the JSON file instead of hard-coded.
Tested with JSON files: https://gist.github.com/lxwinspur/2c3fd68cdb35e06480c4a5f7890e3a06#file-effecter_pdr-json.
pldmtool platform GetPDR -d 1 Encode request successfully Request Message: 08 01 80 02 51 01 00 00 00 00 00 00 00 01 80 00 00 00 Success in creating the socket : RC = 3 Success in connecting to socket : RC = 0 Success in sending message type as pldm to mctp : RC = 0 Write to socket successful : RC = 18 Total length:18 Loopback response message: 08 01 80 02 51 01 00 00 00 00 00 00 00 01 80 00 00 00 On first recv(),response == request : RC = 0 Total length: 46 Shutdown Socket successful : RC = 0 Response Message: 08 01 00 02 51 00 02 00 00 00 00 00 00 00 01 1d 00 01 00 00 00 01 0b 00 00 13 00 00 00 01 00 21 00 00 00 00 00 00 00 00 00 01 c4 00 01 06 Parsed Response Msg: nextRecordHandle: 2 responseCount: 29 recordHandle: 1 PDRHeaderVersion: 1 PDRType: 11 recordChangeNumber: 0 dataLength: 19 PLDMTerminusHandle: 0 effecterID: 1 entityType: 33 entityInstanceNumber: 0 containerID: 0 effecterSemanticID: 0 effecterInit: 0 effecterDescriptionPDR: false compositeEffecterCount: 1 stateSetID: 196 possibleStatesSize: 1 possibleStates: 6
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ifc0cd1540b08e9b73e03d99d71a0980ef6353e72
show more ...
|
#
c682fe2d |
| 04-Mar-2020 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
More PDR refactor
- PDRs can be created not just by the platform monitoring and control handlers, but by other handlers (eg FRU) as well. - For this purpose, create the PDR repo in the pldm daemon
More PDR refactor
- PDRs can be created not just by the platform monitoring and control handlers, but by other handlers (eg FRU) as well. - For this purpose, create the PDR repo in the pldm daemon, and pass it to the handlers. This change warranted some refactor.
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com> Change-Id: I4e789da9bae99dee1b535d92ce98ae5bb8eed62b Signed-off-by: George Liu <liuxiwei@inspur.com>
show more ...
|
#
e53193fa |
| 23-Feb-2020 |
George Liu <liuxiwei@inspur.com> |
pldm: Refector PDR repo based on the new PDR APIs
The related APIs for PDR operations is implemented in pldm/libpldm/pdr.h and pldm/libpldm/pdr.c, we need to use this instead of pdr::Repo(defined in
pldm: Refector PDR repo based on the new PDR APIs
The related APIs for PDR operations is implemented in pldm/libpldm/pdr.h and pldm/libpldm/pdr.c, we need to use this instead of pdr::Repo(defined in libpldmresponder/pdr.hpp). pdr::Repo is now a C++ wrapper around the PDR APIs in libpldm.
Tested with unit tests, with JSON files: https://gist.github.com/lxwinspur/2c3fd68cdb35e06480c4a5f7890e3a06#file-effecter_pdr-json.
$ pldmtool platform GetPDR -d 0 Encode request successfully Request Message: 08 01 80 02 51 00 00 00 00 00 00 00 00 01 80 00 00 00 Success in creating the socket : RC = 3 Success in connecting to socket : RC = 0 Success in sending message type as pldm to mctp : RC = 0 Write to socket successful : RC = 18 Total length:18 Loopback response message: 08 01 80 02 51 00 00 00 00 00 00 00 00 01 80 00 00 00 On first recv(),response == request : RC = 0 Total length: 46 Shutdown Socket successful : RC = 0 Response Message: 08 01 00 02 51 00 02 00 00 00 00 00 00 00 01 1d 00 01 00 00 00 01 0b 00 00 13 00 00 00 01 00 21 00 00 00 00 00 00 00 00 00 01 c4 00 01 06 Parsed Response Msg: nextRecordHandle: 2 responseCount: 29 recordHandle: 1 PDRHeaderVersion: 1 PDRType: 11 recordChangeNumber: 0 dataLength: 19 PLDMTerminusHandle: 0 effecterID: 1 entityType: 33 entityInstanceNumber: 0 containerID: 0 effecterSemanticID: 0 effecterInit: 0 effecterDescriptionPDR: false compositeEffecterCount: 1 stateSetID: 196 possibleStatesSize: 1 possibleStates: 6
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I0c41f888b2e36a5a49968dff190ad8d53255b9ed
show more ...
|