History log of /openbmc/pldm/libpldmresponder/fru.cpp (Results 1 – 25 of 45)
Revision Date Author Comments
# 89644441 31-Mar-2024 Riya Dixit <riyadixitagra@gmail.com>

libpldmresponder: 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

libpldmresponder: 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: I7dc5c308a8cd76573995e07d01d1a6037bca31ba
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>

show more ...


# 15b94111 10-Apr-2024 Pavithra Barithaya <pavithrabarithaya07@gmail.com>

fix constVariableReference cpp style check

Declaring the const-ness of a parameter is just another form of
type safety. The benefit of const correctness is that it prevents
you from inadvertently mo

fix constVariableReference cpp style check

Declaring the const-ness of a parameter is just another form of
type safety. The benefit of const correctness is that it prevents
you from inadvertently modifying something you didn’t expect
would be modified. The commit fixes places in the code where a
parameter could be a constant.

Change-Id: Ie6f1d4b37373979a3efef8cb617294d41dec888c
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>

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


# 06f9b29e 31-Mar-2024 Sagar Srinivas <sagar.srinivas@ibm.com>

Use std::map.contains as per latest c++

This commit replaces occurrences of 'find' with
'contains' to access elements in a std::map
according to the latest C++ standard (since C++20).

However, cont

Use std::map.contains as per latest c++

This commit replaces occurrences of 'find' with
'contains' to access elements in a std::map
according to the latest C++ standard (since C++20).

However, contains() is not suitable in all situations
as in the case where we want to use the element contained
in the map using contains(), then it would do 2 searches
instead of 1 in the case where we use find() which fetches
the element from the map also.

Here are some relevant links to C++ documentation and
resources:

[1]: https://en.cppreference.com/w/cpp/container/map/find
[2]: https://en.cppreference.com/w/cpp/container/map/contains
[3]: https://wg21.link/N4861

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

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


# 2a103ef1 14-Feb-2024 Kamalkumar Patel <kamalkumar.patel@ibm.com>

Enhancing misguiding error trace

- There are some of the listed paths below which don't have "Present"
property. Due to this, the FRU present property check was throwing
"Resource not found" error w

Enhancing misguiding error trace

- There are some of the listed paths below which don't have "Present"
property. Due to this, the FRU present property check was throwing
"Resource not found" error which misguides the user.

- The commit adds support to fix this misguiding error trace.

Paths:
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/fan0_0
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/fan0_1
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan1/fan1_0
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan1/fan1_1
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan2/fan2_0
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan2/fan2_1
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan3/fan3_0
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan3/fan3_1
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan4/fan4_0
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan4/fan4_1
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan5/fan5_0
/xyz/openbmc_project/inventory/system/chassis/motherboard/fan5/fan5_1

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

show more ...


# 58cbcaf2 06-Oct-2023 Kamalkumar Patel <kamalkumar.patel@ibm.com>

PLDM:Catching exception precisely and printing it

Correcting catch block in PLDM repo to print all
exception precisely so pldm trace can be more
useful to identify defect easily.

Change-Id: If2e86d

PLDM:Catching exception precisely and printing it

Correcting catch block in PLDM repo to print all
exception precisely so pldm trace can be more
useful to identify defect easily.

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

show more ...


# 9e6631e2 22-Jan-2024 Pavithra Barithaya <pavithra.b@ibm.com>

fru: fix in the FRU Record Table

In the current design, when PLDM builds the FRU table, it
incorporates padbytes and checksum. However, the process of
adding or deleting a FRU triggers a rebuild of

fru: fix in the FRU Record Table

In the current design, when PLDM builds the FRU table, it
incorporates padbytes and checksum. However, the process of
adding or deleting a FRU triggers a rebuild of the table, including
the addition of padbytes again.This repetition is leading to a crash
in pldmtool after multiple add/remove operations.

To address the above issue, the proposed commit resolves the problem
by eliminating the inclusion of padbytes and checksum during the
initial construction of the FRU table. Instead, these elements are
added based on requests from the remote endpoint via the
getFRURecordTable command.

Tested: Powered on fine with the change. The pldmtool crash was
not seen.

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

show more ...


# b75202e5 19-Oct-2023 Manojkiran Eda <manojkiran.eda@gmail.com>

Remove a bad trace

During the lg2 refactoring , there was a bad trace that was added
in-accurately. It seem to look like a debug trace which could flood
the journal, removing it as it's not needed f

Remove a bad trace

During the lg2 refactoring , there was a bad trace that was added
in-accurately. It seem to look like a debug trace which could flood
the journal, removing it as it's not needed for release builds.

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

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


# 797f338f 22-Aug-2023 Riya Dixit <riyadixitagra@gmail.com>

PLDM: Implementing Phosphor-Logging/LG2 logging

This commit migrates std::cerr/cout added as part
of new changes in PLDM to LG2.

Change-Id: I8e85732684d47b6740521e95712433a7c6760d8a
Signed-off-by:

PLDM: Implementing Phosphor-Logging/LG2 logging

This commit migrates std::cerr/cout added as part
of new changes in PLDM to LG2.

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

show more ...


# 8e715ae9 04-Jul-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

pldm: Enhance the find & add pdr utilities

Change the names of pldm_entity_association_tree_find() and
pldm_entity_association_tree_add() in accordance with
the changes in libpldm to
pldm_entity_ass

pldm: Enhance the find & add pdr utilities

