b228bc30 | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie36d234f4580029a7832a0cd179f3bb78a1a403f
show more ...
|
8f73ad76 | 06-Oct-2021 |
Alex.Song <zheng.song@intel.com> |
Make specific UNA sensors not trigger failsafe
By convention, sensors at some states like 'not present', 'power state not matching' are marked as 'unavailable' on dbus. At such states, some specific
Make specific UNA sensors not trigger failsafe
By convention, sensors at some states like 'not present', 'power state not matching' are marked as 'unavailable' on dbus. At such states, some specific sensors should not be considered as failed and trigger pid 'failsafe'.
A typical example is when a system is powered-off, its CPU/DIMM temp sensors are 'unavailable', these sensors should not be treated as 'failed' and trigger pid 'failsafe'. This is necessary for systems whose Fans will keep working when the CPU is off.
This feature is configurable per sensor (valid on thermal sensors). It can be enabled by setting the Pid controller option "InputUnavailableAsFailed" to 'false' when one configuring the PID module via entity-manager, or by setting the sensor option "unavailableAsFailed" to 'false' when one configuring the PID module via JSON. (These options are optional and default to 'true')
Tested: 1. On a Fan 'always-on' system, enabale this feature on CPU temp sensors, poweroff the system, 'unavailable' CPU temp sensors do not trigger the failsafe mode. 2. 'Unavailable' Fans still trigger the failsafe mode. 3. 'Unfunctional' or 'failed' sensors still trigger the failsafe mode.
Signed-off-by: Zheng Song <zheng.song@intel.com> Change-Id: I1dd1d76466f43e7dcf51c161c96714f1bcfae88d
show more ...
|
457993f8 | 19-Nov-2021 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove usage of deprecated alias
The alias `server::match` has been deprecated since 2016. Use the new alias under bus.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib
sdbusplus: remove usage of deprecated alias
The alias `server::match` has been deprecated since 2016. Use the new alias under bus.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ibccf347f7016b69f78f74b8debe714b8a0c30ba5
show more ...
|
0001ee02 | 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Icea9b76115b6c3c7856574605ead3fedc0eca5d6 |
e7507a8b | 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I16eeca31de290221c7a9184ee0c48cc923466832
show more ...
|
7a8d5a17 | 21-Oct-2020 |
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> |
Fix regex in findSensors
swampd crashs while reading configuration. Root caused that it is introduced by incorrect finding sensors. For an example, when it searches 'Fan_1' for inputs, it finds thes
Fix regex in findSensors
swampd crashs while reading configuration. Root caused that it is introduced by incorrect finding sensors. For an example, when it searches 'Fan_1' for inputs, it finds these two sensors:
Fan_1 Pwm_PSU1_Fan_1
where 'Pwm_PSU1_Fan_1' is an unexpected search result, so it causes crash after printing out this message:
"sensor at dbus path [/xyz/openbmc_project/control/fanpwm/Pwm_PSU1_Fan_1] has an interface [xyz.openbmc_project.Control.FanPwm] that does not match the expected interface of xyz.openbmc_project.Sensor.Value"
To fix this issue, this commit modifies regex string in findSensors function. Unit test is updated to reflect the new behavior.
Tested: The crash was not observed. Updated unit test passed.
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> Change-Id: I4e45fac3a3242a6f3655d6873fd63ef22fd0c4dd
show more ...
|
1df9e879 | 08-Oct-2020 |
Patrick Venture <venture@google.com> |
drop struct keyword for non-packed objects
As a style decision, struct is often used with packed structures to indicate they are used like C-structs. Cleanup this codebase to not use the extra stru
drop struct keyword for non-packed objects
As a style decision, struct is often used with packed structures to indicate they are used like C-structs. Cleanup this codebase to not use the extra struct keyword throughout.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I2f83bb1989e4d1f2f843ba3e45fb82e04f0fa61c
show more ...
|
7382318f | 08-Oct-2020 |
Patrick Venture <venture@google.com> |
dbus: parameterize dbusconfiguration init
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I9cb6c0a19d4625d79da8613bd6eea13d6cc04220 |
39199b4d | 08-Oct-2020 |
Patrick Venture <venture@google.com> |
dbus: move debugPrint to util
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Idbea54f13527a4ca3108cc4dccbee07b7b3a7d34 |
b8cfc642 | 07-Oct-2020 |
Patrick Venture <venture@google.com> |
dbus: move zone indexing to util
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia6560a0e0f976dcf9f05004de68f74f5e313950b |
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 |
8b4478cc | 06-Oct-2020 |
Patrick Venture <venture@google.com> |
dbus: add unit-tests for dbusutil: getSensorPath
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Iabb2df7a725da1b70cb6a907d19c451e7bba609d |
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 difficult to see w
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 |
3e2f7581 | 21-Sep-2020 |
Josh Lehan <krellan@google.com> |
dbuspassive: Input processing cleanup and allow "margin"
The sensor input processing steps have been cleaned up, consolidating code duplicated in two places into one. The new "updateValue" function
dbuspassive: Input processing cleanup and allow "margin"
The sensor input processing steps have been cleaned up, consolidating code duplicated in two places into one. The new "updateValue" function does the processing, then calls "setValue" to set it, if it was acceptable.
Initialization of sensor value now uses the same processing path as regular sensor updates, solving a strange discontinuity seen at initialization, where the values had wrong scaling, until the first asynchronous D-Bus sensor update was received.
Also cleaned up handling of floating-point NAN received, which has same meaning as old -1 sentinel value, as used back when the D-Bus schema was integer millidegrees.
Sensors of type "margin" are now accepted, as they are now processed correctly.
Adding new member "_typeMargin" flag to remember margin type, avoiding repeated string computation. Adding new member "_badReading" flag to track the case in which sensor reading is working but gave us bad reading, such as NAN, as this situation differs from already-existing "_failed" flag. Adding new member "_marginHot" flag to request failsafe mode, even though sensor is functional and reading is good, because if we have ran out of margin, PID is not doing the job, and thus we need failsafe mode, to make sure fans spin fast.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Ia6e2f58967f58ae2999489e3e9342388f7b5fb1a
show more ...
|
2400ce43 | 01-Oct-2020 |
Josh Lehan <krellan@google.com> |
dbuswrite: Add another write() form to WriteInterface
Adding another form of the write() call, which takes 3 arguments instead of 1, providing an alternate interface for caller to use.
A compatibil
dbuswrite: Add another write() form to WriteInterface
Adding another form of the write() call, which takes 3 arguments instead of 1, providing an alternate interface for caller to use.
A compatibility function is provided, which simply calls write(), so no API breakage.
The additional arguments to write() allow caller to force the write to happen even if old value same, and/or to learn the actual raw value written.
Adding boilerplate to Sensor and PluggableSensor, to also pass the 3-argument write() through.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Iaf35f674ef9ce38b56017f6cb0f821df6c789649
show more ...
|
91fe17f6 | 21-Sep-2020 |
Josh Lehan <krellan@google.com> |
dbusutil: Fix critical bug in scaleSensorReading
If minimum value is not 0, as is common with temperature sensors of (-128,127) range, the computed scaled value was wildly incorrect, because there w
dbusutil: Fix critical bug in scaleSensorReading
If minimum value is not 0, as is common with temperature sensors of (-128,127) range, the computed scaled value was wildly incorrect, because there was a missing step in the math.
Tested: Scaled values now appear correct to me
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I71290538168e17ac9ebb78489d359f012fbf8517
show more ...
|
7f837e05 | 10-Sep-2020 |
Patrick Venture <venture@google.com> |
dbus/dbusconfiguration: add missing asio header
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I286f2202c0612f93cd48a050ee72be565f35e2db |
d0571309 | 10-Aug-2020 |
Patrick Venture <venture@google.com> |
dbus/dbuspassive: drop no longer used bus reference
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I7aff262c95bea9afa48cfb388082893b1e065010 |
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: Ide7173061d5c8085f5dae96c3f1defc36b
dbusconfiguration: deconflict variable names
pwmInterface was defined that shadows other variable.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ide7173061d5c8085f5dae96c3f1defc36bbbad40
show more ...
|
84c188fe | 10-Aug-2020 |
Patrick Venture <venture@google.com> |
move util methods to dbusutil header
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ie57b106c2d4f28220986d0ab0324459dec2d6085 |
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 alternate impleme
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 |
aadb30dd | 10-Aug-2020 |
Patrick Venture <venture@google.com> |
move dbus helper interface into its own file
This is step 1 to improving the interface to be more generic and drop requirements on dbus.
Signed-off-by: Patrick Venture <venture@google.com> Change-I
move dbus helper interface into its own file
This is step 1 to improving the interface to be more generic and drop requirements on dbus.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I7835ea8242bfb7189cabc1a4084e5f84143d40f6
show more ...
|