diff options
| author | Andre Marin <aamarin@us.ibm.com> | 2019-07-17 23:42:23 -0400 |
|---|---|---|
| committer | Christian R Geddes <crgeddes@us.ibm.com> | 2019-08-01 17:12:06 -0500 |
| commit | 06ed7403d044d8a0776440019ec8e893dd7661ae (patch) | |
| tree | a206cf8ccd38fc690f5bddca17624c23bc3411f9 /src/import/generic/memory/lib/utils/mcbist | |
| parent | ed0430e908b272919b9bb5ac48bc8d9314b81238 (diff) | |
| download | talos-hostboot-06ed7403d044d8a0776440019ec8e893dd7661ae.tar.gz talos-hostboot-06ed7403d044d8a0776440019ec8e893dd7661ae.zip | |
Move find_magic from generic to Nimbus subdir path
Change-Id: Ie963953758cc178432e096057240d7ab5c82d7ac
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80595
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80935
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/mcbist')
| -rw-r--r-- | src/import/generic/memory/lib/utils/mcbist/gen_mss_memdiags.H | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/import/generic/memory/lib/utils/mcbist/gen_mss_memdiags.H b/src/import/generic/memory/lib/utils/mcbist/gen_mss_memdiags.H index dad5df32e..dfb6b495b 100644 --- a/src/import/generic/memory/lib/utils/mcbist/gen_mss_memdiags.H +++ b/src/import/generic/memory/lib/utils/mcbist/gen_mss_memdiags.H @@ -48,7 +48,6 @@ #include <generic/memory/lib/utils/count_dimm.H> #include <generic/memory/lib/utils/conversions.H> #include <generic/memory/lib/utils/pos.H> -#include <generic/memory/lib/utils/find_magic.H> #include <generic/memory/lib/utils/count_dimm.H> #include <generic/memory/lib/utils/poll.H> @@ -56,6 +55,29 @@ namespace mss { +/// +/// @brief Determine if a thing is functional +/// @tparam I, the type of the item we want to check for +/// @tparam P, the type of the parent which holds the things of interest +/// @param[in] i_target the parent containing the thing we're looking for +/// @param[in] i_rel_pos the relative position of the item of interest. +/// @return bool true iff the thing at i_rel_pos is noted as functional +/// +template< fapi2::TargetType I, fapi2::TargetType P > +inline bool is_functional( const fapi2::Target<P>& i_target, const uint64_t i_rel_pos ) +{ + // Not sure of a good way to do this ... we get all the functional + // children of the parent and look for our relative position ... + for (const auto& i : i_target.template getChildren<I>(fapi2::TARGET_STATE_FUNCTIONAL)) + { + if (mss::template relative_pos<P>(i) == i_rel_pos) + { + return true; + } + } + + return false; +} namespace mcbist { |

