diff options
author | Matthew Hickman <Matthew.Hickman@ibm.com> | 2018-01-22 18:27:39 -0600 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2018-02-07 11:55:04 -0500 |
commit | 1012aacb0a13523182a001160a3d6f8236d2c8cf (patch) | |
tree | c3f3a3264804f18f88b96f914fe294f7207f12ff | |
parent | 34ff810fcb796efcaae774c7fcd063c48ace4209 (diff) | |
download | talos-hostboot-1012aacb0a13523182a001160a3d6f8236d2c8cf.tar.gz talos-hostboot-1012aacb0a13523182a001160a3d6f8236d2c8cf.zip |
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 <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52411
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
5 files changed, 100 insertions, 7 deletions
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 <lib/fir/fir.H> #include <lib/fir/memdiags_fir.H> #include <lib/mc/port.H> +#include <lib/workarounds/mcbist_workarounds.H> using fapi2::TARGET_TYPE_MCBIST; using fapi2::TARGET_TYPE_MCA; @@ -68,6 +69,9 @@ fapi2::ReturnCode after_memdiags( const fapi2::Target<TARGET_TYPE_MCBIST>& i_tar fapi2::buffer<uint64_t> 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<TARGET_TYPE_MCA>(i_target)) { fir::reg<MCA_FIR> 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<TARGET_TYPE_MCBIST>& 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<MCBIST_MCBISTFIRQ_MCBIST_PROGRAM_COMPLETE>() - .checkstop<MCBIST_MCBISTFIRQ_MCBIST_BRODCAST_OUT_OF_SYNC>(); + l_mcbist_fir_reg.attention<MCBIST_MCBISTFIRQ_MCBIST_PROGRAM_COMPLETE>(); 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<TARGET_TYPE_MCA>(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<fapi2::TARGET_TYPE_MCA> 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, @@ -369,6 +370,37 @@ void set_tce_correction( fapi2::buffer<uint64_t>& io_data, const mss::states i_v } /// +/// @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<T> > +void get_enable_ue_noise_window( const fapi2::buffer<uint64_t>& i_data, mss::states& o_value ) +{ + o_value = (i_data.template getBit<TT::RECR_ENABLE_UE_NOISE_WINDOW>()) ? 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<T> > +void set_enable_ue_noise_window( fapi2::buffer<uint64_t>& io_data, const mss::states i_value ) +{ + FAPI_INF( "Set ENABLE_UE_NOISE_WINDOW to %lu", i_value); + + io_data.template writeBit<TT::RECR_ENABLE_UE_NOISE_WINDOW>(i_value); +} + + +/// /// @brief Setup read pointer delay and TCE correction /// @tparam T the fapi2 target type of the target /// @tparam TT the class traits for the port 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 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<fapi2::TARGET_TYPE_MCBIST>& i /// fapi2::ReturnCode wat_debug_attention( const fapi2::Target<fapi2::TARGET_TYPE_MCBIST>& 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<fapi2::TARGET_TYPE_MCBIST>& i_target, + const mss::states i_value ); + + } // close namespace mcbist } // close namespace workarounds } // close namespace mss |