summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H
diff options
context:
space:
mode:
authorStephen Glancy <sglancy@us.ibm.com>2017-09-07 16:38:20 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2017-11-01 15:35:48 -0400
commitd110f5634137d979a14eb4b0b5e9c803aa413a7d (patch)
treea3e42f46c649143f381435a8a43f00efc71714dd /src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H
parent6f456343a42a3def8d14637b2f8ffc90832ee563 (diff)
downloadtalos-hostboot-d110f5634137d979a14eb4b0b5e9c803aa413a7d.tar.gz
talos-hostboot-d110f5634137d979a14eb4b0b5e9c803aa413a7d.zip
Adds in broadcast support for memdiags
Change-Id: I168b8a285a0e8509c8cf92e170ec3d1ea8607e6b Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46032 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> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Dev-Ready: STEPHEN GLANCY <sglancy@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/46037 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H
index 3d71e9ff7..ac432c09d 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H
@@ -49,6 +49,7 @@
#include <lib/mcbist/patterns.H>
#include <lib/mcbist/settings.H>
#include <lib/mc/port.H>
+#include <lib/dimm/kind.H>
namespace mss
{
@@ -3091,6 +3092,75 @@ fapi2::ReturnCode read_rb_array(const fapi2::Target<T>& i_target,
return read_rb_array(i_target, i_start_addr, i_num_entries, o_data, l_temp);
}
+///
+/// @brief Checks if broadcast mode is capable of being enabled on this target
+/// @tparam T, the fapi2::TargetType
+/// @param[in] i_target the target to effect
+/// @return o_capable - yes iff these vector of targets are broadcast capable
+///
+template< fapi2::TargetType T >
+const mss::states is_broadcast_capable(const fapi2::Target<T>& i_target);
+
+///
+/// @brief Checks if broadcast mode is capable of being enabled on this vector of targets
+/// @tparam T, the fapi2::TargetType
+/// @param[in] i_targets the vector of targets to analyze
+/// @return o_capable - yes iff these vector of targets are broadcast capable
+///
+template< fapi2::TargetType T >
+const mss::states is_broadcast_capable(const std::vector<fapi2::Target<T>>& i_targets);
+
+///
+/// @brief Checks if broadcast mode is capable of being enabled on this vector of targets
+/// @param[in] i_target the target to effect
+/// @return o_capable - yes iff these vector of targets are broadcast capable
+///
+const mss::states is_broadcast_capable(const std::vector<mss::dimm::kind>& i_kinds);
+
+///
+/// @brief Configures all of the ports for broadcast mode
+/// @tparam T, the fapi2::TargetType
+/// @param[in] i_target the target to effect
+/// @param[out] o_port_select - the configuration of the selected ports
+/// @return FAPI2_RC_SUCCSS iff ok
+///
+template< fapi2::TargetType T >
+fapi2::ReturnCode setup_broadcast_port_select(const fapi2::Target<T>& i_target, uint64_t& o_port_select);
+
+///
+/// @brief Enables broadcast mode
+/// @tparam T, the fapi2::TargetType
+/// @param[in] i_target the target to effect
+/// @param[in,out] io_program the mcbist::program
+/// @return FAPI2_RC_SUCCSS iff ok
+///
+template< fapi2::TargetType T >
+fapi2::ReturnCode enable_broadcast_mode(const fapi2::Target<T>& i_target, mcbist::program<T>& io_program);
+
+///
+/// @brief Configures broadcast mode, if it is needed
+/// @tparam T, the fapi2::TargetType
+/// @param[in] i_target the target to effect
+/// @param[in,out] io_program the mcbist::program
+/// @return FAPI2_RC_SUCCSS iff ok
+///
+template< fapi2::TargetType T >
+fapi2::ReturnCode configure_broadcast_mode(const fapi2::Target<T>& i_target, mcbist::program<T>& io_program)
+{
+ // If we're not capable to do broadcast mode on this target, exit out
+ const auto l_broadcast_capable = is_broadcast_capable(i_target);
+
+ if(l_broadcast_capable == mss::states::NO)
+ {
+ FAPI_INF("%s is not broadcast capable, skipping enablement of broadcast mode", mss::c_str(i_target));
+ return fapi2::FAPI2_RC_SUCCESS;
+ }
+
+ // Enable broadcast mode
+ FAPI_INF("%s is broadcast capable, enabling broadcast mode", mss::c_str(i_target));
+ return enable_broadcast_mode(i_target, io_program);
+}
+
} // namespace
} // namespace
OpenPOWER on IntegriCloud