History log of /openbmc/dbus-sensors/include/ (Results 101 – 125 of 234)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
2a40e93902-Sep-2020 Josh Lehan <krellan@google.com>

ExternalSensor: New service for external sensors

This code was mostly copied from HwmonTempSensor, and inspired by the
initial proof of concept from https://gerrit.openbmc-project.xyz/35476

Externa

ExternalSensor: New service for external sensors

This code was mostly copied from HwmonTempSensor, and inspired by the
initial proof of concept from https://gerrit.openbmc-project.xyz/35476

External sensors are designed to be placeholders, with no hwmon or
other hardware support locally. Thus, there is no detection or kernel
driver load, so no change is necessary to entity-manager.

The expectation is that these sensors will be updated by something
external to the BMC, such as the host, which can be useful for
including host-based sensors into phosphor-pid-control thermal zones.

* Added systemd service file, similar to the others.
* Added CMakeLists blocks, similar to the others.
* Also cleaned up some nearby formatting in CMakeLists.

Tested: With the addition of the Mutable feature from 36275, and the
installation of the systemd file from 36272, and a change to our IPMI
daemon (still in the process of being upstreamed), the host can write
to a sensor over IPMI. It correctly shows up in the IPMI SDR, and the
written value correctly shows up on the D-Bus ExternalSensor here.

Here is example JSON for use with entity-manager:
{
"Name": "HostOnlyDevTemp",
"Measure": "temperature",
"MinValue": -10.0,
"MaxValue": 117.5,
"Type": "ExternalSensor"
},

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: Id499e1cd6c7918179bb1729e5ce8546cf4121dfa
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

6e6ac0f831-Dec-2020 Josh Lehan <krellan@google.com>

dbus-sensors: PwmSensor math types cleanup

Cleaned up types during math to avoid precision loss.
Integer pwmMax and associated constants now double.
Avoid floating-point comparison, convert to int f

dbus-sensors: PwmSensor math types cleanup

Cleaned up types during math to avoid precision loss.
Integer pwmMax and associated constants now double.
Avoid floating-point comparison, convert to int first.
Corrected rounding from float to int.
Property setter now ignores floating-point NaN.

Rounding done more consistently and correctly now. In some edge
cases, the fan PWM setting will be different from what it was
before, because rounding is now proper instead of truncating.

Tested: Swept fans from 0.0 to 100.0 percent, stepping by 0.1 each
time, to exercise all values between 0 and 255. Behavior now seems
more correct to me. Also set NaN, and it was properly ignored.
Also tested on the uint64_t interface, swept from 0 to 255,
each value mapped cleanly to equivalent floating-point value.

Not tested on "PSU" fans. These are a special case, as the integers
in the underlying file range from 0 to 100, not 0 to 255. The
original logic to handle these remains unchanged, however.

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

show more ...

6736d4b218-Dec-2020 Andrei Kartashev <a.kartashev@yadro.com>

cpusensor: change Min/Max values for power

minValue and maxValue are currently hardcoded for all cpusensors to
-128 and 127 respectively. There is no sense to have negative values for
power sensors

cpusensor: change Min/Max values for power

minValue and maxValue are currently hardcoded for all cpusensors to
-128 and 127 respectively. There is no sense to have negative values for
power sensors but CPU power consumption can be higher than 127W.
Change Min/Max to 0...511 for power sensors.

Tested: busctl introspect xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/power/Average_Power_CPU0
xyz.openbmc_project.Sensor.Value interface -- -
.MaxValue property d 511 emits-change
.MinValue property d 0 emits-change
.Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change
.Value property d 64.393 emits-change writable

Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
Change-Id: I0dafdd657194b1b4d709ce093b658a89120f81f9

show more ...

832a2c6020-Nov-2020 Anoop S <anoopx.s@intel.com>

IpmbSensor:Fix SMBus configuration for VR Temp.

The SMBus index configuration for VR Temp sensor is different
for some platforms.
Hence, SMBus index in which these sensors are connected
is made as D

IpmbSensor:Fix SMBus configuration for VR Temp.

