summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJay Azurin <jmazurin@us.ibm.com>2014-12-17 17:37:18 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-01-09 16:09:28 -0600
commit478c8d5e45745a6750a78aec6c6317b48d092262 (patch)
tree34a025ff8238af4f8c76a204de5b448f73bc91f4 /src
parent6a8f7095e72dab0877365666f3c45760f3c9d9e6 (diff)
downloadblackbird-hostboot-478c8d5e45745a6750a78aec6c6317b48d092262.tar.gz
blackbird-hostboot-478c8d5e45745a6750a78aec6c6317b48d092262.zip
Support to pause/stop between isteps during IPL
- created ATTR_ISTEP_PAUSE_ENABLE and ATTR_ISTEP_PAUSE_CONFIG attributes - modified IStepDispatcher::doIstep to either pause (seconds) or full stop before istep - tested on HW system using iplErrorInject.sh tool. Task 120084 Change-Id: I41234d9f3656650fd7b554ca20ddfb41ebccc06f RTC: 119363 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14991 Tested-by: Jenkins Server Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.C66
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.H27
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml27
-rw-r--r--src/usr/targeting/common/xmltohb/target_types.xml2
4 files changed, 121 insertions, 1 deletions
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
index 97c6d32be..50aac0a73 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.C
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -595,6 +595,18 @@ errlHndl_t IStepDispatcher::doIstep(uint32_t i_istep,
TARGETING::targetService().getTopLevelTarget(l_pTopLevel);
l_pTopLevel->setAttr<TARGETING::ATTR_RECONFIGURE_LOOP>(0);
+ // Read ATTR_ISTEP_PAUSE_ENABLE attribute
+ TARGETING::ATTR_ISTEP_PAUSE_ENABLE_type l_istepPauseEn =
+ l_pTopLevel->getAttr<TARGETING::ATTR_ISTEP_PAUSE_ENABLE>();
+
+ // If istep pause is enabled then call istepPauseSet
+ if (l_istepPauseEn)
+ {
+ TRACFCOMP(g_trac_initsvc, INFO_MRK"doIstep: Pause before "
+ "istep is enabled");
+ istepPauseSet(i_istep, i_substep);
+ }
+
err = InitService::getTheInstance().executeFn(theStep, NULL);
// flush contTrace immediately after each i_istep/substep returns
@@ -2046,4 +2058,56 @@ void IStepDispatcher::reconfigLoopInduce(TARGETING::Target* i_pDeconfigTarget,
}
#endif // CONFIG_RECONFIG_LOOP_TESTS_ENABLE
+// ----------------------------------------------------------------------------
+// IStepDispatcher::istepPauseSet()
+// ----------------------------------------------------------------------------
+void IStepDispatcher::istepPauseSet(uint8_t i_step, uint8_t i_substep)
+{
+ // Acquire top level handle
+ TARGETING::Target* l_pTopLevel = NULL;
+ TARGETING::targetService().getTopLevelTarget(l_pTopLevel);
+
+ // Read ATTR_ISTEP_PAUSE_CONFIG attribute
+ TARGETING::ATTR_ISTEP_PAUSE_CONFIG_type l_istepPauseCfgAttr =
+ l_pTopLevel->getAttr<TARGETING::ATTR_ISTEP_PAUSE_CONFIG>();
+
+ if(l_istepPauseCfgAttr == 0)
+ {
+ TRACFCOMP(g_trac_initsvc, ERR_MRK"istepPauseSet: "
+ "ATTR_ISTEP_PAUSE_CONFIG not set. Pause will not be applied!");
+ }
+ else
+ {
+ // Overlay ATTR_ISTEP_PAUSE_CONFIG data on top of structure
+ istepPauseConfig_t *l_p_pauseCfg =
+ reinterpret_cast<istepPauseConfig_t *>(&l_istepPauseCfgAttr);
+
+ // Apply pause or full stop if current istep matches requested istep
+ if( (i_step == l_p_pauseCfg->majorStep) &&
+ (i_substep == l_p_pauseCfg->minorStep))
+ {
+ TRACFCOMP(g_trac_initsvc, INFO_MRK"istepPauseSet: "
+ "Applying pause before step: %d.%d, "
+ "Pause duration=%d seconds, Full Stop Enable=0x%02X, "
+ "Breakpoint info tag=0x%08X",
+ l_p_pauseCfg->majorStep,
+ l_p_pauseCfg->minorStep,
+ l_p_pauseCfg->pauseLen,
+ l_p_pauseCfg->fullStopEn,
+ l_p_pauseCfg->bpTagInfo
+ );
+
+ // If full stop is requested then send breakpoint message to FSP
+ // otherwise sleep for the requested number of seconds
+ if(l_p_pauseCfg->fullStopEn)
+ {
+ iStepBreakPoint(l_p_pauseCfg->bpTagInfo);
+ }
+ else
+ {
+ nanosleep(l_p_pauseCfg->pauseLen,0);
+ }
+ }
+ }
+}
} // namespace
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.H b/src/usr/initservice/istepdispatcher/istepdispatcher.H
index f481b4e40..a7c9db633 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.H
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.H
@@ -458,6 +458,33 @@ private:
void reconfigLoopInduce(TARGETING::Target* i_pDeconfigTarget,
errlHndl_t & o_err);
#endif // CONFIG_RECONFIG_LOOP_TESTS_ENABLE
+
+ // istep pause configuration data structure for accessing the settings in
+ // ATTR_ISTEP_PAUSE_CONFIG (64-bit attribute)
+ typedef struct
+ {
+ uint8_t majorStep; // Target istep where pause will be applied
+ uint8_t minorStep;
+ uint8_t pauseLen; // The number of seconds before IPL resumes from
+ // pause state
+ uint8_t fullStopEn; // Enable full stop. When set to 0x01 the IPL stops
+ // indefinately until resumed using an outside
+ // command
+ uint32_t bpTagInfo; // Tag value passed to the iStepBreakPoint
+ // function
+ } istepPauseConfig_t;
+
+ /**
+ * @brief Decodes the ATTR_ISTEP_PAUSE_CONFIG attribute and applies either a
+ * pause or full stop *before* the specified istep.
+ * Whether a pause or full stop is applied depends on the settings in
+ * ATTR_ISTEP_PAUSE_CONFIG which are set via attribute override.
+ *
+ * @param[i] i_step - Current istep
+ * @param[i] i_substep - Current substep
+ */
+ void istepPauseSet(uint8_t i_step, uint8_t i_substep);
+
};
} // namespace
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index b2c403141..297c8b64b 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -15057,6 +15057,33 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript
<readable/>
</attribute>
+<attribute>
+ <id>ISTEP_PAUSE_ENABLE</id>
+ <description>
+ Used to enable pause/stop in between isteps. This attribute is set via
+ attribute override.
+ </description>
+ <simpleType>
+ <uint8_t></uint8_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+</attribute>
+
+<attribute>
+ <id>ISTEP_PAUSE_CONFIG</id>
+ <description>
+ Used to configure the parameters for enabling pause/stop between
+ isteps. This attribute is set via attribute override.
+ </description>
+ <simpleType>
+ <uint64_t></uint64_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+</attribute>
</attributes>
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index 09c70b684..46ac33acb 100644
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -282,6 +282,8 @@
<attribute><id>MSS_DRAMINIT_RESET_DISABLE</id></attribute>
<attribute><id>RECONFIG_LOOP_TESTS</id></attribute>
<attribute><id>RECONFIG_LOOP_TESTS_ENABLE</id></attribute>
+ <attribute><id>ISTEP_PAUSE_ENABLE</id></attribute>
+ <attribute><id>ISTEP_PAUSE_CONFIG</id></attribute>
<!-- IPMI Sensor numbers for reporting system status and info to the BMC -->
<attribute><id>IPMI_SENSORS</id></attribute>
</targetType>
OpenPOWER on IntegriCloud