fw-update: Create firmware inventory for ImageSetVersion

Currently, pldmd parses the ActiveComponentImageSetVersionString from
the GetFirmwareParameters response but does not create a corresponding
D-Bus software object for it. It only creates entries for individual
components.

For many firmware devices (e.g., Intel E810 NIC), the ImageSetVersion
represents the overall package version which is more readable for users
than individual component versions.

This commit adds a call to createFirmwareEntry using the ImageSetVersion
before iterating through the component parameter table. This ensures the
package-level version is visible in the Software Inventory.

gerrit: https://gerrit.openbmc.org/c/openbmc/pldm/+/89351

Tested:
```
root@bmc-9082C30605E4:~# busctl tree xyz.openbmc_project.PLDM
`- /xyz
  `- /xyz/openbmc_project
    |- /xyz/openbmc_project/inventory
    |- /xyz/openbmc_project/metric
    |- /xyz/openbmc_project/pldm
    |- /xyz/openbmc_project/sensors
    `- /xyz/openbmc_project/software
      |- /xyz/openbmc_project/software/PLDM_Device_Firmware_Device_11_ActiveImageSetVersion_4838
      |- /xyz/openbmc_project/software/PLDM_Device_Firmware_Device_11_Component_5_3209
      |- /xyz/openbmc_project/software/PLDM_Device_Firmware_Device_11_Component_6_4836
      `- /xyz/openbmc_project/software/PLDM_Device_Firmware_Device_11_Component_8_6189

root@bmc-9082C30605E4:~# busctl introspect xyz.openbmc_project.PLDM /xyz/openbmc_project/software/PLDM_Device_Firmware_Device_11_ActiveImageSetVersion_4838
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.Association.Definitions interface -         -                                        -
.Associations                               property  a(sss)    1 "running" "ran_on" "/xyz/openbmc_pr... emits-change writable
xyz.openbmc_project.Software.Version        interface -         -                                        -
.Purpose                                    property  s         "xyz.openbmc_project.Software.Version... emits-change writable
.Version                                    property  s         "4.90 (0x80020F06) "                     emits-change writable

root@bmc-9082C30605E4:~# pldmtool fw_update GetFwParams -m 11
{
    "CapabilitiesDuringUpdate": {
        "Component Update Failure Recovery Capability": "Device will revert to previous component image upon failure, timeout or cancellation of the transfer.",
        "Component Update Failure Retry Capability": " Device can have component updated again without exiting update mode and restarting transfer via RequestUpdate command.",
        "Firmware Device Host Functionality during Firmware Update": "Device will not revert to previous component image upon failure, timeout or cancellation of the transfer",
        "Firmware Device Partial Updates": "Firmware Device can support a partial update, whereby a package which contains a component image set that is a subset of all components curr
ently residing on the FD, can be transferred.",
        "Firmware Device Update Mode Restrictions": "No host OS environment restriction for update mode"
    },
    "ComponentCount": 3,
    "ActiveComponentImageSetVersionString": "4.90 (0x80020F06) ",
    "PendingComponentImageSetVersionString": "",
    "ComponentParameterEntries": [
        {
            "ComponentClassification": "Firmware",
            "ComponentIdentifier": 6,
            "ComponentClassificationIndex": 0,
            "ActiveComponentComparisonStamp": 157945606,
            "ActiveComponentReleaseDate": "",
            "PendingComponentComparisonStamp": 0,
            "PendingComponentReleaseDate": "",
            "ComponentActivationMethods": [
                "Self-Contained",
                "DC power cycel"
            ],
            "CapabilitiesDuringUpdate": {
                "Firmware Device apply state functionality": " Firmware Device will execute an operation during the APPLY state which will include migrating the new component image to
its final non-volatile storage destination."
            },
            "ActiveComponentVersionString": "096A0F06.0000000D ",
            "PendingComponentVersionString": ""
        },
        {
            "ComponentClassification": "Firmware",
            "ComponentIdentifier": 5,
            "ComponentClassificationIndex": 0,
            "ActiveComponentComparisonStamp": 17766144,
            "ActiveComponentReleaseDate": "",
            "PendingComponentComparisonStamp": 0,
            "PendingComponentReleaseDate": "",
            "ComponentActivationMethods": [
                "Self-Contained",
                "DC power cycel"
            ],
            "CapabilitiesDuringUpdate": {
                "Firmware Device apply state functionality": " Firmware Device will execute an operation during the APPLY state which will include migrating the new component image to
its final non-volatile storage destination."
            },
            "ActiveComponentVersionString": "010F1700.0000000D ",
            "PendingComponentVersionString": ""
        },
        {
            "ComponentClassification": "Firmware",
            "ComponentIdentifier": 8,
            "ComponentClassificationIndex": 0,
            "ActiveComponentComparisonStamp": 262148,
            "ActiveComponentReleaseDate": "",
            "PendingComponentComparisonStamp": 0,
            "PendingComponentReleaseDate": "",
            "ComponentActivationMethods": [
                "Self-Contained",
                "DC power cycel"
            ],
            "CapabilitiesDuringUpdate": {
                "Firmware Device apply state functionality": " Firmware Device will execute an operation during the APPLY state which will include migrating the new component image to
its final non-volatile storage destination."
            },
            "ActiveComponentVersionString": "00000004.00000004.10000010.00000157.0000 ",
            "PendingComponentVersionString": ""
        }
    ]
}
```