The SMBus index configuration for VR Temp sensor is different
for some platforms.
Hence, SMBus index in which these sensors are connected
is made as D-Bus property, read from xx_baseboard.json file.
Also, sensor read request commands modified to use this value.

Tested :
1.Dediprog and redfish flash the different platforms,
with[SMBus index read from json file] and
without[default SMBus index =3] this configuration change.
- System up and running.
- VR Temp sensor and other sensor readings shows
correctly in 'ipmitool sensor list' output.

Signed-off-by: Anoop S <anoopx.s@intel.com>
Change-Id: Ia106f1c699f5f1515c90585309a65ede37906f18

show more ...

3bcd823e29-Oct-2020 Josh Lehan <krellan@google.com>

Add optional sensor reading logging instrumentation

Noteworthy sensor readings,
such as the first reading,
a new minimum or maximum value,
or ending a good or bad streak of readings,
will now have s

Add optional sensor reading logging instrumentation

Noteworthy sensor readings,
such as the first reading,
a new minimum or maximum value,
or ending a good or bad streak of readings,
will now have some useful logging output.

This feature defaults to disabled, to enable it,
set "enableInstrumentation" constant to "true".

Tested:
It runs, and produces useful output, when enabled.
When disabled, it does nothing.

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

show more ...

100c20bf11-Aug-2020 Jason Ling <jasonling@google.com>

hwmontemp: add labels attribute support

Adds Labels support to Hwmontemp. The behavior is meant to be identical
to the behavior of Labels from PSUSensors.

Labels has the following behavior:
When d

hwmontemp: add labels attribute support

Adds Labels support to Hwmontemp. The behavior is meant to be identical
to the behavior of Labels from PSUSensors.

Labels has the following behavior:
When discovering Name, Name1...NameX attributes from the configuration
and an associated temp is found
If tempX_label exists and its contents is in the Labels attribute then
create the sensor
If tempX_label does not exist but tempX is in the Labels attribute then
create the sensor
If Labels attribute is not present or is an empty list then create the
sensor

Tested:
Had a simple , publically available MAX6581 sensor that has
temp1, temp2, temp3, temp4, temp5
and tested with
Labels = ["temp1", "temp2", "temp3", "temp4", "temp5"]
├─/xyz/openbmc_project/sensors/temperature/max6581_1
├─/xyz/openbmc_project/sensors/temperature/max6581_2
├─/xyz/openbmc_project/sensors/temperature/max6581_3
├─/xyz/openbmc_project/sensors/temperature/max6581_4
├─/xyz/openbmc_project/sensors/temperature/max6581_5
Labels omitted
├─/xyz/openbmc_project/sensors/temperature/max6581_1
├─/xyz/openbmc_project/sensors/temperature/max6581_2
├─/xyz/openbmc_project/sensors/temperature/max6581_3
├─/xyz/openbmc_project/sensors/temperature/max6581_4
├─/xyz/openbmc_project/sensors/temperature/max6581_5

Labels containing temp2,temp5
Results:
├─/xyz/openbmc_project/sensors/temperature/max6581_2
├─/xyz/openbmc_project/sensors/temperature/max6581_5

And a similar test with a device that has temperature labels
"Labels": [
"device_label_A",
"device_label_B",
"device_label_C"
],

├─/xyz/openbmc_project/sensors/temperature/device1_label_A
├─/xyz/openbmc_project/sensors/temperature/device1_label_B
├─/xyz/openbmc_project/sensors/temperature/device1_label_C

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

show more ...

49a8ccd616-Sep-2020 James Feist <james.feist@linux.intel.com>

Add LED Support to Fan Sensor

This allows the fan sensor to trip an LED when a critical
threshold is crossed.

Tested: Saw LED d-bus object in Group manager get set
using sensor override

Change-Id:

Add LED Support to Fan Sensor

This allows the fan sensor to trip an LED when a critical
threshold is crossed.

Tested: Saw LED d-bus object in Group manager get set
using sensor override

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

show more ...

f57836bd25-Sep-2020 Zhikui Ren <zhikui.ren@intel.com>

Fix missing includes.

Add the missing includes when build with latest sdbusplus.

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

484b9b3718-Jun-2020 Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>

Reading min and max values from the rated files exposed by hwmon

