diff options
Diffstat (limited to 'src/usr/diag/prdf/common/plat')
3 files changed, 49 insertions, 126 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H b/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H index f883653cf..07fa0fd07 100644 --- a/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H +++ b/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H @@ -36,6 +36,7 @@ #ifdef __HOSTBOOT_MODULE #include <prdfMemTdCtlr.H> + #include <prdfMemTdFalseAlarm.H> #ifndef __HOSTBOOT_RUNTIME #include <prdfMemIplCeStats.H> @@ -62,12 +63,20 @@ class MbaDataBundle : public DataBundle ~MbaDataBundle() { #ifdef __HOSTBOOT_MODULE + delete iv_tdCtlr; iv_tdCtlr = nullptr; - #endif - #if defined(__HOSTBOOT_MODULE) && !defined(__HOSTBOOT_RUNTIME) + #ifdef __HOSTBOOT_RUNTIME + + delete iv_tpsFalseAlarmCounter; + + #else // IPL only + delete iv_sfCmd; iv_sfCmd = nullptr; delete iv_iplCeStats; iv_iplCeStats = nullptr; + + #endif + #endif } @@ -88,7 +97,22 @@ class MbaDataBundle : public DataBundle return iv_tdCtlr; } - #ifndef __HOSTBOOT_RUNTIME + #ifdef __HOSTBOOT_RUNTIME + + /** @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. */ MemIplCeStats<TARGETING::TYPE_MBA> * getIplCeStats() { @@ -99,9 +123,10 @@ class MbaDataBundle : public DataBundle return iv_iplCeStats; } - #endif - #endif + #endif // __HOSTBOOT_RUNTIME + + #endif // __HOSTBOOT_MODULE private: // instance variables @@ -113,12 +138,19 @@ class MbaDataBundle : public DataBundle /** The Targeted Diagnostics controller. */ MemTdCtlr<TARGETING::TYPE_MBA> * iv_tdCtlr = nullptr; - #ifndef __HOSTBOOT_RUNTIME + #ifdef __HOSTBOOT_RUNTIME + + /** TPS false alarm counter. */ + TpsFalseAlarm * iv_tpsFalseAlarmCounter = nullptr; + + #else // IPL only + /** MNFG IPL CE statistics. */ MemIplCeStats<TARGETING::TYPE_MBA> * iv_iplCeStats = nullptr; - #endif - #endif + #endif // __HOSTBOOT_RUNTIME + + #endif // __HOSTBOOT_MODULE public: // instance variables diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C index b4a67b690..5ff565ebc 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C @@ -1276,56 +1276,17 @@ int32_t CenMbaTdCtlr::startDsdPhase1( STEP_CODE_DATA_STRUCT & io_sc ) int32_t CenMbaTdCtlr::startTpsPhase1( STEP_CODE_DATA_STRUCT & io_sc ) { - #define PRDF_FUNC "[CenMbaTdCtlr::startTpsPhase1] " + // Initially true, until hardware error is found. + iv_tpsFalseAlarm = true; - int32_t o_rc = SUCCESS; - - io_sc.service_data->AddSignatureList( iv_mbaTrgt, PRDFSIG_StartTpsPhase1 ); - iv_tdState = TPS_PHASE_1; - - do - { - // Initially true, until hardware error is found. - iv_tpsFalseAlarm = true; - - // Starting a new TPS procedure. Reset the scrub resume counter. - iv_scrubResumeCounter.reset(); - - o_rc = prepareNextCmd( io_sc ); - if ( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "prepareNextCmd() failed" ); - break; - } - - // Set CE thresholds. - o_rc = setTpsThresholds(); - if ( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "setTpsThresholds() failed" ); - break; - } - - // Set stop conditions based on CE count type. - uint32_t stopCond = COND_RT_TPS_HARD_CE; - if ( iv_tpsRankData.checkCeTypeTh(iv_rank) ) - { - stopCond = COND_RT_TPS_ALL_CE; - } - - // Start TPS phase 1. - o_rc = doTdScrubCmd( stopCond, mss_MaintCmdWrapper::SLAVE_RANK_ONLY ); - if ( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "doTdScrubCmd() failed" ); - break; - } - - } while(0); + // Starting a new TPS procedure. Reset the scrub resume counter. + iv_scrubResumeCounter.reset(); - return o_rc; + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // moved to TpsEvent class + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - #undef PRDF_FUNC + return SUCCESS; } //------------------------------------------------------------------------------ @@ -2545,68 +2506,6 @@ int32_t CenMbaTdCtlr::getTpsCeThr( uint16_t & o_thr ) //------------------------------------------------------------------------------ -int32_t CenMbaTdCtlr::setTpsThresholds() -{ - #define PRDF_FUNC "[CenMbaTdCtlr::setTpsThresholds] " - - int32_t o_rc = SUCCESS; - - do - { - if ( TPS_PHASE_1 != iv_tdState ) - { - PRDF_ERR( PRDF_FUNC "Invalid state machine configuration" ); - o_rc = FAIL; - break; - } - - const char * reg_str = (0 == iv_mbaPos) ? "MBA0_MBSTR" : "MBA1_MBSTR"; - SCAN_COMM_REGISTER_CLASS * mbstr = iv_membChip->getRegister( reg_str ); - - // MBSTR's content could be modified by cleanupCmd() so refresh cache. - o_rc = mbstr->ForceRead(); - if ( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "ForceRead() failed on %s", reg_str ); - break; - } - - // Set all CE thresholds to the maximum value. The reason for this is if - // there are a lot of CEs we can stop the TPS scrub and place any marks, - // if needed. This will save time since the TPS scrub could take several - // hours. The threshold is set to the max value so that we can get - // enough data to place a mark. - mbstr->SetBitFieldJustified( 4, 12, 0xfff ); - mbstr->SetBitFieldJustified( 16, 12, 0xfff ); - mbstr->SetBitFieldJustified( 28, 12, 0xfff ); - - if ( !iv_tpsRankData.checkCeTypeTh(iv_rank) ) - { - // Set the per symbol counters to count only hard CEs. - mbstr->SetBitFieldJustified( 55, 3, 0x1 ); - } - else - { - // Set the per symbol counters to count all CE typs. - mbstr->SetBitFieldJustified( 55, 3, 0x7 ); - } - - 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 -} - -//------------------------------------------------------------------------------ - int32_t CenMbaTdCtlr::tpsChipMark( STEP_CODE_DATA_STRUCT & io_sc ) { #define PRDF_FUNC "[CenMbaTdCtlr::tpsChipMark] " diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.H index 7441fad5a..9fcaa4253 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.H +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -335,14 +335,6 @@ class CenMbaTdCtlr : public CenMbaTdCtlrCommon int32_t getTpsCeThr( uint16_t & o_thr ); /** - * @brief Sets the CE thresholds in hardware for a TPS procedure. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - * @note iv_tdState must be set to a valid TPS phase before calling this - * function. - */ - int32_t setTpsThresholds(); - - /** * @brief Sets iv_mark in hardware and adds a VCM request to the TD queue. * @param io_sc The step code data struct. * @note iv_mark must be set with the chip mark before calling this |