diff options
-rwxr-xr-x | src/build/debug/Hostboot/Istep.pm | 8 | ||||
-rw-r--r-- | src/include/usr/initservice/initsvcreasoncodes.H | 3 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/istep_mbox_msgs.H | 19 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.C | 28 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/sptask.C | 58 |
5 files changed, 26 insertions, 90 deletions
diff --git a/src/build/debug/Hostboot/Istep.pm b/src/build/debug/Hostboot/Istep.pm index fe23e3a5a..e9238f103 100755 --- a/src/build/debug/Hostboot/Istep.pm +++ b/src/build/debug/Hostboot/Istep.pm @@ -74,8 +74,6 @@ use constant RUN_ALL_MODE_SIGNATURE => 0xBADC0FFEE0DDF00D; use constant SPLESS_SINGLE_ISTEP_CMD => 0x00; use constant SPLESS_RESUME_ISTEP_CMD => 0x01; use constant SPLESS_CLEAR_TRACE_CMD => 0x02; -use constant SPLESS_SHUTDOWN_CMD => 0x03; - use constant MAX_ISTEPS => 25; use constant MAX_SUBSTEPS => 25; @@ -157,7 +155,7 @@ sub main ::userDisplay "Welcome to hb-Istep 3.31 .\n"; ::userDisplay "Note that in simics, multiple options must be in quotes,"; ::userDisplay "separated by spaces\n\n"; - + ## initialize inList to "undefined" $inList[MAX_ISTEPS][MAX_SUBSTEPS] = (); for( my $i = 0; $i < MAX_ISTEPS; $i++) @@ -166,8 +164,8 @@ sub main { undef( $inList[$i][$j] ); } - } - + } + ## --------------------------------------------------------------------------- ## Fetch the symbols we need from syms file ## --------------------------------------------------------------------------- diff --git a/src/include/usr/initservice/initsvcreasoncodes.H b/src/include/usr/initservice/initsvcreasoncodes.H index 7260da178..f576af928 100644 --- a/src/include/usr/initservice/initsvcreasoncodes.H +++ b/src/include/usr/initservice/initsvcreasoncodes.H @@ -48,7 +48,6 @@ enum InitServiceModuleID EXT_INITSVC_MOD_ID = 0x02, ISTEP_INITSVC_MOD_ID = 0x03, CXXTEST_MOD_ID = 0x04, - INITSVC_DO_SHUTDOWN_MOD_ID = 0x05, }; @@ -65,7 +64,7 @@ enum InitServiceReasonCode WAIT_TASK_FAILED = INITSVC_COMP_ID | 0x08, WAIT_FN_FAILED = INITSVC_COMP_ID | 0x09, INITSVC_LOAD_MODULE_FAILED = INITSVC_COMP_ID | 0x0a, - ISTEP_SHUTDOWN = INITSVC_COMP_ID | 0x0b, + // not used ISTEP_SINGLESTEP_ASYNC_RCVD = INITSVC_COMP_ID | 0x0c, ISTEP_BKPOINT_ASYNC_RCVD = INITSVC_COMP_ID | 0x0d, ISTEP_WAITFORSYNC_BAD_MSG = INITSVC_COMP_ID | 0x0e, diff --git a/src/usr/initservice/istepdispatcher/istep_mbox_msgs.H b/src/usr/initservice/istepdispatcher/istep_mbox_msgs.H index e002a7aba..d61d41d65 100644 --- a/src/usr/initservice/istepdispatcher/istep_mbox_msgs.H +++ b/src/usr/initservice/istepdispatcher/istep_mbox_msgs.H @@ -55,18 +55,6 @@ enum }; // ------------------------------------------------------------------ -// SPLess Msg Type Enums -enum -{ - // Randomly picked 0xAA since SPLess mode looks at this to know whether it - // got a shutdown. originall was 0x0, and shutdown every time. - // TODO - need to check if the simics script needs to know this value. - // Opened Issue 45042 to have this as well as hb-istep support of shutdown - // removed. - SPLESS_SHUTDOWN_CMD = 0xAA, -}; - -// ------------------------------------------------------------------ // Msgs that IstepDispatcher can accept enum { @@ -88,13 +76,6 @@ enum ISTEP_WORKER_MSG | WORKER_BREAKPOINT, - // -------------------------------------------------------------- - // SPLess Messages - // -------------------------------------------------------------- - SHUTDOWN_SPLESS = MBOX::FIRST_SECURE_MSG | - SPLESS_MSG | - SPLESS_SHUTDOWN_CMD, - }; } // namespace diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index 2c0ad4d67..04a6c329d 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -361,34 +361,16 @@ errlHndl_t IStepDispatcher::msgHndlr ( void ) case MORE_WORK_NEEDED: // Worker thread is ready for more work. iv_workerMsg = theMsg; - // The very first MORE_WORK_NEEDED message will + // The very first MORE_WORK_NEEDED message will // have theMsg->data[0] set to 1. It is set to 0 // for subsequent messages. handleMoreWorkNeededMsg // needs to know the very first MORE_WORK_NEEDED msg - // to handle the case that a msg is queued in the + // to handle the case that a msg is queued in the // mbox msg queue before this first MORE_WORK_NEEDED // is received. handleMoreWorkNeededMsg( (theMsg->data[0] == 1) ); break; - case SHUTDOWN_SPLESS: - // Creat errorlog to return as part of the shutdown. - /*@ - * @errortype - * @reasoncode INITSERVICE::ISTEP_SHUTDOWN - * @severity ERRORLOG::ERRL_SEV_INFORMATIONAL - * @moduleid INITSERVICE::ISTEP_INITSVC_MOD_ID - * @userdata1 <UNUSED> - * @userdata2 <UNUSED> - * @devdesc Istep initiated Shutdown. - */ - err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, - INITSERVICE::ISTEP_INITSVC_MOD_ID, - INITSERVICE::ISTEP_SHUTDOWN, - 0, 0 ); - - break; - default: // Default Message // This SHOULD be a message from the Fsp with the Step/substep @@ -431,10 +413,8 @@ errlHndl_t IStepDispatcher::msgHndlr ( void ) if( err ) { // Breaking here will be a BAD thing... It means that we are - // exiting not just Istep Dispatcher, but all of Hostboot. There - // are 2 cases where we would exit here: - // 1. Shutdown requested via istep (SPLESS) - // 2. Error during an Istep. + // exiting not just Istep Dispatcher, but all of Hostboot. + // This should only happen if there is an error during an Istep. errlCommit( err, INITSVC_COMP_ID ); } diff --git a/src/usr/initservice/istepdispatcher/sptask.C b/src/usr/initservice/istepdispatcher/sptask.C index 472e620dd..113324575 100644 --- a/src/usr/initservice/istepdispatcher/sptask.C +++ b/src/usr/initservice/istepdispatcher/sptask.C @@ -40,7 +40,6 @@ #include <sys/task.h> // tid_t, task_create, etc #include <sys/time.h> // nanosleep -#include <sys/misc.h> // shutdown #include <sys/msg.h> // message Q's #include <mbox/mbox_queues.H> // MSG_HB_MSG_BASE @@ -97,7 +96,6 @@ void userConsoleComm( void * io_msgQ ) SPLessCmd l_cmd; SPLessSts l_sts; uint8_t l_seqnum = 0; - bool l_quitflag = false; int l_sr_rc = 0; msg_q_t l_SendMsgQ = static_cast<msg_q_t>( io_msgQ ); msg_t *l_pMsg = msg_allocate(); @@ -154,7 +152,7 @@ void userConsoleComm( void * io_msgQ ) // write the intermediate value back to the console. TRACDCOMP( g_trac_initsvc, - "userConsoleComm Write status 0x%x.%x", + "userConsoleComm Write status (running) 0x%x.%x", static_cast<uint32_t>( l_sts.val64 >> 32 ), static_cast<uint32_t>( l_sts.val64 & 0x0ffffffff ) ); @@ -169,12 +167,11 @@ void userConsoleComm( void * io_msgQ ) l_pCurrentMsg->extra_data = NULL; TRACDCOMP( g_trac_initsvc, - "userConsoleComm send %p cmd type 0x%x, 0x%x.%x", - l_pCurrentMsg, - l_pCurrentMsg->type, - static_cast<uint32_t>( l_pCurrentMsg->data[0] >> 32 ), - static_cast<uint32_t>( l_pCurrentMsg->data[0] & 0x0ffffffff ) ); - + "userConsoleComm: sendmsg type=0x%08x, d0=0x%16x, d1=0x%16x, x=%p", + l_pCurrentMsg->type, + l_pCurrentMsg->data[0], + l_pCurrentMsg->data[1], + l_pCurrentMsg->extra_data ); // // msg_sendrecv_noblk effectively splits the "channel" into // a send Q and a receive Q @@ -186,21 +183,24 @@ void userConsoleComm( void * io_msgQ ) // This should unblock on any message sent on the Q, l_pCurrentMsg = msg_wait( l_RecvMsgQ ); + // build status to return to console + l_sts.istep = l_cmd.istep; + l_sts.substep = l_cmd.substep; + l_sts.hdr.status = 0; + // Clear command reg when the command is done TRACDCOMP( g_trac_initsvc, "userConsoleComm Clear Command reg" ); l_cmd.val64 = 0; writeCmd( l_cmd ); - // process returned status from IStepDisp - l_sts.hdr.status = 0; TRACDCOMP( g_trac_initsvc, - "spTask: %p recv msg type 0x%x, 0x%x.%x", - l_pCurrentMsg, - l_pCurrentMsg->type, - static_cast<uint32_t>( l_pCurrentMsg->data[0] >> 32 ), - static_cast<uint32_t>( l_pCurrentMsg->data[0] & 0x0ffffffff ) ); + "userConsoleComm: rcvmsg type=0x%08x, d0=0x%16x, d1=0x%16x, x=%p", + l_pCurrentMsg->type, + l_pCurrentMsg->data[0], + l_pCurrentMsg->data[1], + l_pCurrentMsg->extra_data ); if ( l_pCurrentMsg->type == BREAKPOINT ) { @@ -222,26 +222,13 @@ void userConsoleComm( void * io_msgQ ) // finish filling in status l_sts.hdr.runningbit = false; l_sts.hdr.seqnum = l_seqnum; - l_sts.istep = l_cmd.istep; - l_sts.substep = l_cmd.substep; - // status should be set now, write to Status Reg. - // write the intermediate value back to the console. TRACDCOMP( g_trac_initsvc, - "userConsoleComm Write status 0x%x.%x", + "userConsoleComm Write (finished) status 0x%x.%x", static_cast<uint32_t>( l_sts.val64 >> 32 ), static_cast<uint32_t>( l_sts.val64 & 0x0ffffffff ) ); writeSts( l_sts ); - // if shutdown issued, end this task - if ( l_cmd.hdr.cmdnum == SPLESS_SHUTDOWN_CMD ) - { - TRACFCOMP( g_trac_initsvc, - "sptask: shutdown received" ); - - l_quitflag = true; - } - // clear command reg, including go bit (i.e. set to false) // 2012-04-27 hb-istep will clear the command reg after it sees // the running bit turn on. @@ -250,15 +237,6 @@ void userConsoleComm( void * io_msgQ ) } // endif gobit - if ( l_quitflag == true ) - { - TRACFCOMP( g_trac_initsvc, - "sptask: got quitflag" ); - - // shutdown command issued, break out of loop - break; - } - // sleep, and wait for user to give us something else to do. /** * @todo Need a common method of doing delays in HostBoot @@ -314,7 +292,7 @@ void spTask( void *io_pArgs ) TRACFCOMP( g_trac_initsvc, "spTask exit." ); - // shutdown requested, end the task. + // End the task. task_end(); } |