summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ploetz <maploetz@us.ibm.com>2014-06-26 10:15:59 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-06-27 16:19:29 -0500
commit76428316c1ebb1f4639ca9f7ae6bce8f17e51294 (patch)
tree690dbf355d7dac908938a9a160af2dc811cfc7ec
parent21da53d274f5478ae7ac876f60460fe52166acc6 (diff)
downloadtalos-hostboot-76428316c1ebb1f4639ca9f7ae6bce8f17e51294.tar.gz
talos-hostboot-76428316c1ebb1f4639ca9f7ae6bce8f17e51294.zip
SW262754: HWP allowing memory to run at a higher VDDR power than the specified p
Change-Id: Idebee7d2fbaf52f15290fdbe7a131803c1fc432d CQ:SW262754 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11460 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Tested-by: Thi N. Tran <thi@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11824 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/usr/hwpf/hwp/mc_config/mss_eff_config/memory_mss_eff_config_thermal.xml13
-rw-r--r--src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_bulk_pwr_throttles.C143
-rw-r--r--src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config_thermal.C279
-rw-r--r--src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_throttle_to_power.C80
4 files changed, 292 insertions, 223 deletions
diff --git a/src/usr/hwpf/hwp/mc_config/mss_eff_config/memory_mss_eff_config_thermal.xml b/src/usr/hwpf/hwp/mc_config/mss_eff_config/memory_mss_eff_config_thermal.xml
index cc27ba7df..061dda75b 100644
--- a/src/usr/hwpf/hwp/mc_config/mss_eff_config/memory_mss_eff_config_thermal.xml
+++ b/src/usr/hwpf/hwp/mc_config/mss_eff_config/memory_mss_eff_config_thermal.xml
@@ -21,22 +21,11 @@
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
<hwpErrors>
-<!-- $Id: memory_mss_eff_config_thermal.xml,v 1.1 2013/06/19 18:28:01 bellows Exp $ -->
+<!-- $Id: memory_mss_eff_config_thermal.xml,v 1.2 2014/06/02 15:01:56 pardeik Exp $ -->
<!-- For file ../../ipl/fapi/mss_eff_config_thermal.C -->
<!-- // *! OWNER NAME : Joab Henderson Email: joabhend@us.ibm.com -->
<!-- // *! BACKUP NAME : Michael Pardeik Email: pardeik@us.ibm.com -->
-<!-- Original Source for RC_MSS_DIMM_POWER_CURVE_DATA_LAB memory_errors.xml -->
- <hwpError>
- <rc>RC_MSS_DIMM_POWER_CURVE_DATA_LAB</rc>
- <description>DIMM power curve data is lab data not MSL</description>
- <ffdc>FFDC_DATA_1</ffdc>
- <ffdc>FFDC_DATA_2</ffdc>
- <ffdc>FFDC_DATA_3</ffdc>
- <ffdc>FFDC_DATA_4</ffdc>
- <callout><target>MEM_CHIP</target><priority>HIGH</priority></callout>
-</hwpError>
-
<!-- Original Source for RC_MSS_DIMM_POWER_CURVE_DATA_INVALID memory_errors.xml -->
<hwpError>
<rc>RC_MSS_DIMM_POWER_CURVE_DATA_INVALID</rc>
diff --git a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_bulk_pwr_throttles.C b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_bulk_pwr_throttles.C
index a6c5b0ecf..d782a49ea 100644
--- a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_bulk_pwr_throttles.C
+++ b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_bulk_pwr_throttles.C
@@ -20,7 +20,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: mss_bulk_pwr_throttles.C,v 1.21 2014/03/10 16:31:45 jdsloat Exp $
+// $Id: mss_bulk_pwr_throttles.C,v 1.22 2014/06/02 13:10:53 pardeik Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/
// centaur/working/procedures/ipl/fapi/mss_bulk_pwr_throttles.C,v $
//------------------------------------------------------------------------------
@@ -71,6 +71,11 @@
//------------------------------------------------------------------------------
// Version:| Author: | Date: | Comment:
//---------|----------|---------|-----------------------------------------------
+// 1.22 | pardeik |21-MAY-14| Removed section that adjusts power limit
+// | | | (was not getting correct throttle values
+// | | | to have channel pair power be under limit)
+// | | | Limit channel pair power limit to thermal limit
+// | | | Start with runtime throttle attributes
// 1.21 | jdsloat |10-MAR-14| Edited comments
// 1.20 | pardeik |06-MAR-14| RAS update for HWP error
// | | | (changed the callout from centaur to mba)
@@ -171,39 +176,22 @@ extern "C" {
FAPI_IMP("*** Running %s on %s ***", procedure_name,
i_target_mba.toEcmdString());
-
-// other variables used in this procedure
- const uint8_t MAX_NUM_PORTS = 2;
- const uint8_t MAX_NUM_DIMMS = 2;
// min utilization (percent of max) allowed for floor
const float MIN_UTIL = 1;
- fapi::Target target_chip;
- std::vector<fapi::Target> target_mba_array;
- std::vector<fapi::Target> target_dimm_array;
uint32_t channel_pair_watt_target;
- uint32_t channel_pair_watt_target_orig;
uint32_t throttle_n_per_mba;
uint32_t throttle_n_per_chip;
uint32_t throttle_d;
- uint8_t port;
- uint8_t dimm;
bool not_enough_available_power;
bool channel_pair_throttle_done;
float channel_pair_power;
uint8_t custom_dimm;
- uint8_t num_mba_with_dimms;
- uint32_t power_int_array[MAX_NUM_PORTS][MAX_NUM_DIMMS];
- uint8_t mba_index;
- uint32_t l_max_dram_databus_util;
+ uint32_t runtime_throttle_n_per_mba;
+ uint32_t runtime_throttle_n_per_chip;
+ uint32_t runtime_throttle_d;
// Get input attributes
- rc = FAPI_ATTR_GET(ATTR_MRW_MAX_DRAM_DATABUS_UTIL,
- NULL, l_max_dram_databus_util);
- if (rc) {
- FAPI_ERR("Error getting attribute ATTR_MRW_MAX_DRAM_DATABUS_UTIL");
- return rc;
- }
rc = FAPI_ATTR_GET(ATTR_EFF_CUSTOM_DIMM, &i_target_mba, custom_dimm);
if (rc) {
FAPI_ERR("Error getting attribute ATTR_EFF_CUSTOM_DIMM");
@@ -215,62 +203,31 @@ extern "C" {
FAPI_ERR("Error getting attribute ATTR_MSS_MEM_WATT_TARGET");
return rc;
}
- rc = FAPI_ATTR_GET(ATTR_MSS_POWER_INT, &i_target_mba, power_int_array);
+ rc = FAPI_ATTR_GET(ATTR_MRW_MEM_THROTTLE_DENOMINATOR, NULL, throttle_d);
if (rc) {
- FAPI_ERR("Error getting attribute ATTR_MSS_POWER_INT");
+ FAPI_ERR("Error getting attribute ATTR_MRW_MEM_THROTTLE_DENOMINATOR");
return rc;
}
- rc = FAPI_ATTR_GET(ATTR_MRW_MEM_THROTTLE_DENOMINATOR, NULL, throttle_d);
+ rc = FAPI_ATTR_GET(ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_MBA,
+ &i_target_mba, runtime_throttle_n_per_mba);
if (rc) {
- FAPI_ERR("Error getting attribute ATTR_MRW_MEM_THROTTLE_DENOMINATOR");
+ FAPI_ERR("Error getting attribute ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_MBA");
return rc;
}
-
-// max utilization (percent of max) allowed for ceiling
-// Comes from MRW value in c% - convert to %
- float MAX_UTIL = (float) l_max_dram_databus_util / 100;
-
-// get number of mba's with dimms for a CDIMM
- if (custom_dimm == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_YES)
- {
-// Get Centaur target for the given MBA
- rc = fapiGetParentChip(i_target_mba, target_chip);
- if (rc) {
- FAPI_ERR("Error calling fapiGetParentChip");
- return rc;
- }
-// Get MBA targets from the parent chip centaur
- rc = fapiGetChildChiplets(target_chip,
- fapi::TARGET_TYPE_MBA_CHIPLET,
- target_mba_array,
- fapi::TARGET_STATE_PRESENT);
- if (rc) {
- FAPI_ERR("Error calling fapiGetChildChiplets");
- return rc;
- }
- num_mba_with_dimms = 0;
- for (mba_index=0; mba_index < target_mba_array.size(); mba_index++)
- {
- rc = fapiGetAssociatedDimms(target_mba_array[mba_index],
- target_dimm_array,
- fapi::TARGET_STATE_PRESENT);
- if (rc) {
- FAPI_ERR("Error calling fapiGetAssociatedDimms");
- return rc;
- }
- if (target_dimm_array.size() > 0)
- {
- num_mba_with_dimms++;
- }
- }
-
+ rc = FAPI_ATTR_GET(ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_CHIP,
+ &i_target_mba, runtime_throttle_n_per_chip);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_CHIP");
+ return rc;
}
- else
- {
-// ISDIMMs, set to a value of one since they are handled on a per MBA basis
- num_mba_with_dimms = 1;
+ rc = FAPI_ATTR_GET(ATTR_MSS_RUNTIME_MEM_THROTTLE_DENOMINATOR,
+ &i_target_mba, runtime_throttle_d);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_MSS_RUNTIME_MEM_THROTTLE_DENOMINATOR");
+ return rc;
}
+
//------------------------------------------------------------------------------
// THROTTLE SECTION
//------------------------------------------------------------------------------
@@ -282,49 +239,9 @@ extern "C" {
// If over limit, then increase throttle value until it is at or below limit
// If unable to get power below limit, then call out an error
- throttle_n_per_mba = (int)(throttle_d * (MAX_UTIL / 100) / 4);
- throttle_n_per_chip = (int)(throttle_d * (MAX_UTIL / 100) / 4) *
- num_mba_with_dimms;
-
-// Adjust power limit value as needed here
-// For CDIMM, we want the throttles to be per-chip, and to allow all commands to
-// go to one MBA to get to the power limit
- if (custom_dimm == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_YES)
- {
-// Set channel pair power limit to whole CDIMM power limit (multiply by number
-// of MBAs used) and subtract off idle power for dimms on other MBA
- channel_pair_watt_target_orig = channel_pair_watt_target;
- channel_pair_watt_target = channel_pair_watt_target *
- num_mba_with_dimms;
- for (port=0; port < MAX_NUM_PORTS; port++)
- {
- for (dimm=0; dimm < MAX_NUM_DIMMS; dimm++)
- {
-// Only subtract idle power of other MBA's dimms if less than the target wattage
-// to prevent negative values for the limit
- if (
- ((num_mba_with_dimms - 1) * (power_int_array[port][dimm]))
- <
- channel_pair_watt_target
- )
- {
- channel_pair_watt_target = channel_pair_watt_target -
- ((num_mba_with_dimms - 1) *
- (power_int_array[port][dimm]));
- }
- else
- {
- break;
- }
- }
- }
-// check to see if calculated power limit is less than original power limit
-// if so then set them the same
- if (channel_pair_watt_target < channel_pair_watt_target_orig)
- {
- channel_pair_watt_target = channel_pair_watt_target_orig;
- }
- }
+// Start with the runtime throttle settings since we may have a thermal/power limit
+ throttle_n_per_mba = runtime_throttle_n_per_mba;
+ throttle_n_per_chip = runtime_throttle_n_per_chip;
// calculate power and change throttle values in this while loop until limit has
// been satisfied or throttles have reached the minimum limit
@@ -392,7 +309,7 @@ extern "C" {
// channel pair power is less than limit, so keep existing throttles
else
{
- FAPI_DBG("There is enough available memory power [Channel Pair Power %4.2f/%d cW]", channel_pair_power, channel_pair_watt_target);
+ FAPI_INF("There is enough available memory power [Channel Pair Power %4.2f/%d cW]", channel_pair_power, channel_pair_watt_target);
channel_pair_throttle_done = true;
}
}
@@ -407,7 +324,7 @@ extern "C" {
throttle_n_per_mba = throttle_n_per_chip;
}
- FAPI_DBG("Final Throttle Settings [N_per_mba/N_per_chip/M %d/%d/%d]", throttle_n_per_mba, throttle_n_per_chip, throttle_d);
+ FAPI_INF("Final Throttle Settings [N_per_mba/N_per_chip/M %d/%d/%d]", throttle_n_per_mba, throttle_n_per_chip, throttle_d);
//------------------------------------------------------------------------------
// update output attributes
diff --git a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config_thermal.C b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config_thermal.C
index d9b74e649..f4b5560b6 100644
--- a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config_thermal.C
+++ b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config_thermal.C
@@ -20,7 +20,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: mss_eff_config_thermal.C,v 1.26 2014/03/10 16:32:09 jdsloat Exp $
+// $Id: mss_eff_config_thermal.C,v 1.27 2014/06/02 13:11:01 pardeik Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/
// centaur/working/procedures/ipl/fapi/mss_eff_config_thermal.C,v $
//------------------------------------------------------------------------------
@@ -53,6 +53,11 @@
//------------------------------------------------------------------------------
// Version:| Author: | Date: | Comment:
//---------|----------|---------|-----------------------------------------------
+// 1.27 | pardeik |22-MAY-14| Removed attribute update section not needed
+// | | | Initialize runtime throttle attributes before
+// | | | calling bulk_pwr_throttles
+// | | | RAS update to split code into smaller
+// | | | subfunctions (powercurve and throttles)
// 1.26 | jdsloat |10-MAR-14| Edited comments
// 1.25 | pardeik |21-JAN-14| fixed default power curve values for CDIMM
// | | | removed unneeded comments
@@ -159,6 +164,14 @@ extern "C" {
const fapi::Target & i_target_mba
);
+ fapi::ReturnCode mss_eff_config_thermal_powercurve(
+ const fapi::Target & i_target_mba
+ );
+
+ fapi::ReturnCode mss_eff_config_thermal_throttles(
+ const fapi::Target & i_target_mba
+ );
+
fapi::ReturnCode mss_eff_config_thermal_term
(
const char nom_or_wc_term[4],
@@ -196,17 +209,17 @@ extern "C" {
uint8_t &o_cen_dq_dqs_drv_imp
);
+
//------------------------------------------------------------------------------
-// @brief mss_eff_config_thermal(): This function determines the power and
-// throttle attribute values to use
+// @brief mss_eff_config_thermal(): This function determines the
+// power curve and throttle attribute values to use
//
// @param[in] const fapi::Target & i_target_mba: MBA Target passed in
//
// @return fapi::ReturnCode
//------------------------------------------------------------------------------
- fapi::ReturnCode mss_eff_config_thermal(const fapi::Target & i_target_mba
- )
+ fapi::ReturnCode mss_eff_config_thermal(const fapi::Target & i_target_mba)
{
fapi::ReturnCode rc = fapi::FAPI_RC_SUCCESS;
@@ -215,6 +228,43 @@ extern "C" {
FAPI_IMP("*** Running %s on %s ***", procedure_name,
i_target_mba.toEcmdString());
+ rc = mss_eff_config_thermal_powercurve(i_target_mba);
+ if (rc)
+ {
+ FAPI_ERR("Error (0x%x) calling mss_eff_config_thermal_powercurve", static_cast<uint32_t>(rc));
+ return rc;
+ }
+ rc = mss_eff_config_thermal_throttles(i_target_mba);
+ if (rc)
+ {
+ FAPI_ERR("Error (0x%x) calling mss_eff_config_thermal_throttles", static_cast<uint32_t>(rc));
+ return rc;
+ }
+
+
+ FAPI_IMP("*** %s COMPLETE on %s ***", procedure_name,
+ i_target_mba.toEcmdString());
+ return rc;
+ }
+
+//------------------------------------------------------------------------------
+// @brief mss_eff_config_thermal_powercurve(): This function determines the
+// power curve attribute values to use
+//
+// @param[in] const fapi::Target & i_target_mba: MBA Target passed in
+//
+// @return fapi::ReturnCode
+//------------------------------------------------------------------------------
+
+ fapi::ReturnCode mss_eff_config_thermal_powercurve(const fapi::Target & i_target_mba)
+ {
+ fapi::ReturnCode rc = fapi::FAPI_RC_SUCCESS;
+
+ const char* procedure_name = "mss_eff_config_thermal_powercurve";
+
+ FAPI_IMP("*** Running %s on %s ***", procedure_name,
+ i_target_mba.toEcmdString());
+
enum
{
DDR3 = fapi::ENUM_ATTR_EFF_DRAM_GEN_DDR3,
@@ -278,7 +328,6 @@ extern "C" {
// other variables used in this function
fapi::Target target_chip;
- std::vector<fapi::Target> target_mba_array;
std::vector<fapi::Target> target_dimm_array;
uint8_t port;
uint8_t dimm;
@@ -320,27 +369,15 @@ extern "C" {
uint8_t cen_dq_dqs_rcv_imp_wc[NUM_PORTS];
uint8_t cen_dq_dqs_drv_imp_wc[NUM_PORTS];
uint8_t num_dimms_on_port;
- uint32_t throttle_n_per_mba;
- uint32_t throttle_n_per_chip;
- uint32_t throttle_d;
- uint32_t runtime_throttle_n_per_mba;
- uint32_t runtime_throttle_n_per_chip;
- uint32_t runtime_throttle_d;
uint8_t dram_rtt_nom[NUM_PORTS][NUM_DIMMS][NUM_RANKS];
uint8_t dram_rtt_wr[NUM_PORTS][NUM_DIMMS][NUM_RANKS];
char dram_gen_str[4];
- uint32_t dimm_thermal_power_limit;
- uint32_t channel_pair_thermal_power_limit;
- uint8_t num_mba_with_dimms = 0;
- uint8_t mba_index;
uint8_t dimm_number_registers[NUM_PORTS][NUM_DIMMS];
uint8_t dimm_index;
uint32_t cdimm_master_power_slope;
uint32_t cdimm_master_power_intercept;
uint32_t cdimm_supplier_power_slope;
uint32_t cdimm_supplier_power_intercept;
- uint8_t ras_increment;
- uint8_t cas_increment;
power_table_size = (sizeof(power_table))/(sizeof(power_data_t));
@@ -475,12 +512,6 @@ extern "C" {
return rc;
}
}
- rc = FAPI_ATTR_GET(ATTR_MRW_THERMAL_MEMORY_POWER_LIMIT,
- NULL, dimm_thermal_power_limit);
- if (rc) {
- FAPI_ERR("Error getting attribute ATTR_MRW_THERMAL_MEMORY_POWER_LIMIT");
- return rc;
- }
// Get voltage and frequency attributes
rc = FAPI_ATTR_GET(ATTR_MSS_VOLT, &target_chip, dimm_voltage);
@@ -494,7 +525,6 @@ extern "C" {
return rc;
}
-
// get any attributes from DIMM SPD
if (
(custom_dimm == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_NO)
@@ -533,33 +563,6 @@ extern "C" {
}
}
-// Get number of Centaur MBAs that have dimms present
- if (custom_dimm == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_YES)
- {
- rc = fapiGetChildChiplets(target_chip,
- fapi::TARGET_TYPE_MBA_CHIPLET,
- target_mba_array,
- fapi::TARGET_STATE_PRESENT);
- if (rc) {
- FAPI_ERR("Error from fapiGetChildChiplets");
- return rc;
- }
- num_mba_with_dimms = 0;
- for (mba_index=0; mba_index < target_mba_array.size(); mba_index++)
- {
- rc = fapiGetAssociatedDimms(target_mba_array[mba_index],
- target_dimm_array,
- fapi::TARGET_STATE_PRESENT);
- if (rc) {
- FAPI_ERR("Error from fapiGetAssociatedDimms");
- return rc;
- }
- if (target_dimm_array.size() > 0)
- {
- num_mba_with_dimms++;
- }
- }
- }
// determine worst case termination settings here for ISDIMMs (to be used later)
if (custom_dimm == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_NO)
@@ -992,6 +995,123 @@ extern "C" {
return rc;
}
+ FAPI_IMP("*** %s COMPLETE on %s ***", procedure_name,
+ i_target_mba.toEcmdString());
+ return rc;
+ }
+
+//------------------------------------------------------------------------------
+// @brief mss_eff_config_thermal_throttles(): This function determines the
+// throttle attribute values to use
+//
+// @param[in] const fapi::Target & i_target_mba: MBA Target passed in
+//
+// @return fapi::ReturnCode
+//------------------------------------------------------------------------------
+
+ fapi::ReturnCode mss_eff_config_thermal_throttles(const fapi::Target & i_target_mba)
+ {
+ fapi::ReturnCode rc = fapi::FAPI_RC_SUCCESS;
+
+ const char* procedure_name = "mss_eff_config_thermal_throttles";
+
+ FAPI_IMP("*** Running %s on %s ***", procedure_name,
+ i_target_mba.toEcmdString());
+
+// variables used in this function
+ fapi::Target target_chip;
+ std::vector<fapi::Target> target_mba_array;
+ std::vector<fapi::Target> target_dimm_array;
+ uint8_t custom_dimm;
+ uint8_t num_dimms_on_port;
+ uint32_t runtime_throttle_n_per_mba;
+ uint32_t runtime_throttle_n_per_chip;
+ uint32_t runtime_throttle_d;
+ uint32_t dimm_thermal_power_limit;
+ uint32_t channel_pair_thermal_power_limit;
+ uint8_t num_mba_with_dimms = 0;
+ uint8_t mba_index;
+ uint8_t ras_increment;
+ uint8_t cas_increment;
+ uint32_t l_max_dram_databus_util;
+
+//------------------------------------------------------------------------------
+// Get input attributes
+//------------------------------------------------------------------------------
+
+// Get Centaur target for the given MBA
+ rc = fapiGetParentChip(i_target_mba, target_chip);
+ if (rc) {
+ FAPI_ERR("Error from fapiGetParentChip");
+ return rc;
+ }
+
+ rc = FAPI_ATTR_GET(ATTR_EFF_CUSTOM_DIMM, &i_target_mba, custom_dimm);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_EFF_CUSTOM_DIMM");
+ return rc;
+ }
+ rc = FAPI_ATTR_GET(ATTR_EFF_NUM_DROPS_PER_PORT,
+ &i_target_mba, num_dimms_on_port);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_EFF_NUM_DROPS_PER_PORT");
+ return rc;
+ }
+ rc = FAPI_ATTR_GET(ATTR_MRW_THERMAL_MEMORY_POWER_LIMIT,
+ NULL, dimm_thermal_power_limit);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_MRW_THERMAL_MEMORY_POWER_LIMIT");
+ return rc;
+ }
+
+ rc = FAPI_ATTR_GET(ATTR_MRW_MEM_THROTTLE_DENOMINATOR, NULL, runtime_throttle_d);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_MRW_MEM_THROTTLE_DENOMINATOR");
+ return rc;
+ }
+ rc = FAPI_ATTR_GET(ATTR_MRW_MAX_DRAM_DATABUS_UTIL,
+ NULL, l_max_dram_databus_util);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_MRW_MAX_DRAM_DATABUS_UTIL");
+ return rc;
+ }
+
+
+
+// Get number of Centaur MBAs that have dimms present
+// Custom dimms (CDIMMs) use mba/chip throttling, so count number of mbas that have dimms
+ if (custom_dimm == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_YES)
+ {
+ rc = fapiGetChildChiplets(target_chip,
+ fapi::TARGET_TYPE_MBA_CHIPLET,
+ target_mba_array,
+ fapi::TARGET_STATE_PRESENT);
+ if (rc) {
+ FAPI_ERR("Error from fapiGetChildChiplets");
+ return rc;
+ }
+ num_mba_with_dimms = 0;
+ for (mba_index=0; mba_index < target_mba_array.size(); mba_index++)
+ {
+ rc = fapiGetAssociatedDimms(target_mba_array[mba_index],
+ target_dimm_array,
+ fapi::TARGET_STATE_PRESENT);
+ if (rc) {
+ FAPI_ERR("Error from fapiGetAssociatedDimms");
+ return rc;
+ }
+ if (target_dimm_array.size() > 0)
+ {
+ num_mba_with_dimms++;
+ }
+ }
+ }
+// ISDIMM (non custom dimm) uses dimm/mba throttling, so set num_mba_with_dimms to 1
+ else
+ {
+ num_mba_with_dimms = 1;
+ }
+
//------------------------------------------------------------------------------
// Memory Throttle Determination
@@ -1032,6 +1152,33 @@ extern "C" {
return rc;
}
+// Initialize the runtime throttle attributes to an unthrottled value for mss_bulk_pwr_throttles
+// max utilization comes from MRW value in c% - convert to %
+ float MAX_UTIL = (float) l_max_dram_databus_util / 100;
+ runtime_throttle_n_per_mba = (int)(runtime_throttle_d * (MAX_UTIL / 100) / 4);
+ runtime_throttle_n_per_chip = (int)(runtime_throttle_d * (MAX_UTIL / 100) / 4) *
+ num_mba_with_dimms;
+
+ rc = FAPI_ATTR_SET(ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_MBA,
+ &i_target_mba, runtime_throttle_n_per_mba);
+ if (rc) {
+ FAPI_ERR("Error writing attribute ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_MBA");
+ return rc;
+ }
+ rc = FAPI_ATTR_SET(ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_CHIP,
+ &i_target_mba, runtime_throttle_n_per_chip);
+ if (rc) {
+ FAPI_ERR("Error writing attribute ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_CHIP");
+ return rc;
+ }
+ rc = FAPI_ATTR_SET(ATTR_MSS_RUNTIME_MEM_THROTTLE_DENOMINATOR,
+ &i_target_mba, runtime_throttle_d);
+ if (rc) {
+ FAPI_ERR("Error writing attribute ATTR_MSS_RUNTIME_MEM_THROTTLE_DENOMINATOR");
+ return rc;
+ }
+
+
// Call the procedure function that takes a channel pair power limit and
// converts it to throttle values
@@ -1099,34 +1246,6 @@ extern "C" {
return rc;
}
-
-// Initialize the generic throttle attributes to be used for scominit
-// These throttles will be the runtime throttles for mcbist/msdiag
-// safemode throttles will be set in thermal_init step
- throttle_n_per_mba = runtime_throttle_n_per_mba;
- throttle_n_per_chip = runtime_throttle_n_per_chip;
- throttle_d = runtime_throttle_d;
-
-// write output attributes
- rc = FAPI_ATTR_SET(ATTR_MSS_MEM_THROTTLE_NUMERATOR_PER_MBA,
- &i_target_mba, throttle_n_per_mba);
- if (rc) {
- FAPI_ERR("Error writing attribute ATTR_MSS_MEM_THROTTLE_NUMERATOR_PER_MBA");
- return rc;
- }
- rc = FAPI_ATTR_SET(ATTR_MSS_MEM_THROTTLE_NUMERATOR_PER_CHIP,
- &i_target_mba, throttle_n_per_chip);
- if (rc) {
- FAPI_ERR("Error writing attribute ATTR_MSS_MEM_THROTTLE_NUMERATOR_PER_CHIP");
- return rc;
- }
- rc = FAPI_ATTR_SET(ATTR_MSS_MEM_THROTTLE_DENOMINATOR,
- &i_target_mba, throttle_d);
- if (rc) {
- FAPI_ERR("Error writing attribute ATTR_MSS_MEM_THROTTLE_DENOMINATOR");
- return rc;
- }
-
FAPI_IMP("*** %s COMPLETE on %s ***", procedure_name,
i_target_mba.toEcmdString());
return rc;
diff --git a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_throttle_to_power.C b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_throttle_to_power.C
index 05787c61e..885ad1842 100644
--- a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_throttle_to_power.C
+++ b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_throttle_to_power.C
@@ -20,7 +20,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: mss_throttle_to_power.C,v 1.13 2014/03/10 16:31:27 jdsloat Exp $
+// $Id: mss_throttle_to_power.C,v 1.14 2014/06/02 13:10:49 pardeik Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/
// centaur/working/procedures/ipl/fapi/mss_throttle_to_power.C,v $
//------------------------------------------------------------------------------
@@ -30,8 +30,8 @@
//------------------------------------------------------------------------------
// *! TITLE : mss_throttle_to_power
// *! DESCRIPTION : see additional comments below
-// *! OWNER NAME : Joab Henderson Email: joabhend@us.ibm.com
-// *! BACKUP NAME : Michael Pardeik Email: pardeik@us.ibm.com
+// *! OWNER NAME : Michael Pardeik Email: pardeik@us.ibm.com
+// *! BACKUP NAME : Jacob Sloat Email: jdsloat@us.ibm.com
// *! ADDITIONAL COMMENTS :
//
// applicable CQ component memory_screen
@@ -47,6 +47,7 @@
//------------------------------------------------------------------------------
// Version:| Author: | Date: | Comment:
//---------|----------|---------|-----------------------------------------------
+// 1.14 | pardeik |21-MAY-14| Fixed power calculations
// 1.13 | jdsloat |10-MAR-14| Edited comments
// 1.12 | pardeik |06-JAN-14| added dimm power curve uplift from MRW
// | | | use max utiliation from MRW for MAX_UTIL
@@ -217,10 +218,15 @@ extern "C" {
float l_channel_power_array[MAX_NUM_PORTS];
uint32_t l_channel_power_array_integer[MAX_NUM_PORTS];
uint32_t l_channel_pair_power_integer;
- uint8_t l_num_dimms_on_port;
uint8_t l_power_curve_percent_uplift;
uint32_t l_max_dram_databus_util;
-;
+ uint8_t num_mba_with_dimms;
+ uint8_t custom_dimm;
+ fapi::Target target_chip;
+ std::vector<fapi::Target> target_mba_array;
+ std::vector<fapi::Target> target_dimm_array;
+ uint8_t mba_index;
+
// get input attributes
rc = FAPI_ATTR_GET(ATTR_MRW_MAX_DRAM_DATABUS_UTIL,
@@ -253,10 +259,9 @@ extern "C" {
FAPI_ERR("Error getting attribute ATTR_EFF_NUM_RANKS_PER_DIMM");
return rc;
}
- rc = FAPI_ATTR_GET(ATTR_EFF_NUM_DROPS_PER_PORT,
- &i_target_mba, l_num_dimms_on_port);
+ rc = FAPI_ATTR_GET(ATTR_EFF_CUSTOM_DIMM, &i_target_mba, custom_dimm);
if (rc) {
- FAPI_ERR("Error getting attribute ATTR_EFF_NUM_DROPS_PER_PORT");
+ FAPI_ERR("Error getting attribute ATTR_EFF_CUSTOM_DIMM");
return rc;
}
@@ -264,6 +269,47 @@ extern "C" {
// Comes from MRW value in c% - convert to %
float MAX_UTIL = (float) l_max_dram_databus_util / 100;
+// get number of mba's with dimms for a CDIMM
+ if (custom_dimm == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_YES)
+ {
+// Get Centaur target for the given MBA
+ rc = fapiGetParentChip(i_target_mba, target_chip);
+ if (rc) {
+ FAPI_ERR("Error calling fapiGetParentChip");
+ return rc;
+ }
+// Get MBA targets from the parent chip centaur
+ rc = fapiGetChildChiplets(target_chip,
+ fapi::TARGET_TYPE_MBA_CHIPLET,
+ target_mba_array,
+ fapi::TARGET_STATE_PRESENT);
+ if (rc) {
+ FAPI_ERR("Error calling fapiGetChildChiplets");
+ return rc;
+ }
+ num_mba_with_dimms = 0;
+ for (mba_index=0; mba_index < target_mba_array.size(); mba_index++)
+ {
+ rc = fapiGetAssociatedDimms(target_mba_array[mba_index],
+ target_dimm_array,
+ fapi::TARGET_STATE_PRESENT);
+ if (rc) {
+ FAPI_ERR("Error calling fapiGetAssociatedDimms");
+ return rc;
+ }
+ if (target_dimm_array.size() > 0)
+ {
+ num_mba_with_dimms++;
+ }
+ }
+
+ }
+ else
+ {
+// ISDIMMs, set to a value of one since they are handled on a per MBA basis
+ num_mba_with_dimms = 1;
+ }
+
// add up the power from all dimms for this MBA (across both channels) using the
// throttle values
o_channel_pair_power = 0;
@@ -307,16 +353,14 @@ extern "C" {
else if (
(
((float)i_throttle_n_per_mba * 100 * 4) /
- i_throttle_d *
- l_num_dimms_on_port
- )
+ i_throttle_d)
>
- (((float)i_throttle_n_per_chip * 100 * 4) /
+ (((float)i_throttle_n_per_chip / num_mba_with_dimms * 100 * 4) /
i_throttle_d)
)
{
// limited by the mba/chip throttles (ie. cfg_nm_n_per_chip)
- if ((((float)i_throttle_n_per_chip * 100 * 4) /
+ if ((((float)i_throttle_n_per_chip / num_mba_with_dimms * 100 * 4) /
i_throttle_d) > MAX_UTIL)
{
// limited by the maximum utilization
@@ -331,10 +375,10 @@ extern "C" {
// limited by the per chip throttles
l_dimm_power_array[l_port][l_dimm] =
(l_power_slope_array[l_port][l_dimm] *
- (((float)i_throttle_n_per_chip * 4)
+ (((float)i_throttle_n_per_chip / num_mba_with_dimms * 4)
/ i_throttle_d) +
l_power_int_array[l_port][l_dimm]);
- l_utilization = (((float)i_throttle_n_per_chip *
+ l_utilization = (((float)i_throttle_n_per_chip / num_mba_with_dimms *
100 * 4) / i_throttle_d);
}
}
@@ -342,7 +386,7 @@ extern "C" {
{
// limited by the per mba throttles (ie. cfg_nm_n_per_mba)
if ((((float)i_throttle_n_per_mba * 100 * 4) /
- i_throttle_d * l_num_dimms_on_port) > MAX_UTIL)
+ i_throttle_d) > MAX_UTIL)
{
// limited by the maximum utilization
l_dimm_power_array[l_port][l_dimm] =
@@ -358,11 +402,11 @@ extern "C" {
l_dimm_power_array[l_port][l_dimm] =
(l_power_slope_array[l_port][l_dimm] *
(((float)i_throttle_n_per_mba * 4) /
- i_throttle_d * l_num_dimms_on_port) +
+ i_throttle_d) +
l_power_int_array[l_port][l_dimm]);
l_utilization =
(((float)i_throttle_n_per_mba * 100 * 4) /
- i_throttle_d * l_num_dimms_on_port);
+ i_throttle_d);
}
}
}
OpenPOWER on IntegriCloud