summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2011-07-10 21:14:46 -0500
committerMark W. Wenning <wenning@us.ibm.com>2011-07-14 16:54:12 -0500
commit353cc0391b0982b936fe0437fbaa0439f775a6dd (patch)
treedd892737420cecffec8104a0eeef3dd2282a23a5 /src/usr
parent5530b7609c0351deb5d707c5950a56309842a325 (diff)
downloadtalos-hostboot-353cc0391b0982b936fe0437fbaa0439f775a6dd.tar.gz
talos-hostboot-353cc0391b0982b936fe0437fbaa0439f775a6dd.zip
IStep Dispatcher
- remove refs to include/src/usr/taskargs/ dir - use _start() macro in IStepDispatcher - post-review fixes - fixed - inadvertently ran copyright script on staged files Change-Id: I2b256524746d0eb25ed04e0835450e220dc65492 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/191 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/initservice/baseinitsvc/initservice.C83
-rw-r--r--src/usr/initservice/baseinitsvc/initservice.H97
-rw-r--r--src/usr/initservice/baseinitsvc/initservicetaskentry.C1
-rw-r--r--src/usr/initservice/common/initsvcstructs.H93
-rw-r--r--src/usr/initservice/extinitsvc/extinitsvc.C2
-rw-r--r--src/usr/initservice/extinitsvc/extinitsvc.H2
-rw-r--r--src/usr/initservice/extinitsvc/extinitsvctasks.H13
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.C123
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.H125
-rw-r--r--src/usr/initservice/istepdispatcher/isteplist.H57
-rw-r--r--src/usr/initservice/istepdispatcher/makefile8
-rw-r--r--src/usr/initservice/makefile2
-rw-r--r--src/usr/initservice/taskargs/taskargs.C2
-rw-r--r--src/usr/isteps/istep1.C51
-rw-r--r--src/usr/isteps/isteps.H20
-rw-r--r--src/usr/isteps/makefile8
-rw-r--r--src/usr/makefile5
17 files changed, 610 insertions, 82 deletions
diff --git a/src/usr/initservice/baseinitsvc/initservice.C b/src/usr/initservice/baseinitsvc/initservice.C
index 0c3617023..de96ea922 100644
--- a/src/usr/initservice/baseinitsvc/initservice.C
+++ b/src/usr/initservice/baseinitsvc/initservice.C
@@ -65,14 +65,9 @@ errlHndl_t InitService::startTask( const TaskInfo *i_ptask,
assert(i_ptask->taskflags.task_type == START_TASK);
tidrc = task_exec( i_ptask->taskname, io_pargs ); // launch the child
-
- if ( io_pargs )
- {
- io_pargs->waitParentSync(); // sync up childtask
- }
-
if ( static_cast<int16_t>(tidrc) < 0 )
{
+ // task failed to launch, post an errorlog and dump some trace
io_rerrl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, // severity
i_ptask->taskflags.module_id, // moduleid
@@ -91,6 +86,7 @@ errlHndl_t InitService::startTask( const TaskInfo *i_ptask,
} // endif tidrc
else
{
+ // task launched OK.
TRACDBIN( g_trac_initsvc,
"Task finished OK :",
i_ptask->taskname,
@@ -98,12 +94,85 @@ errlHndl_t InitService::startTask( const TaskInfo *i_ptask,
TRACDCOMP( g_trac_initsvc,
"task number %d, errlog p = %p",
tidrc, io_rerrl );
- }
+
+ if ( io_pargs )
+ {
+ io_pargs->waitParentSync(); // sync up childtask
+ }
+
+ }
return io_rerrl;
}
+errlHndl_t InitService::executeFn( const TaskInfo *i_ptask,
+ TaskArgs *io_pargs
+) const
+{
+ tid_t tidrc = 0;
+ errlHndl_t errl = NULL;
+
+ if ( i_ptask->taskfn == NULL )
+ {
+ TRACDBIN( g_trac_initsvc,
+ "ERROR: NULL function pointer:",
+ i_ptask->taskname,
+ strlen(i_ptask->taskname) );
+
+ errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, // severity
+ i_ptask->taskflags.module_id, // moduleid
+ INITSERVICE::NULL_FN_PTR, // reason Code
+ 0,
+ 0 );
+
+ return errl;
+ }
+
+
+ // valid function, launch it
+ tidrc = task_create( i_ptask->taskfn, io_pargs );
+ if ( static_cast<int16_t>(tidrc) < 0 )
+ {
+ errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, // severity
+ i_ptask->taskflags.module_id, // moduleid
+ INITSERVICE::START_FN_FAILED, // reason Code
+ tidrc, // user1 = tidrc
+ 0 );
+
+ TRACDBIN( g_trac_initsvc,
+ ENTER_MRK "ERROR starting function:",
+ i_ptask->taskname,
+ strlen(i_ptask->taskname) );
+ TRACDCOMP( g_trac_initsvc,
+ EXIT_MRK "tidrc=%d, errlog p = %p" ,
+ (int16_t)tidrc, errl );
+
+ } // endif tidrc
+ else
+ {
+ TRACDBIN( g_trac_initsvc,
+ ENTER_MRK "function launched OK :",
+ i_ptask->taskname,
+ strlen(i_ptask->taskname) );
+ TRACDCOMP( g_trac_initsvc,
+ EXIT_MRK "task number %d, errlog p = %p",
+ tidrc, errl );
+
+ // task launched OK.
+ if ( io_pargs )
+ {
+ io_pargs->waitParentSync(); // sync up parent task
+ }
+ }
+
+ return errl;
+
+}
+
+
void InitService::reportError(errlHndl_t &io_rerrl ) const
{
diff --git a/src/usr/initservice/baseinitsvc/initservice.H b/src/usr/initservice/baseinitsvc/initservice.H
index dd0a7df32..db16ede89 100644
--- a/src/usr/initservice/baseinitsvc/initservice.H
+++ b/src/usr/initservice/baseinitsvc/initservice.H
@@ -26,10 +26,11 @@
#include <sys/vfs.h> // VFS_MODULE_NAME_MAX
#include <trace/interface.H>
-#include <initservice/taskargs.H>
#include <errl/errlentry.H>
#include <initservice/initsvcreasoncodes.H>
+#include <initservice/taskargs.H>
+#include "../common/initsvcstructs.H"
namespace INITSERVICE
{
@@ -38,77 +39,10 @@ namespace INITSERVICE
// Globals/Constants
/******************************************************************************/
-
/******************************************************************************/
// Typedef/Enumerations
/******************************************************************************/
-/**
- * @enum TaskType
- * - NONE == placeholder, no task
- * - START_TASK == task with _start() function entry point
- * - START_FN == task with function pointer entry point
- * - BARRIER == set barrier for next N tasks.
- * - STOP_TASK == Execute the destructor on the task in extended image.
- * ( not implemented yet)
- * - END_TASK_LIST == last entry in the task list.
- */
-enum TaskType
-{
- UNDEFINED_TT = 0,
- NONE,
- START_TASK,
- START_FN,
- BARRIER,
- STOP_TASK,
- END_TASK_LIST,
-};
-/**
- * @enum ModuleType
- * - BASE_IMAGE == module in the base image
- * - EXT_IMAGE == module in the extended image
- */
-enum ModuleType
-{
- UNDEFINED_MT = 0,
- BASE_IMAGE,
- EXT_IMAGE,
-};
-
-
-/**
- * @struct TaskFlags
- *
- * - run _start() function on start
- * - module type, BASE_MODULE or EXT_MODULE
- * - module_id for errorlog if task fails
- *
- * @todo revisit these flags in sprint3
- */
-struct TaskFlags
-{
- TaskType task_type; // this is a task, run _start() function
- ModuleType module_type; // BASE_IMAGE or EXT_IMAGE
- InitServiceModuleID module_id; // module id for errorlog
-};
-
-/**
- * @struct _TaskInfo
- *
- * Holds information on each task in the system.
- * - taskname
- * - execution flags, see TaskFlags above
- *
- */
-struct TaskInfo
-{
- const char taskname[VFS_MODULE_NAME_MAX];
- void (*taskfn)(void *ptr);
- const TaskFlags taskflags;
-
-};
-
-
/******************************************************************************/
// InitService Class
/******************************************************************************/
@@ -156,7 +90,17 @@ public:
// $$protected:
/**
- * @brief start a task
+ * @brief start a task using the taskname string in the TaskInfo struct.
+ * taskname string will be something like "libtargeting.so", which
+ * is the name of the compiled and linked targetting module.
+ * The module is expected to have implemented a extern "C"
+ * function called "void _start(void *args)" which is considered
+ * to be the "task entry point". When _start is called, its
+ * parameter will be set to point to a TaskArgs struct which
+ * can be used to pass information back and forth. See the
+ * comments in TaskArgs.H for more info.
+ * See initsvctasks.H and the unit tests for some examples of
+ * how this is used.
*
* @param[in] i_ptask pointer to a TaskInfo struct
* @param[in] io_pargs pointer to a TaskArgs struct, or NULL
@@ -171,6 +115,21 @@ public:
TaskArgs::TaskArgs *i_pargs,
errlHndl_t &io_rerrl ) const;
+ /**
+ * @brief executeFn
+ * Execute an function
+ *
+ * @param[in] i_ptask - pointer to an TaskInfo struct
+ * @param[in,out] i_pargs - pointer to a TaskArgs struct
+ *
+ * @return errlHndl_t handle, NULL if success, filled out errorlog
+ * if failure
+ */
+ errlHndl_t executeFn( const TaskInfo *i_ptask,
+ TaskArgs *i_pargs
+ ) const;
+
+
/**
* @brief report Error to the system.
diff --git a/src/usr/initservice/baseinitsvc/initservicetaskentry.C b/src/usr/initservice/baseinitsvc/initservicetaskentry.C
index 62d531c07..b27ca6a44 100644
--- a/src/usr/initservice/baseinitsvc/initservicetaskentry.C
+++ b/src/usr/initservice/baseinitsvc/initservicetaskentry.C
@@ -33,7 +33,6 @@ void _start(void *ptr)
TRACFCOMP( g_trac_initsvc,
ENTER_MRK "Executing Initialization Service module." );
-
// create an instance of InitService
//InitService::InitService& is = InitService::getTheInstance();
diff --git a/src/usr/initservice/common/initsvcstructs.H b/src/usr/initservice/common/initsvcstructs.H
new file mode 100644
index 000000000..38c02612f
--- /dev/null
+++ b/src/usr/initservice/common/initsvcstructs.H
@@ -0,0 +1,93 @@
+#ifndef __COMMON_INITSVCSTRUCTS_H
+#define __COMMON_INITSVCSTRUCTS_H
+/**
+ * @file initsvcstructs.H
+ *
+ * common structs for initservice, extinitsvc, istepdispatcher
+ */
+
+/******************************************************************************/
+// Includes
+/******************************************************************************/
+#include <stdint.h>
+
+namespace INITSERVICE
+{
+
+/******************************************************************************/
+// Globals/Constants
+/******************************************************************************/
+
+
+/******************************************************************************/
+// Typedef/Enumerations
+/******************************************************************************/
+
+/**
+ * @enum TaskType
+ * - NONE == placeholder, no task
+ * - START_TASK == task with _start() function entry point
+ * - START_FN == task with function pointer entry point
+ * - BARRIER == set barrier for next N tasks.
+ * - STOP_TASK == Execute the destructor on the task in extended image.
+ * ( not implemented yet)
+ * - END_TASK_LIST == last entry in the task list.
+ */
+enum TaskType
+{
+ UNDEFINED_TT = 0,
+ NONE,
+ START_TASK,
+ START_FN,
+ BARRIER,
+ STOP_TASK,
+ END_TASK_LIST,
+};
+/**
+ * @enum ModuleType
+ * - BASE_IMAGE == module in the base image
+ * - EXT_IMAGE == module in the extended image
+ */
+enum ModuleType
+{
+ UNDEFINED_MT = 0,
+ BASE_IMAGE,
+ EXT_IMAGE,
+};
+
+
+/**
+ * @struct TaskFlags
+ *
+ * - run _start() function on start
+ * - module type, BASE_MODULE or EXT_MODULE
+ * - module_id for errorlog if task fails
+ *
+ * @todo revisit these flags in sprint3
+ */
+struct TaskFlags
+{
+ TaskType task_type; // this is a task, run _start() function
+ ModuleType module_type; // BASE_IMAGE or EXT_IMAGE
+ InitServiceModuleID module_id; // module id for errorlog
+};
+
+/**
+ * @struct _TaskInfo
+ *
+ * Holds information on each task in the system.
+ * - taskname
+ * - execution flags, see TaskFlags above
+ *
+ */
+struct TaskInfo
+{
+ const char taskname[VFS_MODULE_NAME_MAX];
+ void (*taskfn)(void *ptr);
+ const TaskFlags taskflags;
+
+};
+
+} // namespace
+
+#endif
diff --git a/src/usr/initservice/extinitsvc/extinitsvc.C b/src/usr/initservice/extinitsvc/extinitsvc.C
index d1df2427e..3d9ab6441 100644
--- a/src/usr/initservice/extinitsvc/extinitsvc.C
+++ b/src/usr/initservice/extinitsvc/extinitsvc.C
@@ -13,6 +13,7 @@
#include <trace/interface.H>
#include <errl/errlentry.H>
+#include <initservice/taskargs.H> // task entry routine
#include "extinitsvc.H"
#include "extinitsvctasks.H"
@@ -46,6 +47,7 @@ void _start( void *io_pArgs )
}
+
/******************************************************************************/
// ExtInitSvc::getTheInstance return the only instance
/******************************************************************************/
diff --git a/src/usr/initservice/extinitsvc/extinitsvc.H b/src/usr/initservice/extinitsvc/extinitsvc.H
index 8e7874fd2..aa4ef6bc6 100644
--- a/src/usr/initservice/extinitsvc/extinitsvc.H
+++ b/src/usr/initservice/extinitsvc/extinitsvc.H
@@ -37,7 +37,7 @@ namespace INITSERVICE
/******************************************************************************/
-// InitService Class
+// ExtInitSvc Class
/******************************************************************************/
// Singleton definition
diff --git a/src/usr/initservice/extinitsvc/extinitsvctasks.H b/src/usr/initservice/extinitsvc/extinitsvctasks.H
index 347d29ffa..29a62e57d 100644
--- a/src/usr/initservice/extinitsvc/extinitsvctasks.H
+++ b/src/usr/initservice/extinitsvc/extinitsvctasks.H
@@ -32,6 +32,19 @@ const TaskInfo iv_exttaskinfolist[] = {
}
},
+ /**
+ * @brief IStep Dispatcher task, runs ISteps
+ */
+ {
+ "libistepdisp.so" , // taskname
+ NULL, // no pointer to fn
+ {
+ START_TASK, // task type
+ EXT_IMAGE, // Extended Module
+ EXECUTE_ISTEPS_ERRL_ID, // module id
+ }
+ },
+
// ---------------------------------------------------------------
// ----- END OF LIST!!! ---------------------------------------
// ---------------------------------------------------------------
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
new file mode 100644
index 000000000..cb3634c9b
--- /dev/null
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
@@ -0,0 +1,123 @@
+/**
+ * @file istepdispatcher.C
+ *
+ * IStep Dispatcher interface. Launched from Extended Initialization Service
+ *
+ */
+
+
+/******************************************************************************/
+// Includes
+/******************************************************************************/
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <sys/task.h> // tid_t, task_create, etc
+#include <trace/interface.H> // trace support
+#include <errl/errlentry.H> // errlHndl_t
+
+#include "istepdispatcher.H"
+#include "isteplist.H"
+
+namespace INITSERVICE
+{
+
+/******************************************************************************/
+// Globals/Constants
+/******************************************************************************/
+extern trace_desc_t *g_trac_initsvc;
+
+/**
+ * @brief set up _start() task entry procedure
+ *
+ */
+TASK_ENTRY_MACRO( IStepDispatcher::getTheInstance().init );
+
+
+IStepDispatcher::IStepDispatcher()
+:
+ iv_istepmodeflag(false),
+ iv_nextistep( 0 ),
+ iv_cancontinueflag(false)
+{
+
+}
+
+IStepDispatcher::~IStepDispatcher()
+{
+
+}
+
+
+
+IStepDispatcher& IStepDispatcher::getTheInstance()
+{
+ return Singleton<IStepDispatcher>::instance();
+}
+
+
+void IStepDispatcher::init( void * ptr )
+{
+ errlHndl_t errl = NULL;
+ uint64_t nextIStep = 0;
+ const TaskInfo *pistep = NULL;
+ TaskArgs::TaskArgs args;
+
+ TRACFCOMP( g_trac_initsvc,
+ ENTER_MRK "starting IStepDispatcher, ptr=%p. &args=%p",
+ ptr, &args );
+
+ for ( nextIStep=0;
+ nextIStep<INITSERVICE::MAX_ISTEPS;
+ nextIStep++ )
+ {
+ pistep = &(isteps[nextIStep]);
+ if ( pistep->taskflags.task_type == END_TASK_LIST )
+ {
+ TRACDCOMP( g_trac_initsvc,
+ "End of IStep list.\n" );
+ break;
+ }
+
+
+ errl = executeFn( pistep, &args );
+
+ // report an error
+ reportError( errl );
+
+ /**
+ * @todo call getCanContinueProcedure when we have some ISteps that
+ * require them.
+ */
+
+ } // endfor
+
+
+ TRACFCOMP( g_trac_initsvc,
+ EXIT_MRK "IStepDispatcher finished.");
+
+}
+
+/**
+ * @note IStep Mode is hardwired to false for now
+ *
+ * @todo revisit this when PNOR Driver is implemented
+ */
+bool IStepDispatcher::getIStepMode( ) const
+{
+
+ return false;
+}
+
+
+
+bool IStepDispatcher::getCanContinueProcedure( TaskInfo &i_failingIStep,
+ errlHndl_t &i_failingError,
+ TaskInfo &io_nextIstep ) const
+{
+
+ return false;
+}
+
+} // namespace
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.H b/src/usr/initservice/istepdispatcher/istepdispatcher.H
new file mode 100644
index 000000000..34e2dccf5
--- /dev/null
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.H
@@ -0,0 +1,125 @@
+#ifndef __ISTEP_DISPATCHER_H
+#define __ISTEP_DISPATCHER_H
+/**
+ * @file istepdispatcher.H
+ *
+ * IStep Dispatcher interface. Launched from Extended Initialization Service
+ *
+ */
+
+
+/******************************************************************************/
+// Includes
+/******************************************************************************/
+#include <stdint.h>
+#include <sys/vfs.h> // VFS_MODULE_NAME_MAX
+
+#include <errl/errlentry.H>
+#include <initservice/taskargs.H>
+#include <initservice/initsvcreasoncodes.H>
+
+#include "../baseinitsvc/initservice.H"
+#include "../common/initsvcstructs.H"
+
+
+namespace INITSERVICE
+{
+
+
+/******************************************************************************/
+// Globals/Constants
+/******************************************************************************/
+
+
+/******************************************************************************/
+// Typedef/Enumerations
+/******************************************************************************/
+
+/******************************************************************************/
+// Class
+/******************************************************************************/
+
+// Singleton definition
+class IStepDispatcher;
+typedef Singleton<IStepDispatcher> theIStepDispatcher;
+
+
+/**
+ * @class IStepDispatcher Singleton Class
+ *
+ */
+class IStepDispatcher : public InitService
+{
+
+public:
+
+ /**
+ * @brief Get singleton instance of this class.
+ *
+ * @return the (one and only) instance of IStepDispatcher
+ */
+ static IStepDispatcher& getTheInstance();
+
+
+ /**
+ * @brief Provide an entry function into the class, called from _start()
+ *
+ * @param[in] i_pargs pointer to any arguments passed in from
+ * _start().
+ */
+ void init( void *i_pargs);
+
+protected:
+
+ /**
+ * @brief Constructor for the IStepDispatcher object.
+ */
+ IStepDispatcher();
+
+
+ /**
+ * @brief Destructor for the IStepDispatcher object.
+ */
+ ~IStepDispatcher();
+
+private:
+
+ /**
+ * @brief getIStepMode
+ * call into PNOR and fetch the "IStepMode flag" .
+ * This will tell us if we are locked to the SP (IStepMode=ON) or
+ * can run all the ISteps available (IStepMode=OFF).
+ *
+ * @return false if IStep Mode is "OFF"
+ * true if IStep Mode is "ON"
+ */
+ bool getIStepMode( ) const;
+
+
+ /**
+ * @brief getCanContinueProcedure
+ * If an IStep fails, this routine will fetch the recovery procedure
+ *
+ * @param[in] reference to IStepInfo struct for failing Istep
+ * @param[in] reference to errorlog for the failure
+ * @param[in,out] reference to IStepInfo struct for next IStep to run
+ *
+ * @return false if there is no Can-Continue procedure
+ * true otherwise
+ *
+ */
+ bool getCanContinueProcedure( TaskInfo &i_failingIStep,
+ errlHndl_t &i_failingError,
+ TaskInfo &io_nextIstep ) const;
+
+
+
+ bool iv_istepmodeflag;
+ uint64_t iv_nextistep;
+ bool iv_cancontinueflag;
+
+}; // class IStepDispatcher
+
+} // namespace ISTEPDISP
+
+#endif
diff --git a/src/usr/initservice/istepdispatcher/isteplist.H b/src/usr/initservice/istepdispatcher/isteplist.H
new file mode 100644
index 000000000..a72815a79
--- /dev/null
+++ b/src/usr/initservice/istepdispatcher/isteplist.H
@@ -0,0 +1,57 @@
+#ifndef __ISTEPS_H
+#define __ISTEPS_H
+/**
+ * @file extinitsvctasks.H
+ *
+ * TaskInfo structs for each task that will run in the extended image.
+ */
+
+#include <initservice/initsvcreasoncodes.H>
+#include "istepdispatcher.H"
+#include "../../isteps/isteps.H"
+
+namespace INITSERVICE
+{
+
+const uint64_t MAX_ISTEPS = 25;
+
+const TaskInfo isteps[] = {
+
+ // ----- ISteps Image ------------------------------------------
+
+ /**
+ * @brief targeting task, initializes extended module area
+ */
+ {
+ "istep1" , // istep name
+ ISTEPS::IStep1, // pointer to fn
+ {
+ NONE, // task type
+ EXT_IMAGE, // Extended Module
+ ISTEP_1_ERRL_ID, // module id
+ }
+ },
+
+ // ---------------------------------------------------------------
+ // ----- END OF LIST!!! ---------------------------------------
+ // ---------------------------------------------------------------
+
+ /**
+ * @brief last task in the list
+ */
+ {
+ "end" , // dummy string
+ NULL, // pointer to fn
+ {
+ END_TASK_LIST, // end of list
+ UNDEFINED_MT, // dummy module type
+ UNDEFINED_MODULE_ERRL_ID, // dummy errorlog
+ }
+ },
+
+};
+
+
+}; // namespace
+
+#endif // __EXT_INIT_SVC_TASKS_H
diff --git a/src/usr/initservice/istepdispatcher/makefile b/src/usr/initservice/istepdispatcher/makefile
new file mode 100644
index 000000000..6ccfbe797
--- /dev/null
+++ b/src/usr/initservice/istepdispatcher/makefile
@@ -0,0 +1,8 @@
+ROOTPATH = ../../../..
+MODULE = istepdisp
+
+OBJS = istepdispatcher.o
+
+## SUBDIRS = test.d
+
+include ${ROOTPATH}/config.mk
diff --git a/src/usr/initservice/makefile b/src/usr/initservice/makefile
index 3c57f7178..4b7333dec 100644
--- a/src/usr/initservice/makefile
+++ b/src/usr/initservice/makefile
@@ -5,7 +5,7 @@ ROOTPATH = ../../..
# NOTE: initsvcunittesttask2 is a dummy module that is executed by
# unit test 2 in the test directory. Please do not rename.
-SUBDIRS = baseinitsvc.d extinitsvc.d taskargs.d \
+SUBDIRS = baseinitsvc.d extinitsvc.d taskargs.d istepdispatcher.d \
test.d initsvcunittesttask2.d
include ${ROOTPATH}/config.mk
diff --git a/src/usr/initservice/taskargs/taskargs.C b/src/usr/initservice/taskargs/taskargs.C
index bfb50056a..26eb21804 100644
--- a/src/usr/initservice/taskargs/taskargs.C
+++ b/src/usr/initservice/taskargs/taskargs.C
@@ -108,4 +108,4 @@ TaskArgs::~TaskArgs()
barrier_destroy( &iv_sync_barrier );
}
-}; // namespace TASKARGS
+}; // namespace
diff --git a/src/usr/isteps/istep1.C b/src/usr/isteps/istep1.C
new file mode 100644
index 000000000..1a28f10e1
--- /dev/null
+++ b/src/usr/isteps/istep1.C
@@ -0,0 +1,51 @@
+/**
+ * @file isteps.C
+ *
+ * Collection of IStep modules
+ *
+ */
+
+
+/******************************************************************************/
+// Includes
+/******************************************************************************/
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <sys/task.h>
+
+#include <trace/interface.H> // trace support
+#include <errl/errlentry.H> // errlHndl_t
+#include <initservice/taskargs.H> // task args
+
+namespace ISTEPS
+{
+
+/******************************************************************************/
+// Globals/Constants
+/******************************************************************************/
+trace_desc_t *g_trac_istep1 = NULL;
+TRAC_INIT(&g_trac_istep1, "ISTEP1", 4096);
+
+extern "C"
+void IStep1( void * io_pArgs )
+{
+ INITSERVICE::TaskArgs::TaskArgs *pTaskArgs =
+ reinterpret_cast<INITSERVICE::TaskArgs::TaskArgs *>(io_pArgs);
+
+ TRACFCOMP( g_trac_istep1,
+ ENTER_MRK "starting IStep 1");
+
+
+
+ if ( pTaskArgs )
+ {
+ pTaskArgs->waitChildSync();
+ }
+
+ task_end();
+}
+
+
+} // namespace
diff --git a/src/usr/isteps/isteps.H b/src/usr/isteps/isteps.H
new file mode 100644
index 000000000..fedcd8f88
--- /dev/null
+++ b/src/usr/isteps/isteps.H
@@ -0,0 +1,20 @@
+/**
+ * @file isteps.H
+ *
+ * Prototypes of ISteps launched by IStepDispatcher
+ *
+ */
+
+
+/******************************************************************************/
+// Includes
+/******************************************************************************/
+#include <stdint.h>
+
+namespace ISTEPS
+{
+
+extern "C"
+void IStep1( void * io_pArgs );
+
+} // namespace
diff --git a/src/usr/isteps/makefile b/src/usr/isteps/makefile
new file mode 100644
index 000000000..1e1580136
--- /dev/null
+++ b/src/usr/isteps/makefile
@@ -0,0 +1,8 @@
+ROOTPATH = ../../..
+MODULE = isteps
+
+OBJS = istep1.o
+
+# SUBDIRS = test
+
+include ${ROOTPATH}/config.mk
diff --git a/src/usr/makefile b/src/usr/makefile
index 3cf04b4ea..2056bfa28 100644
--- a/src/usr/makefile
+++ b/src/usr/makefile
@@ -2,7 +2,8 @@ ROOTPATH = ../..
OBJS = module_init.o
-SUBDIRS = example.d trace.d cxxtest.d testcore.d errl.d devicefw.d \
- scom.d xscom.d targeting.d initservice.d hwpf.d ecmddatabuffer.d
+SUBDIRS = example.d trace.d cxxtest.d testcore.d errl.d devicefw.d \
+ scom.d xscom.d targeting.d initservice.d hwpf.d \
+ ecmddatabuffer.d isteps.d
include ${ROOTPATH}/config.mk
OpenPOWER on IntegriCloud