commit | 4170bdad54a7583b7f8e0435a4702acb126aa326 | [log] [tgz] |
---|---|---|
author | Priyanga Ramasamy <priyanga24@in.ibm.com> | Wed Jul 19 09:25:36 2023 +0000 |
committer | jinuthomas <jinu.joy.thomas@in.ibm.com> | Sun Jul 30 23:49:18 2023 -0500 |
tree | 6391d129a03e6663bf13339b3e657579ebe9ff47 | |
parent | 45d54976fdb8d27a539d78dc1cd7e2db0998b43a [diff] |
Unable to set minimum ship level The software-manager-tool internally calls WriteKeyword d-bus api to set firmware version in hardware (in VSYS FV). The software-manager-tool is unable to set current firmware level as minimum ship level due to a bug in vpd-manager "WriteKeyword" d-bus api. In WriteKeyword, when we try to read from filestream and write into vector, the maximum possible vpd size(65504) is given as the total bytes to be read (n). But the actual hardware data is lesser than 65504 in size. If the filestream read operation runs out of characters to extract before n characters have been successfully read, it reads the available characters and stores it in vector and internally it sets both bad bit and fail bit. And with recent changes since we catch all filestream exceptions, this bug has been caught and code flow is broken. Fix: Query the size of the VPD and perform filestream read based on the given VPD size. If the given VPD size exceeds the maximum possible size (65504), then read till 65504 only. The same issue has been addressed in vpd-tool read keyword from hardware. Test: vpd-tool -r -H -O /sys/bus/i2c/drivers/at24/8-0050/eeprom -R VSYS -K FV { "/sys/bus/i2c/drivers/at24/8-0050/eeprom": { "FV": "fw1020.00-00 " } } vpd-tool -r -O /system/chassis/motherboard -R VSYS -K FV { "/system/chassis/motherboard": { "FV": "fw1020.00-00 " } } software-manager-tool --setminlevel <6> Current version: fw1050.00-4.16-dirty. Setting Minimum Ship Level to: fw1050.00-4 vpd-tool -r -O /system/chassis/motherboard -R VSYS -K FV { "/system/chassis/motherboard": { "FV": "fw1050.00-4 " } } vpd-tool -r -H -O /sys/bus/i2c/drivers/at24/8-0050/eeprom -R VSYS -K FV { "/sys/bus/i2c/drivers/at24/8-0050/eeprom": { "FV": "fw1050.00-4 " } } Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com> Change-Id: I6e24d744542f0a67a872605c7793d73ee27c541c
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.