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 --- .../hwp/memory/exp_mss_eff_config_thermal.C | 4 +- .../hwp/memory/lib/power_thermal/exp_throttle.C | 10 +-- .../procedures/hwp/memory/lib/utils/explorer_pos.C | 16 +++- .../hwp/memory/lib/freq/nimbus_freq_traits.H | 3 +- .../hwp/memory/lib/freq/axone_freq_traits.H | 7 +- .../hwp/memory/lib/freq/axone_mss_freq.C | 87 ++++++++++++---------- .../procedures/hwp/memory/lib/freq/axone_sync.C | 4 +- .../chips/p9a/procedures/hwp/memory/p9a_mss_freq.C | 39 +++++----- .../chips/p9a/procedures/hwp/memory/p9a_mss_freq.H | 6 +- .../procedures/hwp/memory/p9a_mss_freq_system.C | 4 +- .../procedures/xml/error_info/p9a_freq_errors.xml | 4 +- src/import/generic/memory/lib/spd/spd_utils.C | 8 +- src/import/generic/memory/lib/utils/count_dimm.H | 3 +- .../generic/memory/lib/utils/freq/cas_latency.H | 16 ++-- .../generic/memory/lib/utils/freq/gen_mss_freq.H | 55 ++++++++------ .../memory/lib/utils/freq/mss_freq_scoreboard.H | 38 +++++----- .../memory/lib/utils/power_thermal/gen_throttle.H | 4 +- .../memory/lib/utils/voltage/gen_mss_volt.H | 4 +- 18 files changed, 167 insertions(+), 145 deletions(-) (limited to 'src') diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_mss_eff_config_thermal.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_mss_eff_config_thermal.C index 82771e69f..71358528f 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_mss_eff_config_thermal.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_mss_eff_config_thermal.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2019 */ +/* Contributors Listed Below - COPYRIGHT 2019,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -175,10 +175,8 @@ extern "C" { //Set runtime throttles to worst case between ATTR_EXP_MEM_THROTTLED_N_COMMANDS_PER_SLOT //and ATTR_EXP_MEM_RUNTIME_THROTTLED_N_COMMANDS_PER_SLOT and the _PORT equivalents also - FAPI_INF("Starting update"); FAPI_TRY( mss::power_thermal::update_runtime_throttle(l_ocmb), "Error in exp_mss_eff_config_thermal for %d", mss::c_str(l_ocmb)); - FAPI_INF("finished update"); } } diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle.C index dbed7a8c0..9c3a484f4 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2019 */ +/* Contributors Listed Below - COPYRIGHT 2019,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -61,9 +61,6 @@ namespace power_thermal fapi2::ReturnCode pwr_throttles( const fapi2::Target& i_target, const mss::throttle_type i_throttle_type) { - FAPI_INF("Start pwr_throttles for %s type throttling for %s", - (( i_throttle_type == mss::throttle_type::THERMAL) ? "THERMAL" : "POWER"), mss::c_str(i_target)); - if (mss::count_dimm (i_target) == 0) { return fapi2::FAPI2_RC_SUCCESS; @@ -109,7 +106,6 @@ fapi2::ReturnCode pwr_throttles( const fapi2::Target >& i_targets, const mss::throttle_type i_throttle_type) { - FAPI_INF("Start equalize_throttles for %s type throttling", - (( i_throttle_type == mss::throttle_type::THERMAL) ? "THERMAL" : "POWER")); - std::vector< fapi2::Target > l_exceeded_power; // Set all of the throttles to the lowest value per port for performance reasons @@ -143,7 +136,6 @@ fapi2::ReturnCode equalize_throttles( const std::vector< fapi2::Target(const fapi2::Target +posTraits::pos_type +relative_pos(const fapi2::Target& i_target) +{ + typedef mcTypeTraits TT; + return fapi_pos(i_target) % (TT::PORTS_PER_OCMB * TT::OCMB_PER_OMI * TT::OMI_PER_MCC * TT::MCC_PER_MI * TT::MI_PER_MC * + TT::MC_PER_PROC); +} + }// mss diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/freq/nimbus_freq_traits.H b/src/import/chips/p9/procedures/hwp/memory/lib/freq/nimbus_freq_traits.H index 4818eeeb1..9ef0fc6a3 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/freq/nimbus_freq_traits.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/freq/nimbus_freq_traits.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2019 */ +/* Contributors Listed Below - COPYRIGHT 2019,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -57,6 +57,7 @@ class frequency_traits ////////////////////////////////////////////////////////////// static constexpr fapi2::TargetType PORT_TARGET_TYPE = fapi2::TARGET_TYPE_MCA; static constexpr fapi2::TargetType FREQ_TARGET_TYPE = fapi2::TARGET_TYPE_MCBIST; + static constexpr fapi2::TargetType FREQ_DOMAIN_TARGET_TYPE = fapi2::TARGET_TYPE_MCBIST; static constexpr fapi2::TargetType VPD_TARGET_TYPE = fapi2::TARGET_TYPE_MCS; ////////////////////////////////////////////////////////////// diff --git a/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_freq_traits.H b/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_freq_traits.H index 1b4f96d0c..3c21636fc 100644 --- a/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_freq_traits.H +++ b/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_freq_traits.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2019 */ +/* Contributors Listed Below - COPYRIGHT 2019,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -56,14 +56,15 @@ class frequency_traits ////////////////////////////////////////////////////////////// static constexpr fapi2::TargetType PORT_TARGET_TYPE = fapi2::TARGET_TYPE_MEM_PORT; static constexpr fapi2::TargetType FREQ_TARGET_TYPE = fapi2::TARGET_TYPE_MEM_PORT; + static constexpr fapi2::TargetType FREQ_DOMAIN_TARGET_TYPE = fapi2::TARGET_TYPE_PROC_CHIP; static constexpr fapi2::TargetType VPD_TARGET_TYPE = fapi2::TARGET_TYPE_OCMB_CHIP; ////////////////////////////////////////////////////////////// // Traits values ////////////////////////////////////////////////////////////// static const std::vector SUPPORTED_FREQS; - // MEM_PORT is our frequency domain. So 1 port per domain - static constexpr uint64_t PORTS_PER_FREQ_DOMAIN = 1; + // PROC_CHIP is our frequency domain + static constexpr uint64_t PORTS_PER_FREQ_DOMAIN = 16; // Max DIMM's per port static constexpr uint64_t MAX_DIMM_PER_PORT = 2; // Maxium number of primary ranks on a DIMM diff --git a/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_mss_freq.C b/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_mss_freq.C index 1a66aa77a..db6556af3 100644 --- a/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_mss_freq.C +++ b/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_mss_freq.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2019 */ +/* Contributors Listed Below - COPYRIGHT 2019,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -104,10 +104,13 @@ fapi_try_exit: /// template<> fapi2::ReturnCode set_freq( - const fapi2::Target& i_target, + const fapi2::Target& i_target, const uint64_t i_freq) { - FAPI_TRY( mss::attr::set_freq(i_target, i_freq) ); + for (const auto& l_port : mss::find_targets(i_target)) + { + FAPI_TRY( mss::attr::set_freq(l_port, i_freq) ); + } fapi_try_exit: return fapi2::current_err; @@ -191,7 +194,7 @@ fapi_try_exit: /// template<> fapi2::ReturnCode callout_bad_freq_calculated( - const fapi2::Target& i_target, + const fapi2::Target& i_target, const uint64_t i_final_freq) { using TT = mss::frequency_traits; @@ -265,8 +268,6 @@ fapi2::ReturnCode check_freq_support_vpd( const fapi2::Ta FAPI_TRY(convert_ddr_freq_to_omi_freq(i_target, i_proposed_freq, l_omi_freq)); l_vpd_info.iv_omi_freq_mhz = l_omi_freq; - FAPI_INF("Setting VPD info OMI frequency: %d Gbps, for DDR frequency %d MT/s", - l_vpd_info.iv_omi_freq_mhz, i_proposed_freq); // DDIMM SPD can contain different SI settings for each master rank. // To determine which frequencies are supported, we have to check for each valid @@ -287,12 +288,10 @@ fapi2::ReturnCode check_freq_support_vpd( const fapi2::Ta } l_vpd_info.iv_rank = l_rank.get_dimm_rank(); - FAPI_INF("%s. VPD info - checking rank: %d", - mss::c_str(i_target), l_rank.get_dimm_rank()); // Check if this VPD configuration is supported FAPI_TRY(is_vpd_config_supported(l_vpd_target, i_proposed_freq, l_vpd_info, o_supported), - "%s failed to determine if %u freq is supported", mss::c_str(i_target), i_proposed_freq); + "%s failed to determine if %u freq is supported on rank %d", mss::c_str(i_target), i_proposed_freq, l_vpd_info.iv_rank); // If we fail any of the ranks, then this VPD configuration is not supported if(o_supported == false) @@ -307,29 +306,34 @@ fapi_try_exit: } /// -/// @brief Update supported frequency scoreboard according to processor limits - specialization for Axone and MEM_PORT +/// @brief Update supported frequency scoreboard according to processor limits - specialization for Axone and PROC_CHIP /// @param[in] i_target processor frequency domain /// @param[in,out] io_scoreboard scoreboard of port targets supporting each frequency /// @return FAPI2_RC_SUCCESS iff ok /// template<> fapi2::ReturnCode limit_freq_by_processor( - const fapi2::Target& i_target, + const fapi2::Target& i_target, freq_scoreboard& io_scoreboard) { - std::vector l_converted_omi_freqs; - // OCMB always needs to be in sync between OMI and DDR, by the given ratio // so we convert the supported OMI freqs and remove every other DDR freq // from the scoreboard - for (const auto l_omi_freq : AXONE_OMI_FREQS) + for (const auto& l_port : mss::find_targets(i_target)) { - uint64_t l_ddr_freq = 0; - FAPI_TRY(convert_omi_freq_to_ddr_freq(i_target, l_omi_freq, l_ddr_freq)); - l_converted_omi_freqs.push_back(l_ddr_freq); - } + const auto l_port_pos = mss::relative_pos(l_port); - FAPI_TRY(io_scoreboard.remove_freqs_not_on_list(0, l_converted_omi_freqs)); + std::vector l_converted_omi_freqs; + + for (const auto l_omi_freq : AXONE_OMI_FREQS) + { + uint64_t l_ddr_freq = 0; + FAPI_TRY(convert_omi_freq_to_ddr_freq(l_port, l_omi_freq, l_ddr_freq)); + l_converted_omi_freqs.push_back(l_ddr_freq); + } + + FAPI_TRY(io_scoreboard.remove_freqs_not_on_list(l_port_pos, l_converted_omi_freqs)); + } fapi_try_exit: return fapi2::current_err; @@ -353,12 +357,12 @@ fapi2::ReturnCode num_master_ranks_per_dimm( /// @brief Calls out the target if no DIMM frequencies are supported - specialization for Axone and MEM_PORT /// @param[in] i_target target on which to operate /// @param[in] i_supported_freq true if any FREQ's are supported -/// @param[in,out] i_num_ports number of configured ports (always 1 for Axone) +/// @param[in,out] i_num_ports number of configured ports /// @return FAPI2_RC_SUCCESS iff ok /// template<> fapi2::ReturnCode callout_no_common_freq( - const fapi2::Target& i_target, + const fapi2::Target& i_target, const bool i_supported_freq, const uint64_t i_num_ports) { @@ -387,7 +391,7 @@ fapi_try_exit: /// template<> fapi2::ReturnCode callout_max_freq_empty_set( - const fapi2::Target& i_target, + const fapi2::Target& i_target, const std::vector>& i_vpd_supported_freqs) { @@ -402,21 +406,26 @@ fapi2::ReturnCode callout_max_freq_empty_set( uint32_t l_max_mrw_freqs[NUM_MAX_FREQS] = {0}; FAPI_TRY( mss::attr::get_max_allowed_dimm_freq(l_max_mrw_freqs) ); - FAPI_ASSERT(false, - fapi2::P9A_MSS_MRW_FREQ_MAX_FREQ_EMPTY_SET() - .set_MSS_VPD_FREQ_0(l_port_vpd_max_freq[0]) - .set_MSS_VPD_FREQ_1(l_port_vpd_max_freq[1]) - .set_MSS_VPD_FREQ_2(l_port_vpd_max_freq[2]) - .set_MSS_MAX_FREQ_0(l_max_mrw_freqs[0]) - .set_MSS_MAX_FREQ_1(l_max_mrw_freqs[1]) - .set_MSS_MAX_FREQ_2(l_max_mrw_freqs[2]) - .set_MSS_MAX_FREQ_3(l_max_mrw_freqs[3]) - .set_MSS_MAX_FREQ_4(l_max_mrw_freqs[4]) - .set_OMI_FREQ_0(fapi2::ENUM_ATTR_MSS_OCMB_EXP_BOOT_CONFIG_SERDES_FREQUENCY_SERDES_21_33GBPS) - .set_OMI_FREQ_1(fapi2::ENUM_ATTR_MSS_OCMB_EXP_BOOT_CONFIG_SERDES_FREQUENCY_SERDES_23_46GBPS) - .set_OMI_FREQ_2(fapi2::ENUM_ATTR_MSS_OCMB_EXP_BOOT_CONFIG_SERDES_FREQUENCY_SERDES_25_60GBPS) - .set_PORT_TARGET(i_target), - "%s didn't find a supported frequency for the port", mss::c_str(i_target)); + for (const auto& l_port : mss::find_targets(i_target)) + { + FAPI_ASSERT_NOEXIT(false, + fapi2::P9A_MSS_MRW_FREQ_MAX_FREQ_EMPTY_SET() + .set_MSS_VPD_FREQ_0(l_port_vpd_max_freq[0]) + .set_MSS_VPD_FREQ_1(l_port_vpd_max_freq[1]) + .set_MSS_VPD_FREQ_2(l_port_vpd_max_freq[2]) + .set_MSS_MAX_FREQ_0(l_max_mrw_freqs[0]) + .set_MSS_MAX_FREQ_1(l_max_mrw_freqs[1]) + .set_MSS_MAX_FREQ_2(l_max_mrw_freqs[2]) + .set_MSS_MAX_FREQ_3(l_max_mrw_freqs[3]) + .set_MSS_MAX_FREQ_4(l_max_mrw_freqs[4]) + .set_OMI_FREQ_0(fapi2::ENUM_ATTR_MSS_OCMB_EXP_BOOT_CONFIG_SERDES_FREQUENCY_SERDES_21_33GBPS) + .set_OMI_FREQ_1(fapi2::ENUM_ATTR_MSS_OCMB_EXP_BOOT_CONFIG_SERDES_FREQUENCY_SERDES_23_46GBPS) + .set_OMI_FREQ_2(fapi2::ENUM_ATTR_MSS_OCMB_EXP_BOOT_CONFIG_SERDES_FREQUENCY_SERDES_25_60GBPS) + .set_TARGET(l_port), + "%s didn't find a supported frequency for any ports in this domain", mss::c_str(l_port)); + } + + return fapi2::RC_P9A_MSS_MRW_FREQ_MAX_FREQ_EMPTY_SET; fapi_try_exit: return fapi2::current_err; @@ -425,14 +434,14 @@ namespace check { /// -/// @brief Checks the final frequency for the system type - Axone and MEM_PORT specialization +/// @brief Checks the final frequency for the system type - Axone and PROC_CHIP specialization /// @param[in] i_target the target on which to operate /// @return FAPI2_RC_SUCCESS iff okay /// @note This function was needed in Nimbus to enforce a frequency limit due to a hardware limitation /// and is not needed here. /// template<> -fapi2::ReturnCode final_freq(const fapi2::Target& i_target) +fapi2::ReturnCode final_freq(const fapi2::Target& i_target) { return fapi2::FAPI2_RC_SUCCESS; } diff --git a/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_sync.C b/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_sync.C index 97f95c7b8..1e3aea1a5 100644 --- a/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_sync.C +++ b/src/import/chips/p9a/procedures/hwp/memory/lib/freq/axone_sync.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2019 */ +/* Contributors Listed Below - COPYRIGHT 2019,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -186,8 +186,6 @@ fapi2::ReturnCode select_omi_freq(const std::map< fapi2::Target& i_target ) +fapi2::ReturnCode p9a_mss_freq( const fapi2::Target& i_target ) { mss::display_git_commit_info("p9a_mss_freq"); // If there are no DIMM, we can just get out. - if (mss::count_dimm(i_target) == 0) + if (mss::count_dimm(mss::find_targets(i_target)) == 0) { FAPI_INF("Seeing no DIMM on %s, no freq to set", mss::c_str(i_target)); return fapi2::FAPI2_RC_SUCCESS; } // We will first set pre-eff_config attribes - for(const auto& d : mss::find_targets(i_target)) + // Note that we have to go through the MEM_PORT to get to the DIMM targets because of the + // target hierarchy in Axone + for(const auto& p : mss::find_targets(i_target)) { - std::vector l_raw_spd; - FAPI_TRY(mss::spd::get_raw_data(d, l_raw_spd)); + for(const auto& d : mss::find_targets(p)) { - // Gets the SPD facade - fapi2::ReturnCode l_rc(fapi2::FAPI2_RC_SUCCESS); - mss::spd::facade l_spd_decoder(d, l_raw_spd, l_rc); + std::vector l_raw_spd; + FAPI_TRY(mss::spd::get_raw_data(d, l_raw_spd)); + { + // Gets the SPD facade + fapi2::ReturnCode l_rc(fapi2::FAPI2_RC_SUCCESS); + mss::spd::facade l_spd_decoder(d, l_raw_spd, l_rc); - // Checks that the facade was setup correctly - FAPI_TRY( l_rc, "Failed to initialize SPD facade for %s", mss::spd::c_str(d) ); + // Checks that the facade was setup correctly + FAPI_TRY( l_rc, "Failed to initialize SPD facade for %s", mss::spd::c_str(d) ); - // Set pre-eff_config SPD driven attributes - FAPI_TRY( (mss::gen::attr_engine::set(l_spd_decoder)), - "Failed gen::attr_engine::set on %s", mss::spd::c_str(d) ); + // Set pre-eff_config SPD driven attributes + FAPI_TRY( (mss::gen::attr_engine::set(l_spd_decoder)), + "Failed gen::attr_engine::set on %s", mss::spd::c_str(d) ); - // Set pre_eff_config attributes derived from other attributes - FAPI_TRY( (mss::gen::attr_engine::set(d)), - "Failed gen::attr_engine::set on %s", mss::spd::c_str(d) ); + // Set pre_eff_config attributes derived from other attributes + FAPI_TRY( (mss::gen::attr_engine::set(d)), + "Failed gen::attr_engine::set on %s", mss::spd::c_str(d) ); + } } } diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.H b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.H index e4e20b050..ef3b57188 100644 --- a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.H +++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_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. */ /* */ /* */ @@ -38,7 +38,7 @@ #include -typedef fapi2::ReturnCode (*p9a_mss_freq_FP_t) (const fapi2::Target&); +typedef fapi2::ReturnCode (*p9a_mss_freq_FP_t) (const fapi2::Target&); extern "C" { @@ -48,7 +48,7 @@ extern "C" /// @param[in] i_target port target /// @return FAPI2_RC_SUCCESS iff ok /// - fapi2::ReturnCode p9a_mss_freq( const fapi2::Target& i_target ); + fapi2::ReturnCode p9a_mss_freq( const fapi2::Target& i_target ); } diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq_system.C b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq_system.C index adddd1ca2..9088840f4 100644 --- a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq_system.C +++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq_system.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018,2019 */ +/* Contributors Listed Below - COPYRIGHT 2018,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -67,8 +67,6 @@ extern "C" // Get OMI freq FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_FREQ_OMI_MHZ, i_target, l_omi_freq) ); - FAPI_INF("Retrieved omi freq %d", l_omi_freq); - // Populate dimm speed map FAPI_TRY( mss::dimm_speed_map(l_ports, l_freq_map, l_equal_dimm_speed), "Failed to get dimm speed mapping" ); diff --git a/src/import/chips/p9a/procedures/xml/error_info/p9a_freq_errors.xml b/src/import/chips/p9a/procedures/xml/error_info/p9a_freq_errors.xml index 37909deb2..c20e29b05 100644 --- a/src/import/chips/p9a/procedures/xml/error_info/p9a_freq_errors.xml +++ b/src/import/chips/p9a/procedures/xml/error_info/p9a_freq_errors.xml @@ -5,7 +5,7 @@ - + @@ -80,7 +80,7 @@ - PORT_TARGET + TARGET TARGET_TYPE_DIMM MEDIUM diff --git a/src/import/generic/memory/lib/spd/spd_utils.C b/src/import/generic/memory/lib/spd/spd_utils.C index bfe380dc5..38bf99577 100644 --- a/src/import/generic/memory/lib/spd/spd_utils.C +++ b/src/import/generic/memory/lib/spd/spd_utils.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -113,7 +113,7 @@ fapi2::ReturnCode get_timebases( const mss::spd::facade& i_spd_decoder, "Could not find a mapped value that matched the key (%d) for %s", l_spd_ftb, spd::c_str(l_target) ); - FAPI_INF("MTB: %d, FTB: %d for %s", o_mtb, o_ftb, spd::c_str(l_target)); + FAPI_DBG("MTB: %d, FTB: %d for %s", o_mtb, o_ftb, spd::c_str(l_target)); fapi_try_exit: return fapi2::current_err; @@ -162,7 +162,7 @@ fapi2::ReturnCode get_tckmin( const mss::spd::facade& i_spd_decoder, o_value = l_temp; - FAPI_INF("%s. tCKmin (ps): %d", + FAPI_DBG("%s. tCKmin (ps): %d", spd::c_str(l_target), o_value ); @@ -213,7 +213,7 @@ fapi2::ReturnCode get_tckmax( const mss::spd::facade& i_spd_decoder, o_value = l_temp; - FAPI_INF( "%s. tCKmax (ps): %d", + FAPI_DBG( "%s. tCKmax (ps): %d", spd::c_str(l_target), o_value); diff --git a/src/import/generic/memory/lib/utils/count_dimm.H b/src/import/generic/memory/lib/utils/count_dimm.H index 8f75b984b..3ceea2fab 100644 --- a/src/import/generic/memory/lib/utils/count_dimm.H +++ b/src/import/generic/memory/lib/utils/count_dimm.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2019 */ +/* Contributors Listed Below - COPYRIGHT 2016,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -55,7 +55,6 @@ inline size_t count_dimm(const fapi2::Target& i_target) // in the case of an over-ride and there are no DIMM in the config, we want to let // people know. Which is how we found we needed to add this code ... size_t l_dimm_count = find_targets(i_target).size(); - FAPI_INF("%d DIMM on %s", l_dimm_count, mss::c_str(i_target)); return l_dimm_count; } diff --git a/src/import/generic/memory/lib/utils/freq/cas_latency.H b/src/import/generic/memory/lib/utils/freq/cas_latency.H index 1b71481e2..0605189c2 100644 --- a/src/import/generic/memory/lib/utils/freq/cas_latency.H +++ b/src/import/generic/memory/lib/utils/freq/cas_latency.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2019 */ +/* Contributors Listed Below - COPYRIGHT 2016,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -571,7 +571,7 @@ class cas_latency l_temp); o_value = l_temp; - FAPI_INF( "%s. tAAmin (ps): %d", + FAPI_DBG( "%s. tAAmin (ps): %d", mss::spd::c_str(l_target), o_value); @@ -628,7 +628,7 @@ class cas_latency { FAPI_TRY( spd::calc_nck(i_taa, i_tck, spd::INVERSE_DDR4_CORRECTION_FACTOR, o_cas_latency) ); - FAPI_INF("%s. tAA (ps): %d, tCK (ps): %d, CL (nck): %d", + FAPI_DBG("%s. tAA (ps): %d, tCK (ps): %d, CL (nck): %d", mss::spd::c_str(iv_target), i_taa, i_tck, @@ -651,8 +651,8 @@ class cas_latency const uint64_t l_min_cl = get_min_cl(l_cl_mask); const uint64_t l_max_cl = get_max_cl(l_cl_mask); - FAPI_INF("%s. min CL %lu", mss::spd::c_str(iv_target), l_min_cl); - FAPI_INF("%s. max CL %lu", mss::spd::c_str(iv_target), l_max_cl); + FAPI_DBG("%s. min CL %lu", mss::spd::c_str(iv_target), l_min_cl); + FAPI_DBG("%s. max CL %lu", mss::spd::c_str(iv_target), l_max_cl); for(uint64_t l_cas_latency = l_min_cl; l_cas_latency <= l_max_cl; ++l_cas_latency) { @@ -688,7 +688,7 @@ class cas_latency { const bool l_found = std::binary_search(i_common_cls.begin(), i_common_cls.end(), i_cas_latency); - FAPI_INF("Found CL: %d in common CL mask: 0x%llX ? %s for %s", + FAPI_DBG("Found CL: %d in common CL mask: 0x%llX ? %s for %s", i_cas_latency, iv_common_cl_bitmap, l_found ? "yes" : "no", mss::spd::c_str(iv_target)); return l_found; @@ -709,7 +709,7 @@ class cas_latency const size_t l_taa_max = (iv_is_3ds == loading::NOT_3DS) ? TAA_MAX_DDR4 : TAA_MAX_DDR4_3DS; const bool l_is_cl_exceeding_taa = l_cas_latency_time > l_taa_max; - FAPI_INF("%s. CL (%d) * tCK (%d) = %d > %d ? %s", + FAPI_DBG("%s. CL (%d) * tCK (%d) = %d > %d ? %s", mss::spd::c_str(iv_target), i_cas_latency, i_tck, @@ -758,7 +758,7 @@ class cas_latency FAPI_TRY( freq_to_ps(l_proposed_freq, io_tck), "%s. Failed freq_to_ps()", mss::spd::c_str(iv_target) ); - FAPI_INF("%s Supported dimm speed override %d MT/s (Clock period %d in ps)", + FAPI_DBG("%s Supported dimm speed override %d MT/s (Clock period %d in ps)", mss::spd::c_str(iv_target), l_proposed_freq, io_tck); // Sanity check 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) ); 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 91b89fc83..94bdcc980 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 @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018,2019 */ +/* Contributors Listed Below - COPYRIGHT 2018,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -161,7 +161,6 @@ class freq_scoreboard if ( l_scoreboard_freq > i_freq_limit ) { - FAPI_INF("Removing freq %d on port %d since it's above the limit %d", l_scoreboard_freq, i_port_pos, i_freq_limit); l_port_supported_freqs[l_index] = false; } } @@ -229,7 +228,6 @@ class freq_scoreboard if (l_it == i_freq_list.end()) { - FAPI_INF("Removing freq %d on port %d since it's not supported", iv_freq_values[l_index], i_port_pos); iv_supported_port_freqs[i_port_pos][l_index] = false; } } @@ -313,7 +311,7 @@ class freq_scoreboard /// @return FAPI2_RC_SUCCESS if successful /// template> - fapi2::ReturnCode resolve(const fapi2::Target& i_target, + fapi2::ReturnCode resolve(const fapi2::Target& i_target, const std::vector>& i_vpd_supported_freqs, std::vector& o_deconfigured, std::vector>& o_deconfigured_targets, @@ -419,7 +417,7 @@ class freq_scoreboard /// @returh l_supported_vector return the fector of supported frequencies /// template> - std::vector count_supported_frequencies(const fapi2::Target& i_target, + std::vector count_supported_frequencies(const fapi2::Target& i_target, const std::vector>& i_ports, std::vector& o_freqs) { @@ -436,7 +434,7 @@ class freq_scoreboard { if (l_supported[l_index]) { - FAPI_INF("%s Frequency %d is supported by port%d", mss::c_str(i_target), TT::SUPPORTED_FREQS[l_index], l_pos); + FAPI_DBG("%s Frequency %d is supported by port%d", mss::c_str(i_target), TT::SUPPORTED_FREQS[l_index], l_pos); ++l_support_counts[l_index]; } @@ -444,7 +442,7 @@ class freq_scoreboard // Note that deconfigured ports will support all frequencies due to the way the scoreboard is built if (l_support_counts[l_index] == iv_num_ports) { - FAPI_INF("%s Frequency %d is supported by all ports", mss::c_str(i_target), TT::SUPPORTED_FREQS[l_index]); + FAPI_DBG("%s Frequency %d is supported by all ports", mss::c_str(i_target), TT::SUPPORTED_FREQS[l_index]); o_freqs.push_back(TT::SUPPORTED_FREQS[l_index]); } @@ -467,7 +465,7 @@ class freq_scoreboard /// @return FAPI2_RC_SUCCESS iff ok /// template> - fapi2::ReturnCode deconfigure_ports(const fapi2::Target& i_target, + 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, @@ -483,7 +481,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 @@ -494,7 +492,7 @@ class freq_scoreboard // and call it out if it doesn't support the selected freq const auto& p = *l_it_port; - FAPI_INF("Checking if port %d (%s) supports common frequency", l_pos, mss::c_str(p)); + FAPI_DBG("Checking if port %d (%s) supports common frequency", l_pos, mss::c_str(p)); if (!iv_supported_port_freqs[l_pos][i_best_freq_index]) { @@ -532,7 +530,7 @@ class freq_scoreboard /// @return FAPI2_RC_SUCCESS iff ok /// template> -fapi2::ReturnCode limit_freq_by_processor(const fapi2::Target& i_target, +fapi2::ReturnCode limit_freq_by_processor(const fapi2::Target& i_target, freq_scoreboard& io_scoreboard); /// @@ -547,7 +545,7 @@ fapi2::ReturnCode limit_freq_by_processor(const fapi2::Target> -inline fapi2::ReturnCode limit_freq_by_mrw(const fapi2::Target& i_target, +inline fapi2::ReturnCode limit_freq_by_mrw(const fapi2::Target& i_target, const std::vector& i_max_mrw_freqs, freq_scoreboard& io_scoreboard) { @@ -574,13 +572,13 @@ inline fapi2::ReturnCode limit_freq_by_mrw(const fapi2::Target(i_target) ) { - const auto l_port_pos = mss::relative_pos(p); + const auto l_port_pos = mss::relative_pos(p); const auto l_dimms = mss::find_targets(p); const uint64_t l_dimms_on_port = l_dimms.size(); @@ -618,7 +616,7 @@ inline fapi2::ReturnCode limit_freq_by_mrw(const fapi2::Target> -fapi2::ReturnCode limit_freq_by_vpd(const fapi2::Target& i_target, +fapi2::ReturnCode limit_freq_by_vpd(const fapi2::Target& i_target, const std::vector>& i_hw_freqs, freq_scoreboard& io_scoreboard) { @@ -675,7 +673,7 @@ fapi2::ReturnCode limit_freq_by_vpd(const fapi2::Target& i 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); const auto& l_port_freqs = i_hw_freqs[l_port_pos]; // This is the list of supported frequencies for VPD @@ -715,13 +713,13 @@ fapi_try_exit: /// have a path for testing /// template> -fapi2::ReturnCode limit_freq_by_spd(const fapi2::Target& i_target, +fapi2::ReturnCode limit_freq_by_spd(const fapi2::Target& i_target, const std::vector& i_hw_freqs, freq_scoreboard& io_scoreboard) { 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); // Remove any frequencies that aren't in this port's list from the scoreboard io_scoreboard.remove_freqs_above_limit(l_port_pos, i_hw_freqs); diff --git a/src/import/generic/memory/lib/utils/power_thermal/gen_throttle.H b/src/import/generic/memory/lib/utils/power_thermal/gen_throttle.H index c65ffb637..0b15b6ab2 100644 --- a/src/import/generic/memory/lib/utils/power_thermal/gen_throttle.H +++ b/src/import/generic/memory/lib/utils/power_thermal/gen_throttle.H @@ -591,8 +591,6 @@ fapi2::ReturnCode throttle::power_regulator_throttles () double l_databus_dimm_max[TT::DIMMS_PER_PORT] = {}; double l_calc_databus_port_idle[TT::DIMMS_PER_PORT] = {TT::IDLE_UTIL, TT::IDLE_UTIL}; - FAPI_INF("Starting power regulator throttles for %s", mss::c_str(iv_target)); - //Decide utilization for each dimm based off of dimm count and power slopes FAPI_TRY( calc_databus(iv_databus_port_max, l_databus_dimm_max), "Failed to calculate each DIMMs' percentage of dram databus utilization for target %s, max port databus is %d", @@ -1072,7 +1070,7 @@ fapi2::ReturnCode throttle::calc_split_util( //assumptions slot <= port, l_count_dimms <=2 if (i_util_slot * l_count_dimms > i_util_port) { - FAPI_INF("In mss::power_thermal::calc_split i_util_slot is %f, i_util_port is %f, l_count_dimms is %d for %s", + FAPI_INF("i_util_slot is %f, i_util_port is %f, l_count_dimms is %d for %s", i_util_slot, i_util_port, l_count_dimms, diff --git a/src/import/generic/memory/lib/utils/voltage/gen_mss_volt.H b/src/import/generic/memory/lib/utils/voltage/gen_mss_volt.H index d84c97dbe..9ff39109e 100644 --- a/src/import/generic/memory/lib/utils/voltage/gen_mss_volt.H +++ b/src/import/generic/memory/lib/utils/voltage/gen_mss_volt.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -115,8 +115,6 @@ inline fapi2::ReturnCode setup_voltage_rail_values(const fapi2::Target(l_voltage_target, l_dram_voltages)), "Failed to set volt attributes for %s", mss::c_str(l_voltage_target) ); - FAPI_INF("%s End setup_voltage_rail_values", mss::c_str(i_target)); - fapi_try_exit: return fapi2::current_err; } -- cgit v1.2.1