diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2017-03-31 14:48:55 -0500 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2017-04-10 12:04:50 -0400 |
commit | 6e5d170315054ed04c7a3ba7144990fe3860e882 (patch) | |
tree | d2416d9f5b7d713e3deabed1f0e1520a46b4414d /src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C | |
parent | 1b0650f12154392f8c305880d4d0e6b17ea9106f (diff) | |
download | talos-hostboot-6e5d170315054ed04c7a3ba7144990fe3860e882.tar.gz talos-hostboot-6e5d170315054ed04c7a3ba7144990fe3860e882.zip |
PRD: resume background scrub at runtime
Change-Id: Iaab3339de860215349fdae815496097c03413563
RTC: 171875
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38714
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39001
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C')
-rw-r--r-- | src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C b/src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C index ef429cfa8..7943e4d5b 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemScrubUtils.C @@ -376,5 +376,95 @@ uint32_t checkEccFirs<TYPE_MBA>( ExtensibleChip * i_chip, //------------------------------------------------------------------------------ +template<> +uint32_t isBgScrubConfig<TYPE_MCBIST>( ExtensibleChip * i_chip, + bool & o_isBgScrub ) +{ + #define PRDF_FUNC "[isBgScrubConfig] " + + PRDF_ASSERT( nullptr != i_chip ); + PRDF_ASSERT( TYPE_MCBIST == i_chip->getType() ); + + uint32_t o_rc = SUCCESS; + + o_isBgScrub = false; + + do + { + // There really is not a good way of doing this. A scrub command is a + // scrub command the only difference is the speed. Unfortunately, that + // speed can change depending on how the hardware team tunes it. For + // now, we can use the stop conditions, which should be unique for + // background scrub, to determine if it has been configured. + + SCAN_COMM_REGISTER_CLASS * reg = i_chip->getRegister( "MBSTR" ); + o_rc = reg->Read(); + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "Read() failed on MBSTR: i_chip=0x%08x", + i_chip->getHuid() ); + break; + } + + if ( 0xf != reg->GetBitFieldJustified(0,4) && // NCE int TH + 0xf != reg->GetBitFieldJustified(4,4) && // NCE soft TH + 0xf != reg->GetBitFieldJustified(8,4) && // NCE hard TH + reg->IsBitSet(34) && // pause on MPE + reg->IsBitSet(35) ) // pause on UE + { + o_isBgScrub = true; + } + + } while(0); + + return o_rc; + + #undef PRDF_FUNC +} + +template<> +uint32_t isBgScrubConfig<TYPE_MCA>( ExtensibleChip * i_chip, + bool & o_isBgScrub ) +{ + PRDF_ASSERT( nullptr != i_chip ); + PRDF_ASSERT( TYPE_MCA == i_chip->getType() ); + + ExtensibleChip * mcbChip = getConnectedParent( i_chip, TYPE_MCBIST ); + + return isBgScrubConfig<TYPE_MCBIST>( mcbChip, o_isBgScrub ); +} + +template<> +uint32_t isBgScrubConfig<TYPE_MBA>( ExtensibleChip * i_chip, + bool & o_isBgScrub ) +{ + #define PRDF_FUNC "[isBgScrubConfig] " + + PRDF_ASSERT( nullptr != i_chip ); + PRDF_ASSERT( TYPE_MBA == i_chip->getType() ); + + uint32_t o_rc = SUCCESS; + + o_isBgScrub = false; + + do + { + // There really is not a good way of doing this. A scrub command is a + // scrub command the only difference is the speed. Unfortunately, that + // speed can change depending on how the hardware team tunes it. For + // now, we can use the stop conditions, which should be unique for + // background scrub, to determine if it has been configured. + + // TODO RTC 157888 + + } while(0); + + return o_rc; + + #undef PRDF_FUNC +} + +//------------------------------------------------------------------------------ + } // end namespace PRDF |