Skip to content

Commit

Permalink
Set MSDG_RDIMM type in user_input_msdg for DDIMM with RCD
Browse files Browse the repository at this point in the history
Change-Id: I334e0ebbd918bd298354102048f1308cdce5440d
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/96218
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Dev-Ready: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/96374
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>
  • Loading branch information
stermole authored and crgeddes committed May 20, 2020
1 parent 913aaa2 commit f5653b1
Showing 1 changed file with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <generic/memory/lib/utils/c_str.H>
#include <generic/memory/lib/utils/find.H>
#include <generic/memory/lib/utils/mss_buffer_utils.H>
#include <generic/memory/lib/utils/fir/gen_mss_unmask.H>
#include <lib/phy/exp_train_display.H>
#include <lib/phy/exp_train_handler.H>
#include <exp_data_structs.H>
Expand Down Expand Up @@ -466,12 +467,14 @@ class phy_params

// We're in quad encoded mode IF
// 1) 4R per DIMM
// 2) we have an RDIMM
// 2) we have an RCD
FAPI_TRY(mss::attr::get_num_master_ranks_per_dimm(i_target, l_master_ranks));
{
const bool l_has_rcd = iv_params.iv_dimm_type[0] == fapi2::ENUM_ATTR_MEM_EFF_DIMM_TYPE_RDIMM ||
iv_params.iv_dimm_type[0] == fapi2::ENUM_ATTR_MEM_EFF_DIMM_TYPE_LRDIMM;
bool l_has_rcd = false;
const bool l_4r = l_master_ranks[0] == fapi2::ENUM_ATTR_MEM_EFF_NUM_MASTER_RANKS_PER_DIMM_4R;

FAPI_TRY(mss::unmask::has_rcd<mss::mc_type::EXPLORER>(i_target, l_has_rcd));

iv_params.iv_encoded_quadcs = (l_has_rcd && l_4r) ? MSDG_QUAD_ENCODE_MODE : MSDG_DUAL_DIRECT_MODE;
}

Expand Down Expand Up @@ -638,9 +641,16 @@ class phy_params
io_phy_params.DimmType = MSDG_RDIMM;
break;

// TK this will need to be updated for the 4U explorer card
// For 1U/2U (what we're working on now), the DDIMM means an unregistered MC to DRAM interface
// DDIMM can either have an unregistered MC to DRAM interface (1U/2U) or RCD (4U)
case fapi2::ENUM_ATTR_MEM_EFF_DIMM_TYPE_DDIMM:
{
bool l_has_rcd = false;

FAPI_TRY(mss::unmask::has_rcd<mss::mc_type::EXPLORER>(iv_target, l_has_rcd));
io_phy_params.DimmType = l_has_rcd ? MSDG_RDIMM : MSDG_UDIMM;
break;
}

case fapi2::ENUM_ATTR_MEM_EFF_DIMM_TYPE_UDIMM:
io_phy_params.DimmType = MSDG_UDIMM;
break;
Expand Down Expand Up @@ -1346,6 +1356,17 @@ class phy_params
memcpy(&io_phy_params.ATxDly_B[0][0], &iv_params.iv_atxdly_b[0], DRAMINIT_NUM_ADDR_DELAYS);
return fapi2::FAPI2_RC_SUCCESS;
}

///
/// @brief Get the value for parameter iv_encoded_quadcs
/// @return iv_encoded_quadcs value
/// @note thi funciton is for unit testing
///
uint16_t get_EncodedQuadCs() const
{
return iv_params.iv_encoded_quadcs;
}

};

namespace check
Expand Down

0 comments on commit f5653b1

Please sign in to comment.