diff options
author | Elizabeth Liner <eliner@us.ibm.com> | 2017-05-24 12:51:05 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-06-28 12:42:25 -0400 |
commit | dd4981b4c10a1888302220b24570563fe07de2b0 (patch) | |
tree | a010aa3ea9528137f31b863e9a867c6aa8801345 | |
parent | 866b0279d783506cd381b61080a56752d76835ce (diff) | |
download | talos-hostboot-dd4981b4c10a1888302220b24570563fe07de2b0.tar.gz talos-hostboot-dd4981b4c10a1888302220b24570563fe07de2b0.zip |
sbe_extract_rc_handler SBE conditions details (2/4)
This commit finalizes the different steps for each SBE condition,
whether that's trying again, increasing the error to a more
serious condition, or failing and garding the proc. In most
instances we attempt to restart the SBE through the threshold handler.
Change-Id: I1bd485557f6999a20a1a52c92f06be3df528ca8c
RTC:173809
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41074
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@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: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/include/usr/isteps/istep_reasoncodes.H | 3 | ||||
-rw-r--r-- | src/usr/isteps/istep08/sbe_extract_rc_handler.C | 288 |
2 files changed, 290 insertions, 1 deletions
diff --git a/src/include/usr/isteps/istep_reasoncodes.H b/src/include/usr/isteps/istep_reasoncodes.H index b7f4a6a3a..3741ef112 100644 --- a/src/include/usr/isteps/istep_reasoncodes.H +++ b/src/include/usr/isteps/istep_reasoncodes.H @@ -107,13 +107,14 @@ namespace ISTEP RC_SLAVE_PROC_CBS_CONTROL_READ_FAIL = ISTEP_COMP_ID | 0x27, RC_PROC_SECURITY_STATE_MISMATCH = ISTEP_COMP_ID | 0x28, RC_MIN_HW_CHECK_FAILED = ISTEP_COMP_ID | 0x29, - RC_SBE_BOOTED_UNEXPECTED_SIDE = ISTEP_COMP_ID | 0x2A, + RC_SBE_BOOTED_UNEXPECTED_SIDE_BKP = ISTEP_COMP_ID | 0x2A, RC_SBE_EXTRACT_RC_ERROR = ISTEP_COMP_ID | 0x2B, RC_BOOT_FROM_BKP_SEEPROM = ISTEP_COMP_ID | 0x2C, RC_NO_RECOVERY_ACTION = ISTEP_COMP_ID | 0x2D, RC_INCORRECT_FCN_CALL = ISTEP_COMP_ID | 0x2E, RC_HWSV_COLLECT_SBE_RC = ISTEP_COMP_ID | 0x2F, RC_PROC_EXTRACT_SBE_MAIN_ERROR = ISTEP_COMP_ID | 0x30, + RC_SBE_BOOTED_UNEXPECTED_SIDE_UPD = ISTEP_COMP_ID | 0x31, }; }; diff --git a/src/usr/isteps/istep08/sbe_extract_rc_handler.C b/src/usr/isteps/istep08/sbe_extract_rc_handler.C index 6c267c5e0..6f9e8c4a2 100644 --- a/src/usr/isteps/istep08/sbe_extract_rc_handler.C +++ b/src/usr/isteps/istep08/sbe_extract_rc_handler.C @@ -188,22 +188,310 @@ void proc_extract_sbe_handler( TARGETING::Target * i_target, case P9_EXTRACT_SBE_RC::RESTART_SBE: case P9_EXTRACT_SBE_RC::RESTART_CBS: { + // Note: These two are only going to have the same handling until + // we have runtime handling in place. + + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> + l_fapi2_proc_target (i_target); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running p9_start_cbs HWP on processor target %.8X", + TARGETING::get_huid(i_target)); + + FAPI_INVOKE_HWP(l_errl, p9_start_cbs, l_fapi2_proc_target, true); + if(l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR: call p9_start_cbs, " + "PLID=0x%x", l_errl->plid() ); + l_errl->collectTrace("ISTEPS_TRACE",256); + errlCommit(l_errl, ISTEP_COMP_ID); + + // Get SBE extract rc + P9_EXTRACT_SBE_RC::RETURN_ACTION l_rcAction = + P9_EXTRACT_SBE_RC::REIPL_UPD_SEEPROM; + FAPI_INVOKE_HWP(l_errl, p9_extract_sbe_rc, + l_fapi2_proc_target, l_rcAction); + + if(l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : call p9_extract_sbe_rc, PLID=0x%x", + l_errl->plid()); + + // capture the target data in the elog + ERRORLOG::ErrlUserDetailsTarget(l_fapi2_proc_target). + addToLog( l_errl ); + + // Commit error log + errlCommit( l_errl, HWPF_COMP_ID ); + + break; + } + + uint8_t l_prevError = (i_target)->getAttr< + TARGETING::ATTR_PREVIOUS_SBE_ERROR>(); + (i_target)->setAttr<TARGETING::ATTR_PREVIOUS_SBE_ERROR>( + l_rcAction); + + // Call sbe_threshold handler on the same side + sbe_threshold_handler(true, i_target, l_rcAction, l_prevError); + } + break; } case P9_EXTRACT_SBE_RC::REIPL_BKP_SEEPROM: { + // Log additional error on proc. + /* @ + * @errortype ERRL_SEV_INFORMATIONAL + * @moduleid MOD_SBE_EXTRACT_RC_HANDLER + * @reasoncode RC_BOOT_FROM_BKP_SEEPROM + * @userdata1 SBE return code + * @userdata2 HUID current side + * @devdesc Attempting to boot from backup SEEPROM + */ + l_errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_INFORMATIONAL, + ISTEP::MOD_SBE_EXTRACT_RC_HANDLER, + ISTEP::RC_BOOT_FROM_BKP_SEEPROM, + i_current_error, + get_huid(i_target)); + l_errl->collectTrace("ISTEPS_TRACE",256); + errlCommit(l_errl, ISTEP_COMP_ID); + + // Get the other proc + TARGETING::Target * sys = NULL; + TARGETING::targetService().getTopLevelTarget(sys); + + TARGETING::PredicateCTM predProc(TARGETING::CLASS_CHIP, + TARGETING::TYPE_PROC); + TARGETING::TargetHandleList l_procs; + TARGETING::targetService().getAssociated(l_procs, sys, + TARGETING::TargetService::CHILD, + TARGETING::TargetService::ALL,&predProc); + + for(auto childItr = l_procs.begin(); + childItr != l_procs.end(); ++childItr) + { + if( (*childItr) == i_target) + { + continue; + } + else + { + // Run HWP, but from the other side. + // if it passes make a note that we booted from + // an unexpected side + // if it fails, call the threshold handler + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> + l_fapi2_proc_target((*childItr)); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running p9_start_cbs HWP on processor target %.8X", + TARGETING::get_huid((*childItr))); + + FAPI_INVOKE_HWP(l_errl, p9_start_cbs, + l_fapi2_proc_target, true); + if(l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR: call p9_start_cbs, " + "PLID=0x%x",l_errl->plid() ); + l_errl->collectTrace("ISTEPS_TRACE",256); + errlCommit(l_errl, ISTEP_COMP_ID); + + // Get SBE extract rc + P9_EXTRACT_SBE_RC::RETURN_ACTION l_rcAction = + P9_EXTRACT_SBE_RC::REIPL_UPD_SEEPROM; + FAPI_INVOKE_HWP(l_errl, p9_extract_sbe_rc, + l_fapi2_proc_target, l_rcAction); + + if(l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : call p9_extract_sbe_rc, PLID=0x%x", + l_errl->plid()); + + // capture the target data in the elog + ERRORLOG::ErrlUserDetailsTarget( + l_fapi2_proc_target).addToLog( l_errl ); + + // Commit error log + errlCommit( l_errl, HWPF_COMP_ID ); + + break; + } + + uint8_t l_prevError = (i_target)->getAttr< + TARGETING::ATTR_PREVIOUS_SBE_ERROR>(); + (*childItr)->setAttr< + TARGETING::ATTR_PREVIOUS_SBE_ERROR>(l_rcAction); + + // Call sbe_threshold handler on the other side + sbe_threshold_handler(false, i_target, + l_rcAction, l_prevError); + } + else + { + // Make a note that we booted from an unexpected side + /* @ + * @errortype ERRL_SEV_INFORMATIONAL + * @moduleid MOD_SBE_EXTRACT_RC_HANDLER + * @reasondcode RC_SBE_BOOTED_UNEXPECTED_SIDE_BKP + * @userdata1 0 + * @userdata2 HUID of other (working) proc + * @devdesc SBE booted from unexpected side. + */ + l_errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_INFORMATIONAL, + ISTEP::MOD_SBE_EXTRACT_RC_HANDLER, + ISTEP::RC_SBE_BOOTED_UNEXPECTED_SIDE_BKP, + 0,TARGETING::get_huid(*childItr)); + l_errl->collectTrace("ISTEPS_TRACE",256); + errlCommit(l_errl, ISTEP_COMP_ID); + } + } + } + break; } case P9_EXTRACT_SBE_RC::REIPL_UPD_SEEPROM: { + // Get the other proc + TARGETING::Target * sys = NULL; + TARGETING::targetService().getTopLevelTarget(sys); + + TARGETING::PredicateCTM predProc(TARGETING::CLASS_CHIP, + TARGETING::TYPE_PROC); + TARGETING::TargetHandleList l_procs; + TARGETING::targetService().getAssociated(l_procs, sys, + TARGETING::TargetService::CHILD, + TARGETING::TargetService::ALL,&predProc); + + for(auto childItr = l_procs.begin(); + childItr != l_procs.end(); ++childItr) + { + if( (*childItr) == i_target) + { + continue; + } + else + { + // Run HWP, but from the other side. + // if it passes make a note that we booted from an + // unexpected side + // if it fails, escalate to RE_IPL_SEEPROM and call + // this function again. + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> + l_fapi2_proc_target((*childItr)); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running p9_start_cbs HWP on processor target %.8X", + TARGETING::get_huid((*childItr))); + + FAPI_INVOKE_HWP(l_errl, p9_start_cbs, + l_fapi2_proc_target, true); + if(l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR: call p9_start_cbs, " + "PLID=0x%x",l_errl->plid() ); + l_errl->collectTrace("ISTEPS_TRACE",256); + errlCommit(l_errl, ISTEP_COMP_ID); + + proc_extract_sbe_handler( i_target, + i_current_error, + P9_EXTRACT_SBE_RC::REIPL_BKP_SEEPROM); + + /* @ + * @errortype ERRL_SEV_INFORMATIONAL + * @moduleid MOD_SBE_EXTRACT_RC_HANDLER + * @reasoncode RC_PROC_EXTRACT_SBE_MAIN_ERROR + * @userdata1 Current Error + * @userdata2 HUID of errored proc + * @devdesc An error occurred after calling + * proc_extract_sbe_handler again. + * This should not occur. + */ + l_errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_INFORMATIONAL, + ISTEP::MOD_SBE_EXTRACT_RC_HANDLER, + ISTEP::RC_PROC_EXTRACT_SBE_MAIN_ERROR, + i_current_error, + TARGETING::get_huid(i_target)); + l_errl->collectTrace("ISTEPS_TRACE",256); + errlCommit(l_errl, ISTEP_COMP_ID); + } + else + { + // Make a note that we booted from an unexpected side + /* @ + * @errortype ERRL_SEV_INFORMATIONAL + * @moduleid MOD_SBE_EXTRACT_RC_HANDLER + * @reasoncode RC_SBE_BOOTED_UNEXPECTED_SIDE_UPD + * @userdata1 0 + * @userdata2 HUID of other (working) proc + * @devdesc SBE booted from unexpected side. + */ + l_errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_INFORMATIONAL, + ISTEP::MOD_SBE_EXTRACT_RC_HANDLER, + ISTEP::RC_SBE_BOOTED_UNEXPECTED_SIDE_UPD, + 0,TARGETING::get_huid(*childItr)); + l_errl->collectTrace("ISTEPS_TRACE",256); + errlCommit(l_errl, ISTEP_COMP_ID); + } + } + } + break; } case P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION: { + // There is no action possible. Gard and Callout the proc + /* @ + * @errortype ERRL_SEV_UNRECOVERABLE + * @moduleid MOD_SBE_EXTRACT_RC_HANDLER + * @reasoncode RC_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, + ISTEP::MOD_SBE_EXTRACT_RC_HANDLER, + ISTEP::RC_NO_RECOVERY_ACTION, + P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION, + TARGETING::get_huid(i_target)); + l_errl->collectTrace( "ISTEPS_TRACE", 246); + l_errl->addHwCallout( i_target, + HWAS::SRCI_PRIORITY_HIGH, + HWAS::DECONFIG, + HWAS::GARD_NULL ); + errlCommit(l_errl, ISTEP_COMP_ID); + break; } default: { + //Error out, unexpected enum value returned. + /* @ + * @errortype ERRL_SEV_INFORMATIONAL + * @moduleid MOD_SBE_EXTRACT_RC_HANDLER + * @reasoncode RC_INCORRECT_FCN_CALL + * @userdata1 SBE current error + * @userdata2 HUID of proc + * @devdesc This function was called incorrectly or + * there is a new enum that is not handled yet. + */ + l_errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_INFORMATIONAL, + ISTEP::MOD_SBE_EXTRACT_RC_HANDLER, + ISTEP::RC_INCORRECT_FCN_CALL, + i_current_error, + TARGETING::get_huid(i_target)); + l_errl->collectTrace( "ISTEPS_TRACE",256); + errlCommit(l_errl, ISTEP_COMP_ID); + break; } } |