diff options
author | Prachi Gupta <pragupta@us.ibm.com> | 2015-03-10 10:53:53 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-03-10 21:50:04 -0500 |
commit | 63efd6522ce1b4bf762011b9c5d697ecc8c18f91 (patch) | |
tree | d4c5a2e52e64a147849cdd84acb8adc4b0d81c86 /src/usr/hwpf | |
parent | ce389634b92109124738b46a62a9c8ac2c3e442c (diff) | |
download | blackbird-hostboot-63efd6522ce1b4bf762011b9c5d697ecc8c18f91.tar.gz blackbird-hostboot-63efd6522ce1b4bf762011b9c5d697ecc8c18f91.zip |
SW291438: Tuleta: FW830 dynamic VID support breaks 1.1V cdimms
Change-Id: I38a5695d460adc368589a215b295f32f91210b25
CQ:SW291438
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15630
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: PRACHI GUPTA <pragupta@us.ibm.com>
Tested-by: PRACHI GUPTA <pragupta@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16269
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf')
-rw-r--r-- | src/usr/hwpf/hwp/centaur_ec_attributes.xml | 24 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/mc_config/mss_volt/mss_volt_vddr_offset.C | 39 |
2 files changed, 55 insertions, 8 deletions
diff --git a/src/usr/hwpf/hwp/centaur_ec_attributes.xml b/src/usr/hwpf/hwp/centaur_ec_attributes.xml index 52e7acdc0..8533e4b82 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 $ --> <!-- --> <!-- OpenPOWER HostBoot Project --> <!-- --> -<!-- Contributors Listed Below - COPYRIGHT 2012,2014 --> +<!-- Contributors Listed Below - COPYRIGHT 2012,2015 --> <!-- [+] International Business Machines Corp. --> <!-- --> <!-- --> @@ -24,7 +24,7 @@ <!-- IBM_PROLOG_END_TAG --> <attributes> <!-- ********************************************************************* --> - <!-- $Id: centaur_ec_attributes.xml,v 1.30 2014/10/30 14:50:22 jprispol Exp $ --> + <!-- $Id: centaur_ec_attributes.xml,v 1.31 2015/01/14 16:30:24 jdsloat Exp $ --> <attribute> <id>ATTR_CENTAUR_EC_ENABLE_TRACE_ARRAY_CLKSTOP_ON_XSTOP_FW624741</id> <targetType>TARGET_TYPE_MEMBUF_CHIP</targetType> @@ -460,4 +460,22 @@ The getMBvpdSlopeInterceptData Attribute Accessor, if it does not find a matchin </chipEcFeature> </attribute> + <attribute> + <id>ATTR_CENTAUR_EC_DISABLE_VDDR_DYNAMIC_VID</id> + <targetType>TARGET_TYPE_MEMBUF_CHIP</targetType> + <description> + Set by the platform depending on EC less than DD2.0 (TRUE), otherwise FALSE. If true, mss_volt_vddr_offset will use the value from mss_volt instead of the calculated dynamic vid value, even if vddr dynamic vid is enabled in the MRW. Centaur DD1.X chips need vmem voltage to be at 1.35V. + </description> + <chipEcFeature> + <chip> + <name>ENUM_ATTR_NAME_CENTAUR</name> + <ec> + <value>0x20</value> + <test>LESS_THAN</test> + </ec> + </chip> + </chipEcFeature> + </attribute> + + </attributes> diff --git a/src/usr/hwpf/hwp/mc_config/mss_volt/mss_volt_vddr_offset.C b/src/usr/hwpf/hwp/mc_config/mss_volt/mss_volt_vddr_offset.C index 5468f3953..15540644c 100644 --- a/src/usr/hwpf/hwp/mc_config/mss_volt/mss_volt_vddr_offset.C +++ b/src/usr/hwpf/hwp/mc_config/mss_volt/mss_volt_vddr_offset.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -22,7 +22,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: mss_volt_vddr_offset.C,v 1.20 2014/10/06 15:56:56 sglancy Exp $ +// $Id: mss_volt_vddr_offset.C,v 1.24 2015/01/21 18:13:30 sglancy Exp $ /* File mss_volt_vddr_offset.C created by Stephen Glancy on Tue 20 May 2014. */ //------------------------------------------------------------------------------ @@ -45,6 +45,10 @@ //------------------------------------------------------------------------------ // Version:| Author: | Date: | Comment: //---------|----------|----------|----------------------------------------------- +// 1.24 | sglancy | 01/21/15 | Updated for addition of ATTR_CENTAUR_EC_DISABLE_VDDR_DYNAMIC_VID +// 1.23 | sglancy | 11/20/14 | Updated for rounding +// 1.22 | sglancy | 11/20/14 | Fixed compile issue +// 1.21 | sglancy | 11/19/14 | Fixed a truncation issue // 1.20 | sglancy | 10/06/14 | Added in checks for going over voltage limits // 1.19 | sglancy | 09/12/14 | Removed references to EFF attributes // 1.18 | sglancy | 09/11/14 | Fixed bugs and fixed typos @@ -99,9 +103,11 @@ fapi::ReturnCode mss_volt_vddr_offset(std::vector<fapi::Target> & i_targets) uint8_t dram_gen , cur_dram_gen; bool dram_gen_found = false; uint8_t enable, is_functional; + uint8_t ec_disable_attr; uint8_t num_non_functional = 0; uint8_t percent_uplift,percent_uplift_idle; uint32_t vddr_max_limit_mv; + uint32_t param_vddr_voltage_mv; std::vector<fapi::Target> l_mbaChiplets; std::vector<fapi::Target> l_dimm_targets; @@ -204,6 +210,29 @@ fapi::ReturnCode mss_volt_vddr_offset(std::vector<fapi::Target> & i_targets) return l_rc; } + //loops checks if any MC's have the disable attribute set, if so, set to MSS_VOLT value + //if not, continue with the code + for(uint32_t i = 0; i < i_targets.size();i++) { + //reads in the attribute + l_rc = FAPI_ATTR_GET(ATTR_CENTAUR_EC_DISABLE_VDDR_DYNAMIC_VID,&i_targets[i],ec_disable_attr); + if(l_rc) return l_rc; + //disable is set, read mss_volt and exit out of the code + if(ec_disable_attr) break; + } + + //disable is set, sets the enable attribute based upon MSS_VOLT attribute + if(ec_disable_attr) { + FAPI_INF("Found Centaur with EC disable attribute set. Setting ATTR_MSS_VDDR_OFFSET based upon ATTR_MSS_VOLT"); + //sets the output attributes + for(uint32_t i = 0; i< i_targets.size();i++) { + l_rc = FAPI_ATTR_GET(ATTR_MSS_VOLT,&i_targets[i],param_vddr_voltage_mv); + if(l_rc) return l_rc; + l_rc = FAPI_ATTR_SET(ATTR_MSS_VDDR_OFFSET,&i_targets[i],param_vddr_voltage_mv); + if(l_rc) return l_rc; + }//end for + return l_rc; + } + //gets the attributes and computes var_power_on based upon whether the DRAM type is DDR3 or DDR4 if(dram_gen == fapi::ENUM_ATTR_SPD_DRAM_DEVICE_TYPE_DDR3) { l_rc = FAPI_ATTR_GET(ATTR_MSS_DDR3_VDDR_SLOPE,NULL,volt_slope); @@ -319,12 +348,12 @@ fapi::ReturnCode mss_volt_vddr_offset(std::vector<fapi::Target> & i_targets) //found an active centaur //multiply by total number of active logical dimms if(is_functional == fapi::ENUM_ATTR_FUNCTIONAL_FUNCTIONAL) { - var_power_on_vddr += num_dimms_to_add*((vpd_master_power_slope*volt_util_active/10000+vpd_master_power_intercept)*num_logical_dimms*(100+percent_uplift)/100); + var_power_on_vddr += (int)(num_dimms_to_add*(((float)vpd_master_power_slope*volt_util_active/10000+vpd_master_power_intercept)*num_logical_dimms*(100+percent_uplift)/100)); FAPI_INF("var_power_on_vddr: %d cW vpd_master_power_slope: %d cW volt_util_active: %d per 10k vpd_master_power_intercept %d cW num_logical_dimms %d percent_uplift %d %%",var_power_on_vddr,vpd_master_power_slope,volt_util_active,vpd_master_power_intercept,num_logical_dimms,percent_uplift); } //centaur must be inactive else { - var_power_on_vddr += num_dimms_to_add*((vpd_master_power_slope*volt_util_inactive/10000+vpd_master_power_intercept)*num_logical_dimms*(100+percent_uplift_idle)/100); + var_power_on_vddr += (int)(num_dimms_to_add*(((float)vpd_master_power_slope*volt_util_inactive/10000+vpd_master_power_intercept)*num_logical_dimms*(100+percent_uplift_idle)/100)); FAPI_INF("var_power_on_vddr: %d cW vpd_master_power_slope: %d cW volt_util_inactive: %d per 10k vpd_master_power_intercept %d cW num_logical_dimms %d percent_uplift_idle %d %%",var_power_on_vddr,vpd_master_power_slope,volt_util_inactive,vpd_master_power_intercept,num_logical_dimms,percent_uplift_idle); } @@ -342,7 +371,7 @@ fapi::ReturnCode mss_volt_vddr_offset(std::vector<fapi::Target> & i_targets) FAPI_INF("var_power_on_vddr: %d cW volt_slope: %d uV/W volt_intercept: %d mV",var_power_on_vddr,volt_slope,volt_intercept); //computes and converts the voltage offset into mV - uint32_t param_vddr_voltage_mv = (500 + var_power_on_vddr*volt_slope/100) / 1000 + volt_intercept; + param_vddr_voltage_mv = (500 + var_power_on_vddr*volt_slope/100) / 1000 + volt_intercept; FAPI_INF("param_vddr_voltage_mv: %d mV",param_vddr_voltage_mv); //found that the VDDR voltage is over the maximum limit if(param_vddr_voltage_mv > vddr_max_limit_mv) { |