summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C')
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C89
1 files changed, 67 insertions, 22 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
index f5ba62b79..a7c977294 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
@@ -1172,45 +1172,38 @@ int32_t handleMcsChnlCs( ExtensibleChip * i_membChip,
//------------------------------------------------------------------------------
/**
- * @brief Handles MBACALFIR RCD Parity error bits, if they exist.
+ * @brief Handles MBACALFIR RCD Parity error bits, if they exist on a single mba
*
* @param i_membChip The Centaur chip.
* @param i_sc ServiceDataCollector.
+ * @param i_mbaPos The MBA position.
*
* @return SUCCESS if MBACALFIR Parity error is present and properly
* handled, FAIL otherwise.
*/
-int32_t handleMbaCalParityErr( ExtensibleChip * i_membChip,
- STEP_CODE_DATA_STRUCT & i_sc )
+int32_t handleSingleMbaCalParityErr( ExtensibleChip * i_membChip,
+ STEP_CODE_DATA_STRUCT & i_sc,
+ uint32_t i_mbaPos)
{
- #define PRDF_FUNC "[handleMbaCalParityErr] "
-
- // We will return FAIL from this function if MBACALFIR parity error bits are
- // not set. If MBACALFIR parity error bits are set, we will try to analyze
- // the MBACALFIR. If MBACALFIR is not analyzed properly, we will return
- // FAIL. This will trigger rule code to execute alternate resolution.
+ #define PRDF_FUNC "[handleSingleMbaCalParityErr] "
- int32_t l_rc;
+ int32_t l_rc = SUCCESS;
CenMembufDataBundle * mbdb = getMembufDataBundle( i_membChip );
- // We will loop through to check all MBA if necessary until one is found
- // with parity error bits set
- for ( uint32_t i = 0; i < MAX_MBA_PER_MEMBUF; i++)
+ do
{
- l_rc = SUCCESS;
-
- ExtensibleChip * mbaChip = mbdb->getMbaChip(i);
+ ExtensibleChip * mbaChip = mbdb->getMbaChip(i_mbaPos);
if ( NULL == mbaChip )
{
l_rc = FAIL;
- continue;
+ break;
}
SCAN_COMM_REGISTER_CLASS * mbaCalFir =
- mbaChip->getRegister("MBACALFIR");
+ mbaChip->getRegister("MBACALFIR");
SCAN_COMM_REGISTER_CLASS * mbaCalMask =
- mbaChip->getRegister("MBACALFIR_MASK");
+ mbaChip->getRegister("MBACALFIR_MASK");
l_rc = mbaCalFir->Read();
l_rc |= mbaCalMask->Read();
@@ -1218,8 +1211,8 @@ int32_t handleMbaCalParityErr( ExtensibleChip * i_membChip,
if ( SUCCESS != l_rc )
{
PRDF_ERR( PRDF_FUNC "MBACALFIR/MBACALFIR_MASK read failed for"
- "0x%08x", mbaChip->GetId());
- continue;
+ "0x%08x", mbaChip->GetId());
+ break;
}
// If any of the MBACALFIR parity error bits are set, we will
@@ -1234,11 +1227,51 @@ int32_t handleMbaCalParityErr( ExtensibleChip * i_membChip,
if ( ( bit4 && !mask4 ) || ( bit7 && !mask7 ) )
{
l_rc = mbaChip->Analyze( i_sc,
- i_sc.service_data->getSecondaryAttnType() );
+ i_sc.service_data->getSecondaryAttnType() );
if ( SUCCESS == l_rc ) break;
}
l_rc = FAIL;
+
+ }while(0);
+
+ return l_rc;
+ #undef PRDF_FUNC
+
+} PRDF_PLUGIN_DEFINE( Membuf, handleSingleMbaCalParityErr );
+
+//------------------------------------------------------------------------------
+
+/**
+ * @brief Handles MBACALFIR RCD Parity error bits, if they exist.
+ *
+ * @param i_membChip The Centaur chip.
+ * @param i_sc ServiceDataCollector.
+ *
+ * @return SUCCESS if MBACALFIR Parity error is present and properly
+ * handled, FAIL otherwise.
+ */
+int32_t handleMbaCalParityErr( ExtensibleChip * i_membChip,
+ STEP_CODE_DATA_STRUCT & i_sc )
+{
+ #define PRDF_FUNC "[handleMbaCalParityErr] "
+
+ // We will return FAIL from this function if MBACALFIR parity error bits are
+ // not set. If MBACALFIR parity error bits are set, we will try to analyze
+ // the MBACALFIR. If MBACALFIR is not analyzed properly, we will return
+ // FAIL. This will trigger rule code to execute alternate resolution.
+
+ int32_t l_rc;
+
+ // We will loop through to check all MBA if necessary until one is found
+ // with parity error bits set
+ for ( uint32_t i = 0; i < MAX_MBA_PER_MEMBUF; i++)
+ {
+ l_rc = SUCCESS;
+
+ l_rc = handleSingleMbaCalParityErr( i_membChip, i_sc, i );
+
+ if ( SUCCESS == l_rc ) break;
}
return l_rc;
@@ -1418,6 +1451,18 @@ PLUGIN_MEMORY_MPE_ERROR( 1, 7 )
#undef PLUGIN_MEMORY_MPE_ERROR
+// Define the plugins for RCD parity error memory UE side-effects
+#define PLUGIN_RCD_PARITY_UE_SIDEEFFECTS( MBA ) \
+int32_t handleSingleMbaCalParityErr##MBA( ExtensibleChip * i_membChip, \
+ STEP_CODE_DATA_STRUCT & i_sc) \
+{ \
+ return handleSingleMbaCalParityErr( i_membChip, i_sc, MBA ); \
+} \
+PRDF_PLUGIN_DEFINE( Membuf, handleSingleMbaCalParityErr##MBA );
+
+PLUGIN_RCD_PARITY_UE_SIDEEFFECTS ( 0 )
+PLUGIN_RCD_PARITY_UE_SIDEEFFECTS ( 1 )
+
//------------------------------------------------------------------------------
int32_t calloutInterface_dmi( ExtensibleChip * i_membChip,
OpenPOWER on IntegriCloud