summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2018-05-18 11:26:55 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-05-23 15:11:32 -0400
commitaa0df6e89b162c23dba8ae758bbb31badf2eb1cb (patch)
tree1ef41646456c200e2ea99b8d994240d6eaa8547f
parent4b7ee363259204d07076d93a89d49abb19d4f166 (diff)
downloadtalos-hostboot-aa0df6e89b162c23dba8ae758bbb31badf2eb1cb.tar.gz
talos-hostboot-aa0df6e89b162c23dba8ae758bbb31badf2eb1cb.zip
PRD: removed unused P8 code
Change-Id: Icbe20fe011831b1236e9925ebcc93364c8743473 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59115 Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59231 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.C335
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C1076
-rw-r--r--src/usr/diag/prdf/common/plat/prdfPlatServices_common.C195
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/prdfPlatServices_common.H121
4 files changed, 0 insertions, 1727 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.C
index aa27c6797..8e81936e1 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.C
@@ -43,281 +43,6 @@ using namespace PlatServices;
//------------------------------------------------------------------------------
-bool CenMbaTdCtlrCommon::isInTdMode()
-{
- return ( (NO_OP != iv_tdState) && (MAX_TD_STATE > iv_tdState) );
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlrCommon::cleanupPrevCmd()
-{
- #define PRDF_FUNC "[CenMbaTdCtlrCommon::cleanupPrevCmd] "
-
- int32_t o_rc = SUCCESS;
-
- // Clean up the current maintenance command. This must be done whenever
- // maintenance command will no longer be executed.
- if ( NULL != iv_mssCmd )
- {
- o_rc = iv_mssCmd->cleanupCmd();
- if ( SUCCESS != o_rc )
- PRDF_ERR( PRDF_FUNC "cleanupCmd() failed" );
-
- delete iv_mssCmd; iv_mssCmd = NULL;
- }
-
- // Clear the command complete attention. This must be done before starting
- // the next maintenance command.
- SCAN_COMM_REGISTER_CLASS * firand = iv_mbaChip->getRegister("MBASPA_AND");
- firand->setAllBits();
-
- firand->ClearBit(0); // Maintenance command complete
- firand->ClearBit(8); // Maintenance command complete (DD1.0 workaround)
-
- if ( SUCCESS != firand->Write() )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on MBASPA_AND" );
- o_rc = FAIL;
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlrCommon::prepareNextCmd( bool i_clearStats )
-{
- #define PRDF_FUNC "[CenMbaTdCtlrCommon::prepareNextCmd] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- //----------------------------------------------------------------------
- // Clean up previous command
- //----------------------------------------------------------------------
-
- o_rc = cleanupPrevCmd();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "cleanupPrevCmd() failed" );
- break;
- }
-
- //----------------------------------------------------------------------
- // Clear ECC counters
- //----------------------------------------------------------------------
-
- const char * reg_str = NULL;
-
- if ( i_clearStats )
- {
- reg_str = (0 == iv_mbaPos) ? "MBSTR_0" : "MBSTR_1";
- SCAN_COMM_REGISTER_CLASS * mbstr =
- iv_membChip->getRegister( reg_str );
-
- // MBSTR's content could be modified from cleanupCmd()
- // so we need to refresh
- o_rc = mbstr->ForceRead();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "ForceRead() failed on %s", reg_str );
- break;
- }
-
- mbstr->SetBit(53); // Setting this bit clears all counters.
-
- o_rc = mbstr->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on %s", reg_str );
- break;
- }
-
- // Hardware automatically clears bit 53, so flush this register out
- // of the register cache to avoid clearing the counters again with
- // a write from the out-of-date cached copy.
- RegDataCache & cache = RegDataCache::getCachedRegisters();
- cache.flush( iv_membChip, mbstr );
- }
-
- //----------------------------------------------------------------------
- // Clear ECC FIRs
- //----------------------------------------------------------------------
-
- reg_str = (0 == iv_mbaPos) ? "MBSECCFIR_0_AND" : "MBSECCFIR_1_AND";
- SCAN_COMM_REGISTER_CLASS * firand = iv_membChip->getRegister( reg_str );
- firand->setAllBits();
-
- // Clear all scrub MPE bits.
- // This will need to be done when starting a TD procedure or background
- // scrubbing. iv_rank may not be set when starting background scrubbing
- // and technically there should only be one of these MPE bits on at a
- // time so we should not have to worry about losing an attention by
- // clearing them all.
- firand->SetBitFieldJustified( 20, 8, 0 );
-
- // Clear scrub NCE, SCE, MCE, RCE, SUE, UE bits (36-41)
- firand->SetBitFieldJustified( 36, 6, 0 );
-
- o_rc = firand->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on %s", reg_str );
- break;
- }
-
- SCAN_COMM_REGISTER_CLASS * spaAnd =
- iv_mbaChip->getRegister("MBASPA_AND");
- spaAnd->setAllBits();
-
- // Clear threshold exceeded attentions
- spaAnd->SetBitFieldJustified( 1, 4, 0 );
-
- o_rc = spaAnd->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on MBASPA_AND" );
- break;
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlrCommon::chipMarkCleanup()
-{
- #define PRDF_FUNC "[CenMbaTdCtlrCommon::chipMarkCleanup] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- SCAN_COMM_REGISTER_CLASS * ddrPhyAndFir =
- iv_mbaChip->getRegister( "MBADDRPHYFIR_AND" );
- ddrPhyAndFir->setAllBits();
-
- ddrPhyAndFir->ClearBit(50); // Calibration Error RE 0
- ddrPhyAndFir->ClearBit(58); // Calibration Error RE 1
-
- o_rc = ddrPhyAndFir->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on MBADDRPHYFIR_AND" );
- break;
- }
-
- } while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlrCommon::checkEccErrors( uint16_t & o_eccErrorMask,
- STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlrCommon::checkEccErrors] "
-
- int32_t o_rc = SUCCESS;
-
- o_eccErrorMask = NO_ERROR;
-
- do
- {
- const char * reg_str = (0 == iv_mbaPos) ? "MBSECCFIR_0" : "MBSECCFIR_1";
- SCAN_COMM_REGISTER_CLASS * mbsEccFir
- = iv_membChip->getRegister( reg_str );
- o_rc = mbsEccFir->Read();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Read() failed on %s", reg_str );
- break;
- }
-
- if ( mbsEccFir->IsBitSet(20 + iv_rank.getMaster()) )
- {
- o_eccErrorMask |= MPE;
- io_sc.service_data->AddSignatureList(iv_mbaTrgt, PRDFSIG_MaintMPE);
-
- // Clean up side-effect FIRs that may be set due to the chip mark.
- o_rc = chipMarkCleanup();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "chipMarkCleanup() failed" );
- break;
- }
- }
-
- if ( mbsEccFir->IsBitSet(38) )
- {
- // No need to add error signature. MCE is not error. It will be
- // handled only in VCM/DSD phase 2.
- o_eccErrorMask |= MCE;
- }
-
- if ( mbsEccFir->IsBitSet(41) )
- {
- o_eccErrorMask |= UE;
- io_sc.service_data->AddSignatureList( iv_mbaTrgt, PRDFSIG_MaintUE );
- }
-
- SCAN_COMM_REGISTER_CLASS * mbaSpaFir =
- iv_mbaChip->getRegister("MBASPA");
- o_rc = mbaSpaFir->Read();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Failed to read MBASPA Regsiter");
- break;
- }
-
- if ( mbaSpaFir->IsBitSet(1) )
- {
- o_eccErrorMask |= HARD_CTE;
- io_sc.service_data->AddSignatureList( iv_mbaTrgt,
- PRDFSIG_MaintHARD_CTE );
- }
-
- if ( mbaSpaFir->IsBitSet(2) )
- {
- o_eccErrorMask |= SOFT_CTE;
- io_sc.service_data->AddSignatureList( iv_mbaTrgt,
- PRDFSIG_MaintSOFT_CTE );
- }
-
- if ( mbaSpaFir->IsBitSet(3) )
- {
- o_eccErrorMask |= INTER_CTE;
- io_sc.service_data->AddSignatureList( iv_mbaTrgt,
- PRDFSIG_MaintINTER_CTE );
- }
-
- if ( mbaSpaFir->IsBitSet(4) )
- {
- o_eccErrorMask |= RETRY_CTE;
- io_sc.service_data->AddSignatureList( iv_mbaTrgt,
- PRDFSIG_MaintRETRY_CTE );
- }
-
- } while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
int32_t CenMbaTdCtlrCommon::handleMCE_VCM2( STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[CenMbaTdCtlrCommon::handleMCE_VCM2] "
@@ -572,65 +297,5 @@ int32_t CenMbaTdCtlrCommon::handleMCE_DSD2( STEP_CODE_DATA_STRUCT & io_sc )
#undef PRDF_FUNC
}
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlrCommon::setRtEteThresholds()
-{
- int32_t o_rc = SUCCESS;
-
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // Moved to setBgScrubThresholds() in prdfMemScrubUtils.C
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- return o_rc;
-}
-
-//------------------------------------------------------------------------------
-
-void CenMbaTdCtlrCommon::badPathErrorHandling( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlrCommon::badPathErrorHandling] "
-
- PRDF_ERR( PRDF_FUNC "iv_mbaChip:0x%08x iv_initialized:%c iv_tdState:%d "
- "iv_rank:M%dS%d iv_mark:%2d %2d", iv_mbaChip->GetId(),
- iv_initialized ? 'T' : 'F', iv_tdState, iv_rank.getMaster(),
- iv_rank.getSlave(), iv_mark.getCM().getSymbol(),
- iv_mark.getSM().getSymbol() );
-
- iv_tdState = NO_OP;
-
- setTdSignature( io_sc, PRDFSIG_MaintCmdComplete_ERROR );
- io_sc.service_data->setServiceCall();
-
- // There may have been a code bug, callout 2nd level support.
- io_sc.service_data->SetCallout( LEVEL2_SUPPORT, MRU_HIGH );
-
- // Callout the rank if no other callouts have been made (besides 2nd
- // Level Support). Note that iv_mark is not always guaranteed to be
- // valid for every error scenario. For simplicity, callout the rank that
- // was targeted with low priority.
- if ( 1 == io_sc.service_data->getMruListSize() )
- {
- MemoryMru memmru ( iv_mbaTrgt, iv_rank, MemoryMruData::CALLOUT_RANK );
- io_sc.service_data->SetCallout( memmru, MRU_LOW );
- }
-
- // Just in case it was a legitimate maintenance command complete (error
- // log not committed) but something else failed.
- io_sc.service_data->clearDontCommitErrl();
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-void CenMbaTdCtlrCommon::setTdSignature( STEP_CODE_DATA_STRUCT & io_sc,
- uint32_t i_sig )
-{
- HUID mbaId = iv_mbaChip->GetId();
- (io_sc.service_data->GetErrorSignature())->setChipId(mbaId);
- io_sc.service_data->SetErrorSig( i_sig );
-}
-
} // end namespace PRDF
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 a5d3382eb..313f55f9f 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C
@@ -73,267 +73,6 @@ CenMbaTdCtlr::FUNCS CenMbaTdCtlr::cv_cmdCompleteFuncs[] =
};
//------------------------------------------------------------------------------
-// Public Functions
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::handleCmdCompleteEvent( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::handleCmdCompleteEvent] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- o_rc = initialize();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "initialize() failed" );
- break;
- }
-
- collectStateCaptureDataStart( io_sc );
-
- // Get address in which the command stopped and the end address.
- // Some analysis is dependent on if the maintenance command has reached
- // the end address or stopped in the middle.
- CenAddr stopAddr;
- o_rc = getCenMaintStartAddr( iv_mbaChip, stopAddr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getCenMaintStartAddr() failed" );
- break;
- }
-
- CenAddr endAddr;
- o_rc = getCenMaintEndAddr( iv_mbaChip, endAddr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getCenMaintEndAddr() failed" );
- break;
- }
-
- // Call analysis function based on state.
- if ( NULL == cv_cmdCompleteFuncs[iv_tdState] )
- {
- PRDF_ERR( PRDF_FUNC "Function for state %d not supported",
- iv_tdState );
- o_rc = FAIL; break;
- }
-
- o_rc = (this->*cv_cmdCompleteFuncs[iv_tdState])( io_sc, stopAddr,
- endAddr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Failed to continue analysis" );
- break;
- }
-
- } while(0);
-
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Failed." );
- badPathErrorHandling( io_sc );
-
- int32_t l_rc = cleanupPrevCmd( io_sc ); // Just in case.
- if ( SUCCESS != l_rc )
- PRDF_ERR( PRDF_FUNC "cleanupPrevCmd() failed" );
-
- // Will not resume background scrubbing because that may be the root
- // cause of the failure.
- }
- else
- {
- collectStateCaptureDataEnd( io_sc );
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
- const CenRank & i_rank,
- const TdType i_event,
- bool i_banTps )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::handleTdEvent] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- o_rc = initialize();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "initialize() failed" );
- break;
- }
-
- collectStateCaptureDataStart( io_sc );
-
- // Add a new entry to the queue.
- if ( VCM_EVENT == i_event )
- o_rc = addTdQueueEntryVCM( i_rank );
- else if ( TPS_EVENT == i_event )
- o_rc = addTdQueueEntryTPS( i_rank, io_sc, i_banTps );
- else
- o_rc = FAIL;
-
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Failed to add TD queue entry" );
- break;
- }
-
- // Don't interrupt a TD procedure if one is already in progress.
- if ( isInTdMode() ) break;
-
- // If the fetch attentions are already masked, then this must have been
- // a TPS request due to a memory UE, which will eventually be
- // thresholded by the rule code. Therefore, there is no need to stop
- // background scrubbing.
- if ( (TPS_EVENT == i_event) && iv_fetchAttnsMasked ) break;
-
- // Stop background scrubbing. Whether to start a new TD procedure or to
- // temporarily mask TPS triggers while TPS is banned to prevent
- // flooding.
- o_rc = stopBgScrub<TYPE_MBA>( iv_mbaTrgt );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "stopBgScrub<TYPE_MBA>() failed" );
- break;
- }
-
- // If the queue is empty, there were no pending requests and the new
- // TPS request was blocked. In this case, we need to temporarily mask
- // TPS triggers (except memory UEs) while TPS is banned to prevent
- // flooding.
- if ( iv_queue.empty() )
- {
- o_rc = maskFetchAttns();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "maskFetchAttns() failed" );
- break;
- }
- }
-
- // Since we had to manually stop the maintenance command we should
- // refresh all relevant registers that may have changed state.
-
- RegDataCache & cache = RegDataCache::getCachedRegisters();
-
- const char * membRegs[2][18] =
- {
- { "MBSECCFIR_0", "MBSECCFIR_0_MASK",
- "MBSECCFIR_0_ACT0", "MBSECCFIR_0_ACT1",
- "MBA0_MBSECCERRPT_0","MBA0_MBSECCERRPT_1",
- "MBA0_MBSEC0", "MBA0_MBSEC1", "MBSTR_0",
- "MBA0_MBSSYMEC0", "MBA0_MBSSYMEC1", "MBA0_MBSSYMEC2",
- "MBA0_MBSSYMEC3", "MBA0_MBSSYMEC4", "MBA0_MBSSYMEC5",
- "MBA0_MBSSYMEC6", "MBA0_MBSSYMEC7", "MBA0_MBSSYMEC8", },
- { "MBSECCFIR_1", "MBSECCFIR_1_MASK",
- "MBSECCFIR_1_ACT0", "MBSECCFIR_1_ACT1",
- "MBA1_MBSECCERRPT_0","MBA1_MBSECCERRPT_1",
- "MBA1_MBSEC0", "MBA1_MBSEC1", "MBSTR_1",
- "MBA1_MBSSYMEC0", "MBA1_MBSSYMEC1", "MBA1_MBSSYMEC2",
- "MBA1_MBSSYMEC3", "MBA1_MBSSYMEC4", "MBA1_MBSSYMEC5",
- "MBA1_MBSSYMEC6", "MBA1_MBSSYMEC7", "MBA1_MBSSYMEC8", },
- };
- for ( uint32_t i = 0; i < 18; i++ )
- {
- SCAN_COMM_REGISTER_CLASS * reg
- = iv_membChip->getRegister( membRegs[iv_mbaPos][i] );
- cache.flush( iv_membChip, reg );
- }
-
- const char * mbaRegs[8] =
- {
- "MBASPA", "MBASPA_MASK", "MBMCT", "MBMSR", "MBMACA", "MBMEA",
- "MBASCTL", "MBAECTL",
- };
- for ( uint32_t i = 0; i < 8; i++ )
- {
- SCAN_COMM_REGISTER_CLASS * reg
- = iv_mbaChip->getRegister( mbaRegs[i] );
- cache.flush( iv_mbaChip, reg );
- }
-
- // Now recapture those registers.
-
- CaptureData & cd = io_sc.service_data->GetCaptureData();
-
- if ( 0 == iv_mbaPos )
- {
- iv_membChip->CaptureErrorData(cd,
- Util::hashString("MaintCmdRegs_mba0") );
- }
- else
- {
- iv_membChip->CaptureErrorData(cd,
- Util::hashString("MaintCmdRegs_mba1") );
- }
-
- iv_mbaChip->CaptureErrorData(cd, Util::hashString("MaintCmdRegs"));
-
- // Start the next diagnostics procedure. It is possible that background
- // scrub could have found an ECC error before we had a chance to stop
- // the command. Therefore, we need to call analyzeCmdComplete() instead
- // of startNextTd() so that any ECC errors found can be handled. Also,
- // analyzeCmdComplete() will initialize the interrupted rank so that we
- // can calculate the 'next good rank'.
-
- CenAddr stopAddr;
- o_rc = getCenMaintStartAddr( iv_mbaChip, stopAddr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getCenMaintStartAddr() failed" );
- break;
- }
-
- CenAddr endAddr;
- o_rc = getCenMaintEndAddr( iv_mbaChip, endAddr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getCenMaintEndAddr() failed" );
- break;
- }
-
- o_rc = analyzeCmdComplete( io_sc, stopAddr, endAddr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "analyzeCmdComplete() failed" );
- break;
- }
-
- } while(0);
-
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Failed: i_event=%d i_rank=m%ds%d i_banTps=%c",
- i_event, i_rank.getMaster(), i_rank.getSlave(),
- i_banTps ? 'T' : 'F' );
-
- badPathErrorHandling( io_sc );
-
- int32_t l_rc = cleanupPrevCmd( io_sc ); // Just in case.
- if ( SUCCESS != l_rc )
- PRDF_ERR( PRDF_FUNC "cleanupPrevCmd() failed" );
- }
- else
- {
- collectStateCaptureDataEnd( io_sc );
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
// Private Functions
//------------------------------------------------------------------------------
@@ -843,39 +582,6 @@ int32_t CenMbaTdCtlr::analyzeTpsPhase1( STEP_CODE_DATA_STRUCT & io_sc,
//------------------------------------------------------------------------------
-int32_t CenMbaTdCtlr::startVcmPhase1( STEP_CODE_DATA_STRUCT & io_sc )
-{
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // moved to VcmEvent class
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- return SUCCESS;
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::startVcmPhase2( STEP_CODE_DATA_STRUCT & io_sc )
-{
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // moved to VcmEvent class
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- return SUCCESS;
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::startDsdPhase1( STEP_CODE_DATA_STRUCT & io_sc )
-{
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // moved to VcmEvent class
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- return SUCCESS;
-}
-
-//------------------------------------------------------------------------------
-
int32_t CenMbaTdCtlr::startTpsPhase1( STEP_CODE_DATA_STRUCT & io_sc )
{
// Initially true, until hardware error is found.
@@ -890,272 +596,6 @@ int32_t CenMbaTdCtlr::startTpsPhase1( STEP_CODE_DATA_STRUCT & io_sc )
//------------------------------------------------------------------------------
-int32_t CenMbaTdCtlr::startBgScrub( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::startBgScrub] "
-
- int32_t o_rc = SUCCESS;
-
- iv_tdState = NO_OP;
-
- do
- {
- // Cleanup hardware before starting the maintenance command. This will
- // clear the ECC counters, which must be done before setting the ETE
- // thresholds.
- o_rc = prepareNextCmd( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "prepareNextCmd() failed" );
- break;
- }
-
- // Set the default thresholds for all ETE attentions.
- o_rc = setRtEteThresholds();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "setRtEteThresholds() failed" );
- break;
- }
-
- // Unmask the fetch attentions that were explicitly masked during the
- // TD procedure.
- o_rc = unmaskFetchAttns();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "unmaskFetchAttns() failed" );
- break;
- }
-
- // Background scrubbing will need to start from the first address of the
- // next good rank. The current design is to not stop on the end address
- // and let background scrubbing run continuously. Technically, this
- // means we do not need to specify the end address for the maintenance
- // command, however, I think we should still input the last address of
- // the last rank behind the MBA as the end address just in case we need
- // to flip the switch and stop on the end address (for hardware
- // workarounds and such). Also, assume since we are resuming background
- // scrubbing all entries in iv_masterRanks are good, for now.
-
- TdRankList::Entry entry = iv_masterRanks.findNextGoodRank();
- if ( iv_rank == entry.rank )
- {
- // It is possible that the next good rank is the rank that was just
- // targeted for diagnostics. If so, we want to try to start
- // scrubbing on the rank after this just in case the this rank has
- // a lot of errors. This is not a perfect system because it is
- // possible that were two TD procedures recently done in a four rank
- // system and it just so happens that the next good rank is one of
- // the recently targeted ranks. However, scrub will eventually get
- // to all of the rank so this is a limitation we can to live with
- // because it isn't worth the extra code.
-
- entry = iv_masterRanks.findNextGoodRank();
- }
-
- // It is important to initialize iv_rank here so that possible back to
- // back maintenance command complete attentions do not accidentally
- // cause a rank to get skipped due to the next good rank check above.
- iv_rank = entry.rank;
-
- // Start background scrub.
- o_rc = doBgScrubCmd( COND_BG_SCRUB );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "doBgScrubCmd() failed" );
- break;
- }
-
- } while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::startNextTd( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::startNextTd] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- if ( iv_queue.empty() )
- {
- // No pending requests, so start backgound scrubbing.
- o_rc = startBgScrub( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "startBgScrub() failed" );
- break;
- }
- }
- else
- {
- // Start the next TD procedure.
- TdQueueEntry entry = iv_queue.getNextEntry();
- iv_rank = CenRank( entry.rank );
-
- switch ( entry.type )
- {
- case VCM_EVENT: o_rc = startVcmPhase1( io_sc ); break;
- case TPS_EVENT: o_rc = startTpsPhase1( io_sc ); break;
- default: o_rc = FAIL;
- }
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "failed to start procedure for event %d",
- entry.type );
- break;
- }
- // Mask fetch attentions during TD procedures. startNextTd is called
- // from many places. Mask attention here rather in caller function.
- // Though now maskFetchAttns will be called multiple times for back
- // to back TD requests but its minor issue as TD procedure takes
- // atleast 5 hours. Also it will save us from potential bugs
- // if we miss at any place.
- o_rc = maskFetchAttns();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "maskFetchAttns() failed" );
- break;
- }
-
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::resumeScrub( STEP_CODE_DATA_STRUCT & io_sc,
- uint32_t i_eccErrorMask )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::resumeScrub] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- if ( (NO_OP != iv_tdState) &&
- (VCM_PHASE_1 != iv_tdState) && (VCM_PHASE_2 != iv_tdState) &&
- (DSD_PHASE_1 != iv_tdState) && (TPS_PHASE_1 != iv_tdState) )
- {
- PRDF_ERR( PRDF_FUNC "Invalid state machine configuration" );
- o_rc = FAIL; break;
- }
-
- // Manually clear the CE counters based on the error type.
- o_rc = clearCeCounters( i_eccErrorMask );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "clearCeCounters() failed" );
- break;
- }
-
- // Do not clear the CE counters. The target counters have been manually
- // cleared based on error type.
- o_rc = prepareNextCmd( io_sc, false );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "prepareNextCmd() failed" );
- break;
- }
-
- // Increment the start address.
- iv_mssCmd = createIncAddrMssCmd( iv_mbaTrgt );
- if ( NULL == iv_mssCmd )
- {
- PRDF_ERR( PRDF_FUNC "createIncAddrMssCmd returned NULL" );
- o_rc = FAIL; break;
- }
-
- o_rc = iv_mssCmd->setupAndExecuteCmd();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "setupAndExecuteCmd() failed" );
- break;
- }
-
- // Get the new start address.
- CenAddr addr;
- o_rc = getCenMaintStartAddr( iv_mbaChip, addr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getCenMaintStartAddr() failed" );
- break;
- }
-
- // Again, do not clear the CE counters.
- o_rc = prepareNextCmd( io_sc, false );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "prepareNextCmd() failed" );
- break;
- }
-
- // Set the control flags and stop conditions based on the procedure
- // type. The defaults will be for background scrubbing where we want to
- // stop at the end of the rank.
- uint32_t flags = mss_MaintCmdWrapper::NO_FLAGS;
- uint32_t stopCond = COND_BG_SCRUB | mss_MaintCmd::STOP_ON_END_ADDRESS;
- if ( TPS_PHASE_1 == iv_tdState )
- {
- flags = mss_MaintCmdWrapper::SLAVE_RANK_ONLY;
-
- // Set stop conditions based on CE count type.
- stopCond = COND_RT_TPS_HARD_CE;
- if ( iv_tpsRankData.checkCeTypeTh(iv_rank) )
- {
- stopCond = COND_RT_TPS_ALL_CE;
- }
- }
- else if ( (VCM_PHASE_1 == iv_tdState) || (DSD_PHASE_1 == iv_tdState) )
- {
- stopCond = COND_RT_VCM_DSD;
- }
- else if ( VCM_PHASE_2 == iv_tdState )
- {
- stopCond = COND_RT_VCM_DSD | mss_MaintCmd::STOP_ON_MCE;
- }
-
- if ( NO_OP == iv_tdState )
- {
- // Resume background scrub.
- o_rc = doBgScrubCmd( stopCond, flags, &addr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "doBgScrubCmd() failed" );
- break;
- }
- }
- else
- {
- // Resume the TD procedure.
- o_rc = doTdScrubCmd( stopCond, flags, &addr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "doTdScrubCmd() failed" );
- break;
- }
- }
-
- } while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
int32_t CenMbaTdCtlr::handleTdComplete( STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[CenMbaTdCtlr::handleTdComplete] "
@@ -1201,54 +641,6 @@ int32_t CenMbaTdCtlr::handleTdComplete( STEP_CODE_DATA_STRUCT & io_sc )
//------------------------------------------------------------------------------
-int32_t CenMbaTdCtlr::addTdQueueEntryVCM( const CenRank & i_rank )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::addTdQueueEntryVCM] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- // Verify a chip mark exists in hardware for this rank.
- CenMark mark;
- o_rc = mssGetMarkStore( iv_mbaTrgt, i_rank, mark );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "mssGetMarkStore() failed");
- break;
- }
- if ( !mark.getCM().isValid() )
- {
- PRDF_ERR( PRDF_FUNC "VCM event but no valid chip mark" );
- o_rc = FAIL; break;
- }
-
- // Push the TD request to the queue.
- iv_queue.push( TdQueueEntry(VCM_EVENT, i_rank) );
-
- // Mark this rank as bad.
- o_rc = iv_masterRanks.setBad( i_rank );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "setBad() failed" );
- break;
- }
-
- } while(0);
-
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Failed: i_rank=m%ds%d",
- i_rank.getMaster(), i_rank.getSlave() );
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
int32_t CenMbaTdCtlr::addTdQueueEntryTPS( const CenRank & i_rank,
STEP_CODE_DATA_STRUCT & io_sc,
bool i_banTps )
@@ -1330,51 +722,6 @@ int32_t CenMbaTdCtlr::addTdQueueEntryTPS( const CenRank & i_rank,
//------------------------------------------------------------------------------
-int32_t CenMbaTdCtlr::removeTdQueueEntry()
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::removeTdQueueEntry] "
-
- int32_t o_rc = SUCCESS;
-
- iv_queue.pop();
-
- // If there are no more references to iv_rank in the TD queue, set the rank
- // as 'good'.
- if ( !iv_queue.exists(iv_rank) )
- {
- o_rc = iv_masterRanks.setGood( iv_rank );
- if ( SUCCESS != o_rc )
- PRDF_ERR( PRDF_FUNC "setGood() failed" );
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::cleanupPrevCmd( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #ifndef __HOSTBOOT_RUNTIME
- ForceSyncAnalysis(*io_sc.service_data);
- #endif
- return CenMbaTdCtlrCommon::cleanupPrevCmd();
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::prepareNextCmd( STEP_CODE_DATA_STRUCT & io_sc,
- bool i_clearStats )
-{
- #ifndef __HOSTBOOT_RUNTIME
- ForceSyncAnalysis(*io_sc.service_data);
- #endif
- return CenMbaTdCtlrCommon::prepareNextCmd( i_clearStats );
-}
-
-//------------------------------------------------------------------------------
-
int32_t CenMbaTdCtlr::handleUe_Td( STEP_CODE_DATA_STRUCT & io_sc,
const CenAddr & i_stopAddr,
bool i_addTpsRequest )
@@ -1951,267 +1298,6 @@ int32_t CenMbaTdCtlr::tpsSymbolMark( STEP_CODE_DATA_STRUCT & io_sc )
//------------------------------------------------------------------------------
-int32_t CenMbaTdCtlr::maskFetchAttns()
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::maskFetchAttns] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- // Don't want to handle memory CEs during any TD procedures, so
- // mask them.
-
- const char * reg_str = (0 == iv_mbaPos) ? "MBSECCFIR_0_MASK_OR"
- : "MBSECCFIR_1_MASK_OR";
- SCAN_COMM_REGISTER_CLASS * reg = iv_membChip->getRegister(reg_str);
-
- reg->clearAllBits();
- reg->SetBit(16); // fetch NCE
- reg->SetBit(17); // fetch RCE
- reg->SetBit(43); // prefetch UE
-
- o_rc = reg->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on %s", reg_str );
- break;
- }
-
- iv_fetchAttnsMasked = true;
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::unmaskFetchAttns()
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::unmaskFetchAttns] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- // Memory CEs where masked at the beginning of the TD procedure, so
- // clear and unmask them. Also, it is possible that memory UEs have
- // thresholded so clear and unmask them as well.
-
- const char * fir_str = (0 == iv_mbaPos) ? "MBSECCFIR_0_AND"
- : "MBSECCFIR_1_AND";
- const char * msk_str = (0 == iv_mbaPos) ? "MBSECCFIR_0_MASK_AND"
- : "MBSECCFIR_1_MASK_AND";
-
- SCAN_COMM_REGISTER_CLASS * fir = iv_membChip->getRegister( fir_str );
- SCAN_COMM_REGISTER_CLASS * msk = iv_membChip->getRegister( msk_str );
-
- fir->setAllBits(); msk->setAllBits();
- fir->ClearBit(16); msk->ClearBit(16); // fetch NCE
- fir->ClearBit(17); msk->ClearBit(17); // fetch RCE
- fir->ClearBit(19); msk->ClearBit(19); // fetch UE
- fir->ClearBit(43); msk->ClearBit(43); // prefetch UE
-
- o_rc = fir->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on %s", fir_str );
- break;
- }
-
- o_rc = msk->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on %s", msk_str );
- break;
- }
-
- iv_fetchAttnsMasked = false;
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::clearCeCounters( uint32_t i_eccErrorMask )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::clearCeCounters] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- const char * ec0Reg_str =
- (0 == iv_mbaPos) ? "MBA0_MBSEC0" : "MBA1_MBSEC0";
- SCAN_COMM_REGISTER_CLASS * ec0Reg =
- iv_membChip->getRegister( ec0Reg_str );
- bool updateEc0 = false;
-
- o_rc = ec0Reg->Read();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Read() failed on %s", ec0Reg_str );
- break;
- }
-
- if ( i_eccErrorMask & SOFT_CTE )
- {
- // Clear Soft CE total count.
- ec0Reg->SetBitFieldJustified( 0, 12, 0 );
- updateEc0 = true;
- }
-
- if ( i_eccErrorMask & INTER_CTE )
- {
- // Clear Intermittent CE total count.
- ec0Reg->SetBitFieldJustified( 12, 12, 0 );
- updateEc0 = true;
- }
-
- if ( i_eccErrorMask & HARD_CTE )
- {
- // Clear the hard CE total count.
- ec0Reg->SetBitFieldJustified( 24, 12, 0 );
- updateEc0 = true;
-
- // Clear all of the per symbol counters. The assumption is that only
- // hard CEs are captured in the per symbol counters.
-
- o_rc = clearPerSymbolCounters( iv_membChip, iv_mbaPos );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "clearCeStats() failed " );
- break;
- }
- }
-
- if ( i_eccErrorMask & RETRY_CTE )
- {
- // Clear only the RCE total count.
- const char * ec1Reg_str =
- (0 == iv_mbaPos) ? "MBA0_MBSEC1" : "MBA1_MBSEC1";
- SCAN_COMM_REGISTER_CLASS * ec1Reg =
- iv_membChip->getRegister( ec1Reg_str );
-
- o_rc = ec1Reg->Read();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Read() failed on %s", ec1Reg_str );
- break;
- }
-
- ec1Reg->SetBitFieldJustified( 0, 12, 0 );
-
- o_rc = ec1Reg->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on %s", ec1Reg_str );
- break;
- }
- }
-
- if( true == updateEc0 )
- {
- o_rc = ec0Reg->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on %s", ec0Reg_str );
- break;
- }
- }
-
- } while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::doBgScrubCmd( uint32_t i_stopCond, uint32_t i_flags,
- const CenAddr * i_sAddrOverride )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::doBgScrubCmd] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- mss_MaintCmd::TimeBaseSpeed cmdSpeed = enableFastBgScrub()
- ? mss_MaintCmd::FAST_MED_BW_IMPACT
- : mss_MaintCmd::BG_SCRUB;
-
- iv_mssCmd = createMssCmd( mss_MaintCmdWrapper::TIMEBASE_SCRUB,
- iv_mbaTrgt, iv_rank, i_stopCond,
- cmdSpeed, i_flags, i_sAddrOverride );
- if ( NULL == iv_mssCmd )
- {
- PRDF_ERR( PRDF_FUNC "createMssCmd() failed");
- o_rc = FAIL; break;
- }
-
- o_rc = iv_mssCmd->setupAndExecuteCmd();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "setupAndExecuteCmd() failed" );
- break;
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::doTdScrubCmd( uint32_t i_stopCond, uint32_t i_flags,
- const CenAddr * i_sAddrOverride )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::doTdScrubCmd] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- mss_MaintCmd::TimeBaseSpeed cmdSpeed = enableFastBgScrub()
- ? mss_MaintCmd::FAST_MAX_BW_IMPACT
- : mss_MaintCmd::FAST_MIN_BW_IMPACT;
-
- iv_mssCmd = createMssCmd( mss_MaintCmdWrapper::TIMEBASE_SCRUB,
- iv_mbaTrgt, iv_rank, i_stopCond,
- cmdSpeed, i_flags, i_sAddrOverride );
- if ( NULL == iv_mssCmd )
- {
- PRDF_ERR( PRDF_FUNC "createMssCmd() failed");
- o_rc = FAIL; break;
- }
-
- o_rc = iv_mssCmd->setupAndExecuteCmd();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "setupAndExecuteCmd() failed" );
- break;
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
int32_t CenMbaTdCtlr::checkForAvailableSpares( uint8_t i_ps, bool & o_avail )
{
#define PRDF_FUNC "[CenMbaTdCtlr::checkForAvailableSpares] "
@@ -2267,166 +1353,4 @@ int32_t CenMbaTdCtlr::checkForAvailableSpares( uint8_t i_ps, bool & o_avail )
#undef PRDF_FUNC
}
-//------------------------------------------------------------------------------
-
-void CenMbaTdCtlr::collectStateCaptureData( STEP_CODE_DATA_STRUCT & io_sc,
- const char * i_descTag )
-{
- static const size_t sz_maxData = 256;
-
- // Initialize to 0.
- uint8_t data[sz_maxData];
- memset( data, 0x00, sz_maxData );
-
- size_t sz_actData = 0;
-
- //##########################################################################
- // Header data (4 bytes)
- //##########################################################################
-
- uint8_t mrnk = iv_rank.getMaster(); // 3-bit
- uint8_t srnk = iv_rank.getSlave(); // 3-bit
- uint8_t fetchMsk = iv_fetchAttnsMasked ? 1 : 0; // 1-bit
- uint8_t state = iv_tdState & 0x0f; // 4-bit
- uint8_t badRankMask = 0x00; // 8-bit
-
- TdRankList::List list = iv_masterRanks.getList();
- for ( TdRankList::ListItr it = list.begin(); it != list.end(); it++ )
- {
- if ( !it->isGood )
- {
- badRankMask |= 0x80 >> it->rank.getMaster();
- }
- }
-
- // This is a hack to ensure the data is non-zero. Otherwise, the section may
- // not be added to the capture data.
- uint8_t hack = 1; // 1-bit
-
- data[1] = badRankMask;
- data[2] = state << 4 | mrnk << 1 | fetchMsk;
- data[3] = srnk << 5 | hack << 4; // 4 extra bits
-
- sz_actData += 4;
-
- //##########################################################################
- // TD Request Queue (min 1 byte, max 33 bytes)
- //##########################################################################
-
- // To ensure we have enough space we are only going to add the first 16
- // entries of the queue.
-
- TdQueue::Queue queue = iv_queue.getQueue();
-
- uint8_t queueCount = queue.size();
- if ( 16 < queueCount ) queueCount = 16;
-
- data[sz_actData] = queueCount;
- sz_actData += 1;
-
- for ( TdQueue::QueueItr it = queue.begin(); it != queue.end(); it++ )
- {
- data[sz_actData ] = it->type;
- data[sz_actData+1] = it->rank.getMaster() << 5 |
- it->rank.getSlave() << 2; // 2 extra bits
-
- sz_actData += 2;
- }
-
- //##########################################################################
- // VCM Rank Data (min 1 byte, max 17 bytes)
- //##########################################################################
-
- uint8_t vcmDataCount = 0;
- uint8_t vcmDataCountIdx = sz_actData; // keep track, will update later
-
- sz_actData += 1; // Make room for VCM data count byte
-
- for ( TdRankList::ListItr it = list.begin(); it != list.end(); it++ )
- {
- CenRank master = it->rank;
- uint8_t mr = master.getMaster();
-
- uint8_t faCount = iv_vcmRankData.getFalseAlarmCount(master); // 8-bit
-
- if ( 0 != faCount )
- {
- vcmDataCount++;
-
- data[sz_actData ] = faCount;
- data[sz_actData+1] = mr << 5; // 3 extra bits
-
- sz_actData += 2;
- }
- }
-
- data[vcmDataCountIdx] = vcmDataCount; // update count
-
- //##########################################################################
- // TPS Rank Data (min 1 byte, max 129 bytes)
- //##########################################################################
-
- uint8_t tpsDataCount = 0;
- uint8_t tpsDataCountIdx = sz_actData; // keep track, will update later
-
- sz_actData += 1; // Make room for TPS data count byte
-
- for ( TdRankList::ListItr it = list.begin(); it != list.end(); it++ )
- {
- CenRank master = it->rank;
- uint8_t mr = master.getMaster();
-
- for ( uint8_t sr = 0; sr < SLAVE_RANKS_PER_MASTER_RANK; sr++ )
- {
- CenRank slave = CenRank( mr, sr );
-
- uint8_t faCount = iv_tpsRankData.getFalseAlarmCount(slave);
- uint8_t isBan = iv_tpsRankData.isBanned(slave, io_sc) ? 1 : 0;
-
- if ( (0 != faCount) || (0 != isBan) )
- {
- tpsDataCount++;
-
- data[sz_actData ] = faCount;
- data[sz_actData+1] = mr << 5 | sr << 2 | isBan << 1; // 1 extra
-
- sz_actData += 2;
- }
- }
- }
-
- data[tpsDataCountIdx] = tpsDataCount; // update count
-
- //##########################################################################
- // Add the capture data
- //##########################################################################
-
- // Adjust the size to be word aligned.
- static const size_t sz_word = sizeof(CPU_WORD);
- sz_actData = ((sz_actData+sz_word-1) / sz_word) * sz_word;
-
- // Fix endianness issues with non PPC machines.
- for ( uint32_t i = 0; i < (sz_actData/sz_word); i++ )
- ((CPU_WORD*)data)[i] = htonl(((CPU_WORD*)data)[i]);
-
- // Add the capture data.
- CaptureData & cd = io_sc.service_data->GetCaptureData();
- BitString bs ( sz_actData*8, (CPU_WORD *) &data );
- cd.Add( iv_mbaTrgt, Util::hashString(i_descTag), bs );
-}
-
-//------------------------------------------------------------------------------
-
-void CenMbaTdCtlr::collectStateCaptureDataStart( STEP_CODE_DATA_STRUCT & io_sc )
-{
- collectStateCaptureData( io_sc, "TDCTLR_STATE_DATA_START" );
-}
-
-//------------------------------------------------------------------------------
-
-void CenMbaTdCtlr::collectStateCaptureDataEnd( STEP_CODE_DATA_STRUCT & io_sc )
-{
- collectStateCaptureData( io_sc, "TDCTLR_STATE_DATA_END" );
-}
-
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C
index 805e4c7bb..044bbf12b 100644
--- a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C
+++ b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C
@@ -39,10 +39,6 @@
#include <prdfTrace.H>
#include <prdfErrlUtil.H>
-//#include <prdfCenAddress.H> TODO RTC 157888
-//#include <prdfCenDqBitmap.H> TODO RTC 157888
-//#include <prdfCenMarkstore.H> TODO RTC 157888
-
#ifdef __HOSTBOOT_MODULE
#include <dimmBadDqBitmapFuncs.H>
#include <p9_io_xbus_read_erepair.H>
@@ -916,197 +912,6 @@ int32_t getMemBufRawCardType( TargetHandle_t i_mba,
#undef PRDF_FUNC
}
-
-//##############################################################################
-//## Maintenance Command class wrapper
-//##############################################################################
-
-/* TODO RTC 157888
-mss_MaintCmdWrapper::mss_MaintCmdWrapper( mss_MaintCmd * i_maintCmd ) :
- iv_cmd(i_maintCmd)
-{}
-
-//------------------------------------------------------------------------------
-
-mss_MaintCmdWrapper::~mss_MaintCmdWrapper()
-{
- delete iv_cmd;
-}
-
-//------------------------------------------------------------------------------
-
-int32_t mss_MaintCmdWrapper::setupAndExecuteCmd()
-{
- #define PRDF_FUNC "[mss_MaintCmdWrapper::setupAndExecuteCmd] "
-
- int32_t o_rc = SUCCESS;
-
- fapi::ReturnCode l_rc = iv_cmd->setupAndExecuteCmd();
- errlHndl_t errl = fapi::fapiRcToErrl( l_rc );
- if ( NULL != errl )
- {
- PRDF_GET_REASONCODE( errl, o_rc );
- PRDF_ERR( PRDF_FUNC "setupAndExecuteCmd() failed: rc=0x%x", o_rc );
- PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT );
- o_rc = FAIL;
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t mss_MaintCmdWrapper::stopCmd()
-{
- #define PRDF_FUNC "[mss_MaintCmdWrapper::stopCmd] "
-
- int32_t o_rc = SUCCESS;
-
- fapi::ReturnCode l_rc = iv_cmd->stopCmd();
- errlHndl_t errl = fapi::fapiRcToErrl( l_rc );
- if ( NULL != errl )
- {
- PRDF_GET_REASONCODE( errl, o_rc );
- PRDF_ERR( PRDF_FUNC "stopCmd() failed: rc=0x%x", o_rc );
- PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT );
- o_rc = FAIL;
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t mss_MaintCmdWrapper::cleanupCmd()
-{
- #define PRDF_FUNC "[mss_MaintCmdWrapper::cleanupCmd] "
-
- int32_t o_rc = SUCCESS;
-
- fapi::ReturnCode l_rc = iv_cmd->cleanupCmd();
- errlHndl_t errl = fapi::fapiRcToErrl( l_rc );
- if ( NULL != errl )
- {
- PRDF_GET_REASONCODE( errl, o_rc );
- PRDF_ERR( PRDF_FUNC "cleanupCmd() failed: rc=0x%x", o_rc );
- PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT );
- o_rc = FAIL;
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-// Helper function for the other createMssCmd() functions.
-mss_MaintCmdWrapper * createMssCmd( mss_MaintCmdWrapper::CmdType i_cmdType,
- TargetHandle_t i_mba, uint32_t i_stopCond,
- mss_MaintCmd::TimeBaseSpeed i_cmdSpeed,
- ecmdDataBufferBase i_startAddr,
- ecmdDataBufferBase i_endAddr )
-{
- #define PRDF_FUNC "[PlatServices::getMssCmd] "
-
- mss_MaintCmdWrapper * o_cmd = NULL;
-
- mss_MaintCmd * cmd = NULL;
-
- switch ( i_cmdType )
- {
- case mss_MaintCmdWrapper::TIMEBASE_SCRUB:
- cmd = new mss_TimeBaseScrub( getFapiTarget(i_mba), i_startAddr,
- i_endAddr, i_cmdSpeed, i_stopCond,
- false );
- break;
- case mss_MaintCmdWrapper::TIMEBASE_STEER_CLEANUP:
- cmd = new mss_TimeBaseSteerCleanup( getFapiTarget(i_mba),
- i_startAddr, i_endAddr,
- i_cmdSpeed, i_stopCond, false );
- break;
- case mss_MaintCmdWrapper::SUPERFAST_READ:
- cmd = new mss_SuperFastRead( getFapiTarget(i_mba), i_startAddr,
- i_endAddr, i_stopCond, false );
- break;
- default:
- PRDF_ERR( PRDF_FUNC "Unsupported command type: 0x%x", i_cmdType );
- }
-
- if ( NULL != cmd )
- o_cmd = new mss_MaintCmdWrapper(cmd);
-
- return o_cmd;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-mss_MaintCmdWrapper * createMssCmd( mss_MaintCmdWrapper::CmdType i_cmdType,
- TargetHandle_t i_mba,
- const CenRank & i_rank, uint32_t i_stopCond,
- mss_MaintCmd::TimeBaseSpeed i_cmdSpeed,
- uint32_t i_flags,
- const CenAddr * i_sAddrOverride )
-{
- mss_MaintCmdWrapper * o_cmd = NULL;
-
- bool slaveOnly = ( 0 != (i_flags & mss_MaintCmdWrapper::SLAVE_RANK_ONLY) );
- bool allMemory = ( 0 != (i_flags & mss_MaintCmdWrapper::END_OF_MEMORY ) );
-
- do
- {
-
- int32_t l_rc = SUCCESS;
-
- // Get the address range of i_rank.
- ecmdDataBufferBase sAddr(64), eAddr(64);
- l_rc = getMemAddrRange( i_mba, i_rank.getMaster(), sAddr, eAddr,
- i_rank.getSlave(), slaveOnly );
- if ( SUCCESS != l_rc ) break;
-
- // Override the start address, if needed.
- if ( NULL != i_sAddrOverride )
- {
- sAddr.setDoubleWord( 0, i_sAddrOverride->toReadAddr() );
- }
-
- // Get the last address in memory, if needed.
- if ( allMemory )
- {
- ecmdDataBufferBase junk(64);
- l_rc = getMemAddrRange( i_mba, MSS_ALL_RANKS, junk, eAddr );
- if ( SUCCESS != l_rc ) break;
- }
-
- // Create the command
- o_cmd = createMssCmd( i_cmdType, i_mba, i_stopCond, i_cmdSpeed,
- sAddr, eAddr );
-
- } while (0);
-
- return o_cmd;
-}
-
-//------------------------------------------------------------------------------
-
-mss_MaintCmdWrapper * createIncAddrMssCmd( TargetHandle_t i_mba )
-{
- mss_MaintCmdWrapper * o_cmd = NULL;
-
- mss_MaintCmd * cmd = new mss_IncrementAddress( getFapiTarget(i_mba) );
-
- o_cmd = new mss_MaintCmdWrapper( cmd );
-
- return o_cmd;
-}
-*/
-
//------------------------------------------------------------------------------
} // end namespace PlatServices
diff --git a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H
index fd85583db..9db6992aa 100755
--- a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H
+++ b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H
@@ -331,127 +331,6 @@ void getDimmDqAttr( TARGETING::TargetHandle_t i_target,
uint8_t (&io_dqMapPtr)[DQS_PER_DIMM] );
//##############################################################################
-//## Maintenance Command class wrapper
-//##############################################################################
-
-// TODO: RTC 157888
-///**
-// * @brief This is a wrapper class for underlying maintenance class object
-// *
-// * By this class, we will hide underlying maintenance class dependency
-// * from rest of code. All public function mss_MaintCmd used by prd should
-// * be defined here also.
-// */
-//class mss_MaintCmdWrapper
-//{
-// public: // data types
-//
-// /** Represents underlying maintenance command object type **/
-// enum CmdType
-// {
-// TIMEBASE_SCRUB,
-// TIMEBASE_STEER_CLEANUP,
-// SUPERFAST_READ,
-// };
-//
-// /** Input flags to control how, and on what, the command runs. **/
-// enum CtrlFlags
-// {
-// /** Run all defaults. See each individual flag of default behavior */
-// NO_FLAGS = 0x00,
-//
-// /** When set, the command will run from the beginning of the given rank
-// * to the end of memory. Default is to run to the end of the rank. */
-// END_OF_MEMORY = 0x01,
-//
-// /** When set, the command will run on the slave rank only. Default is to
-// * run on the entire master rank. */
-// SLAVE_RANK_ONLY = 0x04,
-// };
-//
-// public: // functions
-//
-// /**
-// * @brief Constructor
-// *
-// * @param i_maintCmd Underlying maintenance command object
-// */
-// mss_MaintCmdWrapper( mss_MaintCmd * i_maintCmd );
-//
-// /**
-// * @brief Destructor
-// */
-// virtual ~mss_MaintCmdWrapper();
-//
-// /**
-// * @brief Stops running maint cmd, and saves the address it stopped at.
-// * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
-// */
-// int32_t stopCmd();
-//
-// /**
-// * @brief Saves any settings that need to be restored when command is done.
-// * Loads the setup parameters into the hardware. Starts the command,
-// * then either polls for complete or exits with command running.
-// * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
-// */
-// int32_t setupAndExecuteCmd();
-//
-// /**
-// * @brief Called once a command is done if we need to restore settings that
-// * had to be modified to run a specific command type, or clear error
-// * data in the hw that is no longer relevant.
-// * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
-// */
-// int32_t cleanupCmd();
-//
-// private: // instance variables
-//
-// // Underlying maintenance command object pointer
-// mss_MaintCmd * iv_cmd;
-//
-//}; // class mss_MaintCmdWrapper
-
-/**
- * @brief Create a maintenance command object.
- * @param i_cmdType Maintenance command type which we want to create.
- * @param i_mba An MBA target.
- * @param i_rank The first rank to start with (see enum CtrlFlags for
- * more details).
- * @param i_stopCond Bit mask for conditions in which to stop command.
- * @param i_cmdSpeed See enum mss_MaintCmd::TimeBaseSpeed for details.
- * @param i_flags See enum CtrlFlags for details.
- * @param i_sAddrOverride A non-NULL value indicates to use this start address
- * and not the start address of i_rank.
- * @return A mss_MaintCmdWrapper object, NULL if an internal function failed.
- * @note This function allocates memory on heap for mss_MaintCmdWrapper
- * object. It is the caller's responsibilty to delete this object.
- * @note By default this maintenance command will operate on the address range
- * that contains i_rank, but the target address range can be modified
- * with i_flags and/or i_sAddrOverride.
- */
-/* TODO RTC 157888
-mss_MaintCmdWrapper * createMssCmd( mss_MaintCmdWrapper::CmdType i_cmdType,
- TARGETING::TargetHandle_t i_mba,
- const CenRank & i_rank, uint32_t i_stopCond,
- mss_MaintCmd::TimeBaseSpeed i_cmdSpeed
- = mss_MaintCmd::FAST_MAX_BW_IMPACT,
- uint32_t i_flags = mss_MaintCmdWrapper::NO_FLAGS,
- const CenAddr * i_sAddrOverride = NULL );
-*/
-
-/**
- * @brief Create an IncrementAddress maintenance command object.
- * @param i_mba An MBA target.
- * @return A mss_MaintCmdWrapper object, NULL if an internal function failed.
- * @note This function allocates memory on heap for mss_MaintCmdWrapper
- * object. It is the caller's responsibilty to delete this object.
- */
-/* TODO RTC 157888
-mss_MaintCmdWrapper * createIncAddrMssCmd( TARGETING::TargetHandle_t i_mba );
-*/
-
-//##############################################################################
//## util functions
//##############################################################################
OpenPOWER on IntegriCloud