History log of /openbmc/phosphor-host-ipmid/selutility.cpp (Results 1 – 25 of 33)
Revision Date Author Comments
# be5a2e0b 22-Nov-2024 Patrick Williams <patrick@stwcx.xyz>

Logging.Entry: use AdditionalData2 metadata dict

phosphor-logging's dbus entries now expose the metadata as a
`dict<string,string>` rather than requiring additional processing
by callers to split th

Logging.Entry: use AdditionalData2 metadata dict

phosphor-logging's dbus entries now expose the metadata as a
`dict<string,string>` rather than requiring additional processing
by callers to split the metadata. Support this property in selutility
and eliminate the string processing code.

Tested: Compile test.

(There is no Tested statements in the git-log that explain how to
use this code. I do not have a system that uses these OEM SELs.
The code as-is is broken when the phosphor-logging commit is merged
because there is a new property type which will fail to parse in the
dbus message unpacking call.)

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

show more ...


# 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 ...


# 7acfcf0c 17-Jul-2024 George Liu <liuxiwei@ieisystem.com>

convert selutility.cpp to use lg2

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


# 42f64efc 05-Feb-2024 George Liu <liuxiwei@ieisystem.com>

Refactor to call the getProperty method

Uniformly use the getProperty method of utils.hpp to obtain values

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

Refactor to call the getProperty method

Uniformly use the getProperty method of utils.hpp to obtain values

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

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 ...


# 4c521025 28-Jul-2023 William A. Kennington III <wak@google.com>

treewide: Fix various compiler warnings

LTO is currently hiding these warnings.

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


# 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 ...


# 49434b63 10-Jan-2022 Konstantin Aladyshev <aladyshev22@gmail.com>

Don't fail on empty SEL list

If SEL list is empty, "GetSubTreePaths" method call to the
"xyz.openbmc_project.ObjectMapper" interface produces exception
"xyz.openbmc_project.Common.Error.ResourceNotF

Don't fail on empty SEL list

If SEL list is empty, "GetSubTreePaths" method call to the
"xyz.openbmc_project.ObjectMapper" interface produces exception
"xyz.openbmc_project.Common.Error.ResourceNotFound".
As it is fine for the SEL log to be empty, this exception needs
special handling in the code.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Change-Id: If7ecfee7c404aff079dadaaec27401c9c17daa6f

show more ...


# 690f4d5e 28-Apr-2021 Lei YU <yulei.sh@bytedance.com>

sel: Fix assertion in custom SEL parser

The code was using assert() to make sure the custom SEL's additional
data exists.

The assumption was wrong because there could be log entries with
additional

sel: Fix assertion in custom SEL parser

The code was using assert() to make sure the custom SEL's additional
data exists.

