summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2012-11-02 17:30:38 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-11-09 10:33:26 -0600
commite7dd783e147db6078a88a87c96723b8a5c9d218e (patch)
tree9cf4de174c382e3a73507f69c7d5197f126b80bc
parent151844793242c9ebf8ce127829a1f581943257fa (diff)
downloadtalos-hostboot-e7dd783e147db6078a88a87c96723b8a5c9d218e.tar.gz
talos-hostboot-e7dd783e147db6078a88a87c96723b8a5c9d218e.zip
IPL service not returning error on invalid isteps
Change-Id: I7f782eadaa23db2589689abd09aa8e1e22827a01 RTC: 47594 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2241 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rwxr-xr-xsrc/build/debug/Hostboot/Istep.pm4
-rw-r--r--src/include/usr/initservice/initsvcreasoncodes.H46
-rw-r--r--src/usr/initservice/istepdispatcher/istepWorker.C38
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.C9
4 files changed, 59 insertions, 38 deletions
diff --git a/src/build/debug/Hostboot/Istep.pm b/src/build/debug/Hostboot/Istep.pm
index 06d6f8594..a4aee621f 100755
--- a/src/build/debug/Hostboot/Istep.pm
+++ b/src/build/debug/Hostboot/Istep.pm
@@ -434,6 +434,10 @@ sub get_istep_list()
my @isteplist = ::getIstepList();
+ ## DEBUG: Comment in to test invalid minor and invalid major isteps
+ ## $inList[7][8] = "invalid_minor";
+ ## $inList[0][17] = "invalid_major";
+
foreach( @isteplist )
{
chomp;
diff --git a/src/include/usr/initservice/initsvcreasoncodes.H b/src/include/usr/initservice/initsvcreasoncodes.H
index f576af928..ac7da0296 100644
--- a/src/include/usr/initservice/initsvcreasoncodes.H
+++ b/src/include/usr/initservice/initsvcreasoncodes.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/initservice/initsvcreasoncodes.H $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2011-2012
- *
- * 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_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/initservice/initsvcreasoncodes.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* */
+/* 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 initsvcreasoncodes.H
*
@@ -72,6 +71,7 @@ enum InitServiceReasonCode
ISTEP_FAILED = INITSVC_COMP_ID | 0x10,
LAST_ISTEP_FAILED = INITSVC_COMP_ID | 0x11,
NO_MSG_PRESENT = INITSVC_COMP_ID | 0x12,
+ ISTEP_INVALID_ISTEP = INITSVC_COMP_ID | 0x13,
};
diff --git a/src/usr/initservice/istepdispatcher/istepWorker.C b/src/usr/initservice/istepdispatcher/istepWorker.C
index fc625c694..09074a8ae 100644
--- a/src/usr/initservice/istepdispatcher/istepWorker.C
+++ b/src/usr/initservice/istepdispatcher/istepWorker.C
@@ -166,9 +166,29 @@ void iStepWorkerThread ( void * i_msgQ )
}
else
{
- // Nothing to do for this step.
- TRACDCOMP( g_trac_initsvc,
- INFO_MRK"Empty Istep, nothing to do!" );
+
+ // This istep should have not been sent here to run, make up
+ // an errorlog and return it.
+ /*@
+ * @errortype
+ * @reasoncode ISTEP_INVALID_ISTEP
+ * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE
+ * @moduleid ISTEP_INITSVC_MOD_ID
+ * @userdata1 Current Istep
+ * @userdata2 Current SubStep
+ * @devdesc An invalid istep or substep was passed.
+ */
+ err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ ISTEP_INITSVC_MOD_ID,
+ ISTEP_INVALID_ISTEP,
+ istep,
+ substep );
+
+ TRACFCOMP( g_trac_initsvc,
+ ERR_MRK"Invalid Istep %d.%d, return errlog plid=0x%x",
+ istep,
+ substep,
+ err->plid() );
}
// flush contTrace after each istep/substep returns
@@ -193,18 +213,6 @@ const TaskInfo * findTaskInfo( const uint32_t i_IStep,
{
// default return is NULL
const TaskInfo *l_pistep = NULL;
- /**
- * @todo
- * everything calling this should feed into the "real" istep/substep
- * numbers ( starting at 1 ) - this routine should translate to index into
- * the isteplists ( starting at 0 )
- *
- * int32_t l_istepIndex = i_IStep-1;
- * int32_t l_substepIndex = i_SubStep-1;
- *
- * assert( l_istepIndex >= 0 );
- * assert( l_substepIndex >= 0 );
- */
// apply filters
do
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
index 5dc4b7547..7e8352714 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.C
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
@@ -248,6 +248,15 @@ errlHndl_t IStepDispatcher::executeAllISteps ( void )
substep < (g_isteps[istep].numitems + 1);
substep++ )
{
+ // If the istep/substep doesn't exist, skip it.
+ if ( findTaskInfo( istep, substep ) == NULL )
+ {
+ TRACFCOMP( g_trac_initsvc,
+ INFO_MRK"Empty istep %d.%d, continuing...",
+ istep,
+ substep );
+ continue;
+ }
// Before we can do anything, we need to be sure the worker thread is
// ready to start
theMsg = msg_wait( iv_msgQ );
OpenPOWER on IntegriCloud