From 5ef6613fd95fe02a9efb90a99ba3e97a8f82c4d9 Mon Sep 17 00:00:00 2001 From: Matthew Hickman Date: Thu, 30 Apr 2020 15:03:04 -0400 Subject: [PATCH] Fixed firmware calls to background scrub Change-Id: I3147a1460bec748b822e1c2fa2f23f08a244c6b6 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/96127 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Louis Stermole Reviewed-by: Mark Pizzutillo Reviewed-by: Jennifer A Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/96157 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R Geddes --- .../hwp/memory/lib/hwp_wrappers_exp.C | 5 ++- .../lib/utils/mcbist/gen_mss_memdiags.H | 33 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/hwp_wrappers_exp.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/hwp_wrappers_exp.C index 94483b21f3f..380b3ea08fd 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/hwp_wrappers_exp.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/hwp_wrappers_exp.C @@ -99,7 +99,10 @@ fapi2::ReturnCode exp_background_scrub( const fapi2::Target(i_target, i_stop, i_speed, i_address); + return mss::memdiags::mss_firmware_background_scrub_helper(i_target, + i_stop, + i_speed, + i_address); } /// diff --git a/src/import/generic/memory/lib/utils/mcbist/gen_mss_memdiags.H b/src/import/generic/memory/lib/utils/mcbist/gen_mss_memdiags.H index c67b51595be..8a39325a161 100644 --- a/src/import/generic/memory/lib/utils/mcbist/gen_mss_memdiags.H +++ b/src/import/generic/memory/lib/utils/mcbist/gen_mss_memdiags.H @@ -1303,6 +1303,39 @@ fapi_try_exit: return fapi2::current_err; } +/// +/// @brief Begin firmware background scrub helper +/// @tparam MC the mc type of the T +/// @tparam T fapi2::TargetType of the MCBIST engine +/// @tparam TT the mcbistTraits associated with T +/// @param[in] i_target MC +/// @param[in] i_stop stop conditions +/// @param[in] i_speed the speed to scrub +/// @param[in] i_address mcbist::address representing the address from which to start +/// @return FAPI2_RC_SUCCESS iff ok +/// +template< mss::mc_type MC = DEFAULT_MC_TYPE, fapi2::TargetType T, typename TT = mcbistTraits > +fapi2::ReturnCode mss_firmware_background_scrub_helper( const fapi2::Target& i_target, + const stop_conditions& i_stop, + const speed i_speed, + const mss::mcbist::address& i_address ) +{ + FAPI_INF("Start mss_firmware_background_scrub_helper on: %s", mss::c_str( i_target )); + + // Start background scrub + FAPI_TRY ( mss::memdiags::background_scrub( i_target, + i_stop, + i_speed, + i_address) ); + + // Unmask firs after background scrub is started + FAPI_TRY ( mss::unmask::after_background_scrub( i_target ) ); + +fapi_try_exit: + return fapi2::current_err; +} + + } // namespace memdiags } // namespace mss