diff options
author | Michael Pardeik <pardeik@us.ibm.com> | 2019-10-01 15:55:23 -0500 |
---|---|---|
committer | Christian R Geddes <crgeddes@us.ibm.com> | 2019-11-15 17:25:42 -0600 |
commit | fe09e7b9d29b238b07f8d1017fc0c195843c654f (patch) | |
tree | 5838485d50eefcf67c74a4e51a6bb3df97be8ddc /src/import/chips/ocmb/explorer/procedures/hwp | |
parent | dfba68af85eaded297f58d25f33f27b88677b300 (diff) | |
download | talos-hostboot-fe09e7b9d29b238b07f8d1017fc0c195843c654f.tar.gz talos-hostboot-fe09e7b9d29b238b07f8d1017fc0c195843c654f.zip |
exp_mss_eff_config_thermal fixes
Fix pwr_throttles call for thermal throttle type
Fix equalize throttles call for power throttling type
Updates to handle DDIMM and non-DDIMM differences
Clarify related power and thermal MRW attribute descriptions
Change-Id: I34ecfd4bbb97f1e74c258a474e0b5daf3a4dcbbb
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84620
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Dev-Ready: STEPHEN GLANCY <sglancy@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84699
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>
Diffstat (limited to 'src/import/chips/ocmb/explorer/procedures/hwp')
5 files changed, 126 insertions, 97 deletions
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 1891eb75e..82771e69f 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 @@ -62,8 +62,14 @@ extern "C" fapi2::ReturnCode l_rc = fapi2::FAPI2_RC_SUCCESS; FAPI_INF("Start exp_mss_eff_config_thermal"); + // For regulaor power/current throttling or thermal throtling + // Do thermal throttling last so the attributes end up representing a total power value for later usage + // Need to have ATTR_EXP_TOTAL_PWR_SLOPE and ATTR_EXP_TOTAL_PWR_INTERCEPT with total DIMM power + // (not regulator current values) after exp_mss_eff_config_thermal is run, so when OCC calls + // exp_bulk_pwr_throttles at runtime the total DIMM power will be used for any memory bulk supply throttling + const std::vector<mss::throttle_type> throttle_types{ mss::throttle_type::POWER, mss::throttle_type::THERMAL}; + // Return error if safemode throttle utilization is less than MIN_UTIL - // This section needs to be in braces otherwise the compile will fail const uint64_t l_min_util = TT::MIN_UTIL; uint32_t l_safemode_util = 0; FAPI_TRY( mss::attr::get_mrw_safemode_dram_databus_util(l_safemode_util), "Error in exp_mss_eff_config_thermal" ); @@ -76,49 +82,53 @@ extern "C" for ( const auto& l_ocmb : i_targets) { - //Restore runtime_throttles from safemode setting + //Restore runtime_throttles //Sets throttles to max_databus_util value FAPI_INF("Restoring throttles for %s", mss::c_str(l_ocmb)); FAPI_TRY( mss::power_thermal::restore_runtime_throttles<>(l_ocmb), "Error in exp_mss_eff_config_thermal"); + } - //Not doing any work if there are no dimms installed - if (mss::count_dimm(l_ocmb) == 0) + for (const auto& l_throttle_type : throttle_types ) + { + for ( const auto& l_ocmb : i_targets) { - FAPI_INF("Skipping eff_config thermal because no dimms for %s", mss::c_str(l_ocmb)); - continue; - } - - // Thermal power (OCMB+DRAM) - uint64_t l_thermal_power_limit[TT::SIZE_OF_THERMAL_LIMIT_ATTR] = {0}; - uint64_t l_thermal_power_slope[TT::SIZE_OF_THERMAL_SLOPE_ATTR] = {0}; - uint64_t l_thermal_power_intecept[TT::SIZE_OF_THERMAL_INTERCEPT_ATTR] = {0}; - // Power (PMIC) - uint64_t l_current_curve_with_limit[TT::SIZE_OF_CURRENT_CURVE_WITH_LIMIT_ATTR] = {0}; - - // Get the data from MRW - FAPI_TRY( mss::attr::get_mrw_ocmb_thermal_memory_power_limit (l_thermal_power_limit), - "Error in exp_mss_eff_config_thermal"); - FAPI_TRY( mss::attr::get_mrw_ocmb_pwr_slope (l_thermal_power_slope), "Error in exp_mss_eff_config_thermal"); - FAPI_TRY( mss::attr::get_mrw_ocmb_pwr_intercept (l_thermal_power_intecept), "Error in exp_mss_eff_config_thermal"); - FAPI_TRY( mss::attr::get_mrw_ocmb_current_curve_with_limit (l_current_curve_with_limit), - "Error in exp_mss_eff_config_thermal"); - - // Convert array to vector - using namespace std; - vector<uint64_t> l_thermal_power_limit_v ( begin(l_thermal_power_limit), end(l_thermal_power_limit) ); - vector<uint64_t> l_thermal_power_slope_v ( begin(l_thermal_power_slope), end(l_thermal_power_slope) ); - vector<uint64_t> l_thermal_power_intecept_v ( begin(l_thermal_power_intecept), end(l_thermal_power_intecept) ); - vector<uint64_t> l_current_curve_with_limit_v( begin(l_current_curve_with_limit), end(l_current_curve_with_limit) ); - - - uint16_t l_slope [TT::DIMMS_PER_PORT] = {0}; - uint16_t l_intercept[TT::DIMMS_PER_PORT] = {0}; - uint32_t l_limit [TT::DIMMS_PER_PORT] = {0}; + //Not doing any work if there are no dimms installed + if (mss::count_dimm(l_ocmb) == 0) + { + FAPI_INF("Skipping eff_config thermal because no dimms for %s", mss::c_str(l_ocmb)); + continue; + } - const std::vector<mss::throttle_type> throttle_types{ mss::throttle_type::POWER, mss::throttle_type::THERMAL}; + // Thermal power (OCMB+DRAM) + uint64_t l_thermal_power_limit[TT::SIZE_OF_THERMAL_LIMIT_ATTR] = {0}; + uint64_t l_thermal_power_slope[TT::SIZE_OF_THERMAL_SLOPE_ATTR] = {0}; + uint64_t l_thermal_power_intecept[TT::SIZE_OF_THERMAL_INTERCEPT_ATTR] = {0}; + // Power (PMIC) + uint64_t l_current_curve_with_limit[TT::SIZE_OF_CURRENT_CURVE_WITH_LIMIT_ATTR] = {0}; + + // Get the data from MRW + FAPI_TRY( mss::attr::get_mrw_ocmb_thermal_memory_power_limit (l_thermal_power_limit), + "Error in exp_mss_eff_config_thermal"); + FAPI_TRY( mss::attr::get_mrw_ocmb_pwr_slope (l_thermal_power_slope), "Error in exp_mss_eff_config_thermal"); + FAPI_TRY( mss::attr::get_mrw_ocmb_pwr_intercept (l_thermal_power_intecept), "Error in exp_mss_eff_config_thermal"); + FAPI_TRY( mss::attr::get_mrw_ocmb_current_curve_with_limit (l_current_curve_with_limit), + "Error in exp_mss_eff_config_thermal"); + + // Convert array to vector + std::vector<uint64_t> l_thermal_power_limit_v ( std::begin(l_thermal_power_limit), + std::end(l_thermal_power_limit) ); + std::vector<uint64_t> l_thermal_power_slope_v ( std::begin(l_thermal_power_slope), + std::end(l_thermal_power_slope) ); + std::vector<uint64_t> l_thermal_power_intecept_v ( std::begin(l_thermal_power_intecept), + std::end(l_thermal_power_intecept) ); + std::vector<uint64_t> l_current_curve_with_limit_v( std::begin(l_current_curve_with_limit), + std::end(l_current_curve_with_limit) ); + + + uint16_t l_slope [TT::DIMMS_PER_PORT] = {0}; + uint16_t l_intercept[TT::DIMMS_PER_PORT] = {0}; + uint32_t l_limit [TT::DIMMS_PER_PORT] = {0}; - for (const auto& l_throttle_type : throttle_types ) - { for (const auto& l_port : mss::find_targets<fapi2::TARGET_TYPE_MEM_PORT>(l_ocmb)) { //Don't run if there are no dimms on the port @@ -144,28 +154,33 @@ extern "C" FAPI_TRY(mss::attr::set_dimm_thermal_limit(l_port, l_limit)); FAPI_TRY(mss::attr::set_mem_watt_target(l_port, l_limit)); - FAPI_INF( "PMIC current curve slope is %d, intercept is %d, limit is %d for %s", l_slope[0], l_intercept[0], - l_limit[0], mss::c_str(l_port)); - - FAPI_INF("Starting pwr_throttles(%s)", mss::throttle_type::POWER == l_throttle_type ? "POWER" : "THERMAL"); - //get the power limits, done per dimm and set to worst case for the slot and port throttles - FAPI_TRY(mss::power_thermal::pwr_throttles(l_ocmb, mss::throttle_type::POWER)); - FAPI_TRY(l_rc, "Failed running exp_mss_eff_config_thermal with %s throttling", - mss::throttle_type::POWER == l_throttle_type ? "POWER" : "THERMAL"); - - //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_port)); - FAPI_INF("finished update"); + for ( const auto& l_dimm : mss::find_targets<fapi2::TARGET_TYPE_DIMM>(l_port) ) + { + const uint8_t l_dimm_pos = mss::index(l_dimm); + FAPI_INF( "DIMM (%d) slope is %d, intercept is %d, limit is %d for %s", + l_dimm_pos, l_slope[l_dimm_pos], l_intercept[l_dimm_pos], + l_limit[l_dimm_pos], mss::c_str(l_port)); + } } + + FAPI_INF("Starting pwr_throttles(%s)", mss::throttle_type::POWER == l_throttle_type ? "POWER" : "THERMAL"); + //get the power limits, done per dimm and set to worst case for the slot and port throttles + FAPI_TRY(mss::power_thermal::pwr_throttles(l_ocmb, l_throttle_type)); } - } - // Equalizes the throttles to the lowest of runtime and the lowest slot-throttle value - FAPI_TRY(mss::power_thermal::equalize_throttles(i_targets, mss::throttle_type::POWER)); - FAPI_TRY(mss::power_thermal::equalize_throttles(i_targets, mss::throttle_type::THERMAL)); + // Equalizes the throttles to the lowest of runtime and the lowest slot-throttle value + FAPI_TRY(mss::power_thermal::equalize_throttles(i_targets, l_throttle_type)); + + for ( const auto& l_ocmb : i_targets) + { + //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"); + } + } //Done FAPI_INF( "End exp_mss_eff_config_thermal"); diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_decoder.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_decoder.C index 3411bc1d3..ea703b9e7 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_decoder.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_decoder.C @@ -25,7 +25,7 @@ /// /// @file exp_decoder.C -/// @brief Decode MSS_MRW_PWR_CURVE_SLOPE, PWR_CURVE_INTERCEPT, and THERMAL_POWER_LIMIT +/// @brief Decode MRW attributes for DIMM power curves and power limits /// // *HWP HWP Owner: Louis Stermole <stermole@us.ibm.com> // *HWP HWP Backup: Andre Marin <aamarin@us.ibm.com> @@ -63,9 +63,9 @@ const std::vector< std::pair<uint8_t , uint8_t> > throttle_traits<mss::mc_type:: /// /// @brief Finds a value for the power curve slope attributes by matching the generated hashes -/// @param[in] i_slope vector of generated key-values from POWER_CURVE_SLOPE +/// @param[in] i_slope vector of generated key-values from MRW power curve attriutes /// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff the encoding was successful -/// @note populates iv_vddr_slope, iv_total_slop +/// @note populates iv_vddr_slope, iv_total_slope /// template<> fapi2::ReturnCode decoder<mss::mc_type::EXPLORER>::find_slope ( @@ -74,7 +74,7 @@ fapi2::ReturnCode decoder<mss::mc_type::EXPLORER>::find_slope ( using TT = throttle_traits<mss::mc_type::EXPLORER>; // For explorer, two attribute are used to get slope (i_slope[0], i_slope[1]) - // ATTR_MSS_MRW_OCMB_THERMAL_MEMORY_PWR_SLOPE is for thermal power slope + // ATTR_MSS_MRW_OCMB_PWR_SLOPE is for thermal power slope // ATTR_MSS_MRW_OCMB_CURRENT_CURVE_WITH_LIMIT is for power slope FAPI_ASSERT(i_slope.size() == 2, fapi2::MSS_POWER_THERMAL_ATTR_VECTORS_INCORRECT() @@ -88,7 +88,7 @@ fapi2::ReturnCode decoder<mss::mc_type::EXPLORER>::find_slope ( // To get thermal power slope FAPI_TRY( (get_power_thermal_value<TT::THERMAL_START, TT::THERMAL_LENGTH, SLOPE>( *i_slope[0], - "ATTR_MSS_MRW_OCMB_THERMAL_MEMORY_PWR_SLOPE", + "ATTR_MSS_MRW_OCMB_PWR_SLOPE", iv_total_slope)) ); // To get power slope @@ -103,7 +103,7 @@ fapi_try_exit: /// /// @brief Finds a value for power curve intercept attributes by matching the generated hashes -/// @param[in] i_intercept vector of generated key-values for ATTR_MSS_MRW_POWER_CURVE_INTERCEPT +/// @param[in] i_intercept vector of generated key-values from MRW power curve attributes /// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff the encoding was successful /// @note populates iv_vddr_intercept, iv_total_intercept /// @@ -114,7 +114,7 @@ fapi2::ReturnCode decoder<mss::mc_type::EXPLORER>::find_intercept ( using TT = throttle_traits<mss::mc_type::EXPLORER>; // For explorer, two attribute are used to get slope (i_slope[0], i_slope[1]) - // ATTR_MSS_MRW_OCMB_POWER_INTERCEPT is for thermal power intercept + // ATTR_MSS_MRW_OCMB_PWR_INTERCEPT is for thermal power intercept // ATTR_MSS_MRW_OCMB_CURRENT_CURVE_WITH_LIMIT is for power intercept FAPI_ASSERT(i_intercept.size() == 2, fapi2::MSS_POWER_THERMAL_ATTR_VECTORS_INCORRECT() @@ -128,7 +128,7 @@ fapi2::ReturnCode decoder<mss::mc_type::EXPLORER>::find_intercept ( // To get thermal power intercept FAPI_TRY( (get_power_thermal_value<TT::THERMAL_START, TT::THERMAL_LENGTH, INTERCEPT>( *i_intercept[0], - "ATTR_MSS_MRW_OCMB_POWER_INTERCEPT", + "ATTR_MSS_MRW_OCMB_PWR_INTERCEPT", iv_total_intercept)) ); // To get power intercept @@ -143,10 +143,10 @@ fapi_try_exit: /// -/// @brief Finds a value from ATTR_MSS_MRW_THERMAL_MEMORY_POWER_LIMIT and stores in iv variable -/// @param[in] i_thermal_limits is a vector of the generated values from ATTR_MSS_MRW_THERMAL_POWER_LIMIT +/// @brief Finds a value for the power limit attributes by matching the generated hashes +/// @param[in] i_thermal_limits is a vector of the generated values from MRW power limit attributes /// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff the encoding was successful -/// @note populates thermal_power_limit. +/// @note populates iv_thermal_power_limit, iv_power_limit /// template<> fapi2::ReturnCode decoder<mss::mc_type::EXPLORER>::find_thermal_power_limit ( @@ -172,7 +172,7 @@ fapi2::ReturnCode decoder<mss::mc_type::EXPLORER>::find_thermal_power_limit ( "ATTR_MSS_MRW_OCMB_THERMAL_MEMORY_POWER_LIMIT", iv_thermal_power_limit)) ); - // To get power intercept + // To get regulator power or current limit FAPI_TRY( (get_power_thermal_value<TT::POWER_LIMIT_START, TT::POWER_LIMIT_LENGTH, POWER_LIMIT>( *i_thermal_limits[1], "ATTR_MSS_MRW_OCMB_CURRENT_CURVE_WITH_LIMIT", @@ -184,19 +184,19 @@ fapi_try_exit: /// -/// @brief find the power curve attributes for each dimm on an MCS target -/// @param[in] i_targets vector of MCS targets on which dimm attrs will be set -/// @param[in] i_slope vector of generated hashes for encoding and values for MSS_MRW_POWER_SLOPE -/// @param[in] i_intercept vector of generated hashes for encoding and values for MSS_MRW_POWER_INTERCEPT -/// @param[in] i_thermal_power_limit vector of generated hashes for encoding and values for MSS_MRW_THERMAL_MEMORY_POWER_LIMIT -/// @param[out] o_vddr_slope the VDDR power curve slope for each dimm -/// @param[out] o_vddr_int the VDDR power curve intercept for each dimm -/// @param[out] o_total_slope the VDDR+VPP power curve slope for each dimm -/// @param[out] o_total_int the VDDR+VPP power curve intercept for each dimm -/// @param[out] o_thermal_power the thermal power limit for the dimm +/// @brief find the power curve attributes for each dimm on an MEM_PORT target +/// @param[in] i_throttle_type specifies whether this is for power or thermal throttling +/// @param[in] i_port vector of MEM_PORT targets on which dimm attrs will be set +/// @param[in] i_slope vector of generated hashes for encoding the values for memory power curve slopes +/// @param[in] i_intercept vector of generated hashes for encoding the values for memory power curve intercepts +/// @param[in] i_thermal_power_limit vector of generated hashes for encoding the values for memory power limits +/// @param[in] i_current_curve_with_limit vector of generated hashes for encoding the values for regulator power curves and limits +/// @param[out] o_slope the power curve slope for each dimm +/// @param[out] o_intercept the power curve intercept for each dimm +/// @param[out] o_limit the power limit for the dimm /// @return FAPI2_RC_SUCCESS iff ok /// @note used to set power curve attributes in calling function -/// @note decodes the attribute "encoding" to get the vddr and vddr/vpp power curves for a dimm +/// @note decodes the attribute "encoding" to get the power curves and power limits for a dimm /// fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, const fapi2::Target<fapi2::TARGET_TYPE_MEM_PORT>& i_port, @@ -217,6 +217,13 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, mss::power_thermal::decoder<> l_decoder(l_kind); fapi2::buffer<uint64_t> l_attr_value; + // DDIMMs mrw slope/intercept/limit attribute values are for whole DDIMM, so divide these by total number of virtual DIMMs + // to get it to a DIMM level. This will get the DIMM count to use in later calculations. + // ISDIMMs use a value of 1 since mrw attribute values are at the DIMM level + uint8_t l_number_dimm_for_attr_value = (l_kind.iv_dimm_type == fapi2::ENUM_ATTR_MEM_EFF_DIMM_TYPE_DDIMM) ? + mss::count_dimm(mss::find_target<fapi2::TARGET_TYPE_OCMB_CHIP>(l_dimm)) : + 1; + FAPI_TRY( l_decoder.generate_encoding(), "%s Error in get_power_attrs", mss::c_str(l_dimm) ); // The first entry into these arrays must be valid @@ -228,7 +235,8 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, FAPI_INF("%s ATTR_MSS_MRW_OCMB_PWR_SLOPE not found or has zero values", mss::c_str(l_dimm)); o_slope[l_dimm_pos] = - (i_throttle_type == mss::throttle_type::POWER) ? TT::POWER_SLOPE : TT::TOTAL_SLOPE; + ((i_throttle_type == mss::throttle_type::POWER) ? TT::POWER_SLOPE : TT::TOTAL_SLOPE) / + l_number_dimm_for_attr_value; } else { @@ -237,7 +245,8 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, FAPI_TRY( l_decoder.find_slope(l_slope), "%s Error in get_power_attrs", mss::c_str(l_dimm) ); o_slope[l_dimm_pos] = - (i_throttle_type == mss::throttle_type::POWER) ? l_decoder.iv_vddr_slope : l_decoder.iv_total_slope; + ((i_throttle_type == mss::throttle_type::POWER) ? l_decoder.iv_vddr_slope : l_decoder.iv_total_slope) / + l_number_dimm_for_attr_value; } l_attr_value = i_intercept[0]; @@ -247,7 +256,8 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, FAPI_INF("%s ATTR_MSS_MRW_OCMB_PWR_INTERCEPT not found or has zero values", mss::c_str(l_dimm)); o_intercept[l_dimm_pos] = - (i_throttle_type == mss::throttle_type::POWER) ? TT::POWER_INT : TT::TOTAL_INT; + ((i_throttle_type == mss::throttle_type::POWER) ? TT::POWER_INT : TT::TOTAL_INT) / + l_number_dimm_for_attr_value; } else { @@ -256,7 +266,8 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, FAPI_TRY( l_decoder.find_intercept(l_intercept), "%s Error in get_power_attrs", mss::c_str(l_dimm) ); o_intercept[l_dimm_pos] = - (i_throttle_type == mss::throttle_type::POWER) ? l_decoder.iv_vddr_intercept : l_decoder.iv_total_intercept; + ((i_throttle_type == mss::throttle_type::POWER) ? l_decoder.iv_vddr_intercept : l_decoder.iv_total_intercept) / + l_number_dimm_for_attr_value; } l_attr_value = i_thermal_power_limit[0]; @@ -268,7 +279,8 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, // The unit of limit and intercept is cA but limit is dA in mss::throttle_type::POWER // So we need to transfer them to the same unit o_limit[l_dimm_pos] = - (i_throttle_type == mss::throttle_type::POWER) ? TT::POWER_LIMIT * DECI_TO_CENTI : TT::THERMAL_LIMIT; + ((i_throttle_type == mss::throttle_type::POWER) ? TT::POWER_LIMIT* DECI_TO_CENTI : TT::THERMAL_LIMIT) / + l_number_dimm_for_attr_value; } else { @@ -279,8 +291,10 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, // The unit of limit and intercept is cA but limit is dA in mss::throttle_type::POWER // So we need to transfer them to the same unit o_limit[l_dimm_pos] = - (i_throttle_type == mss::throttle_type::POWER) ? l_decoder.iv_power_limit * DECI_TO_CENTI : - l_decoder.iv_thermal_power_limit; + ((i_throttle_type == mss::throttle_type::POWER) ? + l_decoder.iv_power_limit* DECI_TO_CENTI : l_decoder.iv_thermal_power_limit + ) / + l_number_dimm_for_attr_value; } } 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 0e95aebb7..dbed7a8c0 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 @@ -61,7 +61,7 @@ namespace power_thermal fapi2::ReturnCode pwr_throttles( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target, const mss::throttle_type i_throttle_type) { - FAPI_INF("Start exp_bulk_pwr_throttle for %s type throttling for %s", + 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) @@ -109,11 +109,11 @@ fapi2::ReturnCode pwr_throttles( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHI FAPI_TRY(mss::attr::set_mem_throttled_n_commands_per_port( l_port_target, l_port)); } - FAPI_INF("End bulk_pwr_throttles for %s", mss::c_str(i_target)); + FAPI_INF("End pwr_throttles for %s", mss::c_str(i_target)); return fapi2::current_err; fapi_try_exit: - FAPI_ERR("Error calculating bulk_pwr_throttles using %s throttling", + FAPI_ERR("Error calculating pwr_throttles using %s throttling", ((i_throttle_type == mss::throttle_type::POWER) ? "power" : "thermal")); return fapi2::current_err; } diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle.H index 683e484e0..17f8a7dbc 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle.H +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle.H @@ -43,6 +43,7 @@ #include <mss_explorer_attribute_setters.H> #include <mss_explorer_attribute_getters.H> #include <lib/power_thermal/exp_throttle_traits.H> +#include <generic/memory/lib/utils/dimm/kind.H> #include <generic/memory/lib/utils/power_thermal/gen_throttle.H> namespace mss diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle_traits.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle_traits.H index 21e003434..0b0d06572 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle_traits.H +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle_traits.H @@ -85,17 +85,16 @@ class throttle_traits<mss::mc_type::EXPLORER> //They are the default/ catch-all values from the power curve attributes //Shouldn't be used if system is set up correctly and attributes are available //This will throttle the DIMMs to ~76% dram data bus utilization - //(using the mrw regulator power limit of 1700 cW and thermal power limit here of 1940 cW). - // TODO: Need to fill the right value. The current value is from Nimbus + //(using the mrw regulator current limit of 100 dA cW and thermal power limit here of 2175 cW). // Thermal power (OCMB+DRAM) - TOTAL_SLOPE = 0x44C, - TOTAL_INT = 0x44C, - THERMAL_LIMIT = 0x794, + TOTAL_SLOPE = 0x462, + TOTAL_INT = 0x526, + THERMAL_LIMIT = 0x87F, // Power (PMIC) - POWER_SLOPE = 0x41A, - POWER_INT = 0x384, - POWER_LIMIT = 0x794, + POWER_SLOPE = 0x152, + POWER_INT = 0x94, + POWER_LIMIT = 0x64, }; |