From 98267572c8c143aa73388239954331b0e1422871 Mon Sep 17 00:00:00 2001 From: Stephen Glancy Date: Sun, 17 Mar 2019 14:38:46 -0400 Subject: Fixes LRDIM dual-drop 4R frequency/plug rules bugs Change-Id: Ibe1fd639b5812ffb1b7baa418dccb07f869a800b Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/73512 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Reviewed-by: Louis Stermole Tested-by: Hostboot CI Reviewed-by: Mark Pizzutillo Reviewed-by: ANDRE A. MARIN Dev-Ready: STEPHEN GLANCY Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/73520 Reviewed-by: Christian R. Geddes Tested-by: Christian R. Geddes --- .../hwp/memory/lib/eff_config/plug_rules.C | 2 +- .../hwp/memory/lib/freq/nimbus_mss_freq.C | 13 +++++++++++++ .../memory/lib/utils/freq/mss_freq_scoreboard.H | 22 ++++++++++++++++++++-- 3 files changed, 34 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/plug_rules.C b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/plug_rules.C index 2d9882a15..5a8f25ab3 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/plug_rules.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/plug_rules.C @@ -702,7 +702,7 @@ fapi2::ReturnCode check_rank_config(const fapi2::Target& i_targ l_dimm1_kind = &k; } - l_rank_count += k.iv_master_ranks; + l_rank_count += k.iv_dimm_type == fapi2::ENUM_ATTR_EFF_DIMM_TYPE_LRDIMM ? 1 : k.iv_master_ranks; } // If we get here and we see there's no DIMM in slot 0, we did something very wrong. We shouldn't have diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/freq/nimbus_mss_freq.C b/src/import/chips/p9/procedures/hwp/memory/lib/freq/nimbus_mss_freq.C index 37a13275b..52b140e6e 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/freq/nimbus_mss_freq.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/freq/nimbus_mss_freq.C @@ -330,6 +330,19 @@ fapi2::ReturnCode num_master_ranks_per_dimm(const fapi2: return mss::eff_num_master_ranks_per_dimm(i_target, o_master_ranks); } +/// +/// @brief Gets the DIMM type for a specific DIMM - specialization for the NIMBUS processor type +/// @param[in] i_target DIMM target +/// @param[out] o_dimm_type DIMM type on the DIMM target +/// @return FAPI2_RC_SUCCESS iff ok +/// +template<> +fapi2::ReturnCode get_dimm_type(const fapi2::Target& i_target, + uint8_t& o_dimm_type) +{ + return mss::eff_dimm_type(i_target, o_dimm_type); +} + /// /// @brief Calls out the target if no DIMM frequencies are supported - specialization for NIMBUS and MCBIST /// @param[in] i_target target on which to operate diff --git a/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.H b/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.H index cf96a1f5d..3b2f7ded9 100644 --- a/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.H +++ b/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.H @@ -62,6 +62,17 @@ template fapi2::ReturnCode num_master_ranks_per_dimm(const fapi2::Target& i_target, uint8_t& o_master_ranks); +/// +/// @brief Gets the DIMM type for a specific DIMM +/// @tparam P mss::proc_type on which to operate +/// @param[in] i_target DIMM target +/// @param[out] o_dimm_type DIMM type on the DIMM target +/// @return FAPI2_RC_SUCCESS iff ok +/// +template +fapi2::ReturnCode get_dimm_type(const fapi2::Target& i_target, + uint8_t& o_dimm_type); + /// /// @brief Gets the attribute for the maximum allowed dimm frequency /// @tparam P mss::proc_type on which to operate @@ -583,8 +594,11 @@ inline fapi2::ReturnCode limit_freq_by_mrw(const fapi2::Target(d, l_num_master_ranks) ); + FAPI_TRY( get_dimm_type

(d, l_dimm_type)); // Just a quick check but we're in deep yogurt if this triggers FAPI_ASSERT( (l_num_master_ranks <= TT::MAX_PRIMARY_RANK_PER_DIMM), @@ -595,7 +609,11 @@ inline fapi2::ReturnCode limit_freq_by_mrw(const fapi2::Target