summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLouis Stermole <stermole@us.ibm.com>2019-06-25 14:45:26 -0400
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-07-09 10:21:12 -0500
commit035e5f85fe8b3f1936f74c5fa424d6bf214ab67f (patch)
tree4390a9940fc114cf9410aa4a6d30d0acc8a328ae /src
parentd6bd1b69780193308c0a8156d2c7e86f0d76ccfe (diff)
downloadtalos-hostboot-035e5f85fe8b3f1936f74c5fa424d6bf214ab67f.tar.gz
talos-hostboot-035e5f85fe8b3f1936f74c5fa424d6bf214ab67f.zip
Fixes for p9a_mss_eff_config_thermal
Add setting of ATTR_EXP_MEM_WATT_TARGET Use default slope/intercept when attribute has zero decoded value Add check for if the power limit is greater than the intercept Fix some trace string formatters for double variables Change-Id: If44ee81248563a1ca8612099a19950b349dd4914 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79485 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79502 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')
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_mss_eff_config_thermal.C1
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_decoder.C19
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle_traits.H1
-rw-r--r--src/import/generic/memory/lib/utils/power_thermal/gen_throttle.H13
-rw-r--r--src/import/generic/procedures/xml/attribute_info/generic_memory_mrw_attributes.xml2
5 files changed, 23 insertions, 13 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 2c343be27..a261faa19 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
@@ -142,6 +142,7 @@ extern "C"
FAPI_TRY(mss::attr::set_total_pwr_slope(l_port, l_slope));
FAPI_TRY(mss::attr::set_total_pwr_intercept(l_port, l_intercept));
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));
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 3770d62bb..709a1989f 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
@@ -215,14 +215,17 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type,
const auto l_dimm_pos = mss::index (l_dimm);
mss::dimm::kind<> l_kind (l_dimm);
mss::power_thermal::decoder<> l_decoder(l_kind);
+ fapi2::buffer<uint64_t> l_attr_value;
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
// If we don't find any values, the attributes aren't found so go with some defaults
- if (i_slope.empty() || i_slope[0] == 0)
+ l_attr_value = i_slope[0];
+
+ if (i_slope.empty() || !l_attr_value.getBit<TT::POWER_LIMIT_START, TT::POWER_LENGTH>())
{
- FAPI_INF("%s ATTR_MSS_MRW_OCMB_PWR_SLOPE not found!!", mss::c_str(l_dimm));
+ 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;
@@ -237,9 +240,11 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type,
(i_throttle_type == mss::throttle_type::POWER) ? l_decoder.iv_vddr_slope : l_decoder.iv_total_slope;
}
- if (i_intercept.empty() || i_intercept[0] == 0)
+ l_attr_value = i_intercept[0];
+
+ if (i_intercept.empty() || !l_attr_value.getBit<TT::POWER_LIMIT_START, TT::POWER_LENGTH>())
{
- FAPI_INF("%s ATTR_MSS_MRW_OCMB_PWR_INTERCEPT not found!!", mss::c_str(l_dimm));
+ 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;
@@ -254,9 +259,11 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type,
(i_throttle_type == mss::throttle_type::POWER) ? l_decoder.iv_vddr_intercept : l_decoder.iv_total_intercept;
}
- if (i_thermal_power_limit.empty() || i_thermal_power_limit[0] == 0)
+ l_attr_value = i_thermal_power_limit[0];
+
+ if (i_thermal_power_limit.empty() || !l_attr_value.getBit<TT::THERMAL_START, TT::THERMAL_LENGTH>())
{
- FAPI_INF("%s ATTR_MSS_MRW_OCMB_THERMAL_MEMORY_POWER_LIMIT not found!!", mss::c_str(l_dimm));
+ FAPI_INF("%s ATTR_MSS_MRW_OCMB_THERMAL_MEMORY_POWER_LIMIT not found or has zero values", mss::c_str(l_dimm));
// 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
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 d782ce050..21e003434 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
@@ -123,6 +123,7 @@ class throttle_traits<mss::mc_type::EXPLORER>
POWER_SLOPE_LENGTH = 12,
POWER_INTERCEPT_START = 52,
POWER_INTERCEPT_LENGTH = 12,
+ POWER_LENGTH = 32,
};
//Positions and lengths of the encodings
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 eb0533916..893a7e37b 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
@@ -590,7 +590,7 @@ fapi2::ReturnCode throttle<MC, TT>::power_regulator_throttles ()
l_port_power_calc_max,
l_port_power_slope,
l_port_power_int),
- "Failed to calculate the power curve for port %s, calculated port power max is %d, idle is %d",
+ "Failed to calculate the power curve for port %s, calculated port power max is %f, idle is %f",
mss::c_str(iv_target),
l_port_power_calc_max,
l_port_power_calc_idle);
@@ -606,7 +606,7 @@ fapi2::ReturnCode throttle<MC, TT>::power_regulator_throttles ()
//Calculate the new slot values and the max power value for the port
FAPI_TRY( calc_slots_and_power( l_calc_util_port),
- "%s Error calculating the final throttles and power values for target with passed in port utilization %d",
+ "%s Error calculating the final throttles and power values for target with passed in port utilization %f",
mss::c_str(iv_target),
l_calc_util_port);
@@ -880,15 +880,16 @@ void throttle<MC, TT>::calc_util_usage(const uint32_t i_slope,
const uint32_t i_power_limit,
double& o_util) const
{
- o_util = ((static_cast<double>(i_power_limit) - i_int) / i_slope ) * UTIL_CONVERSION;
+ // Return 0 utilization if our intercept is above the power limit
+ o_util = (i_power_limit > i_int) ? (((static_cast<double>(i_power_limit) - i_int) / i_slope ) * UTIL_CONVERSION) : 0;
- //Cast to uint32 for edge case where it has decimals
+ // Cast to uint32 for edge case where it has decimals
o_util = (static_cast<uint32_t>(o_util) < iv_databus_port_max) ? static_cast<uint32_t>(o_util) : iv_databus_port_max;
// Check for the minimum threshnold and update if need be
if(o_util < TT::MIN_UTIL)
{
- FAPI_INF("Calculated utilization (%lu) is less than the minimum utilization: %lu. Setting to minimum value for %s",
+ FAPI_INF("Calculated utilization (%f) is less than the minimum utilization: %lu. Setting to minimum value for %s",
o_util,
TT::MIN_UTIL, mss::c_str(iv_target));
o_util = TT::MIN_UTIL;
@@ -927,7 +928,7 @@ fapi2::ReturnCode throttle<MC, TT>::calc_power_from_n (const uint16_t i_n_slot,
//Determine the utilization for each DIMM that will maximize the port power
FAPI_TRY( calc_split_util(l_calc_util_slot, l_calc_util_port, l_calc_databus_port_max),
- "Error splitting the utilization for target %s with slot utilizatio %d and port util %d",
+ "Error splitting the utilization for target %s with slot utilizatio %f and port util %f",
mss::c_str(iv_target),
l_calc_util_slot,
l_calc_util_port);
diff --git a/src/import/generic/procedures/xml/attribute_info/generic_memory_mrw_attributes.xml b/src/import/generic/procedures/xml/attribute_info/generic_memory_mrw_attributes.xml
index b50663437..9cca3fe16 100644
--- a/src/import/generic/procedures/xml/attribute_info/generic_memory_mrw_attributes.xml
+++ b/src/import/generic/procedures/xml/attribute_info/generic_memory_mrw_attributes.xml
@@ -251,7 +251,7 @@
<valueType>uint32</valueType>
<platInit/>
<mssUnits>c%</mssUnits>
- <default>0x00002328</default>
+ <default>0x00002710</default>
<initToZero/>
<mssAccessorName>mrw_max_dram_databus_util</mssAccessorName>
</attribute>
OpenPOWER on IntegriCloud