summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-04-14 15:00:23 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-04-17 09:19:12 -0400
commitd76f1bc4576fbe04a51c5ba45f52b01e0cea6006 (patch)
tree1759c20743664802b4acc056884bd6f16553da29 /src/usr
parent6677ffcbda04c73a7d3ed1e651e3394c8218e503 (diff)
downloadtalos-hostboot-d76f1bc4576fbe04a51c5ba45f52b01e0cea6006.tar.gz
talos-hostboot-d76f1bc4576fbe04a51c5ba45f52b01e0cea6006.zip
More istep debug output
Write current istep out to mbox scratch reg 5 Print istep out to simics console Change-Id: I14d8a9afba12b627a0b1880e0818b5b16f317d7c RTC: 171748 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39292 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Dean Sanner <dsanner@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.C64
1 files changed, 48 insertions, 16 deletions
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
index 91306a765..942c594bf 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.C
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
@@ -73,6 +73,8 @@
#include <initservice/bootconfigif.H>
#include <trace/trace.H>
+#include <util/utilmbox_scratch.H>
+
namespace ISTEPS_TRACE
{
@@ -856,6 +858,16 @@ errlHndl_t IStepDispatcher::doIstep(uint32_t i_istep,
o_doReconfig = true;
}
+
+ //--- Mark we have finished the istep in the scratch reg
+ SPLESS::MboxScratch5_HB_t l_scratch5;
+ l_scratch5.magic = SPLESS::ISTEP_PROGRESS_MAGIC;
+ l_scratch5.stepFinish = 1;
+ l_scratch5.majorStep = iv_curIStep;
+ l_scratch5.minorStep = iv_curSubStep;
+ Util::writeScratchReg( SPLESS::MBOX_SCRATCH_REG5,
+ l_scratch5.data32 );
+
TRACFCOMP(g_trac_initsvc, EXIT_MRK"doIstep: step %d, substep %d",
i_istep, i_substep);
}
@@ -1877,17 +1889,32 @@ errlHndl_t IStepDispatcher::sendProgressCode(bool i_needsLock)
TRACDCOMP( g_trac_initsvc,ENTER_MRK"IStepDispatcher::sendProgressCode()");
errlHndl_t err = NULL;
- // Put in rolling bit RTC: 84794
- // If we send this multiple times, we may need to eliminate the console
- // write on subsequent. RTC: 84794
+ //--- Display istep in Simics console
+ MAGIC_INST_PRINT_ISTEP( iv_curIStep, iv_curSubStep );
+
+
+ //--- Save step to a scratch reg
+ SPLESS::MboxScratch5_HB_t l_scratch5;
+ l_scratch5.magic = SPLESS::ISTEP_PROGRESS_MAGIC;
+ l_scratch5.stepStart = 1;
+ l_scratch5.majorStep = iv_curIStep;
+ l_scratch5.minorStep = iv_curSubStep;
+ Util::writeScratchReg( SPLESS::MBOX_SCRATCH_REG5,
+ l_scratch5.data32 );
+
+
+ //--- Display step on serial console
#ifdef CONFIG_CONSOLE_OUTPUT_PROGRESS
+ // Note If we ever send progress codes multiple times, we may need to
+ // eliminate the console write on subsequent.
CONSOLE::displayf(NULL, "ISTEP %2d.%2d", iv_curIStep, iv_curSubStep);
CONSOLE::flush();
#endif
+
+ //--- Reset the watchdog before every istep
#ifdef CONFIG_BMC_IPMI
- //Reset the watchdog before every istep
errlHndl_t err_ipmi = IPMIWATCHDOG::resetWatchDogTimer();
if(err_ipmi)
@@ -1897,22 +1924,27 @@ errlHndl_t IStepDispatcher::sendProgressCode(bool i_needsLock)
err_ipmi->collectTrace("INITSVC", 1024);
errlCommit(err_ipmi, INITSVC_COMP_ID );
}
-
#endif
- msg_t * myMsg = msg_allocate();
- myMsg->type = IPL_PROGRESS_CODE;
- myMsg->data[0] = iv_curIStep;
- myMsg->data[1] = iv_curSubStep;
- myMsg->extra_data = NULL;
- err = MBOX::send(HWSVRQ, myMsg);
- if (err && err->sev() == ERRORLOG::ERRL_SEV_INFORMATIONAL)
+
+ //--- Send the progress code to the FSP
+ if( iv_spBaseServicesEnabled )
{
- err->setSev(ERRORLOG::ERRL_SEV_UNRECOVERABLE);
+ msg_t * myMsg = msg_allocate();
+ myMsg->type = IPL_PROGRESS_CODE;
+ myMsg->data[0] = iv_curIStep;
+ myMsg->data[1] = iv_curSubStep;
+ myMsg->extra_data = NULL;
+ err = MBOX::send(HWSVRQ, myMsg);
+ if (err && err->sev() == ERRORLOG::ERRL_SEV_INFORMATIONAL)
+ {
+ err->setSev(ERRORLOG::ERRL_SEV_UNRECOVERABLE);
+ }
+ clock_gettime(CLOCK_MONOTONIC, &iv_lastProgressMsgTime);
+ TRACFCOMP( g_trac_initsvc,INFO_MRK"Progress Code %d.%d Sent",
+ myMsg->data[0],myMsg->data[1]);
}
- clock_gettime(CLOCK_MONOTONIC, &iv_lastProgressMsgTime);
- TRACFCOMP( g_trac_initsvc,INFO_MRK"Progress Code %d.%d Sent",
- myMsg->data[0],myMsg->data[1]);
+
TRACDCOMP( g_trac_initsvc,EXIT_MRK"IStepDispatcher::sendProgressCode()" );
if (i_needsLock)
OpenPOWER on IntegriCloud