summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorGlenn Miles <milesg@ibm.com>2019-10-14 12:23:37 -0500
committerDaniel M Crowell <dcrowell@us.ibm.com>2019-10-15 16:00:48 -0500
commit9f92316f3b086c4a0fe85205114c6978477c65e5 (patch)
tree727d5a465c14aeb2da66fa35d1ee497737503946 /src/usr
parentdf80bf43c740bd6a46e186353a85257ab6702539 (diff)
downloadtalos-hostboot-9f92316f3b086c4a0fe85205114c6978477c65e5.tar.gz
talos-hostboot-9f92316f3b086c4a0fe85205114c6978477c65e5.zip
Do nothing with error logs after shutdown event is received.
Disable processing of error logs by the error log server after receiving the shutdown event. This is to prevent the possibility of bad things from happening once other services are shutdown. CQ: SW465848 Change-Id: I59c4951182d43a78f5704b4b4c3379f10dd03182 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/85278 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/errl/errlmanager.C28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C
index 97310383f..05890dad7 100644
--- a/src/usr/errl/errlmanager.C
+++ b/src/usr/errl/errlmanager.C
@@ -138,6 +138,7 @@ AtLoadFunctions atLoadFunction;
///////////////////////////////////////////////////////////////////////////////
ErrlManager::ErrlManager() :
iv_pnorReadyForErrorLogs(false),
+ iv_recvdShutdownEvent(false),
iv_hwasProcessCalloutFn(NULL),
iv_msgQ(NULL),
iv_pnorAddr(NULL),
@@ -290,6 +291,30 @@ void ErrlManager::errlogMsgHndlr ()
msg_t * theMsg = msg_wait( iv_msgQ );
TRACFCOMP( g_trac_errl, INFO_MRK"Got an error log Msg - Type: 0x%08x",
theMsg->type );
+
+ // if we've been shut down then do nothing except delete the msg or send
+ // a response depending on the message type.
+ if(iv_recvdShutdownEvent)
+ {
+ TRACFCOMP( g_trac_errl, INFO_MRK "Error log service is shutdown. "
+ "Message will be ignored.");
+ switch( theMsg->type )
+ {
+ // Shutdown and flush message types expect a response
+ case ERRLOG_SHUTDOWN_TYPE:
+ case ERRLOG_FLUSH_TYPE:
+ msg_respond ( iv_msgQ, theMsg );
+ break;
+
+ // All other messages just need to be freed
+ default:
+ msg_free(theMsg);
+ break;
+ }
+ // wait for next message
+ continue;
+ }
+
//Process message just received
switch( theMsg->type )
{
@@ -1029,6 +1054,9 @@ void ErrlManager::errlogShutdown()
// prior to the PNOR resource provider shutting down.
PNOR::flush(PNOR::HB_ERRLOGS);
+ // Remember that we have recieved the shutdown event
+ iv_recvdShutdownEvent = true;
+
return;
}
OpenPOWER on IntegriCloud