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


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


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


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


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


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


# d2e48991 05-Dec-2023 Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>

Refactor: Handler expands TID parameter

Adding tid as a parameter to each handler so that the handler
can know the message sent from which device

Tested:
- Unit Tests passed.

Change-Id: Ida37bf611

Refactor: Handler expands TID parameter

Adding tid as a parameter to each handler so that the handler
can know the message sent from which device

Tested:
- Unit Tests passed.

Change-Id: Ida37bf61146d2f59ea11ebc7bf009f7837ed496d
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>

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


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


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


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


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


# 4f2538a6 05-Mar-2021 Pavithra Barithaya <pavithra.b@ibm.com>

BMC RR : Read and update the status for BMC reset

This commit reads the status of the host owned sensors by
sending a getStateSensorReading command and then
updates the D-Bus backend for BMC reset.

BMC RR : Read and update the status for BMC reset

This commit reads the status of the host owned sensors by
sending a getStateSensorReading command and then
updates the D-Bus backend for BMC reset.

This commit also updates the TLPDR from the host
based on the valid bit in the TLPDR.

Earlier the PDR record handles where assigned in an incremental order
starting from 0, now the numbering has been decided
to be within the specified range as below
BMC: 0x00000001 to 0x00FFFFFF (0x00000000 is reserved per PLDM spec)
Hostboot: 0x01000000 to 0x01FFFFFF
PHYP: 0x02000000 to 0x02FFFFFF
Reserved: 0x03000000 to 0xFFFFFFFF

This commit handles the numbering of the PDR record handles.

Tested the following scenarios on a rainier system
1. restart pldmd when Host is not running
2. restart pldmd when Host is running
3. restart pldmd when Host is not running and then ipl

Using pldmtool the DBus backened is verified.

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

show more ...


# 03b01ca8 28-Jun-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

Add support for vendor specific FruDbusLookup

In the current state, a vendor could not define the FRU's
that he wants to send to the host.

This commit adds a fru_master.json that can be used while

Add support for vendor specific FruDbusLookup

In the current state, a vendor could not define the FRU's
that he wants to send to the host.

This commit adds a fru_master.json that can be used while
building the master , and the json would be replaced with
fru_master.json from the oem/<vendor>/configurations
directory when compiling for oem's.

Tested By:

IBM machine test :
1. meson build -Doem-ibm=enabled -Dprefix=<>
2. ninja -C build && ninja install
3. in the prefix directory we should see the json file
from the oem/ibm/configurations folder

Non IBM machine test :
1. meson build -Doem-ibm=disabled -Dprefix=<>
2. ninja -C build && ninja install
3. in the prefix directory we should see the json file
from the pldm/configurations folder.

Runtime test:
1. on an IBM machine make sure the pldm builds the fru record
table.

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

show more ...


# c073a20e 08-May-2021 Sampa Misra <sampmisr@in.ibm.com>

entity_association_tree: Keep tree always updated

This commit keeps the entity association tree updated across Host
reboots. It deletes the Host entries from the entity associaton
tree when Host is

entity_association_tree: Keep tree always updated

This commit keeps the entity association tree updated across Host
reboots. It deletes the Host entries from the entity associaton
tree when Host is powered off.

Without this fix the entity association tree keeps on growing with
duplicate Host entries during each power on(PDR exchange) resulting
a crash of pldm daemon after few power on-off sequence

Change-Id: I8fdc258195aef998d10e33577f3ec98da48b3d40
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>

show more ...


# 47180ac9 28-Oct-2020 Pavithra Barithaya <pavithra.b@ibm.com>

PLDM: Send firmware version to Hostboot

This commit sends the firmware version by adding
the version field in the General Fru record.

Tested on rainier using pldmtool

root@rainier:/tmp# ./pldmtool

PLDM: Send firmware version to Hostboot

This commit sends the firmware version by adding
the version field in the General Fru record.

Tested on rainier using pldmtool

root@rainier:/tmp# ./pldmtool fru GetFruRecordTable
Received Msg
Buffer Data: 08 01 80 04 02 00 00 00 00 05
Sending Msg
Buffer Data: 00 04 02 00 00 00 00 00 05 01 00 01 03 01 02 08 39 31 30 35 2d 32 32 41 04 07 53 49 4d 50 31 30 52 0a 1b 66 77 31 30 32 30 2e 30 30 2d 38 2e 34 2d 30 2d 67 35 63 63 66 35 38 64 61 38 66 01 00 01 02 01 02
.......
Received Msg
Buffer Data: 08 01 00 04 02 00 00 00 00 00 05 01 00 01 03 01 02 08 39 31 30 35 2d 32 32 41 04 07 53 49 4d 50 31 30 52 0a 1b 66 77 31 30 32 30 2e 30 30 2d 38 2e 34 2d 30 2d 67 35 63 63 66 35 38 64 61 38 66 01 00 01 02 01 02 08 39 31 30 35 2d.........
[
{
"FRU Record Set Identifier": 1,
"FRU Record Type": "General(1)",
"Number of FRU fields": 3,
"Encoding Type for FRU fields": "ASCII(1)"
},
{
"FRU Field Type": "Model(2)",
"FRU Field Length": 8,
"FRU Field Value": "9105-22A"
},
{
"FRU Field Type": "Serial Number(4)",
"FRU Field Length": 7,
"FRU Field Value": "SIMP10R"
},
{
"FRU Field Type": "Version(10)",
"FRU Field Length": 27,
"FRU Field Value": "fw1020.00-8.4-0-g5ccf58da8f"
}
],
.........

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

