History log of /openbmc/phosphor-logging/extensions/openpower-pels/pldm_interface.cpp (Results 1 – 15 of 15)
Revision Date Author Comments
# f045e837 13-Mar-2025 Matt Spinler <spinler@us.ibm.com>

PEL: Ensure PLDM response valid before using it

Make sure that pldm_transport_recv_msg() was successful before passing
the response value it returns into pldm_msg_hdr_correlate_response().
Otherwise

PEL: Ensure PLDM response valid before using it

Make sure that pldm_transport_recv_msg() was successful before passing
the response value it returns into pldm_msg_hdr_correlate_response().
Otherwise, a null pointer may be passed into it which will cause a
crash.

Also, instead of manually freeing the response on the function exit
points, just wrap it in a small Response struct that will free it in its
destructor.

Change-Id: I213c44758c248d14d83144a7bad397e84fe5602b
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# 9fdcad5a 07-Feb-2025 Matt Spinler <spinler@us.ibm.com>

PELs: Use pldm_msg_hdr_correlate_response()

This call to ensure the PLDM response matches the PLDM request for the
'New PEL Available' command was previously missing (since it didn't
exist at the ti

PELs: Use pldm_msg_hdr_correlate_response()

This call to ensure the PLDM response matches the PLDM request for the
'New PEL Available' command was previously missing (since it didn't
exist at the time this code was written), causing the code to think it
got the correct response when really it was someone else's.

It would then move on to the next PEL before it actually heard back
about the current one, causing issues on the host side.

Change-Id: I471d7727a2b8c77a0ffc85c15cef7531898d22d7
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# ec6f1411 17-Oct-2024 Eddie James <eajames@linux.ibm.com>

openpower-pels: Check response header

Using the new PLDM API requires checking the response header for the
request and datagram flags, as those indicate that the message isn't
really a response.

Ch

openpower-pels: Check response header

Using the new PLDM API requires checking the response header for the
request and datagram flags, as those indicate that the message isn't
really a response.

Change-Id: I38f8e77bd5defaf611695649bb75d589b2548f17
Signed-off-by: Eddie James <eajames@linux.ibm.com>

show more ...


# 075c7923 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: I21d2ca8065f24fd73509229c517f5caf48934b60
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 0387a74e 01-Jul-2024 Lakshmi Yadlapati <lakshmiy@us.ibm.com>

openpower-pels: Move to libpldm pldm_transport APIs

- Replaced the deprecated pldm transport APIs with the new libpldm
pldm_transport APIs.
- Updated the receive function to pass pldm_transport as

openpower-pels: Move to libpldm pldm_transport APIs

- Replaced the deprecated pldm transport APIs with the new libpldm
pldm_transport APIs.
- Updated the receive function to pass pldm_transport as a parameter.
- Modified the function signatures and their calls to ensure the
pldm_transport parameter is properly passed.

This change migrates the application off of the deprecated "requester"
APIs in libpldm.

We don't currently have the infrastructure in place to get the correct
TIDs, so to keep everything working as before use the EID as the TID in
the EID-to-TID mapping.

Change-Id: Ib143dc122637ef7e390fceb64f1f94c65172ae39
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>

show more ...


# 49bcbe92 26-Jun-2024 Patrick Williams <patrick@stwcx.xyz>

openpower-pels: use libpldm directly for IID allocation

libpldm provides APIs for allocating instance IDs directly, which
eliminates the need for remote dbus calls to the pldm daemon. Refactor
the

openpower-pels: use libpldm directly for IID allocation

libpldm provides APIs for allocating instance IDs directly, which
eliminates the need for remote dbus calls to the pldm daemon. Refactor
the code to use these APIs and eliminate all the dbus operations.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia1214fe6d68cb49dc1c91af07b7046ac652fb9c4

show more ...


# 7cc55b58 19-Jun-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

extension: openpower-pels: Replace deprecated libpldm header path

There are more OEMs than IBM contributing to libpldm, so the OEM headers
were restructured. Replace the deprecated IBM OEM header pa

extension: openpower-pels: Replace deprecated libpldm header path

There are more OEMs than IBM contributing to libpldm, so the OEM headers
were restructured. Replace the deprecated IBM OEM header path with the
namespaced path.

The patch was generated by with the coccinelle[1] script from [2]:

```
$ spatch \
--sp-file .../libpldm/origin/evolutions/current/oem-ibm-header-compat.cocci \
--in-place \
$(git ls-files | grep -E '\.[ch](pp)?')
```

[1]: https://coccinelle.gitlabpages.inria.fr/website/
[2]: https://gerrit.openbmc.org/c/openbmc/libpldm/+/72202

Change-Id: Ieeb17d3e302b56e577f8a5306fd30e749273d3ff
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 527ff346 29-Jun-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Handle failing to start a PLDM cmd better

A recent PLDM bug caused the registerReceiveCallback() function, which
is used to setup listening for the PLDM response from the host when
telling the

PEL: Handle failing to start a PLDM cmd better

A recent PLDM bug caused the registerReceiveCallback() function, which
is used to setup listening for the PLDM response from the host when
telling them about a new PEL, to throw an exception.

When this happened, the code got stuck in the 'in progress' state, so it
would never try again when the next PEL came in.

Fix that by having startCommand() throw an exception instead of calling
the failure response function callback. With this change, the code will
continue on to call the cleanupCmd() function so everything is ready
when the next PEL comes in.

Tested:
With the bad PLDM code, after the first PEL ran out of retry attempts,
created another PEL and saw the code attempt again to call PLDM. Also,
wrote a new unit test case for it.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I38034440435d6a86e8dd880eef09499f19dd6e9c

show more ...


# 1b41886d 29-Jun-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Use lg2 in PLMD related files

There are a lot of debug traces in the code that uses PLDM to send PELs
up to the OS. Convert the files that deal with that to lg2 so that the
debug traces can be

PEL: Use lg2 in PLMD related files

There are a lot of debug traces in the code that uses PLDM to send PELs
up to the OS. Convert the files that deal with that to lg2 so that the
debug traces can be seen by just running phosphor-log-manager from the
command line where lg2 will print to the console as opposed to having to
change the journal priority in an overlay file.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I818bab1bf636fe83d3e7ff64c1bc31ad5e09705e

show more ...


# 2544b419 04-Oct-2022 Patrick Williams <patrick@stwcx.xyz>

clang-format: update with latest

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I329396457b83bb2eb8740629b4ac1fbe9106bced


# d26fa3e7 21-Apr-2021 Patrick Williams <patrick@stwcx.xyz>

openpower-pels: clean up various compile warnings

Compile warnings observed when compiling parts of the
openpower-pels (or corresponding tests) under stricter
compiler warning flags of Meson.

Issue

openpower-pels: clean up various compile warnings

Compile warnings observed when compiling parts of the
openpower-pels (or corresponding tests) under stricter
compiler warning flags of Meson.

Issues fixed:
- many unused parameters
- invalid case fall-through
- excess semi-colons
- incorrect 'const' on return-by-value type
- removal of variable length array in test case
- uncaught return from 'system' call in test case

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I8af69184042cf8661d1307a02ecf3afcab4724a1

show more ...


# 2843ba28 03-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Get PLDM instance ID asynchonously

Start actually getting the PLDM instance ID from the PLDM daemon for use
in sending PLDM commands, and refactor the PLDM interface class to do
this using sd_b

PEL: Get PLDM instance ID asynchonously

Start actually getting the PLDM instance ID from the PLDM daemon for use
in sending PLDM commands, and refactor the PLDM interface class to do
this using sd_bus_call_method_async. After the instance ID is obtained
then the rest of the PLDM command sequence can be run to notify the host
of PELs.

This is necessary because the PLDM daemon may be making a call to the
logging daemon at the same time to create a new OpenBMC event log due
to a host PEL that came down, and there will be a deadlock if the method
call was synchronous.

A new instance ID is needed for every new PLDM command, unless there was
a failure before the host could respond, so the code keeps track of when
it needs to get a new ID.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0e00d1180363250662bd85f9ec69813ada500931

show more ...


# a44efe48 03-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Common function to call host iface response

Add a function to the HostInterface class to invoke the user defined
command response function if there is one, and then change the code to
use this

PEL: Common function to call host iface response

Add a function to the HostInterface class to invoke the user defined
command response function if there is one, and then change the code to
use this new function.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia376923df70863bcd46120cf23918c2f255f984f

show more ...


# 9694ba62 29-Jan-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

openpower-pels: react to PLDM API change

The PLDM NewFileAvailable request now takes in a uint64 file size
instead of uint32. A corresponding request buffer size correction has
been added.

Change-I

openpower-pels: react to PLDM API change

The PLDM NewFileAvailable request now takes in a uint64 file size
instead of uint32. A corresponding request buffer size correction has
been added.

Change-Id: I68f4a69164b4a3924f48621f94d5492eab230f0e
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# 5c350fdf 12-Dec-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add PLDM command handler

Derive a PLDMInterface class from the HostInterface class to implement
sending the 'new file available' PLDM command to notify the host of the
ID and size of PELs.

The

PEL: Add PLDM command handler

Derive a PLDMInterface class from the HostInterface class to implement
sending the 'new file available' PLDM command to notify the host of the
ID and size of PELs.

The command response is received asynchronously by watching for activity
on the MCTP file descriptor that was used for the command. If a
response isn't received in 10 seconds, it will be considered a failure.

Both on response success and failure the class will call the registered
callback function and pass it the result.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ica00da590628cc81114a48e2831a436dc2115269

show more ...