summaryrefslogtreecommitdiffstats
path: root/src/usr/sbe
diff options
context:
space:
mode:
authorMike Baiocchi <baiocchi@us.ibm.com>2015-02-27 13:55:34 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-03-01 16:37:38 -0600
commit3593853a4323d9ec7de1ad6502e22b3e66af03ae (patch)
treec7b98342535d8275751c7d1225d55e959d3b1ab0 /src/usr/sbe
parent19b0400e8e2123bdfe1231616bfdaf2fc0d1f3e2 (diff)
downloadtalos-hostboot-3593853a4323d9ec7de1ad6502e22b3e66af03ae.tar.gz
talos-hostboot-3593853a4323d9ec7de1ad6502e22b3e66af03ae.zip
Update Shutdown Path for SBE Updates
This change will do the following: -- Flush out a console message to alert the user that the system is shutting down to perform a SBE Update. -- Set the watchdog timer to 15 seconds before shutting down. -- Set the watchdog timer to NO_ACTIONS such that the boot count sensor will handle the re-IPL. Change-Id: I3e8ca07030e50a56cd8bafc514bab036e3fdab96 RTC: 120734 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16045 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/sbe')
-rw-r--r--src/usr/sbe/sbe_resolve_sides.C33
-rw-r--r--src/usr/sbe/sbe_resolve_sides.H4
-rw-r--r--src/usr/sbe/sbe_update.C14
3 files changed, 43 insertions, 8 deletions
diff --git a/src/usr/sbe/sbe_resolve_sides.C b/src/usr/sbe/sbe_resolve_sides.C
index df9958d65..90217b6b0 100644
--- a/src/usr/sbe/sbe_resolve_sides.C
+++ b/src/usr/sbe/sbe_resolve_sides.C
@@ -40,6 +40,7 @@
#include <sys/misc.h>
#include <hwas/common/deconfigGard.H>
#include <initservice/initserviceif.H>
+#include <console/consoleif.H>
#include <config.h>
#include <ipmi/ipmiwatchdog.H>
#include <ipmi/ipmisensor.H>
@@ -285,7 +286,20 @@ errlHndl_t resolveProcessorSbeSeeproms()
l_restartNeeded);
#ifdef CONFIG_BMC_IPMI
- sbePreShutdownIpmiCalls();
+ sbePreShutdownIpmiCalls();
+#endif
+
+#ifdef CONFIG_CONSOLE
+ #ifdef CONFIG_BMC_IPMI
+ CONSOLE::displayf(SBE_COMP_NAME, "System Shutting Down In %d "
+ "Seconds To Perform SBE Update\n",
+ SET_WD_TIMER_IN_SECS);
+ #else
+ CONSOLE::displayf(SBE_COMP_NAME, "System Shutting Down To "
+ "Perform SBE Update\n");
+ #endif
+
+ CONSOLE::flush();
#endif
TRACFCOMP( g_trac_sbe,
@@ -1276,7 +1290,6 @@ errlHndl_t resolveImageHBBaddr(TARGETING::Target* i_target,
void sbePreShutdownIpmiCalls( void )
{
errlHndl_t err = NULL;
-
TRACFCOMP( g_trac_sbe, ENTER_MRK"sbePreShutdownIpmiCalls");
do{
@@ -1328,13 +1341,17 @@ void sbePreShutdownIpmiCalls( void )
}
// @todo RTC 124679 - Remove Once BMC Monitors Shutdown Attention
- // Set Watchdog Timer To 10 seconds
- const uint16_t SET_WD_TIMER_10_SECS = 10;
+ // Set Watchdog Timer before calling doShutdown()
TRACFCOMP( g_trac_sbe,"sbePreShutdownIpmiCalls: "
"Set Watch Dog Timer To %d Seconds",
- SET_WD_TIMER_10_SECS);
-
- err = IPMIWATCHDOG::setWatchDogTimer(SET_WD_TIMER_10_SECS);
+ SET_WD_TIMER_IN_SECS);
+
+ err = IPMIWATCHDOG::setWatchDogTimer(
+ SET_WD_TIMER_IN_SECS, // new time
+ static_cast<uint8_t>
+ (IPMIWATCHDOG::DO_NOT_STOP |
+ IPMIWATCHDOG::BIOS_FRB2), // default
+ IPMIWATCHDOG::NO_ACTIONS); // boot count reset
if(err)
{
TRACFCOMP( g_trac_sbe,
@@ -1342,7 +1359,7 @@ void sbePreShutdownIpmiCalls( void )
"FAIL Setting Watch Dog Timer to %d seconds. "
"Committing Error Log rc=0x%.4X eid=0x%.8X "
"plid=0x%.8X, but continuing shutdown",
- SET_WD_TIMER_10_SECS,
+ SET_WD_TIMER_IN_SECS,
err->reasonCode(),
err->eid(),
err->plid());
diff --git a/src/usr/sbe/sbe_resolve_sides.H b/src/usr/sbe/sbe_resolve_sides.H
index 42f727ae6..d7c1f7c56 100644
--- a/src/usr/sbe/sbe_resolve_sides.H
+++ b/src/usr/sbe/sbe_resolve_sides.H
@@ -50,6 +50,10 @@ namespace SBE
{ EEPROM::SBE_PRIMARY,
EEPROM::SBE_BACKUP };
+ // @todo RTC 124679 - Remove Once BMC Monitors Shutdown Attention
+ // Set Watchdog Timer To 15 seconds before calling doShutdown()
+ const uint16_t SET_WD_TIMER_IN_SECS = 15;
+
/******************************************/
/* Enums */
/******************************************/
diff --git a/src/usr/sbe/sbe_update.C b/src/usr/sbe/sbe_update.C
index 562798b20..a20c1a869 100644
--- a/src/usr/sbe/sbe_update.C
+++ b/src/usr/sbe/sbe_update.C
@@ -46,6 +46,7 @@
#include <sys/msg.h>
#include <hwas/common/deconfigGard.H>
#include <initservice/initserviceif.H>
+#include <console/consoleif.H>
#include <config.h>
#include <sbe/sbeif.H>
#include <sbe/sbereasoncodes.H>
@@ -371,6 +372,19 @@ namespace SBE
sbePreShutdownIpmiCalls();
#endif
+#ifdef CONFIG_CONSOLE
+ #ifdef CONFIG_BMC_IPMI
+ CONSOLE::displayf(SBE_COMP_NAME, "System Shutting Down In %d "
+ "Seconds To Perform SBE Update\n",
+ SET_WD_TIMER_IN_SECS);
+ #else
+ CONSOLE::displayf(SBE_COMP_NAME, "System Shutting Down To "
+ "Perform SBE Update\n");
+ #endif
+
+ CONSOLE::flush();
+#endif
+
TRACFCOMP( g_trac_sbe,
INFO_MRK"updateProcessorSbeSeeproms(): Calling "
"INITSERVICE::doShutdown() with "
OpenPOWER on IntegriCloud