diff options
author | Luke Mulkey <lwmulkey@us.ibm.com> | 2017-10-11 14:02:56 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-05-17 11:35:06 -0400 |
commit | 1fd1cc97eb824b7853e652379ba8698c519512e2 (patch) | |
tree | 45650b979e378eeac216cd006ada1633771d6aa4 /src/import/generic/memory/lib/utils/find.H | |
parent | 01be61c03770d4f837febb9debdfb7318d0b6f3c (diff) | |
download | talos-hostboot-1fd1cc97eb824b7853e652379ba8698c519512e2.tar.gz talos-hostboot-1fd1cc97eb824b7853e652379ba8698c519512e2.zip |
P9C Memory Throttle Updates (new HWPs and new ISDIMM Power Curve support)
Change-Id: Icfbe39161641324bddc5f880948d03f5ee2cce5a
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57005
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57277
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/generic/memory/lib/utils/find.H')
-rw-r--r-- | src/import/generic/memory/lib/utils/find.H | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/import/generic/memory/lib/utils/find.H b/src/import/generic/memory/lib/utils/find.H index c73b49619..f5f723438 100644 --- a/src/import/generic/memory/lib/utils/find.H +++ b/src/import/generic/memory/lib/utils/find.H @@ -27,8 +27,8 @@ /// @file find.H /// @brief Templates for finding things /// -// *HWP HWP Owner: Jacob Harvey <jlharvey@us.ibm.com> -// *HWP HWP Backup: Andre Marin <aamarin@us.ibm.com> +// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com> +// *HWP HWP Backup: Stephen Glancy <sglancy@us.ibm.com> // *HWP Team: Memory // *HWP Level: 3 // *HWP Consumed by: HB:FSP @@ -62,6 +62,25 @@ inline std::vector< fapi2::Target<M> > find_targets( const fapi2::Target<T>& i_t } /// +/// @brief find a set of elements based on a fapi2 target +/// @tparam M the target type to be returned +/// @tparam T the fapi2 target type of the argument +/// @param[in] i_target the fapi2 target T +/// @param[in] i_state the fapi2 target state for the children of i_target +/// @return a vector of M targets that match the target state specified +/// @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, fapi2::TargetState i_state) +{ + return i_target.template getChildren<M>(i_state); +} + +/// /// @brief find an element based on a fapi2 target /// @tparam M the target type to be returned /// @tparam T the fapi2 target type of the argument |