Skip to content

Commit

Permalink
PM: Fix double biases value into safe mode frequency
Browse files Browse the repository at this point in the history
- Removed the in-place biasing of the VPD operating point structure that led
  to compounding when non-zero.

Key_Cronus_Test=PM_REGRESS

Change-Id: I5108cd633a849a292d1eef3aee5fef22c5cef62f
CQ: SW434117
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60932
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60933
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
stillgs authored and dcrowell77 committed Jun 25, 2018
1 parent 4d9e273 commit e95497e
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/import/chips/p9/procedures/hwp/pm/p9_setup_evid.C
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ compute_boot_safe(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
fapi2::ReturnCode l_rc;

uint32_t attr_mvpd_poundv[PV_D][PV_W];
uint32_t attr_mvpd_poundv_biased[PV_D][PV_W];
uint32_t valid_pdv_points;
uint8_t present_chiplets;

Expand Down Expand Up @@ -173,8 +174,21 @@ compute_boot_safe(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
attrs->proc_dpll_divider = 8;
}

FAPI_DBG("Copy to Bias array");

for (int i = 0; i < NUM_OP_POINTS; i++)
{
for (int d = 0; d < PV_D; ++d)
{
for (int w = 0; w < PV_W; ++w)
{
attr_mvpd_poundv_biased[d][w] = attr_mvpd_poundv[d][w];
}
}
}

// Apply Bias values
FAPI_TRY(proc_get_extint_bias(attr_mvpd_poundv,
FAPI_TRY(proc_get_extint_bias(attr_mvpd_poundv_biased,
attrs, l_vpdbias),
"Bias application function failed");

Expand Down Expand Up @@ -255,13 +269,12 @@ compute_boot_safe(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
else
{
FAPI_INF("VCS boot voltage override not set, using VPD value and correcting for applicable load line setting");
uint32_t l_int_vcs_mv = (attr_mvpd_poundv[POWERSAVE][VPD_PV_VCS_MV]);
uint32_t l_ics_ma = (attr_mvpd_poundv[POWERSAVE][VPD_PV_ICS_100MA]) * 100;
uint32_t l_int_vcs_mv = (attr_mvpd_poundv_biased[POWERSAVE][VPD_PV_VCS_MV]);
uint32_t l_ics_ma = (attr_mvpd_poundv_biased[POWERSAVE][VPD_PV_ICS_100MA]) * 100;

uint32_t l_ext_vcs_mv = sysparm_uplift(l_int_vcs_mv,
l_ics_ma,
attrs->r_loadline_vcs_uohm,

attrs->r_distloss_vcs_uohm,
attrs->vrm_voffset_vcs_uv);

Expand All @@ -287,8 +300,8 @@ compute_boot_safe(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
else
{
FAPI_INF("VDN boot voltage override not set, using VPD value and correcting for applicable load line setting");
uint32_t l_int_vdn_mv = (attr_mvpd_poundv[POWERBUS][VPD_PV_VDN_MV]);
uint32_t l_idn_ma = (attr_mvpd_poundv[POWERBUS][VPD_PV_IDN_100MA]) * 100;
uint32_t l_int_vdn_mv = (attr_mvpd_poundv_biased[POWERBUS][VPD_PV_VDN_MV]);
uint32_t l_idn_ma = (attr_mvpd_poundv_biased[POWERBUS][VPD_PV_IDN_100MA]) * 100;
// Returns revle32
uint32_t l_ext_vdn_mv = sysparm_uplift(l_int_vdn_mv,
l_idn_ma,
Expand Down

0 comments on commit e95497e

Please sign in to comment.