summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf
diff options
context:
space:
mode:
authorCaleb Palmer <cnpalmer@us.ibm.com>2017-04-11 13:40:16 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2017-04-24 10:50:56 -0400
commit2f9493fc18863e18a1478795b5e9e577a306516b (patch)
treed5cdac7304a72b59c0c3865976740ed3327d7e60 /src/usr/diag/prdf
parent9f0b2c32a70854d8062249f490302d4dbfc70ea8 (diff)
downloadtalos-hostboot-2f9493fc18863e18a1478795b5e9e577a306516b.tar.gz
talos-hostboot-2f9493fc18863e18a1478795b5e9e577a306516b.zip
PRD: Recapture regs after manually stopping bg scrub
Change-Id: I537a2f7f7f6f1fc01bb14c24a7c6472e2a10af10 RTC: 166837 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39180 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39286 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf')
-rw-r--r--src/usr/diag/prdf/common/plat/p9/p9_mca.rule1
-rw-r--r--src/usr/diag/prdf/common/plat/p9/p9_mcbist.rule1
-rw-r--r--src/usr/diag/prdf/common/plat/p9/p9_mcbist_regs.rule40
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C117
4 files changed, 158 insertions, 1 deletions
diff --git a/src/usr/diag/prdf/common/plat/p9/p9_mca.rule b/src/usr/diag/prdf/common/plat/p9/p9_mca.rule
index a0cc6ec8a..cda13518f 100644
--- a/src/usr/diag/prdf/common/plat/p9/p9_mca.rule
+++ b/src/usr/diag/prdf/common/plat/p9/p9_mca.rule
@@ -97,6 +97,7 @@ chip p9_mca
mask (|, 0x07010a05);
capture group default;
capture group McbistCapture;
+ capture group MaintCmdRegs_mca;
};
register MCAECCFIR_MASK
diff --git a/src/usr/diag/prdf/common/plat/p9/p9_mcbist.rule b/src/usr/diag/prdf/common/plat/p9/p9_mcbist.rule
index 2d208becb..7347606c4 100644
--- a/src/usr/diag/prdf/common/plat/p9/p9_mcbist.rule
+++ b/src/usr/diag/prdf/common/plat/p9/p9_mcbist.rule
@@ -153,6 +153,7 @@ chip p9_mcbist
reset (&, 0x07012301);
mask (|, 0x07012305);
capture group default;
+ capture group MaintCmdRegs_mcb;
};
register MCBISTFIR_MASK
diff --git a/src/usr/diag/prdf/common/plat/p9/p9_mcbist_regs.rule b/src/usr/diag/prdf/common/plat/p9/p9_mcbist_regs.rule
index 6f11bb35e..194296ed9 100644
--- a/src/usr/diag/prdf/common/plat/p9/p9_mcbist_regs.rule
+++ b/src/usr/diag/prdf/common/plat/p9/p9_mcbist_regs.rule
@@ -222,6 +222,7 @@
name "P9 Maint Current Address Trap Register";
scomaddr 0x070123D7;
capture group default;
+ capture group MaintCmdRegs_mcb;
};
register MCB_CNTL
@@ -240,6 +241,7 @@
name "MCP.MCBIST.MBA_SCOMFIR.MBSSYMEC0Q";
scomaddr 0x07012358;
capture group default;
+ capture group MaintCmdRegs_mcb;
};
register MCB_MBSSYMEC1
@@ -247,6 +249,7 @@
name "MCP.MCBIST.MBA_SCOMFIR.MBSSYMEC1Q";
scomaddr 0x07012359;
capture group default;
+ capture group MaintCmdRegs_mcb;
};
register MCB_MBSSYMEC2
@@ -254,6 +257,7 @@
name "MCP.MCBIST.MBA_SCOMFIR.MBSSYMEC2Q";
scomaddr 0x0701235A;
capture group default;
+ capture group MaintCmdRegs_mcb;
};
register MCB_MBSSYMEC3
@@ -261,6 +265,7 @@
name "MCP.MCBIST.MBA_SCOMFIR.MBSSYMEC3Q";
scomaddr 0x0701235B;
capture group default;
+ capture group MaintCmdRegs_mcb;
};
register MCB_MBSSYMEC4
@@ -268,6 +273,7 @@
name "MCP.MCBIST.MBA_SCOMFIR.MBSSYMEC4Q";
scomaddr 0x0701235C;
capture group default;
+ capture group MaintCmdRegs_mcb;
};
register MCB_MBSSYMEC5
@@ -275,6 +281,7 @@
name "MCP.MCBIST.MBA_SCOMFIR.MBSSYMEC5Q";
scomaddr 0x0701235D;
capture group default;
+ capture group MaintCmdRegs_mcb;
};
register MCB_MBSSYMEC6
@@ -282,6 +289,7 @@
name "MCP.MCBIST.MBA_SCOMFIR.MBSSYMEC6Q";
scomaddr 0x0701235E;
capture group default;
+ capture group MaintCmdRegs_mcb;
};
register MCB_MBSSYMEC7
@@ -289,6 +297,7 @@
name "MCP.MCBIST.MBA_SCOMFIR.MBSSYMEC7Q";
scomaddr 0x0701235F;
capture group default;
+ capture group MaintCmdRegs_mcb;
};
register MCB_MBSSYMEC8
@@ -296,4 +305,35 @@
name "MCP.MCBIST.MBA_SCOMFIR.MBSSYMEC8Q";
scomaddr 0x07012360;
capture group default;
+ capture group MaintCmdRegs_mcb;
};
+
+ ############################################################################
+ # MBS Memory Scrub/Read Error Count Registers
+ ############################################################################
+
+ register MBSEC0
+ {
+ name "MCP.MCBIST.MBA_SCOMFIR.MBSEC0Q";
+ scomaddr 0x7012355;
+ capture group default;
+ capture group MaintCmdRegs_mcb;
+ };
+
+ register MBSEC1
+ {
+ name "MCP.MCBIST.MBA_SCOMFIR.MBSEC1Q";
+ scomaddr 0x7012356;
+ capture group default;
+ capture group MaintCmdRegs_mcb;
+ };
+
+ register MBSMSEC
+ {
+ name "MCP.MCBIST.MBA_SCOMFIR.MBSMSECQ";
+ scomaddr 0x07012369;
+ capture group default;
+ capture group MaintCmdRegs_mcb;
+ };
+
+
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
index 5efb80baa..6a7698116 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
@@ -29,6 +29,10 @@
#include <prdfMemTdCtlr.H>
+// Framework includes
+#include <prdfRegisterCache.H>
+#include <UtilHash.H>
+
// Platform includes
#include <prdfMemEccAnalysis.H>
#include <prdfMemScrubUtils.H>
@@ -48,6 +52,117 @@ using namespace PlatServices;
//------------------------------------------------------------------------------
+template<TARGETING::TYPE T>
+void __recaptureRegs( STEP_CODE_DATA_STRUCT & io_sc, ExtensibleChip * i_chip );
+
+template<>
+void __recaptureRegs<TYPE_MCBIST>( STEP_CODE_DATA_STRUCT & io_sc,
+ ExtensibleChip * i_chip )
+{
+ #define PRDF_FUNC "[__recaptureRegs<TYPE_MCBIST>] "
+
+ RegDataCache & cache = RegDataCache::getCachedRegisters();
+ CaptureData & cd = io_sc.service_data->GetCaptureData();
+
+ // refresh and recapture the mcb registers
+ const char * mcbRegs[] =
+ {
+ "MCBISTFIR", "MBSEC0", "MBSEC1", "MCB_MBSSYMEC0",
+ "MCB_MBSSYMEC1", "MCB_MBSSYMEC2", "MCB_MBSSYMEC3",
+ "MCB_MBSSYMEC4", "MCB_MBSSYMEC5", "MCB_MBSSYMEC6",
+ "MCB_MBSSYMEC7", "MCB_MBSSYMEC8", "MBSMSEC", "MCBMCAT",
+ };
+
+ for ( uint32_t i = 0; i < sizeof(mcbRegs)/sizeof(char*); i++ )
+ {
+ SCAN_COMM_REGISTER_CLASS * reg =
+ i_chip->getRegister( mcbRegs[i] );
+ cache.flush( i_chip, reg );
+ }
+
+ i_chip->CaptureErrorData( cd, Util::hashString("MaintCmdRegs_mcb") );
+
+ // refresh and recapture the mca registers
+ const char * mcaRegs[] =
+ {
+ "MCAECCFIR",
+ };
+
+ ExtensibleChipList mcaList = getConnected( i_chip, TYPE_MCA );
+
+ for ( auto & mca : mcaList )
+ {
+ for ( uint32_t i = 0; i < sizeof(mcaRegs)/sizeof(char*); i++ )
+ {
+ SCAN_COMM_REGISTER_CLASS * reg = mca->getRegister( mcaRegs[i] );
+ cache.flush( mca, reg );
+ }
+ mca->CaptureErrorData( cd, Util::hashString("MaintCmdRegs_mca") );
+ }
+
+ #undef PRDF_FUNC
+}
+
+template<>
+void __recaptureRegs<TYPE_MBA>( STEP_CODE_DATA_STRUCT & io_sc,
+ ExtensibleChip * i_chip )
+{
+ #define PRDF_FUNC "[__recaptureRegs<TYPE_MBA>] "
+
+ RegDataCache & cache = RegDataCache::getCachedRegisters();
+ ExtensibleChip * membChip = getConnectedParent( i_chip, TYPE_MEMBUF );
+ TargetHandle_t mbaTrgt = i_chip->GetChipHandle();
+ uint32_t mbaPos = getTargetPosition( mbaTrgt );
+
+ const char * membRegs[2][15] =
+ {
+ { "MBA0_MBSECCFIR", "MBA0_MBSECCERRPT_0","MBA0_MBSECCERRPT_1",
+ "MBA0_MBSEC0", "MBA0_MBSEC1", "MBA0_MBSTR",
+ "MBA0_MBSSYMEC0", "MBA0_MBSSYMEC1", "MBA0_MBSSYMEC2",
+ "MBA0_MBSSYMEC3", "MBA0_MBSSYMEC4", "MBA0_MBSSYMEC5",
+ "MBA0_MBSSYMEC6", "MBA0_MBSSYMEC7", "MBA0_MBSSYMEC8", },
+ { "MBA1_MBSECCFIR", "MBA1_MBSECCERRPT_0","MBA1_MBSECCERRPT_1",
+ "MBA1_MBSEC0", "MBA1_MBSEC1", "MBA1_MBSTR",
+ "MBA1_MBSSYMEC0", "MBA1_MBSSYMEC1", "MBA1_MBSSYMEC2",
+ "MBA1_MBSSYMEC3", "MBA1_MBSSYMEC4", "MBA1_MBSSYMEC5",
+ "MBA1_MBSSYMEC6", "MBA1_MBSSYMEC7", "MBA1_MBSSYMEC8", },
+ };
+ for ( uint32_t i = 0; i < 15; i++ )
+ {
+ SCAN_COMM_REGISTER_CLASS * reg
+ = membChip->getRegister( membRegs[mbaPos][i] );
+ cache.flush( membChip, reg );
+ }
+
+ const char * mbaRegs[] =
+ {
+ "MBASPA", "MBMCT", "MBMSR", "MBMACA", "MBMEA", "MBASCTL", "MBAECTL",
+ };
+ for ( uint32_t i = 0; i < sizeof(mbaRegs)/sizeof(char*); i++ )
+ {
+ SCAN_COMM_REGISTER_CLASS * reg = i_chip->getRegister( mbaRegs[i] );
+ cache.flush( i_chip, reg );
+ }
+
+ // Now recapture those registers.
+
+ CaptureData & cd = io_sc.service_data->GetCaptureData();
+
+ if ( 0 == mbaPos )
+ {
+ membChip->CaptureErrorData(cd, Util::hashString("MaintCmdRegs_mba0") );
+ }
+ else
+ {
+ membChip->CaptureErrorData(cd, Util::hashString("MaintCmdRegs_mba1") );
+ }
+ i_chip->CaptureErrorData(cd, Util::hashString("MaintCmdRegs"));
+
+ #undef PRDF_FUNC
+}
+
+//------------------------------------------------------------------------------
+
template <TARGETING::TYPE T>
uint32_t MemTdCtlr<T>::handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
TdEntry * i_entry )
@@ -84,7 +199,7 @@ uint32_t MemTdCtlr<T>::handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
// Since we had to manually stop the maintenance command, refresh all
// relevant registers that may have changed since the initial capture.
- // TODO: RTC 166837
+ __recaptureRegs<T>( io_sc, iv_chip );
// It is possible that background scrub could have found an ECC error
// before we had a chance to stop the command. Therefore, we need to
OpenPOWER on IntegriCloud