History log of /openbmc/pldm/platform-mc/terminus_manager.hpp (Results 1 – 13 of 13)
Revision Date Author Comments
# fe252795 13-Mar-2025 Manojkiran Eda <manojkiran.eda@gmail.com>

Use system include directives for libpldm headers

libpldm is now an external dependency rather than an in-tree library.
Adjust the includes accordingly.

Change-Id: Ib2590b823039d3127d65f66976b294a2

Use system include directives for libpldm headers

libpldm is now an external dependency rather than an in-tree library.
Adjust the includes accordingly.

Change-Id: Ib2590b823039d3127d65f66976b294a2fb88e9c1
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...


# fdf61cc3 22-Jan-2025 Chaul Ly <chaul@amperecomputing.com>

platform-mc: Defer adding sensor objects from PDRs

After all PDRs retrieved from the other terminus are parsed into pdr
structs. They will be processed further to create sensor objects (e.g
via `add

platform-mc: Defer adding sensor objects from PDRs

After all PDRs retrieved from the other terminus are parsed into pdr
structs. They will be processed further to create sensor objects (e.g
via `addNumericSensor` function for Numeric Sensors).

During this phase for one sensor, sensor name is achieved (may enlist
Sensor Aux Name PDRs), and NumericSensor object is constructed.
Sensor object construction involves parsing pdr struct elements into
sensor class variables, D-Bus interface initialization and many calls
to set D-Bus object properties.

They are actually not blocking actions, but as it continuously loops
through sensor PDRs in `parseTerminusPDRs` to add sensors, they take
too much time and prevent BMC from processing events coming from other
termini. Not to mention the adding of new sensor types in the future
and the increase in sensor numbers, the total time will be large, while
this is not a primary task in the initialization phase of a terminus.

This commit defers `addNumericSensor` and `addCompactNumericSensor`
calls using sdeventplus::source::Defer event source, instead of
continuously calling them while looping through the sensor PDRs, to let
events coming from other termini break in and be processed by BMC.

Tested:

While BMC is getting, parsing sensor PDRs and creating sensor objects
from those PDRs, events can still be received from the other termini.

Change-Id: I4a3bacd4139b51c302e36614757fa1b5e5105f21
Signed-off-by: Chau Ly <chaul@amperecomputing.com>

show more ...


# 38e12aa2 21-Jan-2025 Thu Nguyen <thu@os.amperecomputing.com>

Support `terminus_name` option in `dbus_to_terminus_effecter`

Support `terminus_name` configuration option in
`dbus_to_terminus_effecter` to allow setting the destination terminus
beside `mctp_eid`.

Support `terminus_name` option in `dbus_to_terminus_effecter`

Support `terminus_name` configuration option in
`dbus_to_terminus_effecter` to allow setting the destination terminus
beside `mctp_eid`. This is helpful when the mctp endpoint Eid is not
static.

Change-Id: I8b1ed15741807086254146017c99c13ae667dac1
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>

show more ...


# 8fa40dbe 02-Apr-2024 Chau Ly <chaul@amperecomputing.com>

platform-mc: Call MCTP `.Recover` in the request timeout

In the current implementation, `pldmd` will register the request
messages to sendRecvPldmMsg. This API will returns the return error code
fro

platform-mc: Call MCTP `.Recover` in the request timeout

In the current implementation, `pldmd` will register the request
messages to sendRecvPldmMsg. This API will returns the return error code
from sendRecvPldmMsgOverMctp directly to the caller but not handle the
timeout error code.
From Mctp codeConstruct version 2.0 [1], the MCTP D-Bus interface
`au.com.codeconstruct.MCTP.Endpoint1` supports `.Recover` method to
recover the communication to one terminus. The `pldmd` should call this
method in time out.

[1] https://github.com/CodeConstruct/mctp/blob/v2.0/docs/endpoint-recovery.md#recover-method-design-considerations

Supports handling the timeout error code by calling to the `.Recover`
method under `au.com.codeconstruct.MCTP.Endpoint1` brought by mctpd.
This action will check if the endpoint is still available. pldm will
handle accordingly by continuing to communicate or removing the endpoint
based on mctpd upcoming behaviors.

Signed-off-by: Chau Ly <chaul@amperecomputing.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I71cc33a3630b5adbd65c485fe98148669ce635f6

show more ...


# 75e00422 19-Mar-2024 Chau Ly <chaul@amperecomputing.com>

platform-mc: Handle `Connectivity` propertiesChanged signal

From Mctp codeConstruct version 2.0 [1], mctpd supports `.Connectivity`
property under `au.com.CodeConstruct.MCTP.Endpoint` interface of t

platform-mc: Handle `Connectivity` propertiesChanged signal

From Mctp codeConstruct version 2.0 [1], mctpd supports `.Connectivity`
property under `au.com.CodeConstruct.MCTP.Endpoint` interface of the
endpoint. This commit handles the propertiesChanged signal from this
interface, and updates the Availability of the MCTP Endpoint accordingly
in the source to enable or disable message sending/receiving via that
endpoint of the terminus.

[1] https://github.com/CodeConstruct/mctp/blob/v2.0/docs/endpoint-recovery.md#proposed-design

When the discovery process first starts, it will only handle the
endpoints that have `Available` `.Connectivity`. It lets the
propertiesChanged signal trigger the adding of the endpoints when they
are back to` Available`.

On interfaceAdded signal, it assumes that mctpd only publishes available
endpoints to D-Bus, so it adds the endpoints to the terminus anyway.

Tested:
1. Enable `unsafe-writable-connectivity` option in PACKAGECONFIG of mctp
recipe.
2. After PLDM discovers all the endpoints, write `Degraded` to
`.Connectivity` of one of the endpoint.
3. Write it back to `Available` to see how message is stopped from being
sent/received via the endpoint.

Signed-off-by: Chau Ly <chaul@amperecomputing.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I5b7a38ae72e655b60d71396a1118f2809aaa3838

show more ...


# 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 ...


# 6e615622 21-Jun-2024 Thu Nguyen <thu@os.amperecomputing.com>

platform-mc: Support GetPLDMVersion

`GetPLDMCommands` in DSP0240 v1.1.0 requires the PLDM supported type
version. In the current implementation, when detecting new MCTP
endpoint, `pldmd` always send

platform-mc: Support GetPLDMVersion

`GetPLDMCommands` in DSP0240 v1.1.0 requires the PLDM supported type
version. In the current implementation, when detecting new MCTP
endpoint, `pldmd` always send `0xff 0xff 0xff 0xff` version to
`GetPLDMCommand` in discovery steps with the assumption that the
terminus will response for the request with any version of PLDM type.

Some termini don't accept `0xff 0xff 0xff 0xff` as input
version to `GetPLDMCommands` command because value `0xff` only has
meaning `A value of 0xFF in the "update" field indicates that the field
to be ignored.` in the `Section 12.6.1 Version field encoding` in `MCTP
Base spec` DSP0236 v1.3.1 but not in `PLDM base spec` DSP0240 v1.1.0
where `GetPLDMCommand` is detailed.

Support sending `GetPLDMVersion` from the supported PLDM types of one
terminus in the `discovery step` to get the PLDM version. And use that
version as input for `GetPLDMCommands` of that PLDM types to get
the supported PLDM commands.

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: Ia33c6722603801431e411eaf0647b74d8a1639d8

show more ...


# 51d66b59 06-Aug-2024 Thu Nguyen <thu@os.amperecomputing.com>

platform-mc: Set the local terminus as event receiver

Send `SetEventReceiver` to the discoveried terminus with the
configurable local EID to set the local terminus as event receiver.
Before send `Se

platform-mc: Set the local terminus as event receiver

Send `SetEventReceiver` to the discoveried terminus with the
configurable local EID to set the local terminus as event receiver.
Before send `SetEventReceiver` the local terminus also send
`EventMessageSupported` to get the `synchronyConfigurationSupported`.
The `eventMessageGlobalEnable` and `heartbeatTimer` options in the
`SetEventReceiver` command will depend on the responded
`synchronyConfigurationSupported`.

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Signed-off-by: Gilbert Chen <gilbertc@nvidia.com>
Change-Id: Ia798c1cd5d946ac519933bca60620e970fe10b0a

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 ...


# ef5c4eb0 25-Jul-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

fix type deduction failure in gcc-14

Looks like gcc-14 has even more strict & more accurate compile time
checks and the current pldm code does not compile with gcc-14 and
reports the following error

fix type deduction failure in gcc-14

Looks like gcc-14 has even more strict & more accurate compile time
checks and the current pldm code does not compile with gcc-14 and
reports the following error:

```
03:20:47 | ../git/platform-mc/terminus_manager.cpp: In member function 'exec::task<int> pldm::platform_mc::TerminusManager::discoverMctpTerminusTask()':
03:20:47 | ../git/platform-mc/terminus_manager.cpp:173:38: error: use of 'auto pldm::platform_mc::TerminusManager::findTerminusPtr(const pldm::MctpInfo&)' before deduction of 'auto'
03:20:47 | 173 | auto it = findTerminusPtr(mctpInfo);
03:20:47 | | ~~~~~~~~~~~~~~~^~~~~~~~~~
03:20:47 | ../git/platform-mc/terminus_manager.cpp: In member function 'void pldm::platform_mc::TerminusManager::removeMctpTerminus(const pldm::MctpInfos&)':
03:20:47 | ../git/platform-mc/terminus_manager.cpp:196:34: error: use of 'auto pldm::platform_mc::TerminusManager::findTerminusPtr(const pldm::MctpInfo&)' before deduction of 'auto'
03:20:47 | 196 | auto it = findTerminusPtr(mctpInfo);

```

compiler seems to be confused to decude the type for `auto`. Since
we already have a type definition, directly using that to feed
some extra information to the compiler at build time.

Change-Id: I4363afb5fc5f6177c96d313ac88be22418805fbd
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...


# 78dd846b 25-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

platform-mc: terminus_manager: Remove unused 'event' field

```
In file included from ../platform-mc/terminus_manager.cpp:1:
../platform-mc/terminus_manager.hpp:211:25: error: private field 'event' i

platform-mc: terminus_manager: Remove unused 'event' field

```
In file included from ../platform-mc/terminus_manager.cpp:1:
../platform-mc/terminus_manager.hpp:211:25: error: private field 'event' is not used [-Werror,-Wunused-private-field]
211 | sdeventplus::Event& event;
| ^
```

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

show more ...


# 29d2f4aa 13-Jul-2024 Patrick Williams <patrick@stwcx.xyz>

terminus_manager: fix spelling of Terminus

The function `findTerminusPtr` was missing an "r".

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


# 6c7fed4c 22-Feb-2022 Gilbert Chen <gilbert.chen@arm.com>

platform-mc: Added Terminus/TerminusManager class

Added requester::sendRecvPldmMsg awaiter type to be able to send and
receive PLDM message by coroutine.
Added TerminusManager to discover terminus f

platform-mc: Added Terminus/TerminusManager class

Added requester::sendRecvPldmMsg awaiter type to be able to send and
receive PLDM message by coroutine.
Added TerminusManager to discover terminus from EID list updated by
MCTPDiscovery class. The TerminusManager will initialize TID.

Signed-off-by: Gilbert Chen <gilbert.chen@arm.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: Ifa5bdfff50648f1d7fba8710e160de662e8f9e06

show more ...