summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSachin Gupta <sgupta2m@in.ibm.com>2015-02-13 03:27:01 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-03-01 16:40:44 -0600
commit1b488dc46eca2655066988c238c4ba059e7afe7c (patch)
tree4ad899d90876d2d4987c14e5edb5455286eb06b3 /src
parent3593853a4323d9ec7de1ad6502e22b3e66af03ae (diff)
downloadtalos-hostboot-1b488dc46eca2655066988c238c4ba059e7afe7c.tar.gz
talos-hostboot-1b488dc46eca2655066988c238c4ba059e7afe7c.zip
PRD: Add FFDC support for PNOR FIRDATA section
Change-Id: Ib20a43397cd6620c5223d50e4a363549a2d32ba4 RTC: 119623 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15717 Tested-by: Jenkins Server Reviewed-by: Prem Shanker Jha <premjha2@in.ibm.com> Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfLogParse_common.C62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C
index c1718491c..718268377 100644
--- a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C
+++ b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C
@@ -112,6 +112,9 @@ bool parseCaptureData( void * i_buffer, uint32_t i_buflen,
bool parsePfaData( void * i_buffer, uint32_t i_buflen,
ErrlUsrParser & i_parser );
+bool parsePnorFirData( uint8_t * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser );
+
//##############################################################################
//##
//## Utility Functions
@@ -393,6 +396,10 @@ bool parseCaptureData( void * i_buffer, uint32_t i_buflen,
{
parseL3LdCrFfdc( sigData, sigDataSize, i_parser );
}
+ else if ( Util::hashString("OCC_CS_FFDC") == sigId)
+ {
+ parsePnorFirData( sigData, sigDataSize, i_parser );
+ }
else if ( (0 != sigDataSize) && (sizeof(uint64_t) >= sigDataSize) )
{
// Print one reg/line if the data size <= 8 bytes
@@ -655,6 +662,61 @@ bool parseMemMru( void * i_buffer, uint32_t i_buflen, ErrlUsrParser & i_parser )
return o_rc;
}
+//------------------------------------------------------------------------------
+
+bool parsePnorFirData( uint8_t * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser )
+{
+ using namespace PARSER;
+
+ bool o_rc = false;
+
+ i_parser.PrintString( " OCC_CS_FFDC", "" );
+
+ do
+ {
+ if ( NULL == i_buffer ) break;
+
+ size_t u16 = sizeof(uint16_t);
+ size_t u32 = sizeof(uint32_t);
+
+ // Make sure there is enough room for the header data.
+ if ( i_buflen < u32 ) break;
+
+ uint32_t noTrgts = i_buffer[0];
+ bool full = (1 == (i_buffer[1] >> 7));
+
+ i_parser.PrintNumber( " # of targets", "%d", noTrgts );
+ i_parser.PrintBool( " PNOR buffer full", full );
+
+ uint32_t cnt = i_buffer[3];
+
+ // Make sure there is enough room for the SCOM error data.
+ if ( cnt * (u32 + u16) < i_buflen - u32 ) break;
+
+ uint32_t idx = u32;
+ for ( uint32_t i = 0; i < cnt; ++i )
+ {
+ uint32_t huid = 0; uint16_t scomErrs = 0;
+ memcpy( &huid, &i_buffer[idx], u32 ); idx += u32;
+ memcpy( &scomErrs, &i_buffer[idx], u16 ); idx += u16;
+
+ char header[HEADER_SIZE];
+ snprintf( header, HEADER_SIZE, " HUID = 0x%08x", huid );
+
+ char data[DATA_SIZE];
+ snprintf( data, DATA_SIZE, "SCOM Errors = %d", scomErrs );
+
+ i_parser.PrintString( header, data );
+ }
+
+ o_rc = true;
+
+ } while (0);
+
+ return o_rc;
+}
+
//##############################################################################
//##
//## Error Log Plugins
OpenPOWER on IntegriCloud