From afa921d1c9a2930573761fe34525819c6b3cd898 Mon Sep 17 00:00:00 2001 From: Jay Azurin Date: Tue, 14 Jul 2015 17:47:12 -0500 Subject: 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 Reviewed-by: WILLIAM G. HOFFA Reviewed-by: A. Patrick Williams III --- .../initservice/istepdispatcher/istepdispatcher.C | 36 +++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'src') 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(&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 + (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 + } } } -- cgit v1.2.1