commit | 84d61e828b390825e53e4cebe8aa16dcd5a10441 | [log] [tgz] |
---|---|---|
author | Priyanga Ramasamy <priyanga24@in.ibm.com> | Fri Jul 22 03:51:02 2022 -0500 |
committer | Santosh Puranik <santosh.puranik@in.ibm.com> | Mon Oct 17 07:18:17 2022 +0000 |
tree | a3e2312f6b5f4a9a80cefda059b24bcc815db7f3 | |
parent | a97b63eb1667550f9b111dd5e926741d5a49f04a [diff] |
Bug fix in initializing VPD with BIOS attribute When syncing FCO attribute with RG keyword in system VPD, there occurs a corner case where VSYS-RG keyword is not programmed in VPD and has all ASCII blanks(32 in decimal) and if FCO BIOS attribute value is 32, then existing logic fails to initialise the VPD with the BIOS attribute. The existing code checks if the value in VPD is same as the FCO value. The check compares only the LSB of the VPD value instead of the complete value. This commit has a fix for it. Test: Case 1: Value in VPD is blank and BIOS FCO value is 32 busctl set-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard com.ibm.ipzvpd.VSYS RG ay 4 32 32 32 32 busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard com.ibm.ipzvpd.VSYS RG ay 4 32 32 32 32 busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager GetAttribute s "hb_field_core_override" svv "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Integer" x 0 x 0 busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager SetAttribute sv "hb_field_core_override" x 32 busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager GetAttribute s "hb_field_core_override" svv "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Integer" x 32 x 0 busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard com.ibm.ipzvpd.VSYS RG ay 4 0 0 0 32 =================================================================== Case 2: Value in VPD is not blank and BIOS FCO value is 24(numerically different values) busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard com.ibm.ipzvpd.VSYS RG ay 4 0 0 0 32 busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager SetAttribute sv "hb_field_core_override" x 24 busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard com.ibm.ipzvpd.VSYS RG ay 4 0 0 0 24 ================================================================== Case 3: Value in VPD and BIOS FCO value are (equal) 0 (null) busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard com.ibm.ipzvpd.VSYS RG ay 4 0 0 0 0 busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager SetAttribute sv "hb_field_core_override" x 0 busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard com.ibm.ipzvpd.VSYS RG ay 4 0 0 0 0 =================================================================== Case 4: Value in VPD is blank and BIOS FCO value is 16 busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard com.ibm.ipzvpd.VSYS RG ay 4 32 32 32 32 busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager SetAttribute sv "hb_field_core_override" x 16 busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard com.ibm.ipzvpd.VSYS RG ay 4 0 0 0 16 Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com> Change-Id: I417d6099f1fe76115c4e71fd575e6977cef0affd
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.