From be0b8eb067f0418defc1bae016e5452724f98cc9 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Wed, 9 Apr 2014 13:32:26 -0500 Subject: 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 Reviewed-by: Corey V. Swenson Reviewed-by: A. Patrick Williams III --- src/usr/scom/scom.C | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'src/usr/scom/scom.C') 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 #include #include +#include + // 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()) ) + { + 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 -- cgit v1.2.1