History log of /openbmc/phosphor-host-ipmid/dbus-sdr/ (Results 51 – 75 of 103)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
042e9db415-Sep-2022 adarshgrami <adarshgr@ami.com>

DCMI Commands: Support Get DCMI Sensor Info Dynamically

When Dynamic SDR Feature is enabled the sensor record id should be get dynamically for DCMI Sensors.

Tested:

Case 1:Get inlet sensor informa

DCMI Commands: Support Get DCMI Sensor Info Dynamically

When Dynamic SDR Feature is enabled the sensor record id should be get dynamically for DCMI Sensors.

Tested:

Case 1:Get inlet sensor information

$ipmitool raw 0x2c 0x07 0xdc 0x01 0x40 0x00 0x00

dc 01 01 1a 00

Case 2:Get Baseboard sensor information

ipmitool raw 0x2c 0x07 0xdc 0x01 0x41 0x00 0x00

dc 02 02 18 00 19 00

Case 3:Get CPU sensor information

ipmitool raw 0x2c 0x07 0xdc 0x01 0x42 0x00 0x00

dc 01 01 1b 00

Case 4: Give a invalid sensor instance number

$ipmitool raw 0x2c 0x07 0xdc 0x01 0x41 0x05 0x00

Unable to send RAW command (channel=0x0 netfn=0x2c lun=0x0 cmd=0x7 rsp=0xff): Unspecified error

Result : The command should throw error

Case 5:Get a specific sensor details by giving instance parameter 2 of CPU sensors

$ipmitool raw 0x2c 0x07 0xdc 0x01 0x41 0x02 0x00

dc 02 01 19 00

Signed-off-by: adarshgrami <adarshgr@ami.com>
Change-Id: Ib2099a49ecaebc16b5fae29a4c18ca3e788aabf1

show more ...

4eca251020-Jun-2022 Willy Tu <wltu@google.com>

dbus-sdr: Remove excessive `Failed to GetAll` error message

The `Failed to GetAll` message will happen if any of the sensor doesn't
have `Inventory.Decorator.Ipmi` dbus interface. Instead of making

dbus-sdr: Remove excessive `Failed to GetAll` error message

The `Failed to GetAll` message will happen if any of the sensor doesn't
have `Inventory.Decorator.Ipmi` dbus interface. Instead of making a
`GetAll` call to all sensors, we will check if the sensor have the
interface first before requesting it. This will remove the need to
attempt sigificantly amount of unnecessary dbus calls.

Tested:
ipmitool sdr return the same sensor as before, but with no excessive
error message.

There is also some performance gain after removing the extra dbus calls.

Before,
```
$ time ipmitool sdr | wc -l
346

real 0m13.786s
user 0m0.315s
sys 0m0.115s

$ time ipmitool sdr | wc -l
346

real 0m14.692s
user 0m0.274s
sys 0m0.196s
```

After,
```
$ time ipmitool sdr | wc -l
346

real 0m11.765s
user 0m0.205s
sys 0m0.155s

$ time ipmitool sdr | wc -l
346

real 0m11.403s
user 0m0.269s
sys 0m0.141s
```

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

show more ...

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

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

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

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

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

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


/openbmc/phosphor-host-ipmid/OWNERS
/openbmc/phosphor-host-ipmid/app/watchdog_service.hpp
/openbmc/phosphor-host-ipmid/apphandler.cpp
/openbmc/phosphor-host-ipmid/chassishandler.cpp
sdrutils.cpp
sensorcommands.cpp
storagecommands.cpp
/openbmc/phosphor-host-ipmid/dcmihandler.cpp
/openbmc/phosphor-host-ipmid/dcmihandler.hpp
/openbmc/phosphor-host-ipmid/globalhandler.cpp
/openbmc/phosphor-host-ipmid/host-cmd-manager.cpp
/openbmc/phosphor-host-ipmid/host-cmd-manager.hpp
/openbmc/phosphor-host-ipmid/host-interface.hpp
/openbmc/phosphor-host-ipmid/include/ipmid/filter.hpp
/openbmc/phosphor-host-ipmid/include/ipmid/handler.hpp
/openbmc/phosphor-host-ipmid/include/ipmid/types.hpp
/openbmc/phosphor-host-ipmid/include/ipmid/utils.hpp
/openbmc/phosphor-host-ipmid/ipmid-new.cpp
/openbmc/phosphor-host-ipmid/libipmid/utils.cpp
/openbmc/phosphor-host-ipmid/meson.build
/openbmc/phosphor-host-ipmid/read_fru_data.cpp
/openbmc/phosphor-host-ipmid/scripts/meson.build
/openbmc/phosphor-host-ipmid/selutility.cpp
/openbmc/phosphor-host-ipmid/sensordatahandler.cpp
/openbmc/phosphor-host-ipmid/sensordatahandler.hpp
/openbmc/phosphor-host-ipmid/sensorhandler.cpp
/openbmc/phosphor-host-ipmid/settings.cpp
/openbmc/phosphor-host-ipmid/settings.hpp
/openbmc/phosphor-host-ipmid/softoff/mainapp.cpp
/openbmc/phosphor-host-ipmid/softoff/softoff.cpp
/openbmc/phosphor-host-ipmid/softoff/softoff.hpp
/openbmc/phosphor-host-ipmid/storagehandler.cpp
/openbmc/phosphor-host-ipmid/systemintfcmds.cpp
/openbmc/phosphor-host-ipmid/transporthandler.cpp
/openbmc/phosphor-host-ipmid/transporthandler.hpp
/openbmc/phosphor-host-ipmid/user_channel/channel_mgmt.cpp
/openbmc/phosphor-host-ipmid/user_channel/channel_mgmt.hpp
/openbmc/phosphor-host-ipmid/user_channel/user_mgmt.cpp
/openbmc/phosphor-host-ipmid/user_channel/user_mgmt.hpp
/openbmc/phosphor-host-ipmid/whitelist-filter.cpp
bef102a309-Jun-2022 Willy Tu <wltu@google.com>

