diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2017-04-07 16:33:47 -0500 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2017-04-13 14:35:46 -0400 |
commit | 6a92c7d3d4d74545dcb277a512119370a89ce1aa (patch) | |
tree | 1fa22047c30f19a5cb4a5b5ce8300d555944514a /src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C | |
parent | d66fd028b7c2ed1fe2551e1b3726d7a033aee8bc (diff) | |
download | talos-hostboot-6a92c7d3d4d74545dcb277a512119370a89ce1aa.tar.gz talos-hostboot-6a92c7d3d4d74545dcb277a512119370a89ce1aa.zip |
PRD: consolidated MemTdCtlr::checkEcc()
Change-Id: I08222eec220d0468a37dc905ff4b943105c598bc
RTC: 171915
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39107
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C')
-rw-r--r-- | src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C index 40e0e4a54..516a672cb 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C @@ -258,6 +258,80 @@ uint32_t MemTdCtlr<TYPE_MBA>::initStoppedRank() //------------------------------------------------------------------------------ +// This is a forward reference to a function that is locally defined in +// prdfMemTdCtlr_ipl.C and prdfMemTdCtlr_rt.C. The reason for this is that the +// MemTdCtlr template is only created for the MCBIST and MBA targets, not the +// MCA, but the ECC analysis is done on each MCA and MBA. Therefore, we needed +// some way to change the template to use the MCA. It is also a local function +// because this is only for MemTdCtlr internal use and it didn't make much sense +// 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, + STEP_CODE_DATA_STRUCT & io_sc ); + +//------------------------------------------------------------------------------ + +template<> +uint32_t MemTdCtlr<TYPE_MCBIST>::checkEcc( bool & o_errorsFound, + STEP_CODE_DATA_STRUCT & io_sc ) +{ + #define PRDF_FUNC "[MemTdCtlr<TYPE_MCBIST>::checkEcc] " + + uint32_t o_rc = SUCCESS; + + o_errorsFound = false; + + MemRank rank = iv_stoppedRank.getRank(); + + do + { + // Get all ports in which the command was run. + std::vector<ExtensibleChip *> portList; + o_rc = getMcbistMaintPort( iv_chip, portList ); + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "getMcbistMaintPort(0x%08x) failed", + iv_chip->getHuid() ); + break; + } + + // Check each MCA for ECC errors. + for ( auto & mcaChip : portList ) + { + bool errorsFound; + uint32_t l_rc = __checkEcc<TYPE_MCA>( mcaChip, iv_queue, rank, + errorsFound, io_sc ); + if ( SUCCESS != l_rc ) + { + PRDF_ERR( PRDF_FUNC "__checkEcc<TYPE_MCA>(0x%08x,%d) failed", + mcaChip->getHuid(), rank.getMaster() ); + o_rc |= l_rc; continue; // Try the other MCAs. + } + + if ( errorsFound ) o_errorsFound = true; + } + if ( SUCCESS != o_rc ) break; + + } while (0); + + return o_rc; + + #undef PRDF_FUNC +} + +//------------------------------------------------------------------------------ + +template<> +uint32_t MemTdCtlr<TYPE_MBA>::checkEcc( bool & o_errorsFound, + STEP_CODE_DATA_STRUCT & io_sc ) +{ + return __checkEcc<TYPE_MBA>( iv_chip, iv_queue, iv_stoppedRank.getRank(), + o_errorsFound, io_sc ); +} + +//------------------------------------------------------------------------------ + template<TARGETING::TYPE T> uint32_t MemTdCtlr<T>::analyzeCmdComplete( bool & o_errorsFound, STEP_CODE_DATA_STRUCT & io_sc ) |