Skip to content

Commit

Permalink
PRD: enabled analysis of MNFG CE statistics
Browse files Browse the repository at this point in the history
Change-Id: I2a11df1168b7baaf2b8dc2208dff6e36b6ce5b19
RTC: 159628
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36869
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37048
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
  • Loading branch information
zane131 committed Feb 27, 2017
1 parent 979413b commit 1ec7136
Showing 1 changed file with 38 additions and 17 deletions.
55 changes: 38 additions & 17 deletions src/usr/diag/prdf/prdfMain_ipl.C
Expand Up @@ -33,13 +33,17 @@

#include <prdfMain.H>

//#include <prdfCenMbaDataBundle.H> TODO RTC 159628
#include <prdfExtensibleChip.H>
// Framework includes
#include <iipSystem.h>
#include <prdfErrlUtil.H>
#include <prdfExtensibleChip.H>

// Platform includes
//#include <prdfCenMbaDataBundle.H> TODO RTC 166802
//#include <prdfMbaDomain.H> TODO RTC 155857
#include <prdfPlatServices.H>
//#include <prdfMbaDomain.H> TODO RTC 159628
#include <prdfP9McaDataBundle.H>
#include <prdfP9McbistDomain.H>
#include <iipSystem.h>

// Custom compile configs
#include <config.h>
Expand All @@ -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
}
Expand Down

0 comments on commit 1ec7136

Please sign in to comment.