summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCaleb Palmer <cnpalmer@us.ibm.com>2017-08-03 08:33:41 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2017-08-18 10:49:58 -0400
commitacfd9f12bd91cdb7cb295f6633fe590b67c31ceb (patch)
tree40d2f8e77bafb29b88618f4a5fe9fc99d30cb714 /src
parenta0d6c00c82cf471816e2481fd2e7cd6a3a782d71 (diff)
downloadtalos-hostboot-acfd9f12bd91cdb7cb295f6633fe590b67c31ceb.tar.gz
talos-hostboot-acfd9f12bd91cdb7cb295f6633fe590b67c31ceb.zip
PRD: Runtime TPS Phase 0
Change-Id: I9aee499c606992705d3e0d3e8d660ba94efacd43 RTC: 171914 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44217 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44764 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H16
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTps.H21
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C88
-rw-r--r--src/usr/diag/prdf/plat/prdfPlatServices.C34
-rw-r--r--src/usr/diag/prdf/plat/prdfPlatServices.H11
5 files changed, 167 insertions, 3 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H b/src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H
index 9ba08a2f1..11153b417 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H
@@ -70,6 +70,7 @@ class McaDataBundle : public DataBundle
delete iv_impeThresholdCounter;
#ifdef __HOSTBOOT_RUNTIME
delete iv_vcmFalseAlarmCounter;
+ delete iv_tpsFalseAlarmCounter;
#else
delete iv_iplCeStats;
#endif
@@ -115,6 +116,18 @@ class McaDataBundle : public DataBundle
return iv_vcmFalseAlarmCounter;
}
+ /** @return The TPS false alarm counter. */
+ TpsFalseAlarm * getTpsFalseAlarmCounter()
+ {
+ if ( nullptr == iv_tpsFalseAlarmCounter )
+ {
+ iv_tpsFalseAlarmCounter = new TpsFalseAlarm(
+ TimeBasedThreshold{ 3, ThresholdResolution::ONE_DAY } );
+ }
+
+ return iv_tpsFalseAlarmCounter;
+ }
+
#else // IPL only
/** @return The IPL CE statistics object. */
@@ -152,6 +165,9 @@ class McaDataBundle : public DataBundle
/** VCM false alarm counter. */
VcmFalseAlarm * iv_vcmFalseAlarmCounter = nullptr;
+ /** TPS false alarm counter. */
+ TpsFalseAlarm * iv_tpsFalseAlarmCounter = nullptr;
+
#else // IPL only
/** MNFG IPL CE statistics. */
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTps.H b/src/usr/diag/prdf/plat/mem/prdfMemTps.H
index 6b05550cb..478cf9c47 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTps.H
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTps.H
@@ -59,6 +59,27 @@ class TpsEvent : public TdEntry
uint32_t getKey() const { return iv_rank.getKey(); } // Master and slave
+ private: // functions
+
+ #ifdef __HOSTBOOT_RUNTIME
+
+ /**
+ * @brief Starts phase 1 of the procedure.
+ * @param io_sc The step code data struct.
+ * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
+ */
+ uint32_t startTpsPhase1_rt( STEP_CODE_DATA_STRUCT & io_sc );
+
+ /**
+ * @brief Analyzes phase 1 of the procedure.
+ * @param io_sc The step code data struct.
+ * @param o_done True if the procedure is complete or has aborted.
+ * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
+ */
+ uint32_t analyzeTpsPhase1_rt(STEP_CODE_DATA_STRUCT & io_sc, bool & o_done);
+
+ #endif // __HOSTBOOT_RUNTIME
+
};
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C
index 13f054dca..d5af05261 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C
@@ -26,7 +26,10 @@
/** @file prdfMemTps_rt.C */
// Platform includes
+#include <prdfMemTdFalseAlarm.H>
#include <prdfMemTps.H>
+#include <prdfP9McaExtraSig.H>
+#include <prdfP9McaDataBundle.H>
using namespace TARGETING;
@@ -35,6 +38,67 @@ namespace PRDF
//------------------------------------------------------------------------------
+template <TARGETING::TYPE T>
+TpsFalseAlarm * __getTpsFalseAlarmCounter( ExtensibleChip * i_chip );
+
+template<>
+TpsFalseAlarm * __getTpsFalseAlarmCounter<TYPE_MCA>( ExtensibleChip * i_chip )
+{
+ return getMcaDataBundle(i_chip)->getTpsFalseAlarmCounter();
+}
+
+//------------------------------------------------------------------------------
+
+template<>
+TpsFalseAlarm * __getTpsFalseAlarmCounter<TYPE_MBA>( ExtensibleChip * i_chip )
+{
+ // TODO RTC 157888
+ //return getMbaDataBundle(i_chip)->getTpsFalseAlarmCounter();
+ return nullptr;
+}
+
+//------------------------------------------------------------------------------
+
+template<TARGETING::TYPE T>
+uint32_t TpsEvent<T>::startTpsPhase1_rt( STEP_CODE_DATA_STRUCT & io_sc )
+{
+ PRDF_TRAC( "[TpsEvent] Starting TPS Phase 1: 0x%08x,0x%02x",
+ iv_chip->getHuid(), getKey() );
+
+ iv_phase = TD_PHASE_1;
+ io_sc.service_data->AddSignatureList( iv_chip->getTrgt(),
+ PRDFSIG_StartTpsPhase1 );
+ bool countAllCes = false;
+ if ( __getTpsFalseAlarmCounter<T>(iv_chip)->count(iv_rank, io_sc) >= 1 )
+ countAllCes = true;
+
+ return PlatServices::startTpsRuntime<T>( iv_chip, iv_rank, countAllCes);
+}
+
+//------------------------------------------------------------------------------
+
+template<TARGETING::TYPE T>
+uint32_t TpsEvent<T>::analyzeTpsPhase1_rt( STEP_CODE_DATA_STRUCT & io_sc,
+ bool & o_done )
+{
+ #define PRDF_FUNC "[TpsEvent<T>::analyzeTpsPhase1_rt] "
+
+ uint32_t o_rc = SUCCESS;
+
+ // TODO RTC 171914
+ // Analyze Ecc Attentions
+ // Analyze CEs
+
+ o_done = true;
+ PRDF_ERR( PRDF_FUNC "function not implemented yet" );
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+}
+
+//------------------------------------------------------------------------------
+
// TODO: RTC 171914 Actual implementation of this procedure will be done later.
template<>
uint32_t TpsEvent<TYPE_MCA>::nextStep( STEP_CODE_DATA_STRUCT & io_sc,
@@ -44,9 +108,27 @@ uint32_t TpsEvent<TYPE_MCA>::nextStep( STEP_CODE_DATA_STRUCT & io_sc,
uint32_t o_rc = SUCCESS;
- o_done = true;
-
- PRDF_ERR( PRDF_FUNC "function not implemented yet" );
+ o_done = false;
+
+ switch ( iv_phase )
+ {
+ case TD_PHASE_0:
+ // Start TPS phase 1
+ o_rc = startTpsPhase1_rt( io_sc );
+ break;
+ case TD_PHASE_1:
+ // Analyze TPS phase 1
+ o_rc = analyzeTpsPhase1_rt( io_sc, o_done );
+ break;
+ default: PRDF_ASSERT( false ); // invalid phase
+
+ }
+
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "TPS failed: 0x%08x,0x%02x", iv_chip->getHuid(),
+ getKey() );
+ }
return o_rc;
diff --git a/src/usr/diag/prdf/plat/prdfPlatServices.C b/src/usr/diag/prdf/plat/prdfPlatServices.C
index 230bde80f..771ad402b 100644
--- a/src/usr/diag/prdf/plat/prdfPlatServices.C
+++ b/src/usr/diag/prdf/plat/prdfPlatServices.C
@@ -527,6 +527,27 @@ uint32_t startTpsPhase2<TYPE_MCA>( ExtensibleChip * i_mcaChip,
return __startTdScrubSlave_mca( i_mcaChip, i_rank, stopCond );
}
+//------------------------------------------------------------------------------
+
+template<>
+uint32_t startTpsRuntime<TYPE_MCA>( ExtensibleChip * i_mcaChip,
+ const MemRank & i_rank,
+ bool i_countAllCes )
+{
+ mss::mcbist::stop_conditions stopCond;
+ stopCond.set_nce_hard_symbol_count_enable(mss::ON);
+
+ // If the TPS false alarms count is one or more, enable per-symbol counters
+ // for soft and intermittent CEs.
+ if ( i_countAllCes )
+ {
+ stopCond.set_nce_soft_symbol_count_enable(mss::ON)
+ .set_nce_inter_symbol_count_enable(mss::ON);
+ }
+
+ return __startTdScrubSlave_mca( i_mcaChip, i_rank, stopCond );
+}
+
//##############################################################################
//## Centaur Maintenance Command wrappers
//##############################################################################
@@ -583,6 +604,19 @@ uint32_t startTpsPhase2<TYPE_MBA>( ExtensibleChip * i_mbaChip,
return SUCCESS;
}
+//------------------------------------------------------------------------------
+
+template<>
+uint32_t startTpsRuntime<TYPE_MBA>( ExtensibleChip * i_mbaChip,
+ const MemRank & i_rank,
+ bool i_countAllCes )
+{
+ PRDF_ERR( "function not implemented yet" ); // TODO RTC 157888
+ return SUCCESS;
+}
+
+//------------------------------------------------------------------------------
+
int32_t restartTraceArray(TargetHandle_t i_tgt)
{
int32_t o_rc = SUCCESS;
diff --git a/src/usr/diag/prdf/plat/prdfPlatServices.H b/src/usr/diag/prdf/plat/prdfPlatServices.H
index f4522c424..0c19c2e45 100644
--- a/src/usr/diag/prdf/plat/prdfPlatServices.H
+++ b/src/usr/diag/prdf/plat/prdfPlatServices.H
@@ -154,6 +154,17 @@ template<TARGETING::TYPE T>
uint32_t startTpsPhase2( ExtensibleChip * i_chip, const MemRank & i_rank );
/**
+ * @brief Starts a targeted scrub command on the target rank for runtime TPS.
+ * @param i_chip MCA or MBA chip.
+ * @param i_rank The rank to target.
+ * @param i_countAllCes True if we should count all CEs.
+ * @return Non-SUCCESS if an internal function fails, otherwise SUCCESS.
+ */
+template<TARGETING::TYPE T>
+uint32_t startTpsRuntime( ExtensibleChip * i_chip, const MemRank & i_rank,
+ bool i_countAllCes );
+
+/**
* @brief Restarts Trace arrays after having stopped on error
* @param i_tgt EC/EQ target
* @return non-SUCCESS for failure, SUCCESS otherwise
OpenPOWER on IntegriCloud