History log of /openbmc/pldm/common/utils.hpp (Results 1 – 25 of 45)
Revision Date Author Comments
# 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 ...


# 549e4bc8 05-Mar-2024 Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>

common: utils: Add get ancestors mapper function

Add get ancestors mapper function. A use case is getting an inventory
item's parent path for its board or chassis[1][2].

[1]: https://gerrit.openbmc

common: utils: Add get ancestors mapper function

Add get ancestors mapper function. A use case is getting an inventory
item's parent path for its board or chassis[1][2].

[1]: https://gerrit.openbmc.org/c/openbmc/pldm/+/73512/46/fw-update/inventory_item_manager.cpp#83
[2]: https://gerrit.openbmc.org/c/openbmc/pldm/+/67050/27/oem/meta/libpldmresponder/oem_meta_file_io_type_post_code.cpp#29

Change-Id: I7a25c8e11f7662fd07147b7da3b8db9fbff5e00e
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.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 ...


# b6d3943d 04-Jun-2024 Dung Cao <dung@os.amperecomputing.com>

platform-mc: discovery FRU data from terminus

As [1], `pldmd` will host Fru D-Bus inventory object path and Fru
`xyz.openbmc_project.Inventory.Decorator.*` D-Bus interfaces of one PLDM
terminus.
[1]

platform-mc: discovery FRU data from terminus

As [1], `pldmd` will host Fru D-Bus inventory object path and Fru
`xyz.openbmc_project.Inventory.Decorator.*` D-Bus interfaces of one PLDM
terminus.
[1] https://github.com/openbmc/docs/blob/master/designs/pldm-stack.md#processing-pldm-fru-information-sent-down-by-the-host-firmware

Support getting FRU data from terminus in the terminus discovery phase
and expose FRU data to the Fru D-Bus properties in
`xyz.openbmc_project.Inventory.Decorator.Asset`,
`xyz.openbmc_project.Inventory.Decorator.AssetTag`,
`xyz.openbmc_project.Inventory.Decorator.Compatible` and
`xyz.openbmc_project.Inventory.Decorator.Revision` interfaces of
`xyz/openbmc_project/FruPldm/<Terminus_Name>` D-Bus object path which is
created by `xyz.openbmc_project.PLDM` D-Bus service. The object path
will be available until the endpoint EID is removed from the MCTP
D-Bus.

