Minor update: SystemIM

System IM could be corrupted or not supported by the vpd parser.
Capturing that case and logging PEL with a severity "ERROR".

Tested on simics:
-> Corrupt the system vpd IM value at 0x05FB
dd if=/dev/zero of=/sys/bus/i2c/drivers/at24/8-0050/eeprom bs=1 count=1 seek=1531

000005d0  00 50 46 02 00 00 78 84  2c 00 52 54 04 56 53 42  |.PF...x.,.RT.VSB|
000005e0  50 44 52 10 56 50 44 20  52 4f 4f 54 20 4e 4f 44  |PDR.VPD ROOT NOD|
000005f0  45 20 20 20 50 41 01 59  49 4d 04 00 00 10 01 50  |E   PA.YIM.....P|
00000600  46 04 00 00 00 00 78 84  b0 00 52 54 04 56 53 59

-> Execute the vpd parser
root@rainier:/tmp# ./ibm-read-vpd-IM --file /sys/bus/i2c/drivers/at24/8-0050/eeprom
Erroneous/Unsupported IM in System VPD. PEL logged.
std::exception
root@rainier:/tmp#

-> PEL
"Private Header": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Created by":               "0x4000",
    "Created at":               "04/21/2021 05:28:21",
    "Committed at":             "04/21/2021 05:28:21",
    "Creator Subsystem":        "BMC",
    "CSSVER":                   "",
    "Platform Log Id":          "0x50000008",
    "Entry Id":                 "0x50000008",
    "BMC Event Log Id":         "8"
},
"User Header": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Log Committed by":         "0x2000",
    "Subsystem":                "CEC Hardware: VPD Interface",
    "Event Scope":              "Entire Platform",
    "Event Severity":           "Unrecoverable Error",
    "Event Type":               "Not Applicable",
    "Action Flags": [
                                "Service Action Required",
                                "Report Externally",
                                "HMC Call Home"
    ],
    "Host Transmission":        "Not Sent"
},
"Primary SRC": {
    "Section Version":          "1",
    "Sub-section type":         "1",
    "Created by":               "0x4000",
    "SRC Version":              "0x02",
    "SRC Format":               "0x55",
    "Virtual Progress SRC":     "False",
    "I5/OS Service Event Bit":  "False",
    "Hypervisor Dump Initiated":"False",
    "Power Control Net Fault":  "False",
    "Backplane CCIN":           "",
    "Deconfigured":             "False",
    "Guarded":                  "False",
    "Error Details": {
        "Message":              "A VPD data exception occurred."
    },
    "Valid Word Count":         "0x09",
    "Reference Code":           "BD554001",
    "Hex Word 2":               "00000055",
    "Hex Word 3":               "00000010",
    "Hex Word 4":               "00000000",
    "Hex Word 5":               "00000000",
    "Hex Word 6":               "00000000",
    "Hex Word 7":               "00000000",
    "Hex Word 8":               "00000000",
    "Hex Word 9":               "00000000",
    "Callout Section": {
        "Callout Count":        "1",
        "Callouts": [{
            "FRU Type":         "Normal Hardware FRU",
            "Priority":         "Mandatory, replace all with this type as a unit",
            "Location Code":    "U78DA.ND0.1234567-P0",
            "Part Number":      "F191014",
            "CCIN":             "2E2D",
            "Serial Number":    "YL2E2D010000"
        }]
    }
},
"Extended User Header": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Created by":               "0x2000",
    "Reporting Machine Type":   "",
    "Reporting Serial Number":  "",
    "FW Released Ver":          "",
    "FW SubSys Version":        "fw1020.00-18.0",
    "Common Ref Time":          "00/00/0000 00:00:00",
    "Symptom Id Len":           "20",
    "Symptom Id":               "BD554001_00000010"
},
"Failing MTMS": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Created by":               "0x2000",
    "Machine Type Model":       "",
    "Serial Number":            ""
},
"User Data 0": {
    "Section Version": "1",
    "Sub-section type": "1",
    "Created by": "0x2000",
    "BMC Version ID": "fw1020.00-18.0-14-g5b4915816",
    "BMCState": "Ready",
    "ChassisState": "Off",
    "HostState": "Off",
    "Process Name": "Unknown"
},
"User Data 1": {
    "Section Version": "1",
    "Sub-section type": "1",
    "Created by": "0x2000",
    "CALLOUT_INVENTORY_PATH": "/xyz/openbmc_project/inventory/system/chassis/motherboard",
    "DESCRIPTION": "System IM value is erroneous/not supported.",
    "INVALID IM VALUE": "00001001"
}
}

Signed-off-by: PriyangaRamasamy <priyanga24@in.ibm.com>
Change-Id: I9301ac73e0b4a7a767861a294ce865804d930a2d
1 file changed
tree: 078a7b5fcab00e9251defac4831b58b8ea82a070
  1. examples/
  2. test/
  3. vpd-manager/
  4. vpd-parser/
  5. vpdecc/
  6. .clang-format
  7. .gitignore
  8. app.cpp
  9. args.cpp
  10. args.hpp
  11. common_utility.cpp
  12. common_utility.hpp
  13. const.hpp
  14. defines.hpp
  15. extra-properties-example.yaml
  16. extra-properties.mako.hpp
  17. extra-properties.py
  18. ibm_vpd_app.cpp
  19. ibm_vpd_utils.cpp
  20. ibm_vpd_utils.hpp
  21. impl.cpp
  22. impl.hpp
  23. LICENSE
  24. MAINTAINERS
  25. meson.build
  26. meson_options.txt
  27. README.md
  28. store.hpp
  29. types.hpp
  30. utilInterface.hpp
  31. vpd_exceptions.hpp
  32. vpd_tool.cpp
  33. vpd_tool_impl.cpp
  34. vpd_tool_impl.hpp
  35. write.cpp
  36. write.hpp
  37. writefru.mako.hpp
  38. writefru.py
  39. writefru.yaml
README.md

#Overview 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:

OpenPower VPD Parser

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 supported records and keywords.
  • How VPD data is translated into D-Bus interfaces and properties.

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.

IBM VPD Parser

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:

  • It parses all the records and keywords from the VPD, including large keywords (Keywords that begin with a # and are > 255 bytes in length).
  • It relies on a runtime JSON configuration (see examples/inventory.json) to determine the D-Bus object path(s) that hold interfaces and properties representing the VPD for a given VPD file path.

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.

TODOs and Future Improvements

  1. The long-term goal is to completely do away with the build time YAML driven configurations and instead reconcile the OpenPower VPD parser and the IBM VPD parser applications into a single runtime JSON driven application.
  2. Add details to the README on how to configure and build the application.
  3. More JSON documentation.
  4. Support for more IBM VPD formats.
  5. VPD Write and tool documentation.