History log of /openbmc/phosphor-host-ipmid/sensordatahandler.cpp (Results 1 – 25 of 41)
Revision Date Author Comments
# 1318a5ed 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I01547e98d27910919e09ebf7907c86292a6c825d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 9b745a81 18-Jul-2024 George Liu <liuxiwei@ieisystem.com>

convert sensordatahandler to use lg2

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I55ece5e0f6d1d9d7c42f20fbf5ef6495fb879612


# 863e3231 04-Feb-2024 George Liu <liuxiwei@ieisystem.com>

sensordatahandler: Remove unused method

The getServiceAndPath method is no longer used. This patch will
remove this method.

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I8601c3bf4f

sensordatahandler: Remove unused method

The getServiceAndPath method is no longer used. This patch will
remove this method.

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I8601c3bf4f67183c37de00b6914c0efb9a15491b

show more ...


# 523e2d1b 05-Sep-2023 Willy Tu <wltu@google.com>

ipmid: Update sdbuspp namespaces

Fixed all errors when we remove
`SDBUSPP_REMOVE_DEPRECATED_NAMESPACE` in sdbusplus.

Change-Id: I5607585b2709faa7aee347d26e458ef769ca1626
Signed-off-by: Willy Tu <wl

ipmid: Update sdbuspp namespaces

Fixed all errors when we remove
`SDBUSPP_REMOVE_DEPRECATED_NAMESPACE` in sdbusplus.

Change-Id: I5607585b2709faa7aee347d26e458ef769ca1626
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 3e3cc35b 26-Jul-2023 George Liu <liuxiwei@inspur.com>

Remove is_method_error method

Remove the usage of is_method_error()[1], and add try-catch to handle
D-Bus exceptions around mapper call.

[1]https://github.com/openbmc/sdbusplus/commit/079fb85a398d9

Remove is_method_error method

Remove the usage of is_method_error()[1], and add try-catch to handle
D-Bus exceptions around mapper call.

[1]https://github.com/openbmc/sdbusplus/commit/079fb85a398d90800935e3985bb1266a7530a26e#diff-945669e8bd9cab4ecc83a574a732921281b2c79eb8bba65efff11736ad18f92bR237-R240

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I85192219c1c34cf5fd6c6aca06a8b207d7e06697

show more ...


# fbc6c9d7 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I44441096113929ce96eb1439e2932e6ff3c87f27
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 5d82f474 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: Ibd2a0b512bfb7caf65bfab64b271d194da520aac

show more ...


# 11d68897 20-Jan-2022 Willy Tu <wltu@google.com>

cleanup: Remove all warning errors for the Meson build support

Remove all the build warning to prepare for the meson build.
Meson build will be in
https://gerrit.openbmc-project.xyz/c/openbmc/phosph

cleanup: Remove all warning errors for the Meson build support

Remove all the build warning to prepare for the meson build.
Meson build will be in
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/47748

Tested:
Ipmi command works fine the cleanup.
```
$ systemctl status phosphor-ipmi-host
● phosphor-ipmi-host.service - Phosphor Inband IPMI
Loaded: loaded (/lib/systemd/system/phosphor-ipmi-host.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 1970-01-08 21:20:56 UTC; 21s ago
Main PID: 24987 (ipmid)
CGroup: /system.slice/phosphor-ipmi-host.service
└─24987 /tmp/ipmid

Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X30] for Ethstats Commands
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X30] for Ethstats Commands
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X32] for Sys Commands
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X002B79], Cmd:[0X02] for I2C
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X02] for I2C
Jan 08 21:20:56 $HOST ipmid[24987]: I2C_WHITELIST_CHECK is disabled, do not populate whitelist
Jan 08 21:20:56 $HOST ipmid[24987]: Registering OEM:[0X00C2CF], Cmd:[0X04] for Manual Zone Control
Jan 08 21:20:56 $HOST systemd[1]: Started Phosphor Inband IPMI.
Jan 08 21:20:56 $HOST ipmid[24987]: Loading whitelist filter
Jan 08 21:20:56 $HOST ipmid[24987]: Set restrictedMode = true
(reverse-i-search)`ipmi': systemctl status phosphor-^Cmi-host

