commit | e5b1e0875c983356467d092d17fc87d91a0e2e6d | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Wed Mar 02 15:37:32 2022 +0000 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Mon Mar 28 18:44:38 2022 +0000 |
tree | e32f5378b91b3992a99a60348836bb8d949240bb | |
parent | c9b05736f43c9e16737a31140ff2b7a36373da81 [diff] |
psu-ng: Set the PowerSystemInputs status on Brownout condition When a brownout condition is detected, set the PowerSystemInputs status property to Fault to avoid an autorestart, reference design doc: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/48015 Add a Before=xyz.openbmc_project.State.Chassis.service to the psu monitor service file since the chassis service is the one that will be reading the property. Add additional data to the Blackout error log. Tested: On simulation: 1. Clear brownout at runtime: - At power on, inject a power fault to all PSUs to trigger a brownout and verify the CurrentPowerStatus is set to Fault: Mar 20 19:49:14 p10bmc phosphor-log-manager[318]: Created PEL 0x5000000d (BMC ID 13) with SRC 110000AC Mar 20 19:49:14 p10bmc phosphor-power-control[307]: callbackSetPowerSupplyError: xyz.openbmc_project.State.Shutdown.Power.Error.Blackout ‣ Type=signal Endian=l Flags=1 Version=1 Cookie=94 Timestamp="Sun 2022-03-20 19:49:14.241856 UTC" Sender=:1.1296 Path=/xyz/openbmc_project/power/power_supplies/chassis0/psus Interface=org.freedesktop.DBus.Properties Member=PropertiesChanged ... STRING "xyz.openbmc_project.State.Decorator.PowerSystemInputs"; ... STRING "xyz.openbmc_project.State.Decorator.PowerSystemInputs.Status.Fault"; - Additional data on the error log: "User Data 1": { "Section Version": "1", "Sub-section type": "1", "Created by": "0x2000", "NOT_PRESENT_COUNT": "2", "VIN_FAULT_COUNT": "2", "_PID": "10244" } - Clear the brownout condition and verify the status is set to Good. Change-Id: I29695b641fb81515680a478e872bac29a6de560a 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", }