diff options
author | Matt Derksen <mderkse1@us.ibm.com> | 2018-10-29 11:35:35 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-11-02 17:00:51 -0500 |
commit | 1e21ee6d26e5b73e624e2dfd4951d3e820411798 (patch) | |
tree | 1698f19126089849cf4c82acb9faa3e31cf54ecc /src/usr/initservice/istepdispatcher | |
parent | 25102e0add227ca3bd781fe33cb8fba8d65394c3 (diff) | |
download | talos-hostboot-1e21ee6d26e5b73e624e2dfd4951d3e820411798.tar.gz talos-hostboot-1e21ee6d26e5b73e624e2dfd4951d3e820411798.zip |
Allow stopIPL to be called before istepdispatcher is loaded
Hostboot was crashing because a graceful shutdown was requested
before libistepdisp.so loaded.
Change-Id: Id9206961bcbb72094ff359f26db720b92480f5fb
CQ: SW445973
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68110
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: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/initservice/istepdispatcher')
-rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.C | 30 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.H | 10 |
2 files changed, 6 insertions, 34 deletions
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index a1d00a10f..532199d3a 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -139,7 +139,6 @@ IStepDispatcher::IStepDispatcher() : iv_substepToCompleteBeforeShutdown(0), iv_acceptIstepMessages(true), iv_newGardRecord(false), - iv_stopIpl(false), iv_p9_phbPerstLibLoaded(false) { @@ -497,7 +496,7 @@ errlHndl_t IStepDispatcher::executeAllISteps() substep = 0; while (substep < g_isteps[istep].numitems) { - if( iv_stopIpl == true ) + if( INITSERVICE::isIplStopped() == true ) { #ifdef CONFIG_BMC_IPMI // if we came in here and we are connected to a BMC, then @@ -761,7 +760,7 @@ errlHndl_t IStepDispatcher::executeAllISteps() ERRORLOG::ErrlManager::callFlushErrorLogs(); // Quiesce new isteps, including external requests - (void)setStopIpl(); + INITSERVICE::stopIpl(); #ifdef CONFIG_HANG_ON_MFG_SRC_TERM // Stop the IPL @@ -1787,7 +1786,7 @@ void IStepDispatcher::handleShutdownMsg(msg_t * & io_pMsg) void IStepDispatcher::requestReboot() { // Always stop dispatching isteps before calling for the reboot - (void)setStopIpl(); + INITSERVICE::stopIpl(); // Send a reboot message to the BMC (void)IPMI::initiateReboot(); @@ -1796,7 +1795,7 @@ void IStepDispatcher::requestReboot() void IStepDispatcher::requestPowerOff() { // Always stop dispatching isteps before calling for the power off - (void)setStopIpl(); + INITSERVICE::stopIpl(); // Send a power off message to the BMC (void)IPMI::initiatePowerOff(); @@ -1855,20 +1854,7 @@ void IStepDispatcher::shutdownDuringIpl() } } -// ----------------------------------------------------------------------------- -// IStepDispatcher::setStopIpl() -// ----------------------------------------------------------------------------- -void IStepDispatcher::setStopIpl() -{ - TRACDCOMP(g_trac_initsvc, ENTER_MRK"IStepDispatcher::setStopIpl"); - mutex_lock(&iv_mutex); - iv_stopIpl = true; - mutex_unlock(&iv_mutex); - - TRACDCOMP(g_trac_initsvc, EXIT_MRK"IStepDispatcher::setStopIpl"); - return; -} // ---------------------------------------------------------------------------- // IStepDispatcher::iStepBreakPoint() @@ -2035,7 +2021,7 @@ void IStepDispatcher::handleIStepRequestMsg(msg_t * & io_pMsg) mutex_unlock(&iv_mutex); // If istep dispatching has ceased, prevent new isteps from executing - if(iv_stopIpl == true) + if(INITSERVICE::isIplStopped() == true) { /*@ * @errortype @@ -2718,11 +2704,7 @@ void requestPowerOff() IStepDispatcher::getTheInstance().requestPowerOff(); } #endif -void stopIpl() -{ - // Disable the istep dispatcher - return IStepDispatcher::getTheInstance().setStopIpl(); -} + // ---------------------------------------------------------------------------- // IStepDispatcher::getIstepInfo() diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.H b/src/usr/initservice/istepdispatcher/istepdispatcher.H index bf8950c75..558fc95d1 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.H +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.H @@ -214,12 +214,6 @@ public: void setNewGardRecord(); /** - * @brief This function will set a boolean true which tells the istep - * dispacher to stop executing steps - */ - void setStopIpl(); - - /** * @brief This function will stop the istep dispacher from continuing to * execute steps */ @@ -492,10 +486,6 @@ private: // Instance variable to state if a new gard record was committed bool iv_newGardRecord; - // Instance variable to state if a power off is in progress and - // the istep dispatcher should stop executing steps - bool iv_stopIpl; - // Instance variable to state if the PHB Perst libraries are loaded bool iv_p9_phbPerstLibLoaded; |