show more ...


# c4ea6a90 14-Jul-2020 George Liu <liuxiwei@inspur.com>

Mechanism to associate sensor/effecter to FRU entity

The "entity_path" key is defined in PDR JSONs and will have an FRU D-Bus object
path as the value, if this is present, the entity type, instance,

Mechanism to associate sensor/effecter to FRU entity

The "entity_path" key is defined in PDR JSONs and will have an FRU D-Bus object
path as the value, if this is present, the entity type, instance, and container
id should be associate with the FRU entity.

Tested: test JSON with https://gist.github.com/lxwinspur/7225a9301ccfcbff1f6549203405b4fa
after executing the following command, get the entity information from FruHandler
entity_type = 120
entity_instance_num = 1
entity_container_id = 0

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

show more ...


# 9e82ad1f 11-Jun-2020 John Wang <wangzqbj@inspur.com>

libpldmresponder: Implement GetFRURecordByOption

Implement handler for GetFRURecordByOption command

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: If2bc90872b2521f1771aa800de6fbce569a5b3

libpldmresponder: Implement GetFRURecordByOption

Implement handler for GetFRURecordByOption command

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: If2bc90872b2521f1771aa800de6fbce569a5b339

show more ...


# 33e9c7ea 11-Jun-2020 Tom Joseph <tomjoseph@in.ibm.com>

Build FRU table lazily

The FRU table is created when the PLDM daemon starts and depends on
BMC inventory collection to populate it completely. There is no D-Bus
signal or target that PLDM daemon can

Build FRU table lazily

The FRU table is created when the PLDM daemon starts and depends on
BMC inventory collection to populate it completely. There is no D-Bus
signal or target that PLDM daemon can rely on to figure completion of
inventory. This can cause some of the inventory to not show up in the
FRU table if the inventory collection is not complete when the PLDM
daemon starts.

An easy solution to this problem is to do the FRU table creation
lazily. The FRU table will be created when the FRU commands or Get PDR
command is handled the first time. The entity association PDR's are
created when the FRU table is built. So Get PDR commands expects the
building of the FRU table as a pre condition.

Tested:

Ensured FRU table is created when the GetFRURecordTableMetadata,
GetFRURecordTable and GetPDR command is handled by the PLDM daemon the
first time. Next time already built table is returned for the FRU
commands.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: I0deb723f30a30a667d0e80c9f9f6aced5ab23a67

show more ...


# 1521f6d1 16-Jun-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

pldmd: code re-org

Move code specific to the pldm main app to its own directory.

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


# 6492f524 15-Jun-2020 George Liu <liuxiwei@inspur.com>

clang-format: update to latest from docs repo

Since `Cpp11` is an alias for `Latest` and we should tend towards using the
latest C++ standard, update the C++ standard to Latest.

https://github.com/

clang-format: update to latest from docs repo

Since `Cpp11` is an alias for `Latest` and we should tend towards using the
latest C++ standard, update the C++ standard to Latest.

https://github.com/llvm/llvm-project/commit/e5032567903de19962333c4bf7d2edceaf4f9824#diff-b49a097415dff2837d9626d422c58ba8R82
https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format

Also, other OpenBMC repos are doing the same.

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

show more ...


# 3cd61814 10-Mar-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

libpldmresponder: FRU: construct PDRs

Construct FRU record set and entity association PDRs for the FRUs for
which the BMC collects VPD (FRU information off of an EEPROM).

These PDRs are structured

libpldmresponder: FRU: construct PDRs

Construct FRU record set and entity association PDRs for the FRUs for
which the BMC collects VPD (FRU information off of an EEPROM).

These PDRs are structured as per PLDM spec DSP0248 v1.2.0.

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

show more ...


# b368b337 23-Feb-2020 Pavithra Barithaya <pbaritha@in.ibm.com>

Fru:Change of pass by value to const reference

Change-Id: Idf53d897375f895fc52ec0a49ee0a2517ed32258
Signed-off-by: Pavithra Barithaya <pbaritha@in.ibm.com>


# e60c5822 23-Oct-2019 Deepak Kodihalli <dkodihal@in.ibm.com>

Implement FRURecordTableMetadata and FRURecordTable command

This commit implements the GetFRURecordTableMetadata and GetFRURecordTable
in the PLDM specification DSP0257 for FRU data specification. T

Implement FRURecordTableMetadata and FRURecordTable command

This commit implements the GetFRURecordTableMetadata and GetFRURecordTable
in the PLDM specification DSP0257 for FRU data specification. The FRU table
is populated by the FRU handler class with the configs from the path
/usr/share/pldm/fru.

Tested:

On a Witherspoon system the Get FRURecordTableMetadata and FRURecordTable
command were executed and ensured the FRU table in the command response
matches with the D-Bus inventory properties.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I16d36df2834b65bfa5f69164d3a40eeac2c7f357

show more ...


# 70e8db0c 21-Oct-2019 Deepak Kodihalli <dkodihal@in.ibm.com>

Implement the FRU implementation class

FRU implementation class implements the logic to build the PLDM FRU table
from the inventory D-Bus objects. This class exposes APIs to read the
FRU table, numb

Implement the FRU implementation class

FRU implementation class implements the logic to build the PLDM FRU table
from the inventory D-Bus objects. This class exposes APIs to read the
FRU table, number of FRU records and the checksum of the table. This will
be consumed by the GetFRURecordTableMetadata command and GetFRURecordTable
command specified in the DMTF specification DSP0257.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I3212f59e7e972dc66f57a507ba87b707281ba0b9

show more ...