b58ac3ac | 07-Dec-2021 |
Howard Chiu <howard.chiu@quantatw.com> |
PSUSensor: Add MP5023 into whitelist
MPS MP5023 is a Hot-Swap controller which supports PMBus rev 1.3
Tested on Facebook Bletchley platform with 1 MP5023 device on i2c-2@40
Signed-off-by: Howard C
PSUSensor: Add MP5023 into whitelist
MPS MP5023 is a Hot-Swap controller which supports PMBus rev 1.3
Tested on Facebook Bletchley platform with 1 MP5023 device on i2c-2@40
Signed-off-by: Howard Chiu <howard.chiu@quantatw.com> Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Icc00d7ec4fe4918f958429fd3b3dfd628d1ee4a6
show more ...
|
a2df7864 | 07-Dec-2021 |
Ed Tanous <edtanous@google.com> |
Make list single line
Making this list a single, alphabetized list reduces the possibility we get merge conflicts when people add things to this, and make it easier to read.
Tested: Code compiles.
Make list single line
Making this list a single, alphabetized list reduces the possibility we get merge conflicts when people add things to this, and make it easier to read.
Tested: Code compiles. Whitespace changes.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ife51344f3c77d3af866f278de1724a62c565c17c
show more ...
|
57574ad5 | 02-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Avoid context variable
It was only used once to add the sensor, so just use the rvalue directly.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3a5a1bff93aa037bfaa53d2d
NVMeSensorMain: Avoid context variable
It was only used once to add the sensor, so just use the rvalue directly.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3a5a1bff93aa037bfaa53d2d9b08c603f146c9b7
show more ...
|
ee16434a | 01-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Drop use of baseConfiguration pointer
Hopefully sensorBase can't be nullptr?
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I256e5c484a94ba42da4ff73e1621784fdbc14759 |
5f070ff7 | 01-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Collapse continue conditions
Reduce the verbosity of the loop implementation by testing everything at once.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I1ffa99077e1ff
NVMeSensorMain: Collapse continue conditions
Reduce the verbosity of the loop implementation by testing everything at once.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I1ffa99077e1ff51723c0b7f7c50ecad1b7a2c2b9
show more ...
|
84dfb54a | 01-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Make early exits contiguous
This makes for a clear pattern of behaviour.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ie9b74e384d7a6a5c0c4a7a9d2466e2b292a33497 |
14a69824 | 01-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Move context definition to where it's used
The definition of sensorPtr is pretty verbose.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ia773d23ba03a2c86700b05009b0946d
NVMeSensorMain: Move context definition to where it's used
The definition of sensorPtr is pretty verbose.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ia773d23ba03a2c86700b05009b0946d33d35dbad
show more ...
|
c7a89e5b | 01-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Define provideRootBusContext()
Continue lifting code from the lambda to simplify its implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I4919a13658d5e96b71ed
NVMeSensorMain: Define provideRootBusContext()
Continue lifting code from the lambda to simplify its implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I4919a13658d5e96b71ed45d38e8db74ad7da2c90
show more ...
|
66ab8406 | 01-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Define deriveRootBus()
Continue lifting code from the lambda to simplify its implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ib125c05a8f8aa10e0a0c1da4036e
NVMeSensorMain: Define deriveRootBus()
Continue lifting code from the lambda to simplify its implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ib125c05a8f8aa10e0a0c1da4036ef134edaeb563
show more ...
|
710562a3 | 01-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Define deriveRootBusPath()
Continue lifting code from the lambda to simplify its implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I28614a557bf61e1c32075477
NVMeSensorMain: Define deriveRootBusPath()
Continue lifting code from the lambda to simplify its implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I28614a557bf61e1c32075477f8926f8d2c632bc3
show more ...
|
e671f057 | 01-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Define extractSensorName()
Continue lifting code from the lambda to simplify its implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ief4e55d8a9b10f2d95c876d4
NVMeSensorMain: Define extractSensorName()
Continue lifting code from the lambda to simplify its implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ief4e55d8a9b10f2d95c876d4b1f6dd4bb667b87f
show more ...
|
3412356d | 01-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Define extractBusNumber()
Start lifting code from the lambda to simplify its implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I4663af6f00e9118938cb56dc9cb5
NVMeSensorMain: Define extractBusNumber()
Start lifting code from the lambda to simplify its implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I4663af6f00e9118938cb56dc9cb514118ef62fb3
show more ...
|
f690f0cc | 01-Dec-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeSensorMain: Extract lambda body
Start unwrapping the onion to improve the ability to understand what's going on.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I62fd5c9103006633e9ee
NVMeSensorMain: Extract lambda body
Start unwrapping the onion to improve the ability to understand what's going on.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I62fd5c9103006633e9ee8f0358e688cf92bd8cc7
show more ...
|
04d05066 | 29-Oct-2021 |
Arun P. Mohanan <arun.p.m@linux.intel.com> |
cpuSensor:Check object validity in async callback
Sometimes the cpusensor crash was observed. The coredump was pointing to segmentation fault while executing callback function inside setupRead(). Si
cpuSensor:Check object validity in async callback
Sometimes the cpusensor crash was observed. The coredump was pointing to segmentation fault while executing callback function inside setupRead(). Similar issue was observed in adcsensor. Reference to the fix: 1afda6bbb6db0e266795af3229b962c32775b928
The timer cancel() in destructor cannot cancel the expired callback handlers. In such cases if the callback handler is executed, the object is deleted already.
Use weak_ptr to check if the object is still valid before using these member variables/functions. The buffer used by async_read_util must guarantee that they remain valid until the handler is called.
Tested: Stress tested by restarting the service. Service restart will force re-creating the CPUSensor objects. `count=0; \ while true; \ do systemctl restart xyz.openbmc_project.cpusensor.service; \ count=$((count + 1)); \ echo $count; \ sleep 40; \ done `
Signed-off-by: gokulsanker <gokul.sanker.v.g@intel.com> Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com> Change-Id: I7410feb0e17c5f6d555cd042f5e5b327de1910c5
show more ...
|
daf6f568 | 30-Nov-2021 |
hsangani <hsangani@nvidia.com> |
Added JC42 JEDEC standard memory temp sensor support
Intended to export DIMM sensors on dbus-sensors interface. Similarly Device support is added to entity-manager for JC42 devices to work with dbus
Added JC42 JEDEC standard memory temp sensor support
Intended to export DIMM sensors on dbus-sensors interface. Similarly Device support is added to entity-manager for JC42 devices to work with dbus-sensors.
Tested: Tested on NVIDIA system, dbus-sensor HwmonTemp daemon is able to pick up JC42 type sensor devices exported via entity-manager configs and able to create sensors object and push temp readings to dbus.
Signed-off-by: Hardik Sangani <hsangani@nvidia.com> Change-Id: Ice2f3c73b19736071193d1e4dd3676f7c4488862
show more ...
|
00bd56d3 | 19-Nov-2021 |
Zhikui Ren <zhikui.ren@intel.com> |
TachSensor: fix checkThresholds regression
Due to a merge mistake, the following commit introduced an unintended change.
https://github.com/openbmc/dbus-sensors/commit/da98f095f25cc75af3c0268643bde
TachSensor: fix checkThresholds regression
Due to a merge mistake, the following commit introduced an unintended change.
https://github.com/openbmc/dbus-sensors/commit/da98f095f25cc75af3c0268643bde2b21f5503e0#diff-33f4e0882e5eaea910f455ab4f5f22b2b9274ff46dd6120b6b23a092607174a0L187
Revert the code back.
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Change-Id: I17198e9cfece47022a437cdba12eea8c3e4b32e2
show more ...
|
cb5af73f | 10-Sep-2021 |
Lotus Xu <xuxiaohan@bytedance.com> |
psusensor: Add power state for label
In the bytedance system, the vout of a psusensor is related to powerstate, but the temp of this psusensor has nothing to do with powerstate, so a label like: " v
psusensor: Add power state for label
In the bytedance system, the vout of a psusensor is related to powerstate, but the temp of this psusensor has nothing to do with powerstate, so a label like: " vout1_PowerState" is needed to mark that vout is related to powerstate, but does not affect the temp of this psusensor
Tested: Run`ipmitool power off&&ipmitool sensor list` the vout is na, but temp is correct.
Signed-off-by: Lotus Xu <xuxiaohan@bytedance.com> Change-Id: I3fb17a10cffcd7fb46faa11a45582a6c00eabdfa
show more ...
|
66558235 | 09-Nov-2021 |
Brandon Kim <brandonkim@google.com> |
Take out array size for constexpr std::array
C++20 supports initializing array without size using std::to_array
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I7f955ddaf7c4368f364eae
Take out array size for constexpr std::array
C++20 supports initializing array without size using std::to_array
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I7f955ddaf7c4368f364eae6ff401b0916f5cbe6f
show more ...
|
da98f095 | 01-Nov-2021 |
Zhikui Ren <zhikui.ren@intel.com> |
psusensor: fix psu pwm sensor name
Current bug is that psusensor service does not create pwm sensor object if pid fan configuration has spaces in Name field, like { ... "Name" : "PSU$BUS $ADDRESS Fa
psusensor: fix psu pwm sensor name
Current bug is that psusensor service does not create pwm sensor object if pid fan configuration has spaces in Name field, like { ... "Name" : "PSU$BUS $ADDRESS Fan 1" "Outputs": [ "Pwm PSU$BUS $ADDRESS Fan 1" ], ... }
Fix: Pwm name need to be escaped, which currently replaces " " with "_" before being passed to CreatePwmSensor in PSUSensor service. PwmSensor constructor takes the name as is.
Since the escape algorithm may change in the future, add a helper function escapeName() and update dbus-sensors to use this helper funtion when sensors are created. escapeName() currently calls boost replace_all_copy(name," ", "_"), so it does not introduce functional changes except the bug identified above.
Tested: No regression found for existing working sensors. Sensors are created as before with the same sensor name.
Fix for non-working case works correctly now. psu pwm sensor name with space are created correctly with the change. busctl tree xyz.openbmc_project.PSUSensor ... |-/xyz/openbmc_project/control | `-/xyz/openbmc_project/control/fanpwm | |-/xyz/openbmc_project/control/fanpwm/Pwm_PSU17_2_Fan_1 | |-/xyz/openbmc_project/control/fanpwm/Pwm_PSU17_2_Fan_2 ...
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Change-Id: If3b60f93de324e59cc3d774285c23bf50a6f989c
show more ...
|
45f844ac | 03-Nov-2021 |
Arun P. Mohanan <arun.p.m@linux.intel.com> |
Fix for sensor value PATCH in manufacturing mode
Issue: Not able to PATCH sensor value in manufacturing mode, as manufacturing mode is not getting updated after BMC reboot.
Added support to cache i
Fix for sensor value PATCH in manufacturing mode
Issue: Not able to PATCH sensor value in manufacturing mode, as manufacturing mode is not getting updated after BMC reboot.
Added support to cache initial value of `SpecialMode` property on startup and register for `InterfacesAdded` signal in case `specialmodemgr` service starts late.
Tested: 1. Verified `manufacturingMode` value is getting updated as expected. Verified the same over different scenarios like service(specialmodemgr, hwmontempsensor, cpusensor) restart and `SpecialMode` property update. 2. Verified PATCH operation is working as expected over BMC resets in manufacturing mode. PATCH - /redfish/v1/Chassis/<Board>/Thermal Body: { "Temperatures": [ { "MemberId": "Inlet_BRD_Temp", "ReadingCelsius" : 20 } ] } Response: { "@odata.id": "/redfish/v1/Chassis/<Board>/Thermal", "@odata.type": "#Thermal.v1_4_0.Thermal", "Fans": [], "Id": "Thermal", "Name": "Thermal", "Temperatures": [] }
Signed-off-by: Snehalatha Venkatesh <snehalathax.v@intel.com> Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com> Change-Id: I6ae9fb7d6e9fdd508f199bcdaf629411a2c96da6
show more ...
|
9ca98ec9 | 01-Nov-2021 |
Andrew Jeffery <andrew@aj.id.au> |
nvmesensor: Make commuication error messages more informative
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Id42ddfc29c73c092694e9e138eae3037ba400dd4 |
3859c7f7 | 29-Oct-2021 |
Andrew Jeffery <andrew@aj.id.au> |
NVMeBasicContext: Don't poll the sensor if it's not available
This avoids a flood of log messages if the system isn't in the right state.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id:
NVMeBasicContext: Don't poll the sensor if it's not available
This avoids a flood of log messages if the system isn't in the right state.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I2db6ab05c1eff5b4d2d9c95981dfe34352916652
show more ...
|
3291b9c7 | 29-Jul-2021 |
Jie Yang <jjy@google.com> |
Sensor mutability interface
We proposed a ValueMutablity interface in openbmc/phosphor-dbus-interfaces which was accepted here: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/
Sensor mutability interface
We proposed a ValueMutablity interface in openbmc/phosphor-dbus-interfaces which was accepted here: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/36333
It follows the IPMI fashion, checking the sensor mutability before writing sensor values. The sensor mutability used to be hardcoded in the ipmi sensor map yaml file.
This provides feature parity with that old YAML hardcoded "mutability: Mutability::Write|Mutability::Read" setting.
As an example of implementation within dbus-sensors, ExternalSensor always sets Mutable to true, given its purpose of accepting sensor writes from an external source. PwmSensor accepts the "Mutable" parameter, from entity-manager configuration (aka JSON file). All other sensors always set Mutable to false, but it would be straightforward to add similar code, like what was done for PwmSensor, when mutability is desired.
This parameter will be used by the IPMI server here: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/45407
There is currently no Redfish equivalent, although that would be a welcome task for the future. This is not IPMI-specific, as the Redfish server can also use this as a hint, as to whether to allow read-write access, or merely to allow read-only access.
This is not to be confused with the "manufacturing mode" option, which is designed for use during manufacturing test, hence its name. This feature is designed for production, and is intended to allow just a few sensors to be writable, without needing to make them all writable.
Tested: DBus call on fan sensors with configurable tree mutability: busctl introspect xyz.openbmc_project.FanSensor /xyz/openbmc_project/sensors/fan_pwm/fan0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS ... xyz.openbmc_project.Sensor.Value interface - - - .MaxValue property x 100 emits-change .MinValue property x 0 emits-change .Unit property s "xyz.openbmc_project.Sensor.Value.Uni... emits-change .Value property d 42.7451 emits-change writable xyz.openbmc_project.Sensor.ValueMutability interface - - - .Mutable property b true emits-change ...
DBus call on external sensors: busctl introspect xyz.openbmc_project.ExternalSensor /xyz/openbmc_project/sensors/tempera NAME TYPE SIGNATURE RESULT/VALUE FLAGS ... xyz.openbmc_project.Sensor.Value interface - - - .MaxValue property d 127 emits-change .MinValue property d -128 emits-change .Unit property s "DegreesC" emits-change .Value property d nan emits-change writable xyz.openbmc_project.Sensor.ValueMutability interface - - - .Mutable property b true emits-change ...
The ValueMutability interface, with "Mutable", is correctly created.
Signed-off-by: Jie Yang <jjy@google.com> Change-Id: Ifa1cb51bb55cd6f00d2a2f79e9064d1a51354b06 Signed-off-by: Josh Lehan <krellan@google.com>
show more ...
|
b782eec6 | 18-Oct-2021 |
Arun P. Mohanan <arun.p.m@linux.intel.com> |
[CPUSensor] Remove interface in destructor
As part of clean exit remove availableInterface and operationalInterface in CPUSensor destructor.
Tested: Verified interface removed signal is emitted as
[CPUSensor] Remove interface in destructor
As part of clean exit remove availableInterface and operationalInterface in CPUSensor destructor.
Tested: Verified interface removed signal is emitted as expected.
Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com> Change-Id: I5f1f0a1a63b31cd62bbb73d1324d25eab7beff85
show more ...
|
1dc85f51 | 05-Oct-2021 |
Zhikui Ren <zhikui.ren@intel.com> |
psusensor: fix sensor name matching during rescan
When psusensor is created, sensor name is modified using boost::replace_all_copy(sensorName, " ", "_"). Apply the same call when matching up sensor
psusensor: fix sensor name matching during rescan
When psusensor is created, sensor name is modified using boost::replace_all_copy(sensorName, " ", "_"). Apply the same call when matching up sensor name string in base config and name of the sensor object.
Without this change, psusensor service does not create sensor object if pmbus configuration has spaces in Name field, like { ... "Name" : "PSU$BUS $ADDRESS" ... }
Tested: psu sensor name with space are created correctly with the change. Example" busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/powersupply/SOLUM_CO_IS162F22_PSU2_Node_1/PSU17_2 ... xyz.openbmc_project.Configuration.pmbus interface - - - .Address property t 89 emits-change .Bus property t 17 emits-change .Labels property as 8 "pin" "pout1" "vin" "iin" "iout1" "... emits-change .Name property s "PSU17 2" emits-change .Name1 property s "PSU17 2" emits-change .Type property s "pmbus" emits-change ...
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Change-Id: Ie8fdbe78bdd88de5dc7db3f065c74cd9872e9d86
show more ...
|