diff options
author | Christian Geddes <crgeddes@us.ibm.com> | 2018-01-26 09:43:22 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-01-30 11:48:32 -0500 |
commit | aff61dd84b01d3aff4dbaa3e32a55c988539266e (patch) | |
tree | f88884c89a3f251ac1b5d4288b8d2921a8976746 /src/usr | |
parent | 9bfb2013af399c316891e005ca0fb8b417deffb3 (diff) | |
download | talos-hostboot-aff61dd84b01d3aff4dbaa3e32a55c988539266e.tar.gz talos-hostboot-aff61dd84b01d3aff4dbaa3e32a55c988539266e.zip |
Add sbe_retry_handler to FIFO fail path
In the event of a FIFO communication failure w/ SBE, hostboot wants to
run the sbe_retry_handler in order to collect as much FFDC as possible.
We were missing support for this before this commit. This commit also adds
support for the sbe_retry_handler to use the Secure Debug Bit and the
unsecure mode bit for the p9_extract_rc hwp.
Change-Id: I171abd89ccf4e78ffcc7c1190b58af3b11846362
CQ:SW395356
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52702
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@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: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: Elizabeth K. Liner <eliner@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/sbeio/sbe_fifodd.C | 31 | ||||
-rw-r--r-- | src/usr/sbeio/sbe_retry_handler.C | 37 |
2 files changed, 62 insertions, 6 deletions
diff --git a/src/usr/sbeio/sbe_fifodd.C b/src/usr/sbeio/sbe_fifodd.C index 9aad5cd65..50dbd880d 100644 --- a/src/usr/sbeio/sbe_fifodd.C +++ b/src/usr/sbeio/sbe_fifodd.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -47,6 +47,7 @@ #include <set_sbe_error.H> #include <sbeio/sbe_sp_intf.H> #include <xscom/piberror.H> +#include <sbeio/sbe_retry_handler.H> extern trace_desc_t* g_trac_sbeio; @@ -132,7 +133,7 @@ errlHndl_t SbeFifo::performFifoChipOp(TARGETING::Target * i_target, mutex_unlock(&l_fifoOpMux); - if( errl && (SBEIO_COMP_ID == errl->moduleId()) ) + if( errl && (SBEIO_FIFO == errl->moduleId()) ) { SBE_TRACF( "Forcing shutdown for FSP to collect FFDC" ); @@ -691,6 +692,32 @@ errlHndl_t SbeFifo::waitDnFifoReady(TARGETING::Target * i_target, HWAS::NO_DECONFIG, HWAS::GARD_NULL ); + //It is likely that the SBE is in a failed state so set up retry handler + SbeRetryHandler l_SBEobj = SbeRetryHandler( + SbeRetryHandler::SBE_MODE_OF_OPERATION::INFORMATIONAL_ONLY); + + // Look at the scomSwitch attribute to tell what types + // of scoms are going to be used. If the SMP is not yet up then we + // will still be using SbeScoms , this uses the fifo path which + // is currently blocked by the current hwp invoke we failed on. + // In this case we need to switch to use the FSI scom path. + // If SMP is up and xscoms are being used we can skip this step + TARGETING::ScomSwitches l_switches = + i_target->getAttr<TARGETING::ATTR_SCOM_SWITCHES>(); + if(!l_switches.useXscom) + { + l_switches.useSbeScom = 0; + l_switches.useFsiScom = 1; + i_target->setAttr<TARGETING::ATTR_SCOM_SWITCHES>(l_switches); + } + + l_SBEobj.main_sbe_handler(i_target); + + if(l_SBEobj.getPLID()) + { + //tie the error from the sbe retry handler to this error + errl->plid(l_SBEobj.getPLID()); + } errl->collectTrace(SBEIO_COMP_NAME); break; } diff --git a/src/usr/sbeio/sbe_retry_handler.C b/src/usr/sbeio/sbe_retry_handler.C index 9011b1a67..f224d8f6b 100644 --- a/src/usr/sbeio/sbe_retry_handler.C +++ b/src/usr/sbeio/sbe_retry_handler.C @@ -59,6 +59,7 @@ #include <sbeio/sbe_ffdc_parser.H> #include <sbeio/sbeioreasoncodes.H> #include <sbeio/sbe_retry_handler.H> +#include <secureboot/service.H> #include <devicefw/driverif.H> @@ -88,7 +89,9 @@ SbeRetryHandler::SbeRetryHandler(SBE_MODE_OF_OPERATION i_sbeMode) SbeRetryHandler::SbeRetryHandler(SBE_MODE_OF_OPERATION i_sbeMode, uint32_t i_plid) -: iv_sbeRestarted(false) +: iv_useSDB(false) +, iv_secureModeDisabled(!SECUREBOOT::enabled()) +, iv_sbeRestarted(false) , iv_sbeSide(0) , iv_errorLogPLID(0) , iv_callerErrorLogPLID(i_plid) @@ -120,6 +123,11 @@ void SbeRetryHandler::main_sbe_handler( TARGETING::Target * i_target ) { errlHndl_t l_errl = NULL; + if(!i_target->getAttr<TARGETING::ATTR_SCOM_SWITCHES>().useXscom) + { + this->iv_useSDB = true; + } + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_fapi2ProcTarget( const_cast<TARGETING::Target*> (i_target)); @@ -292,7 +300,7 @@ void SbeRetryHandler::main_sbe_handler( TARGETING::Target * i_target ) // 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->sbe_boot_fail_handler(i_target, true); // pass true to have log show up this->iv_currentSBEState = SBE_FAILED_TO_BOOT; } @@ -803,11 +811,20 @@ bool SbeRetryHandler::sbe_get_ffdc_handler(TARGETING::Target * i_target) return l_flowCtrl; } +//By default we want to call the 2 param version of the func w/ "true" +//passed in to tell the function we want to hide the mandatory errlog bool SbeRetryHandler::sbe_boot_fail_handler(TARGETING::Target * i_target) { + return SbeRetryHandler::sbe_boot_fail_handler(i_target, false); +} + +bool SbeRetryHandler::sbe_boot_fail_handler(TARGETING::Target * i_target, + bool i_exposeLog) +{ SBE_TRACF(ENTER_MRK "sbe_boot_fail_handler()"); errlHndl_t l_errl = nullptr; + fapi2::ReturnCode l_rc; bool o_needRetry = false; SBE_TRACF("SBE 0x%.8X never started, sbeReg=0x%.8X", @@ -840,6 +857,12 @@ bool SbeRetryHandler::sbe_boot_fail_handler(TARGETING::Target * i_target) l_errl->plid(iv_callerErrorLogPLID); } + if(i_exposeLog) + { + l_errl->setSev(ERRORLOG::ERRL_SEV_PREDICTIVE); + + } + // Commit error and continue, this is not terminating since // we can still at least boot with master proc errlCommit(l_errl,ISTEP_COMP_ID); @@ -852,8 +875,14 @@ bool SbeRetryHandler::sbe_boot_fail_handler(TARGETING::Target * i_target) P9_EXTRACT_SBE_RC::RETURN_ACTION l_ret = P9_EXTRACT_SBE_RC::REIPL_UPD_SEEPROM; - FAPI_INVOKE_HWP(l_errl, p9_extract_sbe_rc, - l_fapi2ProcTarget, l_ret); + + //Note that we are calling this while we are already inside + //of a FAPI_INVOKE_HWP call. This might cause issue w/ current_err + //but unsure how to get around it. + FAPI_EXEC_HWP(l_rc, p9_extract_sbe_rc, l_fapi2ProcTarget, + l_ret, iv_useSDB, iv_secureModeDisabled); + + l_errl = rcToErrl(l_rc, ERRORLOG::ERRL_SEV_UNRECOVERABLE); this->iv_currentAction = l_ret; if(this->iv_currentAction != P9_EXTRACT_SBE_RC::ERROR_RECOVERED) |