With kernel 5.10 hwmon will expose PSU capabilities files. They will
have endings `_rated_min` and `_rated_max`. This commit allows
P

Reading min and max values from the rated files exposed by hwmon

With kernel 5.10 hwmon will expose PSU capabilities files. They will
have endings `_rated_min` and `_rated_max`. This commit allows
PSUSensor to utilize these files. If `rated` files are available
for given sensor then values read from these files will be used to
overwrite the MaxValue and MinValue default values.
The min/max update will be done with frequency 8x times lower than
the sensor value is updated, because in most cases they will not
change too often and for now there is no need to read them more
often.

Tested:
Test were done manually, no regression detected.
CPU usage stays at the same level.
Min and max values are updated properly.

Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>
Change-Id: Icbefcbeb605d0ebd3e127613181fbc5023f118e8

show more ...

e333852815-Sep-2020 James Feist <james.feist@linux.intel.com>

Move dbus connection into base sensor object

This seems common through most sensors, might as
well move it for consistency.

Tested: sensors operational as normal

Change-Id: I4e6c55cbb7171ee5170001

Move dbus connection into base sensor object

This seems common through most sensors, might as
well move it for consistency.

Tested: sensors operational as normal

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

show more ...

d3da128011-Sep-2020 Zhikui Ren <zhikui.ren@intel.com>

revert "revert log debug information for sensor threshold assert events"

Add back the orignial submit 9bf6804c2d76b92005ad9851cb052d407ea3117f
and includes the fix the bug that crashed ipmbsensor.

revert "revert log debug information for sensor threshold assert events"

Add back the orignial submit 9bf6804c2d76b92005ad9851cb052d407ea3117f
and includes the fix the bug that crashed ipmbsensor.

log debug information for sensor threshold assert events

There are sightings that TCPUx_P12_PVCCIO_VS_Temp Sensor
reports reading of zero and trips the low critical threshold.
Add debug prints to gather data.

Also add logs for raw value in sensor base class to help
debug threshold assert events for other sensor type.

Tested:
Verified that log messages show up as expected for threshold
assert events. There is no unwanted log messages on systems that
do not have bad sensor readings.
Verified system stayed up for 30 minutes without crashing.

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

show more ...

98be984407-Sep-2020 Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>

Reading min, max values for ‘cap’ every 8 times.

There is no need to read min and max values of CPU
capabilities with every second. The CPU capabilities
doesn’t change to often if ever. The hwmon up

Reading min, max values for ‘cap’ every 8 times.

There is no need to read min and max values of CPU
capabilities with every second. The CPU capabilities
doesn’t change to often if ever. The hwmon updated the
cap files with cycle of 10sec.
Reading min and max value every 8 times should be enough
in this case.

Tested:
Working as expected, no regression detected.

Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>
Change-Id: I86c6b5542d3e2f3475aef3c5b05b305f87c6ef39

show more ...

2456dde711-Sep-2020 Zhikui Ren <zhikui.ren@intel.com>

Revert "log debug information for sensor threshold assert events"

This reverts commit 9bf6804c2d76b92005ad9851cb052d407ea3117f.
This causes ipmbsensor crash

Change-Id: I8517d801ea1598b190c140f317ef

Revert "log debug information for sensor threshold assert events"

This reverts commit 9bf6804c2d76b92005ad9851cb052d407ea3117f.
This causes ipmbsensor crash

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

show more ...

9bf6804c13-Aug-2020 Zhikui Ren <zhikui.ren@intel.com>

log debug information for sensor threshold assert events

There are sightings that TCPUx_P12_PVCCIO_VS_Temp Sensor
reports reading of zero and trips the low critical threshold.
Add debug prints to ga

log debug information for sensor threshold assert events

There are sightings that TCPUx_P12_PVCCIO_VS_Temp Sensor
reports reading of zero and trips the low critical threshold.
Add debug prints to gather data.

Also add logs for raw value in sensor base class to help
debug threshold assert events for other sensori type.

Tested:
Verified that log messages show up as expected for threshold
assert events. There is no unwanted log messages on systems that
do not have bad sensor readings.

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

show more ...

f920e09c07-Aug-2020 Josh Lehan <krellan@google.com>

