47266d6f | 27-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_utils: BIOSTableIter: Failure to create iter throws exception
It's possible that the heap allocation invoked by pldm_bios_table_iter_create() fails. The existing behaviour is to assert() in the
bios_utils: BIOSTableIter: Failure to create iter throws exception
It's possible that the heap allocation invoked by pldm_bios_table_iter_create() fails. The existing behaviour is to assert() in the implementation that it hadn't failed, but that will be changed to instead have the API return NULL.
Check for the NULL condition with the understanding that it may occur in the future, and if observed, throw an exception to uphold the existing assumptions in the code.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I20016e8db4c814017306cc68a536a9c232c74e0e
show more ...
|
47792274 | 13-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pldm: Include config.h via compiler argument
This removes any ambiguity about which config.h is being included. Subprojects such as libpldm and phosphor-logging also generate config.h files, and the
pldm: Include config.h via compiler argument
This removes any ambiguity about which config.h is being included. Subprojects such as libpldm and phosphor-logging also generate config.h files, and these are exposed in the include path.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3e0ccd6339f088380ffa29d41167b07aefc7dd16
show more ...
|
9138c209 | 19-May-2023 |
vkaverap@in.ibm.com <vkaverap@in.ibm.com> |
PLDM : Change the dbus timeout to 5 seconds
Dbus timeout value for every dbus call in PLDM is set to 5 seconds instead of default 25 seconds so that all dbus calls that expect a reply exists after 5
PLDM : Change the dbus timeout to 5 seconds
Dbus timeout value for every dbus call in PLDM is set to 5 seconds instead of default 25 seconds so that all dbus calls that expect a reply exists after 5 seconds if there is no response from the client. While BMC is still waiting for a response on any dbus calls it is possible that host can timeout and return an error. Another reason is that memory address from where BMC would read data sent by host may get deallocated after 20 seconds and it is possible for this to happen even before BMC has read the data. This has lead to DMA issues.
Tested by adding a sleep for 10 seconds inside main function of phospher-host-postd and executed get dbus property on snoopd interface from pldm. PLDM dbus call timed out after 5 seconds.
Change-Id: I1aa1b4ad7fceff2224a3ccc3bcf6abd5705963bc Signed-off-by: Varsha Kaverappa <vkaverap@in.ibm.com>
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 ...
|
eefe49bf | 27-Jun-2022 |
Sridevi Ramesh <sridevra@in.ibm.com> |
Add API to create fru records only for present frus.
This commit builds the fru records only for the present frus. Any item which is a FRU should by default implement the Inventory.Item Interface an
Add API to create fru records only for present frus.
This commit builds the fru records only for the present frus. Any item which is a FRU should by default implement the Inventory.Item Interface and host the present property. So, if the present property is not hosted then FRU is absent.
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com> Change-Id: I5534d6cc1a9f7a1b329975cdd5de54110f456f39
show more ...
|
06fca441 | 17-Aug-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Add missing dependencies
There are multiple places where the dependencies are explicitly missing & its working as of today because of the way the code was organised.
The intent behind this commit i
Add missing dependencies
There are multiple places where the dependencies are explicitly missing & its working as of today because of the way the code was organised.
The intent behind this commit is add the missing dependencies explicitly. This commit fixes : 1. common tests depends on header files in common folder, but it is not added as a dependency, fixing this by adding libpldmutils as the dependency. 2. fw-update tests depends on header files in common folder as well, but it is not added as a dependency , fixing this by adding libpldmutils as the dependency. 3. requester test code includes header files in the pldmd folder, but that is not added as a dependency as well, fixing this by adding include_directories and making it a dependency.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I102ea5096dd9edfc876fd60df7628fc061e085f2
show more ...
|
84b790cb | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8e2242adb79be342562c9b7f3d2153dfdf578085
show more ...
|
3ca40453 | 04-Oct-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Remove PDR's based on Terminus Handle
The current pldm infrastructure is written in way that it deletes all the PDR's which are marked as "remote",when we get a PDR refresh entire repository signal
Remove PDR's based on Terminus Handle
The current pldm infrastructure is written in way that it deletes all the PDR's which are marked as "remote",when we get a PDR refresh entire repository signal comes from remote PLDM terminus,this does not work in muti-host scenario where BMC talks to more than one HOST that talks pldm.
When a repository refresh signal comes form a remote PLDM terminus, BMC is supposed to only delete the PDR's corresponding to the same PLDM terminus.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I51f77c3f9537da722a00d97070674958c5baf1b4
show more ...
|
ca1998f3 | 06-Jun-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
update clang-format
This commit would update the repo's clang-format file to the latest of docs/style/cpp/clang-format file.
Following is the new change that is added: Brad : clang-format: cpp: r
update clang-format
This commit would update the repo's clang-format file to the latest of docs/style/cpp/clang-format file.
Following is the new change that is added: Brad : clang-format: cpp: remove empty lines
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Ieaadd8a1cd779c9c12adf6d065cc1f9e9a8fa37b
show more ...
|
ef773059 | 28-Jul-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
In-Memory FlightRecorder support for pldmd
pldm daemon in BMC can act both as a requester and responder, and it is capable of talking to any device that talks pldm spec.
With the rapid increase in
In-Memory FlightRecorder support for pldmd
pldm daemon in BMC can act both as a requester and responder, and it is capable of talking to any device that talks pldm spec.
With the rapid increase in the number of commands supported by pldmd, and also with the async request/response support enabled, its becomes extremely tough to debug the failures in the communication.
And most of times, the essential information that is needed to debug are the last few commands that BMC pldm responded to. So this commit is an attempt to bring in an in-memory flight recorder that could save the last 10(can be configurable) pldm transactions in a circular buffer, and dumps the contents of it into a file when it receives a SIGUR1 signal.
Resolves openbmc/pldm#24
Tested By :
1. Power on host 2. In the middle of poweron, send the SIGUSR1 signal to pldmd
root@rain118bmc:/tmp# kill -10 836 Received SIGUR1(10) Signal interrupt root@rain118bmc:/tmp# Dumping the flight recorder into /tmp/pldm_flight_recorder
3. Make sure pldmd is not killed and does the rest of the power on operation.
4. check the contents of /tmp/pldm_flight_recorder root@p10bmc:~# cat /tmp/pldm_flight_recorder UTC Nov 05 / 11:27:25.334606 : Tx : 0a 3f 0d 00 UTC Nov 05 / 11:27:26.292988 : Rx : 09 01 8b 3f 0d 00 00 7b 1e 00 50 00 UTC Nov 05 / 11:27:26.296915 : Tx : 0b 3f 0d 00 UTC Nov 05 / 11:27:27.250999 : Rx : 09 01 8c 3f 0d 00 00 7c 1e 00 50 00 UTC Nov 05 / 11:27:27.254762 : Tx : 0c 3f 0d 00 UTC Nov 05 / 11:27:28.212168 : Rx : 09 01 8d 3f 0d 00 00 7d 1e 00 50 00 UTC Nov 05 / 11:27:28.216086 : Tx : 0d 3f 0d 00 UTC Nov 05 / 11:27:29.171228 : Rx : 09 01 8e 3f 0d 00 00 7e 1e 00 50 00 UTC Nov 05 / 11:27:29.175143 : Tx : 0e 3f 0d 00 UTC Nov 05 / 11:27:25.330716 : Rx : 09 01 8a 3f 0d 00 00 7a 1e 00 50 00
5. Configure with -Dflightrecorder-max-entries=0 root@p10bmc:~# kill -10 21847 Received SIGUR1(10) Signal interrupt Fight recorder policy is disabled
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I4e9c828f4ada9f1db6bf3a9b68c16e71b6e5d8f0
show more ...
|
872f0f69 | 25-Nov-2021 |
George Liu <liuxiwei@inspur.com> |
utils: Add split method
Add the method of splitting the string, split the string according to the special identifier and return a vector.
Tested: Add Unit Test and test passes.
Signed-off-by: Geor
utils: Add split method
Add the method of splitting the string, split the string according to the special identifier and return a vector.
Tested: Add Unit Test and test passes.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I0a4474cef53fed4a629e3faa9db44dbf3bf432d8
show more ...
|
1ef62c37 | 23-Apr-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Add getSubtree utility functions
- Added getSubtree utility function that can returns the service name & dbus object paths that implement a particular dbus interface.
Signed-off-by: Manojkiran
Add getSubtree utility functions
- Added getSubtree utility function that can returns the service name & dbus object paths that implement a particular dbus interface.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: If1faeba285ce4de26d7343ca400f5820736bb3e0
show more ...
|
fb3bc06f | 17-Aug-2021 |
Tom Joseph <rushtotom@gmail.com> |
fw-update: Firmware discovery of MCTP endpoints
Tested:
a) Verified MCTP endpoints are discovered by PLDM and fetching the firmware inventory commands. b) PLDM firmware update successful after u
fw-update: Firmware discovery of MCTP endpoints
Tested:
a) Verified MCTP endpoints are discovered by PLDM and fetching the firmware inventory commands. b) PLDM firmware update successful after uploading the package, which depends on the firmware inventory commands. c) Verified MCTP endpoints are discovered irrespective of the startup order with the MCTP control application.
Signed-off-by: Tom Joseph <rushtotom@gmail.com> Change-Id: I7ee9aed40433a8e5a4ebb8e61f917ec82dde9c35
show more ...
|
1630f399 | 29-Jun-2021 |
Tom Joseph <rushtotom@gmail.com> |
fw-update: Implement firmware update package parser
PackageParser implements parsing the common elements across version 1 and version 2 of the PackageHeader. PackageParserV1 handles parsing the pack
fw-update: Implement firmware update package parser
PackageParser implements parsing the common elements across version 1 and version 2 of the PackageHeader. PackageParserV1 handles parsing the package header version 1 as defined in DSP0267_1.0.0 and DSP0267_1.0.1.
Tested: Unit tests added
Signed-off-by: Tom Joseph <rushtotom@gmail.com> Change-Id: Iddabd435755f462c042a85a286b1b0a50eb346b1
show more ...
|
75356c1a | 20-Jun-2021 |
Tom Joseph <rushtotom@gmail.com> |
fw-update: Implement inventory manager
1. Discover firmware devices that implement fw update specification 2. Implements request/response for QueryDeviceIdentifiers command 3. Implements request/res
fw-update: Implement inventory manager
1. Discover firmware devices that implement fw update specification 2. Implements request/response for QueryDeviceIdentifiers command 3. Implements request/response for GetFirmwareParameters command 4. Enumerates device identifiers and component information to be used for fw-update
Signed-off-by: Tom Joseph <rushtotom@gmail.com> Change-Id: Ifa035c801a7c62bac9a7e947ed4a43d48f85a4ed
show more ...
|
60e1fe91 | 08-Oct-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Make Terminus info a class variable
The terminus information is needed at various places in pldm and instead of passing that structure around via function arguments, it is cheaper to maintain it as
Make Terminus info a class variable
The terminus information is needed at various places in pldm and instead of passing that structure around via function arguments, it is cheaper to maintain it as a class variable.
And this commit also removes the redundant structure that stores partial terminus information.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: If34cfe1c47bdeceaabdae779ee7cd8569beedf5d
show more ...
|
c30a82cf | 07-Oct-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
utils: print out host EID path
Print out the host EID path when it is missing to make debugging build time configuration problems a little easier.
Change-Id: Ibb1b71751ad3c9b4ceb076f77458ace5432deb
utils: print out host EID path
Print out the host EID path when it is missing to make debugging build time configuration problems a little easier.
Change-Id: Ibb1b71751ad3c9b4ceb076f77458ace5432debbb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
51330585 | 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6a2316d11f1dd70d8dc2368c2aa01d88cf1cdb26 |
e5268cda | 07-Sep-2021 |
Tom Joseph <rushtotom@gmail.com> |
Refactor the verbose tracing in PLDM
1. Add verbose tracing in requester code 2. Change the prefix of verbose tracing to "Tx: " and "Rx: " 3. Remove explicit verbose tracing flag in libpldmresponder
Refactor the verbose tracing in PLDM
1. Add verbose tracing in requester code 2. Change the prefix of verbose tracing to "Tx: " and "Rx: " 3. Remove explicit verbose tracing flag in libpldmresponder 4. Change the prefix of pldmtool verbose tracing to "pldmtool: Tx: " and "pldmtool: Rx: "
Signed-off-by: Tom Joseph <rushtotom@gmail.com> Change-Id: Ie2c6b323e32e0828ed5ecaeb3e61943a98a2f089
show more ...
|
4fea7a20 | 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic8c3ff9b8b0fa64ef1d17ba305b9030284a1ee68
show more ...
|
70a47baf | 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
dos2unix conversion
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I78a4c2f28285ea30d66895b352402bfd12f95c00 |
06052cc5 | 16-Aug-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
build: un-hardcode prefix
/usr/share/pldm, /var/lib/pldm, and /etc are hardcoded in many places. Workflows such as: meson -Dprefix=$HOME/workspace -Dsysconfdir=$HOME/workspace builddir \ && ninj
build: un-hardcode prefix
/usr/share/pldm, /var/lib/pldm, and /etc are hardcoded in many places. Workflows such as: meson -Dprefix=$HOME/workspace -Dsysconfdir=$HOME/workspace builddir \ && ninja -C buildir install result in pldmd looking for its data in the wrong place. Fix by properly incorporating the user specified prefix into filesystem paths.
A number of paths remain hardcoded because they (presumably?) are owned and provided by other packages (phosphor-software-manager) and those packages do not provide any pkg-config from which we can extract their installation prefixes.
Change-Id: I140d7a65e85342fd108af41f33010b422a0f77a5 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
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 ...
|