diff options
Diffstat (limited to 'src/usr/diag/prdf/plat/prdfPlatServices_rt.C')
-rw-r--r-- | src/usr/diag/prdf/plat/prdfPlatServices_rt.C | 154 |
1 files changed, 92 insertions, 62 deletions
diff --git a/src/usr/diag/prdf/plat/prdfPlatServices_rt.C b/src/usr/diag/prdf/plat/prdfPlatServices_rt.C index 25a470f8d..0fbe5b969 100644 --- a/src/usr/diag/prdf/plat/prdfPlatServices_rt.C +++ b/src/usr/diag/prdf/plat/prdfPlatServices_rt.C @@ -37,6 +37,8 @@ // Platform includes #include <prdfCenMbaDataBundle.H> +#include <prdfP9McbistDataBundle.H> +#include <prdfOcmbDataBundle.H> #include <prdfMemScrubUtils.H> #include <prdfPlatServices.H> @@ -51,6 +53,8 @@ #include <p9_stop_api.H> #include <rt_todintf.H> +#include <hwp_wrappers.H> + //------------------------------------------------------------------------------ using namespace TARGETING; @@ -105,28 +109,6 @@ void sendPredDeallocRequest( uint64_t i_saddr, uint64_t i_eaddr ) __dyndealloc( i_saddr, i_eaddr, MEMORY_ERROR_PREDICTIVE ); } -uint32_t nvdimmNotifyPhypProtChange( TARGETING::TargetHandle_t i_target, - const NVDIMM::nvdimm_protection_t i_state ) -{ - #define PRDF_FUNC "[PlatServices::nvdimmNotifyPhypProtChange] " - - uint32_t o_rc = SUCCESS; - - errlHndl_t errl = NVDIMM::notifyNvdimmProtectionChange( i_target, i_state ); - if ( nullptr != errl ) - { - PRDF_ERR( PRDF_FUNC "NVDIMM::notifyNvdimmProtectionChange(0x%08x) " - "failed.", getHuid(i_target) ); - PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); - o_rc = FAIL; - } - - return o_rc; - - #undef PRDF_FUNC - -} - //############################################################################## //## Nimbus Maintenance Command wrappers //############################################################################## @@ -172,7 +154,8 @@ uint32_t stopBgScrub<TYPE_MCA>( ExtensibleChip * i_chip ) //------------------------------------------------------------------------------ template<> -uint32_t resumeBgScrub<TYPE_MCBIST>( ExtensibleChip * i_chip ) +uint32_t resumeBgScrub<TYPE_MCBIST>( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & io_sc ) { #define PRDF_FUNC "[PlatServices::resumeBgScrub<TYPE_MCBIST>] " @@ -195,9 +178,42 @@ uint32_t resumeBgScrub<TYPE_MCBIST>( ExtensibleChip * i_chip ) break; } + // Check UE and CE stop counters to determine stop conditions + mss::mcbist::stop_conditions<> stopCond; + if ( getMcbistDataBundle(i_chip)->iv_ueStopCounter.thReached(io_sc) ) + { + // If we've reached the limit of UEs we're allowed to stop on + // per rank, only set the stop on mpe stop condition. + stopCond.set_pause_on_mpe(mss::ON); + } + else if (getMcbistDataBundle(i_chip)->iv_ceStopCounter.thReached(io_sc)) + { + // If we've reached the limit of CEs we're allowed to stop on + // per rank, set all the normal stop conditions except stop on CE + stopCond.set_pause_on_aue(mss::ON); + + #ifdef CONFIG_HBRT_PRD + + stopCond.set_pause_on_mpe(mss::ON) + .set_pause_on_ue(mss::ON); + + // In MNFG mode, stop on RCE_ETE to get an accurate callout for IUEs + if ( mfgMode() ) stopCond.set_thresh_rce(1); + + #endif + } + else + { + // If we haven't reached threshold on the number of UEs or CEs we + // have stopped on, do not change the stop conditions. + stopCond = mss::mcbist::stop_conditions<>( + mss::mcbist::stop_conditions<>::DONT_CHANGE ); + } + // Resume the command on the next address. errlHndl_t errl; - FAPI_INVOKE_HWP( errl, mss::memdiags::continue_cmd, fapiTrgt ); + FAPI_INVOKE_HWP( errl, mss::memdiags::continue_cmd, fapiTrgt, + mss::mcbist::end_boundary::DONT_CHANGE, stopCond ); if ( nullptr != errl ) { @@ -217,12 +233,14 @@ uint32_t resumeBgScrub<TYPE_MCBIST>( ExtensibleChip * i_chip ) //------------------------------------------------------------------------------ template<> -uint32_t resumeBgScrub<TYPE_MCA>( ExtensibleChip * i_chip ) +uint32_t resumeBgScrub<TYPE_MCA>( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & io_sc ) { PRDF_ASSERT( nullptr != i_chip ); PRDF_ASSERT( TYPE_MCA == i_chip->getType() ); - return resumeBgScrub<TYPE_MCBIST>(getConnectedParent(i_chip, TYPE_MCBIST)); + return resumeBgScrub<TYPE_MCBIST>(getConnectedParent(i_chip, TYPE_MCBIST), + io_sc); } //############################################################################## @@ -362,7 +380,8 @@ uint32_t __resumeScrub<TYPE_MBA>( ExtensibleChip * i_chip, //------------------------------------------------------------------------------ template<> -uint32_t resumeBgScrub<TYPE_MBA>( ExtensibleChip * i_chip ) +uint32_t resumeBgScrub<TYPE_MBA>( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & io_sc ) { PRDF_ASSERT( nullptr != i_chip ); PRDF_ASSERT( TYPE_MBA == i_chip->getType() ); @@ -418,19 +437,21 @@ uint32_t stopBgScrub<TYPE_OCMB_CHIP>( ExtensibleChip * i_chip ) uint32_t rc = SUCCESS; - /* TODO RTC 207273 - no HWP support yet + #ifdef CONFIG_AXONE + fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> fapiTrgt ( i_chip->getTrgt() ); errlHndl_t errl; - FAPI_INVOKE_HWP( errl, mss::memdiags::stop, fapiTrgt ); + FAPI_INVOKE_HWP( errl, exp_stop, fapiTrgt ); if ( nullptr != errl ) { - PRDF_ERR( PRDF_FUNC "mss::memdiags::stop(0x%08x) failed", i_chip->getHuid()); + PRDF_ERR( PRDF_FUNC "exp_stop(0x%08x) failed", i_chip->getHuid()); PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); rc = FAIL; } - */ + + #endif return rc; @@ -440,19 +461,8 @@ uint32_t stopBgScrub<TYPE_OCMB_CHIP>( ExtensibleChip * i_chip ) //------------------------------------------------------------------------------ template<> -uint32_t stopBgScrub<TYPE_MEM_PORT>( ExtensibleChip * i_chip ) -{ - PRDF_ASSERT( nullptr != i_chip ); - PRDF_ASSERT( TYPE_MEM_PORT == i_chip->getType() ); - - ExtensibleChip* ocmbChip = getConnectedParent( i_chip, TYPE_OCMB_CHIP ); - return stopBgScrub<TYPE_OCMB_CHIP>( ocmbChip ); -} - -//------------------------------------------------------------------------------ - -template<> -uint32_t resumeBgScrub<TYPE_OCMB_CHIP>( ExtensibleChip * i_chip ) +uint32_t resumeBgScrub<TYPE_OCMB_CHIP>( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & io_sc ) { #define PRDF_FUNC "[PlatServices::resumeBgScrub<TYPE_OCMB_CHIP>] " @@ -461,9 +471,9 @@ uint32_t resumeBgScrub<TYPE_OCMB_CHIP>( ExtensibleChip * i_chip ) uint32_t o_rc = SUCCESS; - /* TODO RTC 207273 - no hwp support yet + #ifdef CONFIG_AXONE - // Get the OCMB_CHIP fapi target + // Get the OCMB fapi target fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> fapiTrgt ( i_chip->getTrgt() ); do @@ -477,13 +487,45 @@ uint32_t resumeBgScrub<TYPE_OCMB_CHIP>( ExtensibleChip * i_chip ) break; } + // Check UE and CE stop counters to determine stop conditions + mss::mcbist::stop_conditions<mss::mc_type::EXPLORER> stopCond; + if ( getOcmbDataBundle(i_chip)->iv_ueStopCounter.thReached(io_sc) ) + { + // If we've reached the limit of UEs we're allowed to stop on + // per rank, only set the stop on mpe stop condition. + stopCond.set_pause_on_mpe(mss::ON); + } + else if ( getOcmbDataBundle(i_chip)->iv_ceStopCounter.thReached(io_sc) ) + { + // If we've reached the limit of CEs we're allowed to stop on + // per rank, set all the normal stop conditions except stop on CE + stopCond.set_pause_on_aue(mss::ON); + + #ifdef CONFIG_HBRT_PRD + + stopCond.set_pause_on_mpe(mss::ON) + .set_pause_on_ue(mss::ON); + + // In MNFG mode, stop on RCE_ETE to get an accurate callout for IUEs + if ( mfgMode() ) stopCond.set_thresh_rce(1); + + #endif + } + else + { + // If we haven't reached threshold on the number of UEs or CEs we + // have stopped on, do not change the stop conditions. + stopCond = mss::mcbist::stop_conditions<mss::mc_type::EXPLORER>( + mss::mcbist::stop_conditions<mss::mc_type::EXPLORER>::DONT_CHANGE ); + } + // Resume the command on the next address. errlHndl_t errl; - FAPI_INVOKE_HWP( errl, mss::memdiags::continue_cmd, fapiTrgt ); - + FAPI_INVOKE_HWP( errl, exp_continue_cmd, fapiTrgt, + mss::mcbist::end_boundary::DONT_CHANGE, stopCond ); if ( nullptr != errl ) { - PRDF_ERR( PRDF_FUNC "mss::memdiags::continue_cmd(0x%08x) failed", + PRDF_ERR( PRDF_FUNC "exp_continue_cmd(0x%08x) failed", i_chip->getHuid() ); PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); o_rc = FAIL; break; @@ -491,25 +533,13 @@ uint32_t resumeBgScrub<TYPE_OCMB_CHIP>( ExtensibleChip * i_chip ) } while (0); - */ + #endif return o_rc; #undef PRDF_FUNC } -//------------------------------------------------------------------------------ - -template<> -uint32_t resumeBgScrub<TYPE_MEM_PORT>( ExtensibleChip * i_chip ) -{ - PRDF_ASSERT( nullptr != i_chip ); - PRDF_ASSERT( TYPE_MEM_PORT == i_chip->getType() ); - - ExtensibleChip* ocmbChip = getConnectedParent( i_chip, TYPE_OCMB_CHIP ); - return resumeBgScrub<TYPE_OCMB_CHIP>( ocmbChip ); -} - //############################################################################## //## Line Delete Functions //############################################################################## |