Change-Id: I625f8f71514c21d3551b890525c863e881f25630
Signed-off-by: Kyle Hsieh <Kyle.Hsieh@quantatw.com>
1 file changed
tree: 4da483843445adfbf50b42ec5229b4e6a6f822a1
  1. common/
  2. configurations/
  3. docs/
  4. fw-update/
  5. host-bmc/
  6. libpldmresponder/
  7. oem/
  8. platform-mc/
  9. pldmd/
  10. pldmtool/
  11. requester/
  12. softoff/
  13. subprojects/
  14. test/
  15. tools/
  16. utilities/
  17. .clang-format
  18. .clang-tidy
  19. .eslintignore
  20. .gitignore
  21. .linter-ignore
  22. LICENSE
  23. meson.build
  24. meson.options
  25. OWNERS
  26. README.md
README.md

PLDM - Platform Level Data Model

License

Overview

PLDM (Platform Level Data Model) is a key component of the OpenBMC project, providing a standardized data model and message formats for various platform management functionalities. It defines a method to manage, monitor, and control the firmware and hardware of a system.

The OpenBMC PLDM project aims to implement the specifications defined by the Distributed Management Task Force (DMTF), allowing for interoperable management interfaces across different hardware and firmware components.

Features

  • Standardized Messaging: Adheres to the DMTF's PLDM specifications, enabling consistent and interoperable communication between different components.
  • Modularity: Supports multiple PLDM types, including base, FRU,Firmware update, Platform Monitoring and Control, and BIOS Control and Configuration.
  • Extensibility: Easily extendable to support new PLDM types and custom OEM commands.
  • Integration: Seamlessly integrates with other OpenBMC components for comprehensive system management.

Getting Started

Prerequisites

To build and run PLDM, you need the following dependencies:

  • Meson
  • Ninja

Alternatively, source an OpenBMC ARM/x86 SDK.

Building

To build the PLDM project, follow these steps:

meson setup build && meson compile -C build

To run unit tests

The simplest way of running the tests is as described by the meson man page:

meson test -C build

Alternatively, tests can be run in the OpenBMC CI docker container using these steps.

To enable pldm verbosity

pldm daemon accepts a command line argument --verbose or --v or -v to enable the daemon to run in verbose mode. It can be done via adding this option to the environment file that pldm service consumes.

echo 'PLDMD_ARGS="--verbose"' > /etc/default/pldmd
systemctl restart pldmd

To disable pldm verbosity

rm /etc/default/pldmd
systemctl restart pldmd

Documentation

For complete documentation on the functionality and usage of this repository, please refer to the docs folder.