summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/mdia/mdia.C
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@us.ibm.com>2012-03-27 15:34:19 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-04-26 15:27:38 -0500
commit5cd51ece6aac9562c15e7366f8136ec7ba616f9b (patch)
treefec70a5867832322a4354bdc998bb9d1b61405ec /src/usr/diag/mdia/mdia.C
parentb30cea3aa6f56548bdbc8bf1fd0b790f598ca5aa (diff)
downloadtalos-hostboot-5cd51ece6aac9562c15e7366f8136ec7ba616f9b.tar.gz
talos-hostboot-5cd51ece6aac9562c15e7366f8136ec7ba616f9b.zip
State machine support
State machine functionaly to decide when and which pattern/workItem to run on each MBA as part of memory diagnostics. RTC: 38391 Change-Id: I1fa85bc343ca81f6a206df511307d53df0163cb4 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/817 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/mdia/mdia.C')
-rw-r--r--src/usr/diag/mdia/mdia.C16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/usr/diag/mdia/mdia.C b/src/usr/diag/mdia/mdia.C
index 93fc2bcbd..e9ae2be69 100644
--- a/src/usr/diag/mdia/mdia.C
+++ b/src/usr/diag/mdia/mdia.C
@@ -28,15 +28,20 @@
#include "mdiafwd.H"
#include "mdiaglobals.H"
#include "mdiatrace.H"
+#include "mdiasm.H"
+#include "mdiasmimpl.H"
+#include <util/singleton.H>
using namespace TARGETING;
+using namespace Util;
namespace MDIA
{
errlHndl_t runStep(const TargetHandleList & i_targetList)
{
- MDIA_FAST("memory diagnostics entry (runStep)");
+ MDIA_FAST("memory diagnostics entry with %d target(s)",
+ i_targetList.size());
// memory diagnostics ipl step entry point
@@ -47,7 +52,7 @@ errlHndl_t runStep(const TargetHandleList & i_targetList)
// get the workflow for each target mba passed in.
// associate each workflow with the target handle.
- WorkFlowAssocList list;
+ WorkFlowAssocMap list;
TargetHandleList::const_iterator tit;
DiagMode mode;
@@ -72,6 +77,7 @@ errlHndl_t runStep(const TargetHandleList & i_targetList)
if(!err)
{
// TODO...run the workflow through the state machine
+ err = Singleton<StateMachine>::instance().run(list);
}
// ensure threads and pools are shutdown when finished
@@ -79,11 +85,15 @@ errlHndl_t runStep(const TargetHandleList & i_targetList)
doStepCleanup(globals);
return err;
+
}
void doStepCleanup(const Globals & i_globals)
{
- // TODO ... stop the state machine
+ // stop the state machine
+
+ Singleton<StateMachine>::instance().shutdown();
+
// TODO ... stop the command monitor
}
}
OpenPOWER on IntegriCloud