diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2016-09-23 19:54:50 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-09-28 16:31:58 -0400 |
commit | 8142496f0f8e82eb3e069ce645c92438fa99efe4 (patch) | |
tree | fdb46e9c4ec8fe530ddc7f23df934ac70db917df /src/usr/sbeio | |
parent | 45d5477ac84685301735e5d920e0f5fb71e5b668 (diff) | |
download | talos-hostboot-8142496f0f8e82eb3e069ce645c92438fa99efe4.tar.gz talos-hostboot-8142496f0f8e82eb3e069ce645c92438fa99efe4.zip |
Log SBE Traces on error (simics only)
A quick change to add a new magic instruction that collects the
SBE traces any time we hit an error from the SBE. If multiple
errors occur they will all be appended to the same file.
Data will be saved to $sb/simics/sbetrace.hb.txt.
Change-Id: I27575c1565c0089e847e19c3e51cb2926833e387
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30206
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.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/sbeio')
-rw-r--r-- | src/usr/sbeio/sbe_fifodd.C | 19 | ||||
-rw-r--r-- | src/usr/sbeio/sbe_psudd.C | 13 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/usr/sbeio/sbe_fifodd.C b/src/usr/sbeio/sbe_fifodd.C index 3066dc890..9386ca255 100644 --- a/src/usr/sbeio/sbe_fifodd.C +++ b/src/usr/sbeio/sbe_fifodd.C @@ -38,6 +38,7 @@ #include <sbeio/sbeioreasoncodes.H> #include "sbe_fifodd.H" #include <initservice/initserviceif.H> //@todo-RTC:149454-Remove +#include <arch/ppc.H> extern trace_desc_t* g_trac_sbeio; @@ -122,6 +123,9 @@ errlHndl_t performFifoChipOp(TARGETING::Target * i_target, SBEIO_HWSV_COLLECT_SBE_RC, orig_plid, TWO_UINT32_TO_UINT64(orig_rc,orig_mod)); + MAGIC_INST_GET_SBE_TRACES( + i_target->getAttr<TARGETING::ATTR_POSITION>(), + SBEIO_HWSV_COLLECT_SBE_RC); INITSERVICE::doShutdown( SBEIO_HWSV_COLLECT_SBE_RC ); } @@ -241,6 +245,9 @@ errlHndl_t waitUpFifoReady(TARGETING::Target * i_target) HWAS::NO_DECONFIG, HWAS::GARD_NULL ); errl->collectTrace(SBEIO_COMP_NAME); + MAGIC_INST_GET_SBE_TRACES( + i_target->getAttr<TARGETING::ATTR_POSITION>(), + SBEIO_FIFO_UPSTREAM_TIMEOUT); break; } @@ -359,6 +366,9 @@ errlHndl_t readResponse(TARGETING::Target * i_target, HWAS::NO_DECONFIG, HWAS::GARD_NULL ); errl->collectTrace(SBEIO_COMP_NAME); + MAGIC_INST_GET_SBE_TRACES( + i_target->getAttr<TARGETING::ATTR_POSITION>(), + SBEIO_FIFO_NO_DOWNSTREAM_EOT); break; } @@ -415,6 +425,9 @@ errlHndl_t readResponse(TARGETING::Target * i_target, HWAS::NO_DECONFIG, HWAS::GARD_NULL ); errl->collectTrace(SBEIO_COMP_NAME); + MAGIC_INST_GET_SBE_TRACES( + i_target->getAttr<TARGETING::ATTR_POSITION>(), + SBEIO_FIFO_INVALID_STATUS_DISTANCE); break; } @@ -468,6 +481,9 @@ errlHndl_t readResponse(TARGETING::Target * i_target, HWAS::NO_DECONFIG, HWAS::GARD_NULL ); errl->collectTrace(SBEIO_COMP_NAME); + MAGIC_INST_GET_SBE_TRACES( + i_target->getAttr<TARGETING::ATTR_POSITION>(), + SBEIO_FIFO_RESPONSE_ERROR); break; } } @@ -542,6 +558,9 @@ errlHndl_t waitDnFifoReady(TARGETING::Target * i_target, HWAS::NO_DECONFIG, HWAS::GARD_NULL ); errl->collectTrace(SBEIO_COMP_NAME); + MAGIC_INST_GET_SBE_TRACES( + i_target->getAttr<TARGETING::ATTR_POSITION>(), + SBEIO_FIFO_DOWNSTREAM_TIMEOUT); break; } diff --git a/src/usr/sbeio/sbe_psudd.C b/src/usr/sbeio/sbe_psudd.C index f206896a2..d5d9d4e7b 100644 --- a/src/usr/sbeio/sbe_psudd.C +++ b/src/usr/sbeio/sbe_psudd.C @@ -39,6 +39,7 @@ #include <sbeio/sbeioreasoncodes.H> #include <initservice/initserviceif.H> //@todo-RTC:149454-Remove #include <sbeio/sbe_psudd.H> +#include <arch/ppc.H> trace_desc_t* g_trac_sbeio; TRAC_INIT(&g_trac_sbeio, SBEIO_COMP_NAME, 6*KILOBYTE, TRACE::BUFFER_SLOW); @@ -140,6 +141,9 @@ errlHndl_t performPsuChipOp(psuCommand * i_pPsuRequest, SBEIO_HWSV_COLLECT_SBE_RC, orig_plid, TWO_UINT32_TO_UINT64(orig_rc,orig_mod)); + MAGIC_INST_GET_SBE_TRACES( + l_target->getAttr<TARGETING::ATTR_POSITION>(), + SBEIO_HWSV_COLLECT_SBE_RC); INITSERVICE::doShutdown( SBEIO_HWSV_COLLECT_SBE_RC ); } @@ -203,6 +207,9 @@ errlHndl_t writeRequest(TARGETING::Target * i_target, errl->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, HWAS::SRCI_PRIORITY_HIGH); errl->collectTrace(SBEIO_COMP_NAME); + MAGIC_INST_GET_SBE_TRACES( + i_target->getAttr<TARGETING::ATTR_POSITION>(), + SBEIO_PSU_NOT_READY); break; // return with error } @@ -318,6 +325,9 @@ errlHndl_t readResponse(TARGETING::Target * i_target, errl->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, HWAS::SRCI_PRIORITY_HIGH); errl->collectTrace(SBEIO_COMP_NAME); + MAGIC_INST_GET_SBE_TRACES( + i_target->getAttr<TARGETING::ATTR_POSITION>(), + SBEIO_PSU_RESPONSE_ERROR); break; } @@ -379,6 +389,9 @@ errlHndl_t pollForPsuComplete(TARGETING::Target * i_target, errl->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, HWAS::SRCI_PRIORITY_HIGH); errl->collectTrace(SBEIO_COMP_NAME); + MAGIC_INST_GET_SBE_TRACES( + i_target->getAttr<TARGETING::ATTR_POSITION>(), + SBEIO_PSU_RESPONSE_TIMEOUT); break; } |