Change the names of pldm_entity_association_tree_find() and
pldm_entity_association_tree_add() in accordance with
the changes in libpldm to
pldm_entity_association_tree_find_with_locality() and
pldm_entity_association_tree_add_entity. As per -
https://gerrit.openbmc.org/c/openbmc/libpldm/+/63585 and
https://gerrit.openbmc.org/c/openbmc/libpldm/+/65623. Also,
change by adding parameters according to the newly changed
signatures.

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

show more ...


# 5bfb0dcb 01-May-2021 George Liu <liuxiwei@inspur.com>

Refactor buildFRUTable and update to Association tree

The previous logic is to obtain the entity of the parent by parsing
the DBus object path. If the obtaining fails it skipped the current
entity
t

Refactor buildFRUTable and update to Association tree

The previous logic is to obtain the entity of the parent by parsing
the DBus object path. If the obtaining fails it skipped the current
entity
type and continued to obtain the entity of the next parent.

In this commit the code is optimised to not skip the current entity
type.

The intent behind this commit is to refactor the buildFRUTable
method and their pldm entities need to be created in turn according
to the object path and update the association tree.

Tested:
There is one CPU, one DIMM, two powersupplies on my system
~# pldmtool platform getpdr -d 6
{
"nextRecordHandle": 7,
"responseCount": 26,
"recordHandle": 6,
"PDRHeaderVersion": 1,
"PDRType": "Entity Association PDR",
"recordChangeNumber": 0,
"dataLength": 16,
"containerID": 1,
"associationType": "Physical",
"containerEntityType": "System (logical)",
"containerEntityInstanceNumber": 1,
"containerEntityContainerID": 0,
"containedEntityCount": 1,
"containedEntityType[1]": "System chassis (main enclosure)",
"containedEntityInstanceNumber[1]": 1,
"containedEntityContainerID[1]": 1
}

~# pldmtool platform getpdr -d 7
{
"nextRecordHandle": 8,
"responseCount": 26,
"recordHandle": 7,
"PDRHeaderVersion": 1,
"PDRType": "Entity Association PDR",
"recordChangeNumber": 0,
"dataLength": 16,
"containerID": 2,
"associationType": "Physical",
"containerEntityType": "System chassis (main enclosure)",
"containerEntityInstanceNumber": 1,
"containerEntityContainerID": 1,
"containedEntityCount": 1,
"containedEntityType[1]": "System Board",
"containedEntityInstanceNumber[1]": 1,
"containedEntityContainerID[1]": 2
}

~# pldmtool platform getpdr -d 8
{
"nextRecordHandle": 9,
"responseCount": 44,
"recordHandle": 8,
"PDRHeaderVersion": 1,
"PDRType": "Entity Association PDR",
"recordChangeNumber": 0,
"dataLength": 34,
"containerID": 3,
"associationType": "Physical",
"containerEntityType": "System Board",
"containerEntityInstanceNumber": 1,
"containerEntityContainerID": 2,
"containedEntityCount": 4,
"containedEntityType[1]": "Processor",
"containedEntityInstanceNumber[1]": 1,
"containedEntityContainerID[1]": 3,
"containedEntityType[2]": "Memory chip",
"containedEntityInstanceNumber[2]": 1,
"containedEntityContainerID[2]": 3,
"containedEntityType[3]": "Power Supply",
"containedEntityInstanceNumber[3]": 1,
"containedEntityContainerID[3]": 3,
"containedEntityType[4]": "Power Supply",
"containedEntityInstanceNumber[4]": 2,
"containedEntityContainerID[4]": 3
}

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

show more ...


# b0ba34d1 17-Jul-2023 Andrew Jeffery <andrew@aj.id.au>

libpldmresponder: Migrate to pldm_entity_association_pdr_add_check()

pldm_entity_assocation_pdr_add() is deprecated in libpldm as it used
assert() for handling error cases.
pldm_entity_association_p

libpldmresponder: Migrate to pldm_entity_association_pdr_add_check()

pldm_entity_assocation_pdr_add() is deprecated in libpldm as it used
assert() for handling error cases.
pldm_entity_association_pdr_add_check() instead returns a value
indicating success or failure.

We throw a std::runtime_error for now which at least unwinds the stack,
unlike assert(). With this approach the problem is reduced to needing to
refactor internal pldmd APIs, rather than despairing at libpldm aborting
the process out of existence.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I08ebafc94cd7a392ec8f18b6c5feb75ba72cd028

show more ...


# 2e248e8e 03-Jul-2023 Andrew Jeffery <andrew@aj.id.au>

libpldmresponder: Migrate to pldm_pdr_add_fru_record_set_check()

pldm_pdr_add_fru_record_set() is deprecated in libpldm as it used
assert() to communicate failure to the caller.
pldm_pdr_add_fru_rec

libpldmresponder: Migrate to pldm_pdr_add_fru_record_set_check()

pldm_pdr_add_fru_record_set() is deprecated in libpldm as it used
assert() to communicate failure to the caller.
pldm_pdr_add_fru_record_set_check() instead returns a value indicating
success or failure.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I88ed90a03b15a949641788906495c9507a5a196b

show more ...


# 663783b6 02-Jul-2023 Andrew Jeffery <andrew@aj.id.au>

libpldmresponder: Migrate to get_fru_record_by_option_check()

get_fru_record_by_option() is deprecated in libpldm as it relied on
assert() to communicate failures from the implementation.
get_fru_re

libpldmresponder: Migrate to get_fru_record_by_option_check()

get_fru_record_by_option() is deprecated in libpldm as it relied on
assert() to communicate failures from the implementation.
get_fru_record_by_option_check() instead returns a value indicating
whether or not it succeeded.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I621bdcc713e37bb12ac40825edb399b151123427

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


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


12