From 6b29b3829fc9ff676662c4e520c13ded41d070fd Mon Sep 17 00:00:00 2001 From: Louis Stermole Date: Mon, 16 Dec 2019 10:16:07 -0500 Subject: Change p9a_mss_freq to work on PROC_CHIP target Previously p9a_mss_freq ran on the MEM_PORT target, even though the freq domain is at the PROC_CHIP level. This change will allow DDIMMs to be binned to the same freq across the domain. Also removes a lot of FAPI_INF messages to reduce UT log size. Change-Id: I7d4e2ee8897fdd62c0672d96cc1731c7a14643dd Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/88736 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: HWSV CI Reviewed-by: STEPHEN GLANCY Tested-by: Hostboot CI Dev-Ready: Louis Stermole Reviewed-by: Mark Pizzutillo Reviewed-by: Jennifer A Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/89672 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Daniel M Crowell --- .../generic/memory/lib/utils/freq/gen_mss_freq.H | 55 +++++++++++++--------- 1 file changed, 34 insertions(+), 21 deletions(-) (limited to 'src/import/generic/memory/lib/utils/freq/gen_mss_freq.H') 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 6ad2c7ea6..c681f2e59 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 @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018,2019 */ +/* Contributors Listed Below - COPYRIGHT 2018,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -105,7 +105,7 @@ fapi2::ReturnCode get_dimm_type(const fapi2::Target& i_target, /// @return FAPI2_RC_SUCCESS iff ok /// template> -fapi2::ReturnCode callout_bad_freq_calculated(const fapi2::Target& i_target, +fapi2::ReturnCode callout_bad_freq_calculated(const fapi2::Target& i_target, const uint64_t i_final_freq); /// @@ -208,7 +208,7 @@ fapi2::ReturnCode check_freq_support_vpd( const fapi2::Target> -inline fapi2::ReturnCode set_freq_attrs(const fapi2::Target& i_target, +inline fapi2::ReturnCode set_freq_attrs(const fapi2::Target& i_target, const std::vector& i_dimm_freq) { // Find the minimum (but non-0) freq in the vector. If we see all 0's we'll write a 0. However, @@ -245,7 +245,7 @@ fapi_try_exit: /// @return FAPI2_RC_SUCCESS iff okay /// template> -inline fapi2::ReturnCode spd_supported_freq(const fapi2::Target& i_target, +inline fapi2::ReturnCode spd_supported_freq(const fapi2::Target& i_target, std::vector& o_supported_freqs) { uint64_t l_largest_tck = 0; @@ -255,7 +255,17 @@ inline fapi2::ReturnCode spd_supported_freq(const fapi2::Target l_spd_facades; - FAPI_TRY( get_spd_decoder_list(i_target, l_spd_facades), "%s get decoder - spd", mss::c_str(i_target) ); + + for (const auto& l_port : mss::find_targets(i_target)) + { + std::vector< mss::spd::facade > l_these_spd_facades; + FAPI_TRY( get_spd_decoder_list(l_port, l_these_spd_facades), "%s get decoder - spd", mss::c_str(l_port) ); + + for (const auto& l_spd_facade : l_these_spd_facades) + { + l_spd_facades.push_back(l_spd_facade); + } + } // Looking for the biggest application period on an MC. // This will further reduce supported frequencies the system can run on. @@ -263,7 +273,7 @@ inline fapi2::ReturnCode spd_supported_freq(const fapi2::Target(l_dimm); - const auto l_port_pos = mss::relative_pos(l_port); + const auto l_port_pos = mss::relative_pos(l_port); uint64_t l_tckmax_in_ps = 0; uint64_t l_tck_min_in_ps = 0; uint32_t l_dimm_freq = 0; @@ -279,7 +289,7 @@ inline fapi2::ReturnCode spd_supported_freq(const fapi2::Target> -fapi2::ReturnCode vpd_supported_freqs( const fapi2::Target& i_target, +fapi2::ReturnCode vpd_supported_freqs( const fapi2::Target& i_target, std::vector>& o_vpd_supported_freqs) { // This bitmap will keep track of the ports we visit. // Any we don't are not configured, so will support all frequencies in the scoreboard - fapi2::buffer configured_ports; + fapi2::buffer configured_ports; // Clearing output Just.In.Case o_vpd_supported_freqs.clear(); @@ -317,7 +327,8 @@ fapi2::ReturnCode vpd_supported_freqs( const fapi2::Target // Just go to find target for the port level for( const auto& p : mss::find_targets(i_target) ) { - const auto l_port_pos = mss::relative_pos(p); + const auto l_port_pos = mss::relative_pos(p); + FAPI_TRY( configured_ports.setBit(l_port_pos) ); if( mss::count_dimm(p) == 0 ) @@ -342,7 +353,7 @@ fapi2::ReturnCode vpd_supported_freqs( const fapi2::Target // Add supported freqs to our output if (l_supported) { - FAPI_INF("VPD supported freq added: %d for %s", freq, mss::c_str(p) ); + FAPI_DBG("VPD supported freq added: %d for %s", freq, mss::c_str(p) ); o_vpd_supported_freqs[l_port_pos].push_back(freq); } } @@ -381,7 +392,7 @@ fapi_try_exit: /// @return FAPI2_RC_SUCCESS iff okay /// template> -inline fapi2::ReturnCode find_min_dimm_freq(const fapi2::Target& i_target, +inline fapi2::ReturnCode find_min_dimm_freq(const fapi2::Target& i_target, const std::vector& i_supported_freqs, std::vector& o_min_dimm_freq) { @@ -420,14 +431,14 @@ inline fapi2::ReturnCode find_min_dimm_freq(const fapi2::Target(l_port, l_desired_cl), "%s. Failed set_CL_attr()", mss::c_str(l_port) ); - } // mca + } // port fapi_try_exit: return fapi2::current_err; @@ -452,7 +463,7 @@ fapi_try_exit: /// @return FAPI2_RC_SUCCESS iff okay /// template> -inline fapi2::ReturnCode supported_freqs(const fapi2::Target& i_target, +inline fapi2::ReturnCode supported_freqs(const fapi2::Target& i_target, std::vector& o_freqs) { o_freqs.clear(); @@ -466,12 +477,14 @@ inline fapi2::ReturnCode supported_freqs(const fapi2::Target(l_max_mrw_freqs.data()), "%s max_allowed_dimm_freq", mss::c_str(i_target) ); + FAPI_TRY( spd_supported_freq

(i_target, l_spd_supported_freq), "%s spd supported freqs", mss::c_str(i_target) ); + FAPI_TRY( vpd_supported_freqs

(i_target, l_vpd_supported_freqs), "%s vpd supported freqs", mss::c_str(i_target) ); - // Limits the frequency by the Nimbus processor constraints (sync mode) + // Limits the frequency by the processor constraints (sync mode) FAPI_TRY( limit_freq_by_processor

(i_target, l_scoreboard) ); // Limit frequency scoreboard according to MRW constraints @@ -512,7 +525,7 @@ namespace check /// @return FAPI2_RC_SUCCESS iff okay /// template> -fapi2::ReturnCode final_freq(const fapi2::Target& i_target); +fapi2::ReturnCode final_freq(const fapi2::Target& i_target); } // check nameespace @@ -524,16 +537,16 @@ fapi2::ReturnCode final_freq(const fapi2::Target& i_target /// @return FAPI2_RC_SUCCESS iff okay /// template> -fapi2::ReturnCode generate_freq(const fapi2::Target& i_target) +fapi2::ReturnCode generate_freq(const fapi2::Target& i_target) { std::vector l_min_dimm_freq; std::vector l_supported_freqs; - // Get supported freqs for this MCBIST + // Get supported freqs for this domain FAPI_TRY( mss::supported_freqs

(i_target, l_supported_freqs), "%s failed to get supported frequencies", mss::c_str(i_target) ); - // Finds the minimum supported DIMM frequencies for this MCBIST + // Finds the minimum supported DIMM frequencies for this domain FAPI_TRY(mss::find_min_dimm_freq

(i_target, l_supported_freqs, l_min_dimm_freq), "%s. Failed find_min_dimm_freq()", mss::c_str(i_target) ); -- cgit v1.2.1