79f5ebcd | 27-Nov-2022 |
George Liu <liuxiwei@inspur.com> |
Properly detect CPU presence in ADCSensor
The ADCSensor daemon in dbus-sensors attempts to determine if an inventory path is a CPU by just checking for 'cpu' anwhere in the name. But for all cpu pat
Properly detect CPU presence in ADCSensor
The ADCSensor daemon in dbus-sensors attempts to determine if an inventory path is a CPU by just checking for 'cpu' anwhere in the name. But for all cpu paths should end with "cpuX" or "CPUx".
Tested: For a non-CPU path: /xyz/openbmc_project/.../cpu0/xxx With out this patch: it will mistake this for a CPU path. With this patch: it will filter out this path.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I0702e306a532f12d8cf646a46eae988205e1d004
show more ...
|
bc56cfb5 | 21-Nov-2022 |
Zev Weiss <zev@bewilderbeest.net> |
psusensor: Add support for Delta AHE-50DC fan control module
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: Ie8b219aa06a357449c547bacfe0835f307d5645b |
ea2db481 | 20-Jun-2022 |
Zev Weiss <zev@bewilderbeest.net> |
psusensor: Add support for up to four fans
Some PMBus devices, such as the Delta AHE-50DC fan control module, have more than two fans, so increase the number we support.
Signed-off-by: Zev Weiss <z
psusensor: Add support for up to four fans
Some PMBus devices, such as the Delta AHE-50DC fan control module, have more than two fans, so increase the number we support.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: Iee3e39402fb184de222ee92222065303e2e9eadd
show more ...
|
c2f83fed | 02-Dec-2022 |
Lei YU <yulei.sh@bytedance.com> |
fansensor: Add inventory object manager
The fansensor creates fan present objects under /xyz/openbmc_project/inventory/, add object manager for this path, otherwise the DBus objects are not created.
fansensor: Add inventory object manager
The fansensor creates fan present objects under /xyz/openbmc_project/inventory/, add object manager for this path, otherwise the DBus objects are not created.
Tested: Verify the fan present objects are created in /xyz/openbmc_project/inventory/
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I1817c5f1de437f0be194dd0bd1d168b1d37f3b70
show more ...
|
d0c21d55 | 17-Nov-2022 |
Matt Spinler <spinler@us.ibm.com> |
adcsensor: Use unique timer for CPU pres events
If a CPU Present property changes within 1 second of a normal ADC sensor config being put on D-Bus by entity-manager for the first time, the single fi
adcsensor: Use unique timer for CPU pres events
If a CPU Present property changes within 1 second of a normal ADC sensor config being put on D-Bus by entity-manager for the first time, the single filter timer being used will only call createSensors once. That sensor will then be ignored since that call to createSensors is only looking for CPU required sensors.
To fix this, add a separate filter timer for CPU presence changes. That way the standard ADC sensors will get a chance to be processed in a createSensors call using UpdateType::init.
Tested: Our IBM systems would hit this issue a lot because there are a lot of inventory items with 'cpu' in the name so there are a lot of calls to cpuPresenceHandler. With this fix, the RTC battery voltage sensor would always be created after a reboot.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Id33587f7b3c9bf29c6e92f64c283b8659293c851
show more ...
|
1f847973 | 28-Sep-2022 |
Vikash Chandola <vikash.chandola@intel.com> |
Capture weak reference of sensor object in lambda
dbus callback methods are capturing 'this' pointer directly. A sensor object can get deleted while a callback is pending invocation. This is crashin
Capture weak reference of sensor object in lambda
dbus callback methods are capturing 'this' pointer directly. A sensor object can get deleted while a callback is pending invocation. This is crashing ipmbsensor daemon.
Capture weak reference in place of this pointer.
Tested: Run ipmbsensor as a binary with entity manager constantly restarting to simulated destruction and construction of new sensor object. No crash was observed after running for three hours. Prior to this ipmbsensor was crashing within one hour
Signed-off-by: Vikash Chandola <vikash.chandola@intel.com> Change-Id: Idd53cbeb912c87ca3c4c09302279fc9383c569bc
show more ...
|
6ee62940 | 14-Dec-2021 |
Jayashree Dhanapal <jayashree-d@hcl.com> |
IpmbSensor:Add bus index for multiple IPMB bus
IPMB bus is a physical bus which is exposed using IPMB driver. IPMB is an I2c based serial bus that interconnects the baseboard and chassis management.
IpmbSensor:Add bus index for multiple IPMB bus
IPMB bus is a physical bus which is exposed using IPMB driver. IPMB is an I2c based serial bus that interconnects the baseboard and chassis management.
A BMC that includes IPMB interface support and also provides the capability for system software to send and receive messages to and from the IPMB using the BMC as a kind of communication controller.
In OCP multi-host platform, multiple IPMB bus support is present. Therefore, for each config, IPMB bus value will be passed from entity-manager json config file.
Through this IPMB bus, BMC will send and receive messages and then store the response for each configuration.
Example : { "Address": "0x01", "Bus": "$bus", "Name": "Temp_Sensor", "Type": "IpmbSensor" }
In the current patchset, only IPMB bus value is read and further implementation using this value will be done in the following patchset.
SDR Sensor : https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/52164 https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/38905
IPMB GPIO State : https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/47952
TESTED: Tested on Facebook YosemiteV2 hardware and verified the IPMB bus value.
Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com> Change-Id: I0a47057da98ee81471ac9f6fac69a036853db7d1
show more ...
|
1e384254 | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
Change-Id: I559c9172dec2df448317fa6d7bd3d2660d4f62f3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
26840e5c | 07-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
clang-ignore: remove unneeded file
openbmc-build-scripts by default uses git-ls-files and so does meson. There is no reason to add untracked files into the .clang-ignore.
Signed-off-by: Patrick Wil
clang-ignore: remove unneeded file
openbmc-build-scripts by default uses git-ls-files and so does meson. There is no reason to add untracked files into the .clang-ignore.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ifdc7e233df81e5f5dd37ec170db9820fdd784ae0
show more ...
|
7627c860 | 17-Nov-2022 |
Zev Weiss <zev@bewilderbeest.net> |
hwmontempsensor: Fix crash on eventHandler signal callback
Previously the device-management logic didn't handle the eventHandler() case quite right, leading to crashes like the following when eventH
hwmontempsensor: Fix crash on eventHandler signal callback
Previously the device-management logic didn't handle the eventHandler() case quite right, leading to crashes like the following when eventHandler()'s call to createSensors() ends up spuriously trying to re-create sensor devices:
hwmontempsensor[455]: terminate called after throwing an instance of 'boost::wrapexcept<boost::system::system_error>' hwmontempsensor[455]: what(): open: No such file or directory [system:2 at /usr/include/boost/asio/detail/impl/io_uring_file_service.ipp:61:5 in function 'boost::system::error_code boost::asio::detail::io_uring_file_service::open(implementation_type&, const char*, boost::asio::file_base::flags, boost::system::error_code&)']
To fix this we have instantiateDevices() augment the map it returns to include all sensor devices (not just newly created ones) and adding a bool to indicate whether each one was newly instantiated or already existed. This allows createSensors() to reuse existing I2CDevices when called by eventHandler() instead of needlessly trying to destroy & re-create them.
Tested: On romed8hm3 ran hwmontempsensor by hand (to keep systemd from restarting it) and restarted E-M to trigger an eventHandler() call, verified that hwmontempsensor didn't crash and kept all sensors instantiated. Also tested powering the host on and off to verify that host-power-domain sensors were still torn down and re-created as appropriate.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: I576ff6238f45d8e2885790a624fb5c838648c897
show more ...
|
ece5c86a | 05-Aug-2022 |
Zev Weiss <zev@bewilderbeest.net> |
Define Sensor::readingStateGood() in terms of readingStateGood()
We can reuse the same logic instead of duplicating it between the generic global function and the Sensor class method.
Signed-off-by
Define Sensor::readingStateGood() in terms of readingStateGood()
We can reuse the same logic instead of duplicating it between the generic global function and the Sensor class method.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: Ibc77c2fe538398a013aab2b13964e37bb6f17f9e
show more ...
|
6db8aae4 | 03-Oct-2022 |
Thu Nguyen <thu@os.amperecomputing.com> |
Support value "ChassisOn" for "powerState" option
There are some sensors need to be read when the chassis power is On regardless the boot state of host. Even when the host is failed to boot the valu
Support value "ChassisOn" for "powerState" option
There are some sensors need to be read when the chassis power is On regardless the boot state of host. Even when the host is failed to boot the values of these sensors can be used to debug the failure in power rails. The current code of dbus-sensors only supports the values "On", "BiosPost" and "Always" for "powerState" option which can not used for these kinds of sensors. This commit adds "ChassisOn" value for "powerState" sensor option. This value will be used for sensors which will only be read when the CurrentPowerState is On.
Tested: 1. Add setting PowerState="ChassisOn" to some sensors. 2. Force the CurrentPowerState to xyz.openbmc_project.State.Chassis.PowerState.Off. 3. The value D-Bus properties of those sensors should be nan. 4. Force the CurrentPowerState to xyz.openbmc_project.State.Chassis.PowerState.On. 5. The value D-Bus properties of those sensors should be the real sensor values.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Icdb9d9cf1ac77c891113fa9b69b33b8bfdb082f7
show more ...
|
adbcd7c7 | 02-Nov-2022 |
Naresh Solanki <Naresh.Solanki@9elements.com> |
PSUSensor: Add regulator devices
Add following device type: IR38060 IR38164 IR38263 PLI1209BC XDPE11280
TEST= Build and Boot IBM Genesis3 Board. Sensor related data i.e., voltage, current, power &
PSUSensor: Add regulator devices
Add following device type: IR38060 IR38164 IR38263 PLI1209BC XDPE11280
TEST= Build and Boot IBM Genesis3 Board. Sensor related data i.e., voltage, current, power & temperature properly display in webui.
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com> Change-Id: I46c06beff370cb4312d4a485e326ea35955b179e
show more ...
|
3fe3f54e | 02-Nov-2022 |
Zhikui Ren <zhikui.ren@intel.com> |
Add control ObjectManager to PSUSensor
For platforms that use phosphor-pid-control for PSU fans, apply same change: https://github.com/openbmc/dbus-sensors/commit/d90672513d726c63fc57bb48ae06138b307
Add control ObjectManager to PSUSensor
For platforms that use phosphor-pid-control for PSU fans, apply same change: https://github.com/openbmc/dbus-sensors/commit/d90672513d726c63fc57bb48ae06138b30793564
Tested: Build and run on platforms with PSU fan zones defined, swampd starts successfully.
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Change-Id: If28df8829009f4e29eb7f639b254a2fdab1aaa2c
show more ...
|
661d4378 | 27-Oct-2022 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Identify active sensors via the D-Bus "sensors" service
Upstream modified how sensors are organized on D-Bus. Sensors are now mapped under the /xyz/openbmc_project/sensors object. Each service retri
Identify active sensors via the D-Bus "sensors" service
Upstream modified how sensors are organized on D-Bus. Sensors are now mapped under the /xyz/openbmc_project/sensors object. Each service retrieves sensor data via a GetManagedObject call.
Tested:
busctl call -j xyz.openbmc_project.$sensor /xyz/openbmc_project/sensors \ org.freedesktop.DBus.ObjectManager GetManagedObjects ipmitool sdr dump sdrs.bin
Confirmed neither function resulted in an error message in the journal
Change-Id: I3a41ea2c28b34c9e28abe2f16f6c325ec715dd27 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
a1456c4a | 18-Jul-2022 |
Zev Weiss <zev@bewilderbeest.net> |
hwmontempsensor: Manage devices on host power-state events
We now install handler callbacks for power event signals, deactivating sensors on power-off and activating them on power-on/POST-complete a
hwmontempsensor: Manage devices on host power-state events
We now install handler callbacks for power event signals, deactivating sensors on power-off and activating them on power-on/POST-complete according to their PowerState configuration. This is needed to properly support sensor devices that are in the same power domain as the host, and hence may need their drivers bound only after the host is powered on so that the driver can properly probe and attach to the device (and likewise be unbound when the host is powered off).
Tested: in combination with corresponding entity-manager patches to prevent it from trying to manage the same devices, hwmontempsensor successfully activates and deactivates host-power-domain nct6779 and w83773g sensors on romed8hm3. After the host is shut off, sensors remain on dbus with 'Available' set to false and 'Value' reading NaN. Also tested killing hwmontempsor after it instantiated host-power-domain sensors, shutting off the host, and then restarting hwmontempsensor to verify that it removed and re-created the sensor devices as necessary.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: I2e272fd0870f3abfb06b6f3617f32721861bbc5b
show more ...
|
21e12c34 | 19-Oct-2022 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
PSUSensor: Add device type TPS53679
Add device type TPS53679 to the allowed list.
Tested: tested on AMD DaytonaX board
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Change-Id: Ibc101
PSUSensor: Add device type TPS53679
Add device type TPS53679 to the allowed list.
Tested: tested on AMD DaytonaX board
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Change-Id: Ibc101c616d4083a538e73fdddf03087f6937820e
show more ...
|
d9067251 | 22-Oct-2022 |
Ed Tanous <edtanous@google.com> |
Add control ObjectManager
14ed5e995f2a9893e63a6f83318565102ca3fca7 seems to have exposed the fact that an ObjectManager is required on the /xyz/openbmc_project/control namespace. It's not clear why
Add control ObjectManager
14ed5e995f2a9893e63a6f83318565102ca3fca7 seems to have exposed the fact that an ObjectManager is required on the /xyz/openbmc_project/control namespace. It's not clear why, and we need to get it documented, but fix the bug.
Tested: Code compiles. The submitter of this suggestion has tested on his platform, and it resolves the immediate crash.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I7120e218bc800ae5bebb0a374372d206d97c58d3
show more ...
|
14ed5e99 | 12-Jul-2022 |
Ed Tanous <edtanous@google.com> |
Add ObjectManager in the right place
Per https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/55308 dbus-sensors has been putting the ObjectManager in the wrong place. Fix that.
Tested:
Add ObjectManager in the right place
Per https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/55308 dbus-sensors has been putting the ObjectManager in the wrong place. Fix that.
Tested: Loaded build with all patches under this same topic, and observed IPMI and Redfish trees working correctly and responding with sensor data.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Iefe050fe50658de6e1f215eab95b1f772e50eb4a
show more ...
|
61baea42 | 12-Oct-2022 |
Zev Weiss <zev@bewilderbeest.net> |
hwmontempsensor: Remove redundant emptiness check
If the paths vector is empty the for loop iterating over it won't do anything, and since there's nothing after the loop there's no need to check and
hwmontempsensor: Remove redundant emptiness check
If the paths vector is empty the for loop iterating over it won't do anything, and since there's nothing after the loop there's no need to check and return early.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: I58a23919eec1c51efc2897a71f8cb38c1b8e3d0b
show more ...
|
8569bf2a | 11-Oct-2022 |
Zev Weiss <zev@bewilderbeest.net> |
Add getPollRate helper function
This open-coded pattern had been duplicated in a few places; deduplicate and increase readability by adding a dedicated function. While we're at it, also ensure the
Add getPollRate helper function
This open-coded pattern had been duplicated in a few places; deduplicate and increase readability by adding a dedicated function. While we're at it, also ensure the configured value isn't inf or NaN.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: I5f8fe788eb342ca3bf8b52bd6a2e7cc3364f45e1
show more ...
|
2c5a1f2d | 05-Oct-2022 |
JeffLin <JeffLin2@quantatw.com> |
Change EM's ObjectManager path
In newest Openbmc version, intelcpusensor will send error log: intelcpusensor[2634]: While calling GetManagedObjects on service:xyz.openbmc_project.EntityManager excep
Change EM's ObjectManager path
In newest Openbmc version, intelcpusensor will send error log: intelcpusensor[2634]: While calling GetManagedObjects on service:xyz.openbmc_project.EntityManager exception name:org.freedesktop.DBus.Error.UnknownObjectand description:Unknown object '/'. was thrown/.
After PR https://gerrit.openbmc.org/c/openbmc/entity-manager/+/57279 merged into Openbmc master, dbus path of "GetManagedObjects" is changed.
Refs: https://gerrit.openbmc.org/c/openbmc/entity-manager/+/57279 https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/57291
Tested: Check ADC, Hwmon, PSU and IntelCPU snesor works good with no GetManagedObjects error.
Signed-off-by: JeffLin <JeffLin2@quantatw.com> Change-Id: I9c4d9109377d5210fdd941efc051fa7021b40bd9
show more ...
|
cb01a244 | 04-Oct-2022 |
Patrick Williams <patrick@stwcx.xyz> |
Jenkinsfile: remove
Pretty sure this is not used anywhere since it is still referencing cmake stuff.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie29501c586f3b6b6c3328f8260f1df47
Jenkinsfile: remove
Pretty sure this is not used anywhere since it is still referencing cmake stuff.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie29501c586f3b6b6c3328f8260f1df47babb2cc1
show more ...
|
9da019cc | 28-Sep-2022 |
Patrick Williams <patrick@stwcx.xyz> |
clang-15: fixes for boolean simplification
clang-tidy-15 is reporting the following issue:
``` ../src/ExternalSensorMain.cpp:227:17: error: boolean expression can be simplified by DeMorgan's theore
clang-15: fixes for boolean simplification
clang-tidy-15 is reporting the following issue:
``` ../src/ExternalSensorMain.cpp:227:17: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors] if (!(std::isfinite(timeoutSecs) && (timeoutSecs >= 0.0))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! || < ```
Apply automatic fix from clang-tidy.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If218521e68dd7b879d7e145bcd78a858f8778052
show more ...
|
3e620af1 | 20-Sep-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
treewide: change EM's ObjectManager path
EntityManager moves its ObjectManager in commit [1], this patch is to change accordingly. Please see [1] for why we made that change.
[1] https://gerrit.ope
treewide: change EM's ObjectManager path
EntityManager moves its ObjectManager in commit [1], this patch is to change accordingly. Please see [1] for why we made that change.
[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/57279
Tested: code compiles. I don't have a system with this RedundancySensor enabled. But code inspection can show that only ObjectManager patch changed.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ic2437b36f3303ab3e74c579ed5a268bf5824d0d6
show more ...
|