```
busctl introspect xyz.openbmc_project.PLDM /xyz/openbmc_project/inventory/system/board/S0
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Inventory.Decorator.Asset interface - - -
.BuildDate property s "" emits-change writable
.Manufacturer property s "" emits-change writable
.Model property s "00014003" emits-change writable
.PartNumber property s "" emits-change writable
.SerialNumber property s "000000218" emits-change writable
.SparePartNumber property s "" emits-change writable
.SubModel property s "" emits-change writable
xyz.openbmc_project.Inventory.Decorator.AssetTag interface - - -
.AssetTag property s "" emits-change writable
xyz.openbmc_project.Inventory.Decorator.Compatible interface - - -
.Names property as 0 emits-change writable
xyz.openbmc_project.Inventory.Decorator.Revision interface - - -
.Version property s "x.x.00008.004" emits-change writable
xyz.openbmc_project.Inventory.Item.Board interface - - -

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

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


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


# b8cf46b8 14-Jun-2024 Thu Nguyen <thu@os.amperecomputing.com>

platform-mc: Terminus name handling

`PLDM-stack: Adding sensor monitoring section` design spec details that
the `Terminus name` is required to create the terminus's sensors,
states, effecters... D-B

platform-mc: Terminus name handling

`PLDM-stack: Adding sensor monitoring section` design spec details that
the `Terminus name` is required to create the terminus's sensors,
states, effecters... D-Bus interfaces and `Terminus Name` can be
encoded in the Terminus's `Entity Auxiliary Names PDR` or in the MCTP
Entity-manager endpoint EID configuration file.
[1] https://gerrit.openbmc.org/c/openbmc/docs/+/47252/34/designs/pldm-stack.md#433

Section `28.18 Entity Auxiliary Names PDR` in DSP0248 V1.2.2 details
about the PDRs response for the name of one PLDM entity. When the
containerID is `0x0000` this entity is `Overall system` or `top most
containing entity`. The name of this entity will can be used as
`Terminus name`.

Support parsing `Entity Auxiliary Names PDR` and find the `Terminus
name` if it is reponsed in the terminus' PDRs. `Terminus Name` string
will be assigned to local variable and can be used as prefix for
sensors, state, effecters... names.

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

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


# 7d427f16 16-May-2024 Kamalkumar Patel <kamalkumar.patel@ibm.com>

pldm: Rearranging datatype declaration

This commit adds support to eliminating duplication of datatypes which
enhancing clarity and manageability throughout the pldm repository.
This is rearrangemen

pldm: Rearranging datatype declaration

This commit adds support to eliminating duplication of datatypes which
enhancing clarity and manageability throughout the pldm repository.
This is rearrangement of declaration of data types so it can be used
host-bmc and oem layer both the places.

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

show more ...


# 2576aecd 17-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

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

show more ...


# 516122e0 07-May-2024 Kamalkumar Patel <kamalkumar.patel@ibm.com>

Add Json Config support for entity to DBus string

The entity map comprises both entity types and their corresponding
names, essential for generating unique D-Bus paths for each entity.
However, chal

Add Json Config support for entity to DBus string

The entity map comprises both entity types and their corresponding
names, essential for generating unique D-Bus paths for each entity.
However, challenges arise due to variations in path generation across
companies, often dictated by differing entity types. To address this,
enabling configurability of EntityID becomes imperative, empowering
communities to tailor configurations to their specific use cases.

Testing:
Unit tests passed

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

show more ...


# 4e69d252 10-May-2024 Kamalkumar Patel <kamalkumar.patel@ibm.com>

host-bmc: refine remote terminus functionality

This commit introduces support for migrating remote terminus-related
functionalities into the host-bmc directory, a move aimed at optimizing
remote ter

host-bmc: refine remote terminus functionality

This commit introduces support for migrating remote terminus-related
functionalities into the host-bmc directory, a move aimed at optimizing
remote terminus operations for future endeavors. By consolidating these
functionalities, tracking and implementing future enhancements become
more streamlined and manageable.

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

show more ...


# 2ec8269f 29-Apr-2024 Pavithra Barithaya <pavithrabarithaya07@gmail.com>

Add getSubtreePaths utility functions

Added a getSubTreePaths utility function that can return the
subtree dbus paths that implement the particular dbus interface.

Change-Id: Ifb8f6d571bcb2291ca3a4

Add getSubtreePaths utility functions

Added a getSubTreePaths utility function that can return the
subtree dbus paths that implement the particular dbus interface.

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


# 92fb0b55 17-Apr-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Revert "Adding severity when reporting an error"

This reverts commit d28f08cf0238435ac92184fabaafd9c76bff62cf.

Reason for revert : Pel severity is completely openpower-specific , we should not poll

Revert "Adding severity when reporting an error"

This reverts commit d28f08cf0238435ac92184fabaafd9c76bff62cf.

Reason for revert : Pel severity is completely openpower-specific , we should not polluting common code with IBM specific things, hence reverting this change for now.

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

show more ...


# 897b0f8b 14-Apr-2024 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

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

show more ...


# 754041d0 20-Feb-2024 Riya Dixit <riyadixitagra@gmail.com>

utils: Retrieval of managed objects of DBUS

This commit implements functionality to retrieve the managed object of a
specific DBUS service on a particular path. Additionally implements a
function t

utils: Retrieval of managed objects of DBUS

This commit implements functionality to retrieve the managed object of a
specific DBUS service on a particular path. Additionally implements a
function template for inventory objects which efficiently enables
retrieval of managed object for Inventory Manager.

Tested: Added unit test cases for checking the return value.

Change-Id: Ide652f843db1623bdacebf3e269e03895bbb7f1a
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>

show more ...


# d28f08cf 15-Dec-2021 Pavithra Barithaya <pavithra.b@ibm.com>

Adding severity when reporting an error

Severity is part of the PEL User Header section, and is used
to specify the PEL severity. This commit adds an option to pass
severity parameter while logging

Adding severity when reporting an error

Severity is part of the PEL User Header section, and is used
to specify the PEL severity. This commit adds an option to pass
severity parameter while logging PEL. This will help to classify PELs
based on their severity. The commit also maintains uniformity in
the PEL Error logged.

Tested: By creating the error logs(pel) in error scenarios.

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

show more ...


# 5e542be2 13-Aug-2021 Pavithra Barithaya <pavithra.b@ibm.com>

oem-ibm: Add util API for setting the present property

This commit adds a common function to set the present property
to true for all the present FRUs.

Signed-off-by: Pavithra Barithaya <pavithra.b

oem-ibm: Add util API for setting the present property

This commit adds a common function to set the present property
to true for all the present FRUs.

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

show more ...


# 5db6e872 01-Dec-2023 Sagar Srinivas <sagar.srinivas@ibm.com>

Fix pldm bump fail

Fix for the bump CI failure on yosemite4 systems
https://gerrit.openbmc.org/c/openbmc/openbmc/+/68035

TESTED: Ran Bitbake for a yosemite4 obmc-phosphor-image

Signed-off-by: Saga

Fix pldm bump fail

Fix for the bump CI failure on yosemite4 systems
https://gerrit.openbmc.org/c/openbmc/openbmc/+/68035

TESTED: Ran Bitbake for a yosemite4 obmc-phosphor-image

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

show more ...


# 91a092f6 18-Sep-2023 vkaverap@in.ibm.com <vkaverap@in.ibm.com>

PLDM:Use new alias of DBUS_TIMEOUT for bus.call

This commit uses a new global variable for DBUS_TIMEOUT which is included as an input parameter for bus.call dbus calls. The new alias makes the bus.c

PLDM:Use new alias of DBUS_TIMEOUT for bus.call

This commit uses a new global variable for DBUS_TIMEOUT which is included as an input parameter for bus.call dbus calls. The new alias makes the bus.call function shorter and readable.

Change-Id: I336c97bc0631d5370ff3648e41f50e3e283d771b
Signed-off-by: vkaverap@in.ibm.com <vkaverap@in.ibm.com>

show more ...


# 5b71b86f 21-Aug-2023 vkaverap@in.ibm.com <vkaverap@in.ibm.com>

PLDM: 5 sec timeout for dbus calls without reply

This commit adds 5 second dbus timeout value to dbus calls with no reply. Previously a commit was merged that included 5 seconds dbus timeout value f

PLDM: 5 sec timeout for dbus calls without reply

This commit adds 5 second dbus timeout value to dbus calls with no reply. Previously a commit was merged that included 5 seconds dbus timeout value for all dbus call with reply.

This is added to make sure PLDM does not wait for more than 5 seconds when a dbus call is made with or without reply if no response is received from other daemon or host.

The 5 second timeout value is overridden to 10 seconds in meta-ibm layer

Change-Id: Ic20005d903732ac58bb22a657bf1b0c07439d435
Signed-off-by: vkaverap@in.ibm.com <vkaverap@in.ibm.com>

show more ...


# df9a6d34 22-Dec-2020 George Liu <liuxiwei@inspur.com>

Handle entity association records from host

- Get the PDRs from host, traverse the entity association structure
and construct the D-Bus object path according to the entity type ID
and container

Handle entity association records from host

- Get the PDRs from host, traverse the entity association structure
and construct the D-Bus object path according to the entity type ID
and container type ID.

- eg:
/xyz/openbmc_project/inventory/system1/chassis1/io_board1/powersupply1
/xyz/openbmc_project/inventory/system1/chassis1/io_board1/powersupply2
/xyz/openbmc_project/inventory/system1/chassis2/io_board2/powersupply1
/xyz/openbmc_project/inventory/system1/chassis2/io_board2/powersupply2

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

show more ...


12