summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C')
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C62
1 files changed, 53 insertions, 9 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
index e0835df7e..b42daa446 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
@@ -524,12 +524,13 @@ uint32_t __handleNceEte( ExtensibleChip * i_chip, TdQueue & io_queue,
//------------------------------------------------------------------------------
template<TARGETING::TYPE T>
-uint32_t __handleRceEte( ExtensibleChip * i_chip, bool & o_errorsFound,
+uint32_t __handleRceEte( ExtensibleChip * i_chip, TdQueue & io_queue,
+ const MemRank & i_rank, bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc );
template<>
-uint32_t __handleRceEte<TYPE_MCA>( ExtensibleChip * i_chip,
- bool & o_errorsFound,
+uint32_t __handleRceEte<TYPE_MCA>( ExtensibleChip * i_chip, TdQueue & io_queue,
+ const MemRank & i_rank, bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[__handleRceEte] "
@@ -557,7 +558,7 @@ uint32_t __handleRceEte<TYPE_MCA>( ExtensibleChip * i_chip,
o_errorsFound = true;
io_sc.service_data->AddSignatureList( i_chip->getTrgt(),
PRDFSIG_MaintIUE );
- o_rc = MemEcc::analyzeMaintIue<TYPE_MCA>(i_chip, io_sc);
+ o_rc = MemEcc::handleMemIue<TYPE_MCA>( i_chip, i_rank, io_sc );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "analyzeMaintIue(0x%08x) failed",
@@ -572,18 +573,61 @@ uint32_t __handleRceEte<TYPE_MCA>( ExtensibleChip * i_chip,
#undef PRDF_FUNC
}
-/* TODO RTC 157888
template<>
-uint32_t __handleRceEte<TYPE_MBA>( ExtensibleChip * i_chip,
- bool & o_errorsFound,
+uint32_t __handleRceEte<TYPE_MBA>( ExtensibleChip * i_chip, TdQueue & io_queue,
+ const MemRank & i_rank, bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[__handleRceEte] "
uint32_t o_rc = SUCCESS;
+ TargetHandle_t trgt = i_chip->getTrgt();
+
+ o_errorsFound = true;
+ io_sc.service_data->AddSignatureList( trgt, PRDFSIG_MaintRETRY_CTE );
+
+ // Add the rank to the callout list.
+ MemoryMru mm { trgt, i_rank, MemoryMruData::CALLOUT_RANK };
+ io_sc.service_data->SetCallout( mm );
+
do
{
+ bool doTps = true;
+
+ if ( mfgMode() )
+ {
+ ExtensibleChip * membChip = getConnectedParent(i_chip, TYPE_MEMBUF);
+
+ // Get the current RCE count from hardware.
+ const char * reg_str = (0 == i_chip->getPos()) ? "MBA0_MBSEC1"
+ : "MBA1_MBSEC1";
+ SCAN_COMM_REGISTER_CLASS * reg = membChip->getRegister( reg_str );
+ o_rc = reg->Read();
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "Read() failed on %s", reg_str );
+ break;
+ }
+ uint16_t count = reg->GetBitFieldJustified( 0, 12 );
+
+ // Add the count to RCE table.
+ doTps = getMbaDataBundle(i_chip)->iv_rceTable.addEntry( i_rank,
+ io_sc,
+ count );
+ }
+ else
+ {
+ // The RCE threshold was set to the maximum. If we hit this then
+ // there is definitely a problem.
+ io_sc.service_data->setServiceCall();
+ }
+
+ // Add a TPS procedure to the queue, if needed.
+ if ( doTps )
+ {
+ io_queue.push( new TpsEvent<TYPE_MBA>(i_chip, i_rank) );
+ }
} while (0);
@@ -591,7 +635,6 @@ uint32_t __handleRceEte<TYPE_MBA>( ExtensibleChip * i_chip,
#undef PRDF_FUNC
}
-*/
//------------------------------------------------------------------------------
@@ -694,7 +737,8 @@ uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
if ( 0 != (eccAttns & MAINT_RCE_ETE) )
{
- o_rc = __handleRceEte<T>( i_chip, o_errorsFound, io_sc );
+ o_rc = __handleRceEte<T>( i_chip, io_queue, rank, o_errorsFound,
+ io_sc );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "__handleRceEte<T>(0x%08x) failed", huid );
OpenPOWER on IntegriCloud