summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2014-09-18 18:14:48 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-12-02 18:02:53 -0600
commit0ec38885b504dcadb28293d6bb5e77b4a28e65b1 (patch)
tree188cbfba5042c8a435cd7dc2a4d1d4c754820442 /src
parent03d39f2bbcef34ef34eabdf8e64b5cfe52f2d6f7 (diff)
downloadtalos-hostboot-0ec38885b504dcadb28293d6bb5e77b4a28e65b1.tar.gz
talos-hostboot-0ec38885b504dcadb28293d6bb5e77b4a28e65b1.zip
PRD: Shut down mirror on threshold of mirrored memory UEs
Change-Id: I39c0d302788092378dea15dbf106e4e600ef6ae2 CQ: SW274471 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13483 Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Tested-by: Jenkins Server Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14600 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/Mcs.rule30
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C79
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H47
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfP8McsExtraSig.H7
4 files changed, 156 insertions, 7 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule b/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule
index 58c2f6ca2..008b4f1cb 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule
+++ b/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule
@@ -154,7 +154,19 @@ chip Mcs
{
name "MC0.MCS0.LEFT.LEFT.MCFGPQ";
scomaddr 0x02011800;
- capture group never;
+ capture group default;
+ };
+
+ ############################################################################
+ # MCS Hardware Force Mirror Read SUE
+ ############################################################################
+
+ register MCHWFM
+ {
+ name "MC0.MCS0.LEFT.LEFT.MCHWFMQ";
+ scomaddr 0x0201181C;
+ capture group MirrorRegs; # Only valid on even MCSs of the mirror.
+ # Will have to capture manually.
};
};
@@ -187,7 +199,8 @@ rule MciFir
group gMciFir attntype CHECK_STOP, RECOVERABLE, SPECIAL, UNIT_CS
filter priority( 8, 9, 22, 23, 6, 0, 40, # Channel failure
- 20, 5, 10 ) # Recoverable
+ 20, 5, 10 ), # Recoverable
+ secondarybits( 32 )
{
/** MCIFIR[0]
* MCIFIRQ_REPLAY_TIMEOUT
@@ -361,9 +374,9 @@ group gMciFir attntype CHECK_STOP, RECOVERABLE, SPECIAL, UNIT_CS
(MciFir, bit(31)) ? defaultMaskedError;
/** MCIFIR[32]
- * MCIFIRQ_MIRROR_ACTION_OCCURRED
+ * Mirror action occurred
*/
- (MciFir, bit(32)) ? defaultMaskedError;
+ (MciFir, bit(32)) ? handleMirrorAction;
/** MCIFIR[33]
* MCIFIRQ_NONFOREIGN_ACCESS_TO_FOREIGN_BAR
@@ -568,3 +581,12 @@ actionclass calloutDmiBusSelfLowConnMed
calloutDmiBusSymFru;
threshold1;
};
+
+/** Handles memory mirror action event */
+actionclass handleMirrorAction
+{
+ calloutSelfMed;
+ threshold( field(33 / 30 min) );
+ funccall( "handleMirrorAction" );
+};
+
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C
index 083fd95fd..9fdea8e85 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C
@@ -291,6 +291,85 @@ PRDF_PLUGIN_DEFINE( Mcs, dd1mcifirBit##BITNUM );
PLUGIN_MCIFIR_DD1_CHECK( 48 )
PLUGIN_MCIFIR_DD1_CHECK( 49 )
+//------------------------------------------------------------------------------
+
+/**
+ * @brief Handles a memory mirror action event.
+ * @param i_mcsChip An MCS chip.
+ * @param i_sc The step code data struct
+ * @returns SUCCESS always
+ */
+int32_t handleMirrorAction( ExtensibleChip * i_mcsChip,
+ STEP_CODE_DATA_STRUCT & i_sc )
+{
+ #define PRDF_FUNC "[ClearMbsSecondaryBits] "
+
+ int32_t l_rc = SUCCESS;
+
+ do
+ {
+ // Get the primary MCS of the mirrored pair.
+ P8McsDataBundle * mcsdb = getMcsDataBundle( i_mcsChip );
+ ExtensibleChip * primcs = mcsdb->getPrimaryMirroredMcs();
+ if ( NULL == primcs )
+ {
+ PRDF_ERR( PRDF_FUNC"getPrimaryMirroredMcs() failed: "
+ "i_mcsChip=0x%08x", i_mcsChip->GetId() );
+ break;
+ }
+
+ // Manually capture the registers needed from the primary MCS.
+ CaptureData & cd = i_sc.service_data->GetCaptureData();
+ primcs->CaptureErrorData( cd, Util::hashString("MirrorRegs") );
+
+ SCAN_COMM_REGISTER_CLASS * reg = primcs->getRegister("MCHWFM");
+ l_rc = reg->Read();
+ if ( SUCCESS != l_rc )
+ {
+ PRDF_ERR( PRDF_FUNC"Read() failed on MCHWFM: primcs=0x%08x",
+ primcs->GetId() );
+ break;
+ }
+
+ if ( i_sc.service_data->IsAtThreshold() )
+ {
+ if ( reg->IsBitSet(1) ) // Mirror disabled.
+ {
+ // Error log will be predictive.
+ i_sc.service_data->SetErrorSig( PRDFSIG_MirrorActionTH );
+ }
+ else // Mirror still enabled but getting a flood of attentions.
+ {
+ // Just submit the error log as hidden.
+ i_sc.service_data->Nologging();
+ i_sc.service_data->Gard( GardAction::NoGard );
+ }
+ }
+ else // Under threshold
+ {
+ // Re-enable the mirror.
+ reg->ClearBit(1);
+ reg->ClearBit(2);
+ reg->ClearBit(3);
+
+ l_rc = reg->Write();
+ if ( SUCCESS != l_rc )
+ {
+ PRDF_ERR( PRDF_FUNC"Write() failed on MCHWFM: primcs=0x%08x",
+ primcs->GetId() );
+ break;
+ }
+ }
+
+ } while (0);
+
+ return SUCCESS;
+
+ #undef PRDF_FUNC
+}
+PRDF_PLUGIN_DEFINE( Mcs, handleMirrorAction );
+
+
} // end namespace Mcs
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H b/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H
index 053b472e8..338a99468 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -32,6 +34,7 @@
#include <prdfExtensibleChip.H>
#include <prdfGlobal.H>
#include <prdfPlatServices.H>
+#include <prdfParserEnums.H>
namespace PRDF
{
@@ -48,7 +51,7 @@ class P8McsDataBundle : public DataBundle
* @param i_mcsChip The MCS chip.
*/
explicit P8McsDataBundle( ExtensibleChip * i_mcsChip ) :
- iv_mcsChip(i_mcsChip), iv_membChip(NULL)
+ iv_mcsChip(i_mcsChip), iv_membChip(NULL), iv_primMirMcsChip(NULL)
{}
/**
@@ -74,6 +77,43 @@ class P8McsDataBundle : public DataBundle
return iv_membChip;
}
+ /** @return The primary MCS of a mirrored MCS pair. */
+ ExtensibleChip * getPrimaryMirroredMcs()
+ {
+ using namespace TARGETING;
+ using namespace PlatServices;
+
+ do
+ {
+ if ( NULL != iv_primMirMcsChip ) break; // nothing to do.
+
+ TargetHandle_t mcs = iv_mcsChip->GetChipHandle();
+ uint32_t pos = getTargetPosition(mcs);
+
+ if ( MAX_MCS_PER_PROC <= pos ) break; // can't continue, return NULL
+
+ if ( 0 == (pos & 0x1) ) // This is the primary.
+ {
+ iv_primMirMcsChip = iv_mcsChip;
+ }
+ else // The other MCS is the primary.
+ {
+ pos &= ~0x1; // get even position
+
+ TargetHandle_t proc = getConnectedParent( mcs, TYPE_PROC );
+ if ( NULL == proc ) break; // can't continue, return NULL
+
+ TargetHandle_t pmcs = getConnectedChild( proc, TYPE_MCS, pos );
+ if ( NULL == pmcs ) break; // can't continue, return NULL
+
+ iv_primMirMcsChip = (ExtensibleChip *)systemPtr->GetChip(pmcs);
+ }
+
+ } while (0);
+
+ return iv_primMirMcsChip;
+ }
+
private: // functions
P8McsDataBundle( const P8McsDataBundle & );
@@ -83,6 +123,9 @@ class P8McsDataBundle : public DataBundle
ExtensibleChip * iv_mcsChip; ///< This MCS chip
ExtensibleChip * iv_membChip; ///< The connected MEMBUF chip
+
+ /** The primary MCS of a mirrored MCS pair. */
+ ExtensibleChip * iv_primMirMcsChip;
};
//------------------------------------------------------------------------------
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsExtraSig.H b/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsExtraSig.H
index 5c366480d..ff061ddc0 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsExtraSig.H
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsExtraSig.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -31,4 +33,7 @@ PRDR_ERROR_SIGNATURE(MciFir_48_DD1Signature, 0x55550000, "MCIFIR[48]",
PRDR_ERROR_SIGNATURE(MciFir_49_DD1Signature, 0x55550001, "MCIFIR[49]",
"DD1: MCIFIRQ_INTERNAL_SCOM_ERROR_CLONE");
+PRDR_ERROR_SIGNATURE(MirrorActionTH, 0x55550010, "MCIFIR[32]",
+ "Mirror disabled due to too many UEs");
+
#endif // __prdfP8McsExtraSig_H
OpenPOWER on IntegriCloud