History log of /openbmc/phosphor-pid-control/dbus/dbusconfiguration.cpp (Results 26 – 50 of 81)
Revision Date Author Comments
# 1a7c49f9 06-Oct-2020 Patrick Venture <venture@google.com>

dbus: Move findSensors to dbus util

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I2ba4d3c430200eb58cb4364dcce694a080531846


# 998fbe67 20-Sep-2020 Josh Lehan <krellan@google.com>

dbusconfiguration: Accept ZoneIndex parameter for zoneID

When using configuration from D-Bus entity-manager,
zone ID numbers were assigned in a "randomly" haphazard way,
making it di

dbusconfiguration: Accept ZoneIndex parameter for zoneID

When using configuration from D-Bus entity-manager,
zone ID numbers were assigned in a "randomly" haphazard way,
making it difficult to see what zone was being talked about,
during logging messages and error messages and so on.

Accept a new JSON parameter "ZoneIndex",
in the "Pid.Zone" configuration stanza (where MinThermalOutput is),
and use it appropriately as the key of the std::map variables,
when building out the data structures from the JSON.

This gives feature parity with the old config.json configuration,
which already featured the parameter "id" which accomplished this.

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

show more ...


# 7e952d9f 05-Oct-2020 Patrick Venture <venture@google.com>

dbus: move types to header for use in tests

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Iff106e17fa020d7deff29b78af8a5337324317d8


# 0911bfe7 10-Aug-2020 Patrick Venture <venture@google.com>

dbusconfiguration: deconflict variable names

pwmInterface was defined that shadows other variable.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ide7173061d5c80

dbusconfiguration: deconflict variable names

pwmInterface was defined that shadows other variable.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ide7173061d5c8085f5dae96c3f1defc36bbbad40

show more ...


# 9b93692d 10-Aug-2020 Patrick Venture <venture@google.com>

dbushelper: drop obsolete parameter from interface

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Idebae41e021f54c3670cc22aa6c784549a361c23


# 8729eb98 10-Aug-2020 Patrick Venture <venture@google.com>

Make the dbushelper own its own bus handle.

The dbushelper implements an interface that should not be sdbusplus
specific. By making the implementation own the sdbusplus aspects, an
a

Make the dbushelper own its own bus handle.

The dbushelper implements an interface that should not be sdbusplus
specific. By making the implementation own the sdbusplus aspects, an
alternate implementation can be swapped in.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I4109772499421e2e6497a0fcad663ebbd1210a7c

show more ...


# ef1f8864 17-Aug-2020 Patrick Venture <venture@google.com>

dbusconfiguration: fixup header inclusion

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ic42e7eb67d18e330c4b74f751d5db338845cb1e4


# a076487a 08-Aug-2020 Patrick Venture <venture@google.com>

sensors/zones: place in namespace and cleanup

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I527dbc8477a232945f696227a7b0b2adbee45175


# f3b04fd3 24-Jul-2020 Jason Ling <jasonling@google.com>

dbusconfiguration: add support for one-to-one fan/pwm mapping

Problem: in a fan pid only the last pwm from "Outputs" in the fan pid
configuration would be applied to all the fans listed

dbusconfiguration: add support for one-to-one fan/pwm mapping

Problem: in a fan pid only the last pwm from "Outputs" in the fan pid
configuration would be applied to all the fans listed in "Inputs". This
is an error since "Outputs" is a list of strings, not a single string.

Solution: If Class=="fan" && InputInterfaces.size() ==
OutputInterfaces.size() then elaborate the sensors on a one Input to one
Output basis.
Else if Class=="fan" && OutputInterfaces.size() == 1 then:
do the old behavior where all the fans in Inputs have their writepaths
set to the one pwm interface.
Else:
This is an error condition so throw an exception

Additional changes:

Improve readability: for clarity "Inputs" and "Outputs" have been split into
separate datastructures. The same was done for "SensorInterfaces". This
makes it easier to understand what is going on during sensor
elaboration.

Improve error handling: For fans there should be one output or the
number of outputs should match inputs. If this isn't the case then the
configuration isn't valid and the system should fail.

