diff options
author | Greg Still <stillgs@us.ibm.com> | 2017-10-04 22:20:53 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-10-24 18:01:07 -0400 |
commit | e999f9d51fb07ba06ea0b86de11b071742a64c0d (patch) | |
tree | 1ba3e8b28aaa9e96f0304878200249fba567b0b3 /src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.C | |
parent | 84dd6d8112d7329a21df2cfa56ea5f9d3341f2a8 (diff) | |
download | talos-hostboot-e999f9d51fb07ba06ea0b86de11b071742a64c0d.tar.gz talos-hostboot-e999f9d51fb07ba06ea0b86de11b071742a64c0d.zip |
VDM: p9_pstate_parameter_block check for VDM Large threshold < -32mV
- filters out old VPD parts (Nim 2.01) to just disable VDM instead of using bad
jump values
- check only applies for #W with version < 3 to allow for future proofing
- Added error log suppression EC attribute for < Nimbus 2.1.
Change-Id: Id91fc1f816b5a3da08730feb726a246d802429db
CQ: SW404757
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/47964
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Dev-Ready: Francesco A. Campisano <campisan@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Matt K. Light <mklight@us.ibm.com>
Reviewed-by: Francesco A. Campisano <campisan@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+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: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48044
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/p9_pstate_parameter_block.C')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.C | 94 |
1 files changed, 71 insertions, 23 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 a9e729670..e33862f81 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 @@ -53,24 +53,30 @@ //the value in this table are in Index format uint8_t g_GreyCodeIndexMapping [] = { -/* 0x00*/ 0, -/* 0x01*/ 1, -/* 0x02*/ 3, -/* 0x03*/ 2, -/* 0x04*/ 7, -/* 0x05*/ 6, -/* 0x06*/ 4, -/* 0x07*/ 5, -/* 0x08*/ 12, -/* 0x09*/ 12, -/* 0x0a*/ 12, -/* 0x0b*/ 12, -/* 0x0c*/ 8, -/* 0x0d*/ 9, -/* 0x0e*/ 11, -/* 0x0f*/ 10 +/* 0mV 0x00*/ 0, +/* - 8mV 0x01*/ 1, +/* -24mV 0x02*/ 3, +/* -16mV 0x03*/ 2, +/* -56mV 0x04*/ 7, +/* -48mV 0x05*/ 6, +/* -32mV 0x06*/ 4, +/* -40mV 0x07*/ 5, +/* -96mV 0x08*/ 12, +/* -96mV 0x09*/ 12, +/* -96mV 0x0a*/ 12, +/* -96mV 0x0b*/ 12, +/* -64mV 0x0c*/ 8, +/* -72mV 0x0d*/ 9, +/* -88mV 0x0e*/ 11, +/* -80mV 0x0f*/ 10 }; +// from above mapping +const uint8_t GREYCODE_INDEX_M32MV = 4; + +// #W version number where no special checks are needed. +const uint32_t FULLY_VALID_POUNDW_VERSION = 3; + fapi2::vdmData_t g_vpdData = {1, 2, { @@ -1932,7 +1938,7 @@ proc_get_vdm_parms (const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, } else { - FAPI_DBG(" VDM is diabled. Skipping VDM attribute accesses"); + FAPI_DBG(" VDM is disabled. Skipping VDM attribute accesses"); } fapi_try_exit: @@ -2087,7 +2093,7 @@ proc_get_ivrm_parms ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_targe } else { - FAPI_DBG(" IVRM is diabled. Skipping IVRM attribute accesses"); + FAPI_DBG(" IVRM is disabled. Skipping IVRM attribute accesses"); o_state->iv_ivrm_enabled = false; } @@ -3314,6 +3320,7 @@ proc_get_mvpd_poundw(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target fapi2::vdmData_t l_vdmBuf; uint8_t j = 0; uint8_t bucket_id = 0; + uint8_t version_id = 0; const uint16_t VDM_VOLTAGE_IN_MV = 512; const uint16_t VDM_GRANULARITY = 4; @@ -3361,8 +3368,9 @@ proc_get_mvpd_poundw(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target FAPI_TRY(p9_pm_get_poundw_bucket(l_eqChiplets[j], l_vdmBuf)); bucket_id = l_vdmBuf.bucketId; + version_id = l_vdmBuf.version; - FAPI_INF("#W chiplet = %u bucket id = %u", l_chipNum, bucket_id); + FAPI_INF("#W chiplet = %u bucket id = %u", l_chipNum, bucket_id, version_id); //if we match with the bucket id, then we don't need to continue if (i_poundv_bucketId == bucket_id) @@ -3408,6 +3416,45 @@ proc_get_mvpd_poundw(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target &l_tmp_data, sizeof(poundw_entry_t)); + // If the #W version is less than 3, validate Turbo VDM large threshold + // not larger than -32mV. This filters out parts that have bad VPD. If + // this check fails, log a recovered error, mark the VDMs disabled and + // break out of the reset of the checks. + uint32_t turbo_vdm_large_threshhold = + (o_data->poundw[TURBO].vdm_large_extreme_thresholds >> 4) & 0x0F; + FAPI_DBG("o_data->poundw[TURBO].vdm_large_thresholds 0x%X; grey code index %d; max grey code index %d", + turbo_vdm_large_threshhold, + g_GreyCodeIndexMapping[turbo_vdm_large_threshhold], + GREYCODE_INDEX_M32MV); + + if (version_id < FULLY_VALID_POUNDW_VERSION && + g_GreyCodeIndexMapping[turbo_vdm_large_threshhold] > GREYCODE_INDEX_M32MV) + { + o_state->iv_vdm_enabled = false; + + fapi2::ATTR_CHIP_EC_FEATURE_VDM_POUNDW_SUPPRESS_ERROR_Type l_suppress_pdw_error; + FAPI_ATTR_GET(fapi2::ATTR_CHIP_EC_FEATURE_VDM_POUNDW_SUPPRESS_ERROR, + i_target, + l_suppress_pdw_error); + + if (l_suppress_pdw_error) + { + FAPI_INF("VDM #W ERROR: Turbo Large Threshold less than -32mV. Indicates bad VPD so VDMs being disabled and pressing on"); + } + else + { + FAPI_ASSERT_NOEXIT(false, + fapi2::PSTATE_PB_POUND_W_VERY_INVALID_VDM_DATA(fapi2::FAPI2_ERRL_SEV_RECOVERED) + .set_CHIP_TARGET(i_target) + .set_TURBO_LARGE_THRESHOLD(o_data->poundw[TURBO].vdm_large_extreme_thresholds), + "VDM #W ERROR: Turbo Large Threshold less than -32mV. Indicates bad VPD so VDMs being disabled and pressing on"); + fapi2::current_err = fapi2::FAPI2_RC_SUCCESS; + } + + break; + + } + // Validate the WOF content is non-zero if WOF is enabled if (is_wof_enabled(i_target,o_state)) { @@ -3475,6 +3522,7 @@ proc_get_mvpd_poundw(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target FAPI_INF("NOMINAL.vdm_vid_compare_ivid %d",o_data->poundw[NOMINAL].vdm_vid_compare_ivid); FAPI_INF("TURBO.vdm_vid_compare_ivid %d",o_data->poundw[TURBO].vdm_vid_compare_ivid); FAPI_INF("ULTRA_TURBO.vdm_vid_compare_ivid %d",o_data->poundw[ULTRA].vdm_vid_compare_ivid); + //Validation of VPD Data // //If all VID compares are zero then use #V VDD voltage to populate local @@ -3546,10 +3594,10 @@ proc_get_mvpd_poundw(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target for (uint8_t p = 0; p < NUM_OP_POINTS; ++p) { - FAPI_INF("o_data->poundw[%d].vdm_overvolt_thresholds %d",p,(o_data->poundw[p].vdm_overvolt_small_thresholds >> 4) & 0x0F); - FAPI_INF("o_data->poundw[%d].vdm_small_thresholds %d",p,(o_data->poundw[p].vdm_overvolt_small_thresholds ) & 0x0F); - FAPI_INF("o_data->poundw[%d].vdm_large_thresholds %d",p,(o_data->poundw[p].vdm_large_extreme_thresholds >> 4) & 0x0F); - FAPI_INF("o_data->poundw[%d].vdm_extreme_thresholds %d",p,(o_data->poundw[p].vdm_large_extreme_thresholds) & 0x0F); + FAPI_INF("o_data->poundw[%d].vdm_overvolt_thresholds 0x%X",p,(o_data->poundw[p].vdm_overvolt_small_thresholds >> 4) & 0x0F); + FAPI_INF("o_data->poundw[%d].vdm_small_thresholds 0x%X",p,(o_data->poundw[p].vdm_overvolt_small_thresholds ) & 0x0F); + FAPI_INF("o_data->poundw[%d].vdm_large_thresholds 0x%X",p,(o_data->poundw[p].vdm_large_extreme_thresholds >> 4) & 0x0F); + FAPI_INF("o_data->poundw[%d].vdm_extreme_thresholds 0x%X",p,(o_data->poundw[p].vdm_large_extreme_thresholds) & 0x0F); VALIDATE_THRESHOLD_VALUES(((o_data->poundw[p].vdm_overvolt_small_thresholds >> 4) & 0x0F), // overvolt ((o_data->poundw[p].vdm_overvolt_small_thresholds) & 0x0F), //small ((o_data->poundw[p].vdm_large_extreme_thresholds >> 4) & 0x0F), //large |