summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2018-04-04 15:38:45 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-04-10 11:09:00 -0400
commit2000b276f2ea60bcfefb212d05015b2968dcb272 (patch)
tree1a02c64403d539844c6b41f73cfa95450d1c4f17 /src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C
parentda885e721ccc39547b0a29f3350d1b9ae035f6db (diff)
downloadtalos-hostboot-2000b276f2ea60bcfefb212d05015b2968dcb272.tar.gz
talos-hostboot-2000b276f2ea60bcfefb212d05015b2968dcb272.zip
PRD: VCM/TPS/BG scrub commands support for MBA
Change-Id: If68765fc01cfe4d56a24ca41b39e875205a485b0 RTC: 190428 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56772 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56893 CI-Ready: Zane C. Shelley <zshelle@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: Zane C. Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C')
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C65
1 files changed, 64 insertions, 1 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C b/src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C
index 5e1efccc8..3b6700922 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -38,6 +38,9 @@
#include <prdfRegisterCache.H>
#include <lib/mcbist/memdiags.H>
+// Platform includes
+#include <prdfMemThresholds.H>
+
using namespace TARGETING;
namespace PRDF
@@ -473,5 +476,65 @@ uint32_t isBgScrubConfig<TYPE_MBA>( ExtensibleChip * i_chip,
//------------------------------------------------------------------------------
+template<>
+uint32_t setBgScrubThresholds<TYPE_MBA>( ExtensibleChip * i_chip,
+ const MemRank & i_rank )
+{
+ #define PRDF_FUNC "[setBgScrubThresholds] "
+
+ PRDF_ASSERT( nullptr != i_chip );
+ PRDF_ASSERT( TYPE_MBA == i_chip->getType() );
+
+ uint32_t o_rc = SUCCESS;
+
+ do
+ {
+ ExtensibleChip * membChip = getConnectedParent( i_chip, TYPE_MEMBUF );
+ const char * reg_str = (0 == i_chip->getPos()) ? "MBA0_MBSTR"
+ : "MBA1_MBSTR";
+ SCAN_COMM_REGISTER_CLASS * mbstr = membChip->getRegister( reg_str );
+ o_rc = mbstr->Read();
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "Read() failed on %s", reg_str );
+ break;
+ }
+
+ uint32_t softIntCe = getScrubCeThreshold<TYPE_MBA>( i_chip, i_rank );
+
+ // Only care about retry CEs if there are a lot of them. So the
+ // threshold will be high in the field. However, in MNFG the retry CEs
+ // will be handled differently by putting every occurrence in the RCE
+ // table and doing targeted diagnostics when needed.
+ uint16_t retryCe = mfgMode() ? 1 : 2047;
+
+ uint16_t hardCe = 1; // Always stop on first occurrence.
+
+ mbstr->SetBitFieldJustified( 4, 12, softIntCe );
+ mbstr->SetBitFieldJustified( 16, 12, softIntCe );
+ mbstr->SetBitFieldJustified( 28, 12, hardCe );
+ mbstr->SetBitFieldJustified( 40, 12, retryCe );
+
+ // Set the per symbol counters to count hard CEs only. This is so that
+ // when the scrub stops on the first hard CE, we can use the per symbol
+ // counters to tell us which symbol reported the hard CE.
+ mbstr->SetBitFieldJustified( 55, 3, 0x1 );
+
+ o_rc = mbstr->Write();
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "Write() failed on %s", reg_str );
+ break;
+ }
+
+ } while(0);
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+}
+
+//------------------------------------------------------------------------------
+
} // end namespace PRDF
OpenPOWER on IntegriCloud