From 1ec713628b77072bb7a315cac02afd0f5a599b65 Mon Sep 17 00:00:00 2001 From: Zane Shelley Date: Wed, 22 Feb 2017 13:27:16 -0600 Subject: [PATCH] PRD: enabled analysis of MNFG CE statistics Change-Id: I2a11df1168b7baaf2b8dc2208dff6e36b6ce5b19 RTC: 159628 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36869 Tested-by: Jenkins Server Reviewed-by: Benjamin J. Weisenbeck Reviewed-by: Caleb N. Palmer Reviewed-by: Zane C. Shelley Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37048 Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins --- src/usr/diag/prdf/prdfMain_ipl.C | 55 ++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/src/usr/diag/prdf/prdfMain_ipl.C b/src/usr/diag/prdf/prdfMain_ipl.C index 24ccfda2afb..d92f4fa9361 100644 --- a/src/usr/diag/prdf/prdfMain_ipl.C +++ b/src/usr/diag/prdf/prdfMain_ipl.C @@ -33,13 +33,17 @@ #include -//#include TODO RTC 159628 -#include +// Framework includes +#include #include +#include + +// Platform includes +//#include TODO RTC 166802 +//#include TODO RTC 155857 #include -//#include TODO RTC 159628 +#include #include -#include // Custom compile configs #include @@ -66,30 +70,47 @@ extern errlHndl_t noLock_refresh(); // External functions - declared in prdfMain.H //------------------------------------------------------------------------------ -int32_t analyzeIplCEStats( TargetHandle_t i_mba, bool &o_calloutMade ) +int32_t analyzeIplCEStats( TargetHandle_t i_trgt, bool &o_calloutMade ) { #define PRDF_FUNC "PRDF::analyzeIplCEStats" - int32_t o_rc = SUCCESS; - - PRDF_ENTER( PRDF_FUNC "(0x%08x)", getHuid(i_mba) ); + PRDF_ENTER( PRDF_FUNC "(0x%08x)", getHuid(i_trgt) ); -/* TODO RTC 159628 - // will unlock when going out of scope - PRDF_SYSTEM_SCOPELOCK; + PRDF_SYSTEM_SCOPELOCK; // will unlock when going out of scope o_calloutMade = false; - ExtensibleChip * mbaChip = (ExtensibleChip *)systemPtr->GetChip( i_mba ); - CenMbaDataBundle * mbadb = getMbaDataBundle( mbaChip ); + ExtensibleChip * chip = (ExtensibleChip *)systemPtr->GetChip( i_trgt ); + TYPE type = getTargetType( i_trgt ); - o_calloutMade = mbadb->getIplCeStats()->analyzeStats(); -*/ + if ( TYPE_MCBIST == type ) + { + // Analyze the CE stats for each MCA. + ExtensibleChipList list = getConnected( chip, TYPE_MCA ); + for ( auto & mcaChip : list ) + { + McaDataBundle * db = getMcaDataBundle( mcaChip ); + if ( db->getIplCeStats()->analyzeStats() ) o_calloutMade = true; + } + } + else if ( TYPE_MBA == type ) + { + /* TODO: RTC 166802 + // Analyze the CE stats for the MBA. + CenMbaDataBundle * db = getMbaDataBundle( chip ); + o_calloutMade = db->getIplCeStats()->analyzeStats(); + */ + } + else + { + PRDF_ERR( PRDF_FUNC "Unsupported target type %d", type ); + PRDF_ASSERT( false ); // code bug + } PRDF_EXIT( PRDF_FUNC "(0x%08x), o_calloutMade:%u", - getHuid(i_mba), o_calloutMade ); + getHuid(i_trgt), o_calloutMade ); - return o_rc; + return SUCCESS; #undef PRDF_FUNC }