diff options
author | Mark Pizzutillo <Mark.Pizzutillo@ibm.com> | 2019-08-26 18:02:37 -0400 |
---|---|---|
committer | Christian R Geddes <crgeddes@us.ibm.com> | 2019-09-27 13:49:09 -0500 |
commit | 48abe5e8afb54e389f45233e66e100a501d038e8 (patch) | |
tree | 2a930b0edc5367239fc100baf5df1b45185cf8eb /src/import/generic/memory/lib/utils/index.H | |
parent | 04d5973bec03c271184ff87f1e0dbb3aa57857d4 (diff) | |
download | blackbird-hostboot-48abe5e8afb54e389f45233e66e100a501d038e8.tar.gz blackbird-hostboot-48abe5e8afb54e389f45233e66e100a501d038e8.zip |
Add support for new pmic sequencing SPD fields
Change-Id: I8847090585161375fbb2c0ef853cffed80a67cc3
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/82961
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83375
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: Christian R Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/generic/memory/lib/utils/index.H')
-rw-r--r-- | src/import/generic/memory/lib/utils/index.H | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/import/generic/memory/lib/utils/index.H b/src/import/generic/memory/lib/utils/index.H index fde43f711..1657a9e18 100644 --- a/src/import/generic/memory/lib/utils/index.H +++ b/src/import/generic/memory/lib/utils/index.H @@ -74,6 +74,23 @@ fapi_try_exit: } /// +/// @brief Sort the provided target vector in order of index (low to high) +/// +/// @tparam T TargetType +/// @param[in,out] io_targets vector of targets to sort +/// +template <fapi2::TargetType T> +inline void sort_targets_by_index(std::vector<fapi2::Target<T>>& io_targets) +{ + std::sort(io_targets.begin(), io_targets.end(), [] ( + const fapi2::Target<T>& l_first_target, + const fapi2::Target<T>& l_second_target) -> bool + { + return mss::index(l_first_target) < mss::index(l_first_target); + }); +} + +/// /// @brief Return an attribute array index from a rank number /// @param[in] i_rank uint64_t a rank number DIMM0 {0, 1, 2, 3} DIMM1 {0, 1, 2, 3} /// @return size_t the attribute array index. |