Tested:
fragment of dbus configuration used:
{
"Class": "fan",
"Name": "fan0_pid",
...
"Inputs": [
"fan0_tach", "fan1_tach", "fan2_tach"
],
...
"Outputs": [
"fan0_pwm","fan1_pwm", "fan2_pwm"
],
},
Without Change: see in the sensor config the last element of Outputs is used to drive all the fans.
Additionally fan pwms are added to the sensor configuration which looks to be incorrect.
Only a single sensor node is needed for fans and fan tachs are chosen for this purpose.
{fan0_pwm,
{, , /xyz/openbmc_project/control/fanpwm/fan2_pwm, 0, 255, 0},
},
{fan0_tach,
{fan, /xyz/openbmc_project/sensors/fan_tach/fan0_tach, /xyz/openbmc_project/control/fanpwm/fan2_pwm, 0, 255, 0},
},
{fan1_pwm,
{, , /xyz/openbmc_project/control/fanpwm/fan2_pwm, 0, 255, 0},
},
{fan1_tach,
{fan, /xyz/openbmc_project/sensors/fan_tach/fan1_tach, /xyz/openbmc_project/control/fanpwm/fan2_pwm, 0, 255, 0},
},
{fan2_pwm,
{, , /xyz/openbmc_project/control/fanpwm/fan1_pwm, 0, 255, 0},
},
{fan2_tach,
{fan, /xyz/openbmc_project/sensors/fan_tach/fan2_tach, /xyz/openbmc_project/control/fanpwm/fan2_pwm, 0, 255, 0},
},

With Change: see in the sensor config the correct association for a fan_tach sensor. Also the fan_pwms are trimmed.
sensor config:
{
{fan0_tach,
{fan, /xyz/openbmc_project/sensors/fan_tach/fan0_tach, /xyz/openbmc_project/control/fanpwm/fan0_pwm, 0, 255, 0}
},
{fan1_tach,
{fan, /xyz/openbmc_project/sensors/fan_tach/fan1_tach, /xyz/openbmc_project/control/fanpwm/fan1_pwm, 0, 255, 0}
},
{fan2_tach,
{fan, /xyz/openbmc_project/sensors/fan_tach/fan2_tach, /xyz/openbmc_project/control/fanpwm/fan2_pwm, 0, 255, 0}
},
}

Signed-off-by: Jason Ling <jasonling@google.com>
Change-Id: Id4494028752026a5ba8f0c1d8081276e0bf4be90

show more ...


# a83a3ecc 04-Aug-2020 Patrick Venture <venture@google.com>

update clang-format from Latest in docs

Updates the clang-format file and then applies it.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia9faf13ce171f90bf07547

update clang-format from Latest in docs

Updates the clang-format file and then applies it.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia9faf13ce171f90bf07547efd781139bee23e8c7

show more ...


# 6fc301fb 23-Jul-2020 Jason Ling <jasonling@google.com>

dbus:config: add descriptive failures for missing attributes

dbus configuration expects a minimum set of attributes to be present in
the configuration. When one of these configurations a

dbus:config: add descriptive failures for missing attributes

dbus configuration expects a minimum set of attributes to be present in
the configuration. When one of these configurations are missing throw a
more descriptive error.

Tested:
modified entity-manager configuration to intentionally omit a required
attribute.

swampd[3402]: terminate called after throwing an instance of
'std::runtime_error'
swampd[3402]: what(): missing attribute FFGainCoefficient

Signed-off-by: Jason Ling <jasonling@google.com>
Change-Id: I427ec343198d8e2b8db8cf6d8dc616c14dcbca9b

show more ...


# 991ebd80 21-Jul-2020 James Feist <james.feist@linux.intel.com>

dbusconfiguration: Filter InterfacesAdded Match

The mapper adds new interfaces when associations are
created that do not affect the state in sensors. This
causes extra callbacks to h

dbusconfiguration: Filter InterfacesAdded Match

The mapper adds new interfaces when associations are
created that do not affect the state in sensors. This
causes extra callbacks to happen that reload fan control.
Filter these messages so that the associations do not
cause a reload.

Tested: Set sensor to critical to cause critical
association to be created, reload did not happen

Change-Id: Idda91ec96567367ff5939c75cca38bbfab0762f6
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 1a704dc4 04-Jun-2020 Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>

Fix regex pattern for finding sensors

In case if there are sensors have a single digit and multi digit
index, findSensors() searches a sensor incorrectly. For an example,
if there ar

Fix regex pattern for finding sensors

