diff options
author | Caleb Palmer <cnpalmer@us.ibm.com> | 2017-08-04 13:13:44 -0500 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2017-08-18 10:37:56 -0400 |
commit | ddf7c6fe3cf9e1937ed5552ae19c3100d5a8fec9 (patch) | |
tree | 10914fcf90ca323c6f9e218b03d9411a1aaa9d5c /src/usr/diag/prdf/plat/mem | |
parent | 9ca155feadc24bea65773b348683a4664a7d704c (diff) | |
download | talos-hostboot-ddf7c6fe3cf9e1937ed5552ae19c3100d5a8fec9.tar.gz talos-hostboot-ddf7c6fe3cf9e1937ed5552ae19c3100d5a8fec9.zip |
PRD: Find unverified chip marks in TdCtlr init
Change-Id: I67b7f4c81076fdec9eedc47093b9dfe0084944ab
RTC: 171866
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44023
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44763
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/plat/mem')
-rw-r--r-- | src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C | 129 | ||||
-rw-r--r-- | src/usr/diag/prdf/plat/mem/prdfMemTdRankList.H | 9 |
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. |