summaryrefslogtreecommitdiffstats
path: root/src/usr/initservice
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2014-01-27 15:33:09 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-02-14 12:41:36 -0600
commit10a93afdbdd5bccc9a10b797d66b008580ba16bb (patch)
treecaddb050384fe2eb4cd8844c59a28d9ea9e8b7c0 /src/usr/initservice
parent5850220077f29041920e83de66ec458dac9c82a7 (diff)
downloadtalos-hostboot-10a93afdbdd5bccc9a10b797d66b008580ba16bb.tar.gz
talos-hostboot-10a93afdbdd5bccc9a10b797d66b008580ba16bb.zip
Hostboot Serviceability Review Part 2
Resolving TODOs and ensuring error logs have correct callouts Change-Id: Ic2e65427487fb91553ffe4ed6e3ed922004963ba RTC: 92837 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8374 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/initservice')
-rw-r--r--src/usr/initservice/baseinitsvc/initservice.C51
-rw-r--r--src/usr/initservice/baseinitsvc/initservice.H16
-rw-r--r--src/usr/initservice/extinitsvc/extinitsvc.C25
-rw-r--r--src/usr/initservice/extinitsvc/extinitsvctasks.H4
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.C8
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.H4
-rw-r--r--src/usr/initservice/istepdispatcher/sptask.C9
-rw-r--r--src/usr/initservice/test/initservicetest.H46
8 files changed, 47 insertions, 116 deletions
diff --git a/src/usr/initservice/baseinitsvc/initservice.C b/src/usr/initservice/baseinitsvc/initservice.C
index ece13d59a..3abdea1c5 100644
--- a/src/usr/initservice/baseinitsvc/initservice.C
+++ b/src/usr/initservice/baseinitsvc/initservice.C
@@ -116,14 +116,12 @@ errlHndl_t InitService::checkNLoadModule( const TaskInfo *i_ptask ) const
* UserDetails will contain the name of the
* function or task.
*/
+ const bool hbSwError = true;
l_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM,
INITSERVICE::BASE_INITSVC_MOD_ID,
INITSERVICE::INITSVC_LOAD_MODULE_FAILED,
- 0,
- 0 );
-
- // error, break out of do block
+ 0, 0, hbSwError);
break;
}
@@ -170,7 +168,6 @@ errlHndl_t InitService::startTask(
assert( i_ptask != NULL );
- // assert( i_ptask->taskflags.task_type == START_TASK );
do {
// Base modules have already been loaded and initialized,
@@ -217,14 +214,12 @@ errlHndl_t InitService::startTask(
* @devdesc Initialization Service failed to start a task.
*
*/
+ const bool hbSwError = true;
l_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM,
INITSERVICE::BASE_INITSVC_MOD_ID,
INITSERVICE::START_TASK_FAILED,
- 0,
- l_tidlnchrc );
-
- // break out of do block
+ 0, l_tidlnchrc, hbSwError);
break;
} // endif tidlnchrc
@@ -258,14 +253,12 @@ errlHndl_t InitService::startTask(
* the task returned an error.
*
*/
+ const bool hbSwError = true;
l_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM,
INITSERVICE::BASE_INITSVC_MOD_ID,
INITSERVICE::WAIT_TASK_FAILED,
- l_tidretrc,
- l_childsts );
-
- // break out of do block
+ l_tidretrc, l_childsts, hbSwError);
break;
} // endif tidretrc
@@ -344,14 +337,12 @@ errlHndl_t InitService::executeFn(
* function within a module but the function
* failed to launch
*/
+ const bool hbSwError = true;
l_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM,
INITSERVICE::BASE_INITSVC_MOD_ID,
INITSERVICE::START_FN_FAILED,
- l_tidlnchrc,
- 0 );
-
- // break out with errorlog set
+ l_tidlnchrc, 0, hbSwError);
break;
} // endif tidlnchrc
@@ -380,12 +371,12 @@ errlHndl_t InitService::executeFn(
*
*
*/
+ const bool hbSwError = true;
l_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM,
INITSERVICE::BASE_INITSVC_MOD_ID,
INITSERVICE::WAIT_FN_FAILED,
- l_tidretrc,
- l_childsts );
+ l_tidretrc, l_childsts, hbSwError);
TRACFCOMP(g_trac_initsvc,
"ERROR : task_wait_tid(0x%x). '%s', l_tidretrc=0x%x, l_childsts=0x%x",
@@ -426,18 +417,6 @@ errlHndl_t InitService::executeFn(
return l_errl;
}
-
-/**
- * @todo this will make a system call to post the progress code.
- *
- */
-void InitService::setProgressCode( uint64_t i_progresscode ) const
-{
-
- // do nothing for now
-}
-
-
errlHndl_t InitService::dispatchTask( const TaskInfo *i_ptask,
void *io_pargs ) const
{
@@ -499,15 +478,15 @@ errlHndl_t InitService::dispatchTask( const TaskInfo *i_ptask,
void InitService::init( void *io_ptr )
{
+ // Detach this task from the parent
+ task_detach();
+
errlHndl_t l_errl = NULL;
uint64_t l_task = 0;
const TaskInfo *l_ptask = NULL;
// init shutdown status to good.
uint64_t l_shutdownStatus = SHUTDOWN_STATUS_GOOD;
- // @todo detach from parent.
- // $$ task_detach();
-
printk( "InitService entry.\n" );
TRACFCOMP( g_trac_initsvc,
@@ -753,10 +732,12 @@ void InitService::doShutdown(uint64_t i_status,
* @defdesc Could not FLUSH virtual memory.
*
*/
+ const bool hbSwError = true;
l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM,
INITSERVICE::BASE_INITSVC_MOD_ID,
- INITSERVICE::SHUTDOWN_FLUSH_FAILED,l_rc,0);
+ INITSERVICE::SHUTDOWN_FLUSH_FAILED,
+ l_rc, 0, hbSwError);
//Commit and attempt flushing other registered blocks
errlCommit( l_err, INITSVC_COMP_ID );
l_err = NULL;
diff --git a/src/usr/initservice/baseinitsvc/initservice.H b/src/usr/initservice/baseinitsvc/initservice.H
index cf4536a86..4cae3b270 100644
--- a/src/usr/initservice/baseinitsvc/initservice.H
+++ b/src/usr/initservice/baseinitsvc/initservice.H
@@ -133,22 +133,6 @@ public:
errlHndl_t executeFn( const TaskInfo *i_ptask,
void *i_pargs ) const;
-
- /**
- * @brief set progress code for task.
- * This is supposed to make a system call to post the error to
- * SP and will also write a SCOM reg
- *
- * @TODO need progress code categories defined.
- *
- * @param[in] i_progresscode - 64-bit progress code.
- *
- * @return nothing
- *
- */
- void setProgressCode( uint64_t i_progresscode ) const;
-
-
/**
* @brief dispatch Task depending on what type of task it is,
* etc.
diff --git a/src/usr/initservice/extinitsvc/extinitsvc.C b/src/usr/initservice/extinitsvc/extinitsvc.C
index 323624681..ac94e31c3 100644
--- a/src/usr/initservice/extinitsvc/extinitsvc.C
+++ b/src/usr/initservice/extinitsvc/extinitsvc.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* COPYRIGHT International Business Machines Corp. 2011,2014 */
/* */
/* p1 */
/* */
@@ -64,9 +64,6 @@ void ExtInitSvc::init( errlHndl_t &io_rtaskRetErrl )
printk( "ExtInitSvc entry.\n" );
- // @todo detach from initservice
- // task_detach();
-
TRACFCOMP( g_trac_initsvc,
"Extended Initialization Service is starting." );
@@ -105,25 +102,7 @@ void ExtInitSvc::init( errlHndl_t &io_rtaskRetErrl )
// die if we drop out with an error
if ( l_errl )
{
-
-#if 0
- // @todo detach this task and just terminate task
- // Commit the errorlog here.
- TRACFCOMP( g_trac_initsvc,
- "ExtInitSvc ERROR: Committing errorlog %p & shutdown",
- l_errl );
- errlCommit( l_errl, INITSVC_COMP_ID );
-
- // Tell the kernel to shut down. This will not actually
- // happen until the last thread has ended.
- INITSERVICE::doShutdown(SHUTDOWN_STATUS_EXTINITSVC_FAILED);
-
- // end the task.
- io_rtaskRetErrl=NULL;
- return;
-#endif
-
- // end the task and pass the errorlog to initservice to be committed.
+ // pass the errorlog to initservice to be committed.
// initservice should do the shutdown.
TRACFCOMP( g_trac_initsvc,
"ExtInitSvc: ERROR: return to initsvc with errlog %p",
diff --git a/src/usr/initservice/extinitsvc/extinitsvctasks.H b/src/usr/initservice/extinitsvc/extinitsvctasks.H
index 0a5b2dc19..f553143f3 100644
--- a/src/usr/initservice/extinitsvc/extinitsvctasks.H
+++ b/src/usr/initservice/extinitsvc/extinitsvctasks.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* COPYRIGHT International Business Machines Corp. 2011,2014 */
/* */
/* p1 */
/* */
@@ -306,8 +306,6 @@ const TaskInfo g_exttaskinfolist[] = {
},
-// end TODO.
-
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// NOTE: libistepdisp.so needs to always be last in this list!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
index 8483e471c..b52a21d23 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.C
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
@@ -674,7 +674,7 @@ void IStepDispatcher::loadModules(uint32_t istepNumber) const
uint32_t i = 0;
while( ( l_errl == NULL ) &&
- ( g_isteps[istepNumber].depModules->modulename[i][0] != 0) )
+ ( g_isteps[istepNumber].depModules->modulename[i] != NULL) )
{
TRACFCOMP( g_trac_initsvc,
"loading [%s]",
@@ -713,7 +713,7 @@ void IStepDispatcher::unLoadModules(uint32_t istepNumber) const
uint32_t i = 0;
while( ( l_errl == NULL ) &&
- ( g_isteps[istepNumber].depModules->modulename[i][0] != 0) )
+ ( g_isteps[istepNumber].depModules->modulename[i] != NULL) )
{
TRACFCOMP( g_trac_initsvc,
"unloading [%s]",
@@ -947,11 +947,11 @@ errlHndl_t IStepDispatcher::sendIstepCompleteMsg()
* @devdesc Request to send Istep Complete msg to Fsp, but
* no outstanding message from Fsp found.
*/
+ const bool hbSwError = true;
err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE,
ISTEP_INITSVC_MOD_ID,
NO_MSG_PRESENT,
- curIStep,
- curSubStep );
+ curIStep, curSubStep, hbSwError );
}
TRACFCOMP( g_trac_initsvc, EXIT_MRK"IStepDispatcher::sendIstepCompleteMsg");
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.H b/src/usr/initservice/istepdispatcher/istepdispatcher.H
index 9b5ceaa8d..ba6209d3c 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.H
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.H
@@ -138,9 +138,7 @@ public:
*
* Sends a BREAKPOINT message to the FSP and waits for a response
*
- * @param[in] i_info - TODO - this needs to be decided yet. But it seems
- * at least preliminarily that this will contain a unique breakpoint
- * numbering value.
+ * @param[in] i_info - Unique breakpoint numbering value.
*/
void iStepBreakPoint(uint32_t i_info);
diff --git a/src/usr/initservice/istepdispatcher/sptask.C b/src/usr/initservice/istepdispatcher/sptask.C
index ccbf280e0..cab9784f2 100644
--- a/src/usr/initservice/istepdispatcher/sptask.C
+++ b/src/usr/initservice/istepdispatcher/sptask.C
@@ -231,16 +231,9 @@ void userConsoleComm( void * io_msgQ )
} // endif gobit
// sleep, and wait for user to give us something else to do.
- /**
- * @todo Need a common method of doing delays in HostBoot
- * @VBU workaround
- */
- // Don't delay as long in VBU because it will take VERY long to
- // run the simulator
if( TARGETING::is_vpo() )
{
- // VBU delay per Patrick
- //TODO tmp remove for VPO, need better polling strategy -- RTC43738
+ // In VPO/VBU, yield the task, any real delay takes too long
task_yield();
}
else
diff --git a/src/usr/initservice/test/initservicetest.H b/src/usr/initservice/test/initservicetest.H
index 5cbd77111..c4e569e98 100644
--- a/src/usr/initservice/test/initservicetest.H
+++ b/src/usr/initservice/test/initservicetest.H
@@ -1,25 +1,25 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/initservice/test/initservicetest.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/initservice/test/initservicetest.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/**
* @file initservicetest.H
@@ -72,8 +72,6 @@ const INITSERVICE::TaskInfo TASK_TEST2 = {
/**
* @brief set up a dummy TaskInfo struct.
* libtrace does NOT have a _start() function so this should return an errorlog.
- *
- * @todo this needs to be replaced with a test module
*/
const INITSERVICE::TaskInfo TASK_TEST3 = {
"libtrace.so" , // taskname
OpenPOWER on IntegriCloud