History log of /openbmc/pldm/pldmd/pldmd.cpp (Results 1 – 25 of 86)
Revision Date Author Comments
# dd1f28b8 11-Mar-2025 Manojkiran Eda <manojkiran.eda@gmail.com>

Move dbus_to_terminus_effecter code to platform-mc

In the current state , pldm build breaks when attempting to perform
a debug-optimized build (`-O2` optimization), leading to the following
linker e

Move dbus_to_terminus_effecter code to platform-mc

In the current state , pldm build breaks when attempting to perform
a debug-optimized build (`-O2` optimization), leading to the following
linker error:

```
undefined reference to `pldm::platform_mc::TerminusManager::getActiveEidByName
(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
```

This issue is not encountered in the CI environment, as CI uses the
`-Og` optimization flag, which does not aggressively inline functions.
Consequently, the reference to `getActiveEidByName()` is resolved
without issue. However, when building the project with default
optimizations (debugoptimized [-O2]), the build fails because the
linker cannot resolve the reference to `getActiveEidByName()`, which is
inlined by the compiler.

To address this problem, there are three potential solutions:

1. Prevent Inlining of the Function:
We could use `__attribute__((noinline))` to prevent the compiler
from inlining `getActiveEidByName()`.

2. Move Source Files into `libpldmresponder`:
We could move the `platform-mc/manager.cpp` and
`platform-mc/terminus_manager.cpp` files into the `libpldmresponder`
so the compiler can resolve the reference directly within the
library.

3. Migrate `dbus_to_terminus_effecter.cpp` to the `platform-mc` folder:

The most appropriate solution appears to be migrating the
`dbus_to_terminus_effecter.cpp` file into the `platform-mc` directory.
This file is not inherently tied to `libpldmresponder` but functions as
a requester. Additionally, there are existing community patches that
allow the system to scale from a single host terminus to multiple
terminii, further justifying this move. So, solution #3 is the most
fitting at this stage. By relocating the `dbus_to_terminus_effecter`
code to the `platform-mc` folder, we can ensure proper modularity,
while also resolving the build issue in a clean and scalable manner.

Tested By:
1. meson build -Doptimization=2 works fine with the patchset.

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

show more ...


# 68444190 29-Jan-2025 Pavithra Barithaya <pavithrabarithaya07@gmail.com>

pldmd : Migrate to placement_new from reinterpret casting

reinterpret_cast is prohibited by the C++ core guidelines because
it takes the behavior outside the language definition and gives
problems w

pldmd : Migrate to placement_new from reinterpret casting

reinterpret_cast is prohibited by the C++ core guidelines because
it takes the behavior outside the language definition and gives
problems with type safety. Placement-new on the other-hand allows
to control the object storage while still properly instantiating
an object,keeping the behavior inside the C++ language
specification.

Change-Id: Ibb10a86bbd2f1044b79b965dfc865b6bf19075fc
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.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 ...


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


# 7c14fc47 17-Dec-2024 Jayanth Othayoth <ojayanth@gmail.com>

clang-tidy: Replace NULL with nullptr

Replaced all instances of NULL with nullptr to improve type safety
and clarity, as nullptr is the modern C++ standard for null pointers.

Tested: Build verified

clang-tidy: Replace NULL with nullptr

Replaced all instances of NULL with nullptr to improve type safety
and clarity, as nullptr is the modern C++ standard for null pointers.

Tested: Build verified

Change-Id: If9e6c34c48821a7cf8577a2166727ce7db06fadc
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...


# a743e384 26-Oct-2024 Chau Ly <chaul@amperecomputing.com>

oem-ampere: eventManager: Handle `BootProgress` sensor event

Add Ampere OEM code to handle the `sensorEvent` for PLDM `BootProgress`
sensor. In Ampere system, the SOC termini will have the TID 1 or

oem-ampere: eventManager: Handle `BootProgress` sensor event

Add Ampere OEM code to handle the `sensorEvent` for PLDM `BootProgress`
sensor. In Ampere system, the SOC termini will have the TID 1 or 2. The
Ampere OEM EventManager will check the terminus TID to confirm about the
terminus type. Base on the value of `BootProgress` sensor, the OEM code
will add the Redfish Log to report the boot progress of Ampere SoC.

Tested:
1. Power on the host.
2. Check the Redfish SEL log.

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

show more ...


# f48015b3 20-Nov-2023 Dung Cao <dung@os.amperecomputing.com>

platform-mc: Support pollForPlatFormEventMessage

Supports polling all events synchronously when the terminus sends
`pldmMessagePollEvent` with the event id. BMC will use the received
event id as inp

platform-mc: Support pollForPlatFormEventMessage

Supports polling all events synchronously when the terminus sends
`pldmMessagePollEvent` with the event id. BMC will use the received
event id as input for `pollForPlatformEventMessage` command to retrieve
the event data.

Change-Id: If01f63f30d3f57f8423c863ec776e83dda8e3042
Signed-off-by: Dung Cao <dung@os.amperecomputing.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>

show more ...


# 9fc79128 10-Sep-2024 Thu Nguyen <thu@os.amperecomputing.com>

platform-mc: Support CPER Event handler

Handle CPER event(0x07) which is defined in `Table 11 - PLDM Event
Type` and section `16.17 eventData format for CPEREvent` in DSP0248
v1.3.0.

The code suppo

platform-mc: Support CPER Event handler

Handle CPER event(0x07) which is defined in `Table 11 - PLDM Event
Type` and section `16.17 eventData format for CPEREvent` in DSP0248
v1.3.0.

The code supports:
1. Handle the PLDM event which has eventClass as CPEREvent (0x07).
2. Store the CPER data in PLDM CPER event to file at `/var/cper/`.
3. Call `CreateDump` method of `xyz.openbmc_project.Dump.Manager` D-Bus
service to create dump fault log.
4. The user can find the dump fault logs in Redfish FaultLog entries
thru URL `/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries`. Each
CPER entry includes the URL to download the created CPER data file
`/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/<id>/attachment`.
5. The user can use `cper-parser` in `libcper` to parse the CPER data in
the attached file.

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

show more ...


# 77e6fe7a 06-Aug-2024 Gilbert Chen <gilbertc@nvidia.com>

platform-mc: Added EventManager

Added eventManager to handle sensor event class(00h) which is defined in
table 11 of DSP0248 v1.3.0. In this commit, the eventManager supports to
receive event asynch

platform-mc: Added EventManager

Added eventManager to handle sensor event class(00h) which is defined in
table 11 of DSP0248 v1.3.0. In this commit, the eventManager supports to
receive event asynchronously. The commit will also log the Ipmitool SEL
log and Redfish log for PLDM sensor event messages.

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

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


# a34a64bb 30-Mar-2022 Thu Nguyen <thu@os.amperecomputing.com>

Support numeric effecters in dbus-to-host-effecter

Adds support of the numeric effecter PDR (section `28.11 Numeric
Effecter PDR` DSP0248 V1.3.0) type in dbus-to-host-effecter handler.
This handler

Support numeric effecters in dbus-to-host-effecter

Adds support of the numeric effecter PDR (section `28.11 Numeric
Effecter PDR` DSP0248 V1.3.0) type in dbus-to-host-effecter handler.
This handler will be applied for all PLDM termini but not only host.
The setting for one numeric effecter of one device can be:
{
"mctp_eid": 20,
"effecter_info": {
"effecterPdrType": 9,
"effecterID": 2,
"entityType": 32903,
"entityInstance": 2,
"containerID": 2,
"compositeEffecterCount": 1,
"checkHostState": false
},
"effecters": [
{
"dbus_info": {
"object_path": "/xyz/openbmc_project/sensors/power/A",
"interface": "xyz.openbmc_project.Sensor.Value",
"property_name": "Value",
"property_type": "double"
},
"effecterDataSize": 5,
"resolution": 1,
"offset": 0,
"unitModifier": 0
}
]
}

Where:
+ effecterPdrType to difference state/numeric effecter type. Default
is state effecter.
+ effecterID should be effecter ID and should not empty.
+ checkHostState can be set to false to bypass checking host state.
+ effecterDataSize, resolution, offset, unitModifier are from numeric
effecter PDR (section `28.11 Numeric Effecter PDR` DSP0248 V1.3.0)

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

show more ...


# eac61a4b 23-Feb-2022 Gilbert Chen <gilbert.chen@arm.com>

platform-mc: Add sensor manager

Added sensor_manager class. The sensor_manager class manages the timing
of sensor polling.

tested: Verified on ast2600 EVB which is connected to a PLDM device
over I

platform-mc: Add sensor manager

Added sensor_manager class. The sensor_manager class manages the timing
of sensor polling.

tested: Verified on ast2600 EVB which is connected to a PLDM device
over I2C. bmcweb can display the state of numeric sensor.

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

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


# 2005fb3d 25-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

pldmd: Remove unused MCTP_MSG_TYPE_PLDM

```
../pldmd/pldmd.cpp:67:19: error: unused variable 'MCTP_MSG_TYPE_PLDM' [-Werror,-Wunused-const-variable]
67 | constexpr uint8_t MCTP_MSG_TYPE_PLDM = 1;

pldmd: Remove unused MCTP_MSG_TYPE_PLDM

```
../pldmd/pldmd.cpp:67:19: error: unused variable 'MCTP_MSG_TYPE_PLDM' [-Werror,-Wunused-const-variable]
67 | constexpr uint8_t MCTP_MSG_TYPE_PLDM = 1;
| ^~~~~~~~~~~~~~~~~~
```

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

show more ...


# 3f5a969c 16-Jul-2024 Thu Nguyen <thu@os.amperecomputing.com>

pldmd: fix crash when re-request D-Bus name

`bus.request_name("xyz.openbmc_project.PLDM")` throws D-Bus exception
when the name `xyz.openbmc_project.PLDM` is already requested. This
causes the `pldm

pldmd: fix crash when re-request D-Bus name

`bus.request_name("xyz.openbmc_project.PLDM")` throws D-Bus exception
when the name `xyz.openbmc_project.PLDM` is already requested. This
causes the `pldmd` service will be crashed when build pldm source with
`oem-ibm` disabled & `system-specific-bios-json` disabled. Add
`try...catch...` to prevent the crash of `pldmd`.

Tested:
Was able to successfully start pldm service and see that the bus name
`xyz.openbmc_project.PLDM` was claimed with these options setups:
+ `oem-ibm` disabled & `system-specific-bios-json` enabled.
+ `oem-ibm` disabled & `system-specific-bios-json` disabled.

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

show more ...


# 0a422696 03-Jun-2024 Kamalkumar Patel <kamalkumar.patel@ibm.com>

pldm: Adding support to find system type

This commit adds support to find the system type by checking the JSON
directory presence when entity manager sends the system names. Once
system type is set

pldm: Adding support to find system type

This commit adds support to find the system type by checking the JSON
directory presence when entity manager sends the system names. Once
system type is set then PLDM continues the further operations like pdr
generation, system specific bios etc...

Testing:
Tested on real hardware

Change-Id: I3b0a7725a72cd3a3c8fe0a4c6ff6b38510a2a2ea
Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>

show more ...


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


# a881c170 21-Jun-2021 George Liu <liuxiwei@inspur.com>

Reduce multiple oem_ibm entry points in pldmd

Abstract the custom method of `OEM-IBM` into the oem-ibm.hpp file
to prevent the continuous increase of custom code and reduce multiple
`OEM-IBM` entry

Reduce multiple oem_ibm entry points in pldmd

Abstract the custom method of `OEM-IBM` into the oem-ibm.hpp file
to prevent the continuous increase of custom code and reduce multiple
`OEM-IBM` entry points in pldmd.

Tested: enabled oem-ibm and built pldm successfully.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ieddb8d12281553e70bdb1c333bd29425c9d14fb0

show more ...


# 087a751f 06-Apr-2024 Riya Dixit <riyadixitagra@gmail.com>

pldmd, requester, softoff & utilities: 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

pldmd, requester, softoff & utilities: 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: I230e9e1404db8c92c81e2f872183d691c91ff16c
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>

show more ...


# 44524a5f 14-Feb-2022 Gilbert Chen <gilbert.chen@arm.com>

requester: Modified MctpDiscovery class

Modified MctpDiscovery class to take list of managers instead of single
fwManager. The change is for adding platform-mc manager.
Added loadStaticEndpoints API

requester: Modified MctpDiscovery class

Modified MctpDiscovery class to take list of managers instead of single
fwManager. The change is for adding platform-mc manager.
Added loadStaticEndpoints API for MCTP layer which doesn't implement
/xyz/openbmc_project/MCTP/Endpoint.Interface

The patch is part of implementation of design document below.
https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/47252

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

show more ...


# 46f352ed 17-Mar-2024 Archana Kakani <archana.kakani@ibm.com>

pldm: Meson option for system specific bios attributes

PLDM users who want to use bios attributes based on the system type
can enable this meson option.
With disabled option default bios json files

pldm: Meson option for system specific bios attributes

PLDM users who want to use bios attributes based on the system type
can enable this meson option.
With disabled option default bios json files are picked to build
bios attribute tables.

Added meson option "system-specific-bios-json" to add the support
for system specific bios attributes.
Below is the pre-requisite to support system specific bios
attributes:
1. Entity Manager service is active
2. Entity Manager should have Decorator.Compatible interface
and system type in Names property under this interface
3. BIOS Attribute json files are added into the folder(Named on
the System Type property value) and should be installed
under /usr/share/pldm/bios/

With disabled "system-specific-bios-json" option default bios
attributes are populated.

Tested:
Poweron system-specific-bios-json enabled/disabled

Change-Id: I95a953cdb12c344d22f487b83040356a1b5fa937
Signed-off-by: Archana Kakani <archana.kakani@ibm.com>

show more ...


# 62dd8ff2 12-Feb-2024 Archana Kakani <archana.kakani@ibm.com>

pldm: Build BIOS Table Lazily

Entity manager service hosts the compatible interface and populates the
Names property with the chassis type. It is seen that the Names property
is updated pretty late

pldm: Build BIOS Table Lazily

Entity manager service hosts the compatible interface and populates the
Names property with the chassis type. It is seen that the Names property
is updated pretty late on the way to BMC ready state. And by that time
pldmd is already creating the bios table assuming that the system type
is not detected.

To fix this behavior, rather than creating the bios table early, we need
to wait until we get the system type from the entity manager daemon.

System Type is fetched from Entity Manager Decorator.Compatible
interface [1].

PLDM registers the service name only after building the BIOS tables, to
avoids failures to bios updates from other applications

Tested: Power off/On successfully in Simulator

[1] https://github.com/openbmc/entity-manager/commit/9bac6409d4bd684f058517f41de33ba1d17e5666

Change-Id: I4d431061eaaf8842f6382c2e83807f725653e19b
Signed-off-by: Archana Kakani <archana.kakani@ibm.com>

show more ...


# efacb6f7 11-Apr-2024 Thu Nguyen <thu@os.amperecomputing.com>

pldmd: fix memory leak

`pldmTransport.recvMsg` in `pldmd` will call
`pldm_transport_af_mctp_recv` in libpldm. This function allocates memory
of `requestMsg` and copy the MCTP request message data to

pldmd: fix memory leak

`pldmTransport.recvMsg` in `pldmd` will call
`pldm_transport_af_mctp_recv` in libpldm. This function allocates memory
of `requestMsg` and copy the MCTP request message data to `requestMsg`.
`pldmd` should free memory of requestMsg after using.

Tested:
1. Check the memory usage of `pldmd`. There is no memory leak.

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

show more ...


# cbe68b2d 23-Feb-2024 Sagar Srinivas <sagar.srinivas@ibm.com>

Remove iostream references

With the adoption of LG2 we do not need iostream
prints to the journal. The library was referred but
never used in these cases.

Signed-off-by: Sagar Srinivas <sagar.srini

Remove iostream references

With the adoption of LG2 we do not need iostream
prints to the journal. The library was referred but
never used in these cases.

Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
Change-Id: I11d3f00284e4f16b63cddb8da2fed14d59672ba1

show more ...


# a410c658 22-Jul-2021 Pavithra Barithaya <pavithra.b@ibm.com>

oem:ibm :Implement SetFruRecordTable

The commit implements the setFruRecordTable command
and also updates the DBus property for the IBM cable cards
for which the host sends a setFruRecordTable comma

oem:ibm :Implement SetFruRecordTable

The commit implements the setFruRecordTable command
and also updates the DBus property for the IBM cable cards
for which the host sends a setFruRecordTable command.

Tested: using pldmtool

Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
Change-Id: I70e4f85f627577d8ca1bc90447b10e9e2e8e7ccd

show more ...


1234