diff options
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C index 3b6009f42..784d047ec 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -168,6 +168,50 @@ fapi_try_exit: return fapi2::current_err; } + +/// +/// @brief BROADCAST OUT OF SYNC workaround +/// A UE noise window is triggered by UE/AUEs causing an out of sync error +/// @param[in] i_target the fapi2 target of the mcbist +/// @param[in] i_value value to enable or disable workaround +/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS if ok +/// +fapi2::ReturnCode broadcast_out_of_sync( const fapi2::Target<fapi2::TARGET_TYPE_MCBIST>& i_target, + const mss::states i_value ) +{ + fapi2::ReturnCode l_rc; + fapi2::buffer<uint64_t> recr_buffer; + + fir::reg<MCBIST_MCBISTFIRQ> l_mcbist_fir_reg(i_target, l_rc); + FAPI_TRY(l_rc, "unable to create fir::reg for %d", MCBIST_MCBISTFIRQ); + + // Check for enabled (post memdiag) or disbaled (pre memdiag) workaround + if ( i_value ) + { + // Initialize Broadcast of out sync to checkstop post workaround + l_mcbist_fir_reg.checkstop<MCBIST_MCBISTFIRQ_MCBIST_BRODCAST_OUT_OF_SYNC>(); + } + else + { + // Initialize Broadcast of out sync to recoverable pre workaround + l_mcbist_fir_reg.recoverable_error<MCBIST_MCBISTFIRQ_MCBIST_BRODCAST_OUT_OF_SYNC>(); + } + + FAPI_TRY(l_mcbist_fir_reg.write(), "unable to write fir::reg %d", MCBIST_MCBISTFIRQ); + + for (const auto& p : mss::find_targets<fapi2::TARGET_TYPE_MCA>(i_target)) + { + // Set UE noise window for workaround + mss::read_recr_register(p, recr_buffer); + mss::set_enable_ue_noise_window(recr_buffer, i_value); + mss::write_recr_register(p, recr_buffer); + } + +fapi_try_exit: + return fapi2::current_err; +} + + } // close namespace mcbist } // close namespace workarounds } // close namespace mss |