Skip to content

Commit

Permalink
Updates RD_VREF CMD_PRECEDE_TIME for 16GB NVDIMM
Browse files Browse the repository at this point in the history
Without this update false training fail may appear as recovered error

Change-Id: Ia2caa5f2d2a4065c7d16d460666c410fd7d7e2a1
CQ:SW485239
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/92729
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: JEREMY R NEATON <jrneaton@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://rchgit01.rchland.ibm.com/gerrit1/92779
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: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Tsung Yeung authored and dcrowell77 committed Mar 9, 2020
1 parent b684d89 commit 7ef7ab2
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 6 deletions.
18 changes: 15 additions & 3 deletions src/import/chips/p9/procedures/hwp/memory/lib/phy/read_cntrl.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* Contributors Listed Below - COPYRIGHT 2016,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -38,6 +38,7 @@

#include <fapi2.H>
#include <p9_mc_scom_addresses.H>
#include <lib/workarounds/dp16_workarounds.H>

namespace mss
{
Expand Down Expand Up @@ -494,12 +495,23 @@ inline fapi2::ReturnCode reset_vref_config1( const fapi2::Target<T>& i_target )
fapi2::buffer<uint64_t> l_data;
uint8_t l_al = 0;
uint8_t l_cl = 0;
uint8_t l_offset = 15;
bool l_is_workaround_needed = false;

FAPI_TRY( mss::eff_dram_al(i_target, l_al) );
FAPI_TRY( mss::eff_dram_cl(i_target, l_cl) );
FAPI_TRY( mss::workarounds::nvdimm::is_cmd_precede_time_workaround_needed(i_target, l_is_workaround_needed));

if (l_is_workaround_needed)
{
// Per Jeremy Neaton's characterization, 16GB NVDIMM requires a 4-tick bump from the current offset
// due to read sensitivity
l_offset = l_offset + 4;
}

// Per Ryan King's characterization:
// The recommended setting is (AL + CL + 15).
l_data.insertFromRight<TT::CMD_PRECEDE_TIME, TT::CMD_PRECEDE_TIME_LEN>(l_al + l_cl + 15);
// The recommended setting is (AL + CL + offset). Current offset is set to 15
l_data.insertFromRight<TT::CMD_PRECEDE_TIME, TT::CMD_PRECEDE_TIME_LEN>(l_al + l_cl + l_offset);
l_data.insertFromRight<TT::MPR_PAGE, TT::MPR_PAGE_LEN>(0b0100); // From R. King

// Note: when initial cal is setup, this register will change to accomodate the
Expand Down
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* Contributors Listed Below - COPYRIGHT 2016,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -130,6 +130,35 @@ fapi_try_exit:
return fapi2::current_err;
}

///
/// @brief Check if the NVDIMM CMD_PRECEDE_TIME workaround is needed
/// @param[in] i_target the fapi2 target of the port
/// @param[out] o_is_needed true if workaround is needed
/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS if ok
///
fapi2::ReturnCode is_cmd_precede_time_workaround_needed( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target,
bool& o_is_needed )
{
o_is_needed = false;
uint8_t l_hybrid[mss::MAX_DIMM_PER_PORT] = {};
uint8_t l_hybrid_type[mss::MAX_DIMM_PER_PORT] = {};
uint32_t l_size[mss::MAX_DIMM_PER_PORT] = {};

FAPI_TRY(mss::eff_hybrid(i_target, l_hybrid));
FAPI_TRY(mss::eff_hybrid_memory_type(i_target, l_hybrid_type));
FAPI_TRY(mss::eff_dimm_size(i_target, l_size));

if (l_hybrid[0] == fapi2::ENUM_ATTR_EFF_HYBRID_IS_HYBRID &&
l_hybrid_type[0] == fapi2::ENUM_ATTR_EFF_HYBRID_MEMORY_TYPE_NVDIMM &&
l_size[0] == fapi2::ENUM_ATTR_EFF_DIMM_SIZE_16GB)
{
o_is_needed = true;
}

fapi_try_exit:
return fapi2::current_err;
}

} // close namespace nvdimm

namespace dp16
Expand Down
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* Contributors Listed Below - COPYRIGHT 2016,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -92,6 +92,15 @@ fapi2::ReturnCode is_adjust_rd_dq_delay_needed( const fapi2::Target<fapi2::TARGE
///
fapi2::ReturnCode adjust_rd_dq_delay( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, const uint64_t i_rp );

///
/// @brief Check if the NVDIMM CMD_PRECEDE_TIME workaround is needed
/// @param[in] i_target the fapi2 target of the port
/// @param[out] o_is_needed true if workaround is needed
/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS if ok
///
fapi2::ReturnCode is_cmd_precede_time_workaround_needed( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target,
bool& o_is_needed );

} // close namespace nvdimm

namespace dp16
Expand Down
3 changes: 2 additions & 1 deletion src/usr/diag/prdf/prdf_hb_only.mk
Expand Up @@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2013,2019
# Contributors Listed Below - COPYRIGHT 2013,2020
# [+] International Business Machines Corp.
#
#
Expand Down Expand Up @@ -64,6 +64,7 @@ prd_incpath += ${ROOTPATH}/src/import/chips/centaur/procedures/hwp/memory/lib/sh
prd_incpath += ${ROOTPATH}/src/import/chips/p9/common/include/
prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/
prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/
prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/lib
prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/
prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/utils/
prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/io/
Expand Down

0 comments on commit 7ef7ab2

Please sign in to comment.