summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2011-11-07 11:53:10 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-11-16 11:49:13 -0600
commit1e3a888edab060be5b016aff86a5d547b5be6643 (patch)
tree58c80102de769ab705ba0cfd85ee5efd7ec48fa2 /src/usr/hwas
parentb5e455d063830a51f8282b5c0e857d14dedbaad3 (diff)
downloadtalos-hostboot-1e3a888edab060be5b016aff86a5d547b5be6643.tar.gz
talos-hostboot-1e3a888edab060be5b016aff86a5d547b5be6643.zip
RTC4319: Shutdown if IStep fails
- add macro to report error to testHWP.C - new TASKARGS macros (prepare for join change) - istep dispatcher, extinitsvc and initsvc now call shutdown() - pass error codes to parent task - fix errorlog tags, see RTC3840 - added ErrlUserDetails module, mostly for debug - review fixes Change-Id: Ib5009f1bf0f7657d4da5bd6d1ecf64e6113b3383 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/486 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwas')
-rw-r--r--src/usr/hwas/hwas.C166
-rw-r--r--src/usr/hwas/testHWP.C8
2 files changed, 97 insertions, 77 deletions
diff --git a/src/usr/hwas/hwas.C b/src/usr/hwas/hwas.C
index f5948e859..0d0883ed7 100644
--- a/src/usr/hwas/hwas.C
+++ b/src/usr/hwas/hwas.C
@@ -46,111 +46,127 @@
namespace HWAS
{
- trace_desc_t *g_trac_hwas = NULL;
- TRAC_INIT(&g_trac_hwas, "HWAS", 1024 ); // yah.
+trace_desc_t *g_trac_hwas = NULL;
+TRAC_INIT(&g_trac_hwas, "HWAS", 1024 );
- using namespace TARGETING; //
+using namespace TARGETING;
- void init_target_states( void *io_pArgs )
- {
- TASKARGS_INIT_TASKARGS( io_pArgs );
+void init_target_states( void *io_pArgs )
+{
+ INITSERVICE::TaskArgs *pTaskArgs =
+ static_cast<INITSERVICE::TaskArgs *>( io_pArgs );
- TRACDCOMP( g_trac_hwas, "init_target_states entry" );
- // printkd("init_target_states\n");
+ TRACDCOMP( g_trac_hwas, "init_target_states entry" );
- TASKARGS_WAIT_AND_ENDTASK();
- }
+ // wait here on the barrier, then end the task.
+ pTaskArgs->waitChildSync();
+ task_end();
+}
- void init_fsi( void *io_pArgs )
- {
- errlHndl_t l_errl = NULL;
- TASKARGS_INIT_TASKARGS( io_pArgs );
-
- TRACDCOMP( g_trac_hwas, "init_fsi entry" );
- // printkd("init_fsi\n");
-
- //@todo
- //@VBU workaround - Disable init_fsi
- //Temporarily disable the FSI initialization in VBU because of
- //an MFSI/CFSI XSCOM hardware bug.
- TARGETING::EntityPath syspath(TARGETING::EntityPath::PATH_PHYSICAL);
- syspath.addLast(TARGETING::TYPE_SYS,0);
- TARGETING::Target* sys = TARGETING::targetService().toTarget(syspath);
- uint8_t vpo_mode = 0;
- if( sys
+void init_fsi( void *io_pArgs )
+{
+ errlHndl_t l_errl = NULL;
+ INITSERVICE::TaskArgs *pTaskArgs =
+ static_cast<INITSERVICE::TaskArgs *>( io_pArgs );
+
+ TRACDCOMP( g_trac_hwas, "init_fsi entry" );
+
+ //@todo
+ //@VBU workaround - Disable init_fsi
+ //Temporarily disable the FSI initialization in VBU because of
+ //an MFSI/CFSI XSCOM hardware bug.
+ TARGETING::EntityPath syspath(TARGETING::EntityPath::PATH_PHYSICAL);
+ syspath.addLast(TARGETING::TYPE_SYS,0);
+ TARGETING::Target* sys = TARGETING::targetService().toTarget(syspath);
+ uint8_t vpo_mode = 0;
+ if( sys
&& sys->tryGetAttr<TARGETING::ATTR_VPO_MODE>(vpo_mode)
&& (vpo_mode == 1) )
- {
- TASKARGS_WAIT_AND_ENDTASK();
- TRACFCOMP( g_trac_hwas, "HWBUG Workaround - No FSI initialization");
- return;
- }
-
- l_errl = FSI::initializeHardware( );
- if ( l_errl )
- {
- TRACFCOMP( g_trac_hwas, "ERROR: failed to init FSI hardware" );
- POST_ERROR_LOG( l_errl );
- }
-
- TASKARGS_WAIT_AND_ENDTASK();
+ {
+ // wait here on the barrier, then end the task.
+ pTaskArgs->waitChildSync();
+ task_end();
+ TRACFCOMP( g_trac_hwas, "HWBUG Workaround - No FSI initialization");
+ return;
}
- void apply_fsi_info( void *io_pArgs )
+ l_errl = FSI::initializeHardware( );
+ if ( l_errl )
{
- TASKARGS_INIT_TASKARGS( io_pArgs );
+ TRACFCOMP( g_trac_hwas, "ERROR: failed to init FSI hardware" );
+ pTaskArgs->postErrorLog( l_errl );
+ }
- TRACDCOMP( g_trac_hwas, "apply_fsi_info entry" );
- //printkd("apply_fsi_info\n");
+ // wait here on the barrier, then end the task.
+ pTaskArgs->waitChildSync();
+ task_end();
+}
+void apply_fsi_info( void *io_pArgs )
+{
+ INITSERVICE::TaskArgs *pTaskArgs =
+ static_cast<INITSERVICE::TaskArgs *>( io_pArgs );
- TASKARGS_WAIT_AND_ENDTASK();
- }
+ TRACDCOMP( g_trac_hwas, "apply_fsi_info entry" );
- void apply_dd_presence( void *io_pArgs )
- {
- TASKARGS_INIT_TASKARGS( io_pArgs );
- TRACDCOMP( g_trac_hwas, "apply_dd_presence entry" );
- //printkd("apply_dd_presence\n");
+ // wait here on the barrier, then end the task.
+ pTaskArgs->waitChildSync();
+ task_end();
+}
+void apply_dd_presence( void *io_pArgs )
+{
+ INITSERVICE::TaskArgs *pTaskArgs =
+ static_cast<INITSERVICE::TaskArgs *>( io_pArgs );
- TASKARGS_WAIT_AND_ENDTASK();
- }
+ TRACDCOMP( g_trac_hwas, "apply_dd_presence entry" );
- void apply_pr_keyword_data( void *io_pArgs )
- {
- TASKARGS_INIT_TASKARGS( io_pArgs );
- TRACDCOMP( g_trac_hwas, "apply_pr_keyword_data" );
- //printkd("apply_pr_keyword_data\n");
+ // wait here on the barrier, then end the task.
+ pTaskArgs->waitChildSync();
+ task_end();
+}
+void apply_pr_keyword_data( void *io_pArgs )
+{
+ INITSERVICE::TaskArgs *pTaskArgs =
+ static_cast<INITSERVICE::TaskArgs *>( io_pArgs );
- TASKARGS_WAIT_AND_ENDTASK();
- }
+ TRACDCOMP( g_trac_hwas, "apply_pr_keyword_data" );
- void apply_partial_bad( void *io_pArgs )
- {
- TASKARGS_INIT_TASKARGS( io_pArgs );
- TRACDCOMP( g_trac_hwas, "apply_partial_bad entry" );
- //printkd("apply_partial_bad\n");
+ // wait here on the barrier, then end the task.
+ pTaskArgs->waitChildSync();
+ task_end();
+}
+void apply_partial_bad( void *io_pArgs )
+{
+ INITSERVICE::TaskArgs *pTaskArgs =
+ static_cast<INITSERVICE::TaskArgs *>( io_pArgs );
- TASKARGS_WAIT_AND_ENDTASK();
- }
+ TRACDCOMP( g_trac_hwas, "apply_partial_bad entry" );
- void apply_gard( void *io_pArgs )
- {
- TASKARGS_INIT_TASKARGS( io_pArgs );
- TRACDCOMP( g_trac_hwas, "apply_gard entry" );
- //printkd("apply_gard\n");
+ // wait here on the barrier, then end the task.
+ pTaskArgs->waitChildSync();
+ task_end();
+}
+void apply_gard( void *io_pArgs )
+{
+ INITSERVICE::TaskArgs *pTaskArgs =
+ static_cast<INITSERVICE::TaskArgs *>( io_pArgs );
- TASKARGS_WAIT_AND_ENDTASK();
- }
+ TRACDCOMP( g_trac_hwas, "apply_gard entry" );
+
+
+ // wait here on the barrier, then end the task.
+ pTaskArgs->waitChildSync();
+ task_end();
+}
}; // end namespace
diff --git a/src/usr/hwas/testHWP.C b/src/usr/hwas/testHWP.C
index 6bb0f851f..febd985a4 100644
--- a/src/usr/hwas/testHWP.C
+++ b/src/usr/hwas/testHWP.C
@@ -69,7 +69,8 @@ extern trace_desc_t *g_trac_hwas;
void testHWP( void * io_pArgs )
{
- TASKARGS_INIT_TASKARGS(io_pArgs);
+ INITSERVICE::TaskArgs *pTaskArgs =
+ static_cast<INITSERVICE::TaskArgs *>( io_pArgs );
errlHndl_t l_err = NULL;
// Get the master processor chip
@@ -86,9 +87,12 @@ void testHWP( void * io_pArgs )
{
TRACFCOMP( g_trac_hwas, "testHWP failed, committing errorlog");
errlCommit(l_err,HWAS_COMP_ID);
+ pTaskArgs->postReturnCode( 0x1234 );
}
- TASKARGS_WAIT_AND_ENDTASK();
+ // wait here on the barrier, then end the task.
+ pTaskArgs->waitChildSync();
+ task_end();
}
OpenPOWER on IntegriCloud