dbus-sdr: Update bitset usage for VR profile status

The assertions for getVrEventStatus is not used properly. It used to be
different with uint8_t which is set to 1 << index. With bitset, we can
jus

dbus-sdr: Update bitset usage for VR profile status

The assertions for getVrEventStatus is not used properly. It used to be
different with uint8_t which is set to 1 << index. With bitset, we can
just set it to the index directly. Wrapped with htole16 just in case.

Tested:
The profile status still works. With correct response this time
```
$ ipmitool raw 0x4 0x2b 0xd3
00 02 00 00 00

// Update the profile
$ ipmitool raw 0x4 0x30 0xd3 0 0 4 0 0 0 0 0 0

$ ipmitool raw 0x4 0x2b 0xd3
00 04 00 00 00
```

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

show more ...

0e7a8af010-Jun-2022 Harvey.Wu <Harvey.Wu@quantatw.com>

dbus-sdr: fix the vector size in sdrWriteTable and sdrStatsTable

- The original padEntries size is only 0-255 because the input
index size is uint8. But if sensor number > 255, the size of
padEn

dbus-sdr: fix the vector size in sdrWriteTable and sdrStatsTable

- The original padEntries size is only 0-255 because the input
index size is uint8. But if sensor number > 255, the size of
padEntries will be different from the size of sensor map, so
the result value when using getWritePermission will be incorrect.

TEST:
Before:
ipmitool raw -l 0 0x04 0x30 0x19 0xff 127 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unable to send RAW command (channel=0x0 netfn=0x4 lun=0x0 cmd=0x30 rsp=0xce): Command response could not be provided
ipmitool raw -l 1 0x04 0x30 0x19 0xff 127 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unable to send RAW command (channel=0x0 netfn=0x4 lun=0x1 cmd=0x30 rsp=0xce): Command response could not be provided

After:
ipmitool raw -l 0 0x04 0x30 0x19 0xff 127 0x00 0x00 0x00 0x00 0x00 0x00 0x00
ipmitool raw -l 1 0x04 0x30 0x19 0xff 127 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Unable to send RAW command (channel=0x0 netfn=0x4 lun=0x1 cmd=0x30 rsp=0xce): Command response could not be provided

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

show more ...

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

ba9bbb6f01-Jun-2022 Willy Tu <wltu@google.com>

build: move all shared_library/module to library with version suffix

The version suffix will create `.so`, `.so.0`, and `.so.0.1` and will be
compatiable with existing bitbake setup for phosphor-ipm

build: move all shared_library/module to library with version suffix

The version suffix will create `.so`, `.so.0`, and `.so.0.1` and will be
compatiable with existing bitbake setup for phosphor-ipmi-host.

Also moved the dbus-sdr library output the `dbus-sdr` folder since the
shared module depends on libipmi20, but it can't find it due to the it
being in a different folder. Moving it to the same meson file fixes that
issue.

Also removed all unused declare_dependency. Built fine without it.

Tested:
dbus-sdr works now
```
ipmitool sdr
cpu0 | disabled | ns
cpu0_core0 | disabled | ns
cpu0_core1 | disabled | ns
cpu0_core2 | disabled | ns
...
```

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

show more ...

c710b97511-Aug-2021 Willy Tu <wltu@google.com>

build: Add meson build for phosphor-host-ipmi

Create meson and meson_options for the existing features.

Removed sample.h/cpp since that is not used at all.

