History log of /openbmc/phosphor-pid-control/pid/ (Results 1 – 25 of 120)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
46a755fc27-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 ...

765a6d8023-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 ...

f8b6e55127-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 ...


/openbmc/phosphor-pid-control/conf.hpp
/openbmc/phosphor-pid-control/dbus/dbusconfiguration.cpp
/openbmc/phosphor-pid-control/dbus/dbusconfiguration.hpp
/openbmc/phosphor-pid-control/dbus/dbushelper.cpp
/openbmc/phosphor-pid-control/dbus/dbushelper.hpp
/openbmc/phosphor-pid-control/dbus/dbuspassive.cpp
/openbmc/phosphor-pid-control/dbus/dbuspassive.hpp
/openbmc/phosphor-pid-control/dbus/dbuspassiveredundancy.cpp
/openbmc/phosphor-pid-control/dbus/dbuspassiveredundancy.hpp
/openbmc/phosphor-pid-control/dbus/dbusutil.cpp
/openbmc/phosphor-pid-control/dbus/dbusutil.hpp
/openbmc/phosphor-pid-control/dbus/dbuswrite.cpp
/openbmc/phosphor-pid-control/dbus/dbuswrite.hpp
/openbmc/phosphor-pid-control/experiments/drive.cpp
/openbmc/phosphor-pid-control/failsafeloggers/builder.cpp
/openbmc/phosphor-pid-control/failsafeloggers/builder.hpp
/openbmc/phosphor-pid-control/failsafeloggers/failsafe_logger.cpp
/openbmc/phosphor-pid-control/failsafeloggers/failsafe_logger.hpp
/openbmc/phosphor-pid-control/failsafeloggers/failsafe_logger_utility.cpp
/openbmc/phosphor-pid-control/failsafeloggers/failsafe_logger_utility.hpp
/openbmc/phosphor-pid-control/interfaces.hpp
/openbmc/phosphor-pid-control/ipmi/dbus_mode.cpp
/openbmc/phosphor-pid-control/ipmi/main_ipmi.cpp
/openbmc/phosphor-pid-control/ipmi/manualcmds.cpp
/openbmc/phosphor-pid-control/ipmi/manualcmds.hpp
/openbmc/phosphor-pid-control/main.cpp
/openbmc/phosphor-pid-control/meson.build
/openbmc/phosphor-pid-control/notimpl/writeonly.cpp
builder.cpp
builder.hpp
buildjson.cpp
buildjson.hpp
controller.hpp
ec/logging.cpp
ec/logging.hpp
ec/pid.cpp
ec/pid.hpp
ec/stepwise.cpp
ec/stepwise.hpp
fancontroller.cpp
pidcontroller.cpp
pidcontroller.hpp
pidloop.cpp
pidloop.hpp
stepwisecontroller.cpp
stepwisecontroller.hpp
thermalcontroller.cpp
zone.cpp
zone.hpp
zone_interface.hpp
/openbmc/phosphor-pid-control/sensors/build_utils.cpp
/openbmc/phosphor-pid-control/sensors/builder.cpp
/openbmc/phosphor-pid-control/sensors/builder.hpp
/openbmc/phosphor-pid-control/sensors/buildjson.cpp
/openbmc/phosphor-pid-control/sensors/host.cpp
/openbmc/phosphor-pid-control/sensors/host.hpp
/openbmc/phosphor-pid-control/sensors/manager.cpp
/openbmc/phosphor-pid-control/sensors/manager.hpp
/openbmc/phosphor-pid-control/sensors/pluggable.cpp
/openbmc/phosphor-pid-control/sensors/pluggable.hpp
/openbmc/phosphor-pid-control/sensors/sensor.hpp
/openbmc/phosphor-pid-control/setsensor.cpp
/openbmc/phosphor-pid-control/sysfs/sysfsread.cpp
/openbmc/phosphor-pid-control/sysfs/sysfswrite.cpp
/openbmc/phosphor-pid-control/sysfs/sysfswrite.hpp
/openbmc/phosphor-pid-control/sysfs/util.cpp
/openbmc/phosphor-pid-control/test/controller_mock.hpp
/openbmc/phosphor-pid-control/test/dbus_passive_unittest.cpp
/openbmc/phosphor-pid-control/test/dbus_util_unittest.cpp
/openbmc/phosphor-pid-control/test/dbushelper_mock.hpp
/openbmc/phosphor-pid-control/test/helpers.hpp
/openbmc/phosphor-pid-control/test/json_parse_unittest.cpp
/openbmc/phosphor-pid-control/test/pid_fancontroller_unittest.cpp
/openbmc/phosphor-pid-control/test/pid_json_unittest.cpp
/openbmc/phosphor-pid-control/test/pid_stepwisecontroller_unittest.cpp
/openbmc/phosphor-pid-control/test/pid_thermalcontroller_unittest.cpp
/openbmc/phosphor-pid-control/test/pid_zone_unittest.cpp
/openbmc/phosphor-pid-control/test/sensor_host_unittest.cpp
/openbmc/phosphor-pid-control/test/sensor_manager_unittest.cpp
/openbmc/phosphor-pid-control/test/sensor_mock.hpp
/openbmc/phosphor-pid-control/test/sensor_pluggable_unittest.cpp
/openbmc/phosphor-pid-control/test/sensors_json_unittest.cpp
/openbmc/phosphor-pid-control/test/util_unittest.cpp
/openbmc/phosphor-pid-control/test/writeinterface_mock.hpp
/openbmc/phosphor-pid-control/test/zone_mock.hpp
/openbmc/phosphor-pid-control/util.cpp
/openbmc/phosphor-pid-control/util.hpp
2c457bbd27-Jun-2025 Ed Tanous <ed@tanous.net>

