8dc277cc | 25-Apr-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
meson: Enable link time optimization
Currently local boost subproject compilation fails with a message: """ ../subprojects/boost-1.84.0/libs/container/src/dlmalloc_ext_2_8_6.c: 1085:41: error: itera
meson: Enable link time optimization
Currently local boost subproject compilation fails with a message: """ ../subprojects/boost-1.84.0/libs/container/src/dlmalloc_ext_2_8_6.c: 1085:41: error: iteration 2305843009213693951 invokes undefined behavior [-Werror=aggressive-loop-optimizations] 1085 | size = request2size(sizes[i]*element_size);
...
cc1: all warnings being treated as errors """ To solve the issue enable link time optimization.
Tested: "meson setup build && cd build && meson compile" finishes successfully.
Change-Id: I6a146c5067d4d9eda163b18f9307b8b36eaedac5 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
a7bbd458 | 27-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> |
9f1532dd | 21-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 ...
|
7e63502a | 13-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 ...
|
c7b2be39 | 13-Oct-2023 |
Patrick Rudolph <patrick.rudolph@9elements.com> |
main: Gracefully handle SIGTERM
When systemd stops phosphor-pid-control.service it sends a SIGTERM. Catch SIGTERM in the existing boost signal handler and stop the all control loops to make sure the
main: Gracefully handle SIGTERM
When systemd stops phosphor-pid-control.service it sends a SIGTERM. Catch SIGTERM in the existing boost signal handler and stop the all control loops to make sure the destructor is called in each of them.
This functionality will be used in the following commit.
Tested: systemctl stop phosphor-pid-control.service and see dtor being invoked before process terminates.
Change-Id: I5b1fe8f9191d703351b96e7ae19348f7ccab03d4 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
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 ...
|
df597657 | 19-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 ...
|
efda1ced | 08-Dec-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: adjust nlohmann-json dependency
Simplify dependency detection logic and align wrap file name with other repositories.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iab3ae4b3
meson: adjust nlohmann-json dependency
Simplify dependency detection logic and align wrap file name with other repositories.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iab3ae4b39677f40e88801865b6c3ddfe77d43d40
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 ...
|
e1dbb59a | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Ic0bb299201cf8abb024b7d4aca465d50cbc8b585 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
37180062 | 01-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 ...
|
cc0232af | 09-Feb-2023 |
Harvey Wu <Harvey.Wu@quantatw.com> |
zone: Add debug interface to zone dbus path
- Add xyz.openbmc_project.Debug.Pid.Zone interface to fanctrl/zoneX dbus to record the PID config name which is driving this zone.
TEST: ``` busctl int
zone: Add debug interface to zone dbus path
- Add xyz.openbmc_project.Debug.Pid.Zone interface to fanctrl/zoneX dbus to record the PID config name which is driving this zone.
TEST: ``` busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0 xyz.openbmc_project.Debug.Pid.Zone NAME TYPE SIGNATURE RESULT/VALUE FLAGS .Leader property s "CPU0_PID" emits-change ```
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: I6fcfa596eec6b51a7727c2a01e7d36e3698eebcf
show more ...
|
f7c07c95 | 15-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using t
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using the .txt extension for a build file has a few advantages, chief among them many tools and text editors expect a file with the .txt extension to be plain text files, not build scripts.
[1] https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I4f13d242e2f20afc0a303b4b7c3b18369ddd78ec
show more ...
|
796f06dc | 29-Jun-2023 |
Zev Weiss <zev@bewilderbeest.net> |
sysfs: Unconditionally replace '**' in FixupPath()
Previously this function had been constrained to only substitute '**' in the provided path if it contained "/sys/devices/platform/". Some devices
sysfs: Unconditionally replace '**' in FixupPath()
Previously this function had been constrained to only substitute '**' in the provided path if it contained "/sys/devices/platform/". Some devices that want to use the path-substitution feature may be more readily accessed via other sysfs paths, e.g. under /sys/bus/i2c/devices, so let's allow it to be applied more widely.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: I9f622a911e8af43bf1a9416f0b86738bfde2e0df
show more ...
|
90b0a66d | 13-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
dbusutil: use sdbusplus match rules
Rather than hand-rolling the match string, use the utilities supplied by sdbupslus.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic4f0de7c9dbd3
dbusutil: use sdbusplus match rules
Rather than hand-rolling the match string, use the utilities supplied by sdbupslus.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic4f0de7c9dbd36d3f854dd1027f2826860814615
show more ...
|
d5d83fa7 | 13-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
dbuspassive: drop needless c_str
The sdbusplus match constructor already handles a std::string, so drop the extra c_str call.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2167d2a
dbuspassive: drop needless c_str
The sdbusplus match constructor already handles a std::string, so drop the extra c_str call.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2167d2a027e13d55b5590b8266e56cc108b23bfa
show more ...
|
bcf09f1e | 13-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: enable tests by default
The current meson_options.txt has tests disabled, which is not desired. The Yocto recipe in openbmc/openbmc already has tests disabled when building under Yocto. We w
meson: enable tests by default
The current meson_options.txt has tests disabled, which is not desired. The Yocto recipe in openbmc/openbmc already has tests disabled when building under Yocto. We want tests enabled by default so that a typical developer will see the failures their changes might have induced.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6a283862ac8afc43fc0fdf37829310c8ca682eff
show more ...
|
a83fae58 | 13-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: add necessary subprojects
Enable the project to build outside of the OpenBMC Docker or Yocto environments by providing subproject wrap files as necessary. In some cases, this requires adding
meson: add necessary subprojects
Enable the project to build outside of the OpenBMC Docker or Yocto environments by providing subproject wrap files as necessary. In some cases, this requires adding additional dependencies in the meson file due to them not currently being expressed.
Supply a .gitignore that is appropriate for a Meson project as the current one seems to be from the time when this project used autoconf.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iea2ae8cb9e00d2aa726800ff09b42d93efc886fc
show more ...
|
2aaf936f | 12-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: Idf4240e5b3f67681568e4
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: Idf4240e5b3f67681568e489eebbe9db71f7a44f4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
57a7af6a | 14-Jun-2023 |
Harvey Wu <Harvey.Wu@quantatw.com> |
fix compile error when enable meson test option
- Fix compile error: [-Werror=sign-compare]
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: Iaedcf75b14b7b5526ff6728a33305735470967ca |
9fe3a3c7 | 11-May-2023 |
ykchiu <Chiu.YK@inventec.com> |
Set failsafePwm by pid configuration
<motivation> Current phosphor-pid-control service supports one zone with one failsafepwm. However, for some platforms there are different pluggable cards in a zo
Set failsafePwm by pid configuration
<motivation> Current phosphor-pid-control service supports one zone with one failsafepwm. However, for some platforms there are different pluggable cards in a zone. Different combinations may require different failsafe pwm settings. Why not just use one zone failsafepwm for all the combinations? because if we take power consumption or acoustic into consideration, we will find that not all the cases need the same high failsafepwm. Each case just need high enough failsafepwm to cool down the system in that condition.
For example case1: zone0 : gpuA card + motherboard in zone0 =>requires failsafepwm = 80
case2: zone1 : gpuB card + motherboard in zone0 =>requires failsafepwm = 60
In order to solve the problem described above , we propose the design that. Each pidloop has its own failsafepwm. The final failsafepwm will be calculated during building zone process. The detailed design concept is described in design concept section.
<design concept> a zone has several pid loops, each one has its own pid failsafe pwm defined in its configuration.
The calculation flow goes as below: 1.Take failsafepwm of the pidloops and the zone from the configuration files, if any is missing , set it to zero. 2.Take max value of (zone failsafepwm and pid loops failsafepwm). 3.If the max value from 'step 2' is zero indicates none of failsafepwm is configured, set it to default setting 100%.
<note> 1.this is intended for dbus configuration method, since one zone may have different pidloops from different pluggable boards entity json, but this design also works for static configuration method, therefore, the zone with different boards will need different failsafepwm. 2.keep it back compatible with original design , also take zone failsafepwm into calculation.
Working example as below
Case1 Zone0: zone0 pidloop failsafepwm = 60 gpuA pidloop failsafepwm = 70 Motherboard failsafepwm = 40
=>final failsafepwm = 70
Case2 Zone0: zone0 pidloop failsafepwm = 60 gpuB pidloop failsafepwm = 80 Motherboard failsafepwm = 40
=>final failsafepwm = 80
Change-Id: I5aa1c6a7108f4520f41de5d8eba3075d021bbe79 Signed-off-by: ykchiu <Chiu.YK@inventec.com>
show more ...
|
7c6d35d5 | 10-May-2023 |
ykchiu <Chiu.YK@inventec.com> |
Allow disabling PID loops at runtime
<design concept> Add the map of object enable interface to pid loops in the zone then we can disable/enable each pid loop process in a zone by dbus command.
[no
Allow disabling PID loops at runtime
<design concept> Add the map of object enable interface to pid loops in the zone then we can disable/enable each pid loop process in a zone by dbus command.
[note] Enable = true : enable process (default) Enable = false : disable process
Tested: In this case: we set Enable = false to disable pidloop:Zone_Temp_0, and see how it affects the zone final pwm, when pidloop: Zone_Temp_0 in zone 0 is disabled.
then even we are trying to heat up the temperature of a sensor: Temp_0 in pidloop: Zone_Temp_0, this set point of the pidloop will not be taken into the calculation for the final set point of the whole zone.
``` <service object> root@openbmc:/tmp# busctl tree xyz.openbmc_project.State.FanCtrl `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/settings `-/xyz/openbmc_project/settings/fanctrl |-/xyz/openbmc_project/settings/fanctrl/zone0 | |-/xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp | |-/xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp_0 | `-/xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp_1
====Enable process for pidloop:Zone_Temp_0 with p-switch temperature sensor:Temp_0 at runtime==== root@openbmc:~# busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp_0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS xyz.openbmc_project.Object.Enable interface - - - .Enabled property b true emits-change writable
====Disable process for pidloop:Zone_Temp_0 with p-switch temperature sensor: Temp_0==== root@openbmc:~# busctl set-property xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp_0 xyz.openbmc_project.Object.Enable Enabled b false root@openbmc:~# busctl introspect xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone0/Zone_Temp_0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS xyz.openbmc_project.Object.Enable interface - - - .Enabled property b false emits-change writable ```
when Disable the process of the pidloop: Zone_Temp_0, the requester switches from Zone_Temp_0 to the others, when you enable the pidloop: Zone_Temp_0, the setpoint of Zone_Temp_0 will be take into consideration again
Change-Id: I95ae700144f0d16049fff8b309f05ae690a7ef72 Signed-off-by: ykchiu <Chiu.YK@inventec.com>
show more ...
|