Tested:
Ipmi command works fine the clea

build: Add meson build for phosphor-host-ipmi

Create meson and meson_options for the existing features.

Removed sample.h/cpp since that is not used at all.

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: Ibaea9eea802b063a0207320654cbb817fde30c2a
Signed-off-by: Willy Tu <wltu@google.com>

show more ...

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


/openbmc/phosphor-host-ipmid/apphandler.cpp
/openbmc/phosphor-host-ipmid/chassishandler.cpp
sdrutils.cpp
sensorcommands.cpp
storagecommands.cpp
/openbmc/phosphor-host-ipmid/dcmihandler.cpp
/openbmc/phosphor-host-ipmid/dcmihandler.hpp
/openbmc/phosphor-host-ipmid/groupext.cpp
/openbmc/phosphor-host-ipmid/host-interface.cpp
/openbmc/phosphor-host-ipmid/include/ipmid/sessionhelper.hpp
/openbmc/phosphor-host-ipmid/include/ipmid/types.hpp
/openbmc/phosphor-host-ipmid/include/ipmid/utils.hpp
/openbmc/phosphor-host-ipmid/ipmisensor.cpp
/openbmc/phosphor-host-ipmid/libipmid/utils.cpp
/openbmc/phosphor-host-ipmid/scripts/sensor-example.yaml
/openbmc/phosphor-host-ipmid/scripts/writesensor.mako.cpp
/openbmc/phosphor-host-ipmid/selutility.cpp
/openbmc/phosphor-host-ipmid/sensordatahandler.cpp
/openbmc/phosphor-host-ipmid/sensordatahandler.hpp
/openbmc/phosphor-host-ipmid/sensorhandler.cpp
/openbmc/phosphor-host-ipmid/softoff/mainapp.cpp
/openbmc/phosphor-host-ipmid/storagehandler.cpp
/openbmc/phosphor-host-ipmid/systemintfcmds.cpp
/openbmc/phosphor-host-ipmid/test/dbus-sdr/sensorcommands_unittest.cpp
/openbmc/phosphor-host-ipmid/test/message/payload.cpp
/openbmc/phosphor-host-ipmid/transporthandler.cpp
/openbmc/phosphor-host-ipmid/transporthandler.hpp
/openbmc/phosphor-host-ipmid/user_channel/channel_layer.cpp
/openbmc/phosphor-host-ipmid/user_channel/channel_mgmt.cpp
/openbmc/phosphor-host-ipmid/user_channel/cipher_mgmt.cpp
/openbmc/phosphor-host-ipmid/user_channel/user_mgmt.cpp
/openbmc/phosphor-host-ipmid/user_channel/usercommands.cpp
5d38067104-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 ...

8366f0b229-Apr-2022 Willy Tu <wltu@google.com>

dbus-sdr: VR Event Status: Fix mode proprety fetch

The dbus call to fetch the mode proprty was not working due to the
variant return type. Fix it by just targeting string.

