commit | 2549d79233802e39e21f4d142f89eb6b8841a8c6 | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Wed Jan 26 20:51:30 2022 +0000 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Wed Feb 02 18:16:39 2022 +0000 |
tree | bafeb5f205db9c20d68f108fdc6fbf8f859b254a | |
parent | 71a14131f1f9b41e75873c69e8f7d8d9a6d8490f [diff] |
psu-ng: Log error on brownout condition Per design document: https://github.com/openbmc/docs/blob/master/designs/power-recovery.md#brownout The BMC must log an error indicating the brownout event has occurred. Check for a brownout condition where all PSUs are either not present or report an AC loss VIN fault. The error log would be the same as a Blackout condition. Keep track if the error was created via a variable so that the error is not created multiple times. Clear the variable once the brownout condition is no longer detected or when then system is powered off so that it gets logged on the next power on. Tested: On Rainier 2S2U simulation where there are 4 PSUs slots but only two power supplies connected, inject a VIN fault on the two present PSUs and verify an error log for AC loss 110000AC is created: Jan 31 16:57:37 p10bmc phosphor-psu-monitor[963]: INPUT fault: STATUS_WORD = 0x2848, STATUS_MFR_SPECIFIC = 0x0, STATUS_INPUT = 0x38 Jan 31 16:57:37 p10bmc phosphor-psu-monitor[963]: VIN_UV fault: STATUS_WORD = 0x2848, STATUS_MFR_SPECIFIC = 0x0, STATUS_INPUT = 0x38 Jan 31 16:57:38 p10bmc phosphor-psu-monitor[963]: INPUT fault: STATUS_WORD = 0x2848, STATUS_MFR_SPECIFIC = 0x0, STATUS_INPUT = 0x38 Jan 31 16:57:38 p10bmc phosphor-psu-monitor[963]: VIN_UV fault: STATUS_WORD = 0x2848, STATUS_MFR_SPECIFIC = 0x0, STATUS_INPUT = 0x38 Jan 31 16:57:38 p10bmc phosphor-log-manager[305]: Created PEL 0x50000007 (BMC ID 7) with SRC 110000AC Change-Id: I7760b59a02ef2afc81bd7807c7896183d99a66ec 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", }