summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C76
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H7
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_ipl.C28
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C6
4 files changed, 51 insertions, 66 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
index 516a672cb..0681cce42 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
@@ -156,7 +156,7 @@ uint32_t MemTdCtlr<T>::handleCmdComplete( STEP_CODE_DATA_STRUCT & io_sc )
//------------------------------------------------------------------------------
template<>
-uint32_t MemTdCtlr<TYPE_MCBIST>::initStoppedRank()
+uint32_t MemTdCtlr<TYPE_MCBIST>::initStoppedRank( const MemAddr & i_addr )
{
#define PRDF_FUNC "[initStoppedRank] "
@@ -177,18 +177,8 @@ uint32_t MemTdCtlr<TYPE_MCBIST>::initStoppedRank()
break;
}
- // Get the rank in which the command stopped.
- MemAddr addr;
- o_rc = getMemMaintAddr<TYPE_MCBIST>( iv_chip, addr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getMemMaintAddr<TYPE_MCBIST>(0x%08x) failed",
- iv_chip->getHuid() );
- break;
- }
-
ExtensibleChip * mcaChip = portList.front();
- MemRank rank = addr.getRank();
+ MemRank rank = i_addr.getRank();
// ############################ SIMICs only ############################
// We have found it to be increasingly difficult to simulate the MCBMCAT
@@ -228,32 +218,12 @@ uint32_t MemTdCtlr<TYPE_MCBIST>::initStoppedRank()
//------------------------------------------------------------------------------
template<>
-uint32_t MemTdCtlr<TYPE_MBA>::initStoppedRank()
+uint32_t MemTdCtlr<TYPE_MBA>::initStoppedRank( const MemAddr & i_addr )
{
- #define PRDF_FUNC "[initStoppedRank] "
-
- uint32_t o_rc = SUCCESS;
-
- do
- {
- // Get the rank in which the command stopped.
- MemAddr addr;
- o_rc = getMemMaintAddr<TYPE_MBA>( iv_chip, addr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getMemMaintAddr<TYPE_MBA>(0x%08x) failed",
- iv_chip->getHuid() );
- break;
- }
+ // Update iv_stoppedRank.
+ iv_stoppedRank = TdRankListEntry( iv_chip, i_addr.getRank() );
- // Update iv_stoppedRank.
- iv_stoppedRank = TdRankListEntry( iv_chip, addr.getRank() );
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
+ return SUCCESS;
}
//------------------------------------------------------------------------------
@@ -267,13 +237,14 @@ uint32_t MemTdCtlr<TYPE_MBA>::initStoppedRank()
// to create a public function.
template<TARGETING::TYPE T>
uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
- const MemRank & i_rank, bool & o_errorsFound,
+ const MemAddr & i_addr, bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc );
//------------------------------------------------------------------------------
template<>
-uint32_t MemTdCtlr<TYPE_MCBIST>::checkEcc( bool & o_errorsFound,
+uint32_t MemTdCtlr<TYPE_MCBIST>::checkEcc( const MemAddr & i_addr,
+ bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[MemTdCtlr<TYPE_MCBIST>::checkEcc] "
@@ -282,8 +253,6 @@ uint32_t MemTdCtlr<TYPE_MCBIST>::checkEcc( bool & o_errorsFound,
o_errorsFound = false;
- MemRank rank = iv_stoppedRank.getRank();
-
do
{
// Get all ports in which the command was run.
@@ -300,12 +269,12 @@ uint32_t MemTdCtlr<TYPE_MCBIST>::checkEcc( bool & o_errorsFound,
for ( auto & mcaChip : portList )
{
bool errorsFound;
- uint32_t l_rc = __checkEcc<TYPE_MCA>( mcaChip, iv_queue, rank,
+ uint32_t l_rc = __checkEcc<TYPE_MCA>( mcaChip, iv_queue, i_addr,
errorsFound, io_sc );
if ( SUCCESS != l_rc )
{
- PRDF_ERR( PRDF_FUNC "__checkEcc<TYPE_MCA>(0x%08x,%d) failed",
- mcaChip->getHuid(), rank.getMaster() );
+ PRDF_ERR( PRDF_FUNC "__checkEcc<TYPE_MCA>(0x%08x) failed",
+ mcaChip->getHuid() );
o_rc |= l_rc; continue; // Try the other MCAs.
}
@@ -323,11 +292,12 @@ uint32_t MemTdCtlr<TYPE_MCBIST>::checkEcc( bool & o_errorsFound,
//------------------------------------------------------------------------------
template<>
-uint32_t MemTdCtlr<TYPE_MBA>::checkEcc( bool & o_errorsFound,
+uint32_t MemTdCtlr<TYPE_MBA>::checkEcc( const MemAddr & i_addr,
+ bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc )
{
- return __checkEcc<TYPE_MBA>( iv_chip, iv_queue, iv_stoppedRank.getRank(),
- o_errorsFound, io_sc );
+ return __checkEcc<TYPE_MBA>( iv_chip, iv_queue, i_addr, o_errorsFound,
+ io_sc );
}
//------------------------------------------------------------------------------
@@ -342,9 +312,19 @@ uint32_t MemTdCtlr<T>::analyzeCmdComplete( bool & o_errorsFound,
do
{
+ // First, get the address in which the command stopped.
+ MemAddr addr;
+ o_rc = getMemMaintAddr<T>( iv_chip, addr );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "getMemMaintAddr<T>(0x%08x) failed",
+ iv_chip->getHuid() );
+ break;
+ }
+
// First, keep track of where the command stopped. Must be done
// before calling checkEcc().
- o_rc = initStoppedRank();
+ o_rc = initStoppedRank( addr );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "initStoppedRank() failed" );
@@ -352,7 +332,7 @@ uint32_t MemTdCtlr<T>::analyzeCmdComplete( bool & o_errorsFound,
}
// Then, check for ECC errors, if they exist.
- o_rc = checkEcc( o_errorsFound, io_sc );
+ o_rc = checkEcc( addr, o_errorsFound, io_sc );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "checkEcc(0x%08x) failed",
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H
index 000339b48..a520dac2f 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H
@@ -172,20 +172,23 @@ class MemTdCtlr
* non-TD command to initialize iv_stoppedRank and iv_broadcastMode,
* which are used to indicate where the command should resume after
* targeted diagnostics is compete.
+ * @param i_addr Address in which the command stopped.
* @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
*/
- uint32_t initStoppedRank();
+ uint32_t initStoppedRank( const MemAddr & i_addr );
/**
* @brief This is called when handling a command complete attention for a
* non-TD command to check for ECC errors. This must be called after
* initStoppedRank() to ensure iv_stoppedRank is initialized.
+ * @param i_addr Address in which the command stopped.
* @param o_errorsFound True if errors where found and handled. False
* otherwise.
* @param io_sc The step code data struct.
* @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
*/
- uint32_t checkEcc( bool & o_errorsFound, STEP_CODE_DATA_STRUCT & io_sc );
+ uint32_t checkEcc( const MemAddr & i_addr, bool & o_errorsFound,
+ STEP_CODE_DATA_STRUCT & io_sc );
/**
* @brief This is called when handling a command complete attention for a
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_ipl.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_ipl.C
index 590d56d6f..06c3f867b 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_ipl.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_ipl.C
@@ -134,7 +134,7 @@ uint32_t MemTdCtlr<T>::defaultStep( STEP_CODE_DATA_STRUCT & io_sc )
template <TARGETING::TYPE T>
uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
- const MemRank & i_rank, bool & o_errorsFound,
+ const MemAddr & i_addr, bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[__checkEcc] "
@@ -146,6 +146,8 @@ uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
TargetHandle_t trgt = i_chip->getTrgt();
HUID huid = i_chip->getHuid();
+ MemRank rank = i_addr.getRank();
+
do
{
// Check for ECC errors.
@@ -166,7 +168,7 @@ uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
io_sc.service_data->setSignature( huid, PRDFSIG_MaintUE );
// Add the rank to the callout list.
- MemEcc::calloutMemUe<T>( i_chip, i_rank, io_sc );
+ MemEcc::calloutMemUe<T>( i_chip, rank, io_sc );
// Make the error log predictive.
io_sc.service_data->setServiceCall();
@@ -177,11 +179,11 @@ uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
// Read the chip mark from markstore.
MemMark chipMark;
- o_rc = MarkStore::readChipMark<T>( i_chip, i_rank, chipMark );
+ o_rc = MarkStore::readChipMark<T>( i_chip, rank, chipMark );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "readChipMark<T>(0x%08x,%d) failed",
- huid, i_rank.getMaster() );
+ huid, rank.getMaster() );
break;
}
@@ -191,11 +193,11 @@ uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
PRDF_ASSERT( chipMark.isValid() );
// Add the mark to the callout list.
- MemoryMru mm { trgt, i_rank, chipMark.getSymbol() };
+ MemoryMru mm { trgt, rank, chipMark.getSymbol() };
io_sc.service_data->SetCallout( mm );
// Add a new VCM procedure to the queue.
- TdEntry * e = new VcmEvent<T>{ i_chip, i_rank, chipMark };
+ TdEntry * e = new VcmEvent<T>{ i_chip, rank, chipMark };
io_queue.push( e );
}
else if ( isMfgCeCheckingEnabled() &&
@@ -205,12 +207,12 @@ uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
// Query the per-symbol counters for the hard CE symbol.
MemUtils::MaintSymbols symData; MemSymbol junk;
- o_rc = MemUtils::collectCeStats<T>( i_chip, i_rank, symData, junk );
+ o_rc = MemUtils::collectCeStats<T>( i_chip, rank, symData, junk );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "MemUtils::collectCeStats(0x%08x,m%ds%d) "
- "failed", i_chip->GetId(), i_rank.getMaster(),
- i_rank.getSlave() );
+ "failed", i_chip->GetId(), rank.getMaster(),
+ rank.getSlave() );
break;
}
@@ -218,12 +220,12 @@ uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
// may be more than one symbol. Add all to the callout list.
for ( auto & s : symData )
{
- MemoryMru memmru ( trgt, i_rank, s.symbol );
+ MemoryMru memmru ( trgt, rank, s.symbol );
io_sc.service_data->SetCallout( memmru );
}
// Add a TPS procedure to the queue.
- TdEntry * e = new TpsEvent<T>{ i_chip, i_rank };
+ TdEntry * e = new TpsEvent<T>{ i_chip, rank };
io_queue.push( e );
}
else // Nothing found.
@@ -240,12 +242,12 @@ uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
template
uint32_t __checkEcc<TYPE_MCA>( ExtensibleChip * i_chip, TdQueue & io_queue,
- const MemRank & i_rank, bool & o_errorsFound,
+ const MemAddr & i_addr, bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc );
template
uint32_t __checkEcc<TYPE_MBA>( ExtensibleChip * i_chip, TdQueue & io_queue,
- const MemRank & i_rank, bool & o_errorsFound,
+ const MemAddr & i_addr, bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc );
//------------------------------------------------------------------------------
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
index a78758e39..f935c8d30 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
@@ -193,7 +193,7 @@ uint32_t MemTdCtlr<T>::defaultStep( STEP_CODE_DATA_STRUCT & io_sc )
template <TARGETING::TYPE T>
uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
- const MemRank & i_rank, bool & o_errorsFound,
+ const MemAddr & i_addr, bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[__checkEcc] "
@@ -225,12 +225,12 @@ uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue,
template
uint32_t __checkEcc<TYPE_MCA>( ExtensibleChip * i_chip, TdQueue & io_queue,
- const MemRank & i_rank, bool & o_errorsFound,
+ const MemAddr & i_addr, bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc );
template
uint32_t __checkEcc<TYPE_MBA>( ExtensibleChip * i_chip, TdQueue & io_queue,
- const MemRank & i_rank, bool & o_errorsFound,
+ const MemAddr & i_addr, bool & o_errorsFound,
STEP_CODE_DATA_STRUCT & io_sc );
//------------------------------------------------------------------------------
OpenPOWER on IntegriCloud