summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/pm
diff options
context:
space:
mode:
authorPrasad Bg Ranganath <prasadbgr@in.ibm.com>2019-01-11 00:26:47 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-01-25 10:34:36 -0600
commita3dae2881da39bde2b6c06e7c637e32dc1f2247c (patch)
treedfca6355efabff3814725b66bbb3f078f2fc8547 /src/import/chips/p9/procedures/hwp/pm
parent71bc706f27dff065d6a91c08c83c6ab5e8163143 (diff)
downloadtalos-hostboot-a3dae2881da39bde2b6c06e7c637e32dc1f2247c.tar.gz
talos-hostboot-a3dae2881da39bde2b6c06e7c637e32dc1f2247c.zip
PPB:Undervolting biasing: fix bug found in testing.
Key_Cronus_Test=PM_REGRESS RTC:203531 Change-Id: I900cb1d9a200e24845c349fa651ef40d3eb378a2 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70332 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70450 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>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/pm')
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.C32
1 files changed, 25 insertions, 7 deletions
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 23bdfc1e5..9428d1573 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
@@ -1747,10 +1747,18 @@ fapi_try_exit:
double
calc_bias(const int8_t i_value)
{
- double temp = 1.0 + ((BIAS_PCT_UNIT/100) * (double)i_value);
- FAPI_DBG(" calc_bias: input bias (in 1/2 percent) = %d; percent = %4.1f%% biased multiplier = %6.3f",
+ if (i_value)
+ {
+ double temp = 1.0 + ((BIAS_PCT_UNIT/100) * (double)i_value);
+ FAPI_DBG(" calc_bias: input bias (in 1/2 percent) = %d; percent = %4.1f%% biased multiplier = %6.3f",
i_value, (i_value*BIAS_PCT_UNIT), temp);
- return temp;
+ return temp;
+ }
+ else
+ {
+ return 1;
+ }
+
}
@@ -3644,7 +3652,10 @@ proc_get_mvpd_poundw(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target
uint8_t bucket_id = 0;
uint8_t version_id = 0;
const uint16_t VDM_VOLTAGE_IN_MV = 512;
+ const uint16_t MIN_VDM_VOLTAGE_IN_MV = 576;
const uint16_t VDM_GRANULARITY = 4;
+ uint32_t l_vdm_compare_raw_mv[NUM_OP_POINTS];
+ uint32_t l_vdm_compare_biased_mv[NUM_OP_POINTS];
const char* pv_op_str[NUM_OP_POINTS] = PV_OP_ORDER_STR;
@@ -3845,11 +3856,11 @@ proc_get_mvpd_poundw(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target
for (int i = 0; i < NUM_OP_POINTS; ++i)
{
- uint32_t l_mv = 512 + (o_data->poundw[i].vdm_vid_compare_ivid << 2);
+ l_vdm_compare_raw_mv[i] = VDM_VOLTAGE_IN_MV + (o_data->poundw[i].vdm_vid_compare_ivid << 2);
FAPI_INF("%10s vdm_vid_compare_ivid %3d => %d mv",
pv_op_str[i],
o_data->poundw[i].vdm_vid_compare_ivid,
- l_mv);
+ l_vdm_compare_raw_mv[i]);
}
//Validation of VPD Data
@@ -3993,8 +4004,15 @@ proc_get_mvpd_poundw(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target
for (uint8_t i = 0; i < NUM_OP_POINTS; i++)
{
l_pound_w_points[i] = calc_bias(l_bias_value[i]);
- o_data->poundw[i].vdm_vid_compare_ivid =
- (uint32_t)(o_data->poundw[i].vdm_vid_compare_ivid * l_pound_w_points[i]);
+
+ l_vdm_compare_biased_mv[i] = internal_ceil( (l_vdm_compare_raw_mv[i] * l_pound_w_points[i]));
+
+ if (l_vdm_compare_biased_mv[i] < MIN_VDM_VOLTAGE_IN_MV)
+ {
+ l_vdm_compare_biased_mv[i] = MIN_VDM_VOLTAGE_IN_MV;
+ }
+
+ o_data->poundw[i].vdm_vid_compare_ivid = (l_vdm_compare_biased_mv[i] - VDM_VOLTAGE_IN_MV) >> 2;
FAPI_INF("vdm_vid_compare_ivid %x %x, %x",
o_data->poundw[i].vdm_vid_compare_ivid,
OpenPOWER on IntegriCloud