diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2014-04-09 13:32:26 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-05-08 14:51:37 -0500 |
commit | be0b8eb067f0418defc1bae016e5452724f98cc9 (patch) | |
tree | 0811a002000aa07c81b5ac65d5eafc6a3ebfe384 /src/usr | |
parent | d37f47a89226f2a4649d35eb1efc120bd5802ef9 (diff) | |
download | talos-hostboot-be0b8eb067f0418defc1bae016e5452724f98cc9.tar.gz talos-hostboot-be0b8eb067f0418defc1bae016e5452724f98cc9.zip |
Add more FFDC for scom fails to PBA regs
Change-Id: I43cd653bdcdb1634f0e8f91c46992d2381ff0b9d
CQ: SW256226
Backport: release-fips811
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/10311
Tested-by: Jenkins Server
Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/errl/runtime/makefile | 6 | ||||
-rw-r--r-- | src/usr/scom/scom.C | 59 |
2 files changed, 62 insertions, 3 deletions
diff --git a/src/usr/errl/runtime/makefile b/src/usr/errl/runtime/makefile index 025cd2dd5..618fdd87a 100644 --- a/src/usr/errl/runtime/makefile +++ b/src/usr/errl/runtime/makefile @@ -1,11 +1,11 @@ # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # -# $Source: src/usr/trace/runtime/makefile $ +# $Source: src/usr/errl/runtime/makefile $ # # IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2013 +# COPYRIGHT International Business Machines Corp. 2013,2014 # # p1 # @@ -27,7 +27,7 @@ MODULE = errl_rt OBJS = errlentry.o rt_errlmanager.o errlsctn.o errlsctnhdr.o errlprvt.o errluh.o \ errlud.o errlsrc.o errluserdetails.o backtrace.o errludtarget.o \ errludstring.o errludbacktrace.o errludattribute.o \ - errludcallout.o rt_vfs.o + errludcallout.o rt_vfs.o errludlogregister.o SUBDIRS = test.d diff --git a/src/usr/scom/scom.C b/src/usr/scom/scom.C index 0ee21d1ee..f19828d78 100644 --- a/src/usr/scom/scom.C +++ b/src/usr/scom/scom.C @@ -40,6 +40,8 @@ #include <sys/time.h> #include <xscom/piberror.H> #include <errl/errludtarget.H> +#include <errl/errludlogregister.H> + // Trace definition trace_desc_t* g_trac_scom = NULL; @@ -48,6 +50,17 @@ TRAC_INIT(&g_trac_scom, SCOM_COMP_NAME, KILOBYTE, TRACE::BUFFER_SLOW); //1K namespace SCOM { +/** + * @brief Add any additional FFDC for this specific type of scom + * + * @param[in] i_err Log to add FFDC to + * @param[in] i_target Target of SCOM operation + * @param[in] i_addr SCOM address + */ +void addScomFailFFFDC( errlHndl_t i_err, + TARGETING::Target* i_target, + uint64_t i_addr ); + // Register Scom access functions to DD framework DEVICE_REGISTER_ROUTE(DeviceFW::WILDCARD, @@ -537,8 +550,54 @@ errlHndl_t doScomOp(DeviceFW::OperationType i_opType, io_buflen, accessType_flag, i_addr ); } + //Add some additional FFDC based on the specific operation + if( l_err ) + { + addScomFailFFFDC( l_err, i_target, i_addr ); + } + return l_err; } +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +void addScomFailFFFDC( errlHndl_t i_err, + TARGETING::Target* i_target, + uint64_t i_addr ) +{ + // Read some error regs from scom + ERRORLOG::ErrlUserDetailsLogRegister l_scom_data(i_target); + bool addit = false; + + //PBA scoms on the processor + if( ((i_addr & 0xFFFFF000) == 0x00064000) + && (TARGETING::TYPE_PROC + == i_target->getAttr<TARGETING::ATTR_TYPE>()) ) + { + addit = true; + //look for hung operations on the PBA + uint64_t ffdc_regs[] = { + //grab the PBA buffers in case something is hung + 0x02010850, //PBARBUFVAL0 + 0x02010851, //PBARBUFVAL1 + 0x02010852, //PBARBUFVAL2 + 0x02010858, //PBAWBUFVAL0 + 0x02010859, //PBAWBUFVAL1 + + 0x020F0012, //PB_GP3 (has fence information) + }; + for( size_t x = 0; x < (sizeof(ffdc_regs)/sizeof(ffdc_regs[0])); x++ ) + { + l_scom_data.addData(DEVICE_SCOM_ADDRESS(ffdc_regs[x])); + } + } + + if( addit ) + { + l_scom_data.addToLog(i_err); + } +} + + } // end namespace |