From 2c39e6a8184b1c7d5cfab80d3d6576d86767b79a Mon Sep 17 00:00:00 2001 From: Tsung Yeung Date: Wed, 8 May 2019 17:33:03 -0400 Subject: NVDIMM wr_vref workaround fix and add refreshes to ccs program (nvdimm only) Change-Id: I0331284a284ac54ebd365abd96c67d4094b124b8 CQ:SW463048 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77157 Tested-by: FSP CI Jenkins Reviewed-by: STEPHEN GLANCY Reviewed-by: Louis Stermole Tested-by: Jenkins Server Tested-by: Hostboot CI Tested-by: HWSV CI Reviewed-by: Thi N. Tran Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77198 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes --- src/import/generic/memory/lib/ccs/ccs.H | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/import/generic') diff --git a/src/import/generic/memory/lib/ccs/ccs.H b/src/import/generic/memory/lib/ccs/ccs.H index b72ec64ae..aafb0826e 100644 --- a/src/import/generic/memory/lib/ccs/ccs.H +++ b/src/import/generic/memory/lib/ccs/ccs.H @@ -883,6 +883,29 @@ inline instruction_t self_refresh_exit_command( const uint64_t i_rank, const uin return instruction_t(i_rank, l_boilerplate_arr0, l_boilerplate_arr1); } +/// +/// @brief Setup refresh command instruction +/// @tparam T the target type of the chiplet which executes the CCS instruction +/// @tparam TT the CCS traits of the chiplet which executes the CCS instruction +/// @param[in] i_target the DIMM this instruction is headed for +/// @param[in] i_rank the rank on this dimm +/// @param[in] i_idle the idle time to the next command (default to 0) +/// @return the self-refresh entry command CCS instruction +/// @note THIS IS FOR DDR4 NON-LRDIMM ONLY RIGHT NOW +/// +inline instruction_t refresh_command( const uint64_t i_rank, const uint16_t i_idle = 0 ) +{ + using TT = ccsTraits; + + // Refresh is self-refresh entry with CKE high + auto l_refresh_template = self_refresh_entry_command(i_rank, i_idle); + + // CKE is high + l_refresh_template.arr0.template insertFromRight(CKE_HIGH); + + return l_refresh_template; +} + // // These functions are a little sugar to keep callers from doing the traits-dance to get the // appropriate bit field -- cgit v1.2.1