commit | b70eae9af652c38eb6aa8f2e4e71075106fa41d9 | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Thu Jan 20 22:09:56 2022 +0000 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Wed Jan 26 21:50:23 2022 +0000 |
tree | 689fe83559e1520fcd17331e61dbec7d45c4b141 | |
parent | c2906f471f3ecb4fe021efc657a32c4266a88589 [diff] |
psu-ng: Check if mismatched PSU is supported The function that checks that all PSUs have the same model currently calls out the first mismatched PSU. If the mismatched PSU is listed in the supported configurations and the base model is not, the error log may cause confusion because it would indicate in the callout data to replace the PSU that it is supposed to be supported instead of the one that it is not supported on that system. Therefore check the supported configurations to determine which PSU to callout in case of a mismatch. Tested: On p10bmc with ps0 model 2B1D (no supported) and ps1 model 2B1E (supported): - Before change: "ACTUAL_MODEL": "2B1E", "CALLOUT_INVENTORY_PATH": "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1", "EXPECTED_MODEL": "2B1D", - After change: "ACTUAL_MODEL": "2B1D", "CALLOUT_INVENTORY_PATH": "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0", "EXPECTED_MODEL": "2B1E", Change-Id: I0b2d487e12f55e08a93e77b6c569726dde9d4e68 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
This repository contains applications for configuring and monitoring devices that deliver power to the system.
To build all applications in this repository:
meson build ninja -C build
To clean the repository and remove all build output:
rm -rf build
You can specify meson options to customize the build process. For example, you can specify:
Several applications in this repository require a PSU JSON config to run. The JSON config file provides information for:
There is an example psu.json to describe the necessary configurations.
inventoryPMBusAccessType
defines the pmbus access type, which tells the service which sysfs type to use to read the attributes. The possible values are:/sys/bus/i2c/devices/3-0069/
/sys/bus/i2c/devices/3-0069/hwmon/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/cffps1/
fruConfigs
defines the mapping between the attribute file and the FRU inventory interface and property. The configuration example below indicates that the service will read part_number
attribute file from a directory specified by the above pmbus access type, and assign to PartNumber
property in xyz.openbmc_project.Inventory.Decorator.Asset
interface."fruConfigs": [ { "propertyName": "PartNumber", "fileName": "part_number", "interface": "xyz.openbmc_project.Inventory.Decorator.Asset" } ]
psuDevices
defines the kernel device dir for each PSU in inventory. The configuration example below indicates that powersupply0
's device is located in /sys/bus/i2c/devices/3-0069
."psuDevices": { "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069", }