$ ipmitool mc info
Device ID : 32
Device Revision : 1
Firmware Revision : 0.00
IPMI Version : 2.0
Manufacturer ID : 7244
Manufacturer Name : Quanta Computer Inc.
Product ID : 14426 (0x385a)
Product Name : Unknown (0x385A)
Device Available : yes
Provides Device SDRs : yes
Additional Device Support :
Sensor Device
SEL Device
FRU Inventory Device
Chassis Device
Aux Firmware Rev Info :
0x00
0x00
0x00
0x00
```

Change-Id: I372c9433a274bc633a24d213b7a1bc205531e33d
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 8e8152c5 06-Dec-2021 Lei YU <yulei.sh@bytedance.com>

sensor-cache: Use async calls in get sensor reading

Use the async calls in ipmiSensorGetSensorReading() for cached sensors.

Note that the code was using sdbusplus::message as the parameter for the

sensor-cache: Use async calls in get sensor reading

Use the async calls in ipmiSensorGetSensorReading() for cached sensors.

Note that the code was using sdbusplus::message as the parameter for the
getFunc(), now it could be simplified to ipmi::PropertyMap and unify the
two cases: property update callback and getting property.

Tested: Verify the ipmi sensor list works fine.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: If7afed410f794a5317b8d4b4965cac291a735d12

show more ...


# ff8c9b49 15-Oct-2021 Lei YU <yulei.sh@bytedance.com>

sensor-cache: Implement inventory::get::assertion()

Implement inventory::get::assertion() similar to get::assertion().
Not tested as we do not use this function.

Signed-off-by: Lei YU <yulei.sh@byt

sensor-cache: Implement inventory::get::assertion()

Implement inventory::get::assertion() similar to get::assertion().
Not tested as we do not use this function.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Iaee109cee4cb947878733a617a466f499fab3e7c

show more ...


# a8dc09b2 13-Oct-2021 Lei YU <yulei.sh@bytedance.com>

sensor-cache: Implement eventdata2()

Implement eventdata2() for cache's sensor.

Not tested because g220a does not use such ipmi sensor.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ib

sensor-cache: Implement eventdata2()

Implement eventdata2() for cache's sensor.

Not tested because g220a does not use such ipmi sensor.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ib91501fbb0c0d7eee0d6df5453d93bf15e6a89cf

show more ...


# ef960c03 13-Oct-2021 Lei YU <yulei.sh@bytedance.com>

sensor-cache: Implement assertion()

Implement assertion() for cache's sensor.

Tested: Verify the sensors using `assersion` have valid values in
QEMU, e.g.

OperatingSystemS | 0x0

sensor-cache: Implement assertion()

Implement assertion() for cache's sensor.

Tested: Verify the sensors using `assersion` have valid values in
QEMU, e.g.

OperatingSystemS | 0x0 | discrete | 0x4000| na | na | na | na | na | na

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I753c4359a2b6870427dfb4a1999ee6d1c61cd64f

show more ...


# 8c2c048e 16-Sep-2021 Lei YU <yulei.sh@bytedance.com>

sensor-cache: Use new get function

The get function for sensor-cache will use the sdbusplus message to get
the sensor data instead of making DBus calls, where the sdbusplus
message could be a signal

sensor-cache: Use new get function

The get function for sensor-cache will use the sdbusplus message to get
the sensor data instead of making DBus calls, where the sdbusplus
message could be a signal callback, or the getAllProperty's reply message.

So the get function's prototype is changed.

Tested: Verify the build is OK when enable or disable the sensor-cache
option.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ife2f55d87ce2b0941a4efdb599e46d80d827c2ff

show more ...


# a2ad2da8 06-Oct-2021 Patrick Williams <patrick@stwcx.xyz>

catch exceptions as const

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic2b49715c7b81ac5bcfc12ff2d3b4c593cd95ce7


# c5324251 31-Oct-2019 Tony Lee <tony.lee@quantatw.com>

Fix issues and support signed sensor values

Sensor will get "disable" when the command "ipmitool sdr elist" is
executed that if sensorReadingType is 0x6F.

sensor_units_1 is always set to 0 currentl

Fix issues and support signed sensor values

Sensor will get "disable" when the command "ipmitool sdr elist" is
executed that if sensorReadingType is 0x6F.

sensor_units_1 is always set to 0 currently. To support the display of
signed sensor values, we add the attribute "sensorUnits1" to the sensor
mapping yaml. This attribute can be used to determine whether the
sensor is signed.

It were making negative values 0 in get::readingData(). Fix the issue
by using a int32_t and add an overflow check.

Change-Id: I705defcf18805db9ada7d0de0738a59aedab61df
Signed-off-by: Tony Lee <tony.lee@quantatw.com>

show more ...


# 3dc35589 17-May-2020 Jeremy Kerr <jk@ozlabs.org>

sensordatahandler: enable scanning on assertion sensors

Currently, only readingData type sensors will call enableScanning to
indicate (in the IPMI response) that the sensor is enabled. From the
IPMI

sensordatahandler: enable scanning on assertion sensors

Currently, only readingData type sensors will call enableScanning to
indicate (in the IPMI response) that the sensor is enabled. From the
IPMI spec v2:

System software must ignore any sensor that has the sensor scanning
bit disabled - if system software didn’t disable the sensor.

- and ipmitool will report that the sensor is disabled if the response
does not have this bit set.

This means that only the readingData type sensors work at the moment.

This change calls enableScanning() for the assertion, readingAssertion,
and eventdata2 sensor types too.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Change-Id: Ifafdbf03bdf7690b9e263ab480ac79d27ed9b1a4

show more ...


# 4cc42556 11-Sep-2019 Sui Chen <suichen@google.com>

Refactor ipmi::sensor::GetSensorResponse away from std::array

This change refactors GetSensorResponse from std::array to struct.
This change depends on change #23544.

GetSensorResponse is an intern

Refactor ipmi::sensor::GetSensorResponse away from std::array

This change refactors GetSensorResponse from std::array to struct.
This change depends on change #23544.

GetSensorResponse is an internal, intermediate structure, an unpacked
form of a Get Sensor Reading response, providing direct access to its
fields. Its life time is:
GetReadingResponse -> GetSensorResponse -> ipmi::RspType.

It is written to in 5 functions in the ipmi::sensor::get namespace, by
four setter functions (setOffset, setReading, setAssertionBytes,
enableScanning).
It is currently read from by 1 function (ipmiSensorGetSensorReading)
for transforming to an ipmi::RspType.

Originally, the setter functions assumed bitwise equivalence between
GetSensorResponse and GetReadingResponse, and the setter functions
used reinterpret_cast to assign to a GetSensorResponse as if it were
a GetReadingResponse.

With this change, the reinterpret_cast's are removed, and the set
functions now accept GetSensorResponse instead of GetReadingResponse,
so the code gets a bit easier to read.

Tested: Tested using a server with a BMC; sensor readings obtained
through `ipmitool` appear to be correct (the reading might change
within a small range):
# ipmitool raw 0x04 0x2d 0x16
9B 40 00 00

Signed-off-by: Sui Chen <suichen@google.com>
Change-Id: I5d454d6249f5431fb98169e6ef7c585c34024004

show more ...


# bbf8bd6c 01-May-2019 Santosh Puranik <santosh.puranik@in.ibm.com>

sensordatahandler: Support empty inventory interfaces

This commit adds support for empty inventory interfaces when
asserting a sensor into the inventory. This is something already
supported in ipmi-

sensordatahandler: Support empty inventory interfaces

This commit adds support for empty inventory interfaces when
asserting a sensor into the inventory. This is something already
supported in ipmi-fru-parser, for example.

Currently, the notify::assertion function expects that each DBUS
interface also have a set of associated properties. One of the
use-cases this commit tries to solve is when a sensor being asserted
maps to an inventory item (accessed via
xyz.openbmc_project.Inventory.Manager DBUS service) that implements
a DBUS interface with no properties. For example, the GPU sensor
is mapped to a GPU inventory object that implements the DBUS
interface xyz.openbmc_project.Inventory.Item.Accelerator.
This commit enables phosphor-host-ipmid to correctly create/update
inventory objects even in cases where they implement DBUS interfaces
that contain no properties.

The sensor-example.yaml file has been updated to show an example
of a GPU sensor, the inventory object for which implements a
property-less DBUS interface.

Tested:

Tested on a witherspoon system that had some GPUs attached to it.
Pulled also https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/21107
in order to generate the right sensor configs for testing.
Verified that the GPU invetory objects that are created when the host
asserts a GPU sensor now implement the empty interface
xyz.openbmc_project.Inventory.Item.Accelerator

Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: I973580e285ae0fff1a513d3bbe8c03a89e0eeb83

show more ...


# f442e119 09-Apr-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

move variant to std namespace

sdbusplus::message::variant_ns has been std for a while now. This moves
ipmid away from sdbusplus::message::variant_ns to directly use
std::variant.

Tested-by: built,

move variant to std namespace

sdbusplus::message::variant_ns has been std for a while now. This moves
ipmid away from sdbusplus::message::variant_ns to directly use
std::variant.

Tested-by: built, compiles, and runs the same as before.

Change-Id: I8caa945f31c926c2721319f001b9d7f83fd3f1b7
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# bdda8008 26-Feb-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

Remove experimental filesystem splice

In order to be compatible with older versions of GCC that did not have
the experimental filesystem moved over to the standard paths, the code
would splice the e

Remove experimental filesystem splice

In order to be compatible with older versions of GCC that did not have
the experimental filesystem moved over to the standard paths, the code
would splice the experimental code into the std namespace. This is no
longer necessary with yocto 2.6 and the latest versions of GCC.

Change-Id: I2db13c52a91456318795819f2d45c3386b4c56d2
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# 33250240 12-Mar-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

move types.hpp to ipmid/types.hpp for export

types.hpp is required by utility.hpp, which is exported, so it needs to
be exported as well. This moves it to the include/libipmid directory,
changes the

move types.hpp to ipmid/types.hpp for export

types.hpp is required by utility.hpp, which is exported, so it needs to
be exported as well. This moves it to the include/libipmid directory,
changes the Makefile to export it, and changes all the files that
include it so it can be found in the right place.

Change-Id: I30ec365446e4de466c266ec4faa327478460ec05
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# 6a98fe7f 11-Mar-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

Move util.cpp/util.hpp to libipmid

These are functions that are used widely by ipmid providers, so it makes
sense to put them in libipmi.so (the library that all providers must
link against).

Teste

Move util.cpp/util.hpp to libipmid

These are functions that are used widely by ipmid providers, so it makes
sense to put them in libipmi.so (the library that all providers must
link against).

Tested-by: use nm to inspect the binaries to see that the symbols are in
the expected library.

arm-openbmc-linux-gnueabi-nm libipmid.so.0.0.0 \
| grep getDbusObject
0001063c T _ZN4ipmi13getDbusObjectERN9sdbusplus....

Change-Id: I1221f807f2711c5301c5574623564ea1ae48a437
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# 4c008028 12-Oct-2018 William A. Kennington III <wak@google.com>

Convert variant usage to std interface

This is just a refactoring to use the c++17 std::variant interfaces
instead of the mapbox::variant specific ones. We should be able to use
mapbox::variant and

Convert variant usage to std interface

This is just a refactoring to use the c++17 std::variant interfaces
instead of the mapbox::variant specific ones. We should be able to use
mapbox::variant and std::variant interchangeably now.

Tested:
Built against sdbusplus with mapbox::variant and sbusplus using
std::variant. Both variant compile and test out.

Change-Id: I6fbaad3d12dd34968db6a10f3d74a65e07d0f0cc
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 37544429 12-Oct-2018 James Feist <james.feist@linux.intel.com>

Remove direct uses of mapbox

sdbusplus is moving to std::variant, remove direct
uses of mapbox to limit breakage.

Tested-by: It built

Change-Id: I3fe0ba0d96b6aad302927363b9596cc1bcce2393
Signed-of

Remove direct uses of mapbox

sdbusplus is moving to std::variant, remove direct
uses of mapbox to limit breakage.

Tested-by: It built

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

show more ...


# 3a5071a9 12-Sep-2018 Patrick Venture <venture@google.com>

move filesystem inclusion to bottom of list

Change-Id: I4aa3c984992236bb5b4a5c62c3d42a33c12d55de
Signed-off-by: Patrick Venture <venture@google.com>


12