The assumption was wrong because there could be log entries with
additional data that does not contain the metadata defined in
xyz/openbmc_project/Logging/SEL.metadata.yaml.
E.g.
ipmid: ../git/selutility.cpp:107: void ipmi::sel::internal::constructOEMSEL(uint8_t, std::chrono::milliseconds, const additionalDataMap&, ipmi::sel::GetSELEntryResponse&): Assertion `dataIter != m.end()' failed.

The behavior is changed to:
* Check if the additional data contains the SEL.metadata;
* If yes, parse it as custom SEL;
* If no, parse it as before, and throw if there is no associated
inventory sensor, which is the logic before the custom SEL is
introduced.

Tested: Verify `ipmitool sel list` shows all the entries and does not
assert when the logging entries without SEL.metadata exists.

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

show more ...


# 07c15b73 06-Dec-2020 Lei YU <yulei.sh@bytedance.com>

sel: Support regular SEL record

Support regular SEL record logged by phosphor-sel-logger.

Tested: Manually call IpmiSelAdd to add a SEL entry in logging, and
check the ipmi sel:

#

sel: Support regular SEL record

Support regular SEL record logged by phosphor-sel-logger.

Tested: Manually call IpmiSelAdd to add a SEL entry in logging, and
check the ipmi sel:

# Call IpmiSelAdd method
busctl call "xyz.openbmc_project.Logging.IPMI" "/xyz/openbmc_project/Logging/IPMI" xyz.openbmc_project.Logging.IPMI IpmiSelAdd ssaybq "Sensor message" "/xyz/openbmc_project/inventory/system/board/G220A" 3 0x01 0x02 0x03 true 0x2000

# Check SEL
$ ipmitool -C17 -I lanplus -H 127.0.0.1 -U root -P 0penBmc sel get 6
SEL Record ID : 0006
Record Type : 02
Timestamp : 01/01/1970 00:11:02
Generator ID : 2000
EvM Revision : 04
Sensor Type : System Event
Sensor Number : 90
Event Type : Sensor-specific Discrete
Event Direction : Assertion Event
Event Data : 010203
Description : OEM System boot event

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

show more ...


# 719a41cd 03-Dec-2020 Lei YU <yulei.sh@bytedance.com>

sel: Support OEM record 0xE0~0xFF

The OEM record 0xE0~0xFF only includes record type and 13 bytes OEM
data.

Tested: Add 0xFF OEM SEL and verify the sel list shows the expected
record.

Sign

sel: Support OEM record 0xE0~0xFF

The OEM record 0xE0~0xFF only includes record type and 13 bytes OEM
data.

Tested: Add 0xFF OEM SEL and verify the sel list shows the expected
record.

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

show more ...


# 5015e955 03-Dec-2020 Lei YU <yulei.sh@bytedance.com>

sel: Support OEM record 0xCD~0xDF

The SEL OEM record is retrieved from logging/entry, and converted to SEL
format.

Tested: When the BMC has a logging entry like below:

{
"data": {

sel: Support OEM record 0xCD~0xDF

The SEL OEM record is retrieved from logging/entry, and converted to SEL
format.

Tested: When the BMC has a logging entry like below:

{
"data": {
"AdditionalData": [
"EVENT_DIR=0",
"GENERATOR_ID=0",
"RECORD_TYPE=205",
"SENSOR_DATA=1112141500DDB3BACD000000",
"SENSOR_PATH=",
"_PID=200"
],
"Associations": [],
"Id": 1,
"Message": "xyz.openbmc_project.Logging.SEL.Error.Created",
"Purpose": "xyz.openbmc_project.Software.Version.VersionPurpose.BMC",
"Resolved": false,
"Severity": "xyz.openbmc_project.Logging.Entry.Level.Informational",
"Timestamp": 320246,
"UpdateTimestamp": 320246,
"Version": "2.9.0-dev-1308-g01b7feb91-dirty"
},
"message": "200 OK",
"status": "ok"
}

Verify the SEL entry is expected:

SEL Record ID : 0002
Record Type : cd (OEM timestamped)
Timestamp : 01/01/1970 01:22:47
Manufactacturer ID : b3dd00
OEM Defined : bacd00010000 [......]

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

show more ...


# af378fa3 02-Dec-2020 Lei YU <yulei.sh@bytedance.com>

sel: Add OEM SEL Record data structure

The code only supports SEL Event Records. Re-define the data structure
to use union to support different kinds of SEL records:
* SEL Event Records
* OEM SEL Re

sel: Add OEM SEL Record data structure

The code only supports SEL Event Records. Re-define the data structure
to use union to support different kinds of SEL records:
* SEL Event Records
* OEM SEL Record, type C0-DF
* OEM SEL Record, type E0-FF

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

show more ...


# a7f81cc6 06-Nov-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

Update association names to use new interface

The phosphor-logging code moved from implementing
org.openbmc.Associations to now implementing
xyz.openbmc_project.Association.Definitions. The property

Update association names to use new interface

The phosphor-logging code moved from implementing
org.openbmc.Associations to now implementing
xyz.openbmc_project.Association.Definitions. The property name was also
changed from associations to Associations.

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

show more ...


# 16b8693d 01-May-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

remove usage of sdbusplus::message::variant

sdbusplus has had its alias of std::variant in place for long
enough. This changes all ipmid references to use std::variant
directly instead of the sdbusp

remove usage of sdbusplus::message::variant

sdbusplus has had its alias of std::variant in place for long
enough. This changes all ipmid references to use std::variant
directly instead of the sdbusplus alias.

Tested-by: building and running ipmid

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

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 ...


# e08fbffc 03-Apr-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

Only include ipmid/api.hpp for the new API

After some feedback from users of the new IPMI API, they wanted to see
two things:
1) don't require ipmid/api.hpp and ipmid/registration.hpp to be able to

Only include ipmid/api.hpp for the new API

After some feedback from users of the new IPMI API, they wanted to see
two things:
1) don't require ipmid/api.hpp and ipmid/registration.hpp to be able to
write new handlers
2) only require including ipmid/api.hpp (instead of ipmid/api.h)

So now, by simply including ipmid/api.hpp instead of ipmid/api.h
(deprecated), handlers incorporating the new IPMI API can be written.

Change-Id: I446dcce70cff03d4ecc28c658292d052485f77fc
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 ...


# 194375f2 14-Dec-2018 William A. Kennington III <wak@google.com>

Create libipmid and libipmid-host

This starts a transition to common ipmid libraries that providers can
link against. It will allow for a cleaner separation between common
ipmid functionality and da

Create libipmid and libipmid-host

This starts a transition to common ipmid libraries that providers can
link against. It will allow for a cleaner separation between common
ipmid functionality and daemon type specific code. This is needed so we
can resolve all of the symbols in the providers at link time instead of
discovering bad linkage by building and running a full ipmi daemon.

In future commits libraries will be packaged for libipmid and libipmid-host
which provide all of the symbols used by the current set of ipmid
providers.

This is the first step, it just separates and renames the headers.
Legacy symlinks are still kept around for compatability. It also adds
stub libraries so that external users can start linking as intended.

Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd
Signed-off-by: William A. Kennington III <wak@google.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