History log of /openbmc/phosphor-host-ipmid/dbus-sdr/storagecommands.cpp (Results 1 – 25 of 32)
Revision Date Author Comments
# b99de182 21-Dec-2023 Johnathan Mantey <johnathanx.mantey@intel.com>

Assign ASCII-Latin8 to dbus-sdr FRU string Type/Len

The FRU ID string Type/Len encoding in the dbus-sdr code is left
unassigned, which causes it to be tagged as unicode characters. This
is not the e

Assign ASCII-Latin8 to dbus-sdr FRU string Type/Len

The FRU ID string Type/Len encoding in the dbus-sdr code is left
unassigned, which causes it to be tagged as unicode characters. This
is not the encoding of the data, which is actually ASCII/Latin8.

The problem appears to go unnoticed, I expect, because the dbus-sdr
functionality is not enabled. When dbus-sdr is enabled the id-string
supplied to IPMITool is ASCII/Latin8, but IPMITool decodes it as
unicode.

Tested:
Enabled dbus-sdr features.
Use 'ipmitool fru print'
Confirm FRU id-strings print as ASCII/Latin8

Change-Id: Ie6d936f6b5a0b0cd9ccd9adb68e46e1efbb9b2e5
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>

show more ...


# ea46f3ca 04-Sep-2023 Alexander Hansen <alexander.hansen@9elements.com>

ipmi fru device description from dbus property

currently 'FRU Device Description' is retrieved via EM json decorator
"xyz.openbmc_project.Inventory.Decorator.I2CDevice"

which does not even pass the

ipmi fru device description from dbus property

currently 'FRU Device Description' is retrieved via EM json decorator
"xyz.openbmc_project.Inventory.Decorator.I2CDevice"

which does not even pass the validator and is not present on any of
the upstream EM configs.

This patch provides the 'FRU Device Description' via FruDevice dbus
properties, if present.

Multiple Properties are considereded in order.

Tested: with 2 Supermicro PSU. FRU Device Description shows up.

Change-Id: I924d88b4a3a2406e2f0747b1965cb5f5b50fd096
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 95655220 05-Dec-2023 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: avoid deprecated phosphor::Timer

sdbusplus had an older type named `phosphor::Timer` which was
recently renamed to `sdbusplus::Timer`. Update the code to use
the new type alias.

Change-

sdbusplus: avoid deprecated phosphor::Timer

sdbusplus had an older type named `phosphor::Timer` which was
recently renamed to `sdbusplus::Timer`. Update the code to use
the new type alias.

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

show more ...


# 7bb412f5 25-Sep-2023 Willy Tu <wltu@google.com>

dbus-sdr: sel: Fix dst setting

Use the day time saving information on the system to calculate the time
instead of zero (no dst) as the default.

https://linux.die.net/man/3/mktime

Failure Example,

dbus-sdr: sel: Fix dst setting

Use the day time saving information on the system to calculate the time
instead of zero (no dst) as the default.

https://linux.die.net/man/3/mktime

Failure Example,
```
$ stat /var/log/ipmi_sel
File: /var/log/ipmi_sel
Size: 88 Blocks: 8 IO Block: 4096 regular file
Device: 1bh/27d Inode: 4125 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-09-25 14:37:03.631424968 -0700
Modify: 2023-09-25 14:37:02.291422780 -0700
Change: 2023-09-25 14:37:02.291422780 -0700

$ ipmitool sel
SEL Information
Version : 1.5 (v1.5, v2 compliant)
Entries : 0
Free Space : 65535 bytes or more
Percent Used : unknown
Last Add Time : 09/25/23 14:30:08 PDT
Last Del Time : Not Available
Overflow : false
Supported Cmds : 'Reserve'

$ ipmitool sel list
1 | 09/25/23 | 15:30:07 PDT | reserved #0xff | | Asserted
```

Tested:
Fixed the timezone issues
```
$ ipmitool sel list
1 | 09/25/23 | 14:30:07 PDT | reserved #0xff | | Asserted
```

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

show more ...


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

dbus-sdr: support reading OEM SEL logs

This commit supports reading OEM SEL record type in range 0xC0-0xDF and
0xE0-0xFF.

