diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2014-01-07 09:30:51 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-01-10 16:19:14 -0600 |
commit | aa83ebd12d6cf6d6ead06e45ab61d46a53a15be3 (patch) | |
tree | d6a587a8582ac9d085b08e028c757a0ea94bb825 /src/usr/mbox/mailboxsp.C | |
parent | ea2a49ff0cd3827458025f75d5b6bd7054d18779 (diff) | |
download | talos-hostboot-aa83ebd12d6cf6d6ead06e45ab61d46a53a15be3.tar.gz talos-hostboot-aa83ebd12d6cf6d6ead06e45ab61d46a53a15be3.zip |
Remove leftover fixme/todo and update error callouts
Remove all untagged fixme/todo comments
Adde new parm to error log constructor to avoid extra code in
common software error case
Update error callouts
Add strncpy
Change-Id: I8bd8f48193a96b79db91ed35c4fd485e6da38dba
RTC: 67921
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7921
Tested-by: Jenkins Server
Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com>
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/mbox/mailboxsp.C')
-rw-r--r-- | src/usr/mbox/mailboxsp.C | 123 |
1 files changed, 45 insertions, 78 deletions
diff --git a/src/usr/mbox/mailboxsp.C b/src/usr/mbox/mailboxsp.C index 2add8a16e..f869e5591 100644 --- a/src/usr/mbox/mailboxsp.C +++ b/src/usr/mbox/mailboxsp.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -40,8 +40,6 @@ #include <arch/ppc.H> #include <errl/errlmanager.H> -#define MBOX_TRACE_NAME MBOX_COMP_NAME - // Local functions namespace MBOX { @@ -54,7 +52,6 @@ using namespace MBOX; extern trace_desc_t * g_trac_mbox; extern trace_desc_t * g_trac_mboxmsg; -const char MBOXMSG_TRACE_NAME[] = "MBOXMSG"; trace_desc_t* g_trac_mboxmsg = NULL; // g_trac_mbox; TRAC_INIT(&g_trac_mboxmsg, MBOXMSG_TRACE_NAME, 2*KILOBYTE, TRACE::BUFFER_SLOW); @@ -128,12 +125,10 @@ errlHndl_t MailboxSp::_init() MBOX::MOD_MBOXSRV_INIT, MBOX::RC_KERNEL_REG_FAILED, // reason Code rc, // rc from msg_send - 0 + 0, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - return err; } @@ -369,12 +364,10 @@ void MailboxSp::msgHandler() MBOX::MOD_MBOXSRV_HNDLR, MBOX::RC_INVALID_MBOX_MSG_TYPE, // reason Code msg->type, // msg type - 0 + 0, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - errlCommit(err,MBOX_COMP_ID); err = NULL; @@ -428,12 +421,10 @@ void MailboxSp::handleNewMessage(msg_t * i_msg) MBOX::MOD_MBOXSRV_SENDMSG, MBOX::RC_MAILBOX_DISABLED, // reason Code i_msg->data[0], // queue id - payload->type // message type + payload->type, // message type + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - i_msg->data[1] = reinterpret_cast<uint64_t>(err); payload->extra_data = NULL; @@ -587,12 +578,10 @@ void MailboxSp::send_msg(mbox_msg_t * i_msg) MBOX::MOD_MBOXSRV_SENDMSG, MBOX::RC_INVALID_DMA_LENGTH, // reason Code payload->data[1], // DMA data len - iv_msg_to_send.msg_queue_id // MSG queueid + iv_msg_to_send.msg_queue_id, // MSG queueid + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - send_msg(); // drop this message, but send next message } } @@ -642,11 +631,13 @@ void MailboxSp::send_msg(mbox_msg_t * i_msg) delete response; } // else could be request for more DMA buffers - // - for now just commit the error. TODO recovery options? + // - for now just commit the error. + //@TODO- RTC:93751 recovery options? } // else msg is a HB response to a FSP originating sync msg // What do we do here? Can't respond to the FSP. - // For now just commit the error. TODO recovery options? + // For now just commit the error. + //@TODO- RTC:93751 recovery options? } // else msg was HB originating async - Just commit it. @@ -760,20 +751,16 @@ void MailboxSp::recv_msg(mbox_msg_t & i_mbox_msg) MBOX::MOD_MBOXSRV_RCV, MBOX::RC_MSG_SEND_ERROR, // reason Code rc, // rc from msg_send - i_mbox_msg.msg_queue_id + i_mbox_msg.msg_queue_id, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - - UserDetailsMboxMsg - ffdc(reinterpret_cast<uint64_t*>(&i_mbox_msg), - sizeof(mbox_msg_t), - reinterpret_cast<uint64_t*>(msg->extra_data), - msg->data[1]); - - ffdc.addToLog(err); - + //@todo: RTC:93750 Create real parseable FFDC class + err->addFFDC(MBOX_COMP_ID, + msg, + sizeof(msg_t), + 1,//version + MBOX_UDT_MSG_DATA);//subsect err->collectTrace(MBOXMSG_TRACE_NAME); errlCommit(err,MBOX_COMP_ID); @@ -828,12 +815,10 @@ void MailboxSp::recv_msg(mbox_msg_t & i_mbox_msg) MBOX::MOD_MBOXSRV_RCV, MBOX::RC_INVALID_MESSAGE_TYPE , // reason Code i_mbox_msg.msg_queue_id, // rc from msg_send - msg->type + msg->type, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_SP_CODE, - HWAS::SRCI_PRIORITY_HIGH); - UserDetailsMboxMsg ffdc(reinterpret_cast<uint64_t*>(&i_mbox_msg), sizeof(mbox_msg_t), @@ -922,12 +907,10 @@ void MailboxSp::handle_hbmbox_msg(mbox_msg_t & i_mbox_msg) MBOX::MOD_MBOXSRV_FSP_MSG, MBOX::RC_INVALID_QUEUE, bad_mbox_msg->msg_queue_id, - bad_msg->type + bad_msg->type, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - UserDetailsMboxMsg ffdc(reinterpret_cast<uint64_t*>(&i_mbox_msg), sizeof(mbox_msg_t), @@ -1097,12 +1080,10 @@ errlHndl_t MailboxSp::send(queue_id_t i_q_id, msg_t * io_msg) MBOX::MOD_MBOXSRV_SEND, // moduleid MBOX::RC_INVALID_QUEUE, // reason Code rc, // msg_sendrecv errno - i_q_id // msg queue id + i_q_id, // msg queue id + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - // This Trace has the msg err->collectTrace(MBOXMSG_TRACE_NAME); } @@ -1125,11 +1106,9 @@ errlHndl_t MailboxSp::send(queue_id_t i_q_id, msg_t * io_msg) MBOX::MOD_MBOXSRV_SEND, // moduleid MBOX::RC_MBOX_SERVICE_NOT_READY, // reason Code i_q_id, // queue id - 0 // + 0, // + true //Add HB Software Callout ); - - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); } return err; @@ -1189,11 +1168,10 @@ errlHndl_t MailboxSp::msgq_register(queue_id_t i_queue_id, msg_q_t i_msgQ) MBOX::MOD_MBOXREGISTER, // moduleid MBOX::RC_ALREADY_REGISTERED, // reason code i_queue_id, - 0 + 0, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); } } return err; @@ -1316,12 +1294,10 @@ errlHndl_t MailboxSp::handleInterrupt() MBOX::MOD_MBOXSRV_HNDLR, MBOX::RC_DATA_WRITE_ERR, // reason Code mbox_status, // Status from DD - 0 + 0, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - err->collectTrace(MBOX_TRACE_NAME); err->collectTrace(MBOXMSG_TRACE_NAME); // return err @@ -1473,12 +1449,10 @@ void MailboxSp::handleIPC() MBOX::MOD_MBOXSRV_IPC_MSG, MBOX::RC_MSG_SEND_ERROR, // reason Code rc, // rc from msg_send - msg_q_id + msg_q_id, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - UserDetailsMboxMsg ffdc(reinterpret_cast<uint64_t*>(msg), sizeof(msg_t)); @@ -1514,12 +1488,10 @@ void MailboxSp::handleIPC() MBOX::MOD_MBOXSRV_IPC_MSG, MBOX::RC_INVALID_QUEUE, msg_q_id, - msg->type + msg->type, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - UserDetailsMboxMsg ffdc(reinterpret_cast<uint64_t*>(msg), sizeof(msg_t)); @@ -1714,11 +1686,10 @@ errlHndl_t MBOX::send(queue_id_t i_q_id, msg_t * i_msg,int i_node) MBOX::MOD_MBOX_SEND, // moduleid MBOX::RC_INVALID_QUEUE, // reason Code rc, // msg_send errno - q_handle // msg queue id + q_handle, // msg queue id + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); // This Trace has the msg err->collectTrace(MBOXMSG_TRACE_NAME); } @@ -1741,11 +1712,10 @@ errlHndl_t MBOX::send(queue_id_t i_q_id, msg_t * i_msg,int i_node) MBOX::MOD_MBOX_SEND, // moduleid MBOX::RC_IPC_INVALID_NODE, // reason Code i_q_id, // queue id - i_node // + i_node, // + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); } } return err; @@ -1809,11 +1779,10 @@ errlHndl_t MBOX::msgq_register(queue_id_t i_queue_id, msg_q_t i_msgQ) MBOX::MOD_MBOXREGISTER, // moduleid MBOX::RC_MBOX_SERVICE_NOT_READY, // reason code i_queue_id, - 0 + 0, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); } return err; @@ -1955,11 +1924,9 @@ errlHndl_t MBOX::makeErrlMsgQSendFail(uint64_t i_errno) MBOX::MOD_MBOX_MSGQ_FAIL, // moduleid MBOX::RC_MSG_SEND_ERROR, // reason code i_errno, - 0 + 0, + true //Add HB Software Callout ); - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - return err; } |