diff options
author | Brian Silver <bsilver@us.ibm.com> | 2016-09-18 13:25:33 -0500 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2016-09-30 15:29:00 -0400 |
commit | 3ec21604a358d090e443facd69db44bf45dcc8f2 (patch) | |
tree | fafc41f48d3b39855d6b89e5c3d91fc06a9b6538 /src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.H | |
parent | 3b885ddb9fbecddb0ec9f6c5bf1dbc43ff0049a9 (diff) | |
download | talos-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/lib/freq/sync.H')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.H | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.H b/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.H index 51a7fe83f..beae6c17a 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.H @@ -49,12 +49,6 @@ enum class speed_equality : uint8_t EQUAL_DIMM_SPEEDS = 1, }; -enum class sync_mode : uint8_t -{ - MC_NOT_IN_SYNC = 0, - MC_IN_SYNC = 1, -}; - /// /// @brief Retrieves a mapping of MSS frequency values per mcbist target /// @param[in] i_targets vector of controller targets @@ -84,13 +78,54 @@ bool deconfigure(const fapi2::Target<fapi2::TARGET_TYPE_MCBIST>& i_target, /// @param[in] i_nest_freq nest frequency /// @param[in] i_required_sync_mode system policy to enforce synchronous mode /// @param[out] o_selected_sync_mode final synchronous mode +/// @param[out] o_selected_freq final freq selected, only valid if final sync mode is in-sync /// @return FAPI2_RC_SUCCESS iff successful /// fapi2::ReturnCode select_sync_mode(const std::map< fapi2::Target<fapi2::TARGET_TYPE_MCBIST>, uint64_t >& i_freq_map, const speed_equality i_equal_dimm_speed, const uint32_t i_nest_freq, const uint8_t i_required_sync_mode, - sync_mode& o_selected_sync_mode); + uint8_t& o_selected_sync_mode, + uint64_t& o_selected_freq); + +/// +/// @brief Create and sort a vector of supported MT/s (freq) - helper for testing purposes +/// @param[in] MCS target for which to get the DIMM configs +/// @param[in] vector of MVPD freqs +/// @param[in] vector of max allowed freqs +/// @param[in] bool whether or not we're forced into sync mode +/// @param[in,out] reference to a std::vector<uint32_t> space to put the sorted vector +/// @return FAPI2_RC_SUCCESS iff ok +/// @note Taken from ATTR_MSS_MRW_SUPPORTED_FREQ. The result is sorted so such that the min +/// supported freq is std::vector<>.begin and the max is std::vector<>.end - 1. You can +/// search the resulting vector for valid frequencies as it is sorted. +/// +fapi2::ReturnCode supported_freqs_helper(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, + const std::vector<uint32_t>& i_freqs, + const std::vector<uint32_t>& i_max_freqs, + const bool i_req_sync_mode, + std::vector<uint32_t>& io_freqs); + +/// +/// @brief Create and sort a vector of supported MT/s (freq) +/// @param[in] MCS target for which to get the DIMM configs +/// @param[in,out] reference to a std::vector<uint32_t> space to put the sorted vector +/// @return FAPI2_RC_SUCCESS iff ok +/// @note Taken from ATTR_MSS_MRW_SUPPORTED_FREQ. The result is sorted so such that the min +/// supported freq is std::vector<>.begin and the max is std::vector<>.end - 1. You can +/// search the resulting vector for valid frequencies as it is sorted. +/// +fapi2::ReturnCode supported_freqs(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, + std::vector<uint32_t>& io_freqs); + +/// +/// @brief Return whether a given freq is supported +/// @param[in] a freq to check for +/// @param[in] reference to a std::vector<uint32_t> of freqs +/// @return bool, true iff input freq is supported +/// +fapi2::ReturnCode is_freq_supported(const uint32_t i_freq, const std::vector<uint32_t>& i_freqs); + }// mss |