summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJay Azurin <jmazurin@us.ibm.com>2015-07-14 17:47:12 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-08-24 22:44:55 -0500
commitafa921d1c9a2930573761fe34525819c6b3cd898 (patch)
treee29b041e9b7fff602df7ffe25d81b94753d36e34 /src
parentf244d281fa77828bb3d82d97e67f0aabf64315b5 (diff)
downloadtalos-hostboot-afa921d1c9a2930573761fe34525819c6b3cd898.tar.gz
talos-hostboot-afa921d1c9a2930573761fe34525819c6b3cd898.zip
disable watchdog timer when using istep pause
Disables the watchdog timer while in istep pause mode. This prevents the system from shutting down due to a watchdog timer timeout. Change-Id: Ia4c9b30ee71457d48f314b45b8a769a5c8a0c38b RTC:127061 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19090 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> 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.C36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
index 76daa0aab..b691443db 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.C
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
@@ -2197,7 +2197,7 @@ void IStepDispatcher::istepPauseSet(uint8_t i_step, uint8_t i_substep)
istepPauseConfig_t *l_p_pauseCfg =
reinterpret_cast<istepPauseConfig_t *>(&l_istepPauseCfgAttr);
- // Apply pause or full stop if current istep matches requested istep
+ // Apply pause only if current istep matches requested istep
if( (i_step == l_p_pauseCfg->majorStep) &&
(i_substep == l_p_pauseCfg->minorStep))
{
@@ -2212,6 +2212,24 @@ void IStepDispatcher::istepPauseSet(uint8_t i_step, uint8_t i_substep)
l_p_pauseCfg->bpTagInfo
);
+ // Disable watchdog action to prevent the system from shutting down
+#ifdef CONFIG_BMC_IPMI
+ errlHndl_t err_ipmi = IPMIWATCHDOG::setWatchDogTimer(
+ IPMIWATCHDOG::DEFAULT_WATCHDOG_COUNTDOWN,
+ static_cast<uint8_t>
+ (IPMIWATCHDOG::DO_NOT_STOP |
+ IPMIWATCHDOG::BIOS_FRB2), // default
+ IPMIWATCHDOG::NO_ACTIONS); // do nothing when
+ // timeout occurs
+ if(err_ipmi)
+ {
+ TRACFCOMP(g_trac_initsvc,
+ "init: ERROR: Failed to disable IPMI watchdog");
+ err_ipmi->collectTrace("INITSVC", 1024);
+ errlCommit(err_ipmi, INITSVC_COMP_ID );
+
+ }
+#endif
// If full stop is requested then send breakpoint message to FSP.
// This stop can be resumed via external command from FSP.
if(l_p_pauseCfg->fullStopEn)
@@ -2244,6 +2262,22 @@ void IStepDispatcher::istepPauseSet(uint8_t i_step, uint8_t i_substep)
{
nanosleep(l_p_pauseCfg->pauseLen,0);
}
+
+#ifdef CONFIG_BMC_IPMI
+ // Re-enable the watchdog timer with default settings
+ err_ipmi = IPMIWATCHDOG::setWatchDogTimer(
+ IPMIWATCHDOG::DEFAULT_WATCHDOG_COUNTDOWN);
+
+ if(err_ipmi)
+ {
+ TRACFCOMP(g_trac_initsvc,
+ "init: ERROR: Set IPMI watchdog Failed");
+ err_ipmi->collectTrace("INITSVC", 1024);
+ errlCommit(err_ipmi, INITSVC_COMP_ID );
+
+ }
+#endif
+
}
}
}
OpenPOWER on IntegriCloud