summaryrefslogtreecommitdiffstats
path: root/src/usr/initservice
diff options
context:
space:
mode:
authorIlya Smirnov <ismirno@us.ibm.com>2018-05-03 10:27:21 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-05-10 22:31:09 -0400
commit92a48f3e7c802e6784ad8f272ff94362fe6b5845 (patch)
tree06238b9d4cb33bac8584c484340b8127f1a6f368 /src/usr/initservice
parent8e601e32703bc4d7f28d47fb07ded59c3a810e11 (diff)
downloadtalos-hostboot-92a48f3e7c802e6784ad8f272ff94362fe6b5845.tar.gz
talos-hostboot-92a48f3e7c802e6784ad8f272ff94362fe6b5845.zip
Check if Console Library is Loaded Before Printing to Console
When a failure occurs early in IPL (for instance, due to corrupt secure headers), the doShutdown path attempts to print a trace to the console, which, if the console has not been initialized yet, locks up the shutdown path, and we don't shut down gracefully. This change adds a check to make sure the console library has been loaded prior to flushing the trace in doShutdown path. Change-Id: I74942476de0a8c3f4cba41b92b05369687441f68 CQ: SW426722 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58346 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/initservice')
-rw-r--r--src/usr/initservice/baseinitsvc/initservice.C8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/usr/initservice/baseinitsvc/initservice.C b/src/usr/initservice/baseinitsvc/initservice.C
index 8445a4df7..6ba26e392 100644
--- a/src/usr/initservice/baseinitsvc/initservice.C
+++ b/src/usr/initservice/baseinitsvc/initservice.C
@@ -767,11 +767,15 @@ void InitService::doShutdown(uint64_t i_status,
// check if console msg not needed or already displayed by caller
if ((SHUTDOWN_STATUS_GOOD != i_status) &&
(SBE::SBE_UPDATE_REQUEST_REIPL != i_status) &&
- (SHUTDOWN_NOT_RECONFIG_LOOP != i_status) )
+ (SHUTDOWN_NOT_RECONFIG_LOOP != i_status))
{
CONSOLE::displayf(NULL, "System shutting down with error status 0x%X",
i_status);
- CONSOLE::flush();
+ if(VFS::module_is_loaded("libconsole.so"))
+ {
+ // Only flush the trace when the console module is loaded
+ CONSOLE::flush();
+ }
}
#endif
OpenPOWER on IntegriCloud