Skip to content

Commit

Permalink
Move find_magic from generic to Nimbus subdir path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aamarin authored and crgeddes committed Aug 1, 2019
1 parent ed0430e commit 06ed740
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/import/chips/p9/procedures/hwp/memory/lib/fir/check.C
Expand Up @@ -38,7 +38,7 @@
#include <p9_mc_scom_addresses_fld.H>
#include <p9_perv_scom_addresses.H>
#include <p9_perv_scom_addresses_fld.H>
#include <generic/memory/lib/utils/find_magic.H>
#include <lib/utils/find_magic.H>
#include <generic/memory/lib/utils/scom.H>
#include <lib/fir/fir.H>
#include <lib/fir/check.H>
Expand Down
2 changes: 1 addition & 1 deletion src/import/chips/p9/procedures/hwp/memory/lib/fir/unmask.C
Expand Up @@ -37,7 +37,7 @@
#include <fapi2.H>
#include <p9_mc_scom_addresses.H>
#include <p9_mc_scom_addresses_fld.H>
#include <generic/memory/lib/utils/find_magic.H>
#include <lib/utils/find_magic.H>
#include <generic/memory/lib/utils/scom.H>
#include <generic/memory/lib/utils/find.H>
#include <lib/fir/fir.H>
Expand Down
Expand Up @@ -38,7 +38,6 @@

#include <p9_mc_scom_addresses.H>
#include <p9_mc_scom_addresses_fld.H>
#include <generic/memory/lib/utils/find_magic.H>
#include <lib/mcbist/memdiags.H>
#include <lib/mcbist/mcbist.H>
#include <generic/memory/lib/utils/count_dimm.H>
Expand Down Expand Up @@ -305,7 +304,7 @@ fapi2::ReturnCode operation<DEFAULT_MC_TYPE>::multi_port_init_internal()
"Start address %d larger than end address %d for %s",
l_portdimm_start_address, l_portdimm_end_address, mss::c_str(iv_target));

// Determine which ports are functional and whether we can broadcast to them
// Determine which ports are functional and whether we can broadcast to them
// If we're in broadcast mode, PRD sends DIMM 0/1 of the first functional and configured port,
// and we then run all ports in parallel (ports set in subtest config)
if( mss::mcbist::is_broadcast_capable(iv_target) == mss::YES )
Expand Down
Expand Up @@ -56,7 +56,7 @@
#include <lib/workarounds/dll_workarounds.H>
#include <lib/workarounds/dqs_align_workarounds.H>
#include <lib/phy/mss_training.H>
#include <generic/memory/lib/utils/find_magic.H>
#include <lib/utils/find_magic.H>
#include <generic/memory/lib/utils/bit_count.H>
#include <generic/memory/lib/utils/find.H>
#include <generic/memory/lib/utils/dump_regs.H>
Expand Down
2 changes: 1 addition & 1 deletion src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.C
Expand Up @@ -51,7 +51,7 @@
#include <generic/memory/lib/utils/scom.H>
#include <generic/memory/lib/utils/pos.H>
#include <generic/memory/lib/utils/c_str.H>
#include <generic/memory/lib/utils/find_magic.H>
#include <lib/utils/find_magic.H>
#include <lib/workarounds/dp16_workarounds.H>
#include <lib/fir/check.H>
#include <generic/memory/lib/utils/mss_math.H>
Expand Down
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/import/generic/memory/lib/utils/find_magic.H $ */
/* $Source: src/import/chips/p9/procedures/hwp/memory/lib/utils/find_magic.H $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
Expand Down Expand Up @@ -135,30 +135,6 @@ find_targets_with_magic( const fapi2::Target<fapi2::TARGET_TYPE_MCBIST>& i_targe
return l_ports;
}

///
/// @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 >
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;
}

}// mss

#endif
Expand Up @@ -44,7 +44,7 @@
#include <lib/phy/ddr_phy.H>
#include <lib/mc/mc.H>
#include <lib/fir/unmask.H>
#include <generic/memory/lib/utils/find_magic.H>
#include <lib/utils/find_magic.H>

using fapi2::TARGET_TYPE_MCA;
using fapi2::TARGET_TYPE_MCBIST;
Expand Down
24 changes: 23 additions & 1 deletion src/import/generic/memory/lib/utils/mcbist/gen_mss_memdiags.H
Expand Up @@ -48,14 +48,36 @@
#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>


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
{
Expand Down

0 comments on commit 06ed740

Please sign in to comment.