History log of /openbmc/phosphor-host-ipmid/storagehandler.cpp (Results 1 – 25 of 102)
Revision Date Author Comments
# 3ad19716 26-Jan-2025 Lei YU <yulei.sh@bytedance.com>

Fix clang++ warnings

To enable clang-tidy, fix the build warnings by clang++.

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


# a6fb32d8 15-Dec-2024 Jayanth Othayoth <ojayanth@gmail.com>

clang-tidy: Replace NULL with nullptr

Replaced all instances of NULL with nullptr to improve type safety
and clarity, as nullptr is the modern C++ standard for null pointers.

Tested: Build verified

clang-tidy: Replace NULL with nullptr

Replaced all instances of NULL with nullptr to improve type safety
and clarity, as nullptr is the modern C++ standard for null pointers.

Tested: Build verified

Change-Id: Ia40d9435ab57651ec6d13d5408cf69130043fa79
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...


# 69b4c281 03-Mar-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: Ic23653be3ed404980fd0e723d9ed8354e2b32579
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

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

show more ...


# 5087b075 11-Mar-2025 George Liu <liuxiwei@ieisystem.com>

Update the registered IPMI method name

Update registered IPMI method names to use `Lower Camel Case`.

Change-Id: I5539771c4ba8567f6cdb22aa3c8df58db5e883f2
Signed-off-by: George Liu <liuxiwei@ieisys

Update the registered IPMI method name

Update registered IPMI method names to use `Lower Camel Case`.

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

show more ...


# e6cd4dfd 05-Dec-2024 George Liu <liuxiwei@ieisystem.com>

storagehandler: remove storagehandler.hpp

The IPMI_CMD declared in storagehandler.hpp is redundant because
these commands are already declared in api-types.hpp, so this commit
remove the storagehand

storagehandler: remove storagehandler.hpp

The IPMI_CMD declared in storagehandler.hpp is redundant because
these commands are already declared in api-types.hpp, so this commit
remove the storagehandler.hpp file.

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

show more ...


# 32aece1a 24-Jan-2025 Patrick Williams <patrick@stwcx.xyz>

storagehandler: fix compile without open-power

When the `open-power` meson option is disabled, the code fails with
the following compile failure:

