diff options
author | Greg Still <stillgs@us.ibm.com> | 2017-07-10 00:38:21 -0500 |
---|---|---|
committer | Dean Sanner <dsanner@us.ibm.com> | 2017-07-14 08:35:39 -0400 |
commit | c0cb66e57706b3791562f84f9e469293f6e0a11e (patch) | |
tree | 5a220ef5db73c8c89ad20a1fa525c2724d119524 /src/import/chips/p9/procedures/hwp/pm | |
parent | b3535c2dbc21ac366e0582bfef06533923dac7dc (diff) | |
download | talos-hostboot-c0cb66e57706b3791562f84f9e469293f6e0a11e.tar.gz talos-hostboot-c0cb66e57706b3791562f84f9e469293f6e0a11e.zip |
PM: Delete deprecated attributes
- Complete the move to platform SYSTEM_*_DISABLED and HWP *_ENABLED attributes
- Added VDM DPLL response attribute to CME header mapping
- Updated review comments
Change-Id: If8f8e42fd94825623315e8a7c28105cca8c8c8b2
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42918
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Prem Shanker Jha <premjha2@in.ibm.com>
Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com>
Reviewed-by: Matt K. Light <mklight@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42920
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Tested-by: Dean Sanner <dsanner@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/pm')
4 files changed, 55 insertions, 30 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C index 3380235c3..92f809a34 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C @@ -856,10 +856,10 @@ fapi2::ReturnCode updateImageFlags( Homerlayout_t* i_pChipHomer, CONST_FAPI2_PRO FAPI_DBG("Resonant Clock Enabled : %s", attrVal ? "TRUE" : "FALSE" ); - FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_IVRMS_ENABLED, + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_IVRM_ENABLED, i_procTgt, attrVal), - "Error from FAPI_ATTR_GET for attribute ATTR_IVRMS_ENABLED" ); + "Error from FAPI_ATTR_GET for attribute ATTR_IVRM_ENABLED" ); if( attrVal ) { diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C index 08295568b..a3f7bf886 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C @@ -247,21 +247,20 @@ fapi2::ReturnCode p9_pm_stop_gpe_init( "ERROR: Failed to assert DPLL in mode 1 and set slew rate to 1"); } - uint8_t l_ivrms_attrval = 0; + uint8_t l_ivrm_attrval = 0; uint8_t l_vdm_attrval = 0; - FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SYSTEM_IVRMS_ENABLED, - FAPI_SYSTEM, - l_ivrms_attrval), - "Error from FAPI_ATTR_GET for attribute ATTR_SYSTEM_IVRMS_ENABLED" ); - + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_IVRM_ENABLED, + i_target, + l_ivrm_attrval), + "Error from FAPI_ATTR_GET for attribute ATTR_IVRM_ENABLED" ); - FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_VDM_ENABLE, - FAPI_SYSTEM, + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_VDM_ENABLED, + i_target, l_vdm_attrval), - "Error from FAPI_ATTR_GET for attribute ATTR_VDM_ENABLE" ); + "Error from FAPI_ATTR_GET for attribute ATTR_VDM_ENABLED" ); - if((l_vdm_attrval || l_ivrms_attrval)) + if((l_vdm_attrval || l_ivrm_attrval)) { //check vref calibration bit set or not //PERV_TP_KVREF_AND_VMEAS_MODE_STATUS_REG @@ -276,7 +275,7 @@ fapi2::ReturnCode p9_pm_stop_gpe_init( .set_CHIP(i_target) .set_VREF_CALIBRATION_ADDRESS(0x01020007) .set_IS_VDM_ENABLED(l_vdm_attrval) - .set_IS_IVRM_ENABLED(l_ivrms_attrval), + .set_IS_IVRM_ENABLED(l_ivrm_attrval), "ERROR; VREF calibration bit is not set %x", (uint32_t)l_data64); } diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.C b/src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.C index 246c8d789..7e0da1d14 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.C @@ -46,6 +46,7 @@ // ---------------------------------------------------------------------- #include <fapi2.H> #include <p9_pstate_parameter_block.H> +#include <p9_hcd_memmap_base.H> #include "p9_pm_get_poundw_bucket.H" #include "p9_resclk_defines.H" #include <attribute_ids.H> @@ -915,9 +916,7 @@ FAPI_INF("%-60s = 0x%08x %u", #attr_name, io_attr->attr_assign, io_attr->attr_as DATABLOCK_GET_ATTR(ATTR_SYSTEM_IVRM_DISABLE, FAPI_SYSTEM, attr_system_ivrm_disable); DATABLOCK_GET_ATTR(ATTR_SYSTEM_WOF_DISABLE, FAPI_SYSTEM, attr_system_wof_disable); DATABLOCK_GET_ATTR(ATTR_SYSTEM_VDM_DISABLE, FAPI_SYSTEM, attr_system_vdm_disable); - DATABLOCK_GET_ATTR(ATTR_DPLL_DYNAMIC_FMAX_ENABLE, FAPI_SYSTEM, attr_dpll_dynamic_fmax_enable); - DATABLOCK_GET_ATTR(ATTR_DPLL_DYNAMIC_FMIN_ENABLE, FAPI_SYSTEM, attr_dpll_dynamic_fmin_enable); - DATABLOCK_GET_ATTR(ATTR_DPLL_DROOP_PROTECT_ENABLE, FAPI_SYSTEM, attr_dpll_droop_protect_enable); + DATABLOCK_GET_ATTR(ATTR_DPLL_VDM_RESPONSE, FAPI_SYSTEM, attr_dpll_vdm_response); DATABLOCK_GET_ATTR(ATTR_SYSTEM_RESCLK_DISABLE, FAPI_SYSTEM, attr_resclk_disable); DATABLOCK_GET_ATTR(ATTR_CHIP_EC_FEATURE_WOF_NOT_SUPPORTED, i_target, attr_dd_wof_not_supported); DATABLOCK_GET_ATTR(ATTR_CHIP_EC_FEATURE_VDM_NOT_SUPPORTED, i_target, attr_dd_vdm_not_supported); @@ -1914,9 +1913,9 @@ proc_get_ivrm_parms ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_targe // Indicate that IVRM is good to be enabled (or not) FAPI_INF(" NOTE: This level of code is forcing the iVRM to OFF"); { - fapi2::ATTR_IVRMS_ENABLED_Type l_ivrm_enabled = - (fapi2::ATTR_IVRMS_ENABLED_Type)fapi2::ENUM_ATTR_IVRMS_ENABLED_FALSE; - FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_IVRMS_ENABLED, i_target, l_ivrm_enabled)); + fapi2::ATTR_IVRM_ENABLED_Type l_ivrm_enabled = + (fapi2::ATTR_IVRM_ENABLED_Type)fapi2::ENUM_ATTR_IVRM_ENABLED_FALSE; + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_IVRM_ENABLED, i_target, l_ivrm_enabled)); } } else @@ -3591,7 +3590,7 @@ p9_pstate_set_global_feature_attributes(const fapi2::Target<fapi2::TARGET_TYPE_P (fapi2::ATTR_VDM_ENABLED_Type)fapi2::ENUM_ATTR_VDM_ENABLED_FALSE; fapi2::ATTR_IVRM_ENABLED_Type l_ivrm_enabled = - (fapi2::ATTR_IVRMS_ENABLED_Type)fapi2::ENUM_ATTR_IVRMS_ENABLED_FALSE; + (fapi2::ATTR_IVRM_ENABLED_Type)fapi2::ENUM_ATTR_IVRM_ENABLED_FALSE; fapi2::ATTR_WOF_ENABLED_Type l_wof_enabled = (fapi2::ATTR_WOF_ENABLED_Type)fapi2::ENUM_ATTR_WOF_ENABLED_FALSE; @@ -3613,7 +3612,7 @@ p9_pstate_set_global_feature_attributes(const fapi2::Target<fapi2::TARGET_TYPE_P if (i_state.iv_ivrm_enabled) { - l_ivrm_enabled = (fapi2::ATTR_IVRMS_ENABLED_Type)fapi2::ENUM_ATTR_IVRMS_ENABLED_TRUE; + l_ivrm_enabled = (fapi2::ATTR_IVRM_ENABLED_Type)fapi2::ENUM_ATTR_IVRM_ENABLED_TRUE; } if (i_state.iv_wof_enabled) @@ -3624,7 +3623,7 @@ p9_pstate_set_global_feature_attributes(const fapi2::Target<fapi2::TARGET_TYPE_P FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_PSTATES_ENABLED, i_target, l_ps_enabled)); FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_RESCLK_ENABLED, i_target, l_resclk_enabled)); FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_VDM_ENABLED, i_target, l_vdm_enabled)); - FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_IVRMS_ENABLED, i_target, l_ivrm_enabled)); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_IVRM_ENABLED, i_target, l_ivrm_enabled)); FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_WOF_ENABLED, i_target, l_wof_enabled)); @@ -3635,11 +3634,41 @@ p9_pstate_set_global_feature_attributes(const fapi2::Target<fapi2::TARGET_TYPE_P l_data16.insertFromRight<0, 1>(l_resclk_enabled); l_data16.insertFromRight<1, 1>(l_ivrm_enabled); - l_data16.insertFromRight<2, 1>(l_wof_enabled); + l_data16.insertFromRight<2, 1>(l_vdm_enabled); + l_data16.insertFromRight<3, 1>(l_wof_enabled); - l_data16.insertFromRight<3, 1>(attr.attr_dpll_dynamic_fmax_enable); - l_data16.insertFromRight<4, 1>(attr.attr_dpll_dynamic_fmin_enable); - l_data16.insertFromRight<5, 1>(attr.attr_dpll_droop_protect_enable); + + // DROOP_PROTECT -> DPLL Mode 3 + // DROOP_PROTECT_OVERVOLT -> DPLL Mode 3.5 + // DYNAMIC -> DPLL Mode 4 + // DYNAMIC_PROTECT -> DPLL Mode 5 + + // enable_fmin enable_fmax enable_jump + // DPLL Mode 2 0 0 0 + // DPLL Mode 3 0 0 1 + // DPLL Mode 4 X 1 0 + // DPLL Mode 4 1 X 0 + // DPLL Mode 3.5 0 1 1 + // DPLL Mode 5 1 X 1 + + switch (attr.attr_dpll_vdm_response) + { + case fapi2::ENUM_ATTR_DPLL_VDM_RESPONSE_DROOP_PROTECT: + l_data16 |= CME_QM_FLAG_SYS_JUMP_PROTECT; + break; + case fapi2::ENUM_ATTR_DPLL_VDM_RESPONSE_DROOP_PROTECT_OVERVOLT: + l_data16 |= CME_QM_FLAG_SYS_DYN_FMAX_ENABLE; + l_data16 |= CME_QM_FLAG_SYS_JUMP_PROTECT; + break; + case fapi2::ENUM_ATTR_DPLL_VDM_RESPONSE_DYNAMIC: + l_data16 |= CME_QM_FLAG_SYS_DYN_FMIN_ENABLE; + l_data16 |= CME_QM_FLAG_SYS_DYN_FMAX_ENABLE; + break; + case fapi2::ENUM_ATTR_DPLL_VDM_RESPONSE_DYNAMIC_PROTECT: + l_data16 |= CME_QM_FLAG_SYS_DYN_FMIN_ENABLE; + l_data16 |= CME_QM_FLAG_SYS_JUMP_PROTECT; + break; + } o_qm_flags->value = revle16(l_data16); diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.H b/src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.H index a758f1e1d..1f5e8e4dc 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.H +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.H @@ -238,10 +238,7 @@ typedef struct uint32_t attr_tdp_rdp_current_factor; uint8_t attr_resclk_disable; - uint8_t attr_dpll_dynamic_fmax_enable; - uint8_t attr_dpll_dynamic_fmin_enable; - uint8_t attr_dpll_droop_protect_enable; - + uint8_t attr_dpll_vdm_response; uint8_t attr_nest_leakage_percent; // Control attributes |