summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
index 1c693bd36..ccd7c2700 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
@@ -36,14 +36,13 @@
#include <fapi2.H>
#include <lib/mcbist/mcbist.H>
#include <lib/utils/dump_regs.H>
+#include <lib/workarounds/mcbist_workarounds.H>
using fapi2::TARGET_TYPE_MCBIST;
using fapi2::TARGET_TYPE_MCA;
namespace mss
{
-namespace mcbist
-{
const std::pair<uint64_t, uint64_t> mcbistTraits<fapi2::TARGET_TYPE_MCBIST>::address_pairs[] =
{
@@ -53,6 +52,8 @@ const std::pair<uint64_t, uint64_t> mcbistTraits<fapi2::TARGET_TYPE_MCBIST>::add
{ START_ADDRESS_3, END_ADDRESS_3 },
};
+namespace mcbist
+{
///
/// @brief Load a set of MCBIST subtests in to the MCBIST registers
@@ -225,6 +226,13 @@ fapi2::ReturnCode execute( const fapi2::Target<TARGET_TYPE_MCBIST>& i_target,
fapi2::MSS_MEMDIAGS_NO_MCBIST_SUBTESTS().set_TARGET(i_target),
"Attempt to run an MCBIST program with no subtests on %s", mss::c_str(i_target));
+ // Implement any mcbist work-arounds.
+ // I'm going to do the unthinkable here - and cast away the const of the mcbist program input.
+ // The work arounds need to change this, and so it needs to not be const. However, I don't want
+ // to risk general const-correctness by changing the input parameter to non-const. So, I use
+ // const_cast<> (ducks out of the way of the flying adjectives.) These are work-arounds ...
+ FAPI_TRY( workarounds::mcbist::end_of_rank(i_target, const_cast<program<TARGET_TYPE_MCBIST>&>(i_program)) );
+
FAPI_TRY( clear_errors(i_target) );
// Slam the address generator config
OpenPOWER on IntegriCloud