diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2018-11-09 11:03:15 +1030 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-11-08 20:50:36 -0600 |
commit | d49bfeea7bf274efe2b8a3b0840181ec35ba60ca (patch) | |
tree | 230b2f0ed0b329c0f9dae2a12ff1ff72b6259afb /libflash/ipmi-hiomap.c | |
parent | 1151a987ae4579a8c51bba7ebc61c79c176830bd (diff) | |
download | blackbird-skiboot-d49bfeea7bf274efe2b8a3b0840181ec35ba60ca.tar.gz blackbird-skiboot-d49bfeea7bf274efe2b8a3b0840181ec35ba60ca.zip |
libflash/ipmi-hiomap: Respect daemon presence and flash control
Fix the fix of ORing in the BMC state - we only want to retain state
covered by the ack mask as this is something we still need to handle.
Critically, we must not retain state not covered by the ack mask as this
may lead to host firmware attempting to communicate with a dead daemon
or attempting to access the PNOR whilst the daemon is not in control of
the flash.
Further, add unit tests to capture the desired (and now implemented)
behaviour.
Fixes: 34cffed2ccf3 ("libflash/ipmi-hiomap: Improve event handling")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'libflash/ipmi-hiomap.c')
-rw-r--r-- | libflash/ipmi-hiomap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libflash/ipmi-hiomap.c b/libflash/ipmi-hiomap.c index 88e9edac..e2b64fe9 100644 --- a/libflash/ipmi-hiomap.c +++ b/libflash/ipmi-hiomap.c @@ -446,7 +446,7 @@ static void hiomap_event(uint8_t events, void *context) prlog(PR_DEBUG, "Received events: 0x%x\n", events); lock(&ctx->lock); - ctx->bmc_state |= events; + ctx->bmc_state = events | (ctx->bmc_state & HIOMAP_E_ACK_MASK); ctx->update = true; unlock(&ctx->lock); } |