summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2014-01-08 18:27:47 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-01-13 12:39:34 -0600
commit6d0ea01ad6eb7c909d850e74c0a2bf10bb6bb7b5 (patch)
tree0935b316d93a2a2572c150f3dc101f039ffe0389 /src/usr/hwpf/hwp
parent14d7749c8a65e8b56bbd76a1554b72b954182e39 (diff)
downloadblackbird-hostboot-6d0ea01ad6eb7c909d850e74c0a2bf10bb6bb7b5.tar.gz
blackbird-hostboot-6d0ea01ad6eb7c909d850e74c0a2bf10bb6bb7b5.zip
INITPROC: Hostboot SW239773 Power curves for CDIMMs
Change-Id: Ib789a494ce4b74fe3250839d5ff97097d51bb4d5 CQ:SW239773 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/7953 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp')
-rw-r--r--src/usr/hwpf/hwp/centaur_ec_attributes.xml23
-rw-r--r--src/usr/hwpf/hwp/dram_initialization/mss_thermal_init/mss_thermal_init.C112
-rw-r--r--src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config_thermal.C56
-rw-r--r--src/usr/hwpf/hwp/memory_attributes.xml4
4 files changed, 88 insertions, 107 deletions
diff --git a/src/usr/hwpf/hwp/centaur_ec_attributes.xml b/src/usr/hwpf/hwp/centaur_ec_attributes.xml
index 0fe25bbdf..ca96e6f95 100644
--- a/src/usr/hwpf/hwp/centaur_ec_attributes.xml
+++ b/src/usr/hwpf/hwp/centaur_ec_attributes.xml
@@ -1,11 +1,11 @@
<!-- IBM_PROLOG_BEGIN_TAG -->
<!-- This is an automatically generated prolog. -->
<!-- -->
-<!-- $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/centaur/working/procedures/xml/attribute_info/centaur_ec_attributes.xml,v $ -->
+<!-- $Source: src/usr/hwpf/hwp/centaur_ec_attributes.xml $ -->
<!-- -->
<!-- IBM CONFIDENTIAL -->
<!-- -->
-<!-- COPYRIGHT International Business Machines Corp. 2012,2013 -->
+<!-- COPYRIGHT International Business Machines Corp. 2012,2014 -->
<!-- -->
<!-- p1 -->
<!-- -->
@@ -22,7 +22,7 @@
<!-- IBM_PROLOG_END_TAG -->
<attributes>
<!-- ********************************************************************* -->
- <!-- $Id: centaur_ec_attributes.xml,v 1.15 2013/11/22 22:13:33 whs Exp $ -->
+ <!-- $Id: centaur_ec_attributes.xml,v 1.16 2013/12/19 17:12:52 pardeik Exp $ -->
<attribute>
<id>ATTR_CENTAUR_EC_ENABLE_TRACE_LCL_CLK_GATE_CTRL</id>
<targetType>TARGET_TYPE_MEMBUF_CHIP</targetType>
@@ -289,4 +289,21 @@ The getMBvpdSlopeInterceptData Attribute Accessor, if it does not find a matchin
</chipEcFeature>
</attribute>
+ <attribute>
+ <id>ATTR_CENTAUR_EC_ENABLE_SAFEMODE_THROTTLE</id>
+ <targetType>TARGET_TYPE_MEMBUF_CHIP</targetType>
+ <description>
+ Set by the platform depending on DD2.x or newer (TRUE), otherwise FALSE. If true, this will enable safe mode throttle values to be set during the IPL in mss_thermal_init.
+ </description>
+ <chipEcFeature>
+ <chip>
+ <name>ENUM_ATTR_NAME_CENTAUR</name>
+ <ec>
+ <value>0x20</value>
+ <test>GREATER_THAN_OR_EQUAL</test>
+ </ec>
+ </chip>
+ </chipEcFeature>
+ </attribute>
+
</attributes>
diff --git a/src/usr/hwpf/hwp/dram_initialization/mss_thermal_init/mss_thermal_init.C b/src/usr/hwpf/hwp/dram_initialization/mss_thermal_init/mss_thermal_init.C
index 5a3a090c4..0f9205648 100644
--- a/src/usr/hwpf/hwp/dram_initialization/mss_thermal_init/mss_thermal_init.C
+++ b/src/usr/hwpf/hwp/dram_initialization/mss_thermal_init/mss_thermal_init.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* */
/* p1 */
/* */
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: mss_thermal_init.C,v 1.10 2013/12/02 22:47:26 pardeik Exp $
+// $Id: mss_thermal_init.C,v 1.12 2014/01/06 19:49:16 pardeik Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/centaur/working/procedures/ipl/fapi/mss_thermal_init.C,v $
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2011
@@ -47,6 +47,8 @@
//------------------------------------------------------------------------------
// Version:| Author: | Date: | Comment:
//---------|----------|---------|-----------------------------------------------
+// 1.12 | pardeik |06-JAN-14| enable writing of safemode IPL throttles
+// 1.11 | pardeik |20-DEC-13| Only get sensor map attributes if a custom dimm
// 1.10 | pardeik |21-NOV-13| added support for dimm temperature sensor attributes
// 1.9 | pardeik |11-OCT-13| gerrit review updates to remove uneeded items
// 1.8 | pardeik |04-OCT-13| changes done from gerrit review
@@ -241,11 +243,14 @@ fapi::ReturnCode mss_thermal_init(const fapi::Target & i_target)
FAPI_INF("ATTR_EFF_CUSTOM_DIMM: %d", l_custom_dimm[l_mba_pos]);
}
- l_rc = FAPI_ATTR_GET(ATTR_VPD_CDIMM_SENSOR_MAP_PRIMARY, &i_target, l_cdimm_sensor_map_primary);
- if (l_rc) return l_rc;
- l_rc = FAPI_ATTR_GET(ATTR_VPD_CDIMM_SENSOR_MAP_SECONDARY, &i_target, l_cdimm_sensor_map_secondary);
- if (l_rc) return l_rc;
-
+ // Get attributes for dimm temperature sensor mapping for only a custom dimm so we don't get an error
+ if ((l_custom_dimm[0] == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_YES) || (l_custom_dimm[1] == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_YES))
+ {
+ l_rc = FAPI_ATTR_GET(ATTR_VPD_CDIMM_SENSOR_MAP_PRIMARY, &i_target, l_cdimm_sensor_map_primary);
+ if (l_rc) return l_rc;
+ l_rc = FAPI_ATTR_GET(ATTR_VPD_CDIMM_SENSOR_MAP_SECONDARY, &i_target, l_cdimm_sensor_map_secondary);
+ if (l_rc) return l_rc;
+ }
// Configure Centaur Thermal Cache
@@ -545,82 +550,39 @@ fapi::ReturnCode mss_thermal_init(const fapi::Target & i_target)
// Write the IPL Safe Mode Throttles
-// TODO: Enable once OCC writes the runtime memory throttles (SW227937)
-/*
- uint32_t l_safemode_throttle_n_per_mba;
- uint32_t l_safemode_throttle_n_per_chip;
- uint32_t l_safemode_throttle_d;
+// For centaur DD2 and above since OCC only writes runtime throttles for this
- l_rc = FAPI_ATTR_GET(ATTR_MRW_SAFEMODE_MEM_THROTTLE_NUMERATOR_PER_MBA, NULL, l_safemode_throttle_n_per_mba);
- if (l_rc) return l_rc;
- l_rc = FAPI_ATTR_GET(ATTR_MRW_SAFEMODE_MEM_THROTTLE_NUMERATOR_PER_CHIP, NULL, l_safemode_throttle_n_per_chip);
+ uint8_t l_enable_safemode_throttle = 0;
+ l_rc = FAPI_ATTR_GET(ATTR_CENTAUR_EC_ENABLE_SAFEMODE_THROTTLE, &i_target, l_enable_safemode_throttle);
if (l_rc) return l_rc;
- l_rc = FAPI_ATTR_GET(ATTR_MRW_SAFEMODE_MEM_THROTTLE_DENOMINATOR, NULL, l_safemode_throttle_d);
- if (l_rc) return l_rc;
-// write the N/M throttle control register
- for (uint8_t mba_index = 0; mba_index < l_target_mba_array.size(); mba_index++){
- l_rc = fapiGetScom(l_target_mba_array[mba_index], MBA01_MBA_FARB3Q_0x03010416, l_data);
- if (l_rc) return l_rc;
- l_ecmd_rc |= l_data.insertFromRight(l_safemode_throttle_n_per_mba, 0, 15);
- l_ecmd_rc |= l_data.insertFromRight(l_safemode_throttle_n_per_chip, 15, 16);
- l_ecmd_rc |= l_data.insertFromRight(l_safemode_throttle_d, 31, 14);
- if(l_ecmd_rc) {
- l_rc.setEcmdError(l_ecmd_rc);
- return l_rc;
- }
- l_rc = fapiPutScom(l_target_mba_array[mba_index], MBA01_MBA_FARB3Q_0x03010416, l_data);
- if (l_rc) return l_rc;
- }
-*/
-
-// Update the runtime throttle attributes if needed for non custom DIMMs since those run power tests
-// TODO: Enable once dimm_power_test is running and updating attributes (SW227941)
-/*
- uint32_t l_runtime_throttle_n_per_mba;
- uint32_t l_runtime_throttle_n_per_chip;
- uint32_t l_runtime_throttle_d;
- uint32_t l_dimm_power_test_throttle_n_per_mba;
- uint32_t l_dimm_power_test_throttle_n_per_chip;
- uint32_t l_dimm_power_test_throttle_d;
- for (uint8_t mba_index = 0; mba_index < l_target_mba_array.size(); mba_index++){
- if (l_custom_dimm[mba_index] == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_NO){
+ if (l_enable_safemode_throttle)
+ {
+ uint32_t l_safemode_throttle_n_per_mba;
+ uint32_t l_safemode_throttle_n_per_chip;
+ uint32_t l_throttle_d;
- l_rc = FAPI_ATTR_GET(ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_MBA, &l_target_mba_array[mba_index], l_runtime_throttle_n_per_mba);
- if (l_rc) return l_rc;
- l_rc = FAPI_ATTR_GET(ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_CHIP, &l_target_mba_array[mba_index], l_runtime_throttle_n_per_chip);
- if (l_rc) return l_rc;
- l_rc = FAPI_ATTR_GET(ATTR_MSS_RUNTIME_MEM_THROTTLE_DENOMINATOR, &l_target_mba_array[mba_index], l_runtime_throttle_d);
- if (l_rc) return l_rc;
- l_rc = FAPI_ATTR_GET(ATTR_MSS_DIMM_POWER_TEST_MEM_THROTTLE_NUMERATOR_PER_MBA, &l_target_mba_array[mba_index], l_dimm_power_test_throttle_n_per_mba);
- if (l_rc) return l_rc;
- l_rc = FAPI_ATTR_GET(ATTR_MSS_DIMM_POWER_TEST_MEM_THROTTLE_NUMERATOR_PER_CHIP, &l_target_mba_array[mba_index], l_dimm_power_test_throttle_n_per_chip);
- if (l_rc) return l_rc;
- l_rc = FAPI_ATTR_GET(ATTR_MSS_DIMM_POWER_TEST_MEM_THROTTLE_DENOMINATOR, &l_target_mba_array[mba_index], l_dimm_power_test_throttle_d);
+ l_rc = FAPI_ATTR_GET(ATTR_MRW_SAFEMODE_MEM_THROTTLE_NUMERATOR_PER_MBA, NULL, l_safemode_throttle_n_per_mba);
+ if (l_rc) return l_rc;
+ l_rc = FAPI_ATTR_GET(ATTR_MRW_SAFEMODE_MEM_THROTTLE_NUMERATOR_PER_CHIP, NULL, l_safemode_throttle_n_per_chip);
+ if (l_rc) return l_rc;
+ l_rc = FAPI_ATTR_GET(ATTR_MRW_MEM_THROTTLE_DENOMINATOR, NULL, l_throttle_d);
+ if (l_rc) return l_rc;
+// write the N/M throttle control register
+ for (uint8_t mba_index = 0; mba_index < l_target_mba_array.size(); mba_index++){
+ l_rc = fapiGetScom(l_target_mba_array[mba_index], MBA01_MBA_FARB3Q_0x03010416, l_data);
if (l_rc) return l_rc;
-// update the runtime throttle attributes with the dimm power test attributes if they are different
- if (
- (l_runtime_throttle_n_per_mba != l_dimm_power_test_throttle_n_per_mba)
- ||
- (l_runtime_throttle_n_per_chip != l_dimm_power_test_throttle_n_per_chip)
- ||
- (l_runtime_throttle_d != l_dimm_power_test_throttle_d)
- )
- {
- l_rc = FAPI_ATTR_SET(ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_MBA,
- &l_target_mba_array[mba_index], l_dimm_power_test_throttle_n_per_mba);
- if (l_rc) return l_rc;
- l_rc = FAPI_ATTR_SET(ATTR_MSS_RUNTIME_MEM_THROTTLE_NUMERATOR_PER_CHIP,
- &l_target_mba_array[mba_index], l_dimm_power_test_throttle_n_per_chip);
- if (l_rc) return l_rc;
- l_rc = FAPI_ATTR_SET(ATTR_MSS_RUNTIME_MEM_THROTTLE_DENOMINATOR,
- &l_target_mba_array[mba_index], l_dimm_power_test_throttle_d);
- if (l_rc) return l_rc;
-
+ l_ecmd_rc |= l_data.insertFromRight(l_safemode_throttle_n_per_mba, 0, 15);
+ l_ecmd_rc |= l_data.insertFromRight(l_safemode_throttle_n_per_chip, 15, 16);
+ l_ecmd_rc |= l_data.insertFromRight(l_throttle_d, 31, 14);
+ if(l_ecmd_rc) {
+ l_rc.setEcmdError(l_ecmd_rc);
+ return l_rc;
}
+ l_rc = fapiPutScom(l_target_mba_array[mba_index], MBA01_MBA_FARB3Q_0x03010416, l_data);
+ if (l_rc) return l_rc;
}
}
-*/
FAPI_INF("*** %s COMPLETE ***", procedure_name);
return l_rc;
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 18be2ef3b..d17a1a129 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
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* */
/* p1 */
/* */
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: mss_eff_config_thermal.C,v 1.23 2013/12/02 22:46:01 pardeik Exp $
+// $Id: mss_eff_config_thermal.C,v 1.24 2013/12/20 15:43:30 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,7 @@
//------------------------------------------------------------------------------
// Version:| Author: | Date: | Comment:
//---------|----------|---------|-----------------------------------------------
+// 1.24 | pardeik |20-DEC-13| only get power curve attributes if custom dimm
// 1.23 | pardeik |02-DEC-13| enable supplier power curve attributes
// 1.22 | pardeik |18-NOV-13| rename attributes (eff to vpd)
// 1.21 | pardeik |14-NOV-13| hardcode supplier power curves until lab is
@@ -444,32 +445,35 @@ extern "C" {
FAPI_ERR("Error getting attribute ATTR_EFF_NUM_DROPS_PER_PORT");
return rc;
}
- rc = FAPI_ATTR_GET(ATTR_CDIMM_VPD_MASTER_POWER_SLOPE,
- &target_chip, cdimm_master_power_slope);
- if (rc) {
- FAPI_ERR("Error getting attribute ATTR_CDIMM_VPD_MASTER_POWER_SLOPE");
- return rc;
- }
- rc = FAPI_ATTR_GET(ATTR_CDIMM_VPD_MASTER_POWER_INTERCEPT,
- &target_chip, cdimm_master_power_intercept);
- if (rc) {
- FAPI_ERR("Error getting attribute ATTR_CDIMM_VPD_MASTER_POWER_INTERCEPT");
- return rc;
- }
+ // Only get power curve values for custom dimms to prevent errors
+ if (custom_dimm == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_YES)
+ {
+ rc = FAPI_ATTR_GET(ATTR_CDIMM_VPD_MASTER_POWER_SLOPE,
+ &target_chip, cdimm_master_power_slope);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_CDIMM_VPD_MASTER_POWER_SLOPE");
+ return rc;
+ }
+ rc = FAPI_ATTR_GET(ATTR_CDIMM_VPD_MASTER_POWER_INTERCEPT,
+ &target_chip, cdimm_master_power_intercept);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_CDIMM_VPD_MASTER_POWER_INTERCEPT");
+ return rc;
+ }
- rc = FAPI_ATTR_GET(ATTR_CDIMM_VPD_SUPPLIER_POWER_SLOPE,
- &target_chip, cdimm_supplier_power_slope);
- if (rc) {
- FAPI_ERR("Error getting attribute ATTR_CDIMM_VPD_SUPPLIER_POWER_SLOPE");
- return rc;
- }
- rc = FAPI_ATTR_GET(ATTR_CDIMM_VPD_SUPPLIER_POWER_INTERCEPT,
- &target_chip, cdimm_supplier_power_intercept);
- if (rc) {
- FAPI_ERR("Error getting attribute ATTR_CDIMM_VPD_SUPPLIER_POWER_INTERCEPT");
- return rc;
+ rc = FAPI_ATTR_GET(ATTR_CDIMM_VPD_SUPPLIER_POWER_SLOPE,
+ &target_chip, cdimm_supplier_power_slope);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_CDIMM_VPD_SUPPLIER_POWER_SLOPE");
+ return rc;
+ }
+ rc = FAPI_ATTR_GET(ATTR_CDIMM_VPD_SUPPLIER_POWER_INTERCEPT,
+ &target_chip, cdimm_supplier_power_intercept);
+ if (rc) {
+ FAPI_ERR("Error getting attribute ATTR_CDIMM_VPD_SUPPLIER_POWER_INTERCEPT");
+ return rc;
+ }
}
-
rc = FAPI_ATTR_GET(ATTR_MRW_THERMAL_MEMORY_POWER_LIMIT,
NULL, dimm_thermal_power_limit);
if (rc) {
diff --git a/src/usr/hwpf/hwp/memory_attributes.xml b/src/usr/hwpf/hwp/memory_attributes.xml
index 1100f9e9f..830f0130d 100644
--- a/src/usr/hwpf/hwp/memory_attributes.xml
+++ b/src/usr/hwpf/hwp/memory_attributes.xml
@@ -5,7 +5,7 @@
<!-- -->
<!-- IBM CONFIDENTIAL -->
<!-- -->
-<!-- COPYRIGHT International Business Machines Corp. 2012,2013 -->
+<!-- COPYRIGHT International Business Machines Corp. 2012,2014 -->
<!-- -->
<!-- p1 -->
<!-- -->
@@ -3674,7 +3674,6 @@ will originates from VPD for custom DIMMs in the MW keyword byte 5 (MSB is on th
<odmChangeable/>
</attribute>
-<!-- NOT USED YET BY PROCEDURES
<attribute>
<id>ATTR_MRW_DIMM_POWER_CURVE_PERCENT_UPLIFT</id>
<targetType>TARGET_TYPE_SYSTEM</targetType>
@@ -3704,7 +3703,6 @@ will originates from VPD for custom DIMMs in the MW keyword byte 5 (MSB is on th
<odmVisable/>
<persistRuntime/>
</attribute>
--->
<attribute>
<id>ATTR_MSS_INIT_STATE</id>
OpenPOWER on IntegriCloud