commit | aca613737a5678238690d7a9ee90623d780d7a8a | [log] [tgz] |
---|---|---|
author | Priyanga Ramasamy <priyanga24@in.ibm.com> | Tue Jan 24 08:02:28 2023 -0600 |
committer | Jinu Joy Thomas <jinu.joy.thomas@in.ibm.com> | Tue Mar 28 06:01:14 2023 +0000 |
tree | 77c2e240958a0d352f09572a06f475df05525e34 | |
parent | 2494223517929c7eaebd29c4363875423986a57b [diff] |
Do not populate presence if handlePresence=false This commit is to skip populating Present property for those frus whose handlePresence is made false explicitly in VPD JSON. This is required in cases where the FRU has its own VPD, yet its presence gets handled by other application and not by VPD parser app. Test: Test works as expected. To note: phosphor-fan-monitor identifies and sets the fan presence before collecting system VPD. Journal log be like, Feb 14 12:54:08 ever6bmc phosphor-fan-monitor[601]: Fan /system/chassis/motherboard/fan0 presence state change to true Feb 14 12:54:09 ever6bmc systemd[1]: Finished Wait for /xyz/openbmc_project/led/groups/bmc_booted. Feb 14 12:54:09 ever6bmc phosphor-psu-monitor[604]: Binding device driver. path: /sys/bus/i2c/drivers/ibm-cffps/bind device: 3-006b Feb 14 12:54:09 ever6bmc phosphor-psu-monitor[604]: Failed binding or unbinding device. errno=16 Feb 14 12:54:09 ever6bmc phosphor-psu-monitor[604]: Updating inventory present property. present:true invpath:/system/chassis/motherboard/powersupply3 name:powersupply3 Feb 14 12:54:09 ever6bmc systemd[1]: Starting Wait for /xyz/openbmc_project/led/groups... Feb 14 12:54:09 ever6bmc systemd[1]: Starting Set the Asserted property of all the LED groups to false... Feb 14 12:54:09 ever6bmc systemd[1]: Starting Update BIOS attr table with host firmware well-known names... Feb 14 12:54:09 ever6bmc systemd[1]: Started Network IPMI daemon. Feb 14 12:54:09 ever6bmc systemd[1]: Started Network IPMI daemon. Feb 14 12:54:09 ever6bmc systemd[1]: Starting System VPD Collection... Tested in the above mentioned scenario: -> busctl set-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/ inventory/system/chassis/motherboard/fan0 xyz.openbmc_project.Inventory.Item Present b false ->busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0 xyz.openbmc_project.Inventory.Item interface - - - .Present property b false emits-change writable .PrettyName property s "fan0" -> busctl set-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/ inventory/system/chassis/motherboard xyz.openbmc_project.Inventory.Item Present b false ->systemctl restart system-vpd.service Result: busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0 xyz.openbmc_project.Inventory.Item interface - - - .Present property b false emits-change writable .PrettyName property s "fan0" Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com> Change-Id: I775380792b0f031efdff8c42e236b822ba3c2b45
This repository hosts code for OpenPower and IBM IPZ format VPD parsers. Both OpenPower VPD and IPZ VPD formats are structured binaries that consist of records and keywords. A record is a collection of multiple keywords. More information about the format can be found here.
The repository consists of two distinct applications, which are:
This is a build-time YAML driven application that parses the OpenPower VPD format and uses the YAML configuration (see extra-properties-example.yaml and writefru.yaml) to determine:
The application instance must be passed in the file path to the VPD (this can, for example, be a sysfs path exposed by the EEPROM device driver) and also the D-Bus object path(s) that EEPROM data needs to be published under.
This parser is can be built by passing in the --enable-ibm-parser
configure option. This parser differs from the OpenPower VPD parser in the following ways:
#
and are > 255 bytes in length).Making the application runtime JSON driven allows us to support multiple systems (with different FRU configurations) to be supported in a single code image as well as making the application more flexible for future improvements.