Tested:
Request to show SEL logs, OEM SEL log is shown.

Change-Id: I8e

dbus-sdr: support reading OEM SEL logs

This commit supports reading OEM SEL record type in range 0xC0-0xDF and
0xE0-0xFF.

Tested:
Request to show SEL logs, OEM SEL log is shown.

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

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


# 369824e7 20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 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-17 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: Ic5fd073faa7391d3f0b37787d6a9c7688c9a3253
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 085de48d 26-Sep-2023 Alexander Hansen <alexander.hansen@9elements.com>

phosphor-sel-logger clears SEL

the SEL logger now clears the SEL and the option
'sel-logger-clears-sel' is removed.

This removes the ambiguity about who should clear it and provides
a single implem

phosphor-sel-logger clears SEL

the SEL logger now clears the SEL and the option
'sel-logger-clears-sel' is removed.

This removes the ambiguity about who should clear it and provides
a single implementation.

Tested: together with the other topic changes. SEL Add/Clear works.

Change-Id: I9d228ac418406272caf220170a824735108b5599
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 23a722ca 12-May-2023 Johnathan Mantey <johnathanx.mantey@intel.com>

Enable Yocto control of the USING_ENTITY_MANAGER_DECORATORS

The USING_ENTITY_MANAGER_DECORATORS compile switch is hard coded to
enabled in a header file. The changes here allow the feature to be
con

Enable Yocto control of the USING_ENTITY_MANAGER_DECORATORS

The USING_ENTITY_MANAGER_DECORATORS compile switch is hard coded to
enabled in a header file. The changes here allow the feature to be
controlled in recipes via PACKAGECONFIG entries in bbappend files.

Tested:
Applied https://gerrit.openbmc.org/c/openbmc/openbmc/+/63434
Modified internal bbappend file to PACKAGECONFIG:remove
entity-manager-decorators
Confirmed the code guarded by the ifdef no longer compiled
Removed change to bbappend file
Confirmed the code guarded by the ifdef was restored.

Change-Id: I4f3072451f893fcb5edaa478d0546253e7005b9f
Signed-off-by: Johnathan Mantey <johnathanx.mantey@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 ...


# d90b3f08 11-Nov-2022 krishnar4 <krishnar@ami.com>

Extended support for 16bit logic bus

This commit will add the support of 16 bit logical bus.

Tested :
all EEPROM fru getting listed Successfully which were connected
to 8 and 16 bit logical bus.

d

Extended support for 16bit logic bus

This commit will add the support of 16 bit logical bus.

Tested :
all EEPROM fru getting listed Successfully which were connected
to 8 and 16 bit logical bus.

dependent commit:-
https://gerrit.openbmc.org/c/openbmc/entity-manager/+/58634

Signed-off-by: krishnar4 <krishnar@ami.com>
Change-Id: I547ef8a27fdc74ec34a421c4cf5949c29fcc77b4

show more ...


# 52535624 28-Nov-2022 William A. Kennington III <wak@google.com>

dbus-sdr/storagecommands: Fix type

Return type of writeFruCache is unused, set it to void.

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

dbus-sdr/storagecommands: Fix type

Return type of writeFruCache is unused, set it to void.

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

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


# 548d1a27 14-Sep-2022 Sui Chen <suichen@google.com>

dbus-sdr: write-back to fruCache upon modification

ipmiStorageWriteFruData is a read-modify-write cycle:
1) Obtain a copy of the target FRU with getFru()
2) Modify the copy
3) Write modified copy FR

dbus-sdr: write-back to fruCache upon modification

ipmiStorageWriteFruData is a read-modify-write cycle:
1) Obtain a copy of the target FRU with getFru()
2) Modify the copy
3) Write modified copy FRU to EEPROM by calling `writeFru(fru)`
or `writeFru(fruCache)`.

For 3) above, whether `writeFru(fru)` or `writeFru(fruCache)` is
called depends on the value of `atEnd`.
Currently fruCacue is not updated in the atEnd==false branch, where
`writeFru(fruCache)` is called. This may cause the unmodified FRU
content to be written back, as if the write did not happen.
This change adds the write-back operation.