In case if there are sensors have a single digit and multi digit
index, findSensors() searches a sensor incorrectly. For an example,
if there are 'PWM_1' and 'PWM_16' in sensor list and it searches
'PWM_1', 'PWM_16' is returned as a matched result which is
incorrect. To fix the issue, this commit fixes regex pattern to
search sensors properly.

Tested: Tested it on a system which has multi-digit PWM sensor
index and checked that swampd initialized fan-PWM pairs
correctly.

Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Change-Id: I05e8d87996e83b681f0726fa5ba02b01c08cd942

show more ...


# 298a95cb 07-Apr-2020 Yong Li <yong.b.li@linux.intel.com>

catch the execption during buildSensors

If there any sensor is being created or deleted,
the buildSenosrs will throw exceptions and the application will crash.
Add a retry logic to c

catch the execption during buildSensors

If there any sensor is being created or deleted,
the buildSenosrs will throw exceptions and the application will crash.
Add a retry logic to catch such exception and try again,
will quit the process finally if failed more than 5 times.

Tested:
Changing the PSU sensor threshold using ipmi commands,
no pid service crash log.

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: Icf96bfb01bce4a3b5c22095f0bef0d793fd8430d

show more ...


# 3660b388 11-Nov-2019 James Feist <james.feist@linux.intel.com>

Set ignoreDbusMinMax for Stepwise

Temperature readings should not be in percent. Add
ignoreDbusMinMax as inheritFromDbus was removed.

Tested: modified fan floor by changing step

Set ignoreDbusMinMax for Stepwise

Temperature readings should not be in percent. Add
ignoreDbusMinMax as inheritFromDbus was removed.

Tested: modified fan floor by changing stepwise controller

Change-Id: I1bf4e15ca78bc894dc82dd68e787fd6fbd3d0aef
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 3433cb60 11-Nov-2019 James Feist <james.feist@linux.intel.com>

Add ignoreDbusMinMax to temp configurations

Originally 'inheritFromDBus' was only set for fan
configurations. This was removed, so now everything
was inheriting from Dbus. Set the in

Add ignoreDbusMinMax to temp configurations

Originally 'inheritFromDBus' was only set for fan
configurations. This was removed, so now everything
was inheriting from Dbus. Set the inverse of
'inheritFromDBus' of ignoreDbusMinMax to temp configurations
so that they get the correct reading.

Tested: Used sensor override in a loop on a sensor and
saw the reading in the pid be correct

Change-Id: I29dab298921f9c5204d29341555f2c5d2d011aa2
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 5ec20270 10-Jul-2019 James Feist <james.feist@linux.intel.com>

Allow setting setpoint based on dynamic thresholds

As we allow dynamic thresholds in dbus-sensors to track
the t-control of dimms etc, we want to be able to set a
setpoint based on a

Allow setting setpoint based on dynamic thresholds

As we allow dynamic thresholds in dbus-sensors to track
the t-control of dimms etc, we want to be able to set a
setpoint based on a offset from a threshold. This adds
the ability to create a "SetPointOffset" that is a
threshold of the given sensor. For instance a "SetPointOffset"
of "WarningHigh" would get the sensors "WarningHigh" value
then add the "SetPoint" value to it (commonly negative for
WarningHigh/CriticalHigh).

Tested: Turned on debug print and saw correct setpoint being
loaded into config

Change-Id: Idb9760ea5a66347f24573fb26937f8f278834a19
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# fc2e803f 11-Jul-2019 Kun Yi <kunyi731@gmail.com>

sensors: ignore min/max in json for D-Bus passive sensor read

min/max values were meant to scale write to be PWM, but were
overloaded in commit 75eb769d351434547899186f73ff70ae00d7934a

sensors: ignore min/max in json for D-Bus passive sensor read

min/max values were meant to scale write to be PWM, but were
overloaded in commit 75eb769d351434547899186f73ff70ae00d7934a
to scale sensor read to percent as well. However currently the D-Bus sensors
built from JSON can only specify one pair of min/max values,so they
cannot be used for both read/write interfaces.

Fix the behavior by ignoring min/max in settings when building D-Bus passive
read interface and only read them from D-Bus.

Tested:
D-Bus passive sensor value is no longer scaled if there is no
MinValue/MaxValue specified.

