commit | 6abdeb618aef6264b3db725c5c6d513e76cb25d4 | [log] [tgz] |
---|---|---|
author | Priyanga Ramasamy <priyanga24@in.ibm.com> | Sun Jan 09 23:15:11 2022 -0600 |
committer | Priyanga Ramasamy <priyanga24@in.ibm.com> | Tue Apr 05 00:38:59 2022 -0500 |
tree | 2958a3280d859eae8ac9523deee8cbec99014b6c | |
parent | 0e34d3574cc2512b8ac465913eb988a95c1cf808 [diff] |
Populate unique PrettyName for IO-SCM systems IO-SCM is a DCM with one of the chips being just IO-Good, that is one of the chips does not have any good computing cores. But those chips can be useful for other purposes like connecting PCIE devices. So we still use those cpu chips without trashing. So to uniquely identify an IO-Good chip, this commit populates a unique PrettyName for such cpus so that the redfish client can easily distinguish between chips with good computing cores and an IO-Good chip. Test: Tested on io-SCM system. Case 1: CPU which is not an IO. =====> root@rain71bmc:/tmp# ./ibm-read-vpd --file /sys/bus/spi/drivers/at25/spi12.0/eeprom =====> root@rain71bmc:/tmp# busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/dcm0/cpu0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS com.ibm.ipzvpd.CP00 interface - - - .AW property ay 4 0 0 0 0 emits-change writable .D4 property ay 4 0 0 0 0 emits-change writable .D5 property ay 4 0 0 0 0 emits-change writable .MK property ay 7 1 0 0 0 0 0 0 emits-change writable .PD_G property ay 7168 23 82 83 5 9 0 20 0 0 1 3 73 2 255… emits-change writable ...... xyz.openbmc_project.Inventory.Item interface - - - .Present property b true emits-change writable .PrettyName property s "PROCESSOR MODULE" emits-change writable xyz.openbmc_project.Inventory.Item.Cpu interface - - - .Characteristics property as 0 emits-change writable .CoreCount property q 10 emits-change writable .... =====> curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors/dcm0-cpu0 { "@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu0", "@odata.type": "#Processor.v1_12_0.Processor", "Id": "dcm0-cpu0", "Location": { "PartLocation": { "ServiceLabel": "U78DA.ND0.WZS0042-P0-C15" } }, "LocationIndicatorActive": false, "Manufacturer": "", "MaxSpeedMHz": 0, "Model": "5C74", "Name": "PROCESSOR MODULE", "PartNumber": "03JM528", "ProcessorId": { "EffectiveFamily": "" }, "ProcessorType": "CPU", "SerialNumber": "YA3936127705", "Socket": "", "SparePartNumber": "F210110", "Status": { "Health": "OK", "State": "Enabled" }, "SubProcessors": { "@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu0/SubProcessors" }, "TotalCores": 10, "TotalThreads": 0 } Case 2: CPU which is an IO only chip. =====> root@rain71bmc:/tmp# ./ibm-read-vpd --file /sys/bus/spi/drivers/at25/spi22.0/eeprom =====> root@rain71bmc:/tmp# busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/dcm0/cpu1 NAME TYPE SIGNATURE RESULT/VALUE FLAGS com.ibm.ipzvpd.CP00 interface - - - .AW property ay 4 0 0 0 0 emits-change writable .D4 property ay 4 0 0 0 0 emits-change writable .D5 property ay 4 0 0 0 0 emits-change writable .MK property ay 7 1 0 0 0 0 0 0 emits-change writable .PD_G property ay 7168 23 ....... xyz.openbmc_project.Inventory.Item interface - - - .Present property b true emits-change writable .PrettyName property s "IO" emits-change writable xyz.openbmc_project.Inventory.Item.Cpu interface - - - .Characteristics property as 0 ... =====> curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors/dcm0-cpu1 { "@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu1", "@odata.type": "#Processor.v1_12_0.Processor", "Id": "dcm0-cpu1", "Location": { "PartLocation": { "ServiceLabel": "U78DA.ND0.WZS0042-P0-C15" } }, "LocationIndicatorActive": false, "Manufacturer": "", "MaxSpeedMHz": 0, "Model": "5C74", "Name": "IO", "PartNumber": "03JM528", "ProcessorId": { "EffectiveFamily": "" }, "ProcessorType": "CPU", "SerialNumber": "YA3936127705", "Socket": "", "SparePartNumber": "F210110", "Status": { "Health": "OK", "State": "Enabled" }, "SubProcessors": { "@odata.id": "/redfish/v1/Systems/system/Processors/dcm0-cpu1/SubProcessors" }, "TotalCores": 0, "TotalThreads": 0 } ========== Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com> Change-Id: I39917557b50074650fe381f161e101640f7d870c
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.