summaryrefslogtreecommitdiffstats
path: root/src/usr/initservice/istepdispatcher/istepdispatcher.H
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2012-04-05 18:23:58 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-04-09 07:29:59 -0500
commit5b536ece6c453b4662de8ec8e74ef2ff20a930ea (patch)
treef6d5422b757da9e82c6f8cb4332263ff1fe805b3 /src/usr/initservice/istepdispatcher/istepdispatcher.H
parent3dc6710d0ada5bbc248161cb67919faa5615ee05 (diff)
downloadtalos-hostboot-5b536ece6c453b4662de8ec8e74ef2ff20a930ea.tar.gz
talos-hostboot-5b536ece6c453b4662de8ec8e74ef2ff20a930ea.zip
Implement FSP Mailbox
Modify IStepDisp to communicate over the mailbox Q to FSP. If there is no FSP, spin off a task to emulate FSP and communicate with the hb-istep user console on VPO or Simics. RTC: 38871 Change-Id: I2a75a05fbdc559db516a711bff46a49e82580bb0 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/812 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/initservice/istepdispatcher/istepdispatcher.H')
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.H91
1 files changed, 62 insertions, 29 deletions
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.H b/src/usr/initservice/istepdispatcher/istepdispatcher.H
index b4842f5e9..e05660bd9 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.H
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.H
@@ -43,6 +43,10 @@
#include <stdint.h>
#include <util/singleton.H>
+#include <sys/msg.h>
+#include <mbox/mboxif.H> // mailbox Q
+#include <mbox/mbox_queues.H> // HB_ISTEP_MSGQ
+
#include <errl/errlentry.H>
#include <initservice/taskargs.H>
#include <initservice/initsvcreasoncodes.H>
@@ -52,20 +56,33 @@
#include "splesscommon.H"
+#include "istep_mbox_msgs.H"
+
namespace INITSERVICE
{
-// using namespace SPLESS;
-
/******************************************************************************/
// Globals/Constants
/******************************************************************************/
+
/******************************************************************************/
// Typedef/Enumerations
/******************************************************************************/
+/**
+ * @brief detached task (daemon) to handle communication from
+ * VPO / Simics user console.
+ *
+ * param[in,out] - pointer to any args
+ *
+ * @return nothing
+ *
+ */
+void spTask( void *io_pArgs );
+
+
/******************************************************************************/
// Class IStepDispatcher
/******************************************************************************/
@@ -100,13 +117,21 @@ public:
/**
- * @brief Handle an istep break point
+ * @brief Handle an istep break point to FSP
+ * @param[in] i_info, @TODO - location/info
+ *
+ * @note blocks until an outside istep cmd to resume is received.
+ */
+ void handleBreakPoint( uint32_t info);
+
+ /**
+ * @brief Handle an istep break point from SPless
* @param[in] i_info, @TODO - location/info
* @pre iv_sts contains current istep status + seqnum or
* 0 if not in step mode
* @note blocks until an outside istep cmd to resume is recieved.
*/
- void handleBreakPoint( uint32_t info);
+ void handleSPlessBreakPoint( uint32_t info);
protected:
@@ -129,7 +154,6 @@ private:
IStepDispatcher(const IStepDispatcher& i_right);
IStepDispatcher& operator=(const IStepDispatcher& i_right);
-
/**
* @brief getIStepMode - return value of IStep Mode
*
@@ -152,46 +176,35 @@ private:
*
*/
const TaskInfo *findTaskInfo(
- const uint16_t i_IStep,
- const uint16_t i_SubStep ) const;
-
- /**
- * @brief Command 0: Run the requested IStep/SubStep
- *
- * param[in] i_rcmd - ref to a filled in SPLessCmd struct
- * @post iv_sts set to current istep status
- *
- * @return none
- */
- void processSingleIStepCmd( SPLESS::SPLessCmd &i_rcmd);
-
+ const uint32_t i_IStep,
+ const uint32_t i_SubStep ) const;
/**
- * @brief singleStepISteps
+ * @brief runAllISteps
+ *
+ * Run all available ISteps sequentially.
+ * If an IStep gets an error, report it and stop.
+ * Otherwise, return.
*
- * Stop and wait for SP to send the next IStep to run. Run that, then
- * wait for the next one.
* @param[in,out] - ref to an errlHndl_t that can be passed back to
* ExtInitSvc .
*
* @return none
*/
- void singleStepISteps( errlHndl_t &io_rtaskRetErrl ) ;
+ void runAllISteps( errlHndl_t &io_rtaskRetErrl ) ;
/**
- * @brief runAllISteps
+ * @brief singleStepISteps
*
- * Run all available ISteps sequentially.
- * If an IStep gets an error, report it and stop.
- * Otherwise, return.
+ * Go into a polling loop, waiting for Istep commands from
+ * the FSP or SPTask.
*
* @param[in,out] - ref to an errlHndl_t that can be passed back to
* ExtInitSvc .
- *
* @return none
*/
- void runAllISteps( errlHndl_t &io_rtaskRetErrl ) const;
+ void singleStepISteps( errlHndl_t &io_rtaskRetErrl ) ;
/**
@@ -222,11 +235,31 @@ private:
TaskInfo &io_nextIStep ) const;
+ /**
+ * @brief Command 0: Run the requested IStep/SubStep
+ *
+ * param[in] i_IStep - IStep number
+ * param[in] i_Substep - Substep number
+ * param[out] o_rSts - lookup status - returns Invalid if the
+ * IStep, Substep doesn't exist
+ *
+ * @post iv_sts set to current istep status
+ *
+ * @return errlHndl_t
+ */
+ errlHndl_t processSingleIStepCmd(
+ const uint32_t i_IStep,
+ const uint32_t i_Substep,
+ uint32_t &o_rSts );
+
+
+
// ----- internal vars -----------------------------
mutex_t iv_poll_mutex; //!< protect who's polling istep cmds
SPLESS::SPLessSts iv_sts; //!< Current status of istep mode
-
+ msg_q_t iv_msgQ; //!< Message Q to FSP & SPTask.
+ msg_t *iv_pMsg; //!< ptr to msg from FSP or user console
}; // class IStepDispatcher
OpenPOWER on IntegriCloud