```
../storagehandler.cpp: In function ‘ipmi::RspTy

storagehandler: fix compile without open-power

When the `open-power` meson option is disabled, the code fails with
the following compile failure:

```
../storagehandler.cpp: In function ‘ipmi::RspType<short unsigned int> ipmiStorageAddSEL(uint16_t, uint8_t, uint32_t, uint16_t, uint8_t, uint8_t, uint8_t, uint8_t, std::array<unsigned char, 3>)’:
../storagehandler.cpp:685:27: error: unused variable ‘procedureType’ [-Werror=unused-variable]
685 | static constexpr auto procedureType = 0xDE;
| ^~~~~~~~~~~~~
../storagehandler.cpp:677:64: error: unused parameter ‘sensorType’ [-Werror=unused-parameter]
677 | [[maybe_unused]] uint8_t evmRev, uint8_t sensorType,
```

Add trivial changes to fix.

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

show more ...


# 656ae3c5 23-Aug-2024 George Liu <liuxiwei@ieisystem.com>

Remove unused variables

Using clang-tidy, it was detected that some variables are no longer
in use. This commit remove unused variables.

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

Remove unused variables

Using clang-tidy, it was detected that some variables are no longer
in use. This commit remove unused variables.

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

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


# 51856e68 17-Jul-2024 George Liu <liuxiwei@ieisystem.com>

convert storagehandler.cpp to use lg2

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


# 73d07778 03-Feb-2024 Xiaoyu Ma <maxiaoyu@ieisystem.com>

Add initiateErase check for clear SEL command

Add the check of the byte initiateErase (0xAA) for clear SEL command.

Tested:
After modifying, ipmitool can report the error of invalid data request
wh

Add initiateErase check for clear SEL command

Add the check of the byte initiateErase (0xAA) for clear SEL command.

Tested:
After modifying, ipmitool can report the error of invalid data request
when erase operation is not 0x00 or 0xAA.

Change-Id: Ie450755ade00c6f20197d4f28c899aeb8002fb5e
Signed-off-by: Xiaoyu Ma <maxiaoyu@ieisystem.com>

show more ...


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


# d9eb721e 03-Feb-2024 George Liu <liuxiwei@ieisystem.com>

Remove libmapper dependency

After this commit is merged [1], phosphor-ipmi-host no longer depends
on libmapper. This commit removes the dependence on libmapper.

[1] https://gerrit.openbmc.org/c/ope

Remove libmapper dependency

After this commit is merged [1], phosphor-ipmi-host no longer depends
on libmapper. This commit removes the dependence on libmapper.

[1] https://gerrit.openbmc.org/c/openbmc/phosphor-host-ipmid/+/69082

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

show more ...


# dbf66e1b 21-Sep-2023 Thang Tran <thuutran@amperecomputing.com>

dbus-sdr: remove redundant Get/Set SEL time commands

In the dbus-sdr, the Set SEL time command is not implemented, it is an
dummy function. Beside that the Get SEL command does not refer to dbus
int

dbus-sdr: remove redundant Get/Set SEL time commands

In the dbus-sdr, the Set SEL time command is not implemented, it is an
dummy function. Beside that the Get SEL command does not refer to dbus
interface to get the SEL time, it is geting directly from hardware.

Both Set/Get SEL time commands are implemented in storagehandler.cpp
file, therefore, we should remove redundant commands in the dbus-sdr.

Tested:
1. Disable NTP
$timedatectl set-ntp false
2. Request to Set SEL time
$ipmitool sel time set "12/31/2020 12:00:00"
12/31/20 00:00:00 UTC
3. Request to Get SEL time
$ipmitool sel time get
12/31/20 00:00:03 UTC

Change-Id: I8545d4a604c2f01f5c771be99cff9a638d08d54d
Signed-off-by: Thang Tran <thuutran@amperecomputing.com>

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


# 768730d2 06-Sep-2023 Patrick Williams <patrick@stwcx.xyz>

meson: add option for open-power functions

This repository has long had an open-power only function that ends
up compiled into all systems. We cannot use the phosphor-logging
generated errors, unle

meson: add option for open-power functions

This repository has long had an open-power only function that ends
up compiled into all systems. We cannot use the phosphor-logging
generated errors, unless we are able to disable this code on
non-open-power systems. Add necessary meson options.

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

show more ...


# f020c444 30-Oct-2022 Xiaochao Ma <maxiaochao@inspur.com>

Add Get SEL Time UTC Offset function

The current ipmi does not support the time zone acquisition command.
This command is a standard ipmi command. In the ipmi specification,
the corresponding NetFn=

Add Get SEL Time UTC Offset function

The current ipmi does not support the time zone acquisition command.
This command is a standard ipmi command. In the ipmi specification,
the corresponding NetFn=0x0A and Cmd=0x5C.
Returns the offset in minutes from UTC to SEL (local) time.
The offset is a 16 bit signed integer with two complements.
LS byte comes first.
(Range from - 1440 to 1440)

tested:
When the current time zone is East Zone 8,
ipmitool raw 0x0A 0x5C
e0 01

Signed-off-by: Xiaochao Ma <maxiaochao@inspur.com>
Change-Id: I74edfe4f18201bec801b021e69a88231e51473a5

show more ...


# 292c917e 25-Jun-2023 Thang Tran <thuutran@amperecomputing.com>

Support to build storage commands in libipmi20

Currently, the storage commands only is built in the libdynamicsensor
library. To build those commands, we have to enable dynamic-sensor
option which m

Support to build storage commands in libipmi20

Currently, the storage commands only is built in the libdynamicsensor
library. To build those commands, we have to enable dynamic-sensor
option which makes sensor commands are built too.

To allow compiling storage commands w/o sensor commands, this commit
adds 'dynamic-storages-only' option to request to build storage commands
in libipmi20 library.

Tested:
1. Disable dynamic-sensor option and enable dynamic-storages-only
option.
2. Built the openBmc image and flash to the board.
3. Request to read/write FRU device via ipmitool.
All of request work well.
4. Request to read SEL list.
Display list of SEL logs.

Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
Change-Id: I330919e7eebbb80bf568f36ead69ade670b2f8d1

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


# 9cf0838a 28-Apr-2023 Vernon Mauery <vernon.mauery@linux.intel.com>

move entity_map_json to libipmid

entity_map_json is used by dbus-sdr sensor handling so it needs to be in
a common location or loading order matters. This change moves the file
from the ipmi20 provi

move entity_map_json to libipmid

entity_map_json is used by dbus-sdr sensor handling so it needs to be in
a common location or loading order matters. This change moves the file
from the ipmi20 provider library to libipmi, a common library.

Tested: Found that even though the dbus-sdr provider loads before
ipmi20, it loads properly without missing symbols.

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

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


# 947da1b0 20-Sep-2022 Nan Zhou <nanzhoumails@gmail.com>

tree-wide: 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.op

tree-wide: 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. Code inspection can show that only ObjectManager
path changed.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I770e977a5aa76af8ca79f550dcb5f81fa585a66b

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


# 0ca3bfed 28-Jan-2022 Willy Tu <wltu@google.com>

storagehandler: Fix sdr count for cmdGetSdrRepositoryInfo

Match the Sdr Repository Info to cmdGetDeviceSdrInfo in sensorhandler.

It should return number of records in the SDR Repository not specifi

storagehandler: Fix sdr count for cmdGetSdrRepositoryInfo

Match the Sdr Repository Info to cmdGetDeviceSdrInfo in sensorhandler.

It should return number of records in the SDR Repository not specific to
sensors or frus.

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

show more ...


# 071d00c5 02-Mar-2022 shamim ali <shamima@ami.com>

Set Sel time response code fixed in ntp mode

While setting the SEl time via Set Sel Time command with NTP enabled,
getting unspecified error.

SEL time can be set in Manual mode only. See Time Setti

Set Sel time response code fixed in ntp mode

While setting the SEl time via Set Sel Time command with NTP enabled,
getting unspecified error.

SEL time can be set in Manual mode only. See Time Settings section in below link.

https://github.com/openbmc/phosphor-time-manager

TESTED:

before:

busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/time/sync_method xyz.openbmc_project.Time.Synchronization TimeS
yncMethod
s "xyz.openbmc_project.Time.Synchronization.Method.NTP"

ipmitool raw 0x0A 0x49 0x51 0xEF 0x99 0x07
Unable to send RAW command (channel=0x0 netfn=0xa lun=0x0 cmd=0x49 rsp=0xff): Unspecified error

After:

busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/time/sync_method xyz.openbmc_project.Time.Synchronization TimeS
yncMethod
s "xyz.openbmc_project.Time.Synchronization.Method.NTP"

ipmitool raw 0x0a 0x49 0xfe 0x0e 0x0 0x01
Unable to send RAW command (channel=0x0 netfn=0xa lun=0x0 cmd=0x49 rsp=0xd5): Command not supported in present state

Signed-off-by: shamim ali <shamima@ami.com>
Change-Id: If415a1a7c1e862cbbd4a724bb32390cf01d0f450

show more ...


12345