summaryrefslogtreecommitdiffstats
path: root/src/usr/sbeio
diff options
context:
space:
mode:
authorElizabeth Liner <eliner@us.ibm.com>2017-12-08 11:23:05 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-12-20 21:38:16 -0500
commita334e5aa3f11fe4f4657ba89139ac0a543845af1 (patch)
tree2f1fe358ecd4a76b8e08a2addc6814553217b20a /src/usr/sbeio
parentc16744bed5254395d28c188e1571f0846c7f2afa (diff)
downloadtalos-hostboot-a334e5aa3f11fe4f4657ba89139ac0a543845af1.tar.gz
talos-hostboot-a334e5aa3f11fe4f4657ba89139ac0a543845af1.zip
Add in a check in the PSU error logging for SBE failure
If there is an error in the PSU, and there is no FFDC, there is probably something wrong with the SBE. Since there is new support to attempt an SBE reboot if there's an error, we want to add that functionality to the PSU flow as well. Change-Id: I8203193b49caaf640962e181a814df83c0760ff4 RTC:178801 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46641 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/sbeio')
-rw-r--r--src/usr/sbeio/sbe_psudd.C111
-rw-r--r--src/usr/sbeio/sbe_retry_handler.C232
-rw-r--r--src/usr/sbeio/test/sbe_retry_handler_test.H107
3 files changed, 164 insertions, 286 deletions
diff --git a/src/usr/sbeio/sbe_psudd.C b/src/usr/sbeio/sbe_psudd.C
index 10fbc7a8a..fcbc95d5b 100644
--- a/src/usr/sbeio/sbe_psudd.C
+++ b/src/usr/sbeio/sbe_psudd.C
@@ -48,6 +48,7 @@
#include <fapi2/plat_hwp_invoker.H>
#include <p9_extract_sbe_rc.H>
#include <errl/errludlogregister.H>
+#include <sbeio/sbe_retry_handler.H>
trace_desc_t* g_trac_sbeio;
TRAC_INIT(&g_trac_sbeio, SBEIO_COMP_NAME, 6*KILOBYTE, TRACE::BUFFER_SLOW);
@@ -539,92 +540,54 @@ errlHndl_t SbePsu::pollForPsuComplete(TARGETING::Target * i_target,
}
psuResponse* l_resp = reinterpret_cast<psuResponse*>(l_respRegs);
-
- SBE_TRACF(ERR_MRK "pollForPsuComplete: "
- "timeout waiting for PSU request to complete"
- ": doorbell=%.8X, mbox4=%.16llX",
- l_data, l_respRegs[0]);
-
- // Look for a hardware failure first
- const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
- l_fapiTarg(i_target);
- P9_EXTRACT_SBE_RC::RETURN_ACTION l_rcAction =
- P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION;
- FAPI_INVOKE_HWP( l_errl, p9_extract_sbe_rc,
- l_fapiTarg, l_rcAction );
- if( l_rcAction != P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION )
- {
- // saw an error on the sbe itself, use the error we
- // got back from the HWP
- }
- else
+ if(!(l_resp->primaryStatus & SBE_PRI_FFDC_ERROR))
{
- // got an error in the attempt to find a hw fail, just
- // commit it as info
- if( l_errl )
- {
- l_errl->setSev( ERRORLOG::ERRL_SEV_INFORMATIONAL );
- ERRORLOG::errlCommit( l_errl, SBEIO_COMP_ID );
- l_errl = nullptr;
- }
-
- // we don't know what caused the timeout, make a generic log
+ // Create an informational error
/*@
* @errortype
- * @moduleid SBEIO_PSU
- * @reasoncode SBEIO_PSU_RESPONSE_TIMEOUT
+ * @moduleid SBEIO_PSU
+ * @reasoncode SBEIO_PSU_FFDC_MISSING
* @userdata1[00:15] Primary Status in mbox4
* @userdata1[16:31] Sequence Id in mbox4
* @userdata1[32:63] Processor Target
- * @userdata2 Failing Request
- * @devdesc Timeout waiting for PSU command to complete
- * @custdesc Firmware error communicating with boot device
+ * @userdata2 Failing Request
+ * @devdesc Timeout waiting for PSU command to complete
+ * @custdesc Firmware error communicating with boot device
*/
- l_errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE,
- SBEIO_PSU,
- SBEIO_PSU_RESPONSE_TIMEOUT,
- TWO_UINT32_TO_UINT64(
- TWO_UINT16_TO_UINT32(
- l_resp->primaryStatus,
- l_resp->secondaryStatus),
- TARGETING::get_huid(i_target)),
- i_pPsuRequest->mbxReg0);
- // Code should be okay so callout hardware
- l_errl->addHwCallout( i_target,
- HWAS::SRCI_PRIORITY_HIGH,
- HWAS::NO_DECONFIG,
- HWAS::GARD_NULL );
- }
-
- // log the failing proc as FFDC
- ErrlUserDetailsTarget(i_target).addToLog(l_errl);
-
- // check for any FFDC logged by the SBE itself
- void * l_ffdcPkg = findFFDCBufferByTarget(i_target);
- if(l_ffdcPkg != NULL)
- {
- SbeFFDCParser * l_ffdc_parser = new SbeFFDCParser();
- l_ffdc_parser->parseFFDCData(l_ffdcPkg);
- uint8_t l_pkgs = l_ffdc_parser->getTotalPackages();
- uint8_t i;
- for(i = 0; i < l_pkgs; i++)
+ l_errl = new ErrlEntry(ERRL_SEV_PREDICTIVE,
+ SBEIO_PSU,
+ SBEIO_PSU_FFDC_MISSING,
+ TWO_UINT32_TO_UINT64(
+ TWO_UINT16_TO_UINT32(
+ l_resp->primaryStatus,
+ l_resp->secondaryStatus),
+ TARGETING::get_huid(i_target)),
+ i_pPsuRequest->mbxReg0);
+
+ // If the FFDC is empty, we need to check the state of the SBE
+ // and then, handle the SBE value, and potentionally try
+ // to restart the SBE
+ SbeRetryHandler l_SBEobj = SbeRetryHandler(
+ SbeRetryHandler::SBE_MODE_OF_OPERATION::
+ INFORMATIONAL_ONLY);
+
+ l_SBEobj.main_sbe_handler(i_target);
+
+ if(l_SBEobj.getPLID() != NULL)
{
- l_errl->addFFDC( SBEIO_COMP_ID,
- l_ffdc_parser->getFFDCPackage(i),
- l_ffdc_parser->getPackageLength(i),
- 0,
- SBEIO_UDT_PARAMETERS,
- false );
+ // If there is not an unrecovered error, we want to tie
+ // the error from the sbe retry handler to this error.
+ l_errl->plid(l_SBEobj.getPLID());
+ l_errl->setSev(ERRL_SEV_UNRECOVERABLE);
}
- delete l_ffdc_parser;
- l_ffdc_parser = nullptr;
- }
- // save the mbox status regs as FFDC
- l_respRegsFFDC.addToLog(l_errl);
+ // log the failing proc as FFDC
+ ErrlUserDetailsTarget(i_target).addToLog(l_errl);
+ l_respRegsFFDC.addToLog(l_errl);
+ l_errl->collectTrace(SBEIO_COMP_NAME);
+ }
- l_errl->collectTrace(SBEIO_COMP_NAME);
MAGIC_INST_GET_SBE_TRACES(
i_target->getAttr<TARGETING::ATTR_POSITION>(),
SBEIO_PSU_RESPONSE_TIMEOUT);
diff --git a/src/usr/sbeio/sbe_retry_handler.C b/src/usr/sbeio/sbe_retry_handler.C
index 7209215b2..41700f343 100644
--- a/src/usr/sbeio/sbe_retry_handler.C
+++ b/src/usr/sbeio/sbe_retry_handler.C
@@ -79,24 +79,17 @@ using namespace ERRORLOG;
namespace SBEIO
{
-/**
- * @brief Static instance function
- */
-SbeRetryHandler& SbeRetryHandler::getInstance()
-{
- return Singleton<SbeRetryHandler>::instance();
-}
-
-SbeRetryHandler::SbeRetryHandler()
+SbeRetryHandler::SbeRetryHandler(SBE_MODE_OF_OPERATION i_sbeMode)
: iv_sbeRestarted(false)
, iv_sbeSide(0)
-, iv_sbeErrorLogged(false)
, iv_switchSidesCount(0)
, iv_currentSBEState(SBE_REG_RETURN::SBE_FAILED_TO_BOOT)
, iv_retriggeredMain(false)
{
SBE_TRACF(ENTER_MRK "SbeRetryHandler::SbeRetryHandler()");
+ this->iv_sbeMode = i_sbeMode;
+
SBE_TRACF(EXIT_MRK "SbeRetryHandler::SbeRetryHandler()");
}
@@ -105,8 +98,7 @@ SbeRetryHandler::~SbeRetryHandler()
}
-void SbeRetryHandler::main_sbe_handler( TARGETING::Target * i_target,
- bool i_actionSet)
+void SbeRetryHandler::main_sbe_handler( TARGETING::Target * i_target )
{
SBE_TRACF(ENTER_MRK "main_sbe_handler()");
@@ -119,124 +111,139 @@ void SbeRetryHandler::main_sbe_handler( TARGETING::Target * i_target,
bool l_retry = false;
- // Check the sbe register
- this->get_sbe_reg(i_target);
-
- if( (this->iv_sbeRegister.currState != SBE_STATE_RUNTIME) &&
- !(i_actionSet))
- {
- // return, false if no boot is needed, true if boot is needed.
- l_retry = this->sbe_boot_fail_handler(i_target);
- }
- else if(i_actionSet)
- {
- l_retry = true;
- }
-
- while((this->iv_sbeRegister.currState != SBE_STATE_RUNTIME) && l_retry)
+ if(this->iv_sbeMode != INFORMATIONAL_ONLY)
{
+ this->get_sbe_reg(i_target);
- SBE_TRACF("main_sbe_handler(): current SBE state is %d, retry is %d "
- "current SBE action is %d",
- this->iv_sbeRegister.currState,
- l_retry, this->iv_currentAction);
-
- /*@
- * @errortype
- * @severity ERRORLOG::ERRL_SEV_INFORMATIONAL
- * @moduleid SBEIO_EXTRACT_RC_HANDLER
- * @reasoncode SBEIO_EXTRACT_RC_ERROR
- * @userdata1 HUID of proc that had the SBE timeout
- * @userdata2 SBE failing code
- *
- * @devdesc SBE did not start, this function is looking at
- * the error to determine next course of action
- *
- * @custdesc The SBE did not start, we will attempt a reboot
- * if possible
- */
- l_errl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
- SBEIO_EXTRACT_RC_HANDLER,
- SBEIO_EXTRACT_RC_ERROR,
- TARGETING::get_huid(i_target),
- this->iv_currentAction);
+ if( (this->iv_sbeRegister.currState != SBE_STATE_RUNTIME) &&
+ !(this->iv_sbeMode == SBE_ACTION_SET))
+ {
+ // return, false if no boot is needed, true if boot is needed.
+ l_retry = this->sbe_boot_fail_handler(i_target);
+ }
+ else if(this->iv_sbeMode == SBE_ACTION_SET)
+ {
+ l_retry = true;
+ }
- l_errl->collectTrace("ISTEPS_TRACE",256);
+ while((this->iv_sbeRegister.currState != SBE_STATE_RUNTIME) &&
+ l_retry)
+ {
- // Commit error and continue
- errlCommit(l_errl, ISTEP_COMP_ID);
+ SBE_TRACF("main_sbe_handler(): current SBE state is %d, retry "
+ "is %d current SBE action is %d",
+ this->iv_sbeRegister.currState,
+ l_retry, this->iv_currentAction);
- // if no recovery action, fail out.
- if(this->iv_currentAction == P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION)
- {
- // There is no action possible. Gard and Callout the proc
/*@
- * @errortype ERRL_SEV_UNRECOVERABLE
+ * @errortype
+ * @severity ERRORLOG::ERRL_SEV_INFORMATIONAL
* @moduleid SBEIO_EXTRACT_RC_HANDLER
- * @reasoncode SBEIO_NO_RECOVERY_ACTION
- * @userdata1 SBE current error
- * @userdata2 HUID of proc
- * @devdesc There is no recovery action on the SBE.
- * We're garding this proc
+ * @reasoncode SBEIO_EXTRACT_RC_ERROR
+ * @userdata1 HUID of proc that had the SBE timeout
+ * @userdata2 SBE failing code
+ *
+ * @devdesc SBE did not start, this function is looking at
+ * the error to determine next course of action
+ *
+ * @custdesc The SBE did not start, we will attempt a reboot
+ * if possible
*/
l_errl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- SBEIO_EXTRACT_RC_HANDLER,
- SBEIO_NO_RECOVERY_ACTION,
- P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION,
- TARGETING::get_huid(i_target));
- l_errl->collectTrace( "ISTEPS_TRACE", 256);
- l_errl->addHwCallout( i_target,
- HWAS::SRCI_PRIORITY_HIGH,
- HWAS::DECONFIG,
- HWAS::GARD_NULL );
- errlCommit(l_errl, ISTEP_COMP_ID);
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ SBEIO_EXTRACT_RC_HANDLER,
+ SBEIO_EXTRACT_RC_ERROR,
+ TARGETING::get_huid(i_target),
+ this->iv_currentAction);
- SBE_TRACF("main_sbe_handler(): updating return value "
- "to indicate that we have deconfigured the proc");
- this->iv_currentSBEState = SBE_REG_RETURN::PROC_DECONFIG;
- this->iv_sbeErrorLogged = true;
- this->iv_errorLogPLID = l_errl->plid();
+ l_errl->collectTrace("ISTEPS_TRACE",256);
- break;
- }
+ // Commit error and continue
+ errlCommit(l_errl, ISTEP_COMP_ID);
- // if the bkp_seeprom or upd_seeprom, attempt to switch sides.
- // This is also dependent on the iv_switchSideCount.
- if(this->iv_currentAction == P9_EXTRACT_SBE_RC::REIPL_BKP_SEEPROM ||
- this->iv_currentAction == P9_EXTRACT_SBE_RC::REIPL_UPD_SEEPROM)
- {
- l_errl = this->switch_sbe_sides(i_target);
- if(l_errl)
+ // if no recovery action, fail out.
+ if(this->iv_currentAction ==
+ P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION)
{
+ // There is no action possible. Gard and Callout the proc
+ /*@
+ * @errortype ERRL_SEV_UNRECOVERABLE
+ * @moduleid SBEIO_EXTRACT_RC_HANDLER
+ * @reasoncode SBEIO_NO_RECOVERY_ACTION
+ * @userdata1 SBE current error
+ * @userdata2 HUID of proc
+ * @devdesc There is no recovery action on the SBE.
+ * We're garding this proc
+ */
+ l_errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ SBEIO_EXTRACT_RC_HANDLER,
+ SBEIO_NO_RECOVERY_ACTION,
+ P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION,
+ TARGETING::get_huid(i_target));
+ l_errl->collectTrace( "ISTEPS_TRACE", 256);
+ l_errl->addHwCallout( i_target,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::DECONFIG,
+ HWAS::GARD_NULL );
errlCommit(l_errl, ISTEP_COMP_ID);
+
+ SBE_TRACF("main_sbe_handler(): updating return value "
+ "to indicate that we have deconfigured the proc");
+ this->iv_currentSBEState = SBE_REG_RETURN::PROC_DECONFIG;
+ this->iv_errorLogPLID = l_errl->plid();
+
break;
}
- }
- SBE_TRACF("Invoking p9_start_cbs HWP");
- const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
- l_fapi2_proc_target (i_target);
+ // if the bkp_seeprom or upd_seeprom, attempt to switch sides.
+ // This is also dependent on the iv_switchSideCount.
+ if(this->iv_currentAction ==
+ P9_EXTRACT_SBE_RC::REIPL_BKP_SEEPROM ||
+ this->iv_currentAction ==
+ P9_EXTRACT_SBE_RC::REIPL_UPD_SEEPROM)
+ {
+ l_errl = this->switch_sbe_sides(i_target);
+ if(l_errl)
+ {
+ errlCommit(l_errl, ISTEP_COMP_ID);
+ break;
+ }
+ }
- FAPI_INVOKE_HWP(l_errl, p9_start_cbs, l_fapi2_proc_target, true);
- if(l_errl)
- {
- SBE_TRACF("ERROR: call p9_start_cbs, PLID=0x%x", l_errl->plid() );
- l_errl->collectTrace( "ISTEPS_TRACE", 256 );
+ SBE_TRACF("Invoking p9_start_cbs HWP");
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
+ l_fapi2_proc_target (i_target);
- errlCommit( l_errl, ISTEP_COMP_ID);
- }
+ FAPI_INVOKE_HWP(l_errl, p9_start_cbs,
+ l_fapi2_proc_target, true);
+ if(l_errl)
+ {
+ SBE_TRACF("ERROR: call p9_start_cbs, PLID=0x%x",
+ l_errl->plid() );
+ l_errl->collectTrace( "ISTEPS_TRACE", 256 );
- // Get the sbe register
- this->get_sbe_reg(i_target);
+ errlCommit( l_errl, ISTEP_COMP_ID);
+ }
- if( (this->iv_sbeRegister.currState != SBE_STATE_RUNTIME))
- {
- // return, false if no boot is needed, true if boot is needed.
- l_retry = this->sbe_boot_fail_handler(i_target);
+ // Get the sbe register
+ this->get_sbe_reg(i_target);
+
+ if( (this->iv_sbeRegister.currState != SBE_STATE_RUNTIME))
+ {
+ // return, false if no boot is needed.
+ l_retry = this->sbe_boot_fail_handler(i_target);
+ }
}
}
+ else
+ {
+ // In the informational only mode, we just need enough information
+ // to get the SBE RC returned from the HWP. We are running with
+ // the knowledge that the SBE has failed already.
+ this->sbe_boot_fail_handler(i_target);
+ this->iv_currentSBEState = SBE_FAILED_TO_BOOT;
+ }
this->handle_sbe_reg_value(i_target);
@@ -372,7 +379,8 @@ void SbeRetryHandler::handle_sbe_reg_value(TARGETING::Target * i_target)
// to start with a new seeprom before hitting the threshold
this->iv_currentAction =
P9_EXTRACT_SBE_RC::RETURN_ACTION::REIPL_BKP_SEEPROM;
- main_sbe_handler(i_target, true);
+ this->iv_sbeMode = SBE_MODE_OF_OPERATION::SBE_ACTION_SET;
+ main_sbe_handler(i_target);
break;
}
@@ -395,6 +403,7 @@ void SbeRetryHandler::handle_sbe_reg_value(TARGETING::Target * i_target)
// capture the target data in the elog
ERRORLOG::ErrlUserDetailsTarget(i_target).addToLog(l_errl);
+ this->iv_errorLogPLID = l_errl->plid();
// Commit error log
errlCommit( l_errl, HWPF_COMP_ID );
@@ -408,7 +417,7 @@ void SbeRetryHandler::handle_sbe_reg_value(TARGETING::Target * i_target)
// error out, unexpected enum value returned.
//return P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION;
/*@
- * @errortype ERRL_SEV_INFORMATIONAL
+ * @errortype ERRL_SEV_PREDICTIVE
* @moduleid SBEIO_HANDLE_SBE_REG_VALUE
* @reasoncode SBEIO_INCORRECT_FCN_CALL
* @userdata1 HUID of target
@@ -417,7 +426,7 @@ void SbeRetryHandler::handle_sbe_reg_value(TARGETING::Target * i_target)
* there is a new enum that is not handled yet.
*/
l_errl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_SEV_PREDICTIVE,
SBEIO_HANDLE_SBE_REG_VALUE,
SBEIO_INCORRECT_FCN_CALL,
get_huid(i_target),this->iv_currentSBEState);
@@ -668,7 +677,8 @@ bool SbeRetryHandler::sbe_get_ffdc_handler(TARGETING::Target * i_target)
// Handle that action
this->iv_currentAction = l_action;
this->iv_retriggeredMain = true;
- main_sbe_handler(i_target, true);
+ this->iv_sbeMode = SBE_MODE_OF_OPERATION::SBE_ACTION_SET;
+ main_sbe_handler(i_target);
}
// If there are FFDC packages, commit the log
diff --git a/src/usr/sbeio/test/sbe_retry_handler_test.H b/src/usr/sbeio/test/sbe_retry_handler_test.H
index 16e0426c1..bfe6808d7 100644
--- a/src/usr/sbeio/test/sbe_retry_handler_test.H
+++ b/src/usr/sbeio/test/sbe_retry_handler_test.H
@@ -78,9 +78,10 @@ class SbeRetryHandlerTest : public CxxTest::TestSuite
// we are just looking at Slave SBE's
continue;
}
- SbeRetryHandler l_SBEobj = SbeRetryHandler();
+ SbeRetryHandler l_SBEobj = SbeRetryHandler(
+ SbeRetryHandler::SBE_MODE_OF_OPERATION::ATTEMPT_REBOOT);
- l_SBEobj.main_sbe_handler(l_cpu_target, false);
+ l_SBEobj.main_sbe_handler(l_cpu_target);
SBE_TRACF_RHT("testSBEReturns: returned from main_sbe_handler "
"SUCCESS");
@@ -89,53 +90,6 @@ class SbeRetryHandlerTest : public CxxTest::TestSuite
/**
* @brief Call into sbe handler retry on the slave SBE, and ensure that
- * the error class element matches the PLID returned
- *
- * This will not run fully without a slave SBE
- */
- void testErrorMatch(void)
- {
- SBE_TRACF_RHT(ENTER_MRK"testErrorMatch: Testing that the Error "
- "Logged class element matches the PLID class element");
-
- // Get master proc target
- TARGETING::Target* l_pMasterProcTarget = NULL;
- TARGETING::targetService().masterProcChipTargetHandle(
- l_pMasterProcTarget);
-
- // Get a list of all procs
- TARGETING::TargetHandleList l_cpuTargetList;
- getAllChips(l_cpuTargetList, TARGETING::TYPE_PROC);
-
- // Loop through CPU's
- for( const auto & l_cpu_target: l_cpuTargetList)
- {
-
- if(l_cpu_target == l_pMasterProcTarget)
- {
- // we are just looking at Slave SBE's
- continue;
- }
- SbeRetryHandler l_SBEobj = SbeRetryHandler();
-
- l_SBEobj.main_sbe_handler(l_cpu_target, false);
-
- SBE_TRACF_RHT("testErrorMatch: If we get positive on an error "
- "check, there should also be a plid set");
- if( l_SBEobj.getErrorLogged() && (l_SBEobj.getPLID()==NULL) )
- {
- TS_FAIL("testErrorMatch: If an error is logged, we also "
- "need a PLID logged");
- }else if( !(l_SBEobj.getErrorLogged()) && l_SBEobj.getPLID()!=NULL)
- {
- TS_FAIL("testErrorMatch: If an error isn't logged, we "
- "need PLID to be null");
- }
- }
- }
-
- /**
- * @brief Call into sbe handler retry on the slave SBE, and ensure that
* the sbe started class element matches the target attribute
*
* This will not run fully without a slave SBE
@@ -163,9 +117,10 @@ class SbeRetryHandlerTest : public CxxTest::TestSuite
// we are just looking at Slave SBE's
continue;
}
- SbeRetryHandler l_SBEobj = SbeRetryHandler();
+ SbeRetryHandler l_SBEobj = SbeRetryHandler(
+ SbeRetryHandler::SBE_MODE_OF_OPERATION::ATTEMPT_REBOOT);
- l_SBEobj.main_sbe_handler(l_cpu_target, false);
+ l_SBEobj.main_sbe_handler(l_cpu_target);
uint32_t l_sbeStarted = l_cpu_target->getAttr<
TARGETING::ATTR_SBE_IS_STARTED>();
@@ -184,56 +139,6 @@ class SbeRetryHandlerTest : public CxxTest::TestSuite
}
}
- /**
- * @brief Call into sbe handler retry on the slave SBE, and ensure that
- * the sbe class action matches the error returned
- *
- * This will not run fully without a slave SBE
- */
- void testActionErrorMatch(void)
- {
- SBE_TRACF_RHT(ENTER_MRK"testActionErrorMatch: Test that the current "
- "action matches if there was an error returned or not");
-
- // Get master proc target
- TARGETING::Target* l_pMasterProcTarget = NULL;
- TARGETING::targetService().masterProcChipTargetHandle(
- l_pMasterProcTarget);
-
- // Get a list of all procs
- TARGETING::TargetHandleList l_cpuTargetList;
- getAllChips(l_cpuTargetList, TARGETING::TYPE_PROC);
-
- // Loop through CPU's
- for( const auto & l_cpu_target: l_cpuTargetList)
- {
-
- if(l_cpu_target == l_pMasterProcTarget)
- {
- // we are just looking at Slave SBE's
- continue;
- }
- SbeRetryHandler l_SBEobj = SbeRetryHandler();
-
- l_SBEobj.main_sbe_handler(l_cpu_target, false);
-
- if(l_SBEobj.getErrorLogged() && (l_SBEobj.getCurrentAction()!=
- P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION))
- {
- TS_FAIL("testActionErrorMatch: "
- "If we have an error returned, the current action "
- "should be NO_RECOVERY_ACTION");
- }else if(!(l_SBEobj.getErrorLogged()) &&
- (l_SBEobj.getCurrentAction() ==
- P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION))
- {
- TS_FAIL("testActionErrorMatch: "
- "If we do not have an error returned, the current "
- "action should be anything but NO_RECOVERY_ACTION");
- }
- }
- }
-
};
#endif
OpenPOWER on IntegriCloud