summaryrefslogtreecommitdiffstats
path: root/src/import/chips/centaur/procedures/hwp
diff options
context:
space:
mode:
authorMichael Pardeik <pardeik@us.ibm.com>2018-05-24 14:30:33 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-05-28 14:54:03 -0400
commitccc4804c0a8f5bc37a738b07da36cd9f8595921c (patch)
tree46360bf241c3effb7fe98408a9163aa3f4ea3bfa /src/import/chips/centaur/procedures/hwp
parent862ecf79aaecf5f1330e7c494f9a5e13c1b18f38 (diff)
downloadtalos-hostboot-ccc4804c0a8f5bc37a738b07da36cd9f8595921c.tar.gz
talos-hostboot-ccc4804c0a8f5bc37a738b07da36cd9f8595921c.zip
P9C Memory Throttle HWP Updates
Change-Id: I292e12105aa5dd1a36b6cdcdd889c110f4e81715 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59357 Reviewed-by: Louis Stermole <stermole@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@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> Dev-Ready: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59369 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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/centaur/procedures/hwp')
-rw-r--r--src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.C15
-rw-r--r--src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.H6
-rw-r--r--src/import/chips/centaur/procedures/hwp/memory/p9c_mss_eff_config_thermal.C11
-rw-r--r--src/import/chips/centaur/procedures/hwp/memory/p9c_mss_util_to_throttle.C3
4 files changed, 17 insertions, 18 deletions
diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.C
index 6ba0a8e37..06c84da79 100644
--- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.C
+++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.C
@@ -209,7 +209,7 @@ extern "C" {
// Maximum theoretical data bus utilization (percent of max) (for ceiling)
// Comes from MRW value in c% - convert to %
// We don't need to limit this because this function is only determining the channel pair power slope and interecpt
- l_max_util = (static_cast<double>(convert_to_percent(l_max_dram_databus_util)));
+ l_max_util = convert_to_percent(static_cast<double>(l_max_dram_databus_util));
for (l_port = 0; l_port < MAX_PORTS_PER_MBA; l_port++)
{
@@ -342,7 +342,7 @@ extern "C" {
FAPI_INF("%s [Max Util Limited to %4.2lf centi percent]", mss::c_str(i_target_mba), l_max_dram_databus_util);
}
- l_max_util = (static_cast<double>(convert_to_percent(l_max_dram_databus_util)));
+ l_max_util = convert_to_percent(static_cast<double>(l_max_dram_databus_util));
// Limit input utilization if needed
if (i_utilization > l_max_util)
@@ -378,9 +378,8 @@ extern "C" {
if (l_num_mba_with_dimms > 1)
{
- l_max_util_power_calc = (l_max_util < (static_cast<double>(convert_to_percent(DRAM_UTIL_LIMIT_BOTH_MBA_WITH_DIMMS)))) ?
- l_max_util : (
- static_cast<double>(convert_to_percent(DRAM_UTIL_LIMIT_BOTH_MBA_WITH_DIMMS)));
+ l_max_util_power_calc = (l_max_util < (convert_to_percent(static_cast<double>(DRAM_UTIL_LIMIT_BOTH_MBA_WITH_DIMMS)))) ?
+ l_max_util : (convert_to_percent(static_cast<double>(DRAM_UTIL_LIMIT_BOTH_MBA_WITH_DIMMS)));
}
FAPI_INF("%s [Max Util for power calculations %4.2lf percent]", mss::c_str(i_target_mba), l_max_util_power_calc);
@@ -397,7 +396,7 @@ extern "C" {
// throttling disabled with M=0, use MAX_UTIL
if (l_throttle_d == 0)
{
- l_util_power_calc = convert_to_percent(MAX_UTIL);
+ l_util_power_calc = convert_to_percent(static_cast<double>(MAX_UTIL));
}
// throttling enabled, use calculated throttle settings to determine utilization
else
@@ -426,8 +425,8 @@ extern "C" {
// throttling disabled with M=0, use MAX_UTIL
if (l_throttle_d == 0)
{
- l_utilization_calc = convert_to_percent(MAX_UTIL);
- l_utilization_calc_without_throttle_adder = convert_to_percent(MAX_UTIL);
+ l_utilization_calc = convert_to_percent(static_cast<double>(MAX_UTIL));
+ l_utilization_calc_without_throttle_adder = convert_to_percent(static_cast<double>(MAX_UTIL));
}
// throttling enabled, use calculated throttle settings to determine utilization
else
diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.H b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.H
index 20f78b47e..1462c767c 100644
--- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.H
+++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.H
@@ -51,7 +51,7 @@ constexpr uint8_t PERCENT_CONVERSION = 100;
///
/// @brief This function will convert a value with units of centi percent to percent
/// @tparam T the type to convert into a percentage
-/// @param[in] i_value: uint32_t value in centi percent
+/// @param[in] i_value: value in centi percent
/// @return the value in percent
///
template<typename T>
@@ -68,8 +68,8 @@ typedef fapi2::ReturnCode (*p9c_mss_bulk_pwr_throttles_FP_t)
typedef fapi2::ReturnCode (*p9c_mss_bulk_pwr_channel_pair_power_curve_FP_t)
(
const fapi2::Target<fapi2::TARGET_TYPE_MBA>&,
- double,
- double
+ double&,
+ double&
);
typedef fapi2::ReturnCode (*p9c_mss_bulk_pwr_util_to_throttle_power_FP_t)
diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_eff_config_thermal.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_eff_config_thermal.C
index 69fe85e6e..c613abb9f 100644
--- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_eff_config_thermal.C
+++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_eff_config_thermal.C
@@ -638,11 +638,12 @@ extern "C" {
i_target_mba, l_channel_pair_thermal_power_limit));
// Initialize the runtime throttle attributes to an unthrottled value for mss_bulk_pwr_throttles
- l_runtime_throttle_n_per_mba = (static_cast<uint32_t>(l_runtime_throttle_d * ((static_cast<double>
- (convert_to_percent(l_max_dram_databus_util))) / PERCENT_CONVERSION) / ADDR_TO_DATA_UTIL_CONVERSION));
- l_runtime_throttle_n_per_chip = (static_cast<uint32_t>(l_runtime_throttle_d * ((static_cast<double>
- (convert_to_percent(l_max_dram_databus_util))) / PERCENT_CONVERSION) / ADDR_TO_DATA_UTIL_CONVERSION) *
- l_throttle_multiplier);
+ l_runtime_throttle_n_per_mba = (static_cast<uint32_t>(l_runtime_throttle_d *
+ ((convert_to_percent(static_cast<double>(l_max_dram_databus_util))) / PERCENT_CONVERSION) /
+ ADDR_TO_DATA_UTIL_CONVERSION));
+ l_runtime_throttle_n_per_chip = (static_cast<uint32_t>(l_runtime_throttle_d *
+ ((convert_to_percent(static_cast<double>(l_max_dram_databus_util))) / PERCENT_CONVERSION) /
+ ADDR_TO_DATA_UTIL_CONVERSION) * l_throttle_multiplier);
// for better custom dimm performance for DDR4, set the per mba throttle to the per chip throttle
// Not planning on doing this for DDR3
diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_util_to_throttle.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_util_to_throttle.C
index 11ee3d3a7..6f2d61eaa 100644
--- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_util_to_throttle.C
+++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_util_to_throttle.C
@@ -40,11 +40,10 @@
// My Includes
//------------------------------------------------------------------------------
#include <p9c_mss_util_to_throttle.H>
-#include <p9c_mss_bulk_pwr_throttles.C>
#include <p9c_mss_bulk_pwr_throttles.H>
#include <generic/memory/lib/utils/c_str.H>
#include <fapi2.H>
-#include <generic/memory/lib/utils/c_str.H>
+#include <generic/memory/lib/utils/count_dimm.H>
using fapi2::FAPI2_RC_SUCCESS;
OpenPOWER on IntegriCloud