diff options
author | Tsung Yeung <tyeung@us.ibm.com> | 2019-04-08 22:11:40 -0400 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2019-04-15 09:33:47 -0500 |
commit | fa0064292733ea0c5091de493ea52845ba8d9ecd (patch) | |
tree | a1ab4e8e2e4d3aaad21579e5706c47d2d2053406 /src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H | |
parent | 7c4068b510e172eb973b8e460ee432e7e8bc8275 (diff) | |
download | talos-hostboot-fa0064292733ea0c5091de493ea52845ba8d9ecd.tar.gz talos-hostboot-fa0064292733ea0c5091de493ea52845ba8d9ecd.zip |
Ignore refresh overrun fir NVDIMM during post-restore sequence
While CCS is running (ccs_addr_sel_mux=1) mainline refreshes could get
queued up and later released 1 cycle apart, causing the refresh overrun
fir. Mask this error during post-restore sequence so it doesn't get called
out later.
Change-Id: Iac0f998bfcc807d6f5fa2e6a57ec07a7afa5cc60
CQ:SW462190
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/75692
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@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: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/75696
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>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H index 5df44c13c..a3c4914a4 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -38,12 +38,79 @@ #include <lib/shared/mss_const.H> #include <lib/ccs/ccs.H> #include <lib/phy/dp16.H> +#include <lib/mc/port.H> namespace mss { namespace nvdimm { +/// +/// @brief get refresh overrun fir mask +/// @param[in] i_target the target associated with this subroutine +/// @param[out] i_state the state to change to +/// @return FAPI2_RC_SUCCESS iff setup was successful +/// +inline fapi2::ReturnCode get_refresh_overrun_mask( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, + mss::states& o_state ) +{ + typedef portTraits<mss::mc_type::NIMBUS> TT; + fapi2::buffer<uint64_t> l_data; + + FAPI_TRY( mss::getScom(i_target, TT::CALFIRMASK, l_data), + "%s Failed getScom", mss::c_str(i_target) ); + + o_state = l_data.getBit<TT::CALFIRMASK_REFRESH_OVERRUN>() ? mss::states::ON : mss::states::OFF; + +fapi_try_exit: + return fapi2::current_err; +} + +/// +/// @brief change refresh overrun fir mask +/// @param[in] i_target the target associated with this subroutine +/// @param[in] i_state the state to change to +/// @return FAPI2_RC_SUCCESS iff setup was successful +/// +inline fapi2::ReturnCode change_refresh_overrun_mask( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, + const mss::states i_state ) +{ + typedef portTraits<mss::mc_type::NIMBUS> TT; + fapi2::buffer<uint64_t> l_data; + + FAPI_TRY( mss::getScom(i_target, TT::CALFIRMASK, l_data), + "%s Failed getScom", mss::c_str(i_target) ); + + l_data.writeBit<TT::CALFIRMASK_REFRESH_OVERRUN>(i_state); + + FAPI_TRY( mss::putScom(i_target, TT::CALFIRMASK, l_data), + "%s Failed putScom", mss::c_str(i_target) ); + +fapi_try_exit: + return fapi2::current_err; +} + +/// +/// @brief Clear the refresh overrun fir +/// @param[in] i_target the target associated with this subroutine +/// @return FAPI2_RC_SUCCESS iff setup was successful +/// +inline fapi2::ReturnCode clear_refresh_overrun_fir( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target ) +{ + typedef portTraits<mss::mc_type::NIMBUS> TT; + fapi2::buffer<uint64_t> l_data; + + FAPI_TRY( mss::getScom(i_target, TT::CALFIRQ, l_data), + "%s Failed getScom", mss::c_str(i_target) ); + + l_data.clearBit<TT::CALFIRQ_REFRESH_OVERRUN>(); + + FAPI_TRY( mss::putScom(i_target, TT::CALFIRQ, l_data), + "%s Failed putScom", mss::c_str(i_target) ); + +fapi_try_exit: + return fapi2::current_err; +} /// /// @brief Wrapper to read MAINT_ADDR_MODE_EN |