summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.H
diff options
context:
space:
mode:
authorBrian Silver <bsilver@us.ibm.com>2016-09-18 13:25:33 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2016-09-30 15:29:00 -0400
commit3ec21604a358d090e443facd69db44bf45dcc8f2 (patch)
treefafc41f48d3b39855d6b89e5c3d91fc06a9b6538 /src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.H
parent3b885ddb9fbecddb0ec9f6c5bf1dbc43ff0049a9 (diff)
downloadtalos-hostboot-3ec21604a358d090e443facd69db44bf45dcc8f2.tar.gz
talos-hostboot-3ec21604a358d090e443facd69db44bf45dcc8f2.zip
Change p9_mss_freq_system to write attributes, errors for Cronus
Honor the maximum support frequencies based on rank configs Remove the MEMVPD_FREQ attribute Fixup VPD tooling and accessors for new freq attrs Fix test case handling of master ranks Fix handling of empty MCS in Cronus Change-Id: I669ad0e81454f12368b484e826461ee76f7b9079 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29878 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29907 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.H')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.H32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.H b/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.H
index 7e1862bd2..4050b06c2 100644
--- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.H
+++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.H
@@ -98,26 +98,30 @@ fapi_try_exit:
///
/// @brief Sets frequency attributes
/// @param[in] i_target the controller target
-/// @param[in] i_dimm_freq final selected dimm freq in MT/s
+/// @param[in] i_dimm_freq vector of freqs selected dimm freq in MT/s
/// @return FAPI2_RC_SUCCESS iff ok
-/// @note P9 Nimbus will support DMI speeds 16GB and 9.6GB
///
-inline fapi2::ReturnCode set_freq_attrs(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target,
- uint64_t i_dimm_freq)
+inline fapi2::ReturnCode set_freq_attrs(const fapi2::Target<fapi2::TARGET_TYPE_MCBIST>& i_target,
+ const std::vector<uint64_t>& i_dimm_freq)
{
- // TK - RIT, needsto be corrected
- uint64_t l_nest_freq = 2;
- const auto l_mcbist = mss::find_target<fapi2::TARGET_TYPE_MCBIST>(i_target);
+ // Find the minimum (but non-0) freq in the vector. If we see all 0's we'll write a 0. However,
+ // we shouldn't as the caller should have been dealing with no DIMM before we got here.
+ uint64_t l_final_freq = UINT64_MAX;
- FAPI_INF("Setting freq attrs for %s", mss::c_str(i_target));
+ for (const auto l_freq : i_dimm_freq)
+ {
+ if (l_freq != 0)
+ {
+ l_final_freq = std::min(l_final_freq, l_freq);
+ }
+ }
+
+ // If we saw all 0's, write a 0.
+ l_final_freq = l_final_freq == UINT64_MAX ? 0 : l_final_freq;
- // TK
- //Update for P9, what do we do w/setting nest freq? - AAM
- // how do we select nest freq if we even have to??
- FAPI_TRY( FAPI_ATTR_SET(fapi2::ATTR_MSS_NEST_CAPABLE_FREQUENCIES, l_mcbist, l_nest_freq),
- "Failed to set nest capable frequencies attribute" );
+ FAPI_INF( "Final Chosen Frequency: %d (%s)", l_final_freq, mss::c_str(i_target) );
- FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_MSS_FREQ, l_mcbist, i_dimm_freq),
+ FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_MSS_FREQ, i_target, l_final_freq),
"Failed to set mss freq attribute");
fapi_try_exit:
OpenPOWER on IntegriCloud