Resolves: openbmc/phosphor-pid-control#14

Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I206bbe75c77e79f765eca76cfa015321dcba4aa7

show more ...


# 11d243df 24-Jun-2019 James Feist <james.feist@linux.intel.com>

dbusconfiguration: Protect better against bad config

Configurations with no input are not allowed. The
current code looked for if there were any sensors
avaiable. On our systems an i

dbusconfiguration: Protect better against bad config

Configurations with no input are not allowed. The
current code looked for if there were any sensors
avaiable. On our systems an input was not being
displayed due to a bug, but the output was there,
causing pid control to crash. Protect against this
issue.

Tested: Had sensor bug in tree, and pid control didn't
segfault

Change-Id: I42869748bac0b85affae5f5c671b859fec996a54
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 3987c8b4 13-May-2019 James Feist <james.feist@linux.intel.com>

Remove FanProfile configuration

If we add a "Profiles" vector into the PID and Stepwise
entity-manager configurations the logic becomes much more
simple. We default to all profiles,

Remove FanProfile configuration

If we add a "Profiles" vector into the PID and Stepwise
entity-manager configurations the logic becomes much more
simple. We default to all profiles, and can limit the scope
of some configurations to the selected profile.

Tested: Switched between Acoustic/Performance mode and saw
a UpperClippingCurve get added / removed.

Change-Id: Ib0448b59210f696c8a28a99da06f98b065eadf08
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 1fe08952 07-May-2019 James Feist <james.feist@linux.intel.com>

Make dbusconfiguration reloadable without reboot

Now that asio is being used instead of threads, we can
reload the fan configuration without having to restart the
application. This m

Make dbusconfiguration reloadable without reboot

Now that asio is being used instead of threads, we can
reload the fan configuration without having to restart the
application. This moves the ownership of the passive and host
bus outside of the SensorManager so that it can be recreated
each reload.

Tested: Watched logs and saw full fan config get reloaded
after changing fan configuration

Tested: Ran on json configured system and it behaved as
expected.

Change-Id: I00e6b27f75384fd41de2017b723f159c9691ae97
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 0c8223b5 08-May-2019 James Feist <james.feist@linux.intel.com>

Consolidate all util.hpp

This deletes all lower level util.hpp and cats them
into the top level util.hpp to avoid name conflicts.

Change-Id: Ia11e4a08053a3970b0aadf21d1156ab26de

Consolidate all util.hpp

This deletes all lower level util.hpp and cats them
into the top level util.hpp to avoid name conflicts.

Change-Id: Ia11e4a08053a3970b0aadf21d1156ab26def36bd
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 5782ab81 02-Apr-2019 James Feist <james.feist@linux.intel.com>

Bugfix: dbusconfiguration: read correct hysteresis

s/positive/negative

Change-Id: Ib7761abae47404706c69255fc2861d0f58c26369
Signed-off-by: James Feist <james.feist@linux.intel.c

Bugfix: dbusconfiguration: read correct hysteresis

s/positive/negative

Change-Id: Ib7761abae47404706c69255fc2861d0f58c26369
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# f0096a0c 21-Feb-2019 James Feist <james.feist@linux.intel.com>

Add fan profile support to dbusconfiguration

On start dbus configuration will look for profiles. If any exist it
will attempt to find the thermal mode interface:
https://github.com/

Add fan profile support to dbusconfiguration

On start dbus configuration will look for profiles. If any exist it
will attempt to find the thermal mode interface:
https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Control/ThermalMode.interface.yaml

This can be anywhere on d-bus, tested placement was in settingsd. Based
on the selected profile(s) it will create a 'whitelist' of controllers,
and will remove any not in that whitelist.

Tested-by: Added and removed curves based on acoustic or
performance mode

Change-Id: I9e83a77d71d7fcfe691cc4beb700b8a67024c64f
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# f81f2886 26-Feb-2019 James Feist <james.feist@linux.intel.com>

Expand conf namespace

Put rest of conf.hpp in the conf namespace. This is
largely a sed replace, and wrapping from_json in
conf namespace as it failed to build.

Change-Id: I

Expand conf namespace

Put rest of conf.hpp in the conf namespace. This is
largely a sed replace, and wrapping from_json in
conf namespace as it failed to build.

Change-Id: I9fe5c7b2fface44618c43af2367035afc39bcb64
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


1234