c7e95627 | 03-Jun-2020 |
Manikandan Elumalai <manikandan.hcl.ers.epl@gmail.com> |
PSUSensor: add support for peak value
This feature adds _max support for PSU.
Tested: ipmitool sensor list Verified sensor value with the related driver(adm1278) and entity-manager changes in FB
PSUSensor: add support for peak value
This feature adds _max support for PSU.
Tested: ipmitool sensor list Verified sensor value with the related driver(adm1278) and entity-manager changes in FBYV2.json (Facebook YosemiteV2),
The Entity-manager configured and tested as below,
"Labels": [ "vin", "iout1", "pin", "temp1", "maxvin", "maxiout1", "maxpin", "maxtemp1" ]
Signed-off-by: Manikandan Elumalai <manikandan.hcl.ers.epl@gmail.com> Change-Id: I2ae98c7f716c71c8177781ba7c21fea51c4657ac
show more ...
|
5591cf08 | 15-Jul-2020 |
James Feist <james.feist@linux.intel.com> |
Fix adcsensor crash
We were taking a reference to a temporary variable. Change it so we don't.
Tested: Passed cycling script that exposed issue
Change-Id: I9226e3d11b5c892cdfe02f138680ed98844596ef
Fix adcsensor crash
We were taking a reference to a temporary variable. Change it so we don't.
Tested: Passed cycling script that exposed issue
Change-Id: I9226e3d11b5c892cdfe02f138680ed98844596ef Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
d320a2e1 | 11-Jul-2020 |
Jason Ling <jasonling@google.com> |
fan-sensors: add optional pwm name override
Problem: pwm sensors created by FanSensors have a naming scheme that is hard coded. There are systems that need to have pwm sensors named differently.
So
fan-sensors: add optional pwm name override
Problem: pwm sensors created by FanSensors have a naming scheme that is hard coded. There are systems that need to have pwm sensors named differently.
Solution: In a fan connector configuration the PwmName property will now attempt to be detected. If this property exists then the name in PwmName will be used; otherwise the pwm sensor name will be generated using the old method.
Tested: Entity-Manager json configuration fragment used:
{ "Name": "fan0_connector", "Pwm": 0, "PwmName": "fan0_pwm", "Status": "enabled", "Tachs": [0], "Type": "FanConnector" }, { "Name": "fan1_connector", "Pwm": 1, "PwmName": "fan1_pwm", "Status": "enabled", "Tachs": [1], "Type": "FanConnector" }, { "Name": "fan2_connector", "Pwm": 2, "Status": "enabled", "Tachs": [2], "Type": "FanConnector" },
results when running ipmitool sdr list on BMC:
Pwm_3 | 99.96 unspecifi | ok fan0_pwm | 99.96 unspecifi | ok fan1_pwm | 99.96 unspecifi | ok fan0_tach | 0 RPM | ok fan1_tach | 0 RPM | ok fan2_tach | 0 RPM | ok
Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: I780c4f377e2e4f23567e1196ae420bf3c57c05f2
show more ...
|
dd648008 | 10-Jul-2020 |
Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> |
Fix for performance issue
This commit replace the regex usage with simple string operations decreasing significantly the CPU load.
Tested: Manual testes where made to the splitFileName function
Fix for performance issue
This commit replace the regex usage with simple string operations decreasing significantly the CPU load.
Tested: Manual testes where made to the splitFileName function behavior and CPU load. No regression detected.
Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> Change-Id: Ifacbe7c7daf7a90671d543b7cfd65cc571f7ce4b
show more ...
|
c22b842b | 07-Jul-2020 |
James Feist <james.feist@linux.intel.com> |
CPUSensor: Fix reading failure after DC Cycle
This makes it so the timer is called all of the time regardless if the async handler has fired. Making it so that when the handler doesn't respond becau
CPUSensor: Fix reading failure after DC Cycle
This makes it so the timer is called all of the time regardless if the async handler has fired. Making it so that when the handler doesn't respond because of error, we don't have issues.
Tested: DC cycled, continued to get readings
Change-Id: Ib12e172ae93eb6c7bb83876457ce4320822ba56e Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
961bf09a | 01-Jul-2020 |
James Feist <james.feist@linux.intel.com> |
Standardize read errors
Each sensor handled read errors their own way, making it inconsistant. This helps to align them all in the base class, so that error handling happens the same for each sensor
Standardize read errors
Each sensor handled read errors their own way, making it inconsistant. This helps to align them all in the base class, so that error handling happens the same for each sensor. It also aligns the power state change handling.
Tested: Tested DC Cycling and Enabling/Disabling ME to make sure functional change correctly
Change-Id: I1a191d27629602e1ca3871d933af07b15bf9f331 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
d7ae29a3 | 25-Jun-2020 |
James Feist <james.feist@linux.intel.com> |
ipmbsensor: simplify reading
In reality there are only 4 reading types, no reason to seperate this out by device type. Simplify it.
Also update PXE VR to use standard READ_TEMP pmbus command.
Test
ipmbsensor: simplify reading
In reality there are only 4 reading types, no reason to seperate this out by device type. Simplify it.
Also update PXE VR to use standard READ_TEMP pmbus command.
Tested: Readings were the same
Change-Id: I707fa0d75c388bf757ad95140361ddb10ad00bd4 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
8fb0a013 | 26-Jun-2020 |
Josh Lehan <krellan@google.com> |
hwmontemp: Add SBTSI device to whitelist
Adding the SBTSI device to the whitelist, similar to the others. This is the AMD SB-TSI interface, for reading CPU temperature from AMD processors.
Signed-o
hwmontemp: Add SBTSI device to whitelist
Adding the SBTSI device to the whitelist, similar to the others. This is the AMD SB-TSI interface, for reading CPU temperature from AMD processors.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I9dd40f2864dc1884bede2cffdf19944ce489611b
show more ...
|
0eee0c19 | 18-Jun-2020 |
Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> |
Fix for sensor labeling
In case when more than one item is available for the same type of sensor and the same channel number, only one dbus sensor was created instead of few.
This change fixes this
Fix for sensor labeling
In case when more than one item is available for the same type of sensor and the same channel number, only one dbus sensor was created instead of few.
This change fixes this shortcoming by adding the ‘item’ suffix to the sensor label and allowing to distinguish created sensors from each other for different items. In case of 'input' item the suffix is omitted.
For example, when 3 items are available like: power1 _average, power1 _cap, power1 _input and the name file contains text ‘Power’, before this change only one sensor will be created under name:
|-/xyz/openbmc_project/sensors/power/Power_CPU1
After this change a 3 separate sensors will be created:
|-/xyz/openbmc_project/sensors/power/Power_Average_CPU1 |-/xyz/openbmc_project/sensors/power/Power_Cap_CPU1 |-/xyz/openbmc_project/sensors/power/Power_CPU1
With this commit the name of each sensor will follow the title convention, where each word starts with upper case.
Tested: Tested manually with different items for the same sensor reading.
Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> Change-Id: I981d216e92fbee3b2a45a251e3359e6d41923b7d
show more ...
|
62084c81 | 22-Jun-2020 |
Josh Lehan <krellan@google.com> |
psusensor: Update sensorTypes and sync with pmbusNames
Trivial patch, to update sensorTypes array, keeping it in sync with pmbusNames array, and sorting both arrays alphabetically.
Question, why ar
psusensor: Update sensorTypes and sync with pmbusNames
Trivial patch, to update sensorTypes array, keeping it in sync with pmbusNames array, and sorting both arrays alphabetically.
Question, why are there two arrays here? The sensorTypes array could be programmatically generated from pmbusNames easily. If interest, I will make another patch to do this.
Question, what is special about the "pmbus" driver name, which does not correspond to a sensor chip, unlike the others?
Question, why is pmbusNames in lowercase but sensorTypes is in all caps, except for "pmbus"? Is there a reason for this, or is it just a convention that evolved that way?
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I9fbc4fb65a0c3a69d43eef2e873169e522f11748
show more ...
|
9a44547e | 24-Jun-2020 |
Wludzik, Jozef <jozef.wludzik@intel.com> |
Fix segfault caused by accessing nullptr
There is a corner cases where "sensors" map contains nullptr when CPU is not installed or base configuration is invalid. Now presence of shared_ptr is valida
Fix segfault caused by accessing nullptr
There is a corner cases where "sensors" map contains nullptr when CPU is not installed or base configuration is invalid. Now presence of shared_ptr is validated on every loop.
Tested: - Successfully boot OpenBMC without any crash in adcsensor.
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Change-Id: I267388c004fcbfcd5e3c14b77f95d31aa89f0cc8
show more ...
|
4f45e429 | 09-Jun-2020 |
Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> |
Refactoring of the updateValue method
Purpose of these changes is to make the method created to update any dbus parameters, not only the `Value`, available for all classes that inherit from the Sens
Refactoring of the updateValue method
Purpose of these changes is to make the method created to update any dbus parameters, not only the `Value`, available for all classes that inherit from the Sensor class.
This commit does following changes: * method areDifferent is moved from the CPUSensor class to the Sensor. * method genericUpdateValue is renamed to updateProperty and moved from the CPUSensor class to the Sensor. * method updateValue is changed to utilize the updateProperty method.
Tested: Manual tests where done on CPUSensor. No differences detected comparing to results taken before these changes.
Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> Change-Id: I736526c0a128ffe094e156018fca6a883659f82a
show more ...
|
68b14e6a | 03-Jun-2020 |
Manikandan Elumalai <manikandan.hcl.ers.epl@gmail.com> |
PSUSensor: add support for ADM1278
Tested: ipmitool sensor list Combined with related driver, related entity-manager changes in FBYV2.json(Facebook Yosemitev2),sensors properly shown up the value
PSUSensor: add support for ADM1278
Tested: ipmitool sensor list Combined with related driver, related entity-manager changes in FBYV2.json(Facebook Yosemitev2),sensors properly shown up the value.
Signed-off-by: Manikandan Elumalai <manikandan.hcl.ers.epl@gmail.com> Change-Id: I231286dda78a0b324e5ca74e1571a477aeba2448
show more ...
|
63f38669 | 09-Jun-2020 |
Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> |
Moving some methods from threshold to utils
Two methods splitFileName and readFile seems to be more generic and used not only by thresholds. Moving splitFileName and readFile from the threshold name
Moving some methods from threshold to utils
Two methods splitFileName and readFile seems to be more generic and used not only by thresholds. Moving splitFileName and readFile from the threshold namespace to utils.
Tested: Manual tests where done on CPUSensor. No differences detected comparing to results before these changes.
Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> Change-Id: I8ab58099eca740b6111a382f68f2ab32d7762a78
show more ...
|
38786d02 | 05-Jun-2020 |
Jason Ling <jasonling@google.com> |
psusensors: add adm1272, raa228228
added driver support for adm1272, raa228228.
Tested: tested on target platform and was able to show values read from hwmon/sysfs matched what was being published
psusensors: add adm1272, raa228228
added driver support for adm1272, raa228228.
Tested: tested on target platform and was able to show values read from hwmon/sysfs matched what was being published on dbus.
Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: I28a70e50fb2c07ea178e97f496b9b52bf81b7ffc
show more ...
|
16e7af1d | 05-Jun-2020 |
Jason Ling <jasonling@google.com> |
hwmontemp: Add MAX6581 to sensor types
Add MAX6581 to the array of recognized sensors.
Tested: Tested on a target platform. Verified that sensor readings were published to dbus.
Service xyz.openbm
hwmontemp: Add MAX6581 to sensor types
Add MAX6581 to the array of recognized sensors.
Tested: Tested on a target platform. Verified that sensor readings were published to dbus.
Service xyz.openbmc_project.HwmonTempSensor: └─/xyz └─/xyz/openbmc_project └─/xyz/openbmc_project/sensors └─/xyz/openbmc_project/sensors/temperature ├─/xyz/openbmc_project/sensors/temperature/max6581_0 ├─/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
Signed-off-by: Jason Ling <jasonling@google.com> Change-Id: I30a105272b1c943066fc51e74f2c95afb7c1bf95
show more ...
|
45e9277d | 04-Jun-2020 |
Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com> |
Support retrieving 'utilization' from ME
ME exposes sensors which express host CPU utilization in range 0-255. This change introduces following things: - 'MESensor' sensor type introduced alongside
Support retrieving 'utilization' from ME
ME exposes sensors which express host CPU utilization in range 0-255. This change introduces following things: - 'MESensor' sensor type introduced alongside legacy 'METemp' for clarity - ability to expose 'utilization' sensor with range 0-100 (percent) - scaling utilization value from 0-255 to 0-100
Testing: - added following configuration on platform: { "Address": 190, "Class": "MESensor", "Name": "Host CPU Core Utilization", "SensorType": "utilization", "ScaleValue": 0.392, "Type": "IpmbSensor" } - configuration properly loaded - sensors appear on D-Bus and Redfish: { "@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Sensors/Host_CPU_Core_Utilization", "@odata.type": "#Sensor.v1_0_0.Sensor", "Id": "Host_CPU_Core_Utilization", "Name": "Host CPU Core Utilization", "Reading": 98.784, "ReadingRangeMax": 100.0, "ReadingRangeMin": 0.0, "ReadingUnits": "Percent", "Status": { "Health": "OK", "State": "Enabled" } }
Change-Id: I49a14820e1b72f9776bd24ba1584d81ee0c95cd5 Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
show more ...
|
8d8d8d7c | 29-May-2020 |
Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> |
Exposing power capping values as a sensor
This implementation introduces support for power capping values provided by hwmon. Values are read from files with suffix cap, cap_max and cap_min and are e
Exposing power capping values as a sensor
This implementation introduces support for power capping values provided by hwmon. Values are read from files with suffix cap, cap_max and cap_min and are exposed as properties of the interface xyz.openbmc_project.Sensor.Value The property Value is taken from the power[N]_cap file in a standard way. While the MaxValue and MinValue are periodically read from the corresponding files: power[N]_cap_max and power[N]_cap_min. If cap_max, cap_min files cannot be read properties MinValue/MaxValue are set to 0 unless the power is OFF then NaN is returned. For other types of files than ‘cap’ default CPUSensor MinValue, MaxValue values are used as it was before this change.
Link to sysfs file descriptions: https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
Tested: Test were done manually, no regression detected.
Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> Change-Id: I72fd85f3f441b8a430b9dadd47c874eec52b7829
show more ...
|
38fb5983 | 28-May-2020 |
James Feist <james.feist@linux.intel.com> |
Update clang format
Update to clang-format-10
Change-Id: I7fcab706fb384e5fcc07a06c42897a5ddbc4b511 Signed-off-by: James Feist <james.feist@linux.intel.com> |
3840d0ad | 13-May-2020 |
Josh Lehan <krellan@google.com> |
Add MAX6654 device to hwmontempsensor whitelist
Tested: The hwmontempsensor program now picks up readings from this device, after it is instantiated within hwmon by entity-manager, same as the other
Add MAX6654 device to hwmontempsensor whitelist
Tested: The hwmontempsensor program now picks up readings from this device, after it is instantiated within hwmon by entity-manager, same as the other devices already in the whitelist.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I1923161beab0bc2fee361d7b2c5916bbf9d3b9d7
show more ...
|
94733251 | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Icc64aefa6ac9a73a103d877f6639495af57b4229 |
10306bd5 | 21-Apr-2020 |
Yong Li <yong.b.li@linux.intel.com> |
Stop the timer when the deasserted events occur
A timer will be started if there is any threshold asserted event occurs, but it is not stopped when the deasserted occurs. This causes additional asse
Stop the timer when the deasserted events occur
A timer will be started if there is any threshold asserted event occurs, but it is not stopped when the deasserted occurs. This causes additional asserted events. Connected the timer with different threshold, and stop it if deasserted.
Tested: Adjust the threshold value with ipmitool raw 4 0x26 command, there is no duplicated asserted sel log: 8 | 04/21/20 | 08:00:24 UTC | Voltage P3VBAT | Upper Non-critical going high | Asserted | Reading 3.04 > Threshold 2.57 Volts 9 | 04/21/20 | 08:00:26 UTC | Voltage P3VBAT | Upper Non-critical going high | Deasserted | Reading 3.04 > Threshold 3.28 Volts a | 04/21/20 | 08:00:45 UTC | Voltage P3VBAT | Upper Non-critical going high | Asserted | Reading 3.04 > Threshold 2.57 Volts b | 04/21/20 | 08:00:48 UTC | Voltage P3VBAT | Upper Non-critical going high | Deasserted | Reading 3.04 > Threshold 3.28 Volts
Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: Ia218320c29c34e0bf9ef0604934e04cf0a5701dd
show more ...
|
1afda6bb | 09-Apr-2020 |
Yong Li <yong.b.li@linux.intel.com> |
adcsensor: Check if the object is still valid in the async callback functions
Sometimes adcsesnor will crash during stress test. The root cause is that the object is destroyed already when the async
adcsensor: Check if the object is still valid in the async callback functions
Sometimes adcsesnor will crash during stress test. The root cause is that the object is destroyed already when the async callback functions are executed. The timer cancel() cannot cancel the expired callback handlers. When the callback handler is executed, the object is deleted already. The buffer used by async_read_util must guarantee that they remain valid until the handler is called.
Using the weak_ptr to check if the object is still valid before using these member variables/functions.
Tested: No adcsensor crash with stress test, Change the threshold of ADC sensor 0x51 P3VBAT: while [ true ]; do; \ ipmitool raw 4 0x26 0x51 0x1b 0x20 0x1b 0 0x2a 0x2a 0;\ ipmitool raw 4 0x26 0x51 0x1b 0x20 0x1b 0 0x2a 0x2b 0;\ sleep 1; done
Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: I2ddb934199e2d0f52a1a6df25c46eadfe06cfda3
show more ...
|
bf8b1dad | 15-Apr-2020 |
Yong Li <yong.b.li@linux.intel.com> |
psusensor: Check if the object is still valid in the callback functions
There is a chance that the service will crash if the sensor threshold is changed. The root cause is that threshold changing wi
psusensor: Check if the object is still valid in the callback functions
There is a chance that the service will crash if the sensor threshold is changed. The root cause is that threshold changing will trigger the deletion of sensors object, when the callback handler is executed after objects destroyed, the variables of objects are invalid.
Adding a weak_ptr in the callback functions to check if the object is destroyed already, only access the variables if it is valid.
Tested: Change/query the PSU sensor threshold using ipmi commands to trigger the sensor re-creation, the threshold config is correct, and there is no any psusensor crash log.
Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: Ib8169aeffde18eeaf1a2491d205a808ea15a27d9
show more ...
|
3046a024 | 03-Apr-2020 |
Yong Li <yong.b.li@linux.intel.com> |
Add beep support for PSU
Spec requires that system will beep with pattern 1-5-1-4 if there is any PSU failure or config error.
Tested: With two PSUs, disconnect one AC cable, or unplug one PSU, to
Add beep support for PSU
Spec requires that system will beep with pattern 1-5-1-4 if there is any PSU failure or config error.
Tested: With two PSUs, disconnect one AC cable, or unplug one PSU, to trigger the psu failure/config error, there is a beep.
Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: I8664400164298fa4a35f82b79e4bf417481aabb0
show more ...
|