TachSensor: Accept PowerState from configuration

Accept the PowerState configuration parameter,
similar to other sensors.
This allows it to optionally be set to "Always",
while still preserving the

TachSensor: Accept PowerState from configuration

Accept the PowerState configuration parameter,
similar to other sensors.
This allows it to optionally be set to "Always",
while still preserving the default of "On".

Some systems have their chassis fans not tied to host power,
so they can continue working, even when host powered off,
and "Always" allows the BMC to continue to monitor them.

Tested: Without this patch, or set to "On",
the tachometers show RPM of 0,
even though the fans are still running correctly,
when host is powered off (but BMC and chassis fans
still have power). After this patch, and setting "Always",
the tachometers once again indicate proper RPM.

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

show more ...

838529b502-Sep-2020 James Feist <james.feist@linux.intel.com>

CPUSensor: Mark interface down when timeout

If we timeout it is because we cannot access the sensor.
Timeouts take a second, but with many sensors, they add
up. Mark the sensor failed the first time

CPUSensor: Mark interface down when timeout

If we timeout it is because we cannot access the sensor.
Timeouts take a second, but with many sensors, they add
up. Mark the sensor failed the first time this
happens to boost the fans as soon as possible.

Tested: Fans boost after interface down

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

show more ...

105a197528-Aug-2020 Kuiying Wang <kuiying.wang@intel.com>

Fix PSU pwm issue.

PSU pwm value range is 0-100, which is not same with
system fan 0-255.
There is an issue when PID to change the PSU pwm
based on percentage.

Tested:
PSU pwm just allowed 0-100.
P

Fix PSU pwm issue.

PSU pwm value range is 0-100, which is not same with
system fan 0-255.
There is an issue when PID to change the PSU pwm
based on percentage.

Tested:
PSU pwm just allowed 0-100.
PSU fan speed is runing as expected based on the percentage.

Change-Id: I3ae591828f5b0d85ab6358af666e4f2ab2e0a447
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>

show more ...

f27a55c704-Aug-2020 James Feist <james.feist@linux.intel.com>

Add retries into get sensor configuration

This adds retries into get sensor configuration and updates
fan sensor to use retries.

Tested:
- Sensors showed up as normal.
- Did a reboot bmc test where

Add retries into get sensor configuration

This adds retries into get sensor configuration and updates
fan sensor to use retries.

Tested:
- Sensors showed up as normal.
- Did a reboot bmc test where I saw retries get attempted
successfully.

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

show more ...

8086aba025-Aug-2020 James Feist <james.feist@linux.intel.com>

Fix missing includes

Likey due to
https://github.com/openbmc/sdbusplus/commit/38ab5ecfe3c51501a9380e2c30dbb5fdd88cf4f9

many boost features that were missing from being included
made the build stop

Fix missing includes

Likey due to
https://github.com/openbmc/sdbusplus/commit/38ab5ecfe3c51501a9380e2c30dbb5fdd88cf4f9

many boost features that were missing from being included
made the build stop working. Fix them.

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

show more ...

58e02efa06-Aug-2020 Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>

Fix detection of invalid 'GetSensorReading'

This change fixes incorrect way to determine Get Sensor Reading value
availability.

In previous implementation proper value of '0' was treated as error.

Fix detection of invalid 'GetSensorReading'

This change fixes incorrect way to determine Get Sensor Reading value
availability.

In previous implementation proper value of '0' was treated as error.

IPMI spec defines 'reading/state unavailable' bit, which ME uses to
inform user about sensor reading being absent.
This change monitors that bit to determine outcome of Get Sensor Reading
call.

Alternative considered was to also look at 'sensor scanning disabled',
but after reading more documentation and checking ME implementation it
turns out that it affects only threshold events generation.

Testing:
- verified that 'nan' is set for unavailable sensor (PSU with PMBUS
cable cut-off)
- verified that for available sensor reporting '0', '0' value is
present instead of 'nan'

Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Change-Id: Iaa940b808e36b9606fe78f7cef7bab2593275889

show more ...

1a540b8131-Jul-2020 Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>

Fix a segmentation fault error in the updateProperty method

