| 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 ...
|
| 35ae0bb5 | 28-Oct-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
test: sensor host: use PDI constants
Use the PDI constants instead of re-defining them here.
Tested: Unit Tests Pass
Change-Id: I99b08fd35bc85a2c66514e7f0f19301151d5fbe7 Signed-off-by: Alexander H
test: sensor host: use PDI constants
Use the PDI constants instead of re-defining them here.
Tested: Unit Tests Pass
Change-Id: I99b08fd35bc85a2c66514e7f0f19301151d5fbe7 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| e907a814 | 28-Oct-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
test: PID Zone: use PDI constants
Use the PDI constants instead of re-defining them here.
Tested: Unit Tests Pass
Change-Id: I0f6c246675c2bc41698fc8721adc59864fadfd3f Signed-off-by: Alexander Hans
test: PID Zone: use PDI constants
Use the PDI constants instead of re-defining them here.
Tested: Unit Tests Pass
Change-Id: I0f6c246675c2bc41698fc8721adc59864fadfd3f Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| dc6a0502 | 28-Oct-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
test: DBus util: use PDI constants
Use the PDI constants instead of re-defining them here.
Tested: Unit Tests Pass
Change-Id: Ia8f2dedb02b5ae6bf4700e1d04d2fac8b934bdb4 Signed-off-by: Alexander Han
test: DBus util: use PDI constants
Use the PDI constants instead of re-defining them here.
Tested: Unit Tests Pass
Change-Id: Ia8f2dedb02b5ae6bf4700e1d04d2fac8b934bdb4 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 207730bd | 28-Oct-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
test: DBus passive: use PDI constants
Use the PDI constants for interfaces and properties instead of re-defining them here.
Tested: Unit Tests Pass
Change-Id: Ibf1475d9d5639842e1827baba3e123310fef
test: DBus passive: use PDI constants
Use the PDI constants for interfaces and properties instead of re-defining them here.
Tested: Unit Tests Pass
Change-Id: Ibf1475d9d5639842e1827baba3e123310fefd0cf 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 ...
|
| 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 ...
|
| e3c60770 | 07-Apr-2025 |
Patrick Williams <patrick@stwcx.xyz> |
sensormanager: use bus reference_wrapper over pointer
Switch the SensorManager class to use a `reference_wrapper` to the sdbusplus connection rather than a raw pointer for code safety. This has a si
sensormanager: use bus reference_wrapper over pointer
Switch the SensorManager class to use a `reference_wrapper` to the sdbusplus connection rather than a raw pointer for code safety. This has a side-effect of disabling the default constructor for the class, which implicates using wrappers like `std::optional`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I799d4564f0dbd9698951f0ec8e86a7272299ebf6
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 |
| 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 ...
|
| 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 ...
|
| 7df3c27f | 30-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
add missing headers
The latest clang-tidy fails with errors such as: ``` test/controller_mock.hpp:11:31: error: unknown class name 'PIDController'; did you mean 'Controller'? [clang-diagnostic-error
add missing headers
The latest clang-tidy fails with errors such as: ``` test/controller_mock.hpp:11:31: error: unknown class name 'PIDController'; did you mean 'Controller'? [clang-diagnostic-error] ```
Add missing header files to find the appropriate class.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5d8f60b4031605f449f4c4adda9b18acb19c49b0
show more ...
|
| 6813d89e | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I0e75e7737a6d941b0dbcfc1894b978aa9bd74d80 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
| 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 ...
|
| 2922eebe | 08-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Fix Move Prevents Copy Elision
The following errors were reported during clang-tidy enablement due to moving temporary objects, which prevents copy elision. This fix addresses the issue
clang-tidy: Fix Move Prevents Copy Elision
The following errors were reported during clang-tidy enablement due to moving temporary objects, which prevents copy elision. This fix addresses the issue by removing unnecessary std::move calls call, allowing the compiler to optimize the code through copy elision, resolving the error.
''' test/dbus_passive_unittest.cpp:613:18: error: moving a temporary object prevents copy elision [-Werror test/dbus_passive_unittest.cpp:71:18: error: moving a temporary object prevents copy elision [-Werror test/dbus_passive_unittest.cpp:833:18: error: moving a temporary object prevents copy elision [-Werror test/dbus_passive_unittest.cpp:877:18: error: moving a temporary object prevents copy elision [-Werror dbus/dbuspassiveredundancy.cpp:52:11: error: moving a temporary object prevents copy elision [-Werror '''
Tested: Build and unit tests passed successfully.
Change-Id: I320f048807085c3bbac0171a28c8505474aaf24a Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| 92f9f3c8 | 06-Nov-2023 |
Harvey Wu <Harvey.Wu@quantatw.com> |
Auto determine failsafe duty according sensor fail
- Auto determine the failsafe duty when sensor failed
example: If PID config as follows, when "Die CPU0" sensor failed, fans in zone 0 will be set
Auto determine failsafe duty according sensor fail
- Auto determine the failsafe duty when sensor failed
example: If PID config as follows, when "Die CPU0" sensor failed, fans in zone 0 will be set to 80%, when "DIMM0" sensor failed, since there is no "FailSafePercent" setting in config, so set to zone's FailSafePercent 100%. ``` { "Class": "temp", ... ... ... "Inputs": [ "Die CPU0" ], "Name": "CPU0 PID", "FailSafePercent": 80.0, ... ... ... "Type": "Pid", "Zones": [ "Zone 0" ] }, { "Class": "temp", ... ... ... "Inputs": [ "DIMM[0-9]", "DIMM1[0-5]" ], "Name": "DIMM CPU0 PID", ... ... ... "Type": "Pid", "Zones": [ "Zone 0" ] }, { "FailSafePercent": 100.0, "MinThermalOutput": 0.0, "Name": "Zone 0", "Type": "Pid.Zone", "ZoneIndex": 0 }, ```
Tested: If zone1 and zone2 into failsafe duty 40% => fan0_pwm | 1Dh | ok | 29.0 | 24.70 unspecifi fan1_pwm | 1Eh | ok | 29.1 | 24.70 unspecifi fan2_pwm | 1Fh | ok | 29.2 | 39.98 unspecifi fan3_pwm | 20h | ok | 29.3 | 39.98 unspecifi fan4_pwm | 21h | ok | 29.4 | 39.98 unspecifi fan5_pwm | 22h | ok | 29.5 | 39.98 unspecifi
cpu0_nbm | 48h | ok | 7.79 | 36 degrees C
Let cpu0_nbm(zone0 and zone2) into failsafe which set failsafe duty as 100% => fan0_pwm | 1Dh | ok | 29.0 | 99.96 unspecifi fan1_pwm | 1Eh | ok | 29.1 | 99.96 unspecifi fan2_pwm | 1Fh | ok | 29.2 | 39.98 unspecifi fan3_pwm | 20h | ok | 29.3 | 39.98 unspecifi fan4_pwm | 21h | ok | 29.4 | 99.96 unspecifi fan5_pwm | 22h | ok | 29.5 | 99.96 unspecifi
cpu0_nbm | 48h | ns | 7.79 | No Reading
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: Iaf5ffd1853e5cd110a1ef66c7a1fd073bc894dda
show more ...
|
| 1b3b7304 | 04-Oct-2024 |
Harvey Wu <Harvey.Wu@quantatw.com> |
fix CI failed
- Refs about removing add_object_vtable: https://gerrit.openbmc.org/c/openbmc/phosphor-hwmon/+/73009
- initial some struct data
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Chan
fix CI failed
- Refs about removing add_object_vtable: https://gerrit.openbmc.org/c/openbmc/phosphor-hwmon/+/73009
- initial some struct data
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: Iacc62eb1b8cd2b1e092efdbcb3abafb8afb896c7
show more ...
|
| bd63bcac | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I0f105c3310e87172c65a09a8787a2db5a4041cc0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 9366089a | 13-Oct-2023 |
Patrick Rudolph <patrick.rudolph@9elements.com> |
fancontroller: Add missing config.h
Include config.h to satisfy #ifdef used in those files.
Change-Id: I0f6a3aa750abdf7b7c263d05f0551ee481b98d51 Signed-off-by: Patrick Rudolph <patrick.rudolph@9ele
fancontroller: Add missing config.h
Include config.h to satisfy #ifdef used in those files.
Change-Id: I0f6a3aa750abdf7b7c263d05f0551ee481b98d51 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
show more ...
|
| 9788963c | 05-Nov-2023 |
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> |
Support to accumulate PWM of different controllers for same sensor
Description: 1. Add one property: accumulateSetPoint in zone of fan table that could be used to enable accumulation of output PW
Support to accumulate PWM of different controllers for same sensor
Description: 1. Add one property: accumulateSetPoint in zone of fan table that could be used to enable accumulation of output PWM of different controllers with same sensor.
2. Add one property: checkHysterWithSetpt in pid info of fan table to select to compare current input and setpoint to check hysteresis.
3. The purpose of accumulate the stepwise output and PID output for one sensor is that the setting of stepwise could use to prevent the fan speed from suddenly increasing from a very low speed to a very high speed due to reaching the setpoint.
Use stepwise before setpoint could also keep the PWM steady at low ambient temperature.
Design: 1. Search "accumulateSetPoint" field in fan table. If the value was true, accumulate the output PWM of different controllers with same profile name.
2. Support two method to calculate PID output that could be chosen by setting the "checkHysterWithSetpt" to true in pid info of fan table.
If the flag was set to true, it won't calculate PWM output if the input lower than setpoint.
Test Case: 1. Check the output PWM of different controllers with same profile name could be accumulated - pass.
2. Set "checkHysterWithSetpt" to true and check PID output would not be calculated if the input temperature was lower than setpoint - pass.
Please see more details in gist: https://gist.github.com/DelphineCCChiu/a6170d3e1a12fc4ee76fad324382fba3
Change-Id: I9f38f250d72545784c6c11be2fde7d45f0b385c4 Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
show more ...
|
| 397e6bcb | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I816b3334e4bb65384a49bc34af6ae5fe092c923e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 3f0f7bc3 | 13-Feb-2023 |
Josh Lehan <krellan@google.com> |
Add MissingIsAcceptable feature to avoid failsafe
This is a partial implementation of the ideas here: https://github.com/openbmc/phosphor-pid-control/issues/31
A new configuration item is supported
Add MissingIsAcceptable feature to avoid failsafe
This is a partial implementation of the ideas here: https://github.com/openbmc/phosphor-pid-control/issues/31
A new configuration item is supported in the PID object, named "MissingIsAcceptable" (for D-Bus) or "missingIsAcceptable" (for the old config.json). The value is an array of strings. If these strings match sensor names, those sensors will be flagged as "missing is acceptable", that is, they can go missing and the zone will not be thrown into failsafe mode as a result.
This can be handy for sensors that are not always available on your particular machine. It is independent of the existing Availability interface, because the decision to go into failsafe mode or not is a property of the PID loop, not of the sensor itself.
If a PID loop consists of all sensors that are missing, the output will be deemed to be the setpoint, thus essentially making the PID loop a no-op. Now initializing sensor values to NaN, not zero, as zero is not a good default if PID loop is margin, undoing a bug I made: https://gerrit.openbmc.org/c/openbmc/phosphor-pid-control/+/38228
Tested: It worked for me. Also, added a unit test case.
Change-Id: Idc7978ab06fcc9ed8c6c9df9483101376e5df4d1 Signed-off-by: Josh Lehan <krellan@google.com>
show more ...
|
| 31058fd3 | 13-Jan-2023 |
Josh Lehan <krellan@google.com> |
Implementing the TempToMargin feature
Wrapping the input name std::string in a new structure SensorInput, so that the TempToMargin information can be cleanly carried along with it, all the way down
Implementing the TempToMargin feature
Wrapping the input name std::string in a new structure SensorInput, so that the TempToMargin information can be cleanly carried along with it, all the way down to the PID input processing layer where it is needed. This allows the conversion to be done just-in-time before the temperature reading is interpreted, minimizing the blast radius of this change. Nonetheless, because of the type change, there was a somewhat large blast radius to implement this feature.
The design, and the documentation, is already here: https://github.com/openbmc/phosphor-pid-control/issues/23
Tested: Added unit tests for JSON parsing and for proper execution of the TempToMargin feature. They pass. Ran it locally, on our appropriately-configured system, and it seems to work for me.
Change-Id: I598ba485195aaa70c26e91a1da3ab88fff8c3a4c Signed-off-by: Josh Lehan <krellan@google.com>
show more ...
|