diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2017-05-15 16:35:40 -0500 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2017-06-08 16:44:28 -0400 |
commit | e1929d0094d34bd207cfc6533f1e77b4d122060e (patch) | |
tree | c7a03b9b0cba6a8aea6b4ab1207be3a385ff283d /src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C | |
parent | bf3f4096b25c185704d5dec4c15711e8139eb966 (diff) | |
download | talos-hostboot-e1929d0094d34bd207cfc6533f1e77b4d122060e.tar.gz talos-hostboot-e1929d0094d34bd207cfc6533f1e77b4d122060e.zip |
PRD: runtime VCM support
Change-Id: Ibeb45ceb1a2d0db1e3941b5b8ac5f9e2f5122770
RTC: 171913
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40942
Tested-by: Jenkins Server <pfd-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>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Squashed: I85a0240782b2985797a2ace1aa3eb9a9a18cb621
Squashed: I1663ee55509348cdaddf216d0b3c9ac527c21113
Squashed: Ib9a3bef7a4df3b1b2a5914cf4155dca569c11026
Squashed: I3739b49f17a5413a0ad9c3adfd555f74b91895cc
Squashed: Ifc2e4501775a09ad06381970ba47be5b953312d8
Squashed: Id7f5648ed810f9505acecea99cb27af2d832a669
Squashed: I0ec33104ac7920282482e79c2376d115a1274b46
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41040
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C')
-rw-r--r-- | src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C | 201 |
1 files changed, 191 insertions, 10 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C index 6952f40f5..02b577216 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C @@ -27,46 +27,227 @@ // Platform includes #include <prdfMemVcm.H> +#include <prdfP9McaDataBundle.H> using namespace TARGETING; namespace PRDF { +using namespace PlatServices; + +//############################################################################## +// +// Generic template functions +// +//############################################################################## + +template<TARGETING::TYPE T> +uint32_t VcmEvent<T>::falseAlarm( STEP_CODE_DATA_STRUCT & io_sc ) +{ + #define PRDF_FUNC "[VcmEvent::falseAlarm] " + + uint32_t o_rc = SUCCESS; + + PRDF_TRAC( PRDF_FUNC "Chip mark false alarm: 0x%08x,0x%02x", + iv_chip->getHuid(), getKey() ); + + io_sc.service_data->setSignature( iv_chip->getHuid(), + PRDFSIG_VcmFalseAlarm ); + + do + { + // If DRAM repairs are disabled, make the error log predictive. + if ( areDramRepairsDisabled() ) + { + io_sc.service_data->setServiceCall(); + break; // Nothing more to do. + } + + // Increment the false alarm counter and check threshold. + if ( cv_falseAlarm.inc(iv_chip, getKey(), io_sc) ) + { + // False alarm threshold has been reached. Leave the mark in place + // and treat the chip mark as verified. + + io_sc.service_data->AddSignatureList( iv_chip->getTrgt(), + PRDFSIG_VcmFalseAlarm ); + + PRDF_TRAC( PRDF_FUNC "False alarm threshold: 0x%08x,0x%02x", + iv_chip->getHuid(), getKey() ); + + o_rc = verified( io_sc ); + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "verified() failed" ); + break; + } + } + else + { + // Remove the chip mark. + o_rc = MarkStore::clearChipMark<T>( iv_chip, iv_rank ); + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "clearChipMark(0x%08x,0x%02x) failed", + iv_chip->getHuid(), getKey() ); + break; + } + } + + } while (0); + + return o_rc; + + #undef PRDF_FUNC +} + //------------------------------------------------------------------------------ -// TODO: RTC 171913 Actual implementation of this procedure will be done later. +// Avoid linker errors with the template. +template class VcmEvent<TYPE_MCA>; +template class VcmEvent<TYPE_MBA>; + +//############################################################################## +// +// Specializations for MCA +// +//############################################################################## + template<> -uint32_t VcmEvent<TYPE_MCA>::nextStep( STEP_CODE_DATA_STRUCT & io_sc, +TdFalseAlarm VcmEvent<TYPE_MCA>::cv_falseAlarm + = TdFalseAlarm { 4, ThresholdResolution::ONE_DAY }; + +//------------------------------------------------------------------------------ + +template<> +uint32_t VcmEvent<TYPE_MCA>::checkEcc( const uint32_t & i_eccAttns, + STEP_CODE_DATA_STRUCT & io_sc, bool & o_done ) { - #define PRDF_FUNC "[VcmEvent<TYPE_MCA>::nextStep] " + #define PRDF_FUNC "[VcmEvent<TYPE_MCA>::checkEcc] " uint32_t o_rc = SUCCESS; - o_done = true; + do + { + if ( i_eccAttns & MAINT_UE ) + { + PRDF_TRAC( PRDF_FUNC "UE Detected: 0x%08x,0x%02x", + iv_chip->getHuid(), getKey() ); + + io_sc.service_data->setSignature( iv_chip->getHuid(), + PRDFSIG_MaintUE ); + + o_rc = MemEcc::handleMemUe<TYPE_MCA>( iv_chip, + MemAddr::fromRank(iv_rank), + UE_TABLE::SCRUB_UE, io_sc ); + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "handleMemUe(0x%08x,0x%02x) failed", + iv_chip->getHuid(), getKey() ); + break; + } + + // Leave the mark in place and abort this procedure. + o_done = true; break; + } + + if ( mfgMode() && (i_eccAttns & MAINT_IUE) ) + { + io_sc.service_data->setSignature( iv_chip->getHuid(), + PRDFSIG_MaintIUE ); + + o_rc = MemEcc::handleMemIue<TYPE_MCA, McaDataBundle *>( iv_chip, + iv_rank, + io_sc ); + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "handleMemIue(0x%08x,0x%02x) failed", + iv_chip->getHuid(), getKey() ); + break; + } + + // If service call is set, then IUE threshold was reached. + if ( io_sc.service_data->queryServiceCall() ) + { + PRDF_TRAC( PRDF_FUNC "IUE threshold detected: 0x%08x,0x%02x", + iv_chip->getHuid(), getKey() ); - PRDF_ERR( PRDF_FUNC "function not implemented yet" ); + // Leave the mark in place and abort this procedure. + o_done = true; break; + } + } + + } while (0); return o_rc; #undef PRDF_FUNC } +//############################################################################## +// +// Specializations for MBA +// +//############################################################################## + +template<> +TdFalseAlarm VcmEvent<TYPE_MBA>::cv_falseAlarm + = TdFalseAlarm { 4, 7 * ThresholdResolution::ONE_DAY }; + //------------------------------------------------------------------------------ -// TODO: RTC 157888 Actual implementation of this procedure will be done later. template<> -uint32_t VcmEvent<TYPE_MBA>::nextStep( STEP_CODE_DATA_STRUCT & io_sc, +uint32_t VcmEvent<TYPE_MBA>::checkEcc( const uint32_t & i_eccAttns, + STEP_CODE_DATA_STRUCT & io_sc, bool & o_done ) { - #define PRDF_FUNC "[VcmEvent<TYPE_MBA>::nextStep] " + #define PRDF_FUNC "[VcmEvent<TYPE_MBA>::checkEcc] " uint32_t o_rc = SUCCESS; - o_done = true; + do + { + if ( i_eccAttns & MAINT_UE ) + { + PRDF_TRAC( PRDF_FUNC "UE Detected: 0x%08x,0x%02x", + iv_chip->getHuid(), getKey() ); + + io_sc.service_data->setSignature( iv_chip->getHuid(), + PRDFSIG_MaintUE ); + + /* TODO: RTC 157888 + o_rc = MemEcc::handleMemUe<TYPE_MBA>( iv_chip, + MemAddr::fromRank(iv_rank), + UE_TABLE::SCRUB_UE, io_sc ); + */ + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "handleMemUe(0x%08x,0x%02x) failed", + iv_chip->getHuid(), getKey() ); + break; + } + + // Leave the mark in place and abort this procedure. + o_done = true; break; + } + + if ( i_eccAttns & MAINT_RCE_ETE ) + { + io_sc.service_data->setSignature( iv_chip->getHuid(), + PRDFSIG_MaintRETRY_CTE ); + + // Add the rank to the callout list. + MemoryMru mm { iv_chip->getTrgt(), iv_rank, + MemoryMruData::CALLOUT_RANK }; + io_sc.service_data->SetCallout( mm ); + + // Make the error log predictive. + io_sc.service_data->setServiceCall(); + } - PRDF_ERR( PRDF_FUNC "function not implemented yet" ); + } while (0); return o_rc; |