commit | aa8a893e51c5ebae9c6b19aabbeb06242c8930e0 | [log] [tgz] |
---|---|---|
author | Priyanga Ramasamy <priyanga24@in.ibm.com> | Thu Jan 27 09:12:41 2022 -0600 |
committer | Santosh Puranik <santosh.puranik@in.ibm.com> | Mon Mar 07 05:44:23 2022 +0000 |
tree | bcfb1d93d72f52fab94ea447492c631dced47c03 | |
parent | 5cb3b1f361d347c7881d546241c4bb214d246da2 [diff] |
Populate unique PrettyName as an extra interface In vpd json, PrettyName has been moved from common interfaces to extra interfaces, as a part of hardcoding unique names to the frus. Due to which the vpd-parser is populating xyz.openbmc_project. Inventory.Item interface properties in two places. Present property in common interface && PrettyName property in extra interface. std::emplace doesn't allows duplicate key emplacement. This commit has a helper function which emplaces values into an already existing key. This commit also emplaces Present property to true whenever the parser parses the eeprom, irrespective of "inherit" property in json. Test: Tested on simics. root@p10bmc:/tmp# rm -rf /var/lib/phosphor-inventory-manager/xyz/openbmc_project/inventory/system/chassis/motherboard/ebmc_card_bmc/ root@p10bmc:/tmp# root@p10bmc:/tmp# systemctl restart xyz.openbmc_project.Inventory.Manager.service root@p10bmc:/tmp# ./ibm-read-vpd --file /sys/bus/i2c/drivers/at24/8-0051/eeprom 1. root@p10bmc:/tmp# busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/ebmc_card_bmc/ethernet1 ..... .... xyz.openbmc_project.Inventory.Item interface - - - .Present property b true emits-change writable .PrettyName property s "HMC Ethernet Connector" emits-change writable 2. root@p10bmc:/tmp# busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/ebmc_card_bmc/ethernet0 xyz.openbmc_project.Inventory.Item interface - - - .Present property b true emits-change writable .PrettyName property s "HMC Ethernet Connector" emits-change writable xyz.openbmc_project.Inventory.Item.Connector interface - - - 3. root@p10bmc:/tmp# busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/ebmc_card_bmc/displayport0 xyz.openbmc_project.Inventory.Item interface - - - .Present property b true emits-change writable .PrettyName property s "Display Port Connector" emits-change writable xyz.openbmc_project.Inventory.Item.Connector interface - - Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com> Change-Id: I36c1e0bd3568c7fe26fa8592fb0268e091c41427
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.