From 3502d6036aa6c9bf159d3a241c45ee5bc111bc05 Mon Sep 17 00:00:00 2001 From: Louis Stermole Date: Thu, 3 Oct 2019 11:22:46 -0400 Subject: Add deconfigure of memory port if mss_freq can't find consensus freq Fixes condition where MSS_PORT_DOES_NOT_SUPPORT_MAJORITY_FREQ caused the IPL to halt. Fixed procedure code to deconfigure correct port's DIMMs, and updated error XML to call out all DIMMs in freq domain. Also updated error description to be more helpful. Change-Id: Ia08357c1de28f5f03d41b95d81a910d6c2e32451 CQ:SW473836 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84733 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Reviewed-by: STEPHEN GLANCY Reviewed-by: Mark Pizzutillo Tested-by: PPE CI Tested-by: Hostboot CI Tested-by: HWSV CI Reviewed-by: Jennifer A Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84776 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Daniel M Crowell --- src/import/generic/memory/lib/utils/freq/gen_mss_freq.H | 2 ++ .../generic/memory/lib/utils/freq/mss_freq_scoreboard.H | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src/import/generic/memory/lib') diff --git a/src/import/generic/memory/lib/utils/freq/gen_mss_freq.H b/src/import/generic/memory/lib/utils/freq/gen_mss_freq.H index c1c51cd87..6ad2c7ea6 100644 --- a/src/import/generic/memory/lib/utils/freq/gen_mss_freq.H +++ b/src/import/generic/memory/lib/utils/freq/gen_mss_freq.H @@ -462,6 +462,7 @@ inline fapi2::ReturnCode supported_freqs(const fapi2::Target> l_vpd_supported_freqs; std::vector l_spd_supported_freq; std::vector l_deconfigured = {0}; + std::vector> l_deconfigured_targets; // Retrieve system MRW, SPD, and VPD constraints FAPI_TRY( max_allowed_dimm_freq

(l_max_mrw_freqs.data()), "%s max_allowed_dimm_freq", mss::c_str(i_target) ); @@ -486,6 +487,7 @@ inline fapi2::ReturnCode supported_freqs(const fapi2::Target(i_target, l_vpd_supported_freqs, l_deconfigured, + l_deconfigured_targets, o_freqs) ); FAPI_INF("%s supported freqs:", mss::c_str(i_target)); 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 11256000a..91b89fc83 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 @@ -308,6 +308,7 @@ class freq_scoreboard /// @param[in] i_target MCBIST target /// @param[in] i_vpd_supported_freqs vector of hardware supported freqs -- from VPD /// @param[out] o_deconfigured vector of port positions that were deconfigured by this function + /// @param[out] o_deconfigured_targets vector of port targets that were deconfigured by this function /// @param[out] o_freqs vector of frequencies supported by all ports /// @return FAPI2_RC_SUCCESS if successful /// @@ -315,6 +316,7 @@ class freq_scoreboard fapi2::ReturnCode resolve(const fapi2::Target& i_target, const std::vector>& i_vpd_supported_freqs, std::vector& o_deconfigured, + std::vector>& o_deconfigured_targets, std::vector& o_freqs) { const auto l_ports = mss::find_targets(i_target); @@ -358,10 +360,10 @@ class freq_scoreboard FAPI_TRY(callout_no_common_freq

(i_target, l_common_ports > l_empty_port_count, l_port_count)); // Now find and deconfigure all ports that don't support our selected frequency - FAPI_TRY(deconfigure_ports

(i_target, l_ports, l_best_freq_index, o_deconfigured)); + FAPI_TRY(deconfigure_ports

(i_target, l_ports, l_best_freq_index, o_deconfigured, o_deconfigured_targets)); // Now find all the frequencies supported by the ports that are left over - FAPI_TRY(this->template resolve

(i_target, i_vpd_supported_freqs, o_deconfigured, o_freqs)); + FAPI_TRY(this->template resolve

(i_target, i_vpd_supported_freqs, o_deconfigured, o_deconfigured_targets, o_freqs)); #ifndef __HOSTBOOT_MODULE @@ -461,15 +463,18 @@ class freq_scoreboard /// @param[in] i_ports vector of ports /// @param[in] i_best_freq_index index corresponding to the best case frequency /// @param[out] o_deconfigured vector of deconfigured port positions + /// @param[out] o_deconfigured_targets vector of deconfigured targets /// @return FAPI2_RC_SUCCESS iff ok /// template> fapi2::ReturnCode deconfigure_ports(const fapi2::Target& i_target, const std::vector>& i_ports, const uint64_t i_best_freq_index, - std::vector& o_deconfigured) + std::vector& o_deconfigured, + std::vector>& o_deconfigured_targets) { o_deconfigured.clear(); + o_deconfigured_targets.clear(); for ( size_t l_pos = 0; l_pos < iv_num_ports; ++l_pos ) { @@ -478,7 +483,7 @@ class freq_scoreboard i_ports.end(), [l_pos]( const fapi2::Target& i_rhs) -> bool { - return (mss::relative_pos(i_rhs) != l_pos); + return (mss::relative_pos(i_rhs) == l_pos); }); // If we didn't find an port for a given position, there wasn't one configured there @@ -497,6 +502,7 @@ class freq_scoreboard auto& l_port_supported_freqs = iv_supported_port_freqs[l_pos]; o_deconfigured.push_back(l_pos); + o_deconfigured_targets.push_back(p); FAPI_ASSERT_NOEXIT( false, fapi2::MSS_PORT_DOES_NOT_SUPPORT_MAJORITY_FREQ() .set_FREQ_TARGET(i_target) -- cgit v1.2.1