Before:
```
ipmitool raw

dbus-sdr: VR Event Status: Fix mode proprety fetch

The dbus call to fetch the mode proprty was not working due to the
variant return type. Fix it by just targeting string.

Before:
```
ipmitool raw 0x4 0x2b 0xd8
Unable to send RAW command (channel=0x0 netfn=0x4 lun=0x0 cmd=0x2b rsp=0xce): Command response could not be provided
```

Tested:
Working call.
```
ipmitool raw 0x4 0x2b 0xd8
00 04 00 00 00
```

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

show more ...

3ab2c2b201-Nov-2021 Sujoy Ray <sujoy.ray@intel.com>

SEL log Generator ID should Conform to IPMI Spec

In IMPI specification, the generator ID for SEL log is 2 bytes long.
Apart from the Generator ID, it contains LUN and channel information.
The fix is

SEL log Generator ID should Conform to IPMI Spec

In IMPI specification, the generator ID for SEL log is 2 bytes long.
Apart from the Generator ID, it contains LUN and channel information.
The fix is to change 1-Byte Generator ID to 2-byte generator ID and
include all missing information into it.

Tested
Following tests were executed:
1) Run ipmitool raw -l 1 0x4 0x2 0x4 0x8 0x1 0x6 0x1 0x5
This ensures that non-zero LUN information is included
in the SEL record.

2) Instrument the code to look like ME has created an event
and make sure that logs are saved properly.

For 1) and 2) logs are read from the WebUI to make sure that
they are being saved as expected.

Signed-off-by: Sujoy Ray <sujoy.ray@intel.com>
Change-Id: I78d4423cc24c941af7bf0cd70423a95747ba4a76
Signed-off-by: Willy Tu <wltu@google.com>

show more ...

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

5295cefb22-Sep-2021 Adrian Ambrożewicz <adrian.ambrozewicz@intel.com>

Fix assigning Generator ID for IPMB path

Per IPMI spec - Generator ID is defined as follows for I2C sender:
[7-1] = I2C Slave Address
[0] = 0 (indicates IPMB Slave Address)

This change is introduci

Fix assigning Generator ID for IPMB path

Per IPMI spec - Generator ID is defined as follows for I2C sender:
[7-1] = I2C Slave Address
[0] = 0 (indicates IPMB Slave Address)

This change is introducing proper shift for IPMB path, so Generator ID
is correctly assigned.

Tested:
- tested on actual system with IPMB events originating from ME,
- after this change SEL entries from ME have correct generator ID (0x2C).

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

Change-Id: I5b94e2242e5ac2b4d4ecc5c7e7cd9e8a93bd98ab
Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@intel.com>
Signed-off-by: Willy Tu <wltu@google.com>

show more ...

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

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

8265af2116-Dec-2021 Konstantin Aladyshev <aladyshev22@gmail.com>

dbus-sdr: Support NaN thresholds

It is possible that the threshold interface (Warning or Critical) is
present, but one of its thresholds is not set. In this case IPMI should
report 'na' for this thr

dbus-sdr: Support NaN thresholds

It is possible that the threshold interface (Warning or Critical) is
present, but one of its thresholds is not set. In this case IPMI should
report 'na' for this threshold.

Before:
P0 VDD CORE | na | Amps | na | na | 0.000 | na | na | 49.980 | na

After:
P0 VDD CORE | na | Amps | na | na | na | na | na | 49.980 | na

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

show more ...

97014f5016-Dec-2021 Duke Du <Duke.Du@quantatw.com>

Fix "ID String Type/Length Code" byte for get sdr command

Root cause :
Currently, the byte of "Type/Length Code" for dbus-sdr
get sdr record command is incorrect when the length of
sensor name is lo

Fix "ID String Type/Length Code" byte for get sdr command

Root cause :
Currently, the byte of "Type/Length Code" for dbus-sdr
get sdr record command is incorrect when the length of
sensor name is longer than 16 bytes. The suffix of the
sensor name would be replace with blank and resize the
sensor name with FULL_RECORD_ID_STR_MAX_LENGTH. Due to
this reason the "Type/Length Code" would record incorrect
data 0x10 (i.e. 16 bytes length sensor ID string).

Solution :
Resizing the sensor name when it is still longer than 16
bytes after replacing the suffix with blank.

Example :
Sensor Name = cpu0_pvccd_hv_Temperature

The result of getting SDR record without this change.
e4 00 e3 00 51 01 3b 20 00 e3 07 2f 00 68 01 01
85 32 85 32 1b 1b 80 01 00 00 01 00 00 00 00 00
00 00 00 00 00 00 00 5f 5a 00 00 03 00 00 00 00
00 10 63 70 75 30 20 70 76 63 63 64 20 68 76 00
00 00

The result of getting SDR record with this change.
c2 00 c1 00 51 01 3b 20 00 c1 07 2f 00 68 01 01
85 32 85 32 1b 1b 80 01 00 00 01 00 00 00 00 00
00 00 00 00 00 00 00 5f 5a 00 00 03 00 00 00 00
00 0d 63 70 75 30 20 70 76 63 63 64 20 68 76 00
00 00

Resize code reference:
https://github.com/openbmc/phosphor-host-ipmid/blob/master/dbus-sdr/sensorcommands.cpp#L445

Signed-off-by: Duke Du <Duke.Du@quantatw.com>
Change-Id: I63b81f5a54466318b25099d9496fc7796ab06752

show more ...

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

6619ae4606-Aug-2021 Johnathan Mantey <johnathanx.mantey@intel.com>

Improve SDR sensor number mapping for sensor nums above 510

The recent submission to support SDR records defining Type 01 records
for sensors did not work when the system had more than 510 sensors.

Improve SDR sensor number mapping for sensor nums above 510

The recent submission to support SDR records defining Type 01 records
for sensors did not work when the system had more than 510 sensors. A
recent change supplied a system that enumerated more sensors then IPMI
can support. The change highlighted an error in how the Type 01
records were built.

This commit handles systems with a larger set of sensors. The code for
handling SDR # 511 correctly creates sensor number 768. It then fills
sensors to the limit of LUN 3.

Tested:
A SUT that supplied 1946 sensors was used to implement and test the
code.
Test cases:
"ipmitool sdr elist" returns 765 sensors
"ipmitool sensor list" returns 765 sensors
"ipmitool -l <lun> raw 4 0x2d <sn>" performed the correct behavior for
luns 0-3, sensor numbers 0, 254, 255.

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

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

show more ...

12345