History log of /openbmc/openpower-host-ipmi-flash/hiomap.cpp (Results 1 – 21 of 21)
Revision Date Author Comments
# 0d5b076e 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: Ie377be65aa7205089b44e4c0caf4674ea8797e13
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 6aa9236c 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: Ia40a8258d162ca5fbb07d91a652f5521f2465cda

show more ...


# 89707266 15-Jun-2022 Willy Tu <wltu@google.com>

build: Convert project to meson due to ipmid dependencies

Cleanedup all build warnings and updated the header to point to the
latest ipmid.

Tested:
Build BMC image with witherspoon and was fine.

C

build: Convert project to meson due to ipmid dependencies

Cleanedup all build warnings and updated the header to point to the
latest ipmid.

Tested:
Build BMC image with witherspoon and was fine.

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

show more ...


# 95510386 02-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

exception: switch to public sdbus exception

SdBusError was intended to be a private error type inside sdbusplus.
Switch all catch locations to use the general sdbusplus::exception type.

exception: switch to public sdbus exception

SdBusError was intended to be a private error type inside sdbusplus.
Switch all catch locations to use the general sdbusplus::exception type.

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

show more ...


# 80d5bcaf 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: replace message::variant with std::variant

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


# 3d420921 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: remove deprecated variant_ns

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


# d4b7f5e4 16-Apr-2019 Adriana Kobylak <anoo@us.ibm.com>

hiomap: Unblock SIGTERM on reset path

When IPMI is terminated, the SIGTERM signal was not re-enabled on the
hiomap's reset path, causing IPMI to not be terminated.

Tested:
-

hiomap: Unblock SIGTERM on reset path

When IPMI is terminated, the SIGTERM signal was not re-enabled on the
hiomap's reset path, causing IPMI to not be terminated.

Tested:
- Without change:
Apr 16 20:46:43 witherspoon systemd[1]: Stopping Phosphor MBOX Daemon...
Apr 16 20:46:45 witherspoon ipmid[1471]: Blocked SIGTERM
...
Apr 16 20:47:15 witherspoon ipmid[1471]: Unblocked SIGTERM
Apr 16 20:48:15 witherspoon systemd[1]: phosphor-ipmi-host.service: State 'stop-sigterm' timed out. Killing.
Apr 16 20:48:15 witherspoon systemd[1]: phosphor-ipmi-host.service: Killing process 1471 (ipmid) with signal SIGKILL.

- With change:
Apr 16 21:11:23 witherspoon ipmid[1493]: Blocked SIGTERM
Apr 16 21:11:23 witherspoon ipmid[1493]: Received signal; quitting
Apr 16 21:11:23 witherspoon systemd[1]: Stopping Phosphor Inband IPMI...
Apr 16 21:11:23 witherspoon systemd[1]: Stopped Phosphor Inband IPMI.

Fixes: openbmc/openbmc#3465
Change-Id: Ie234b045664db4c63ba6674894be875d31d86cb4
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# ee3064ba 18-Mar-2019 Vernon Mauery <vernon.mauery@linux.intel.com>

Use new ipmid signal handling interface

This changes out the old signal handling for the new boost::asio
signal handing mechanism that the core ipmid is now using.

Tested:
V

Use new ipmid signal handling interface

This changes out the old signal handling for the new boost::asio
signal handing mechanism that the core ipmid is now using.

Tested:
Verified host powers on with the latest ipmid changes.
Verified the block/unblock signal scenarios:
1. When hiomap unblocks SIGTERM (return continue to ipmid), kill ipmid
and verify it exits:

Mar 21 20:53:59 witherspoon ipmid[2711]: Unblocked SIGTERM
root@witherspoon:~# killall -15 ipmid
Mar 21 20:54:15 witherspoon ipmid[2711]: ipmid: Pushing cmd on to queue
Mar 21 20:54:15 witherspoon ipmid[2711]: Asserting SMS Attention
Mar 21 20:54:15 witherspoon ipmid[2711]: SMS Attention asserted
Mar 21 20:54:15 witherspoon ipmid[2711]: Received signal; quitting

2. When hiomap blocks SIGTERM (return break to ipmid), kill ipmid
and verify it doesn't exit (this was done at power off so the failure
to deliver to host msg is expected):

Mar 21 20:54:22 witherspoon ipmid[2722]: Blocked SIGTERM
Mar 21 20:54:22 witherspoon ipmid[2722]: ipmid: Pushing cmd on to queue
Mar 21 20:54:22 witherspoon ipmid[2722]: Asserting SMS Attention
root@witherspoon:~# killall -15 ipmid
Mar 21 20:54:27 witherspoon ipmid[2722]: ipmid: Pushing cmd on to queue
Mar 21 20:54:27 witherspoon ipmid[2722]: Command in process, no attention
Mar 21 20:54:52 witherspoon ipmid[2722]: Host control timeout hit!
Mar 21 20:54:52 witherspoon ipmid[2722]: Failed to deliver host command
Mar 21 20:54:52 witherspoon ipmid[2722]: Unblocked SIGTERM

