The phosphor-power-sequencer application powers the chassis on/off and monitors the power sequencer device.
If the chassis power good (pgood) status changes to false unexpectedly, the application uses information from the power sequencer device to determine the cause. Typically this is a voltage rail that shut down due to a fault.
The application is a single-threaded C++ executable. It is a 'daemon' process that runs continually. The application is launched by systemd when the BMC reaches the Ready state and before the chassis is powered on.
The application is driven by an optional, system-specific JSON configuration file. The config file is found and parsed at runtime. The parsing process creates a collection of C++ objects. These objects represent the power sequencer device, voltage rails, GPIOs, and fault checks to perform.
A power sequencer device enables (turns on) the voltage rails in the correct order and monitors them for pgood faults.
This application currently supports the following power sequencer device types:
Additional device types can be supported by creating a new sub-class within the PowerSequencerDevice class hierarchy.
state
property to 1 on the org.openbmc.control.Power
D-Bus interface.power-chassis-control
.power-chassis-good
GPIO to the value 1.pgood
property to 1 on the org.openbmc.control.Power
D-Bus interface.state
property to 0 on the org.openbmc.control.Power
D-Bus interface.power-chassis-control
.power-chassis-good
GPIO to the value 0.pgood
property to 0 on the org.openbmc.control.Power
D-Bus interface.A power good (pgood) fault occurs in two scenarios:
If the pgood fault occurs when attempting to power on the chassis, the chassis pgood signal never changes to true.
If the pgood fault occurs after the chassis was successfully powered on, the chassis pgood signal changes from true to false. This application monitors the chassis power good status by reading the named GPIO power-chassis-good
.
It is very helpful to identify which voltage rail caused the pgood fault. That determines what hardware potentially needs to be replaced.
Determining the correct rail requires the following:
If those requirements are met, the application will attempt to determine which voltage rail caused the chassis pgood fault. If found, an error is logged against that specific rail.
If those requirements are not met, a general pgood fault error is logged.
This application is configured by an optional JSON configuration file. The configuration file defines the voltage rails in the system and how they should be monitored.
JSON configuration files are system-specific and are stored in the config_files sub-directory.
Documentation is available on the configuration file format.
If no configuration file is found for the current system, this application can still power the chassis on/off and detect chassis pgood faults. However, it will not be able to determine which voltage rail caused a pgood fault.
org.openbmc.control.Power
D-Bus interface.state
property is set to power the chassis on or off. This contains the desired power state.pgood
property contains the actual power state of the chassis.main()
. Handles the event loop.org.openbmc.control.Power
D-Bus interface.power-chassis-control
named GPIO.power-chassis-good
named GPIO.Automated test cases exist for most of the code in this application. See testing.md for more information.