Program received signal SIGSEGV, Segmentation fault.
Sensor::updateProperty (this=0x4f4ae0, interface=..., oldValue=@0x4f4b80: nan(0x80000

Fix a segmentation fault error in the updateProperty method

Program received signal SIGSEGV, Segmentation fault.
Sensor::updateProperty (this=0x4f4ae0, interface=..., oldValue=@0x4f4b80: nan(0x8000000000000),
newValue=@0x7efff778: nan(0x8000000000000), dbusPropertyName=0x47d567 "Value")
at /usr/src/debug/dbus-sensors/0.1+gitAUTOINC+623723b9e8-r0/git/include/sensor.hpp:307

It was caused by a missing null pointer checking on a dBus interface
so this commit adds the null pointer checking. This case can be
happened on Tjmax and Tthrottle in CPU sensors that intentionally
removed sensorInterface to make itself as a hidden sensor.

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

show more ...

623723b929-Jul-2020 Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>

Make IpmbSensor properly clear sensor value on PowerOff

Previously when platform was put in Off state, IpmbSensor stopped
polling ON-only sensors, which is fine.
However, it didn't clear sensor valu

Make IpmbSensor properly clear sensor value on PowerOff

Previously when platform was put in Off state, IpmbSensor stopped
polling ON-only sensors, which is fine.
However, it didn't clear sensor value and availability state (which is normally done
by updateValue() for such cases.

This commit introduces following changes:
- updateValue() in invalid power state sets sensor to 'nan'
- modified IpmbSensor to use the same logic as updateValue()
in optimized (skip reading in invalid state) flow

Testing:
- put platform in shutdown state - sensor Value is set to 'nan',
Available is 'false', Functional still 'true'
- after restarting platform - values and flags goes back to normal

Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Change-Id: Ib413000560820d430fe726740c0e9ae5ca062f12

show more ...

bf7cbc8702-Jul-2020 Zhikui Ren <zhikui.ren@intel.com>

Update checkThresholdsPowerDelay to user timer for LOW thresholds only

When CPU is powered off, some volatges are expected to
go below low thresholds. Add delay for low threshold assert events.
No d

Update checkThresholdsPowerDelay to user timer for LOW thresholds only

When CPU is powered off, some volatges are expected to
go below low thresholds. Add delay for low threshold assert events.
No delays for all high threshold events.

When a deassert event happens of a low threshold while there is an active
timer for assert of the same threshold, instead of cancel the existing timer,
start a timer for de-assrt the threshold. This fixes the issue that a low
event can be missed because of the timer cancellation.

Tested:

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

show more ...

375ade2916-Jul-2020 James Feist <james.feist@linux.intel.com>

Fix NvmeSensor assert

As NvmeSensor has many async captures, deleting
the NvmeContext is not enough to make the destructor
fire, we must also manually stop all timers and
connections.

Tested: DC Cy

Fix NvmeSensor assert

As NvmeSensor has many async captures, deleting
the NvmeContext is not enough to make the destructor
fire, we must also manually stop all timers and
connections.

Tested: DC Cycled, assert went away

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

show more ...

59b8b9e526-Jun-2020 Zhikui Ren <zhikui.ren@intel.com>

Add assertValue in thresholdAsserted signal

When threshold property changes, send thresholdAsserted signal
that includes threshold properties and sensor value that caused
the property change. This e

Add assertValue in thresholdAsserted signal

When threshold property changes, send thresholdAsserted signal
that includes threshold properties and sensor value that caused
the property change. This enables the SEL logger to record the
correct sensor reading in the SEL messages.

Tested:
busctl set-property xyz.openbmc_project.ADCSensor
/xyz/openbmc_project/sensors/voltage/P1V8_PCH xyz.openbmc_project.Sensor.Value
Value d 1.97

thresholdAsserted signal is received with the below data:
assertSignal from P1V8_PCH interface xyz.openbmc_project.Sensor.Threshold.Critical
event CriticalAlarmHighassert 1 assertValue 1.97
assertSignal from P1V8_PCH interface xyz.openbmc_project.Sensor.Threshold.Warning
event WarningAlarmHighassert 1 assertValue 1.97

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

show more ...

12345678910