diff options
| author | Jacob Harvey <jlharvey@us.ibm.com> | 2017-05-02 11:17:07 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-05-24 22:40:14 -0400 |
| commit | e734170c132ccb53b65d24c5f89955b1250cf150 (patch) | |
| tree | 79a5fc73f559b9296d20dcc2162585bbca1cf9f7 /src/import/generic/memory/lib/utils | |
| parent | 53ec24514b4c367250bc73ee2317996992bcf0d1 (diff) | |
| download | talos-hostboot-e734170c132ccb53b65d24c5f89955b1250cf150.tar.gz talos-hostboot-e734170c132ccb53b65d24c5f89955b1250cf150.zip | |
Change cas latency to be per MCA
Change-Id: I61684fe0b69c72dea4c79ad248f8928a007ffb0f
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40052
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Dev-Ready: JACOB L. HARVEY <jlharvey@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40501
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/generic/memory/lib/utils')
| -rw-r--r-- | src/import/generic/memory/lib/utils/find.H | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/import/generic/memory/lib/utils/find.H b/src/import/generic/memory/lib/utils/find.H index 3641d331f..41d77114b 100644 --- a/src/import/generic/memory/lib/utils/find.H +++ b/src/import/generic/memory/lib/utils/find.H @@ -38,7 +38,6 @@ #include <fapi2.H> #include <vector> - #include <generic/memory/lib/utils/pos.H> #include <generic/memory/lib/utils/c_str.H> @@ -50,9 +49,17 @@ namespace mss /// @tparam T the fapi2 target type of the argument /// @param[in] i_target the fapi2 target T /// @return a vector of M targets. +/// @note Only works for valid parent-child relationships +/// So calling find_targets<TARGET_TYPE_DIMM>(l_mca) will work here +/// but calling find_targets<TARGET_TYPE_DIMM>(l_mcs) will not work +/// Compiler will freak out and we'll never get a bad relationship/ error at runtime +/// If we do, it's on fapi2 /// template< fapi2::TargetType M, fapi2::TargetType T > -inline std::vector< fapi2::Target<M> > find_targets( const fapi2::Target<T>& i_target); +inline std::vector< fapi2::Target<M> > find_targets( const fapi2::Target<T>& i_target) +{ + return i_target.template getChildren<M>(); +} /// /// @brief find an element based on a fapi2 target @@ -60,6 +67,10 @@ inline std::vector< fapi2::Target<M> > find_targets( const fapi2::Target<T>& i_t /// @tparam T the fapi2 target type of the argument /// @param[in] i_target the fapi2 target T /// @return an M target. +/// @note Only works for valid parent-child relationships +/// Will work for MCA and DIMM +/// Will not work for MCS and DIMM +/// The compiler will let you know if it doesn't work /// template< fapi2::TargetType M, fapi2::TargetType T > inline fapi2::Target<M> find_target( const fapi2::Target<T>& i_target ) @@ -223,6 +234,19 @@ inline std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCA> > find_targets } /// +/// @brief find all the MCA connected to an MCBIST +/// @param[in] i_target a fapi2::Target MCBIST +/// @return a vector of fapi2::TARGET_TYPE_MCA +/// +template<> +inline std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCA> > find_targets +( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target ) +{ + std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCA> > l_temp = {i_target}; + return l_temp; +} + +/// /// @brief find the magic MCA connected to an MCBIST /// @param[in] i_target the fapi2::Target MCBIST /// @return a vector of fapi2::TARGET_TYPE_MCA |

