summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/plat/mem
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/diag/prdf/plat/mem')
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C129
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdRankList.H9
2 files changed, 131 insertions, 7 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
index e5a52e515..069cd9ca6 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
@@ -233,10 +233,10 @@ uint32_t MemTdCtlr<T>::handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
//------------------------------------------------------------------------------
-template <TARGETING::TYPE T>
-uint32_t MemTdCtlr<T>::initialize()
+template <>
+uint32_t MemTdCtlr<TYPE_MBA>::initialize()
{
- #define PRDF_FUNC "[MemTdCtlr::initialize] "
+ #define PRDF_FUNC "[MemTdCtlr<TYPE_MBA>::initialize] "
uint32_t o_rc = SUCCESS;
@@ -244,13 +244,130 @@ uint32_t MemTdCtlr<T>::initialize()
{
if ( iv_initialized ) break; // nothing to do
- // Add any unverified chip marks to the TD queue
- // TODO: RTC 171866
+ // Add any unverified chip marks to the TD queue.
+
+ std::vector<TdRankListEntry> vectorList = iv_rankList.getList();
+
+ for ( auto & entry : vectorList )
+ {
+ ExtensibleChip * mbaChip = entry.getChip();
+ MemRank rank = entry.getRank();
+
+ // Call readChipMark to get MemMark.
+ MemMark chipMark;
+ o_rc = MarkStore::readChipMark<TYPE_MBA>( mbaChip, rank, chipMark );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "readChipMark<TYPE_MBA>(0x%08x,%d) "
+ "failed", mbaChip->getHuid(), rank.getMaster() );
+ break;
+ }
+
+ // Get the DQ Bitmap data.
+ TargetHandle_t mbaTrgt = mbaChip->GetChipHandle();
+ MemDqBitmap<DIMMS_PER_RANK::MBA> dqBitmap;
+
+ o_rc = getBadDqBitmap<DIMMS_PER_RANK::MBA>(mbaTrgt, rank, dqBitmap);
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "getBadDqBitmap<DIMMS_PER_RANK::MBA>"
+ "(0x%08x, %d)", getHuid(mbaTrgt), rank.getMaster() );
+ break;
+ }
+
+ // Check if the chip mark is verified or not.
+ bool cmVerified = false;
+ o_rc = dqBitmap.isChipMark( chipMark.getSymbol(), cmVerified );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "dqBitmap.isChipMark() failed." );
+ break;
+ }
+
+ // If the chip mark is unverified, add a VcmEvent to the TD queue
+ if ( !cmVerified )
+ {
+ TdEntry * vcmEntry = new VcmEvent<TYPE_MBA>( mbaChip, rank,
+ chipMark );
+ iv_queue.push( vcmEntry );
+ }
+ }
// At this point, the TD controller is initialized.
iv_initialized = true;
+ }while(0);
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+}
+
+//------------------------------------------------------------------------------
+
+template <>
+uint32_t MemTdCtlr<TYPE_MCBIST>::initialize()
+{
+ #define PRDF_FUNC "[MemTdCtlr<TYPE_MCBIST>::initialize] "
+
+ uint32_t o_rc = SUCCESS;
+
+ do
+ {
+ if ( iv_initialized ) break; // nothing to do
+
+ // Add any unverified chip marks to the TD queue.
+
+ std::vector<TdRankListEntry> vectorList = iv_rankList.getList();
+
+ for ( auto & entry : vectorList )
+ {
+ ExtensibleChip * mcaChip = entry.getChip();
+ MemRank rank = entry.getRank();
+
+ // Call readChipMark to get MemMark.
+ MemMark chipMark;
+ o_rc = MarkStore::readChipMark<TYPE_MCA>( mcaChip, rank, chipMark );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "readChipMark<TYPE_MCA>(0x%08x,%d) "
+ "failed", mcaChip->getHuid(), rank.getMaster() );
+ break;
+ }
+
+ // Get the DQ Bitmap data.
+ TargetHandle_t mcaTrgt = mcaChip->GetChipHandle();
+ MemDqBitmap<DIMMS_PER_RANK::MCA> dqBitmap;
+
+ o_rc = getBadDqBitmap<DIMMS_PER_RANK::MCA>(mcaTrgt, rank, dqBitmap);
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "getBadDqBitmap<DIMMS_PER_RANK::MCA>"
+ "(0x%08x, %d)", getHuid(mcaTrgt), rank.getMaster() );
+ break;
+ }
+
+ // Check if the chip mark is verified or not.
+ bool cmVerified = false;
+ o_rc = dqBitmap.isChipMark( chipMark.getSymbol(), cmVerified );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "dqBitmap.isChipMark() failed." );
+ break;
+ }
+
+ // If the chip mark is unverified, add a VcmEvent to the TD queue
+ if ( !cmVerified )
+ {
+ TdEntry * vcmEntry = new VcmEvent<TYPE_MCA>( mcaChip, rank,
+ chipMark );
+ iv_queue.push( vcmEntry );
+ }
+ }
+
+ // At this point, the TD controller is initialized.
+ iv_initialized = true;
+ }while(0);
- } while (0);
return o_rc;
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdRankList.H b/src/usr/diag/prdf/plat/mem/prdfMemTdRankList.H
index af1185b62..ddc9b7390 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdRankList.H
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdRankList.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2016 */
+/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -144,6 +144,13 @@ class TdRankList
return *next_it;
}
+ /**
+ * @brief Get the list of ranks.
+ * @return The vector of list entries.
+ */
+ const std::vector<TdRankListEntry> & getList() { return iv_list; }
+
+
private: // instance variables
std::vector<TdRankListEntry> iv_list; ///< The list of ranks.
OpenPOWER on IntegriCloud