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 | |
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')
27 files changed, 344 insertions, 244 deletions
diff --git a/src/include/string.h b/src/include/string.h index 8fa88044f..24ac40cc4 100755 --- a/src/include/string.h +++ b/src/include/string.h @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2010,2013 */ +/* COPYRIGHT International Business Machines Corp. 2010,2014 */ /* */ /* p1 */ /* */ @@ -38,6 +38,7 @@ extern "C" const void *needle, size_t needlelen) __attribute__((pure)); char* strcpy(char* d, const char* s); + char* strncpy(char* d, const char* s, size_t l); int strcmp(const char* s1, const char* s2) __attribute__((pure)); size_t strlen(const char* s1) __attribute__((pure)); size_t strnlen(const char* s1, size_t n) __attribute__((pure)); diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index d00c9c54a..89369797e 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -118,13 +118,16 @@ public: * in the primary SRC * @param[in] i_user2 64 bits of user data which are placed * in the primary SRC + * @param[in] i_hbSwError if true, will automatically add a HIGH + * severity callout for EPUB_PRC_HB_CODE * @return None */ ErrlEntry(const errlSeverity_t i_sev, const uint8_t i_modId, const uint16_t i_reasonCode, const uint64_t i_user1 = 0, - const uint64_t i_user2 = 0); + const uint64_t i_user2 = 0, + const bool i_hbSwError = false ); /** * @brief Destructor diff --git a/src/include/usr/mbox/ipc_reasoncodes.H b/src/include/usr/mbox/ipc_reasoncodes.H index 1758653e3..df098bf0b 100644 --- a/src/include/usr/mbox/ipc_reasoncodes.H +++ b/src/include/usr/mbox/ipc_reasoncodes.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -25,6 +25,8 @@ #include <hbotcompid.H> +#define IPC_TRACE_NAME "IPC" + namespace IPC { enum IPCModuleId diff --git a/src/include/usr/mbox/mbox_reasoncodes.H b/src/include/usr/mbox/mbox_reasoncodes.H index 2bce46660..1c21b52e7 100644 --- a/src/include/usr/mbox/mbox_reasoncodes.H +++ b/src/include/usr/mbox/mbox_reasoncodes.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -74,6 +74,7 @@ namespace MBOX enum mboxUserDetailDataSubsection { MBOX_UDT_MBOXMSG_DATA = 0x01, + MBOX_UDT_MSG_DATA = 0x02, //@todo: RTC:93750 }; }; diff --git a/src/include/usr/mbox/mboxif.H b/src/include/usr/mbox/mboxif.H index 8bce7b495..b17fbeb13 100644 --- a/src/include/usr/mbox/mboxif.H +++ b/src/include/usr/mbox/mboxif.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -27,6 +27,9 @@ #include <errl/errlentry.H> #include <mbox/mbox_queues.H> +#define MBOX_TRACE_NAME MBOX_COMP_NAME +#define MBOXMSG_TRACE_NAME "MBOXMSG" + namespace MBOX { enum diff --git a/src/include/usr/runtime/tceif.H b/src/include/usr/runtime/tceif.H index 9dcc7ca14..6300d9138 100644 --- a/src/include/usr/runtime/tceif.H +++ b/src/include/usr/runtime/tceif.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -28,6 +28,7 @@ #include <errl/errlentry.H> #include <devicefw/userif.H> +#define TCE_TRACE_NAME "TCE" namespace TCE { diff --git a/src/lib/string.C b/src/lib/string.C index 52c54a56b..17194bdd2 100644 --- a/src/lib/string.C +++ b/src/lib/string.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -170,6 +170,28 @@ extern "C" char* strcpy(char* d, const char* s) } while(1); } +extern "C" char* strncpy(char* d, const char* s, size_t l) +{ + char* d1 = d; + size_t len = 0; + + do + { + if (len++ >= l) break; + *d1 = *s; + if (*s == '\0') break; + d1++; s++; + } while(1); + + // pad the remainder + while( len < l ) + { + d1[len++] = '\0'; + } + + return d; +} + extern "C" int strcmp(const char* a, const char* b) { while((*a != '\0') && (*b != '\0')) diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index d0e87f846..1e5af167a 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -114,7 +114,8 @@ ErrlEntry::ErrlEntry(const errlSeverity_t i_sev, const uint8_t i_modId, const uint16_t i_reasonCode, const uint64_t i_user1, - const uint64_t i_user2) : + const uint64_t i_user2, + const bool i_hbSwError ) : iv_Private( static_cast<compId_t>(i_reasonCode & 0xFF00)), iv_User( i_sev ), // The SRC_ERR_INFO becomes part of the SRC; example, B1 in SRC B180xxxx @@ -125,6 +126,12 @@ ErrlEntry::ErrlEntry(const errlSeverity_t i_sev, TRACFCOMP( g_trac_errl, ERR_MRK"Error created : PLID=%.8X, RC=%.4X, Mod=%.2X, Userdata=%.16X %.16X", plid(), i_reasonCode, i_modId, i_user1, i_user2 ); // Collect the Backtrace and add it to the error log iv_pBackTrace = new ErrlUserDetailsBackTrace(); + // Automatically add a software callout if asked + if( i_hbSwError ) + { + addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_HIGH ); + } } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/usr/mbox/ipcSp.C b/src/usr/mbox/ipcSp.C index d53f4f171..e0b2a3449 100644 --- a/src/usr/mbox/ipcSp.C +++ b/src/usr/mbox/ipcSp.C @@ -27,9 +27,10 @@ #include <mbox/ipc_reasoncodes.H> #include <mbox/mboxif.H> #include <errl/errlmanager.H> +#include <mbox/mbox_reasoncodes.H> trace_desc_t* g_trac_ipc = NULL; -TRAC_INIT(&g_trac_ipc, "IPC", KILOBYTE); +TRAC_INIT(&g_trac_ipc, IPC_TRACE_NAME, KILOBYTE); using namespace IPC; using namespace ERRORLOG; @@ -153,7 +154,7 @@ void IpcSp::msgHandler() * @moduleid IPC::MOD_IPCSP_MSGHDLR * @reasoncode IPC::RC_INVALID_MSG_TYPE * @userdata1 Message type - * @userdata2 <unused> + * @userdata2 Data word 0 of message * * @devdesc IPC service provider received an unexpected * message. @@ -165,8 +166,18 @@ void IpcSp::msgHandler() IPC::MOD_IPCSP_MSGHDLR, // moduleid IPC::RC_INVALID_MSG_TYPE, // reason code msg->type, - 0 + msg->data[0], + true //Add HB Software Callout ); + //@todo: RTC:93750 Create real parseable FFDC class + err->addFFDC(MBOX_COMP_ID, + msg, + sizeof(msg_t), + 1,//version + MBOX::MBOX_UDT_MSG_DATA);//subsect + + err->collectTrace(MBOXMSG_TRACE_NAME); + err->collectTrace(IPC_TRACE_NAME); errlCommit(err, IPC_COMP_ID); 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; } diff --git a/src/usr/mbox/mboxdd.C b/src/usr/mbox/mboxdd.C index 9059dcb03..3ae7015e2 100644 --- a/src/usr/mbox/mboxdd.C +++ b/src/usr/mbox/mboxdd.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -385,12 +385,10 @@ errlHndl_t mboxWrite(TARGETING::Target* i_target,void* i_buffer, MBOX::MOD_MBOXDD_WRITE, MBOX::RC_INVALID_LENGTH, TARGETING::get_huid(i_target), - TO_UINT64(i_buflen)); + TO_UINT64(i_buflen), + true /*Add HB Software Callout*/); - l_err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - - l_err->collectTrace("MBOX",1024); + l_err->collectTrace(MBOX_TRACE_NAME,1024); // Set the i_buflen to 0 to indicate no write occured i_buflen = 0; @@ -517,17 +515,15 @@ errlHndl_t mboxWrite(TARGETING::Target* i_target,void* i_buffer, * @devdesc MboxDD::write> Message still pending */ l_err = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, - MBOX::MOD_MBOXDD_WRITE, - MBOX::RC_MSG_PENDING, - TARGETING::get_huid(i_target), - reinterpret_cast<uint64_t>(l_64bitBuf)); - - l_err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); + MBOX::MOD_MBOXDD_WRITE, + MBOX::RC_MSG_PENDING, + TARGETING::get_huid(i_target), + reinterpret_cast<uint64_t>(l_64bitBuf), + true /*Add HB Software Callout*/); // Set the i_buflen to 0 to indicate no write occured i_buflen = 0; - l_err->collectTrace("MBOX",1024); + l_err->collectTrace(MBOX_TRACE_NAME,1024); break; } diff --git a/src/usr/pnor/pnordd.C b/src/usr/pnor/pnordd.C index e8bd3d738..4d67da3e0 100644 --- a/src/usr/pnor/pnordd.C +++ b/src/usr/pnor/pnordd.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -722,7 +722,7 @@ errlHndl_t PnorDD::pollSfcOpComplete(uint64_t i_pollTime) if( l_err ) { break; } // check for errors or timeout - // TODO: What errors do we check? + // TODO: RTC:62718 What errors do we check? if( (sfc_stat.done == 0) ) { TRACFCOMP(g_trac_pnor, @@ -746,8 +746,8 @@ errlHndl_t PnorDD::pollSfcOpComplete(uint64_t i_pollTime) poll_time), TWO_UINT32_TO_UINT64(sfc_stat.data32,0)); - l_err->collectTrace("PNOR"); - l_err->collectTrace("XSCOM"); + l_err->collectTrace(PNOR_COMP_NAME); + l_err->collectTrace(XSCOM_COMP_NAME); //@todo (RTC:37744) - Any cleanup or recovery needed? break; } @@ -849,8 +849,8 @@ errlHndl_t PnorDD::micronFlagStatus(uint64_t i_pollTime) poll_time), TWO_UINT32_TO_UINT64(opStatus,0)); - l_err->collectTrace("PNOR"); - l_err->collectTrace("XSCOM"); + l_err->collectTrace(PNOR_COMP_NAME); + l_err->collectTrace(XSCOM_COMP_NAME); //Erase & Program error bits are sticky, so they need to be cleared. @@ -1366,8 +1366,8 @@ errlHndl_t PnorDD::readLPC(uint32_t i_addr, PNOR::RC_LPC_ERROR, TWO_UINT32_TO_UINT64(i_addr,poll_time), eccb_stat.data64); - l_err->collectTrace("PNOR"); - l_err->collectTrace("XSCOM"); + l_err->collectTrace(PNOR_COMP_NAME); + l_err->collectTrace(XSCOM_COMP_NAME); //@todo (RTC:37744) - Any cleanup or recovery needed? break; } @@ -1475,8 +1475,8 @@ errlHndl_t PnorDD::writeLPC(uint32_t i_addr, PNOR::RC_LPC_ERROR, TWO_UINT32_TO_UINT64(0,i_addr), eccb_stat.data64); - l_err->collectTrace("PNOR"); - l_err->collectTrace("XSCOM"); + l_err->collectTrace(PNOR_COMP_NAME); + l_err->collectTrace(XSCOM_COMP_NAME); //@todo (RTC:37744) - Any cleanup or recovery needed? break; } diff --git a/src/usr/pnor/pnordd.H b/src/usr/pnor/pnordd.H index 7f13e43c5..441eac3ca 100644 --- a/src/usr/pnor/pnordd.H +++ b/src/usr/pnor/pnordd.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -205,9 +205,11 @@ class PnorDD enum { - SFC_CMDBUF_SIZE = 256, /**< SFC Command buffer is 0x100/256 bytes/0x40 words */ + SFC_CMDBUF_SIZE = 256, /**< SFC Command buffer is + 0x100/256 bytes/0x40 words */ - SFC_POLL_TIME_NS = 400000, /**< todo: Find out Max time to wait */ + SFC_POLL_TIME_NS = 400000, /**< todo: RTC:62718 Find out + Max time to wait */ SFC_POLL_INCR_NS = 10, /**< minimum increment during poll */ }; diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C index 1d52b2a39..9ae43e136 100644 --- a/src/usr/pnor/pnorrp.C +++ b/src/usr/pnor/pnorrp.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -232,11 +232,13 @@ void PnorRP::initDaemon() * @userdata2 rc from mm_alloc_block * @devdesc PnorRP::initDaemon> Error from mm_alloc_block */ - l_errhdl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, - PNOR::MOD_PNORRP_INITDAEMON, - PNOR::RC_EXTERNAL_ERROR, - TO_UINT64(BASE_VADDR), - TO_UINT64(rc)); + l_errhdl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, + PNOR::MOD_PNORRP_INITDAEMON, + PNOR::RC_EXTERNAL_ERROR, + TO_UINT64(BASE_VADDR), + TO_UINT64(rc), + true /*Add HB SW Callout*/); l_errhdl->collectTrace(PNOR_COMP_NAME); break; } @@ -298,7 +300,8 @@ errlHndl_t PnorRP::getSectionInfo( PNOR::SectionId i_section, PNOR::MOD_PNORRP_GETSECTIONINFO, PNOR::RC_STARTUP_FAIL, TO_UINT64(i_section), - rc); + rc, + true /*Add HB SW Callout*/); l_errhdl->collectTrace(PNOR_COMP_NAME); // set the return section to our invalid data @@ -323,7 +326,8 @@ errlHndl_t PnorRP::getSectionInfo( PNOR::SectionId i_section, PNOR::MOD_PNORRP_GETSECTIONINFO, PNOR::RC_INVALID_SECTION, TO_UINT64(i_section), - iv_TOC_used); + iv_TOC_used, + true /*Add HB SW Callout*/); l_errhdl->collectTrace(PNOR_COMP_NAME); // set the return section to our invalid data @@ -681,13 +685,16 @@ void PnorRP::waitForMessage() * @reasoncode PNOR::RC_INVALID_MESSAGE_TYPE * @userdata1 Message type * @userdata2 Requested Virtual Address - * @devdesc PnorRP::waitForMessage> Unrecognized message type + * @devdesc PnorRP::waitForMessage> Unrecognized + * message type */ - l_errhdl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, - PNOR::MOD_PNORRP_WAITFORMESSAGE, - PNOR::RC_INVALID_MESSAGE_TYPE, - TO_UINT64(message->type), - (uint64_t)eff_addr); + l_errhdl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, + PNOR::MOD_PNORRP_WAITFORMESSAGE, + PNOR::RC_INVALID_MESSAGE_TYPE, + TO_UINT64(message->type), + (uint64_t)eff_addr, + true /*Add HB SW Callout*/); l_errhdl->collectTrace(PNOR_COMP_NAME); status_rc = -EINVAL; /* Invalid argument */ } @@ -704,11 +711,13 @@ void PnorRP::waitForMessage() * @userdata2 Requested Virtual Address * @devdesc PnorRP::waitForMessage> Unrecognized message type */ - l_errhdl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, - PNOR::MOD_PNORRP_WAITFORMESSAGE, - PNOR::RC_INVALID_ASYNC_MESSAGE, - TO_UINT64(message->type), - (uint64_t)eff_addr); + l_errhdl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, + PNOR::MOD_PNORRP_WAITFORMESSAGE, + PNOR::RC_INVALID_ASYNC_MESSAGE, + TO_UINT64(message->type), + (uint64_t)eff_addr, + true /*Add HB SW Callout*/); l_errhdl->collectTrace(PNOR_COMP_NAME); status_rc = -EINVAL; /* Invalid argument */ } @@ -924,7 +933,8 @@ errlHndl_t PnorRP::computeDeviceAddr( void* i_vaddr, PNOR::MOD_PNORRP_COMPUTEDEVICEADDR, PNOR::RC_INVALID_ADDRESS, l_vaddr, - BASE_VADDR); + BASE_VADDR, + true /*Add HB SW Callout*/); l_errhdl->collectTrace(PNOR_COMP_NAME); return l_errhdl; } diff --git a/src/usr/pnor/test/pnorrptest.H b/src/usr/pnor/test/pnorrptest.H index d96379a8c..0ad5fc348 100644 --- a/src/usr/pnor/test/pnorrptest.H +++ b/src/usr/pnor/test/pnorrptest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -431,7 +431,9 @@ class PnorRpTest : public CxxTest::TestSuite */ void test_AddrReadWrite(void) { - return; //@todo - enable this after Task 3445 + // Leaving disabled because a regular boot tests all of this anyway, + // but want to leave this here for possible future unit testing. + return; TRACFCOMP( g_trac_pnor, "PnorRpTest::test_AddrReadWrite> Start" ); uint64_t fails = 0; uint64_t total = 0; diff --git a/src/usr/runtime/hdatservice.C b/src/usr/runtime/hdatservice.C index 9d9366e32..2f715e871 100644 --- a/src/usr/runtime/hdatservice.C +++ b/src/usr/runtime/hdatservice.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -141,14 +141,14 @@ errlHndl_t hdatService::verify_hdat_address( void* i_addr, RUNTIME::RC_INVALID_ADDRESS, reinterpret_cast<uint64_t>(i_addr), reinterpret_cast<uint64_t>(i_size)); - errhdl->collectTrace("RUNTIME",1024); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); // most likely this is a HB code bug errhdl->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, HWAS::SRCI_PRIORITY_HIGH); // but it could also be a FSP bug in setting up the HDAT data errhdl->addProcedureCallout(HWAS::EPUB_PRC_SP_CODE, - HWAS::SRCI_PRIORITY_HIGH); + HWAS::SRCI_PRIORITY_MED); } return errhdl; @@ -201,7 +201,11 @@ errlHndl_t hdatService::check_header( hdatHDIF_t* i_header, RUNTIME::RC_BAD_HDAT_HEADER, actual.flatten(), i_exp.flatten()); - errhdl->collectTrace("RUNTIME",1024); + errhdl->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_MED ); + errhdl->addProcedureCallout( HWAS::EPUB_PRC_SP_CODE, + HWAS::SRCI_PRIORITY_MED ); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); break; } } while(0); @@ -243,7 +247,11 @@ errlHndl_t hdatService::check_tuple( const RUNTIME::SectionId i_section, TWO_UINT32_TO_UINT64( i_tuple->hdatAllocCnt, i_tuple->hdatAllocSize)); - errhdl->collectTrace("RUNTIME",1024); + errhdl->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_MED ); + errhdl->addProcedureCallout( HWAS::EPUB_PRC_SP_CODE, + HWAS::SRCI_PRIORITY_MED ); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); RUNTIME::UdTuple(i_tuple).addToLog(errhdl); break; } @@ -301,11 +309,12 @@ errlHndl_t hdatService::get_standalone_section( * @devdesc Section is not valid in standalone mode */ errhdl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, - RUNTIME::MOD_HDATSERVICE_GET_STANDALONE_SECTION, - RUNTIME::RC_INVALID_STANDALONE, - i_section, - i_instance); - errhdl->collectTrace("RUNTIME",1024); + RUNTIME::MOD_HDATSERVICE_GET_STANDALONE_SECTION, + RUNTIME::RC_INVALID_STANDALONE, + i_section, + i_instance, + true /*Add HB Software Callout*/); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); } return errhdl; @@ -373,8 +382,9 @@ errlHndl_t hdatService::mapRegion(uint64_t i_addr, size_t i_bytes, RUNTIME::MOD_HDATSERVICE_MAPREGION, RUNTIME::RC_CANNOT_MAP_MEMORY, l_mem.phys_addr, - l_mem.size ); - errhdl->collectTrace("RUNTIME",1024); + l_mem.size, + true /*Add HB Software Callout*/); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); break; } @@ -611,8 +621,9 @@ errlHndl_t hdatService::getHostDataSection( SectionId i_section, RUNTIME::MOD_HDATSERVICE_GETHOSTDATASECTION, RUNTIME::RC_INVALID_PAYLOAD_KIND, payload_kind, - i_section); - errhdl->collectTrace("RUNTIME",1024); + i_section, + true /*Add HB Software Callout*/); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); break; } @@ -830,7 +841,11 @@ errlHndl_t hdatService::getHostDataSection( SectionId i_section, phys_addr, TWO_UINT32_TO_UINT64(i_instance, found_instances)); - errhdl->collectTrace("RUNTIME",1024); + errhdl->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_MED ); + errhdl->addProcedureCallout( HWAS::EPUB_PRC_SP_CODE, + HWAS::SRCI_PRIORITY_MED ); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); break; } @@ -982,8 +997,9 @@ errlHndl_t hdatService::getHostDataSection( SectionId i_section, RUNTIME::MOD_HDATSERVICE_GETHOSTDATASECTION, RUNTIME::RC_INVALID_SECTION, i_section, - 0); - errhdl->collectTrace("RUNTIME",1024); + 0, + true /*Add HB Software Callout*/); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); break; } @@ -1064,7 +1080,11 @@ errlHndl_t hdatService::findSpira( void ) reinterpret_cast<uint64_t>(phys_addr), TWO_UINT32_TO_UINT64(payload_base, payload_kind)); - errhdl->collectTrace("RUNTIME",1024); + errhdl->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_MED ); + errhdl->addProcedureCallout( HWAS::EPUB_PRC_SP_CODE, + HWAS::SRCI_PRIORITY_MED ); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); RUNTIME::UdNaca(naca).addToLog(errhdl); break; } @@ -1188,7 +1208,11 @@ errlHndl_t hdatService::findSpira( void ) ERRL_GETEID_SAFE(errhdl_l)), TWO_UINT32_TO_UINT64(ERRL_GETRC_SAFE(errhdl_s), ERRL_GETEID_SAFE(errhdl_s))); - errhdl->collectTrace("RUNTIME",1024); + errhdl->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_MED ); + errhdl->addProcedureCallout( HWAS::EPUB_PRC_SP_CODE, + HWAS::SRCI_PRIORITY_MED ); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); // commit the errors related to each SPIRA if( errhdl_s ) @@ -1259,8 +1283,9 @@ errlHndl_t hdatService::updateHostDataSectionActual( SectionId i_section, RUNTIME::MOD_HDATSERVICE_UPDATE_SECTION_ACTUAL, RUNTIME::RC_INVALID_PAYLOAD_KIND, payload_kind, - i_section); - errhdl->collectTrace("RUNTIME",1024); + i_section, + true /*Add HB Software Callout*/); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); break; } @@ -1310,8 +1335,9 @@ errlHndl_t hdatService::updateHostDataSectionActual( SectionId i_section, RUNTIME::MOD_HDATSERVICE_UPDATE_SECTION_ACTUAL, RUNTIME::RC_INVALID_SECTION, i_section, - 0); - errhdl->collectTrace("RUNTIME",1024); + 0, + true /*Add HB Software Callout*/); + errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE); break; } diff --git a/src/usr/runtime/populate_attributes.C b/src/usr/runtime/populate_attributes.C index 091a0073f..5c47730b3 100644 --- a/src/usr/runtime/populate_attributes.C +++ b/src/usr/runtime/populate_attributes.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -43,7 +43,7 @@ #include <kernel/cpu.H> // for KERNEL_MAX_SUPPORTED_CPUS_PER_NODE trace_desc_t *g_trac_runtime = NULL; -TRAC_INIT(&g_trac_runtime, "RUNTIME", KILOBYTE); +TRAC_INIT(&g_trac_runtime, RUNTIME_COMP_NAME, KILOBYTE); /** * @brief Read a FAPI attribute and stick it into mainstore @@ -343,8 +343,6 @@ errlHndl_t populate_system_attributes( void ) assert( *_num_attr < system_data_t::MAX_ATTRIBUTES ); TRACFCOMP( g_trac_runtime, "Run: system_cmp0.memory_ln4->image.save attributes.sys.bin 0x%X %d", sys_data, sizeof(system_data_t) ); - - //@todo - Walk through attribute headers to look for duplicates? } while(0); // Handle any errors from FAPI_ATTR_GET @@ -362,8 +360,9 @@ errlHndl_t populate_system_attributes( void ) RUNTIME::MOD_RUNTIME_POP_SYS_ATTR, RUNTIME::RC_ATTR_GET_FAIL, _rc, - _failed_attribute ); - + _failed_attribute, + true /*Add HB Software Callout*/); + errhdl->collectTrace(TARG_COMP_NAME,KILOBYTE/2); } return errhdl; @@ -412,7 +411,8 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum ) RUNTIME::MOD_RUNTIME_POP_NODE_ATTR, RUNTIME::RC_INVALID_SECTION, node_data_addr, - node_data_size ); + node_data_size, + true /*Add HB Software Callout*/ ); break; } else if( sizeof(node_data_t) > node_data_size ) @@ -616,8 +616,9 @@ errlHndl_t populate_node_attributes( uint64_t i_nodeNum ) RUNTIME::MOD_RUNTIME_POP_NODE_ATTR, RUNTIME::RC_ATTR_GET_FAIL, _rc, - _failed_attribute ); - + _failed_attribute, + true /*Add HB Software Callout*/ ); + errhdl->collectTrace(TARG_COMP_NAME,KILOBYTE/2); } return errhdl; diff --git a/src/usr/runtime/tce.C b/src/usr/runtime/tce.C index 619364671..493d8146c 100644 --- a/src/usr/runtime/tce.C +++ b/src/usr/runtime/tce.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -39,7 +39,7 @@ #include <assert.h> trace_desc_t* g_trac_tce = NULL; -TRAC_INIT(&g_trac_tce, "TCE", 4*KILOBYTE); +TRAC_INIT(&g_trac_tce, TCE_TRACE_NAME, 4*KILOBYTE); namespace TCE @@ -145,8 +145,8 @@ namespace TCE RUNTIME::MOD_TCE_MAP, RUNTIME::RC_TCE_INVALID_SIZE, tceTablePhysAddr, - tceTableSize); - + tceTableSize, + true /*Add HB SW Callout*/); break; } @@ -170,8 +170,8 @@ namespace TCE RUNTIME::MOD_TCE_MAP, RUNTIME::RC_TCE_ADDR_NOT_ALIGNED, tceTablePhysAddr, - 0); - + 0, + true /*Add HB SW Callout*/); break; } @@ -211,7 +211,8 @@ namespace TCE RUNTIME::MOD_TCE_MAP, RUNTIME::RC_TCE_DEV_MAP_FAIL, tceTablePhysAddr, - tceTableSize); + tceTableSize, + true /*Add HB SW Callout*/); } } }while(0); @@ -323,7 +324,8 @@ namespace TCE RUNTIME::MOD_TCE_INIT_HDW, RUNTIME::RC_TCE_DEV_MAP_FAIL, PsiBridgeAddr, - tceTablePhysAddr); + tceTablePhysAddr, + true /*Add HB SW Callout*/); break; } @@ -371,7 +373,8 @@ namespace TCE RUNTIME::MOD_TCE_INIT_HDW, RUNTIME::RC_TCE_DEV_UNMAP_FAIL, reinterpret_cast<uint64_t>(mmio_ptr), - rc); + rc, + true /*Add HB SW Callout*/); break; } @@ -439,7 +442,9 @@ namespace TCE RUNTIME::MOD_TCE_ALLOCATE, RUNTIME::RC_TCE_INIT_NOT_RUN, i_startingAddress, - i_size); + i_size, + true /*Add HB SW Callout*/); + errl->collectTrace(TCE_TRACE_NAME,KILOBYTE); break; } @@ -480,8 +485,8 @@ namespace TCE RUNTIME::MOD_TCE_ALLOCATE, RUNTIME::RC_TCE_ADDR_NOT_ALIGNED, i_startingAddress, - i_size); - + i_size, + true /*Add HB SW Callout*/); break; } @@ -506,7 +511,8 @@ namespace TCE RUNTIME::MOD_TCE_ALLOCATE, RUNTIME::RC_TCE_INVALID_SIZE, i_startingAddress, - i_size); + i_size, + true /*Add HB SW Callout*/); break; } @@ -612,8 +618,9 @@ namespace TCE RUNTIME::MOD_TCE_ALLOCATE, RUNTIME::RC_TCE_NOT_ENOUGH_FREE_ENTRIES, i_startingAddress, - i_size); - + i_size, + true /*Add HB SW Callout*/); + break; } }while(0); @@ -673,7 +680,9 @@ namespace TCE RUNTIME::MOD_TCE_DEALLOCATE, RUNTIME::RC_TCE_INVALID_SIZE, startingIndex, - numTcesNeeded); + numTcesNeeded, + true /*Add HB SW Callout*/); + errl->collectTrace(TCE_TRACE_NAME,KILOBYTE); errlCommit(errl,RUNTIME_COMP_ID); @@ -731,10 +740,11 @@ namespace TCE RUNTIME::MOD_TCE_DEALLOCATE, RUNTIME::RC_TCE_ENTRY_NOT_CONTIGUOUS, i_startingToken, - i_size); - + i_size, + true /*Add HB SW Callout*/); + errl->collectTrace(TCE_TRACE_NAME,KILOBYTE); errlCommit(errl,RUNTIME_COMP_ID); - + break; } }while(0); diff --git a/src/usr/secureboot/base/purge.C b/src/usr/secureboot/base/purge.C index af21a7b02..e164d6154 100644 --- a/src/usr/secureboot/base/purge.C +++ b/src/usr/secureboot/base/purge.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -82,6 +82,16 @@ namespace SECUREBOOT MOD_SECURE_BLINDPURGE, RC_PURGEOP_PENDING, data, task_getcpuid()); + // Probably a code bug + l_errl->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_HIGH ); + // But there might be something wrong with the chip + // or the SBE image + l_errl->addHwCallout( + TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, + HWAS::SRCI_PRIORITY_LOW, + HWAS::NO_DECONFIG, + HWAS::GARD_NULL ); break; } @@ -121,7 +131,7 @@ namespace SECUREBOOT * @errortype * @moduleid SECUREBOOT::MOD_SECURE_BLINDPURGE * @reasoncode SECUREBOOT::RC_PURGEOP_FAIL_COMPLETE - * @userdata1 SCOM value. + * @userdata1 SCOM value of Reg 0x1001080E * @devdesc Purge operation never completed. */ l_errl = @@ -129,6 +139,15 @@ namespace SECUREBOOT MOD_SECURE_BLINDPURGE, RC_PURGEOP_FAIL_COMPLETE, data); + // Most likely a hardware issue of some sort + l_errl->addHwCallout( + TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, + HWAS::SRCI_PRIORITY_HIGH, + HWAS::NO_DECONFIG, + HWAS::GARD_NULL ); + // Could also be a code bug + l_errl->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_MED ); break; } diff --git a/src/usr/secureboot/base/securerom.C b/src/usr/secureboot/base/securerom.C index d656c650d..1b3bf4f1f 100644 --- a/src/usr/secureboot/base/securerom.C +++ b/src/usr/secureboot/base/securerom.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -169,9 +169,10 @@ errlHndl_t SecureROM::initialize() SECUREBOOT::MOD_SECURE_ROM_INIT, SECUREBOOT::RC_DEV_MAP_FAIL, TO_UINT64(tbrom_reg_addr), - tbrom_reg_data); + tbrom_reg_data, + true /*Add HB Software Callout*/ ); - l_errl->collectTrace("SECURE",256); + l_errl->collectTrace(SECURE_COMP_NAME,256); break; } @@ -227,9 +228,10 @@ errlHndl_t SecureROM::initialize() SECUREBOOT::MOD_SECURE_ROM_INIT, SECUREBOOT::RC_SET_PERMISSION_FAIL_EXE, TO_UINT64(l_rc), - reinterpret_cast<uint64_t>(iv_device_ptr)); + reinterpret_cast<uint64_t>(iv_device_ptr), + true /*Add HB Software Callout*/ ); - l_errl->collectTrace("SECURE",256); + l_errl->collectTrace(SECURE_COMP_NAME,256); break; } @@ -247,7 +249,7 @@ errlHndl_t SecureROM::initialize() TRACFCOMP(g_trac_secure,ERR_MRK"SecureROM::initialize():" " SecureROM::getHwHashKeys() returned an error"); - l_errl->collectTrace("SECURE",256); + l_errl->collectTrace(SECURE_COMP_NAME,256); break; } @@ -360,9 +362,12 @@ errlHndl_t SecureROM::verifyContainer(void * i_container, size_t i_size) SECUREBOOT::MOD_SECURE_ROM_VERIFY, SECUREBOOT::RC_ROM_VERIFY, l_rc, - l_hw_parms.log); + l_hw_parms.log, + true /*Add HB Software Callout*/ ); + // Callout code to force a rewrite of the contents + //@todo RTC:93870 - Define new callout for verification fail - l_errl->collectTrace("SECURE",256); + l_errl->collectTrace(SECURE_COMP_NAME,256); break; } @@ -454,9 +459,10 @@ void SecureROM::_cleanup() SECUREBOOT::MOD_SECURE_ROM_CLEANUP, SECUREBOOT::RC_SET_PERMISSION_FAIL_WRITE, TO_UINT64(l_rc), - reinterpret_cast<uint64_t>(iv_device_ptr)); + reinterpret_cast<uint64_t>(iv_device_ptr), + true /*Add HB Software Callout*/ ); - l_errl->collectTrace("SECURE",256); + l_errl->collectTrace(SECURE_COMP_NAME,256); // Commit here because funtion doesn't return error handle errlCommit(l_errl, SECURE_COMP_ID); diff --git a/src/usr/secureboot/base/settings.C b/src/usr/secureboot/base/settings.C index 1974fd158..f8036f1f2 100644 --- a/src/usr/secureboot/base/settings.C +++ b/src/usr/secureboot/base/settings.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -27,7 +27,7 @@ // SECUREBOOT : General driver traces trace_desc_t* g_trac_secure = NULL; -TRAC_INIT(&g_trac_secure, "SECURE", KILOBYTE); //1K +TRAC_INIT(&g_trac_secure, SECURE_COMP_NAME, KILOBYTE); //1K namespace SECUREBOOT diff --git a/src/usr/util/utilbase.C b/src/usr/util/utilbase.C index 48c2c4595..42e137425 100644 --- a/src/usr/util/utilbase.C +++ b/src/usr/util/utilbase.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -22,9 +22,10 @@ /* IBM_PROLOG_END_TAG */ #include "utilbase.H" #include <limits.h> +#include <hbotcompid.H> namespace Util { trace_desc_t* g_util_trace; - TRAC_INIT(&g_util_trace, "UTIL", KILOBYTE); + TRAC_INIT(&g_util_trace, UTIL_COMP_NAME, KILOBYTE); }; diff --git a/src/usr/util/utillidmgr.C b/src/usr/util/utillidmgr.C index 73cac29b0..2baee4ca3 100644 --- a/src/usr/util/utillidmgr.C +++ b/src/usr/util/utillidmgr.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -257,9 +257,8 @@ errlHndl_t UtilLidMgr::getLidPnor(void* i_dest, Util::UTIL_LIDMGR_INVAL_SIZE, TWO_UINT32_TO_UINT64(lidSize, i_destSize), - iv_lidId); - errl->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_MED); + iv_lidId, + true /*Add HB Software Callout*/); break; } @@ -431,12 +430,10 @@ errlHndl_t UtilLidMgr::getLid(void* i_dest, size_t i_destSize) Util::UTIL_LIDMGR_INVAL_SIZE, TWO_UINT32_TO_UINT64(i_destSize, needed_size), - iv_lidId + iv_lidId, + true /*Add HB Software Callout*/ ); - errl->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - free(l_pMsg->extra_data); l_pMsg->extra_data = NULL; break; diff --git a/src/usr/util/utilmem.C b/src/usr/util/utilmem.C index a3d015f30..6d6e8e6cb 100644 --- a/src/usr/util/utilmem.C +++ b/src/usr/util/utilmem.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2003,2013 */ +/* COPYRIGHT International Business Machines Corp. 2003,2014 */ /* */ /* p1 */ /* */ @@ -227,7 +227,8 @@ uint32_t UtilMem::read( UTIL_MOD_MEM_READ, l_erc, TWO_UINT32_TO_UINT64(task_gettid(), iv_eof), - reinterpret_cast<uint64_t>(iv_memStart) + reinterpret_cast<uint64_t>(iv_memStart), + true /*Add HB Software Callout*/ ); // collect some trace by default @@ -332,7 +333,8 @@ uint32_t UtilMem::write( UTIL_MOD_MEM_WRITE, l_erc, TWO_UINT32_TO_UINT64(task_gettid(), iv_eof), - reinterpret_cast<uint64_t>(iv_memStart) + reinterpret_cast<uint64_t>(iv_memStart), + true /*Add HB Software Callout*/ ); // collect some trace by default diff --git a/src/usr/vfs/vfsrp.C b/src/usr/vfs/vfsrp.C index 4d7eeb4b2..96290a757 100644 --- a/src/usr/vfs/vfsrp.C +++ b/src/usr/vfs/vfsrp.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -38,6 +38,7 @@ #include "vfsrp.H" #include <pnor/pnorif.H> #include <util/align.H> +#include <errl/errludstring.H> using namespace VFS; @@ -129,7 +130,7 @@ errlHndl_t VfsRp::_init() ); if(rc == 0) { - // TODO set permissions here or are defaults OK? + // Note: permissions are set elsewhere // Start msg_handler // NOTE: This would be a weak consistancy issues if @@ -143,7 +144,7 @@ errlHndl_t VfsRp::_init() * @moduleid VFS_MODULE_ID * @reasoncode VFS_ALLOC_VMEM_FAILED * @userdata1 returncode from mm_alloc_block() - * @userdata2 0 + * @userdata2 Size of memory to allocate * * @devdesc Could not allocate virtual memory. * @@ -154,7 +155,8 @@ errlHndl_t VfsRp::_init() VFS::VFS_MODULE_ID, // moduleid VFS::VFS_ALLOC_VMEM_FAILED, // reason Code rc, // user1 = rc - 0 // user2 + l_pnor_info.size, // user2 = size + true /*Add HB Software Callout*/ ); } } @@ -317,7 +319,7 @@ void VfsRp::_load_unload(msg_t * i_msg) * @moduleid VFS_MODULE_ID * @reasoncode VFS_PERMS_VMEM_FAILED * @userdata1 returncode from mm_set_permission() - * @userdata2 0 + * @userdata2 message type (LOAD or UNLOAD) * * @devdesc Could not set permissions on virtual memory. * @@ -328,8 +330,8 @@ void VfsRp::_load_unload(msg_t * i_msg) VFS::VFS_MODULE_ID, // moduleid VFS_PERMS_VMEM_FAILED, // reason Code rc, // user1 = rc - 0 // user2 = 0 - ); + i_msg->type, // user2 + true /*Add HB Software Callout*/ ); } } else @@ -364,6 +366,10 @@ void VfsRp::_load_unload(msg_t * i_msg) name[0], name[1] ); + err->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_HIGH ); + err->addProcedureCallout( HWAS::EPUB_PRC_SP_CODE, + HWAS::SRCI_PRIORITY_LOW ); } } i_msg->data[0] = (uint64_t) err; @@ -528,7 +534,8 @@ errlHndl_t VFS::module_load_unload(const char * i_module, VfsMessages i_msgtype) VFS::VFS_MODULE_ID, // moduleid VFS::VFS_LOAD_FAILED, // reason Code rc, // user1 = msg_sendrecv rc - i_msgtype // user2 = message type + i_msgtype, // user2 = message type + true /*Add HB Software Callout*/ ); } @@ -562,12 +569,14 @@ errlHndl_t VFS::module_address(const char * i_name, const char *& o_address, siz if(!vfs || (vfs->text != vfs->data)) { // module not found or is not a data module + uint64_t name[2] = { 0, 0 }; + strncpy( reinterpret_cast<char*>(name), i_name, sizeof(uint64_t)*2 ); /*@ errorlog tag * @errortype ERRL_SEV_INFORMATIONAL * @moduleid VFS_MODULE_ID * @reasoncode VFS_INVALID_DATA_MODULE - * @userdata1 0 - * @userdata2 0 + * @userdata1 First 8 bytes of module name + * @userdata2 Next 8 bytes of module name * * @devdesc Module is not a data module * @@ -577,9 +586,11 @@ errlHndl_t VFS::module_address(const char * i_name, const char *& o_address, siz ERRORLOG::ERRL_SEV_INFORMATIONAL, // severity VFS::VFS_MODULE_ID, // moduleid VFS::VFS_INVALID_DATA_MODULE, // reason Code - 0, - 0 + name[0], + name[1], + true /*Add HB Software Callout*/ ); + ERRORLOG::ErrlUserDetailsString(i_name).addToLog(err); } else { diff --git a/src/usr/vpd/dimmPres.C b/src/usr/vpd/dimmPres.C index 1d913a933..8e4ae5b69 100755 --- a/src/usr/vpd/dimmPres.C +++ b/src/usr/vpd/dimmPres.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -109,7 +109,8 @@ errlHndl_t dimmPresenceDetect( DeviceFW::OperationType i_opType, VPD::VPD_SPD_PRESENCE_DETECT, VPD::VPD_INSUFFICIENT_BUFFER_SIZE, TO_UINT64(io_buflen), - 0x0 ); + 0x0, + true /*Add HB Software Callout*/); break; } diff --git a/src/usr/xscom/xscom.C b/src/usr/xscom/xscom.C index a900c8c8f..671702775 100644 --- a/src/usr/xscom/xscom.C +++ b/src/usr/xscom/xscom.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -47,7 +47,7 @@ // Trace definition trace_desc_t* g_trac_xscom = NULL; -TRAC_INIT(&g_trac_xscom, "XSCOM", 2*KILOBYTE, TRACE::BUFFER_SLOW); +TRAC_INIT(&g_trac_xscom, XSCOM_COMP_NAME, 2*KILOBYTE, TRACE::BUFFER_SLOW); namespace XSCOM { @@ -171,7 +171,8 @@ errlHndl_t xscomOpSanityCheck(const DeviceFW::OperationType i_opType, XSCOM_SANITY_CHECK, XSCOM_INVALID_DATA_BUFFER, i_buflen, - va_arg(i_args,uint64_t)); + va_arg(i_args,uint64_t), + true /*Add HB Software Callout*/); break; } @@ -191,7 +192,8 @@ errlHndl_t xscomOpSanityCheck(const DeviceFW::OperationType i_opType, XSCOM_SANITY_CHECK, XSCOM_INVALID_OP_TYPE, i_opType, - va_arg(i_args,uint64_t)); + va_arg(i_args,uint64_t), + true /*Add HB Software Callout*/); break; } @@ -301,6 +303,8 @@ errlHndl_t getTargetVirtualAddress(TARGETING::Target* i_target, if (__sync_bool_compare_and_swap(&g_masterProcVirtAddr, NULL, NULL)) { + // Note: can't call TARGETING code prior to PNOR being + // brought up. uint64_t* l_tempVirtAddr = getCpuIdVirtualAddress(); if (!__sync_bool_compare_and_swap(&g_masterProcVirtAddr, NULL, l_tempVirtAddr)) @@ -326,7 +330,8 @@ errlHndl_t getTargetVirtualAddress(TARGETING::Target* i_target, XSCOM_GET_TARGET_VIRT_ADDR, XSCOM_MMIO_UNMAP_ERR, rc, - reinterpret_cast<uint64_t>(l_tempVirtAddr)); + reinterpret_cast<uint64_t>(l_tempVirtAddr), + true /*Add HB Software Callout*/); break; } } @@ -361,14 +366,7 @@ errlHndl_t getTargetVirtualAddress(TARGETING::Target* i_target, xscomChipId = i_target->getAttr<TARGETING::ATTR_FABRIC_CHIP_ID>(); - //@todo - // Save the node id of the master chip in a global as well and - // update it. For Rainer systems the node id of the master chip may - // not be 0 if it is on a second node. - // Get system XSCOM base address - // Note: can't call TARGETING code prior to PNOR being - // brought up. TARGETING::TargetService& l_targetService = TARGETING::targetService(); TARGETING::Target* l_pTopLevel = NULL; |