Fix a default init of bool with float

Initing a bool with 0.0 (ie float) makes no sense. Change to false.

This was originally flagged by clang-tidy

Change-Id: I42112b568334632e04a8eca707304f77557

Fix a default init of bool with float

Initing a bool with 0.0 (ie float) makes no sense. Change to false.

This was originally flagged by clang-tidy

Change-Id: I42112b568334632e04a8eca707304f7755750795
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

d2768c5726-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 ...

d59ccac305-Jun-2025 Eric Yang <eric.yang.wiwynn@gmail.com>

Check for empty sensors in getFailSafePercent

Add an early return to DbusPidZone::getFailSafePercent() when
_failSafeSensors is empty.
This prevents calling std::max_element on an empty container an

Check for empty sensors in getFailSafePercent

Add an early return to DbusPidZone::getFailSafePercent() when
_failSafeSensors is empty.
This prevents calling std::max_element on an empty container and avoids
undefined behavior.

Motivation:
With offline-failsafe-pwm enabled, _failSafeSensors can be empty during
a control-loop reload or shutdown.
In that case, getFailSafePercent() yielded undefined values that
resolved to 0% PWM and risking an overtemperature.
This patch ensures a valid fallback percent is always returned.

Change-Id: Ic53c6771a71114a192f4a73fbde599d994c1567b
Signed-off-by: Eric Yang <eric.yang.wiwynn@gmail.com>

show more ...

bd1d102407-Apr-2025 Patrick Williams <patrick@stwcx.xyz>

remove unused thread include

Threads are not natively used by the repository. Remove all references
to `#include <thread>`.

Tested: Code still compiles and unit tests pass.

Signed-off-by: Patrick

remove unused thread include

Threads are not natively used by the repository. Remove all references
to `#include <thread>`.

Tested: Code still compiles and unit tests pass.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iaff3915124e93adf7bb13566e0ff7cfe7576efd6

show more ...

a427007529-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 ...

7ca8887c17-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 ...

1930027601-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 ...

6df8bb5027-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 ...

326cd76208-Dec-2024 Jayanth Othayoth <ojayanth@gmail.com>

clang-tidy: Add Tag Names to Anonymous Structs

The following errors were reported during clang-tidy enablement due to
anonymous non-C-compatible types being given names for linkage purposes
by typed

clang-tidy: Add Tag Names to Anonymous Structs

The following errors were reported during clang-tidy enablement due to
anonymous non-C-compatible types being given names for linkage purposes
by typedef declarations. This fix addresses the issue by adding tag
names to the anonymous structs, making them compatible with C.

'''
pid/ec/pid.hpp:20:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror
pid/ec/pid.hpp:11:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror
'''

Tested: Build and unit testing verified.

Change-Id: I1a998d23b515f2ff570867935cc1a6c8b040f4b1
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

92f9f3c806-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 ...

1b3b730404-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 ...

bd63bcac16-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 ...

5d897e2a04-Jun-2024 Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>

Modified the naming to get the value of checkhysterwithsetpt

Modified the naming to get the value of checkhysterwithsetpt in dbus
configuration and json configuration.

