summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2018-05-22 11:38:18 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-05-30 11:35:40 -0400
commita8f19539edc57e6d3ffa3b05f2342c649ed23415 (patch)
tree43d3ecb4fe1398a5cb46aaa68e1678f001055db1
parent3e16432f929a2516dd35c4d4fa6c5a5570180dd2 (diff)
downloadtalos-hostboot-a8f19539edc57e6d3ffa3b05f2342c649ed23415.tar.gz
talos-hostboot-a8f19539edc57e6d3ffa3b05f2342c649ed23415.zip
PRD: TPS nextStep() for Centaur
Change-Id: I3e9efd4a1c5f40055b70c2fc4df8ef42da8f998a Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59183 Tested-by: Jenkins Server <pfd-jenkins+hostboot@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/59517 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTps.H51
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C50
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C66
3 files changed, 50 insertions, 117 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTps.H b/src/usr/diag/prdf/plat/mem/prdfMemTps.H
index f01cc9cc0..52e8d58bb 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTps.H
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTps.H
@@ -31,6 +31,7 @@
// Platform includes
#include <prdfMemTdQueue.H>
#include <prdfMemUtils.H>
+#include <prdfTargetServices.H>
namespace PRDF
{
@@ -62,7 +63,55 @@ class TpsEvent : public TdEntry
public: // overloaded functions from parent class
- uint32_t nextStep( STEP_CODE_DATA_STRUCT & io_sc, bool & o_done );
+ uint32_t nextStep( STEP_CODE_DATA_STRUCT & io_sc, bool & o_done )
+ {
+ #define PRDF_FUNC "[TpsEvent::nextStep] "
+
+ #ifndef __HOSTBOOT_RUNTIME
+ // Should only do this procedure if MNFG IPL CE handling is enabled.
+ PRDF_ASSERT( PlatServices::isMfgCeCheckingEnabled() );
+ #endif
+
+ uint32_t o_rc = SUCCESS;
+
+ o_done = false;
+
+ do
+ {
+ // First, do analysis.
+ o_rc = analyzePhase( io_sc, o_done );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "analyzePhase() failed on 0x%08x, 0x%2x",
+ iv_chip->getHuid(), getKey() );
+ break;
+ }
+
+ if ( o_done ) break; // Nothing more to do.
+
+ // Then, start the next phase of the procedure.
+ o_rc = startNextPhase( io_sc );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "startNextPhase() failed on 0x%08x, 0x%2x",
+ iv_chip->getHuid(), getKey() );
+ break;
+ }
+
+ } while (0);
+
+ // Add the rank to the callout list if no callouts in the list.
+ if ( 0 == io_sc.service_data->getMruListSize() )
+ {
+ MemoryMru mm { iv_chip->getTrgt(), iv_rank,
+ MemoryMruData::CALLOUT_RANK };
+ io_sc.service_data->SetCallout( mm );
+ }
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+ }
uint32_t getKey() const { return iv_rank.getKey(); } // Master and slave
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C b/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C
index dcb4e703d..de3e62e23 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C
@@ -49,56 +49,6 @@ using namespace PlatServices;
//
//##############################################################################
-template <TARGETING::TYPE T>
-uint32_t TpsEvent<T>::nextStep( STEP_CODE_DATA_STRUCT & io_sc, bool & o_done )
-{
- #define PRDF_FUNC "[TpsEvent::nextStep] "
-
- // Should only do this procedure if MNFG IPL CE handling is enabled.
- PRDF_ASSERT( isMfgCeCheckingEnabled() );
-
- uint32_t o_rc = SUCCESS;
-
- o_done = false;
-
- do
- {
- // First, do analysis.
- o_rc = analyzePhase( io_sc, o_done );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "analyzePhase() failed on 0x%08x,0x%2x",
- iv_chip->getHuid(), getKey() );
- break;
- }
-
- if ( o_done ) break; // Nothing more to do.
-
- // Then, start the next phase of the procedure.
- o_rc = startNextPhase( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "analyzePhase() failed on 0x%08x,0x%2x",
- iv_chip->getHuid(), getKey() );
- break;
- }
-
- } while (0);
-
- // Add the rank to the callout list if no callouts in the list.
- if ( 0 == io_sc.service_data->getMruListSize() )
- {
- MemoryMru mm {iv_chip->getTrgt(), iv_rank, MemoryMruData::CALLOUT_RANK};
- io_sc.service_data->SetCallout( mm );
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
template<TARGETING::TYPE T>
uint32_t TpsEvent<T>::analyzePhase( STEP_CODE_DATA_STRUCT & io_sc,
bool & o_done )
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C
index 968bbdd0f..be5ffa43c 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C
@@ -1160,26 +1160,6 @@ uint32_t TpsEvent<TYPE_MCA>::analyzePhase( STEP_CODE_DATA_STRUCT & io_sc,
#undef PRDF_FUNC
}
-//------------------------------------------------------------------------------
-
-// TODO: RTC 157888 Actual implementation of this procedure will be done later.
-template<>
-uint32_t TpsEvent<TYPE_MBA>::nextStep( STEP_CODE_DATA_STRUCT & io_sc,
- bool & o_done )
-{
- #define PRDF_FUNC "[TpsEvent<TYPE_MBA>::nextStep] "
-
- uint32_t o_rc = SUCCESS;
-
- o_done = true;
-
- PRDF_ERR( PRDF_FUNC "function not implemented yet" );
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
//##############################################################################
//
// Specializations for MCA
@@ -1249,52 +1229,6 @@ uint32_t TpsEvent<TYPE_MCA>::startNextPhase( STEP_CODE_DATA_STRUCT & io_sc )
return startCmd();
}
-//------------------------------------------------------------------------------
-
-template<>
-uint32_t TpsEvent<TYPE_MCA>::nextStep( STEP_CODE_DATA_STRUCT & io_sc,
- bool & o_done )
-{
- #define PRDF_FUNC "[TpsEvent<TYPE_MCA>::nextStep] "
-
- uint32_t o_rc = SUCCESS;
-
- o_done = false;
-
- do
- {
- // Runtime TPS is slightly different than IPL TPS or any other TD event.
- // There really is only one phase, but we use two phases to help
- // differentiate between the CE types that are collected. So only one of
- // the two phases will be used during a TPS procedure, not both.
- // - Phase 1 looks for hard CEs. This is always used first on any rank.
- // - Phase 2 looks for all CE types. This phase is only used on a rank
- // after phase 1 has exceeded a threshold of false alarms.
-
- switch ( iv_phase )
- {
- case TD_PHASE_0:
- o_rc = startNextPhase( io_sc );
- break;
- case TD_PHASE_1:
- case TD_PHASE_2:
- //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() );
- }
- }while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
//##############################################################################
//
// Specializations for MBA
OpenPOWER on IntegriCloud