summaryrefslogtreecommitdiffstats
path: root/src/usr/initservice/baseinitsvc
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2018-10-29 11:35:35 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-11-02 17:00:51 -0500
commit1e21ee6d26e5b73e624e2dfd4951d3e820411798 (patch)
tree1698f19126089849cf4c82acb9faa3e31cf54ecc /src/usr/initservice/baseinitsvc
parent25102e0add227ca3bd781fe33cb8fba8d65394c3 (diff)
downloadblackbird-hostboot-1e21ee6d26e5b73e624e2dfd4951d3e820411798.tar.gz
blackbird-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/baseinitsvc')
-rw-r--r--src/usr/initservice/baseinitsvc/initservice.C24
-rw-r--r--src/usr/initservice/baseinitsvc/initservice.H19
2 files changed, 43 insertions, 0 deletions
diff --git a/src/usr/initservice/baseinitsvc/initservice.C b/src/usr/initservice/baseinitsvc/initservice.C
index 8b718716e..33cc46419 100644
--- a/src/usr/initservice/baseinitsvc/initservice.C
+++ b/src/usr/initservice/baseinitsvc/initservice.C
@@ -626,6 +626,7 @@ InitService& InitService::getTheInstance( )
InitService::InitService( ) :
iv_shutdownInProgress(false),
+ iv_stopIPL(false),
iv_worst_status(false),
iv_iStep( 0 ),
iv_iSubStep( 0 )
@@ -718,6 +719,29 @@ bool InitService::_setShutdownStatus(
return first;
}
+// External call to stop the IPL
+void stopIpl()
+{
+ // Set the flag to disable istep dispatcher
+ Singleton<InitService>::instance().stopIpl();
+}
+
+void InitService::stopIpl()
+{
+ iv_stopIPL = true;
+}
+
+// External call to grab the stopIpl status
+bool isIplStopped()
+{
+ return Singleton<InitService>::instance().isIplStopped();
+}
+
+bool InitService::isIplStopped()
+{
+ return iv_stopIPL;
+}
+
void doShutdown(uint64_t i_status,
bool i_inBackground,
uint64_t i_payload_base,
diff --git a/src/usr/initservice/baseinitsvc/initservice.H b/src/usr/initservice/baseinitsvc/initservice.H
index 356b4b8f8..43f5d9b2e 100644
--- a/src/usr/initservice/baseinitsvc/initservice.H
+++ b/src/usr/initservice/baseinitsvc/initservice.H
@@ -252,6 +252,23 @@ public:
uint64_t i_masterHBInstance = THIS_NODE_NO_PAYLOAD,
uint32_t i_error_info = 0);
+ /**
+ * @brief Set flag to stop the execution of IPL isteps
+ *
+ * @note: See the API documentation @
+ * src/include/usr/initservice/initserviceif.H
+ */
+ void stopIpl();
+
+ /**
+ * @brief Check if the execution of isteps should stop
+ * @return true = IPL's istep execution is stopped
+ *
+ * @note: See the API documentation @
+ * src/include/usr/initservice/initserviceif.H
+ */
+ bool isIplStopped();
+
protected:
/**
@@ -323,6 +340,7 @@ private:
uint64_t i_masterHBInstance = 0xffffffffffffffffull,
uint32_t i_error_info = 0);
+
/**
* Check and load module associated with this task or function
* if necessary.
@@ -367,6 +385,7 @@ private:
mutex_t iv_registryMutex;
bool iv_shutdownInProgress;
+ bool iv_stopIPL; // flag states if istep execution is stopped
// Worst shutdown status accumulated during shutdown processing
uint64_t iv_worst_status;
OpenPOWER on IntegriCloud