Skip to content

Commit

Permalink
Enable super-long watchdog timer when console traces are enabled
Browse files Browse the repository at this point in the history
When console traces are enabled, the boot takes significantly
longer than usual.  Our standard watchdog timeout of 2 minutes
is not sufficient.

Made the following changes:
- Tied the enablement of the long timeout to the CONFIG flags for
  console traces
- Increased the timeout to 1 hour (from 40 minutes) since this is
  lab only and false positives are the worst...
- Added a couple clarifying traces to make future watchdog debug
  simpler

Change-Id: I92bb0b07cb77a13cb390450999b285f2ad74168d
CQ: SW425407
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58024
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>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
dcrowell77 authored and wghoffa committed May 2, 2018
1 parent 38ec776 commit dc14148
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
14 changes: 5 additions & 9 deletions src/include/usr/ipmi/ipmiwatchdog.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2014,2016 */
/* Contributors Listed Below - COPYRIGHT 2014,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -45,19 +45,15 @@ namespace IPMIWATCHDOG
/**
* @brief the default watchdog countdown setting it to 120 seconds.
*
* @TODO RTC:124499 revisit after performace improvments
*
*/
// The config option CONFIG_BMC_IPMI_LONG_WATCHDOG allows a tester to use a
// watchdog timer that is several times more than what a customer would desire
// to aid in testing only. This option was initially envisioned for use with
// tracelite enabled, which greatly lengthens IPL time causing the watchdog
// timer to timeout. However this option could have other uses, so its name
// is left generic so as not imply the limited use with tracelite alone.
// to aid in testing only. This option will be automatically set whenever any
// kind of console tracing is enabled.
#ifdef CONFIG_BMC_IPMI_LONG_WATCHDOG
const uint16_t DEFAULT_WATCHDOG_COUNTDOWN = 2400;
const uint16_t DEFAULT_WATCHDOG_COUNTDOWN = 3600; //60 minutes
#else
const uint16_t DEFAULT_WATCHDOG_COUNTDOWN = 120;
const uint16_t DEFAULT_WATCHDOG_COUNTDOWN = 120; //2 minutes
#endif

/**
Expand Down
6 changes: 6 additions & 0 deletions src/usr/ipmi/HBconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ config BMC_BT_LPC_IPMI
depends on BMC_IPMI
help
Determines if the BMC uses the LPC bus for block-transfer IPMI traffic

config BMC_IPMI_LONG_WATCHDOG
default y if CONSOLE_OUTPUT_TRACE || CONSOLE_TRACE_LITE
depends on BMC_IPMI
help
Sets watchdog default timer to several times normal for debugging
8 changes: 7 additions & 1 deletion src/usr/ipmi/ipmiwatchdog.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2014,2016 */
/* Contributors Listed Below - COPYRIGHT 2014,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -90,6 +90,11 @@ errlHndl_t setWatchDogTimer( const uint16_t i_countdown_secs,
data[4] = init_countdown_lsb; // byte 5 initial countdown timer LSByte
data[5] = init_countdown_msb; // byte 6 initial countdown timer MSByte

IPMI_TRAC( "setWatchDogTimer : sec=%d, use=%d, act=%d, clr=%d",
i_countdown_secs,
i_timer_use,
i_timer_action,
i_timer_clr_flag );
return IPMI::send(IPMI::set_watchdog(), len, data);

}
Expand All @@ -107,6 +112,7 @@ errlHndl_t resetWatchDogTimer()

do
{
IPMI_TRAC( "resetWatchDogTimer" );

// Don't worry about the return just send the msg over
// If there is an error during the reset
Expand Down

0 comments on commit dc14148

Please sign in to comment.