summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2018-02-14 22:41:57 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-02-15 17:21:51 -0500
commit11cb66583553b58be26ca70d0b132cadcb77b84d (patch)
tree8f524cb2743e1590586a1b3f93eb977b65e939cd /src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C
parenta7311993a7c8804a34a72856ae5312a31ceb5177 (diff)
downloadtalos-hostboot-11cb66583553b58be26ca70d0b132cadcb77b84d.tar.gz
talos-hostboot-11cb66583553b58be26ca70d0b132cadcb77b84d.zip
Fix VPD lookup in Firmware boots
The bucket checks are not working in firmware boots because the VPD lookup isn't done until a valid pointer is passed in. Change-Id: I08d58a2cc77f706985ea49b90b1df74a9a863a29 CQ: SW415931 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54091 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Dev-Ready: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54095 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/memory/lib/freq/sync.C')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C b/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C
index 00748ee14..389a94551 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C
@@ -366,8 +366,9 @@ fapi2::ReturnCode vpd_supported_freqs( const fapi2::Target<fapi2::TARGET_TYPE_MC
mss::c_str(p), l_vpd_info.iv_freq_mhz, l_vpd_info.iv_rank_count_dimm_0, l_vpd_info.iv_rank_count_dimm_1);
// In order to retrieve the VPD contents we first need the keyword size.
- // If we are unable to retrieve the keyword size then this speed isn't supported in the VPD
- // and we skip to the next possible speed bin.
+ // If we are unable to retrieve the keyword size then this speed isn't
+ // supported in the VPD in Cronus (but not FW) and we skip to the next
+ // possible speed bin.
if( fapi2::getVPD(mcs, l_vpd_info, nullptr) != fapi2::FAPI2_RC_SUCCESS )
{
FAPI_INF("Couldn't retrieve MR size from VPD for this config %s -- skipping freq %d MT/s", mss::c_str(p), freq );
@@ -382,6 +383,7 @@ fapi2::ReturnCode vpd_supported_freqs( const fapi2::Target<fapi2::TARGET_TYPE_MC
o_vpd_supported_freqs.erase(l_it);
}
+ fapi2::current_err = fapi2::FAPI2_RC_SUCCESS;
continue;
}
@@ -394,13 +396,24 @@ fapi2::ReturnCode vpd_supported_freqs( const fapi2::Target<fapi2::TARGET_TYPE_MC
"VPD MR keyword size retrieved: %d, is larger than max: %d for %s",
l_vpd_info.iv_size, mss::VPD_KEYWORD_MAX, mss::c_str(i_target));
- // If we are here then we should have a valid frequency selected from polling the VPD keyword size above.
- // A hard-fail here means something is wrong and we want to return current_err instead of ignoring it.
- // We turn on FFDC logging here because this is a real fail if we can't read valid VPD, we don't want
- // to return a useless FAPI2_RC_FALSE that FW doesn't know what to do with.
- l_vpd_info.iv_is_config_ffdc_enabled = true;
- FAPI_TRY( fapi2::getVPD(mcs, l_vpd_info, &(l_mr_blob[0])),
- "Failed to retrieve VPD data for %s", mss::c_str(mcs) );
+ // Firmware doesn't do the VPD lookup in the size check so repeat the logic here
+ if( fapi2::getVPD(mcs, l_vpd_info, &(l_mr_blob[0])) != fapi2::FAPI2_RC_SUCCESS )
+ {
+ FAPI_INF("Couldn't retrieve MR data from VPD for this config %s -- skipping freq %d MT/s", mss::c_str(p), freq );
+
+ // If we added a freq that was supported in one MCA, but isn't supported for
+ // another MCA under the same MCBIST (such as one port running single drop and another dual drop),
+ // we remove it from the VPD supported freq list.
+ auto l_it = std::find(o_vpd_supported_freqs.begin(), o_vpd_supported_freqs.end(), freq);
+
+ if( l_it != o_vpd_supported_freqs.end() )
+ {
+ o_vpd_supported_freqs.erase(l_it);
+ }
+
+ fapi2::current_err = fapi2::FAPI2_RC_SUCCESS;
+ continue;
+ }
// Add non-repeating supported freqs
auto l_it = std::find(o_vpd_supported_freqs.begin(), o_vpd_supported_freqs.end(), freq);
@@ -415,6 +428,7 @@ fapi2::ReturnCode vpd_supported_freqs( const fapi2::Target<fapi2::TARGET_TYPE_MC
}// mca
}//mcs
+
std::sort( o_vpd_supported_freqs.begin(), o_vpd_supported_freqs.end() );
return fapi2::FAPI2_RC_SUCCESS;
OpenPOWER on IntegriCloud