From e95497ee0e43afa23b012ff4b1c400ef0dc0ace7 Mon Sep 17 00:00:00 2001 From: Greg Still Date: Tue, 19 Jun 2018 22:36:10 -0500 Subject: PM: Fix double biases value into safe mode frequency - 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 Tested-by: Hostboot CI Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60933 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- .../chips/p9/procedures/hwp/pm/p9_setup_evid.C | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/import') diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_setup_evid.C b/src/import/chips/p9/procedures/hwp/pm/p9_setup_evid.C index d52409657..f18c220a2 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_setup_evid.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_setup_evid.C @@ -111,6 +111,7 @@ compute_boot_safe(const fapi2::Target& 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; @@ -173,8 +174,21 @@ compute_boot_safe(const fapi2::Target& 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"); @@ -255,13 +269,12 @@ compute_boot_safe(const fapi2::Target& 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); @@ -287,8 +300,8 @@ compute_boot_safe(const fapi2::Target& 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, -- cgit v1.2.1