summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/iipResolution.C80
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H2
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/prdfCalloutConnected.H2
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfTargetServices.C359
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfTargetServices.H24
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdf_ras_services.C13
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/Ex.rule2
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/Membuf.rule2
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/Proc.rule4
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H35
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C47
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufDataBundle.H71
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.H1
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfLaneRepair.C9
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfMemoryMru.C12
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C47
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H103
-rw-r--r--src/usr/diag/prdf/test/prdfTest_McsMciFir.H1
18 files changed, 505 insertions, 309 deletions
diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolution.C b/src/usr/diag/prdf/common/framework/resolution/iipResolution.C
index a1248bc4f..2aa11b790 100755
--- a/src/usr/diag/prdf/common/framework/resolution/iipResolution.C
+++ b/src/usr/diag/prdf/common/framework/resolution/iipResolution.C
@@ -58,6 +58,8 @@
namespace PRDF
{
+using namespace PlatServices;
+
//----------------------------------------------------------------------
// User Types
//----------------------------------------------------------------------
@@ -226,47 +228,44 @@ int32_t CalloutConnected::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData )
{
using namespace TARGETING;
- TargetHandle_t l_pconnectedTarget = NULL;
- TARGETING::TargetHandle_t l_psourceTarget =
- ServiceDataCollector::getTargetAnalyzed( ) ;
- TargetHandleList l_connectedTargetList;
- l_connectedTargetList = PlatServices::getConnected( l_psourceTarget,
- iv_targetType );
- if( 0xffffffff == iv_idx )
+ TargetHandle_t sourceTrgt = ServiceDataCollector::getTargetAnalyzed();
+ TargetHandle_t connTrgt = NULL;
+
+ TargetHandleList list = getConnected( sourceTrgt, iv_targetType );
+
+ if ( 0xffffffff == iv_idx )
{
- if( l_connectedTargetList.size()>0 )
- {
- l_pconnectedTarget = l_connectedTargetList[0];
- }
+ if ( 0 < list.size() )
+ connTrgt = list[0];
}
else
{
- for( TargetHandleList::iterator itrTarget =
- l_connectedTargetList.begin();
- itrTarget!= l_connectedTargetList.end();itrTarget++ )
+ for (TargetHandleList::iterator i = list.begin(); i != list.end(); i++)
{
- if( iv_idx == PlatServices::getTargetPosition( *itrTarget ) )
+ if ( iv_idx == getTargetPosition(*i) )
{
- l_pconnectedTarget = *itrTarget ;
+ connTrgt = *i;
break;
}
}
}
- if ( l_pconnectedTarget != NULL )
+ if ( NULL != connTrgt )
{
- io_serviceData.service_data->SetCallout( l_pconnectedTarget,
- iv_priority );
+ io_serviceData.service_data->SetCallout( connTrgt, iv_priority );
}
else
{
- if(iv_altResolution != NULL)
+ if ( NULL != iv_altResolution )
{
iv_altResolution->Resolve( io_serviceData );
}
else
{
- io_serviceData.service_data->SetCallout( l_psourceTarget );
+ PRDF_ERR( "[CalloutConnected::Resolve] No connected chip found: "
+ "sourceTrgt=0x%08x iv_targetType=0x%x",
+ getHuid(sourceTrgt), iv_targetType );
+ io_serviceData.service_data->SetCallout( sourceTrgt );
}
}
@@ -280,49 +279,38 @@ int32_t AnalyzeConnected::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData )
{
using namespace TARGETING;
- CHIP_CLASS * l_connChipObj = NULL;
- TARGETING::TargetHandle_t l_pconnChipTarget = NULL;
- TARGETING::TargetHandle_t l_psourceHandle =
- ServiceDataCollector::getTargetAnalyzed( ) ;
- // Get connected list.
- TargetHandleList l_connectedTargetList = PlatServices::getConnected(
- l_psourceHandle,
- iv_targetType );
+ TargetHandle_t sourceTrgt = ServiceDataCollector::getTargetAnalyzed();
+ TargetHandle_t connTrgt = NULL;
+
+ TargetHandleList list = getConnected( sourceTrgt, iv_targetType );
- // If ID = 0xffffffff, find first valid.
if ( 0xffffffff == iv_idx )
{
- if( l_connectedTargetList.size()>0 )
- {
- //First valid handle. we don't allow invalid things in list
- l_pconnChipTarget = l_connectedTargetList[0] ;
- }
+ if ( 0 < list.size() )
+ connTrgt = list[0];
}
- // Otherwise, grab from correct index.
else
{
- for( TargetHandleList::iterator itrTarget =
- l_connectedTargetList.begin();
- itrTarget!= l_connectedTargetList.end();itrTarget++ )
+ for (TargetHandleList::iterator i = list.begin(); i != list.end(); i++)
{
- if( iv_idx == PlatServices::getTargetPosition( *itrTarget ) )
+ if ( iv_idx == getTargetPosition(*i) )
{
- l_pconnChipTarget = *itrTarget ;
+ connTrgt = *i;
break;
-
}
}
}
// If valid chip found, look up in global system container.
- if ( NULL != l_pconnChipTarget )
+ CHIP_CLASS * connChip = NULL;
+ if ( NULL != connTrgt )
{
- l_connChipObj = systemPtr->GetChip( l_pconnChipTarget );
+ connChip = systemPtr->GetChip( connTrgt );
}
// Analyze chip.
- if (NULL != l_connChipObj)
- return l_connChipObj->Analyze( io_serviceData,
+ if ( NULL != connChip )
+ return connChip->Analyze( io_serviceData,
io_serviceData.service_data->GetCauseAttentionType() );
else
return PRD_UNRESOLVED_CHIP_CONNECTION;
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H b/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H
index 607a3bfe4..f994cb809 100755
--- a/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H
+++ b/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H
@@ -78,7 +78,7 @@ public:
* analyze func.
* @param[io] io_service_data Refernce to STEP_CODE_DATA_STRUCT
* @return SUCCESS | non-zero if chip not found.
- * @note if the call to getConnected yeilds NULL than the
+ * @note if the call to getConnected yields NULL than the
* altResolution is called. If the altResolution is NULL than the
* source is added to the callout list.
*/
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnected.H b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnected.H
index 8535ea0a1..4b8173687 100755
--- a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnected.H
+++ b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnected.H
@@ -94,7 +94,7 @@ public:
* @param[io] io_service_data Reference to STEP_CODE_DATA_STRUCT
* @post service_data is complete
* @return SUCCESS | non-zero
- * @note if the call to getConnected yeilds an invalid target then
+ * @note if the call to getConnected yields an invalid target then
* altResolution is called. If the altResolution is NULL than the
* source is added to the callout list.
*/
diff --git a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C
index b5fdee4ad..324854fe3 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C
@@ -371,6 +371,8 @@ int32_t getAssociationType( TARGETING::TargetHandle_t i_target,
TARGETING::TYPE i_connType,
TARGETING::TargetService::ASSOCIATION_TYPE & o_type)
{
+ #define PRDF_FUNC "PlatServices::getAssociationType] "
+
int32_t o_rc = SUCCESS;
static conn_t lookups[] =
@@ -442,66 +444,54 @@ int32_t getAssociationType( TARGETING::TargetHandle_t i_target,
{ TYPE_DIMM, TYPE_MBA, TargetService::PARENT_BY_AFFINITY },
};
- const size_t sz_lookups = sizeof(lookups) / sizeof(conn_t);
+ do
+ {
+ if ( NULL == i_target )
+ {
+ PRDF_ERR( PRDF_FUNC"Given target is null" );
+ o_rc = FAIL; break;
+ }
- conn_t match = { getTargetType(i_target), i_connType,
- TargetService::CHILD_BY_AFFINITY };
+ const size_t sz_lookups = sizeof(lookups) / sizeof(conn_t);
- conn_t * it = std::lower_bound( lookups, lookups + sz_lookups, match );
+ TYPE type = getTargetType(i_target);
- if ( it != lookups + sz_lookups )
- o_type = it->type;
- else
- {
- PRDF_ERR( "[getAssociationType] Failed: i_target=0x%08x i_connType=%d",
- getHuid(i_target), i_connType );
- o_rc = FAIL;
- }
+ conn_t match = { type, i_connType, TargetService::CHILD_BY_AFFINITY };
- return o_rc;
-}
+ conn_t * it = std::lower_bound( lookups, lookups + sz_lookups, match );
-//------------------------------------------------------------------------------
+ if ( (it == lookups + sz_lookups) || // off the end
+ (type != it->from) || (i_connType != it->to) ) // not equals
+ {
+ PRDF_ERR( PRDF_FUNC"Look-up failed: i_target=0x%08x i_connType=%d",
+ getHuid(i_target), i_connType );
+ o_rc = FAIL; break;
+ }
-// Helper function to return a parent or container target of a specified type.
-// For example, get EX target from CORE or PROC target from MEMBUF. Note, that
-// the input target could be the parent. Will return NULL if the parent is not
-// found. For example, a DIMM could not be a parent of a PROC.
-TARGETING::TargetHandle_t getParent( TARGETING::TargetHandle_t i_target,
- TARGETING::TYPE i_connType )
-{
- TARGETING::TargetHandle_t o_target = i_target; // Assume it is the parent.
+ o_type = it->type;
- if ( i_connType != getTargetType(i_target) )
- {
- TargetHandleList list = getConnected( i_target, i_connType );
- o_target = ( 1 == list.size() ) ? list[0] : NULL;
- }
+ } while (0);
- if ( NULL == o_target )
- {
- PRDF_ERR( "[getParent] Failed: i_target=0x%08x i_connType=%d",
- getHuid(i_target), i_connType );
- }
+ return o_rc;
- return o_target;
+ #undef PRDF_FUNC
}
-//------------------------------------------------------------------------------
-
-TARGETING::TargetHandleList getConnected( TARGETING::TargetHandle_t i_target,
- TARGETING::TYPE i_connType )
+// Helper function for the various getConnected() functions.
+TargetHandleList getConnAssoc( TargetHandle_t i_target, TYPE i_connType,
+ TargetService::ASSOCIATION_TYPE i_assocType )
{
+ #define PRDF_FUNC "[PlatServices::getConnAssoc] "
+
TargetHandleList o_list; // Default empty list
do
{
- // Parameter checks. Error trace output is in NULL check below.
- if ( NULL == i_target ) break;
-
- TargetService::ASSOCIATION_TYPE l_assocType;
- int32_t l_rc = getAssociationType( i_target, i_connType, l_assocType );
- if ( SUCCESS != l_rc ) break;
+ if ( NULL == i_target )
+ {
+ PRDF_ERR( PRDF_FUNC"Given target is null" );
+ break;
+ }
// Match any class, specified type, and functional.
PredicateCTM predType( CLASS_NA, i_connType );
@@ -509,129 +499,207 @@ TARGETING::TargetHandleList getConnected( TARGETING::TargetHandle_t i_target,
PredicatePostfixExpr predAnd;
predAnd.push(&predType).push(&predFunc).And();
- targetService().getAssociated( o_list, i_target, l_assocType,
+ targetService().getAssociated( o_list, i_target, i_assocType,
TargetService::ALL, &predAnd );
} while(0);
- if ( 0 == o_list.size() )
- {
- PRDF_ERR( "[getConnected] Failed: i_target=0x%08x i_connType=%d",
- getHuid(i_target), i_connType );
- }
-
return o_list;
+
+ #undef PRDF_FUNC
}
-TargetHandle_t getConnectedPos( TargetHandle_t i_target, TYPE i_type,
- uint32_t i_position )
-{
- TargetHandle_t o_tgt = NULL;
+//------------------------------------------------------------------------------
- TargetHandleList list = getConnected(i_target, i_type);
+TargetHandleList getConnected( TargetHandle_t i_target, TYPE i_connType )
+{
+ TargetHandleList o_list; // Default empty list
- for (TargetHandleList::iterator i = list.begin();
- i != list.end(); ++i)
+ do
{
- if ( i_position == getTargetPosition(*i) )
+ if ( i_connType == getTargetType(i_target) )
{
- o_tgt = *i;
+ o_list.push_back( i_target );
break;
}
- }
- if ( NULL == o_tgt )
- {
- PRDF_ERR( "[getConnectedPos] "
- "Couldn't find connected target 0x%08x, type %d pos %d",
- getHuid(i_target), i_type, i_position);
- }
- return o_tgt;
+ TargetService::ASSOCIATION_TYPE assocType;
+ int32_t l_rc = getAssociationType( i_target, i_connType, assocType );
+ if ( SUCCESS != l_rc ) break;
+
+ o_list = getConnAssoc( i_target, i_connType, assocType );
+
+ } while(0);
+
+ return o_list;
}
-// note - This function only works if ATTR_PEER_TARGET is defined.
-// Currently only X and A bus targets.
-TargetHandle_t getConnectedPeerTarget(TargetHandle_t i_tgt)
+//------------------------------------------------------------------------------
+
+TargetHandle_t getConnectedParent( TargetHandle_t i_target, TYPE i_connType )
{
- TargetHandle_t o_tgt = NULL;
- if ( !i_tgt->tryGetAttr<ATTR_PEER_TARGET>(o_tgt) )
+ #define PRDF_FUNC "[PlatServices::getConnectedParent] "
+
+ TargetHandle_t o_parent = NULL;
+
+ do
{
- PRDF_ERR( "[getConnectedPeerTarget] "
- "Couldn't find connected peer target 0x%08x",
- getHuid(i_tgt));
- }
+ if ( i_connType == getTargetType(i_target) )
+ {
+ o_parent = i_target;
+ break;
+ }
+
+ TargetService::ASSOCIATION_TYPE assocType;
+ int32_t l_rc = getAssociationType( i_target, i_connType, assocType );
+ if ( SUCCESS != l_rc ) break;
+
+ if ( TargetService::PARENT_BY_AFFINITY != assocType )
+ {
+ PRDF_ERR( PRDF_FUNC"Unsupported parent connection: i_target=0x%08x "
+ "i_connType=%d", getHuid(i_target), i_connType );
+ break;
+ }
+
+ TargetHandleList list = getConnAssoc( i_target, i_connType, assocType );
+ if ( 1 != list.size() ) // Should be one and only one parent
+ {
+ PRDF_ERR( PRDF_FUNC"Could not find parent: i_target=0x%08x "
+ "i_connType=%d", getHuid(i_target), i_connType );
+ break;
+ }
+
+ o_parent = list[0];
+
+ } while(0);
+
+ return o_parent;
- return o_tgt;
+ #undef PRDF_FUNC
}
+
//------------------------------------------------------------------------------
-TARGETING::TargetHandle_t getConnectedPeerProc(
- TARGETING::TargetHandle_t i_procTarget,
- TARGETING::TYPE i_busType,
- uint32_t i_busPos )
+TargetHandle_t getConnectedChild( TargetHandle_t i_target, TYPE i_connType,
+ uint32_t i_position )
{
- #define FUNC "[getConnectedPeerProc] "
+ #define PRDF_FUNC "[PlatServices::getConnectedChild] "
- TargetHandle_t o_target = NULL;
+ TargetHandle_t o_child = NULL;
do
{
- // Parameter checks. Error trace output is in NULL check below.
- if ( NULL == i_procTarget ) break;
+ TargetService::ASSOCIATION_TYPE assocType;
+ int32_t l_rc = getAssociationType( i_target, i_connType, assocType );
+ if ( SUCCESS != l_rc ) break;
- if ( TYPE_PROC != getTargetType(i_procTarget) )
+ if ( TargetService::CHILD_BY_AFFINITY != assocType )
{
- PRDF_ERR( FUNC"Given target is not of TYPE_PROC" ); break;
- }
-
- if ( !( ((TYPE_XBUS == i_busType) && (MAX_XBUS_PER_PROC > i_busPos)) ||
- ((TYPE_ABUS == i_busType) && (MAX_ABUS_PER_PROC > i_busPos)) ) )
+ PRDF_ERR( PRDF_FUNC"Unsupported child connection: i_target=0x%08x "
+ "i_connType=%d", getHuid(i_target), i_connType );
break;
+ }
- // Starting PROC -> starting XBUS/ABUS.
- TargetHandleList list = getConnected( i_procTarget, i_busType );
- TargetHandle_t busTarget = NULL;
- for (TargetHandleList::iterator i = list.begin(); i != list.end(); ++i)
+ // SPECIAL CASE: The MEMBUF position number is relative to the PROC,
+ // not the MCS. This means the MEMBUF position number is the same
+ // as the position number of the attached MCS. In many cases, we
+ // want to get the MEMBUF connected to the MCS, but don't have
+ // knowledge of the MCS's position number (espeically in the rule
+ // code. So the following will change the desired position number
+ // to the MCS position number for MCS->MEMBUF connections only.
+ if ( TYPE_MCS == getTargetType(i_target) && TYPE_MEMBUF == i_connType )
+ i_position = getTargetPosition(i_target);
+
+ TargetHandleList list = getConnAssoc( i_target, i_connType, assocType );
+ for ( TargetHandleList::iterator i = list.begin();
+ i != list.end(); ++i )
{
- if ( i_busPos == getTargetPosition(*i) )
+ if ( i_position == getTargetPosition(*i) )
{
- busTarget = *i;
- break; // for loop
+ o_child = *i;
+ break;
}
}
- if ( NULL == busTarget )
- {
- PRDF_ERR( FUNC"Couldn't find connected bus" ); break;
- }
- // Starting XBUS/ABUS -> ATTR_PEER_TARGET -> destination XBUS/ABUS.
- TargetHandle_t destTarget = NULL;
-// FIXME - ATTR_PEER_TARGET support has not been ported to FSP yet.
-// if ( !busTarget->tryGetAttr<ATTR_PEER_TARGET>(destTarget) )
- if ( true )
+ } while(0);
+
+ return o_child;
+
+ #undef PRDF_FUNC
+}
+
+//------------------------------------------------------------------------------
+
+TargetHandle_t getConnectedPeerTarget( TargetHandle_t i_target )
+{
+ #define PRDF_FUNC "[PlatServices::getConnectedPeerTarget] "
+
+ TargetHandle_t o_target = NULL;
+
+ do
+ {
+ if ( NULL == i_target )
{
- PRDF_ERR( FUNC"Couldn't find destination bus" ); break;
+ PRDF_ERR( PRDF_FUNC"Given target is NULL" );
+ break;
}
- // Destination XBUS/ABUS <-> destination PROC.
- list = getConnected( destTarget, TYPE_PROC );
- if ( 1 != list.size() )
+ TYPE type = getTargetType( i_target );
+ if ( TYPE_XBUS != type && TYPE_ABUS != type )
{
- PRDF_ERR( FUNC"Couldn't find destination PROC" ); break;
+ PRDF_ERR( PRDF_FUNC"Target type not supported: i_target=0x%08x "
+ "type=0x%x", getHuid(i_target), type );
+ break;
}
- o_target = list[0];
+
+ o_target = i_target->getAttr<ATTR_PEER_TARGET>();
} while(0);
- if ( NULL == o_target )
+ return o_target;
+
+ #undef PRDF_FUNC
+}
+
+//------------------------------------------------------------------------------
+
+TargetHandle_t getConnectedPeerProc( TargetHandle_t i_procTarget,
+ TYPE i_busType, uint32_t i_busPos )
+{
+ #define PRDF_FUNC "[PlatServices::getConnectedPeerProc] "
+
+ TargetHandle_t o_target = NULL;
+
+ do
{
- PRDF_ERR( FUNC"Failed: i_procTarget=0x%08x i_busType=%d i_busPos=%d",
- getHuid(i_procTarget), i_busType, i_busPos );
- }
+ if ( NULL == i_procTarget || TYPE_PROC != getTargetType(i_procTarget) )
+ {
+ PRDF_ERR( PRDF_FUNC"Given target is not of TYPE_PROC: "
+ "i_procTarget=0x%08x", getHuid(i_procTarget) );
+ break;
+ }
- #undef FUNC
+ if ( !( ((TYPE_XBUS == i_busType) && (MAX_XBUS_PER_PROC > i_busPos)) ||
+ ((TYPE_ABUS == i_busType) && (MAX_ABUS_PER_PROC > i_busPos)) ) )
+ break;
+
+ // Starting PROC -> starting XBUS/ABUS.
+ TargetHandle_t busTarget = getConnectedChild( i_procTarget, i_busType,
+ i_busPos );
+ if ( NULL == busTarget ) break;
+
+ // Starting XBUS/ABUS -> ATTR_PEER_TARGET -> destination XBUS/ABUS.
+ TargetHandle_t destTarget = getConnectedPeerTarget( busTarget );
+ if ( NULL == destTarget ) break;
+
+ // Destination XBUS/ABUS -> destination PROC.
+ o_target = getConnectedParent( destTarget, TYPE_PROC );
+
+ } while(0);
return o_target;
+
+ #undef PRDF_FUNC
}
//------------------------------------------------------------------------------
@@ -814,11 +882,8 @@ uint32_t getNodePosition( TARGETING::TargetHandle_t i_target )
do
{
// Get the node handle.
- TargetHandle_t l_node = NULL;
- TargetHandleList l_list = getConnected( i_target, TYPE_NODE );
- if ( 1 == l_list.size() )
- l_node = l_list[0];
- else
+ TargetHandle_t node = getConnectedParent( i_target, TYPE_NODE );
+ if ( NULL == node )
{
PRDF_ERR( "[getNodePosition] Failed to get node target" );
break;
@@ -829,7 +894,7 @@ uint32_t getNodePosition( TARGETING::TargetHandle_t i_target )
// exist but it will, eventually. (RTC WI expected from Nick
// Bofferding)
EntityPath l_path ( EntityPath::PATH_PHYSICAL );
- int32_t l_rc = getEntityPath( l_node, l_path );
+ int32_t l_rc = getEntityPath( node, l_path );
if ( SUCCESS != l_rc ) break;
o_pos = l_path[l_path.size()-1].instance;
@@ -851,10 +916,12 @@ uint32_t getNodePosition( TARGETING::TargetHandle_t i_target )
//##
//##############################################################################
-int32_t getMasterRanks( TARGETING::TargetHandle_t i_memTarget,
+int32_t getMasterRanks( TargetHandle_t i_memTarget,
uint32_t i_portSlct, uint32_t i_dimmSlct,
std::vector<uint32_t> & o_ranks )
{
+ #define PRDF_FUNC "PlatServices::getMasterRanks] "
+
int32_t o_rc = FAIL;
do
@@ -865,8 +932,12 @@ int32_t getMasterRanks( TARGETING::TargetHandle_t i_memTarget,
(MAX_DIMM_PER_PORT <= i_dimmSlct) )
break;
- TARGETING::TargetHandle_t mbaTarget = getParent(i_memTarget, TYPE_MBA);
- if ( NULL == mbaTarget ) break;
+ TargetHandle_t mbaTarget = getConnectedParent( i_memTarget, TYPE_MBA );
+ if ( NULL == mbaTarget )
+ {
+ PRDF_ERR( PRDF_FUNC"getConnectedParent() failed" );
+ break;
+ }
uint8_t rankInfo[MAX_PORT_PER_MBA][MAX_DIMM_PER_PORT];
if( !mbaTarget->tryGetAttr<ATTR_EFF_DIMM_RANKS_CONFIGED>(rankInfo) )
@@ -917,8 +988,12 @@ uint32_t getMemChnl( TARGETING::TargetHandle_t i_memTarget )
{
if ( NULL == i_memTarget ) break;
- TARGETING::TargetHandle_t mcsTarget = getParent(i_memTarget, TYPE_MCS);
- if ( NULL == mcsTarget ) break;
+ TargetHandle_t mcsTarget = getConnectedParent( i_memTarget, TYPE_MCS );
+ if ( NULL == mcsTarget )
+ {
+ PRDF_ERR( PRDF_FUNC"getConnectedParent() failed" );
+ break;
+ }
o_chnl = getTargetPosition( mcsTarget );
@@ -944,25 +1019,17 @@ int32_t isMembufOnDimm( TARGETING::TargetHandle_t i_memTarget,
do
{
- TargetHandle_t mbaTarget = NULL;
-
- if ( TYPE_MBA == getTargetType(i_memTarget) )
+ // The DIMMs in an node should either all be buffered or all not. So
+ // we can check the attribute from ANY MBA.
+ TargetHandleList list = getConnected( i_memTarget, TYPE_MBA );
+ if ( 0 == list.size() )
{
- mbaTarget = i_memTarget;
- }
- else
- {
- // The DIMMs in an node should either all be buffered or all not. So
- // we can check the attribute from ANY MBA.
- TargetHandleList list = getConnected( i_memTarget, TYPE_MBA );
- if ( 0 == list.size() )
- {
- PRDF_ERR( "[isMembufOnDimm] Couldn't find an MBA target" );
- break;
- }
- mbaTarget = list[0];
+ PRDF_ERR( "[isMembufOnDimm] Couldn't find an MBA target" );
+ break;
}
+ TargetHandle_t mbaTarget = list[0];
+
o_isBuffered = mbaTarget->getAttr<ATTR_EFF_CUSTOM_DIMM>();
o_rc = SUCCESS;
diff --git a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H
index 1cde36316..8a20b967c 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H
+++ b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H
@@ -169,22 +169,34 @@ uint8_t getChipLevel( TARGETING::TargetHandle_t i_target );
* @param i_target The given target.
* @param i_connType Type of target(s) return in list
* @return The connected list of targets. On error, the list will be empty.
+ * @note If the given target is the same type as the given type, only the
+ * given target is returned in the list.
* @note This function does not support peer-to-peer connections.
*/
TARGETING::TargetHandleList getConnected( TARGETING::TargetHandle_t i_target,
TARGETING::TYPE i_connType );
/**
- * @brief Returns a functional target of a given type and given target
- * position that is associated with the given target.
+ * @brief Returns a functional parent target of a given type.
+ * @param i_target The given target.
+ * @param i_connType Type of target(s) return in list
+ * @note If the given target is the same type as the given type, the given
+ * target is returned.
+ * @return The requested parent target, NULL if something failed.
+ */
+TARGETING::TargetHandle_t getConnectedParent(TARGETING::TargetHandle_t i_target,
+ TARGETING::TYPE i_connType );
+
+/**
+ * @brief Returns a functional child target of a given type and position.
* @param i_target The given target.
* @param i_connType Type of target(s) return in list
* @param i_position Target position index
- * @return The requested target handle, otherwise NULL
+ * @return The requested child target, NULL if target not found.
*/
-TARGETING::TargetHandle_t getConnectedPos( TARGETING::TargetHandle_t i_target,
- TARGETING::TYPE i_type,
- uint32_t i_position );
+TARGETING::TargetHandle_t getConnectedChild( TARGETING::TargetHandle_t i_target,
+ TARGETING::TYPE i_connType,
+ uint32_t i_position );
/**
* @brief Returns the target of a PROC that is connected via the given
diff --git a/src/usr/diag/prdf/common/framework/service/prdf_ras_services.C b/src/usr/diag/prdf/common/framework/service/prdf_ras_services.C
index ff99980a7..5085c5011 100755
--- a/src/usr/diag/prdf/common/framework/service/prdf_ras_services.C
+++ b/src/usr/diag/prdf/common/framework/service/prdf_ras_services.C
@@ -67,6 +67,8 @@ using namespace TARGETING;
namespace PRDF
{
+using namespace PlatServices;
+
// ----------------------------------------------------------------------------
// Local macros and types
// ----------------------------------------------------------------------------
@@ -1260,10 +1262,15 @@ will also be removed. Need to confirm if this code is required anymore.
{
// Centaur Checkstop
TargetHandle_t centaurHandle = l_dumpHandle;
- if (l_targetType != TYPE_MEMBUF)
+ if ( TYPE_MCS == l_targetType )
+ {
+ centaurHandle = getConnectedChild( l_dumpHandle,
+ TYPE_MEMBUF, 0 );
+ }
+ else if ( TYPE_MBA == l_targetType )
{
- centaurHandle = PlatServices::getConnected(l_dumpHandle,
- TYPE_MEMBUF) [0];
+ centaurHandle = getConnectedParent( l_dumpHandle,
+ TYPE_MEMBUF );
}
if (centaurHandle)
diff --git a/src/usr/diag/prdf/common/plat/pegasus/Ex.rule b/src/usr/diag/prdf/common/plat/pegasus/Ex.rule
index 34f375f8e..e88340852 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/Ex.rule
+++ b/src/usr/diag/prdf/common/plat/pegasus/Ex.rule
@@ -1440,7 +1440,7 @@ actionclass L2ChipLevel2
actionclass calloutProcLow
{
- callout(connected(TYPE_PROC,0),MRU_LOW);
+ callout(connected(TYPE_PROC),MRU_LOW);
};
actionclass L2PowerBusCE
diff --git a/src/usr/diag/prdf/common/plat/pegasus/Membuf.rule b/src/usr/diag/prdf/common/plat/pegasus/Membuf.rule
index 9707d9caa..1aaaef3de 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/Membuf.rule
+++ b/src/usr/diag/prdf/common/plat/pegasus/Membuf.rule
@@ -89,7 +89,7 @@ chip Membuf
.include "Membuf_regs_MEM.rule"
############################################################################
- # Non-existant Registers for Capture
+ # Non-existent Registers for Capture
############################################################################
register VPD_FAILED_LANES_0TO63
diff --git a/src/usr/diag/prdf/common/plat/pegasus/Proc.rule b/src/usr/diag/prdf/common/plat/pegasus/Proc.rule
index 82c09a2a7..37e55a9b6 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/Proc.rule
+++ b/src/usr/diag/prdf/common/plat/pegasus/Proc.rule
@@ -101,9 +101,7 @@ chip Proc
.include "Proc_regs_PCIE.rule"
########################################################################
- #
- # Non-existant Registers for Capture
- #
+ # Non-existent Registers for Capture
########################################################################
register VPD_FAILED_LANES_0TO63
{
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H
index a3bab0d26..a239ad48d 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H
@@ -25,15 +25,16 @@
#define PRDF_CEN_MBA_DATABUNDLE_COMMON_H
/** @file prdfCenMbaDataBundle_common.H
- * @brief Contains the common data bundle for a PRD Centaur MBA object.
+ * @brief Contains the common data bundle for a Centaur MBA object.
*/
-//------------------------------------------------------------------------------
+#include <iipSystem.h>
+#include <prdfExtensibleChip.H>
+#include <prdfGlobal.H>
+#include <prdfPlatServices.H>
namespace PRDF
{
-//Forward decalration
-class ExtensibleChip;
/**
* @brief The P8 Centaur MBA data bundle.
@@ -47,15 +48,30 @@ class CenMbaDataBundleCommon : public DataBundle
* @param i_mbaChip The MBA chip.
*/
explicit CenMbaDataBundleCommon( ExtensibleChip * i_mbaChip ) :
- iv_mbaChip(i_mbaChip)
- {
- }
+ iv_mbaChip(i_mbaChip), iv_membChip(NULL)
+ {}
/**
* @brief Destructor.
*/
- ~CenMbaDataBundleCommon()
+ ~CenMbaDataBundleCommon() {}
+
+ /** @return The connected MEMBUF chip. */
+ ExtensibleChip * getMembChip()
{
+ using namespace TARGETING;
+ using namespace PlatServices;
+
+ if ( NULL == iv_membChip )
+ {
+ TargetHandle_t mba = iv_mbaChip->GetChipHandle();
+
+ TargetHandle_t memb = getConnectedParent( mba, TYPE_MEMBUF );
+ if ( NULL != memb )
+ iv_membChip = (ExtensibleChip *)systemPtr->GetChip( memb );
+ }
+
+ return iv_membChip;
}
private: // functions
@@ -65,7 +81,8 @@ class CenMbaDataBundleCommon : public DataBundle
private: // instance variables
- ExtensibleChip *iv_mbaChip; // mba chip
+ ExtensibleChip * iv_mbaChip; ///< This MBA chip
+ ExtensibleChip * iv_membChip; ///< The connected MEMBUF chip
};
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
index d19c293c6..4083d449a 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
@@ -111,30 +111,12 @@ int32_t MBA1_Starvation( ExtensibleChip * i_membChip,
STEP_CODE_DATA_STRUCT & i_sc )
{
using namespace TARGETING;
- CenMembufDataBundle * l_membdb = getCenMembufDataBundle(i_membChip);
+ CenMembufDataBundle * l_membdb = getMembufDataBundle(i_membChip);
do
{
- // Get MBA1 chip object
- TargetHandle_t l_mba1Target = NULL;
- TargetHandleList l_mbaList =
- PlatServices::getConnected( i_membChip->GetChipHandle(),
- TYPE_MBA );
-
- TargetHandleList::iterator iter = l_mbaList.begin();
- for( ; iter != l_mbaList.end(); ++iter)
- {
- if( 1 == PlatServices::getTargetPosition( *iter ) )
- {
- l_mba1Target = *iter;
- break;
- }
- }
-
- if( NULL == l_mba1Target )
- {
- break; // No MBA1 target, exit early
- }
+ ExtensibleChip * mba1Chip = l_membdb->getMbaChip(1);
+ if ( NULL == mba1Chip ) break; // No MBA1 target, exit early
if ( l_membdb->iv_analyzeMba1Starvation )
{
@@ -184,25 +166,14 @@ int32_t MBA1_Starvation( ExtensibleChip * i_membChip,
// MBA0 takes priority next
l_membdb->iv_analyzeMba1Starvation = false;
- ExtensibleChip * l_mbaChip =
- (ExtensibleChip *)systemPtr->GetChip(l_mba1Target);
-
- if( NULL == l_mbaChip )
- {
- break; // no MBA1 target, break out
- }
-
// Analyze MBA1
- return l_mbaChip->Analyze(i_sc,
- i_sc.service_data->GetCauseAttentionType());
+ return mba1Chip->Analyze( i_sc,
+ i_sc.service_data->GetCauseAttentionType() );
}
else
{
- if( NULL != l_mba1Target )
- {
- // MBA1 takes priority next
- l_membdb->iv_analyzeMba1Starvation = true;
- }
+ // MBA1 takes priority next
+ l_membdb->iv_analyzeMba1Starvation = true;
}
} while (0);
@@ -236,7 +207,7 @@ int32_t PreAnalysis( ExtensibleChip * i_mbChip, STEP_CODE_DATA_STRUCT & i_sc,
if ( i_sc.service_data->GetFlag(ServiceDataCollector::UNIT_CS) )
break;
- CenMembufDataBundle * mbdb = getCenMembufDataBundle(i_mbChip);
+ CenMembufDataBundle * mbdb = getMembufDataBundle(i_mbChip);
ExtensibleChip * mcsChip = mbdb->getMcsChip();
if ( NULL == mcsChip )
{
@@ -291,7 +262,7 @@ int32_t PostAnalysis( ExtensibleChip * i_mbChip, STEP_CODE_DATA_STRUCT & i_sc )
// In hostboot, we need to clear associated bits in the MCIFIR bits.
do
{
- CenMembufDataBundle * mbdb = getCenMembufDataBundle(i_mbChip);
+ CenMembufDataBundle * mbdb = getMembufDataBundle(i_mbChip);
ExtensibleChip * mcsChip = mbdb->getMcsChip();
if ( NULL == mcsChip )
{
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufDataBundle.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufDataBundle.H
index 54a6ba383..3b6f4a794 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufDataBundle.H
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufDataBundle.H
@@ -28,16 +28,14 @@
* @brief Contains the common data bundle for a PRD Centaur object.
*/
+#include <iipSystem.h>
#include <prdfExtensibleChip.H>
+#include <prdfGlobal.H>
#include <prdfPlatServices.H>
-using namespace TARGETING;
-
namespace PRDF
{
-using namespace PlatServices;
-
/**
* @brief Data container for the Centaur Membuf chip.
*/
@@ -46,9 +44,13 @@ class CenMembufDataBundle : public DataBundle
public:
/** @brief Constructor */
- CenMembufDataBundle( ExtensibleChip * i_mbChip ) :
- iv_mbChip(i_mbChip), iv_mcsChip(NULL), iv_analyzeMba1Starvation(false)
- {}
+ CenMembufDataBundle( ExtensibleChip * i_membChip ) :
+ iv_membChip(i_membChip), iv_mcsChip(NULL),
+ iv_analyzeMba1Starvation(false)
+ {
+ for ( uint32_t i = 0; i < MAX_MBA_PER_MEMBUF; i++ )
+ iv_mbaChips[i] = NULL;
+ }
/** @brief Destructor */
~CenMembufDataBundle() {}
@@ -56,20 +58,52 @@ class CenMembufDataBundle : public DataBundle
/** @return The connected MCS chip. */
ExtensibleChip * getMcsChip()
{
+ using namespace TARGETING;
+ using namespace PlatServices;
+
if ( NULL == iv_mcsChip )
{
- TargetHandleList list = getConnected( iv_mbChip->GetChipHandle(),
- TYPE_MCS );
- if ( 1 == list.size() )
- iv_mcsChip = (ExtensibleChip *)systemPtr->GetChip( list[0] );
- else
+ TargetHandle_t memb = iv_membChip->GetChipHandle();
+
+ TargetHandle_t mcs = getConnectedParent( memb, TYPE_MCS );
+ if ( NULL != mcs )
+ iv_mcsChip = (ExtensibleChip *)systemPtr->GetChip( mcs );
+ }
+
+ return iv_mcsChip;
+ }
+
+ /** @return The connected MBA0 chip. */
+ ExtensibleChip * getMbaChip( uint32_t i_pos )
+ {
+ using namespace TARGETING;
+ using namespace PlatServices;
+
+ ExtensibleChip * mbaChip = NULL;
+
+ if ( MAX_MBA_PER_MEMBUF > i_pos )
+ {
+ if ( NULL == iv_mbaChips[i_pos] )
{
- PRDF_ERR( "[CenMembufDataBundle::getMcsChip] "
- "getConnected() failed" );
+ TargetHandle_t memb = iv_membChip->GetChipHandle();
+
+ TargetHandle_t mba = getConnectedChild( memb, TYPE_MBA, i_pos );
+ if ( NULL != mba )
+ {
+ iv_mbaChips[i_pos]
+ = (ExtensibleChip *)systemPtr->GetChip(mba);
+ }
}
+
+ mbaChip = iv_mbaChips[i_pos];
+ }
+ else
+ {
+ PRDF_ERR( "[CenMembufDataBundle::getMbaChip] Invalid parameter: "
+ "i_pos=%d", i_pos );
}
- return iv_mcsChip;
+ return mbaChip;
}
private: // functions
@@ -79,8 +113,9 @@ class CenMembufDataBundle : public DataBundle
private: // instance variables
- ExtensibleChip * iv_mbChip; ///< The Centaur chip
- ExtensibleChip * iv_mcsChip; ///< The connected MCS chip
+ ExtensibleChip * iv_membChip; ///< This MEMBUF chip
+ ExtensibleChip * iv_mcsChip; ///< The connected MCS chip
+ ExtensibleChip * iv_mbaChips[MAX_MBA_PER_MEMBUF]; ///< Connected MBA chips
public: // instance variables
@@ -93,7 +128,7 @@ class CenMembufDataBundle : public DataBundle
* @param i_membChip The centaur chip.
* @return This centaur's data bundle.
*/
-CenMembufDataBundle * getCenMembufDataBundle( ExtensibleChip * i_membChip )
+inline CenMembufDataBundle * getMembufDataBundle( ExtensibleChip * i_membChip )
{
return static_cast<CenMembufDataBundle *>(i_membChip->getDataBundle());
}
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.H
index 9af918838..66744996f 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.H
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.H
@@ -20,6 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
+
#ifndef prdfCenSymbol_H
#define prdfCenSymbol_H
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfLaneRepair.C b/src/usr/diag/prdf/common/plat/pegasus/prdfLaneRepair.C
index cfd99304b..a0cd276b6 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfLaneRepair.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfLaneRepair.C
@@ -69,9 +69,8 @@ int32_t handleLaneRepairEvent (ExtensibleChip * i_chip,
else if (iChipType == TYPE_PROC)
{
// i_chip is a Proc, Get connected XBUS, ABUS, or MCS target
- rxBusTgt = getConnectedPos(i_chip->GetChipHandle(),
- i_busType,
- i_busPos);
+ rxBusTgt = getConnectedChild( i_chip->GetChipHandle(),
+ i_busType, i_busPos );
if ( NULL == rxBusTgt )
{
PRDF_ERR( "[LaneRepair::handleLaneRepairEvent] HUID: 0x%08x "
@@ -98,11 +97,11 @@ int32_t handleLaneRepairEvent (ExtensibleChip * i_chip,
}
else if (i_busType == TYPE_MEMBUF)
{
- txBusTgt = getConnected(rxBusTgt, TYPE_MCS)[0];
+ txBusTgt = getConnectedParent(rxBusTgt, TYPE_MCS);
}
else if (i_busType == TYPE_MCS)
{
- txBusTgt = getConnected(rxBusTgt, TYPE_MEMBUF)[0];
+ txBusTgt = getConnectedChild(rxBusTgt, TYPE_MEMBUF, 0);
}
if ( NULL == txBusTgt )
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfMemoryMru.C b/src/usr/diag/prdf/common/plat/pegasus/prdfMemoryMru.C
index 3f9c3d3dc..c9a358868 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfMemoryMru.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfMemoryMru.C
@@ -150,15 +150,15 @@ MemoryMru::MemoryMru( TARGETING::TargetHandle_t i_mbaTarget,
do
{
- TargetHandleList nodeList = getConnected( iv_mbaTarget, TYPE_NODE );
- if ( 1 != nodeList.size() )
+ TargetHandle_t node = getConnectedParent( iv_mbaTarget, TYPE_NODE );
+ if ( NULL == node )
{
PRDF_ERR( PRDF_FUNC"Could not find node attached to MBA 0x%08x",
getHuid(iv_mbaTarget) );
break;
}
- iv_memMruMeld.s.nodePos = getTargetPosition( nodeList[0] );
+ iv_memMruMeld.s.nodePos = getTargetPosition( node );
iv_memMruMeld.s.mbaPos = getTargetPosition( iv_mbaTarget );
iv_memMruMeld.s.rank = iv_rank.flatten();
iv_memMruMeld.s.symbol = iv_symbol.getSymbol();
@@ -188,15 +188,15 @@ MemoryMru::MemoryMru( TARGETING::TargetHandle_t i_mbaTarget,
do
{
- TargetHandleList nodeList = getConnected( iv_mbaTarget, TYPE_NODE );
- if ( 1 != nodeList.size() )
+ TargetHandle_t node = getConnectedParent( iv_mbaTarget, TYPE_NODE );
+ if ( NULL == node )
{
PRDF_ERR( PRDF_FUNC"Could not find node attached to MBA 0x%08x",
getHuid(iv_mbaTarget) );
break;
}
- iv_memMruMeld.s.nodePos = getTargetPosition( nodeList[0] );
+ iv_memMruMeld.s.nodePos = getTargetPosition( node );
iv_memMruMeld.s.mbaPos = getTargetPosition( iv_mbaTarget );
iv_memMruMeld.s.rank = iv_rank.flatten();
iv_memMruMeld.s.symbol = iv_special;
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C
index 92d0f46b8..4177f59d9 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C
@@ -31,6 +31,7 @@
#include <UtilHash.H>
#include <prdfGlobal.H>
#include <iipSystem.h>
+#include <prdfP8McsDataBundle.H>
//##############################################################################
//
@@ -40,6 +41,7 @@
namespace PRDF
{
+
namespace Mcs
{
@@ -50,7 +52,7 @@ namespace Mcs
*/
int32_t Initialize( ExtensibleChip * i_mcsChip )
{
- // FIXME: Add proper initialization as per requirement
+ i_mcsChip->getDataBundle() = new P8McsDataBundle( i_mcsChip );
return SUCCESS;
}
PRDF_PLUGIN_DEFINE( Mcs, Initialize );
@@ -98,14 +100,12 @@ int32_t CheckCentaurCheckstop( ExtensibleChip * i_mcsChip,
i_mcsChip->CaptureErrorData(i_sc.service_data->GetCaptureData(),
Util::hashString("CENT_XSTP_FFDC"));
- ExtensibleChip * l_cent = (ExtensibleChip *)
- systemPtr->GetChip(PlatServices::getConnected(
- i_mcsChip->GetChipHandle(),
- TARGETING::TYPE_MEMBUF)[0] );
- if (l_cent)
+ P8McsDataBundle * mcsdb = getMcsDataBundle( i_mcsChip );
+ ExtensibleChip * membChip = mcsdb->getMembChip();
+ if ( NULL != membChip )
{
- l_cent->CaptureErrorData(i_sc.service_data->GetCaptureData(),
- Util::hashString("CENT_XSTP_FFDC"));
+ membChip->CaptureErrorData( i_sc.service_data->GetCaptureData(),
+ Util::hashString("CENT_XSTP_FFDC") );
}
} while (0);
@@ -148,31 +148,30 @@ int32_t PostAnalysis( ExtensibleChip * i_mcsChip,
{
int32_t l_rc = SUCCESS;
- if (i_sc.service_data->GetFlag(ServiceDataCollector::UNIT_CS))
+ if ( i_sc.service_data->GetFlag(ServiceDataCollector::UNIT_CS) )
{
- ExtensibleChip * l_cent = (ExtensibleChip *)
- systemPtr->GetChip(PlatServices::getConnected(
- i_mcsChip->GetChipHandle(),
- TARGETING::TYPE_MEMBUF)[0] );
- if (l_cent)
+ P8McsDataBundle * mcsdb = getMcsDataBundle( i_mcsChip );
+ ExtensibleChip * membChip = mcsdb->getMembChip();
+ if ( NULL != membChip )
{
// Mask attentions from the Centaur
- SCAN_COMM_REGISTER_CLASS * l_tpfirmask = NULL;
+ SCAN_COMM_REGISTER_CLASS * l_tpfirmask = NULL;
SCAN_COMM_REGISTER_CLASS * l_nestfirmask = NULL;
- SCAN_COMM_REGISTER_CLASS * l_memfirmask = NULL;
- SCAN_COMM_REGISTER_CLASS * l_memspamask = NULL;
+ SCAN_COMM_REGISTER_CLASS * l_memfirmask = NULL;
+ SCAN_COMM_REGISTER_CLASS * l_memspamask = NULL;
- l_tpfirmask = l_cent->getRegister("TP_CHIPLET_FIR_MASK");
- l_nestfirmask = l_cent->getRegister("NEST_CHIPLET_FIR_MASK");
- l_memfirmask = l_cent->getRegister("MEM_CHIPLET_FIR_MASK");
- l_memspamask = l_cent->getRegister("MEM_CHIPLET_SPA_MASK");
+ l_tpfirmask = membChip->getRegister("TP_CHIPLET_FIR_MASK");
+ l_nestfirmask = membChip->getRegister("NEST_CHIPLET_FIR_MASK");
+ l_memfirmask = membChip->getRegister("MEM_CHIPLET_FIR_MASK");
+ l_memspamask = membChip->getRegister("MEM_CHIPLET_SPA_MASK");
- l_tpfirmask->setAllBits(); l_rc |= l_tpfirmask->Write();
+ l_tpfirmask->setAllBits(); l_rc |= l_tpfirmask->Write();
l_nestfirmask->setAllBits(); l_rc |= l_nestfirmask->Write();
- l_memfirmask->setAllBits(); l_rc |= l_memfirmask->Write();
- l_memspamask->setAllBits(); l_rc |= l_memspamask->Write();
+ l_memfirmask->setAllBits(); l_rc |= l_memfirmask->Write();
+ l_memspamask->setAllBits(); l_rc |= l_memspamask->Write();
}
}
+
return SUCCESS;
}
PRDF_PLUGIN_DEFINE( Mcs, PostAnalysis );
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H b/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H
new file mode 100644
index 000000000..7b0dc8287
--- /dev/null
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H
@@ -0,0 +1,103 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#ifndef __prdfP8McsDataBundle_H
+#define __prdfP8McsDataBundle_H
+
+/** @file prdfP8McsDataBundle.H
+ * @brief Contains the data bundle for a P8 MCS object.
+ */
+
+#include <iipSystem.h>
+#include <prdfExtensibleChip.H>
+#include <prdfGlobal.H>
+#include <prdfPlatServices.H>
+
+namespace PRDF
+{
+
+/**
+ * @brief The P8 Centaur MBA data bundle.
+ */
+class P8McsDataBundle : public DataBundle
+{
+ public: // functions
+
+ /**
+ * @brief Constructor.
+ * @param i_mcsChip The MCS chip.
+ */
+ explicit P8McsDataBundle( ExtensibleChip * i_mcsChip ) :
+ iv_mcsChip(i_mcsChip), iv_membChip(NULL)
+ {}
+
+ /**
+ * @brief Destructor.
+ */
+ ~P8McsDataBundle() {}
+
+ /** @return The connected MEMBUF chip. */
+ ExtensibleChip * getMembChip()
+ {
+ using namespace TARGETING;
+ using namespace PlatServices;
+
+ if ( NULL == iv_membChip )
+ {
+ TargetHandle_t mcs = iv_mcsChip->GetChipHandle();
+
+ TargetHandle_t memb = getConnectedChild( mcs, TYPE_MEMBUF, 0 );
+ if ( NULL != memb )
+ iv_membChip = (ExtensibleChip *)systemPtr->GetChip( memb );
+ }
+
+ return iv_membChip;
+ }
+
+ private: // functions
+
+ P8McsDataBundle( const P8McsDataBundle & );
+ const P8McsDataBundle & operator=( const P8McsDataBundle & );
+
+ private: // instance variables
+
+ ExtensibleChip * iv_mcsChip; ///< This MCS chip
+ ExtensibleChip * iv_membChip; ///< The connected MEMBUF chip
+};
+
+//------------------------------------------------------------------------------
+
+/**
+ * @brief Wrapper function for the P8McsDataBundle.
+ * @param i_mcsChip The MCS chip.
+ * @return This MBA's data bundle.
+ */
+inline P8McsDataBundle * getMcsDataBundle( ExtensibleChip * i_mcsChip )
+{
+ return static_cast<P8McsDataBundle *>(i_mcsChip->getDataBundle());
+}
+
+} // end namespace PRDF
+
+#endif // __prdfP8McsDataBundle_H
+
diff --git a/src/usr/diag/prdf/test/prdfTest_McsMciFir.H b/src/usr/diag/prdf/test/prdfTest_McsMciFir.H
index 62e3dc582..e1317424b 100644
--- a/src/usr/diag/prdf/test/prdfTest_McsMciFir.H
+++ b/src/usr/diag/prdf/test/prdfTest_McsMciFir.H
@@ -21,7 +21,6 @@
/* */
/* IBM_PROLOG_END_TAG */
-
#ifndef __TEST_PRDFMCSMCIFIR_H
#define __TEST_PRDFMCSMCIFIR_H
OpenPOWER on IntegriCloud