From 1012aacb0a13523182a001160a3d6f8236d2c8cf Mon Sep 17 00:00:00 2001 From: Matthew Hickman Date: Mon, 22 Jan 2018 18:27:39 -0600 Subject: Added workaround for broadcast mode UE noise window Change-Id: Iba568b457972b95c2d9db11ef136b727700dd976 CQ: SW412408 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52406 Tested-by: FSP CI Jenkins Reviewed-by: Louis Stermole Reviewed-by: STEPHEN GLANCY Tested-by: Jenkins Server Tested-by: HWSV CI Tested-by: Hostboot CI Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52411 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes --- .../procedures/hwp/memory/lib/fir/memdiags_fir.C | 6 ++- .../p9/procedures/hwp/memory/lib/fir/unmask.C | 8 ++-- .../chips/p9/procedures/hwp/memory/lib/mc/port.H | 34 +++++++++++++++- .../memory/lib/workarounds/mcbist_workarounds.C | 46 +++++++++++++++++++++- .../memory/lib/workarounds/mcbist_workarounds.H | 13 +++++- 5 files changed, 100 insertions(+), 7 deletions(-) (limited to 'src/import/chips/p9/procedures/hwp') diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C b/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C index f7698e16c..988811f0c 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -42,6 +42,7 @@ #include #include #include +#include using fapi2::TARGET_TYPE_MCBIST; using fapi2::TARGET_TYPE_MCA; @@ -68,6 +69,9 @@ fapi2::ReturnCode after_memdiags( const fapi2::Target& i_tar fapi2::buffer l_aue_buffer; fapi2::ATTR_CHIP_EC_FEATURE_HW414700_Type l_checkstop_flag; + // Broadcast mode workaround for UEs causing out of sync + FAPI_TRY(mss::workarounds::mcbist::broadcast_out_of_sync(i_target, mss::ON)); + for (const auto& p : mss::find_targets(i_target)) { fir::reg l_ecc64_fir_reg(p, l_rc); diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/fir/unmask.C b/src/import/chips/p9/procedures/hwp/memory/lib/fir/unmask.C index 153492989..48845f53e 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/fir/unmask.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/fir/unmask.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -72,11 +72,13 @@ fapi2::ReturnCode after_draminit_mc( const fapi2::Target& i_ // Setup mcbist fir. All mcbist attentions are already special attentions // Write this out before the work-around as it will read and write. - l_mcbist_fir_reg.attention() - .checkstop(); + l_mcbist_fir_reg.attention(); FAPI_TRY(l_mcbist_fir_reg.write(), "unable to write fir::reg %d", MCBIST_MCBISTFIRQ); + // Broadcast mode workaround for UEs causing out of sync + FAPI_TRY(mss::workarounds::mcbist::broadcast_out_of_sync(i_target, mss::OFF)); + FAPI_TRY(mss::workarounds::mcbist::wat_debug_attention(i_target)); for (const auto& p : mss::find_targets(i_target)) diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H b/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H index c0155ee4c..529ed2a6c 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -228,6 +228,7 @@ class portTraits CAL3Q_ALL_PERIODIC_LENGTH_LEN = MCA_MBA_CAL3Q_CFG_ALL_PERIODIC_LENGTH_LEN, CAL3Q_FREEZE_ON_PARITY_ERROR_DIS = MCA_MBA_CAL3Q_CFG_FREEZE_ON_PARITY_ERROR_DIS, + RECR_ENABLE_UE_NOISE_WINDOW = MCA_RECR_MBSECCQ_ENABLE_UE_NOISE_WINDOW, RECR_TCE_CORRECTION = MCA_RECR_MBSECCQ_ENABLE_TCE_CORRECTION, RECR_READ_POINTER_DLY = MCA_RECR_MBSECCQ_READ_POINTER_DELAY, RECR_READ_POINTER_DLY_LEN = MCA_RECR_MBSECCQ_READ_POINTER_DELAY_LEN, @@ -368,6 +369,37 @@ void set_tce_correction( fapi2::buffer& io_data, const mss::states i_v io_data.template writeBit(i_value); } +/// +/// @brief Get the enable_ue_noise_window value from buffer +/// @tparam T the fapi2 target type of the target +/// @tparam TT the class traits for the port +/// @param[in] i_data the data buffer containing the RECR register +/// @param[out] o_value ENABLE_UE_NOISE_WINDOW value (on or off) +/// +template< fapi2::TargetType T = fapi2::TARGET_TYPE_MCA, typename TT = portTraits > +void get_enable_ue_noise_window( const fapi2::buffer& i_data, mss::states& o_value ) +{ + o_value = (i_data.template getBit()) ? mss::states::ON : mss::states::OFF; + + FAPI_INF( "ENABLE_UE_NOISE_WINDOW: %lu", o_value ); +} + +/// +/// @brief Sets enable_ue_noise_window in buffer +/// @tparam T the fapi2 target type of the target +/// @tparam TT the class traits for the port +/// @param[in,out] io_data the target data buffer +/// @param[in] i_value ENABLE_UE_NOISE_WINDOW value (on or off) to set +/// +template< fapi2::TargetType T = fapi2::TARGET_TYPE_MCA, typename TT = portTraits > +void set_enable_ue_noise_window( fapi2::buffer& io_data, const mss::states i_value ) +{ + FAPI_INF( "Set ENABLE_UE_NOISE_WINDOW to %lu", i_value); + + io_data.template writeBit(i_value); +} + + /// /// @brief Setup read pointer delay and TCE correction /// @tparam T the fapi2 target type of the target 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& i_target, + const mss::states i_value ) +{ + fapi2::ReturnCode l_rc; + fapi2::buffer recr_buffer; + + fir::reg 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(); + } + else + { + // Initialize Broadcast of out sync to recoverable pre workaround + l_mcbist_fir_reg.recoverable_error(); + } + + FAPI_TRY(l_mcbist_fir_reg.write(), "unable to write fir::reg %d", MCBIST_MCBISTFIRQ); + + for (const auto& p : mss::find_targets(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 diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.H b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.H index 1f1aa5dbe..1e5d9662a 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -79,6 +79,17 @@ fapi2::ReturnCode end_of_rank( const fapi2::Target& i /// fapi2::ReturnCode wat_debug_attention( const fapi2::Target& i_target ); +/// +/// @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& i_target, + const mss::states i_value ); + + } // close namespace mcbist } // close namespace workarounds } // close namespace mss -- cgit v1.2.1