| c9b024f5 | 16-Dec-2025 |
Eric Yang <eric.yang.wiwynn@gmail.com> |
Extend IgnoreFailIfHostOff to D-Bus configuration
Extend handling of "IgnoreFailIfHostOff" to the D-Bus configuration path so controllers configured over D-Bus can mark inputs as dependent on host p
Extend IgnoreFailIfHostOff to D-Bus configuration
Extend handling of "IgnoreFailIfHostOff" to the D-Bus configuration path so controllers configured over D-Bus can mark inputs as dependent on host power state.
With this flag, inputs do not trigger failsafe while the host power is off, and normal failure handling resumes when the host power is on.
Motivation: The "IgnoreFailIfHostOff" option was previously supported when loading from the configuration file (config.json) [1].
This change extends the same behavior to configurations delivered over D-Bus (e.g., via entity-manager), ensuring consistent handling regardless of source and avoiding unnecessary failsafe during host power-off while preserving expected behavior when the host power is on.
[1]: https://gerrit.openbmc.org/c/openbmc/phosphor-pid-control/+/83200
Change-Id: I9dca01a462273726b0837cdc92eac1fd3c9048fb Signed-off-by: Eric Yang <eric.yang.wiwynn@gmail.com>
show more ...
|
| ccb9e727 | 13-Aug-2025 |
Eric Yang <eric.yang.wiwynn@gmail.com> |
dbuspassive: Register signal before property fetch
Change modifies the initialization flow in createDbusPassive.
- Old flow: createDbusPassive() | +-- getProperties from D-Bus | +--
dbuspassive: Register signal before property fetch
Change modifies the initialization flow in createDbusPassive.
- Old flow: createDbusPassive() | +-- getProperties from D-Bus | +-- create DbusPassive object | +-- register signal handler | +-- initialize DbusPassive with settings info
- New flow: createDbusPassive() | +-- create DbusPassive object | +-- register signal handler | +-- getProperties from D-Bus | +-- initialize DbusPassive with settings info
Motivation: For certain sensors, such as CPU/DIMM temperature sensors, there is only one opportunity during a host power-on for the sensor to transition from unavailable to available.
With the previous initialization flow, if D-Bus is under heavy load, fetching sensor properties can take a considerable amount of time. If this delay occurs, and the properties fetched still show the sensor as unavailable, there is a risk that during this window, before the signal handler is registered—the transition signal indicating the sensor has become available may be missed.
As a result, the sensor may remain in the unavailable state indefinitely, even though it has already become available on D-Bus.
By registering the signal handler before fetching properties, all state change signals are reliably captured, ensuring that the sensor's available status is always consistent with its actual state on D-Bus.
Change-Id: I7b4e3e9749b3d5966a13ff9bc70096ca27e2901a Signed-off-by: Eric Yang <eric.yang.wiwynn@gmail.com>
show more ...
|
| 11a1edcd | 12-Nov-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
State.Decorator.*: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: Ifacbc1379d6e1fc55709296178e2fb4b04531eeb Signed-off-by: Alexander Hansen <a
State.Decorator.*: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: Ifacbc1379d6e1fc55709296178e2fb4b04531eeb Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| eb1a35c5 | 12-Nov-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
Association: use PDI constants
Use PDI constants instead of local definitions
Tested: Unit Tests Pass
Change-Id: Ie9053cd21249b7a6ea78a73ec1c395956b8d17f6 Signed-off-by: Alexander Hansen <alexande
Association: use PDI constants
Use PDI constants instead of local definitions
Tested: Unit Tests Pass
Change-Id: Ie9053cd21249b7a6ea78a73ec1c395956b8d17f6 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| d3e71ced | 12-Nov-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
Sensor.Threshold.*: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: I2472307d1f4f2d65ad99440243444057c652b85a Signed-off-by: Alexander Hansen <
Sensor.Threshold.*: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: I2472307d1f4f2d65ad99440243444057c652b85a Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| d7665437 | 12-Nov-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
Control.ThermalMode: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: Ia78d5696b21652db527184a8b65ccd1af58f34be Signed-off-by: Alexander Hansen
Control.ThermalMode: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: Ia78d5696b21652db527184a8b65ccd1af58f34be Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| ca86bf6f | 12-Nov-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
Control.FanRedundancy: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: I1c574df1a89c0ef0146036c2747fb04c42af13b9 Signed-off-by: Alexander Hanse
Control.FanRedundancy: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: I1c574df1a89c0ef0146036c2747fb04c42af13b9 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| bd2c98e2 | 12-Nov-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
Control.FanPwm: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: Iac724d87ddac326d825b843675f314decd6e0de4 Signed-off-by: Alexander Hansen <alex
Control.FanPwm: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: Iac724d87ddac326d825b843675f314decd6e0de4 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| dae4a3ab | 11-Nov-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
Sensor.Value: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: I6b513155afa760da52dc7421eedcfe78ff3a816d Signed-off-by: Alexander Hansen <alexan
Sensor.Value: use PDI constants
Use PDI constants instead of local definitions.
Tested: Unit Tests Pass
Change-Id: I6b513155afa760da52dc7421eedcfe78ff3a816d Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 1ec3d135 | 27-Oct-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
DBus: use PDI constants for ObjectMapper
Use the PDI-defined constants for ObjectMapper calls instead of duplicating them here.
Tested: Inspection only.
Change-Id: I74cb19ff7c23131bb9d69256ae85e1c
DBus: use PDI constants for ObjectMapper
Use the PDI-defined constants for ObjectMapper calls instead of duplicating them here.
Tested: Inspection only.
Change-Id: I74cb19ff7c23131bb9d69256ae85e1cf98785c99 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 46a755fc | 27-Oct-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
Copyright: Move to SPDX-Identifier
Original copyright holders have been preserved, this patch moves the copyright notice to the compact SPDX notation.
Change-Id: I910cbc8ee0127e380099e1fbb3e3fb7c0a
Copyright: Move to SPDX-Identifier
Original copyright holders have been preserved, this patch moves the copyright notice to the compact SPDX notation.
Change-Id: I910cbc8ee0127e380099e1fbb3e3fb7c0abd24a9 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 3bfece8b | 26-Aug-2025 |
Eric Yang <eric.yang.wiwynn@gmail.com> |
dbuspassive: Fail reason for missing D-Bus object
When handle-missing-object-paths is enabled and the expected D-Bus object path is not exported, the sensor is marked as object-missing and getFailRe
dbuspassive: Fail reason for missing D-Bus object
When handle-missing-object-paths is enabled and the expected D-Bus object path is not exported, the sensor is marked as object-missing and getFailReason() reports "Sensor D-Bus object missing".
Motivation: Provide clearer diagnostics by distinguishing a missing D-Bus object from bad readings.
Change-Id: I49d98b27a49c5c6d4f523e7af9fd7c5b80198b73 Signed-off-by: Eric Yang <eric.yang.wiwynn@gmail.com>
show more ...
|
| 765a6d80 | 23-Jul-2025 |
Pete O_o <pmb@meta.com> |
meson option requires config.h for meson options to operate properly
This was removed in https://github.com/openbmc/phosphor-pid-control/commit/f8b6e55
Change-Id: I42d21365516a104cc0372d1fa72477642
meson option requires config.h for meson options to operate properly
This was removed in https://github.com/openbmc/phosphor-pid-control/commit/f8b6e55
Change-Id: I42d21365516a104cc0372d1fa72477642784c4d1 Signed-off-by: Pete O_o <pmb@meta.com>
show more ...
|
| f8b6e551 | 27-Jun-2025 |
Ed Tanous <etanous@nvidia.com> |
Fix includes
Run misc-include-cleaner on the codebase and fix all the includes.
misc-include-cleaner gets some things wrong, so had edit those back to previous. It doesn't seem to like nlohmann or
Fix includes
Run misc-include-cleaner on the codebase and fix all the includes.
misc-include-cleaner gets some things wrong, so had edit those back to previous. It doesn't seem to like nlohmann or zone.hpp very much.
At some point in the future we could fix these, and get these enforced at CI time.
Change-Id: Ie087e03dd26570db09e44e5b3f0641fb77668711 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 7d6e225b | 27-Jun-2025 |
Ed Tanous <etanous@nvidia.com> |
Simplify string formatting
These are fairly complex string constructions that clang-tidy flags as a performance problem. Replace with std::format.
Change-Id: I7f43dc0a87bd5059eca9cf7324f94707ff500
Simplify string formatting
These are fairly complex string constructions that clang-tidy flags as a performance problem. Replace with std::format.
Change-Id: I7f43dc0a87bd5059eca9cf7324f94707ff500ad3 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
| d2768c57 | 26-Jun-2025 |
Ed Tanous <etanous@nvidia.com> |
Implement clang-tidy fixes
clang-tidy allows the CI robot to check many things via static analysis.
All changes here were made by the clang-tidy robot, and include a number of modernization fixes.
Implement clang-tidy fixes
clang-tidy allows the CI robot to check many things via static analysis.
All changes here were made by the clang-tidy robot, and include a number of modernization fixes. updating the tidy file will be done at a later date.
Signed-off-by: Ed Tanous <etanous@nvidia.com> Change-Id: I98cc4d600a3c589675507958f6d2350b2141216b
show more ...
|
| 897f31c7 | 16-May-2025 |
Eric Yang <eric.yang.wiwynn@gmail.com> |
Clarify handle-missing-object-paths logic
Refine the behavior of handle-missing-object-paths option:
- unavailableAsFailed now applies only when the sensor object exists on D-Bus but is unavailab
Clarify handle-missing-object-paths logic
Refine the behavior of handle-missing-object-paths option:
- unavailableAsFailed now applies only when the sensor object exists on D-Bus but is unavailable (e.g., presence or power-state mismatch). - When a sensor is missing from D-Bus, only those listed in MissingIsAcceptable are exempt from triggering failsafe; unavailableAsFailed does not apply. - Also, avoid treating getProperties() failures (after getService() succeeds) as missing sensors. In this case, control loops will keep restarting, as before, regardless of unavailableAsFailed or handle-missing-object-paths.
This approach ensures handle-missing-object-paths only manages cases where the sensor's object does not exist on D-Bus, and avoids conflating this with getProperties failures or the role of unavailableAsFailed.
| | swampd starts parsing configurations | +-----------------+-----------------+ | | | | v v +-------+-------+ +----------------+ | DBUS | | JSON | | configuration | | configuration | +-------+-------+ +-------+--------+ | | v ---------------------------------------------------------------------+ |Parse "Inputs" for Fan controllers (non-Fan classes only) | +--------------------------------------------------------------------+ | Loop through "Inputs" of each controller | | | | | |-----------------+ | | |Sensor on D-Bus? |------ Yes----> construct configs-----+ | | +-----------------+ with DBus info | | | | No | | | v | | | |-------------------+ | | | |MissingAcceptable? |------No----> construct configs-----+ | | +-------------------+ with basic info | | | | Yes | | | v v | | continue continue | +--------------------------------------------------------------------+ | | v +--------------------------------------------------------------------+ |Create dbuspassive sensor | +--------------------------------------------------------------------+ | |---------------------+ | | | getService success? |------ Yes----------------+ | | +---------------------+ | | | | No | | | v v | | Build as failed sensor |---------------------+ | | (_failed=true, _available=false, | getProperties | | | _badReading=true) | success? | | | +---------------------+ | | | Yes | No | | v v | | Build with Build fails, control | | DBus info loop restarts until | | recovery | | (handle-missing-object- | | paths does not apply) | +--------------------------------------------------------------------+
Change-Id: I1733f2a12cbec3b6479509031f42212a6ad17ccf Signed-off-by: Eric Yang <eric.yang.wiwynn@gmail.com>
show more ...
|
| 841531c2 | 18-May-2025 |
Eric Yang <eric.yang.wiwynn@gmail.com> |
Fix build failure with Clang 20
Recent updates to Clang 20 in the CI pipeline have caused stricter enforcement of C++ rules regarding move assignment operators. The DbusHelper class declares a defau
Fix build failure with Clang 20
Recent updates to Clang 20 in the CI pipeline have caused stricter enforcement of C++ rules regarding move assignment operators. The DbusHelper class declares a defaulted move assignment operator despite having a reference member (_bus), which is not allowed by the C++ standard.
This results in the following build error: - error: explicitly defaulted move assignment operator is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
To resolve this, the move assignment operator for DbusHelper has been explicitly marked as deleted.
Change-Id: I35c01062a916a418007c07595a0e91d464143863 Signed-off-by: Eric Yang <eric.yang.wiwynn@gmail.com>
show more ...
|
| 215ffb5f | 07-Apr-2025 |
Patrick Williams <patrick@stwcx.xyz> |
dbusactiveread: delete unused class
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I52ae5968f0d10d6eae04fea9b96e38df6f226b0c |
| cd1e78a2 | 07-Apr-2025 |
Patrick Williams <patrick@stwcx.xyz> |
dbushelper: avoid new bus connections
The dbushelper required a new bus connection, for what was often a single dbus access. Switch the helper class to take a reference to a bus instead so that the
dbushelper: avoid new bus connections
The dbushelper required a new bus connection, for what was often a single dbus access. Switch the helper class to take a reference to a bus instead so that the same bus connections can be reused.
Fixes openbmc/phosphor-pid-control#44
Tested: Significant decrease in the number of dbus connections observed.
``` :1.510 8025 swampd root :1.510 phosphor-pid-control.service - - :1.511 8025 swampd root :1.511 phosphor-pid-control.service - - :1.512 8025 swampd root :1.512 phosphor-pid-control.service - - xyz.openbmc_project.Hwmon.external 8025 swampd root :1.511 phosphor-pid-control.service - - xyz.openbmc_project.State.FanCtrl 8025 swampd root :1.510 phosphor-pid-control.service ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ifbbfe10cbd533aa95e35db2800dfb9e83e37a5e0
show more ...
|
| a4270075 | 29-May-2024 |
Harvey Wu <Harvey.Wu@quantatw.com> |
print zone failsafe reason when enter failsafe mode
Tested: ``` Jun 24 01:52:45 bmc sel-logger[640]: cpu0_nbm critical high threshold assert. Reading=49.000000 Threshold=45.000000. Jun 24 01:52:46 b
print zone failsafe reason when enter failsafe mode
Tested: ``` Jun 24 01:52:45 bmc sel-logger[640]: cpu0_nbm critical high threshold assert. Reading=49.000000 Threshold=45.000000. Jun 24 01:52:46 bmc swampd[2944]: Zone 2 fans, entering failsafe mode, output pwm: 100 Jun 24 01:52:46 bmc swampd[2944]: Fail sensor: cpu0_nbm, reason: Sensor threshold asserted Jun 24 01:52:46 bmc swampd[2944]: Zone 0 fans, entering failsafe mode, output pwm: 100 Jun 24 01:52:46 bmc swampd[2944]: Fail sensor: cpu0_nbm, reason: Sensor threshold asserted ```
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: I607d01b6bed11b00a40153db6521a9c9d23da519
show more ...
|
| a552fe2f | 15-Nov-2024 |
Chaul Ly <chaul@amperecomputing.com> |
Add more behaviors to MissingIsAcceptable handling
This commit adds more behaviors to the current handling of MissingIsAcceptable list, under the meson option `handle-missing-object-paths` which def
Add more behaviors to MissingIsAcceptable handling
This commit adds more behaviors to the current handling of MissingIsAcceptable list, under the meson option `handle-missing-object-paths` which defaults to `false`.
For dbuspassive sensor creation, an input sensor missing from D-Bus or having D-Bus call failures will be built as a failed sensor with _failed=true, _available=false, _badReading=true. Therefore, if this missing sensor is not set as InputUnavailableAsFailed=false and its name is not listed in the MissingIsAcceptable list, it will be marked as missing at the beginning, and will send the zone to failsafe mode. If the sensor comes back to D-Bus, swampd will be informed through the existing match signals registered.
When parsing configurations from D-Bus, in case of non-fan-type PID controllers and of Stepwise controllers, if a sensor in the Inputs list is not on D-Bus and its name is not in the MissingIsAcceptable list, the sensor will still be built with basic information from the configured sensor name and type. If it is not on D-Bus and its name is in the MissingIsAcceptable list, it will be ignored.
When parsing configurations from JSON, no new behavior added in the building process. As match signals are not registered in this case, swampd will not be informed with the disappearance and returning of sensor object paths from/to D-Bus.
Tested:
1. Configure in Entity-Manager a fan controller with a sensor name in "Inputs". "MissingIsAcceptable" list is not configured. 2. The sensor is not on D-Bus, start swampd => The fan zone that the controller belongs to is sent to failsafe mode 3. Get the sensor back to D-Bus (e.g by starting a service) => The control loop is restarted due to the match signals from D-Bus, as this important sensor is back, the fan zone will be back to normal speed again. | | swampd starts parsing configurations | +-----------------+-----------------+ | | | | v v +-------+-------+ +----------------+ | DBUS | | JSON | | configuration | | configuration | +-------+-------+ +-------+--------+ | | v +--------------------------------------------------------------------+ |Parse "Inputs" for Fan controllers (non-Fan classes only) | +--------------------------------------------------------------------+ | Loop through "Inputs" of each controller | | | | | |-----------------+ | | |Sensor on D-Bus? |------ Yes----> construct configs-----+ | | +-----------------+ with DBus info | | | | No | | | v | | | |-------------------+ | | | |MissingAcceptable? |------No----> construct configs-----+ | | +-------------------+ with basic info | | | | Yes | | | v v | | continue continue | +--------------------------------------------------------------------+ | | v +--------------------------------------------------------------------+ |Create dbuspassive sensor | +--------------------------------------------------------------------+ | |---------------------+ | | | DBus calls succeed? |------ Yes----------------+ | | +---------------------+ | | | | No | | | v v | |construct properties with construct properties | |with bad info with DBus info | |_value{nan} | |_unit{based_on_type} | |_scale{0} | |_available{false} | |_failed{true} | | | +--------------------------------------------------------------------+
Change-Id: I926136d3d81f19d4c6d2e5b377cdedb887e49e5f Signed-off-by: Chaul Ly <chaul@amperecomputing.com>
show more ...
|
| 7ca8887c | 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I5d504a19c51a5ba843b09f3bcfa3f6472af6cd22 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
| 19300276 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Id513ba4699f994d5bc2a8480c4a0b2659e9480ce Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Id513ba4699f994d5bc2a8480c4a0b2659e9480ce Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 6df8bb50 | 27-Nov-2024 |
James Zheng <alphetis@google.com> |
Add failsafe logger for zones
Tested: ... Nov 23 21:40:06 tmddp10-nfd01.prod.google.com swampd[4893]: Zone `0` is in failsafe mode. With update at `fleeting0`: The sensor has bad readings. Nov 23 21
Add failsafe logger for zones
Tested: ... Nov 23 21:40:06 tmddp10-nfd01.prod.google.com swampd[4893]: Zone `0` is in failsafe mode. With update at `fleeting0`: The sensor has bad readings. Nov 23 21:40:06 tmddp10-nfd01.prod.google.com swampd[4893]: Zone `1` is in failsafe mode. With update at `fleeting1`: The sensor has bad readings. Nov 23 21:40:06 tmddp10-nfd01.prod.google.com swampd[4893]: Zone `1` leaves failsafe mode. With update at `hotswap_in_Input_Power`: The sensor has recovered. Nov 23 21:40:06 tmddp10-nfd01.prod.google.com swampd[4893]: Zone `0` leaves failsafe mode. With update at `hotswap_in_Input_Power`: The sensor has recovered. ...
Change-Id: I2c296addb7ad117c03c04a27de91204796cda036 Signed-off-by: James Zheng <alphetis@google.com>
show more ...
|