Change-Id: Ic9cc6a6bfd0da69ac

Modified the naming to get the value of checkhysterwithsetpt

Modified the naming to get the value of checkhysterwithsetpt in dbus
configuration and json configuration.

Change-Id: Ic9cc6a6bfd0da69acc1638ca7ebd6712211e2984
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>

show more ...

a7bbd45827-Feb-2024 Zhikui Ren <zhikui.ren@intel.com>

remove duplicated header include

This change fixes ci build error.

Change-Id: I613e90f107146bf35d34d72d4a8e78054176a582
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>

9f1532dd21-Dec-2023 Jonico Eustaquio <jonico.eustaquio@fii-na.com>

Include config.h for strict-failsafe-pwm option

The strict-failsafe-pwm meson option definition was not be seeing by
the #ifdefs since the config.h that meson creates that defines the
option is not

Include config.h for strict-failsafe-pwm option

The strict-failsafe-pwm meson option definition was not be seeing by
the #ifdefs since the config.h that meson creates that defines the
option is not included. The strict-failsafe-pwm option can now be
enabled by adding EXTRA_OEMESON:append = " -Dstrict-failsafe-pwm=true"
to the bbappend.

Change-Id: Ic4047bcd0e4599d14ab84744ffe22d23faa994dd
Signed-off-by: Jonico Eustaquio <jonico.eustaquio@fii-na.com>

show more ...

7e63502a13-Oct-2023 Patrick Rudolph <patrick.rudolph@9elements.com>

pid/fancontroller: Set failsafe PWM in destructor

Introduce a new feature that's guarded by a new meson option
'offline-failsafe-pwm':

After the FanController object was destroyed it can no longer

pid/fancontroller: Set failsafe PWM in destructor

Introduce a new feature that's guarded by a new meson option
'offline-failsafe-pwm':

After the FanController object was destroyed it can no longer regulate
the fans. To prevent system failure set all fans to the FailSafePercent
defined in the configuration.

In addition to rebuilding configuration it also allows to keep the fans
in FailSafe mode as long as the phosphor-pid-control.service is stopped
or the system reboots. However this change doesn't cover the case of
a program crash where the destructor won't be executed. Abnormal program
termination must be handled by systemd and it out of scope of this
change.

Tested: 'systemctl stop phosphor-pid-control.service' and see the fans
ramp up to FailSafePercent.

Change-Id: I81262b07fd4c1212efc1a4ba4635bde8bc7b5215
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>

show more ...

9366089a13-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 ...

9788963c05-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 ...

df59765719-Dec-2023 Josh Lehan <krellan@google.com>

Changing wording of failsafe transition messages

Cleaning up and unifying the logic around displaying diagnostic
messages when failsafe transitions happen, so that the true case and
the false case r

Changing wording of failsafe transition messages

Cleaning up and unifying the logic around displaying diagnostic
messages when failsafe transitions happen, so that the true case and
the false case run the same code path. This makes the messaging more
standard and coherent from the user point of view.

This will cause one additional logging message to appear during
startup. This is intentional: when the process is started up, this
counts as a state transition that is worth logging about, as it goes
from uncontrolled state (essentially manual mode) to either failsafe
mode or normal mode.

Tested: Installed and observed messages logged during startup

Change-Id: Ib80cc342611a78199410564f76a2c65b590ef511
Signed-off-by: Josh Lehan <krellan@google.com>

show more ...

3f0f7bc313-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 ...

31058fd313-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 ...

3718006201-Oct-2023 Harvey Wu <Harvey.Wu@quantatw.com>

zone: Add debug thermal/power interface

- Add xyz.openbmc_project.Debug.Pid.ThermalPower interface to
fanctrl/zoneX/pid dbus to record some datas in thermal/power
PID loop.

Tested:
```
busctl i

zone: Add debug thermal/power interface

- Add xyz.openbmc_project.Debug.Pid.ThermalPower interface to
fanctrl/zoneX/pid dbus to record some datas in thermal/power
PID loop.

Tested:
```
busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0/CPU0_PID xyz.openbmc_project.Debug.Pid.ThermalPower
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.ClassType property s "Temperature" emits-change
.Input property d 36.594 emits-change
.Leader property s "Die_CPU0" emits-change
.Output property d 4200 emits-change
.Setpoint property d 70 emits-change
```

Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I6846c3878c2ca5eaeeb6eaf48aaf0f604a2beccf

show more ...

12345