From 263fd96f988d641967d0bd1e3537ac75caed254d Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Tue, 6 Sep 2016 09:14:23 -0500 Subject: Temporarily force terminal RC on SBE errors Until Hostboot has the infrastructure in place to collect all of the FFDC from a SBE failure, we will rely on the FSP code to collect the data. This requires Hostboot to terminate with a special RC to force this behavior. Change-Id: I94fba157826664b680a51790104932f97b671950 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29253 Tested-by: Jenkins Server Reviewed-by: Martin Gloff Tested-by: FSP CI Jenkins Reviewed-by: Deepak Kodihalli Reviewed-by: William G. Hoffa --- src/usr/sbeio/sbe_fifodd.C | 31 +++++++++++++++++++++++++++++++ src/usr/sbeio/sbe_psudd.C | 31 +++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) (limited to 'src/usr/sbeio') diff --git a/src/usr/sbeio/sbe_fifodd.C b/src/usr/sbeio/sbe_fifodd.C index 1b1dfdc21..3066dc890 100644 --- a/src/usr/sbeio/sbe_fifodd.C +++ b/src/usr/sbeio/sbe_fifodd.C @@ -37,6 +37,7 @@ #include #include #include "sbe_fifodd.H" +#include //@todo-RTC:149454-Remove extern trace_desc_t* g_trac_sbeio; @@ -94,6 +95,36 @@ errlHndl_t performFifoChipOp(TARGETING::Target * i_target, mutex_unlock(&l_fifoOpMux); + //@todo-RTC:149454-Remove when we have our FFDC in place + //Temporarily crash with a known RC so that HWSV collects the SBE FFDC + if( errl && (SBE_COMP_ID == errl->moduleId()) ) + { + SBE_TRACF( "Forcing shutdown for FSP to collect FFDC" ); + + //commit the original error after pulling some data out + uint32_t orig_plid = errl->plid(); + uint32_t orig_rc = errl->reasonCode(); + uint32_t orig_mod = errl->moduleId(); + ERRORLOG::errlCommit( errl, SBE_COMP_ID ); + /*@ + * @errortype + * @moduleid SBEIO_FIFO + * @reasoncode SBEIO_HWSV_COLLECT_SBE_RC + * @userdata1 PLID of original error log + * @userdata2[00:31] Original RC + * @userdata2[32:63] Original Module Id + * + * @devdesc SBE error, force HWSV to collect FFDC + * @custdesc Firmware error communicating with boot device + */ + errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE, + SBEIO_FIFO, + SBEIO_HWSV_COLLECT_SBE_RC, + orig_plid, + TWO_UINT32_TO_UINT64(orig_rc,orig_mod)); + INITSERVICE::doShutdown( SBEIO_HWSV_COLLECT_SBE_RC ); + } + SBE_TRACD(EXIT_MRK "performFifoChipOp"); return errl; diff --git a/src/usr/sbeio/sbe_psudd.C b/src/usr/sbeio/sbe_psudd.C index f298ddbf2..4f8e2015c 100644 --- a/src/usr/sbeio/sbe_psudd.C +++ b/src/usr/sbeio/sbe_psudd.C @@ -38,6 +38,7 @@ #include #include #include "sbe_psudd.H" +#include //@todo-RTC:149454-Remove trace_desc_t* g_trac_sbeio; TRAC_INIT(&g_trac_sbeio, SBEIO_COMP_NAME, 6*KILOBYTE, TRACE::BUFFER_SLOW); @@ -104,6 +105,36 @@ errlHndl_t performPsuChipOp(psuCommand * i_pPsuRequest, mutex_unlock(&l_psuOpMux); + //@todo-RTC:144313-Remove when we have our FFDC in place + //Temporarily crash with a known RC so that HWSV collects the SBE FFDC + if( errl && (SBE_COMP_ID == errl->moduleId()) ) + { + SBE_TRACF( "Forcing shutdown for FSP to collect FFDC" ); + + //commit the original error after pulling some data out + uint32_t orig_plid = errl->plid(); + uint32_t orig_rc = errl->reasonCode(); + uint32_t orig_mod = errl->moduleId(); + ERRORLOG::errlCommit( errl, SBE_COMP_ID ); + /*@ + * @errortype + * @moduleid SBEIO_PSU + * @reasoncode SBEIO_HWSV_COLLECT_SBE_RC + * @userdata1 PLID of original error log + * @userdata2[00:31] Original RC + * @userdata2[32:63] Original Module Id + * + * @devdesc SBE error, force HWSV to collect FFDC + * @custdesc Firmware error communicating with boot device + */ + errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE, + SBEIO_PSU, + SBEIO_HWSV_COLLECT_SBE_RC, + orig_plid, + TWO_UINT32_TO_UINT64(orig_rc,orig_mod)); + INITSERVICE::doShutdown( SBEIO_HWSV_COLLECT_SBE_RC ); + } + SBE_TRACD(EXIT_MRK "performPsuChipOp"); return errl; -- cgit v1.2.1