Change-Id: I6b05b4ac3cda19dea76b19074f548b60bca40584
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 619207dc 21-Nov-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Handle SIGTERM to ensure delivery of HIOMAP BMC status

We need to jump through a few hoops to ensure that the host firmware
reliably receives indication of changes to the HIOMAP

hiomap: Handle SIGTERM to ensure delivery of HIOMAP BMC status

We need to jump through a few hoops to ensure that the host firmware
reliably receives indication of changes to the HIOMAP daemon's state
over the IPMI transport. This is driven partly by IPMI's design, partly
by ipmid's implementation, and partly by the original design of the
HIOMAP DBus transport interface.

A long comment has been added outlining the race conditions eliminated
by this change and its related patches, however it's worth drawing
attention to the issue not addressed there - the original design of the
HIOMAP DBus transport:

The HIOMAP BMC status is composed of two distinct types of data:

1. Stateful: BMC_EVENT_DAEMON_READY and BMC_EVENT_FLASH_CONTROL_LOST
2. Events: BMC_EVENT_PROTOCOL_RESET and BMC_EVENT_WINDOW_RESET

The data types described by 1 and 2 map directly onto the DBus concepts
of Properties and Signals. Originally the specification for the HIOMAP
DBus transport exploited this direct mapping, however experience from
dealing with SIGTERM handling has shown that it was a poor mapping to
exploit.

On shutdown the HIOMAP daemon, mboxd, needs to atomically both clear the
BMC_EVENT_DAEMON_READY bit and set the BMC_EVENT_PROTOCOL_RESET bit.
With the data exposed as distinct types this results on two messages
emitted on the bus: A PropertiesChanged signal to advertise the update
to BMC_EVENT_DAEMON_READY, and a raw signal to advertise the update to
BMC_EVENT_PROTOCOL_RESET.

With two separate signals to be processed by ipmid's event loop it is
hard to ensure both will be propagated to the host before the SIGTERM
from systemd is processed by ipmid.

The solution to eliminate the race is to rework the events exposed as
signals into properties and live with the slight mismatch of intent.
This results in the removal of the associated signal handling code in
the plugin.

Change-Id: Ic05c40b52138c132eface6f8d873088e7e66585b
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# ee70196b 31-Oct-2018 Patrick Venture <venture@google.com>

add missing cpp headers, drop unused c headers

Add missing cpp headers for explicit inclusion.
Drop unused c string header, for cpp string header version.

Change-Id: I33907db0c7

add missing cpp headers, drop unused c headers

Add missing cpp headers for explicit inclusion.
Drop unused c string header, for cpp string header version.

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

show more ...


# 5b355068 31-Oct-2018 Patrick Venture <venture@google.com>

build: update .clang-format with latest

The .clang-format file appeared to be an older incarnation, updated to
latest.

Change-Id: I75908c84f2f51eeb239236c9d9e0f4d4e322d862
S

build: update .clang-format with latest

The .clang-format file appeared to be an older incarnation, updated to
latest.

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

show more ...


# 04d75136 25-Sep-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Enforce unique sequence number requirement

Change-Id: Ia9661ce563502c49fcbd020506cb87920bf3e620
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# a1e35b85 23-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Implement erase

Change-Id: I7683ecc0885dec0af8533bf28d8ef1901d2eef0a
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 99f277a1 23-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Implement ack

Change-Id: Ia3a3cfed6fe2dba8c92645444f50fcd227f130c9
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 7b225fb2 23-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Implement flush

Change-Id: I2a62830f11234394ff653b74aa9786b48dd6e35b
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 9847f1c2 23-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Implement mark_dirty

Change-Id: Ib86f4979130f05964035dcc73e62763ce227e984
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# b52822cd 23-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Implement close

Change-Id: I1c55b70f8a842447d0593d536dbdeb43c0c9006b
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# a00f59ba 23-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Implement create_{read,write}_window

Change-Id: Ie6b12a0c1d7b21db67e3e7017938800898e9c9aa
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# db688e9f 23-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Implement get_flash_info

Change-Id: Ic70da5f7554453e4cd476c1d4c67027e342092ff
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 0a3358e7 20-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Plumb DBus signals through as SELs

Change-Id: Ifc33497f0f0572b0e41b235654719d9f17360885
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 2c07f6f0 10-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

hiomap: Implement get_info

Change-Id: Ia1a536402cb08f869ea4321dd26683a72f95d05b
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>