From a8f19539edc57e6d3ffa3b05f2342c649ed23415 Mon Sep 17 00:00:00 2001 From: Zane Shelley Date: Tue, 22 May 2018 11:38:18 -0500 Subject: PRD: TPS nextStep() for Centaur Change-Id: I3e9efd4a1c5f40055b70c2fc4df8ef42da8f998a Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59183 Tested-by: Jenkins Server Reviewed-by: Caleb N. Palmer Reviewed-by: Benjamin J. Weisenbeck Reviewed-by: Zane C. Shelley Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59517 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW --- src/usr/diag/prdf/plat/mem/prdfMemTps.H | 51 +++++++++++++++++++++- src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C | 50 ---------------------- src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C | 66 ----------------------------- 3 files changed, 50 insertions(+), 117 deletions(-) (limited to 'src/usr') 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 #include +#include 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 -uint32_t TpsEvent::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 uint32_t TpsEvent::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::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::nextStep( STEP_CODE_DATA_STRUCT & io_sc, - bool & o_done ) -{ - #define PRDF_FUNC "[TpsEvent::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::startNextPhase( STEP_CODE_DATA_STRUCT & io_sc ) return startCmd(); } -//------------------------------------------------------------------------------ - -template<> -uint32_t TpsEvent::nextStep( STEP_CODE_DATA_STRUCT & io_sc, - bool & o_done ) -{ - #define PRDF_FUNC "[TpsEvent::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 -- cgit v1.2.1