Tested: FRU write works

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

show more ...


# 2b3507af 19-Aug-2022 Tim Lee <timlee660101@gmail.com>

dbus-sdr: fix build error when disable sel-logger-clears-sel

callDbusMethod() didn't support optional parameters for the method call.
For consistence, we use yield_method_call() instead currently to

dbus-sdr: fix build error when disable sel-logger-clears-sel

callDbusMethod() didn't support optional parameters for the method call.
For consistence, we use yield_method_call() instead currently to avoid this build error.

Signed-off-by: Tim Lee <timlee660101@gmail.com>
Change-Id: I9bf77293c31bb1e80e6e4ed2c9564bc9b6150e25

show more ...


# 11317d75 26-Jul-2022 Tim Lee <timlee660101@gmail.com>

dbus-sdr: fix build error when enable sel-logger-clears-sel

Symptom:
When enable -Dsel-logger-clears-sel=enabled with meson build.
There is build error in function ipmiStorageClearSEL() as below:

e

dbus-sdr: fix build error when enable sel-logger-clears-sel

Symptom:
When enable -Dsel-logger-clears-sel=enabled with meson build.
There is build error in function ipmiStorageClearSEL() as below:

error: 'ctx' was not declared in this scope
| ctx->bus->yield_method_call<>(ctx->yield, ec, selLoggerServiceName,
error: expected primary-expression before '>' token
| ctx->bus->yield_method_call<>(ctx->yield, ec, selLoggerServiceName,

Root cause:
There is no define "ctx" in ipmiStorageClearSEL() definition.
ipmi::RspType<uint8_t> ipmiStorageClearSEL(ipmi::Context::ptr,

Solution:
Add define "ctx" for ipmi context pointer.
ipmi::RspType<uint8_t> ipmiStorageClearSEL(ipmi::Context::ptr ctx,

Verified:
bitbake phosphor-ipmi-host and build pass without errors.

Signed-off-by: Tim Lee <timlee660101@gmail.com>
Change-Id: Id52aeb546c4c1f382873761e9ef9196ab8147dc7

show more ...


# 48fe64e9 01-Aug-2022 Willy Tu <wltu@google.com>

dbus-sdr: Fixed race condition in fruRead

Return the actual fru data in getFru and not rely on the fruCach
wherever possible to make sure the the fru data is still avaliable even
if the fruCache get

dbus-sdr: Fixed race condition in fruRead

Return the actual fru data in getFru and not rely on the fruCach
wherever possible to make sure the the fru data is still avaliable even
if the fruCache get's updated.

Added writeFru to take in a fru vector to make sure that the fruWrite
with ipmi handler don't use the cache directly. Only use the fruCache in
writeFruIfRunning.

Tested:
Ran the two while loops in different terminal and check the size
written.
```
while [ true ]
do
ipmitool fru read 27 /tmp/fru27.bin
done

while [ true ]
do
ipmitool fru read 95 /tmp/fru95.bin
done
```

No issue of running into the race condition issue of the fru being
cleared and writing Fru Size of 0.

FruWrite seems to still work.

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

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


# 4376cdf8 16-Nov-2021 Harvey.Wu <Harvey.Wu@quantatw.com>

dbus-sdr: fix SEL record Generator ID to fit SPEC

- According the SEL Event Record format(IPMI SPEC Table 32),
the Generator ID has 2 bytes, and LUN is saved at the lowest
two bits in the High b

dbus-sdr: fix SEL record Generator ID to fit SPEC

- According the SEL Event Record format(IPMI SPEC Table 32),
the Generator ID has 2 bytes, and LUN is saved at the lowest
two bits in the High byte.

In the origin code, the LUN is saved in the low byte. It will
let the sensor name cannot be found when call sel elist like below:
~# ipmitool sel elist
1 | Pre-Init |0000000063| Power Unit #0x0d | AC lost | Asserted
2 | Pre-Init |0000000071| Power Unit #0x0d | Power off/down | Deasserted
~# ipmitool sel elist -v
Loading IANA PEN Registry...
Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
Invalid completion code received: Invalid command
Discovered IPMB address 0x0
SEL Record ID : 0001
Record Type : 02
Timestamp : 00:01:03 GMT 00:01:03 GMT
Generator ID : 0021
EvM Revision : 04
Sensor Type : Power Unit
Sensor Number : 0d
Event Type : Sensor-specific Discrete
Event Direction : Assertion Event
Event Data : 04ffff
Description : AC lost

SEL Record ID : 0002
Record Type : 02
Timestamp : 00:01:11 GMT 00:01:11 GMT
Generator ID : 0021
EvM Revision : 04
Sensor Type : Power Unit
Sensor Number : 0d
Event Type : Sensor-specific Discrete
Event Direction : Deassertion Event
Event Data : 00ffff
Description : Power off/down

After fixing Generator_Id problem:
~# ipmitool sel elist
1 | Pre-Init |0000000063| Power Unit chassis0 | AC lost | Asserted
2 | Pre-Init |0000000071| Power Unit chassis0 | Power off/down | Deasserted
~# ipmitool sel elist -v
Loading IANA PEN Registry...
Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
Invalid completion code received: Invalid command
Discovered IPMB address 0x0
SEL Record ID : 0001
Record Type : 02
Timestamp : 00:01:03 GMT 00:01:03 GMT
Generator ID : 0120
EvM Revision : 04
Sensor Type : Power Unit
Sensor Number : 0d
Event Type : Sensor-specific Discrete
Event Direction : Assertion Event
Event Data : 04ffff
Description : AC lost

SEL Record ID : 0002
Record Type : 02
Timestamp : 00:01:11 GMT 00:01:11 GMT
Generator ID : 0120
EvM Revision : 04
Sensor Type : Power Unit
Sensor Number : 0d
Event Type : Sensor-specific Discrete
Event Direction : Deassertion Event
Event Data : 00ffff
Description : Power off/down

Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw.com>
Change-Id: I3a7745fd3a3040375bc03bef7da7ae84ae22e04c

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


# 5d380671 04-May-2022 Ed Tanous <edtanous@google.com>

Fix build issue for dbus-sdr

Lack of "include what you use" on the storagecommands.cpp file was
causing this to fail to compile. Add the include.

Tested:
Code builds with the dbus-sdr option enabl

Fix build issue for dbus-sdr

Lack of "include what you use" on the storagecommands.cpp file was
causing this to fail to compile. Add the include.

Tested:
Code builds with the dbus-sdr option enabled

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I6beb50f60b8e39b134d892d3f5f036441baed2e6

show more ...


# cd1c4963 22-Sep-2021 Johnathan Mantey <johnathanx.mantey@intel.com>

Guarantee SDR Type12 byte alignment matches the IPMI spec

The Type12 structure used a uint24_t to assign storage for 3 reserved
bytes in the Type12 SDR definition. This turned out to be an issue as

Guarantee SDR Type12 byte alignment matches the IPMI spec

The Type12 structure used a uint24_t to assign storage for 3 reserved
bytes in the Type12 SDR definition. This turned out to be an issue as
the compiler promoted the uint24_t to a uint32_t, which added one
additional byte to the structure. This in turn pushed the trailing
bytes out of alignment.

The defintion has been changed to use an explicit uint8_t array that
is three bytes in size. This defines the structure in a way that
guarantees the size of the record is correct.

The structure has also had a constructor added to it to eliminate code
duplication, and to reduce the likelihood of errors caused by manual
calculation of values.

Tested:
Issued 'ipmitool sdr dump /tmp/sdrs.bin'
Performed a hex dump on the binary data and reviewed the Type12
records.
Confirmed all fields were correctly assigned, including the inclusion
of only 3 reserved bytes.

Ported From:
https://gerrit.openbmc-project.xyz/c/openbmc/intel-ipmi-oem/+/47117

Change-Id: I3fef5a1fe67877e5a6cf6e7928c5f15599bfb6f6
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 818bea1f 20-Sep-2021 Charles Boyer <Charles.Boyer@fii-usa.com>

dbus-sdr:storagecommands: Add option to use Clear method

There is support in phosphor-sel-logger to clear the SEL files
through its Clear method from,
https://gerrit.openbmc-project.xyz/c/openbmc/ph

dbus-sdr:storagecommands: Add option to use Clear method

There is support in phosphor-sel-logger to clear the SEL files
through its Clear method from,
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-sel-logger/+/45438
The Clear method API was added through,
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/45402
The packageconfig option is added through,
https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/49032

This change will create an option to configure the Clear SEL IPMI
command to call the Clear method, so the Record ID can be restarted
after a clear. If the clears-sel option from phosphor-sel-logger is
used while the IPMI SEL Clear clears the SEL log files, then the
Record ID will not restart at 1.

Tested:
- Enabled clears-sel in phosphor-sel-logger
- Enabled sel-logger-clears-sel through packageconfig, and after
a Clear SEL command, new SEL entries restarted at Record ID 1
as intended.
- With sel-logger-clears-sel disabled, the SEL entries continued
after the latest Record ID before the clear. This indicates that
the SEL files were cleared by the IPMI Clear SEL command.

Signed-off-by: Charles Boyer <Charles.Boyer@fii-usa.com>
Change-Id: I4461b4ba7449c12e276b1b0e0e7d54ace611643f

show more ...


# 05d17c03 14-Sep-2021 Harvey Wu <Harvey.Wu@quantatw.com>

dbus-sdr: implement SDR Record Type 8

- implement SDR Record Type 8 sensor like ipmi_entity_get_sdr function
in sensorhandler.cpp, and will locate at the last of SDR list

TEST:
~# ipmitool sdr el

dbus-sdr: implement SDR Record Type 8

- implement SDR Record Type 8 sensor like ipmi_entity_get_sdr function
in sensorhandler.cpp, and will locate at the last of SDR list

TEST:
~# ipmitool sdr elist all -vvv
...
...
...
SDR record ID : 0x00d9
SDR record type : 0x08
SDR record next : 0x00da
SDR record bytes: 11
Getting 11 bytes from SDR at offset 5
SDR record ID : 0x00d9
SDR record ID : 0x00da
SDR record type : 0x08
SDR record next : 0xffff
SDR record bytes: 11
Getting 11 bytes from SDR at offset 5
SDR record ID : 0x00da

~# ipmitool raw 0x04 0x21 0x00 0x00 0xd9 0x00 0x00 0xff
da 00 d9 00 51 08 0b 1e 00 80 0b 03 0b 07 1d 00
1d 01
~# ipmitool raw 0x04 0x21 0x00 0x00 0xda 0x00 0x00 0xff
ff ff da 00 51 08 0b 1e 01 80 0b 08 0b 0b 1d 02
1d 03

Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I4998532402158f299dcb34c29734b23b5f8dc719

show more ...


# d934be9d 07-Dec-2021 Thang Tran <thuutran@amperecomputing.com>

dbus-sdr: Reset last device ID to 0xff when writing done

Issue: when requests to write incorrect FRU data via "ipmitool fru 0
<binFile>" command, this request returns a fail result. Request to read

dbus-sdr: Reset last device ID to 0xff when writing done

Issue: when requests to write incorrect FRU data via "ipmitool fru 0
<binFile>" command, this request returns a fail result. Request to read
FRU information via "ipmitool fru print 0" and "busctl introspect
xyz.openbmc_project.FruDevice <FruPath>" commands:
- Expect result: FRU information from 2 of commands are old FRU data
- Actual result: FRU information from 2 of commnads are different.
+ "busctl introspect xyz.openbmc_project.FruDevice <FruPath>"
return old FRU data as expectation.
+ "ipmitool fru print 0" return new FRU data, this is incorrect
behavior.

Root cause: When the written data is incorrect data, it will not be
wrote to FRU device. But dbus-sdr stored FruCache as written data.
Therefore, when users request to read FRU information as written device
ID, dbus-sdr returns FruCache data without reads data via dbus method
(in this time, FruCache is including incorrect data).

Solution: Reset last device ID to 0xff when writing done.

Tested:
1. Request to read FRU information
ipmitool fru print 0
2. Request to write incorrect FRU data
ipmitool fru 0 write <binFile>
3. Request to read FRU information
ipmitool fru print 0
The result as step 1.

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

show more ...


12