diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2017-12-07 17:26:16 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-12-14 15:34:35 -0500 |
commit | c75929bb0e533ea8bd03f88949d3c07548ca696f (patch) | |
tree | b5f3bba8749c0641bbc83c4d86218d33a7dbc64a /src/import/chips | |
parent | 56a7903c3dff195f79b5d97e95c67b11c43ac1e1 (diff) | |
download | talos-hostboot-c75929bb0e533ea8bd03f88949d3c07548ca696f.tar.gz talos-hostboot-c75929bb0e533ea8bd03f88949d3c07548ca696f.zip |
Add Fallback Frequency for #V Bucket Selection
Created ATTR_FREQ_PB_MHZ_POUNDV_FALLBACK to handle a few cases
where modules were created with invalid #V for the frequency we
would like to run them at. The code will use the real powerbus
frequency to find the #V bucket (no change from current behavior)
but will fall back to the new attribute if no matches are found.
Change-Id: Ie15190ac092ca797a8a51d41eece7c4cd2d0f136
CQ: SW410357
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50677
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50684
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/chips')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.C | 40 | ||||
-rw-r--r-- | src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml | 22 |
2 files changed, 61 insertions, 1 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.C index ec6b75ef3..f004b9ba2 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.C @@ -53,11 +53,14 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( uint32_t l_tempVpdSize = 0; uint32_t l_vpdSize = 0; uint8_t l_eqChipUnitPos = 0; - uint8_t l_bucketId; + uint8_t l_bucketId = 0xFF; uint8_t l_bucketSize = 0; uint32_t l_sysNestFreq = 0; + uint32_t l_fallbackNestFreq = 0; fapi2::voltageBucketData_t* l_currentBucket = NULL; + fapi2::voltageBucketData_t* l_fallbackBucket = NULL; uint8_t l_numMatches = 0; + uint8_t l_numMatchesFallback = 0; uint16_t l_pbFreq = 0; fapi2::MvpdRecord lrpRecord = fapi2::MVPD_RECORD_LAST; @@ -191,6 +194,13 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( <fapi2::voltageBucketData_t*> (l_fullVpdData + POUNDV_BUCKET_OFFSET); + //see if we have a fall-back frequency to use if we don't + // get a match + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_FREQ_PB_MHZ_POUNDV_FALLBACK, + l_sysParent, + l_fallbackNestFreq)); + + for(int i = 0; i < NUM_BUCKETS; i++) { #ifndef _BIG_ENDIAN @@ -219,6 +229,26 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( l_currentBucket = &l_buckets[i]; } } + else if(l_pbFreq == l_fallbackNestFreq) + { + l_numMatchesFallback++; + + if(l_numMatchesFallback > 1) + { + FAPI_ERR("p9_pm_get_poundv_bucket_attr::" + " Multiple buckets (%d) reporting the same nest frequency" + " Fallback Nest = %d Bucket ID = %d, First Bucket = %d", + l_numMatchesFallback, + l_fallbackNestFreq, + (i + 1), + l_fallbackBucket); + + } + else + { + l_fallbackBucket = &l_buckets[i]; + } + } //save FFDC in case we fail l_bucketNestFreqs[i] = l_pbFreq; @@ -228,6 +258,14 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( { l_bucketId = l_currentBucket->bucketId; } + else if(l_numMatchesFallback == 1) + { + FAPI_ERR("p9_pm_get_poundv_bucket_attr::Invalid number of matching " + "nest freqs found for PBFreq=%d. Matches found = %d. But " + "did find a fallback match for Freq=%d", + l_sysNestFreq, l_numMatches, l_fallbackNestFreq ); + l_bucketId = l_fallbackBucket->bucketId; + } else { diff --git a/src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml index 7be6b4719..464c01d81 100644 --- a/src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml @@ -2191,4 +2191,26 @@ <overrideOnly/> </attribute> <!-- ********************************************************************* --> + <attribute> + <id>ATTR_FREQ_PB_MHZ_POUNDV_FALLBACK</id> + <targetType>TARGET_TYPE_SYSTEM</targetType> + <description> + The powerbus frequency that should be used to locate a valid #V bucket + in the processor Module VPD if the actual ATTR_FREQ_PB_MHZ value isn't + present. + </description> + <valueType>uint32</valueType> + <enum> + NO_FALLBACK = 0, + 1600 = 1600, + 1866 = 1866, + 2000 = 2000, + 2133 = 2133, + 2400 = 2400 + </enum> + <writeable/> + <platInit/> + <default>NO_FALLBACK</default> + </attribute> + <!-- ********************************************************************* --> </attributes> |