Skip to content

Commit

Permalink
PM: Fix WOV Enablement
Browse files Browse the repository at this point in the history
	WOV- Fixes Under/Overvolt default enablement

	Key_Cronus_Test=PM_REGRESS

Change-Id: I1e04df510120c21406219beac04ba02441ee25da
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78108
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com>
Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78125
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>
  • Loading branch information
rbatraAustinIBM authored and dcrowell77 committed Jun 11, 2019
1 parent 245047c commit 2a6adcb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
33 changes: 15 additions & 18 deletions src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.C
Original file line number Diff line number Diff line change
Expand Up @@ -480,22 +480,22 @@ fapi2::ReturnCode PlatPmPPB::set_global_feature_attributes()
(fapi2::ATTR_WOV_OVERV_ENABLED_Type)fapi2::ENUM_ATTR_WOV_OVERV_ENABLED_FALSE;


iv_wov_underv_enabled = false;
iv_wov_overv_enabled = false;
//Check whether to enable WOV Undervolting. WOV can
//only be enabled if VDMs are enabled
if (is_wov_underv_enabled() &&
is_vdm_enabled())
if (!is_wov_underv_enabled() ||
!is_vdm_enabled())
{
iv_wov_underv_enabled = true;
FAPI_DBG("UNDERV_DISABLED")
iv_wov_underv_enabled = false;
}

//Check whether to enable WOV Overvolting. WOV can
//only be enabled if VDMs are enabled
if (is_wov_overv_enabled() &&
is_vdm_enabled())
if (!is_wov_overv_enabled() ||
!is_vdm_enabled())
{
iv_wov_overv_enabled = true;
FAPI_DBG("OVERV_DISABLED")
iv_wov_overv_enabled = false;
}

if (iv_pstates_enabled)
Expand Down Expand Up @@ -2143,8 +2143,8 @@ FAPI_INF("%-60s = 0x%08x %d", #attr_name, iv_attrs.attr_assign, iv_attrs.attr_as
DATABLOCK_GET_ATTR(ATTR_PROC_DPLL_DIVIDER, iv_procChip, proc_dpll_divider);
// AVSBus ... needed by p9_setup_evid
//Get WOV attributes
DATABLOCK_GET_ATTR(ATTR_SYSTEM_WOV_OVERV_DISABLE, FAPI_SYSTEM,attr_wov_overv_enable);
DATABLOCK_GET_ATTR(ATTR_SYSTEM_WOV_UNDERV_DISABLE, FAPI_SYSTEM,attr_wov_underv_enable);
DATABLOCK_GET_ATTR(ATTR_SYSTEM_WOV_OVERV_DISABLE, FAPI_SYSTEM,attr_wov_overv_disable);
DATABLOCK_GET_ATTR(ATTR_SYSTEM_WOV_UNDERV_DISABLE, FAPI_SYSTEM,attr_wov_underv_disable);
DATABLOCK_GET_ATTR(ATTR_WOV_UNDERV_FORCE, iv_procChip,attr_wov_underv_force);
DATABLOCK_GET_ATTR(ATTR_WOV_SAMPLE_125US, iv_procChip,attr_wov_sample_125us);
DATABLOCK_GET_ATTR(ATTR_WOV_MAX_DROOP_10THPCT, iv_procChip,attr_wov_max_droop_pct);
Expand Down Expand Up @@ -3809,13 +3809,10 @@ fapi2::ReturnCode PlatPmPPB::get_mvpd_poundW (void)
is_wov_underv_enabled() == 1 )
{
iv_wov_underv_enabled = true;
FAPI_INF("UNDERV_TESTED or UNDERV_FORCE set to 1");
}

else
{
FAPI_DBG("UNDERV_TESTED or UNDERV_FORCE set to 1");
} else {
iv_wov_underv_enabled = false;
FAPI_INF("UNDERV_TESTED and UNDERV_FORCE set to 0");
FAPI_DBG("UNDERV_TESTED and UNDERV_FORCE set to 0");
}


Expand Down Expand Up @@ -4400,7 +4397,7 @@ fapi_try_exit:
///////////////////////////////////////////////////////////
bool PlatPmPPB::is_wov_underv_enabled()
{
return(!(iv_attrs.attr_wov_underv_enable) &&
return(!(iv_attrs.attr_wov_underv_disable) &&
iv_wov_underv_enabled)
? true : false;
}
Expand All @@ -4411,7 +4408,7 @@ bool PlatPmPPB::is_wov_underv_enabled()
///////////////////////////////////////////////////////////
bool PlatPmPPB::is_wov_overv_enabled()
{
return (!(iv_attrs.attr_wov_overv_enable) &&
return (!(iv_attrs.attr_wov_overv_disable) &&
iv_wov_overv_enabled)
? true : false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ typedef struct
uint32_t proc_dpll_divider;

///Undervolt and Overvolt Attributes
uint8_t attr_wov_underv_enable;
uint8_t attr_wov_overv_enable;
uint8_t attr_wov_underv_disable;
uint8_t attr_wov_overv_disable;
uint8_t attr_wov_underv_force;
uint32_t attr_wov_sample_125us;
uint32_t attr_wov_max_droop_pct;
Expand Down

0 comments on commit 2a6adcb

Please sign in to comment.