diff options
Diffstat (limited to 'src/usr')
74 files changed, 3270 insertions, 1753 deletions
diff --git a/src/usr/diag/attn/attn.C b/src/usr/diag/attn/attn.C index a291036f7..ce0d52dee 100644 --- a/src/usr/diag/attn/attn.C +++ b/src/usr/diag/attn/attn.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -146,7 +146,7 @@ errlHndl_t checkForIplAttentions() if(err) { - errlCommit(err, HBATTN_COMP_ID); + errlCommit(err, ATTN_COMP_ID); } } diff --git a/src/usr/diag/attn/attnmem.C b/src/usr/diag/attn/attnmem.C index e33a05772..2e26c0712 100644 --- a/src/usr/diag/attn/attnmem.C +++ b/src/usr/diag/attn/attnmem.C @@ -174,7 +174,7 @@ void resolveMcs(uint64_t i_mcs, void * i_data) if(err) { - errlCommit(err, HBATTN_COMP_ID); + errlCommit(err, ATTN_COMP_ID); } else { diff --git a/src/usr/diag/attn/attnproc.C b/src/usr/diag/attn/attnproc.C index 178530843..681326e28 100644 --- a/src/usr/diag/attn/attnproc.C +++ b/src/usr/diag/attn/attnproc.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/diag/attn/attnproc.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 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/usr/diag/attn/attnproc.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 attnproc.C * @@ -141,7 +140,7 @@ errlHndl_t ProcOps::resolve( if(err) { - errlCommit(err, HBATTN_COMP_ID); + errlCommit(err, ATTN_COMP_ID); } else if(active) diff --git a/src/usr/diag/attn/attnsvc.C b/src/usr/diag/attn/attnsvc.C index e61ada0a1..b9eda775c 100644 --- a/src/usr/diag/attn/attnsvc.C +++ b/src/usr/diag/attn/attnsvc.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/diag/attn/attnsvc.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 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/usr/diag/attn/attnsvc.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 attnsvc.C * @@ -351,7 +350,7 @@ void Service::processIntrQMsg(msg_t & i_msg) if(err) { - errlCommit(err, HBATTN_COMP_ID); + errlCommit(err, ATTN_COMP_ID); } else if(!newAttentions.empty()) { @@ -439,7 +438,7 @@ void Service::processAttentions(const AttentionList & i_attentions) if(err) { - errlCommit(err, HBATTN_COMP_ID); + errlCommit(err, ATTN_COMP_ID); } do { @@ -476,7 +475,7 @@ void Service::processAttentions(const AttentionList & i_attentions) if(err) { - errlCommit(err, HBATTN_COMP_ID); + errlCommit(err, ATTN_COMP_ID); } } @@ -502,7 +501,7 @@ errlHndl_t Service::stop() if(err) { - errlCommit(err, HBATTN_COMP_ID); + errlCommit(err, ATTN_COMP_ID); } msg_t * shutdownMsg = msg_allocate(); @@ -600,7 +599,7 @@ errlHndl_t Service::start() if(err2) { - errlCommit(err2, HBATTN_COMP_ID); + errlCommit(err2, ATTN_COMP_ID); } } else @@ -627,7 +626,7 @@ Service::~Service() if(err) { - errlCommit(err, HBATTN_COMP_ID); + errlCommit(err, ATTN_COMP_ID); } sync_cond_destroy(&iv_cond); diff --git a/src/usr/diag/mdia/mdiasm.C b/src/usr/diag/mdia/mdiasm.C index 1e84a2aab..710281f4c 100644 --- a/src/usr/diag/mdia/mdiasm.C +++ b/src/usr/diag/mdia/mdiasm.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/diag/mdia/mdiasm.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 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/usr/diag/mdia/mdiasm.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 mdiasm.C * @brief mdia state machine implementation @@ -105,7 +104,7 @@ void StateMachine::processCommandTimeout(const MonitorIDs & i_monitorIDs) HWAS::DECONFIG, HWAS::GARD_NULL); - errlCommit(err, HBMDIA_COMP_ID); + errlCommit(err, MDIA_COMP_ID); break; } @@ -145,7 +144,7 @@ errlHndl_t StateMachine::run(const WorkFlowAssocMap & i_list) { if((*wit)->log) { - errlCommit((*wit)->log, HBMDIA_COMP_ID); + errlCommit((*wit)->log, MDIA_COMP_ID); // TODO (component, actions, etc) } } diff --git a/src/usr/diag/prdf/common/framework/rule/prdrLoadChip.C b/src/usr/diag/prdf/common/framework/rule/prdrLoadChip.C index 076524b4f..6915c1ded 100755 --- a/src/usr/diag/prdf/common/framework/rule/prdrLoadChip.C +++ b/src/usr/diag/prdf/common/framework/rule/prdrLoadChip.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2004,2012 */ +/* COPYRIGHT International Business Machines Corp. 2004,2013 */ /* */ /* p1 */ /* */ @@ -39,6 +39,11 @@ namespace Prdr { +// 'using namespace PRDF' added so that the Hostboot error log parser can find +// the moduleid and reasoncode in the error log tags. The alternative is to add +// 'PRDF::' before the moduleid and reasoncode in the error log tags +using namespace PRDF; + void ReadExpr(UtilStream & i_stream, Expr & o_expr); // NOTE: caller must call delete[] to release the buffer diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index 374277df4..a48fa4db7 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,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -37,6 +37,7 @@ #include <errl/errlmanager.H> #include <errl/errludbacktrace.H> #include <errl/errludcallout.H> +#include <errl/errlreasoncodes.H> #include <trace/interface.H> #include <arch/ppc.H> #include <hwas/common/hwasCallout.H> @@ -305,9 +306,9 @@ void ErrlEntry::commit( compId_t i_committerComponent ) it++ ) { // if this is a CALLOUT - if ((HBERRL_COMP_ID == (*it)->iv_header.iv_compId) && + if ((ERRL_COMP_ID == (*it)->iv_header.iv_compId) && (1 == (*it)->iv_header.iv_ver) && - (HBERRL_UDT_CALLOUT == (*it)->iv_header.iv_sst)) + (ERRL_UDT_CALLOUT == (*it)->iv_header.iv_sst)) { // call HWAS to have this processed (*pFn)(plid(),(*it)->iv_pData, (*it)->iv_Size); diff --git a/src/usr/errl/errlud.C b/src/usr/errl/errlud.C index 0a442781b..09be2bacf 100644 --- a/src/usr/errl/errlud.C +++ b/src/usr/errl/errlud.C @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/errl/errlud.C $ -// -// 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/errl/errlud.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* */ +/* 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 errlud.C * @@ -145,6 +145,13 @@ uint64_t ErrlUD::flatten( void * o_pBuffer, const uint64_t i_cbBuffer ) // Followed by the user data memcpy( pBuffer, iv_pData, iv_Size ); + pBuffer += iv_Size; + + // Buffer is rounded up to the nearst 4-byte boundary, pad with zeroes + for (uint64_t i = l_cb + iv_Size; i < l_cbFlat; i++) + { + *pBuffer++ = 0; + } // return how many bytes were flattened l_rc = l_cbFlat; diff --git a/src/usr/errl/errludbacktrace.C b/src/usr/errl/errludbacktrace.C index 407af55de..73afc9db2 100644 --- a/src/usr/errl/errludbacktrace.C +++ b/src/usr/errl/errludbacktrace.C @@ -1,31 +1,32 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/errl/errludbacktrace.C $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 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 +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/errludbacktrace.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 errludbacktrace.C * * @brief Implementation of ErrlUserDetailsBackTrace */ #include <errl/errludbacktrace.H> +#include <errl/errlreasoncodes.H> #include <errl/backtrace.H> namespace ERRORLOG @@ -45,9 +46,9 @@ ErrlUserDetailsBackTrace::ErrlUserDetailsBackTrace() memcpy(l_pBuf, &l_bt[0], l_size); // Set up ErrlUserDetails instance variables - iv_CompId = HBERRL_COMP_ID; + iv_CompId = ERRL_COMP_ID; iv_Version = 1; - iv_SubSection = HBERRL_UDT_BACKTRACE; + iv_SubSection = ERRL_UDT_BACKTRACE; } } diff --git a/src/usr/errl/errludcallout.C b/src/usr/errl/errludcallout.C index aa6b61204..3fa43078e 100644 --- a/src/usr/errl/errludcallout.C +++ b/src/usr/errl/errludcallout.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/errl/errludcallout.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 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/usr/errl/errludcallout.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 errludcallout.C * @@ -28,7 +27,7 @@ */ #include <sys/task.h> #include <errl/errludcallout.H> - +#include <errl/errlreasoncodes.H> #include <targeting/common/targetservice.H> #include <targeting/common/util.H> #include <targeting/common/trace.H> @@ -50,9 +49,9 @@ ErrlUserDetailsCallout::ErrlUserDetailsCallout( TRACDCOMP(g_trac_errl, "HWCallout entry"); // Set up ErrlUserDetails instance variables - iv_CompId = HBERRL_COMP_ID; + iv_CompId = ERRL_COMP_ID; iv_Version = 1; - iv_SubSection = HBERRL_UDT_CALLOUT; + iv_SubSection = ERRL_UDT_CALLOUT; //iv_merge = false; // use the default of false @@ -81,9 +80,9 @@ ErrlUserDetailsCallout::ErrlUserDetailsCallout( TRACDCOMP(g_trac_errl, "Procedure Callout"); // Set up ErrlUserDetails instance variables - iv_CompId = HBERRL_COMP_ID; + iv_CompId = ERRL_COMP_ID; iv_Version = 1; - iv_SubSection = HBERRL_UDT_CALLOUT; + iv_SubSection = ERRL_UDT_CALLOUT; //iv_merge = false; // use the default of false diff --git a/src/usr/errl/errludlogregister.C b/src/usr/errl/errludlogregister.C index a16c291f8..722b3680a 100644 --- a/src/usr/errl/errludlogregister.C +++ b/src/usr/errl/errludlogregister.C @@ -1,33 +1,32 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/errl/errludlogregister.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 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/usr/errl/errludlogregister.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 errludlogregister.C * * @brief Implementation of ErrlUserDetailsLogRegister */ #include <errl/errludlogregister.H> - +#include <errl/errlreasoncodes.H> #include <targeting/common/targetservice.H> #include <targeting/common/util.H> #include <targeting/common/trace.H> @@ -45,9 +44,9 @@ extern TARG_TD_t g_trac_errl; void ErrlUserDetailsLogRegister::setStateLogHUID() { // Set up ErrlUserDetails instance variables - iv_CompId = HBERRL_COMP_ID; + iv_CompId = ERRL_COMP_ID; iv_Version = 1; - iv_SubSection = HBERRL_UDT_LOGREGISTER; + iv_SubSection = ERRL_UDT_LOGREGISTER; // override the default of false. iv_merge = true; diff --git a/src/usr/errl/errludstring.C b/src/usr/errl/errludstring.C index 3b1158926..c9617d99b 100644 --- a/src/usr/errl/errludstring.C +++ b/src/usr/errl/errludstring.C @@ -1,31 +1,32 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/errl/errludstring.C $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 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 +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/errludstring.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 errludstring.C * * @brief Implementation of ErrlUserDetailsString */ #include <errl/errludstring.H> +#include <errl/errlreasoncodes.H> #include <string.h> namespace ERRORLOG @@ -39,9 +40,9 @@ ErrlUserDetailsString::ErrlUserDetailsString(const char * i_pString) strcpy(l_pBuf, i_pString); // Set up ErrlUserDetails instance variables - iv_CompId = HBERRL_COMP_ID; + iv_CompId = ERRL_COMP_ID; iv_Version = 1; - iv_SubSection = HBERRL_UDT_STRING; + iv_SubSection = ERRL_UDT_STRING; // override the default of false. iv_merge = true; diff --git a/src/usr/errl/errludtarget.C b/src/usr/errl/errludtarget.C index dd8109417..4d36f5e7a 100644 --- a/src/usr/errl/errludtarget.C +++ b/src/usr/errl/errludtarget.C @@ -1,31 +1,32 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/errl/errludtarget.C $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 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 +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/errludtarget.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 errludtarget.C * * @brief Implementation of ErrlUserDetailsTarget */ #include <errl/errludtarget.H> +#include <errl/errlreasoncodes.H> #include <targeting/common/target.H> #include <targeting/common/targetservice.H> #include <targeting/common/trace.H> @@ -38,9 +39,9 @@ ErrlUserDetailsTarget::ErrlUserDetailsTarget( const TARGETING::Target * i_pTarget) { // Set up ErrlUserDetails instance variables - iv_CompId = HBERRL_COMP_ID; + iv_CompId = ERRL_COMP_ID; iv_Version = 1; - iv_SubSection = HBERRL_UDT_TARGET; + iv_SubSection = ERRL_UDT_TARGET; // override the default of false. //iv_merge = true; diff --git a/src/usr/errl/errluserdetails.C b/src/usr/errl/errluserdetails.C index 044e6771b..c9110e386 100644 --- a/src/usr/errl/errluserdetails.C +++ b/src/usr/errl/errluserdetails.C @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/errl/errluserdetails.C $ -// -// 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/errl/errluserdetails.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* */ +/* 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 errluserdetails.C * @@ -37,7 +37,7 @@ namespace ERRORLOG // ErrlUserDetails default constructor /*****************************************************************************/ ErrlUserDetails::ErrlUserDetails() -: iv_CompId(HBERRL_COMP_ID), +: iv_CompId(ERRL_COMP_ID), iv_Version(0), iv_SubSection(0), iv_merge(false), diff --git a/src/usr/errl/parser/genErrlParsers.pl b/src/usr/errl/parser/genErrlParsers.pl new file mode 100755 index 000000000..33ddabbdc --- /dev/null +++ b/src/usr/errl/parser/genErrlParsers.pl @@ -0,0 +1,898 @@ +#!/usr/bin/perl +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/errl/parser/genErrlParsers.pl $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2013 +# +# 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 + +# Purpose: Generates files needed to parse SRC and User Detail Data from +# Hostboot error logs. The files are delivered to the FSP and built there +# +# It scans the hostboot source code for the doxygen like error log tags and +# generates a C file for each component containing a function called by the FSP +# errl tool to parse the error log SRC, for example: +# - hbfwSrcParse1.C (For parsing errlogs generated by comp-id 0x01) +# - hbfwSrcParse2.C +# - hbfwSrcParse3.C +# It generates a file that contains IDs needed by the Hostboot User Detail Data +# parsers +# - hbfwUdIds.H +# It generates a makefile that builds the Hostboot SRC/UserDetailData parsers +# - makefile + +use strict; +use Time::localtime; + +#------------------------------------------------------------------------------ +# Process Arguments +#------------------------------------------------------------------------------ +my $DEBUG = 0; +my $base = "."; +my $outputDir = "."; + +while( $ARGV = shift ) +{ + if( $ARGV =~ m/-b/ ) + { + $base = shift; + } + elsif( $ARGV =~ m/-o/i ) + { + $outputDir = shift; + } + elsif( $ARGV =~ m/-d/i ) + { + $DEBUG = 1; + } + else + { + usage(); + } +} + +#------------------------------------------------------------------------------ +# Global variables +#------------------------------------------------------------------------------ +my $compIdFile = $base."/src/include/usr/hbotcompid.H"; +my $compPath = $base."/src/usr"; +my $compIncPath = $base."/src/include/usr"; +my $genFilesPath = $base."/obj/genfiles"; + +#------------------------------------------------------------------------------ +# Call subroutines to populate the following arrays: +# - @reasonCodeFiles (The list of files to parse through for reason codes) +# - @filesToParse (The list of files to parse through for SRC tags) +# - @pluginDirsToParse (the list of plugin directories containing User Detail +# Data parsers) +#------------------------------------------------------------------------------ +my @reasonCodeFiles; +my @filesToParse; +my @pluginDirsToParse; +getReasonCodeFiles($compIncPath); +getFilesToParse($compPath); +getFilesToParse($compIncPath); +getFilesToParse($genFilesPath); +getPluginDirsToParse($compPath); + +if ($DEBUG) +{ + print("---> ReasonCode files to process\n"); + foreach my $file(@reasonCodeFiles) + { + print("RC File: $file\n"); + } +} + +if ($DEBUG) +{ + print("---> Files to parse for error log tags\n"); + foreach my $file(@filesToParse) + { + print("File to Parse: $file\n"); + } +} + +if ($DEBUG) +{ + print("---> Directories to parse for user detail data\n"); + foreach my $dir(@pluginDirsToParse) + { + print("Plugin Directory to Parse: $dir\n"); + } +} + +#------------------------------------------------------------------------------ +# Process the compIdFile, recording all of the component ID values +#------------------------------------------------------------------------------ +my %compIdToValueHash; + +open(COMP_ID_FILE, $compIdFile) or die("Cannot open: $compIdFile: $!"); + +while (my $line = <COMP_ID_FILE>) +{ + # An example of the component ID line is: + # const compId_t DEVFW_COMP_ID = 0x0200; + if ($line =~ /^const compId_t (\w+) = 0x([\dA-Fa-f]+)00/) + { + my $compId = $1; + my $compValue = $2; + + # Strip off any leading zeroes from the component value + $compValue =~ s/^0//g; + + $compIdToValueHash{$compId} = $compValue; + } +} + +close(COMP_ID_FILE); + +if ($DEBUG) +{ + print("---> Component ID values\n"); + foreach my $key (keys %compIdToValueHash) + { + print ("CompId: $key = $compIdToValueHash{$key},\n"); + } +} + +#------------------------------------------------------------------------------ +# Process the reasonCodeFiles, recording all of the module ids, reason codes +# and user detail data sections in hashes: The module ids and reason codes +# can be duplicated across components and so the namespace is also stored. +# Example hashes: +# +# %modIdToValueHash = ( +# 'PNOR' => { 'MOD_PNORDD_ERASEFLASH' => '1A', +# 'MOD_PNORDD_READFLASH' => '12'}, +# 'IBSCOM' => { 'IBSCOM_GET_TARG_VIRT_ADDR' => '03', +# 'IBSCOM_SANITY_CHECK' => '02'} +# ); +# +# %rcToValueHash = ( +# 'PNOR' => { 'RC_UNSUPPORTED_OPERATION' => '0607', +# 'RC_STARTUP_FAIL' => '0605'}, +# 'IBSCOM' => { 'IBSCOM_INVALID_CONFIG' => '1C03', +# 'IBSCOM_INVALID_OP_TYPE' => '1C02'} +# ); +# +# %udIdToValueHash = ( +# 'HWPF_UDT_HWP_RCVALUE' => '0x01', +# 'ERRL_UDT_CALLOUT' => '0x07' +# ); +#------------------------------------------------------------------------------ +my %modIdToValueHash; +my %rcToValueHash; +my %udIdToValueHash; + +foreach my $file (@reasonCodeFiles) +{ + open(RC_FILE, $file) or die("Cannot open: $file: $!"); + my $namespace = "NO_NS"; + my $processing = 0; + my $processingModIds = 1; + my $processingRcs = 2; + my $processingUds = 3; + my $compId = ""; + + while (my $line = <RC_FILE>) + { + if ($line =~ /^\s*namespace\s+(\w+)/) + { + if ($namespace ne "NO_NS") + { + print ("$0: Multiple namespaces in '$file'\n"); + exit(1); + } + $namespace = $1; + + # Check for common code files where the reason codes do not contain + # component IDs. Expand this hash as needed to add more components + my %namespaceToCompHash = ( + "HWAS" => "HWAS_COMP_ID"); + + if (exists $namespaceToCompHash{$namespace}) + { + # Reason codes do not contain component IDs + $compId = $namespaceToCompHash{$namespace}; + } + else + { + # Reason codes contain component IDs + $compId = ""; + } + + next; + } + elsif ($line =~ /enum.+ModuleId/i) + { + $processing = $processingModIds; + next; + } + elsif ($line =~ /enum.+ReasonCode/i) + { + $processing = $processingRcs; + next; + } + elsif ($line =~ /enum.+UserDetail/i) + { + $processing = $processingUds; + next; + } + elsif ($line =~ /}/) + { + $processing = 0; + next; + } + + if ($processing == $processingModIds) + { + # Example: "MOD_PNORRP_WAITFORMESSAGE = 0x01" + if ($line =~ /(\w+)\s+=\s+0x([\dA-Fa-f]+)/) + { + $modIdToValueHash{$namespace}->{$1} = $2; + } + } + elsif ($processing == $processingRcs) + { + if ($compId ne "") + { + # Reason code line does not contain Component ID + # Example: "RC_TARGET_NOT_DECONFIGURABLE = 0x01," + if ($line =~ /(\w+)\s+=\s+0x([\dA-Fa-f]+)/) + { + if (! exists $compIdToValueHash{$compId}) + { + print ("$0: Could not find CompID '$compId'\n"); + exit(1); + } + $rcToValueHash{$namespace}->{$1} = + $compIdToValueHash{$compId} . $2; + } + } + else + { + # Reason code line contains Component ID + # Example: "RC_INVALID_MESSAGE_TYPE = PNOR_COMP_ID | 0x01" + if ($line =~ /(\w+)\s+=\s+(\w+)\s+\|\s+0x([\dA-Fa-f]+)/) + { + if (! exists $compIdToValueHash{$2}) + { + print ("$0: Could not find CompID '$2'\n"); + exit(1); + } + $rcToValueHash{$namespace}->{$1} = + $compIdToValueHash{$2} . $3; + } + } + } + elsif ($processing == $processingUds) + { + # Example: "HWPF_UDT_HWP_RCVALUE = 0x01," + if ($line =~ /(\w+)\s+=\s+(0x[\dA-Fa-f]+)/) + { + my $udId = $1; + my $udValue = $2; + + if (exists($udIdToValueHash{$udId})) + { + print ("$0: duplicate user data section in '$file'\n"); + print ("$0: section is '$udId'\n"); + exit(1); + } + + $udIdToValueHash{$udId} = $udValue; + } + } + } + + close(RC_FILE); +} + +if ($DEBUG) +{ + print("---> ModuleId values\n"); + foreach my $namespaceKey (keys %modIdToValueHash) + { + foreach my $modIdKey (keys %{$modIdToValueHash{$namespaceKey}}) + { + print ("$namespaceKey:$modIdKey:$modIdToValueHash{$namespaceKey}->{$modIdKey}\n"); + } + } + + print("---> ReasonCode values\n"); + foreach my $namespaceKey (keys %rcToValueHash) + { + foreach my $rcKey (keys %{$rcToValueHash{$namespaceKey}}) + { + print ("$namespaceKey:$rcKey:$rcToValueHash{$namespaceKey}->{$rcKey}\n"); + } + } + + print("---> User Detail Data Section values\n"); + foreach my $udKey (keys %udIdToValueHash) + { + print ("$udKey:$udIdToValueHash{$udKey}\n"); + } +} + +#------------------------------------------------------------------------------ +# Generate the FSP hbfwUdIds.H file that contains the set of Hostboot component +# IDs and user detail data IDs. This is used by the user data parsers +#------------------------------------------------------------------------------ +my $outputFileName = $outputDir . "/hbfwUdIds.H"; +open(OFILE, ">", $outputFileName) or die("Cannot open: $outputFileName: $!"); + +print OFILE "// Automatically generated by Hostboot's $0\n"; +print OFILE "// Do not modify this file in the FSP tree, it is provided by\n"; +print OFILE "// Hostboot and will be overwritten\n"; +print OFILE "//\n\n"; +print OFILE "\#ifndef HBFWUDIDS_H\n"; +print OFILE "\#define HBFWUDIDS_H\n\n"; +print OFILE "// Hostboot component IDs\n"; +print OFILE "namespace hbfw\n"; +print OFILE "{\n"; +print OFILE " enum\n"; +print OFILE " {\n"; +foreach my $key (keys %compIdToValueHash) +{ + print OFILE " $key = 0x$compIdToValueHash{$key}00,\n"; +} +print OFILE " };\n"; +print OFILE "}\n\n"; +print OFILE "// Hostboot User Detail Data IDs\n"; +print OFILE "enum\n"; +print OFILE "{\n"; +foreach my $udKey (keys %udIdToValueHash) +{ + print OFILE " $udKey = $udIdToValueHash{$udKey},\n"; +} +print OFILE "};\n\n"; +print OFILE "#endif\n"; + +close(OFILE); + +#------------------------------------------------------------------------------ +# Process the code files, looking for error log tags, save the parsing for each +# in a hash indexed by the component value +#------------------------------------------------------------------------------ +my %compValueToParseHash; +my %rcModValuesUsed; + +foreach my $file (@filesToParse) +{ + open(PARSE_FILE, $file) or die("Cannot open: $file: $!"); + my @namespaces; + push(@namespaces, "NO_NS"); + + #------------------------------------------------------------------------- + # Example Tag: + # /*@ + # * @errortype + # * @reasoncode I2C_INVALID_OP_TYPE + # * @severity ERRL_SEV_UNRECOVERABLE + # * @moduleid I2C_PERFORM_OP + # * @userdata1 i_opType + # * @userdata2 addr + # * @devdesc Invalid Operation type. + # */ + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + while (my $line = <PARSE_FILE>) + { + if ($line =~ /namespace\s+(\w+)/) + { + # Found a namespace, record it to be used when searching for + # moduleid and reasoncode values + push(@namespaces, $1); + next; + } + + if ($line =~ /\/\*\@/) + { + # Found the start of an error log tag + my $modId = ""; + my $modIdValue = ""; + my $rc = ""; + my $rcValue = ""; + my @userData; + my $desc = ""; + + # Read the entire error log tag into an array + my @tag; + + while ($line = <PARSE_FILE>) + { + if ($line =~ /\*\//) + { + # Found the end of an error log tag + last; + } + push(@tag, $line); + } + + # Process the error log tag + my $numLines = scalar (@tag); + + for (my $lineNum = 0; $lineNum < $numLines; $lineNum++) + { + $line = $tag[$lineNum]; + + if ($line =~ /\@moduleid\s+(\S+)/i) + { + # Found a moduleid, find out the value + $modId = $1; + + if ($modId =~ /(\w+)::(\w+)/) + { + # The namespace was provided + if ((exists $modIdToValueHash{$1}) && + (exists ${modIdToValueHash{$1}->{$2}})) + { + $modIdValue = ${modIdToValueHash{$1}->{$2}}; + } + } + else + { + # The namespace was not provided, look through all + # namespaces mentioned in the file + foreach my $namespace(@namespaces) + { + if ((exists $modIdToValueHash{$namespace}) && + (exists ${modIdToValueHash{$namespace}->{$modId}})) + { + $modIdValue = ${modIdToValueHash{$namespace}->{$modId}}; + last; + } + } + } + + if ($modIdValue eq "") + { + print ("$0: Error finding moduleid value for '$file:$line'\n"); + exit(1); + } + } + elsif ($line =~ /\@reasoncode\s+(\S+)/i) + { + # Found a reasoncode, figure out the value + $rc = $1; + + if ($rc =~ /(\w+)::(\w+)/) + { + # The namespace was provided + if ((exists $rcToValueHash{$1}) && + (exists ${rcToValueHash{$1}->{$2}})) + { + $rcValue = ${rcToValueHash{$1}->{$2}}; + } + } + else + { + # The namespace was not provided, look through all + # namespaces mentioned in the file + foreach my $namespace(@namespaces) + { + if ((exists $rcToValueHash{$namespace}) && + (exists ${rcToValueHash{$namespace}->{$rc}})) + { + $rcValue = ${rcToValueHash{$namespace}->{$rc}}; + last; + } + } + } + + if ($rcValue eq "") + { + print ("$0: Error finding reasoncode value for '$file:$line'\n"); + exit(1); + } + } + elsif ($line =~ /\@(userdata\S+)\s+(\S+.*)/i) + { + # Found user data, strip out any double-quotes and trailing + # whitespace + my $udDesc = $1; + my $udText = $2; + $udText =~ s/\"//g; + $udText =~ s/\s+$//; + + # Look for follow-on lines + for ($lineNum++; $lineNum < $numLines; $lineNum++) + { + $line = $tag[$lineNum]; + + if ($line =~ /\@/) + { + # Found the next element, rewind + $lineNum--; + last; + } + + # Continuation of user data, strip out any double-quotes + # and leading / trailing whitespace + $line =~ s/^.+\*\s+//; + $line =~ s/\"//g; + $line =~ s/\s+$//; + + if ($line ne "") + { + $udText = $udText . " " . $line; + } + } + + my $udString = "\"$udDesc\", \"$udText\""; + push(@userData, $udString); + } + elsif ($line =~ /\@devdesc\s+(\S+.*)/i) + { + # Found a description, strip out any double-quotes and + # trailing whitespace + $desc = $1; + $desc =~ s/\"//g; + $desc =~ s/\s+$//; + + # Look for follow-on lines + for ($lineNum++; $lineNum < $numLines; $lineNum++) + { + $line = $tag[$lineNum]; + + if ($line =~ /\@/) + { + # Found the next element, rewind + $lineNum--; + last; + } + + # Continuation of description, strip out any double- + # quotes and leading / trailing whitespace + $line =~ s/^.+\*\s+//; + $line =~ s/\"//g; + $line =~ s/\s+$//; + + if ($line ne "") + { + $desc = $desc . " " . $line; + } + } + } + } + + # Check that the required fields were found + if ($modId eq "") + { + print ("$0: moduleid missing from error log tag in '$file'\n"); + print ("$0: reasoncode is '$rc'\n"); + exit(1); + } + + if ($rc eq "") + { + print ("$0: reasoncode missing from error log tag in '$file'\n"); + print ("$0: moduleid is '$modId'\n"); + exit(1); + } + + if ($desc eq "") + { + print ("$0: description missing from error log tag in '$file'\n"); + print ("$0: moduleid is '$modId', reasoncode is '$rc'\n"); + exit(1); + } + + # Create the combined returncode/moduleid value that the parser looks for and + # ensure that it is not a duplicate of one already found + my $rcModValue = $rcValue . $modIdValue; + + if (exists($rcModValuesUsed{$rcModValue})) + { + print ("$0: duplicate moduleid/reasoncode error log tag in '$file'\n"); + print ("$0: moduleid is '$modId', reasoncode is '$rc'\n"); + exit(1); + } + + $rcModValuesUsed{$rcModValue} = 1; + + # Create the parser code for this error + my $parserCode = " case 0x$rcModValue:\n" + . " i_parser.PrintString(\"devdesc\", \"$desc\");\n" + . " i_parser.PrintString(\"moduleid\", \"$modId\");\n" + . " i_parser.PrintString(\"reasoncode\", \"$rc\");\n"; + foreach my $udString(@userData) + { + $parserCode .= " i_parser.PrintString($udString);\n"; + } + $parserCode .= " break;\n\n"; + + # The component value is the first two characters of the 4 character rc + my $compValue = $rcValue; + $compValue =~ s/..$//; + + # Add the parser code to compValueToParseHash + $compValueToParseHash{$compValue} .= $parserCode; + } + } + + close(PARSE_FILE); +} + +#------------------------------------------------------------------------------ +# For each component value, print a file containing the parse code +#------------------------------------------------------------------------------ +my $timestamp = ctime(); +my $imageId = getImageId(); + +foreach my $compValue (keys %compValueToParseHash) +{ + my $outputFileName = $outputDir . "/hbfwSrcParse$compValue.C"; + open(OFILE, ">", $outputFileName) or die("Cannot open: $outputFileName: $!"); + + print OFILE "/*\n"; + print OFILE " * Automatically generated by Hostboot's $0\n"; + print OFILE " * Do not modify this file in the FSP tree, it is provided by\n"; + print OFILE " * Hostboot and will be overwritten\n"; + print OFILE " *\n"; + print OFILE " * TimeStamp: $timestamp\n"; + print OFILE " * Image Id: $imageId\n"; + print OFILE " *\n"; + print OFILE " */\n\n"; + print OFILE "#include <errlplugins.H>\n"; + print OFILE "#include <errlusrparser.H>\n"; + print OFILE "#include <srcisrc.H>\n\n"; + print OFILE "static bool SrcDataParse(ErrlUsrParser & i_parser,\n"; + print OFILE " const SrciSrc & i_src)\n"; + print OFILE "{\n"; + print OFILE " uint32_t l_error = (i_src.reasonCode() << 8) + i_src.moduleId();\n"; + print OFILE " bool l_success = true;\n\n"; + print OFILE " switch(l_error)\n"; + print OFILE " {\n"; + print OFILE $compValueToParseHash{$compValue}; + print OFILE " default:\n"; + print OFILE " l_success = false;\n"; + print OFILE " break;\n"; + print OFILE " };\n"; + print OFILE " return l_success;\n"; + print OFILE "}\n\n"; + print OFILE "static errl::SrcPlugin g_SrcPlugin(0x$compValue"; + print OFILE "00, SrcDataParse);\n"; + + close(OFILE); +} + +#------------------------------------------------------------------------------ +# Figure out the user detail data files to compile for each component +#------------------------------------------------------------------------------ +my %compValToUdFilesHash; + +foreach my $dir(@pluginDirsToParse) +{ + my $ofiles = ""; + my $compId = ""; + my $compVal = 0; + + # Open the directory and read all entries (files) skipping any beginning + # with "." + my @dirEntries; + opendir(DH, $dir) or die("Cannot open $dir directory"); + @dirEntries = grep { !/^\./ } readdir(DH); + closedir(DH); + + # The plugin directory must contain a <COMP_ID>_Parse.C file which contains + # the user detail data parser for that component + foreach my $file(@dirEntries) + { + if ($file =~ /^(.+).C$/) + { + # Found a C file add it to the files to compile list + $ofiles .= "$1\.o "; + + if ($file =~ /^(.+COMP_ID)_Parse.C$/) + { + # Found the main Parse.C file for a component + $compId = $1; + } + } + } + + if ($compId eq "") + { + print ("$0: Could not find CompID Parser file in $dir\n"); + exit(1); + } + + # Find the component ID value + if (! exists $compIdToValueHash{"$compId"}) + { + print ("$0: Could not find CompID $compId while processing $dir\n"); + exit(1); + } + $compVal = $compIdToValueHash{$compId}; + + $compValToUdFilesHash{$compVal} = $ofiles; +} + +#------------------------------------------------------------------------------ +# Generate the FSP makefile that builds the Hostboot error log parsers +#------------------------------------------------------------------------------ +$outputFileName = $outputDir . "/makefile"; +open(OFILE, ">", $outputFileName) or die("Cannot open: $outputFileName: $!"); + +print OFILE "\# Automatically generated by Hostboot's $0\n"; +print OFILE "\# Do not modify this file in the FSP tree, it is provided by\n"; +print OFILE "\# Hostboot and will be overwritten\n"; +print OFILE "\#\n"; +print OFILE "CFLAGS += -DPARSER\n\n"; + +print OFILE "\#-------------------------------------------------------------\n"; +print OFILE "\# SRC Parsers\n"; +print OFILE "\#-------------------------------------------------------------\n"; +foreach my $compValue (keys %compValueToParseHash) +{ + print OFILE "libB-$compValue" . "00.so_OFILES = hbfwSrcParse$compValue.o\n"; + print OFILE "libB-$compValue" . "00.so_EXTRA_LIBS = libbase.so\n\n"; +} + +print OFILE "\#-------------------------------------------------------------\n"; +print OFILE "\# User Detail Data Parsers\n"; +print OFILE "\#-------------------------------------------------------------\n"; +foreach my $compValue (keys %compValToUdFilesHash) +{ + print OFILE "libB-$compValue" . "00.so_OFILES += $compValToUdFilesHash{$compValue}\n\n"; +} + +print OFILE "\#-------------------------------------------------------------\n"; +print OFILE "\# Shared library for each component\n"; +print OFILE "\#-------------------------------------------------------------\n"; +print OFILE "SHARED_LIBRARIES = "; + +foreach my $compValue (keys %compValueToParseHash) +{ + print OFILE "libB-$compValue" . "00.so "; +} + +print OFILE "\n\n.include<\${RULES_MK}>\n"; + +close(OFILE); + +#------------------------------------------------------------------------------ +# Subroutine that prints the usage +#------------------------------------------------------------------------------ +sub usage +{ + print "Usage: $0 <-b base> <-d> <-o output dir>\"\n"; + print "\n"; + print "-b: Base directory containing Hostboot src directory (default is pwd)\n"; + print "-o: Output directory where files are created (default is pwd)\n"; + print "-d Enable Debug messages.\n"; + print "\n\n"; + exit 1; +} + +#------------------------------------------------------------------------------ +# Subroutine that updates @reasonCodeFiles +#------------------------------------------------------------------------------ +sub getReasonCodeFiles +{ + # Open the input directory and read all entries (files/directories) + # Skipping any beginning with "." + my $inputDir = @_[0]; + my @dirEntries; + opendir(DH, $inputDir) or die("Cannot open $inputDir directory"); + @dirEntries = grep { !/^\./ } readdir(DH); + closedir(DH); + + foreach my $dirEntry (@dirEntries) + { + my $dirEntryPath = "$inputDir/$dirEntry"; + + if (-d $dirEntryPath) + { + # Recursively call this function + getReasonCodeFiles($dirEntryPath); + } + elsif(($dirEntry =~ /reasoncodes/i) || + ($dirEntry =~ /service_codes/i) || + ($dirEntry =~ /examplerc/i)) + { + # Found reason-codes file + push(@reasonCodeFiles, $dirEntryPath); + } + } +} + +#------------------------------------------------------------------------------ +# Subroutine that updates @filesToParse +#------------------------------------------------------------------------------ +sub getFilesToParse +{ + # Open the input directory and read all entries (files/directories) + # Skipping any beginning with "." + my $inputDir = @_[0]; + my @dirEntries; + opendir(DH, $inputDir) or die("Cannot open $inputDir directory"); + @dirEntries = grep { !/^\./ } readdir(DH); + closedir(DH); + + foreach my $dirEntry (@dirEntries) + { + my $dirEntryPath = "$inputDir/$dirEntry"; + + if (-d $dirEntryPath) + { + # Recursively call this function + getFilesToParse($dirEntryPath); + } + elsif($dirEntry =~ /\.[H|C]$/) + { + # Found file to parse + push(@filesToParse, $dirEntryPath); + } + } +} + +#------------------------------------------------------------------------------ +# Subroutine that updates @pluginDirsToParse +#------------------------------------------------------------------------------ +sub getPluginDirsToParse +{ + # Open the input directory and read all entries (files/directories) + # Skipping any beginning with "." + my $inputDir = @_[0]; + my @dirEntries; + opendir(DH, $inputDir) or die("Cannot open $inputDir directory"); + @dirEntries = grep { !/^\./ } readdir(DH); + closedir(DH); + + foreach my $dirEntry (@dirEntries) + { + my $dirEntryPath = "$inputDir/$dirEntry"; + + if (-d $dirEntryPath) + { + if ($dirEntryPath =~ /plugins/) + { + # Found plugins directory + push(@pluginDirsToParse, $dirEntryPath); + } + else + { + # Recursively call this function + getPluginDirsToParse($dirEntryPath); + } + } + } +} + +#------------------------------------------------------------------------------ +# Subroutine that gets the Image ID +#------------------------------------------------------------------------------ +sub getImageId +{ + my $imageId = `git describe --dirty || echo Unknown-Image \`git rev-parse --short HEAD\``; + chomp $imageId; + + if (($imageId =~ m/Unknown-Image/) || # Couldn't find git describe tag. + ($imageId =~ m/dirty/) || # Find 'dirty' commit. + ($imageId =~ m/^.{15}-[1-9]+/)) # Found commits after a tag. + { + $imageId = $imageId."/".$ENV{"USER"}; + } + + return $imageId; +} + diff --git a/src/usr/errl/parser/makefile b/src/usr/errl/parser/makefile index e0307c629..69451597a 100644 --- a/src/usr/errl/parser/makefile +++ b/src/usr/errl/parser/makefile @@ -1,25 +1,25 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. # -# $Source: src/usr/errl/parser/makefile $ +# $Source: src/usr/errl/parser/makefile $ # -# IBM CONFIDENTIAL +# IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2011 +# COPYRIGHT International Business Machines Corp. 2011,2013 # -# p1 +# p1 # -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code +# 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. +# 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 +# Origin: 30 # -# IBM_PROLOG_END +# IBM_PROLOG_END_TAG # makefile for errlparser a 32-bit x86 linux binary # to extract the PEL of an error log and @@ -28,10 +28,9 @@ # "Pretty printing" of those error logs is the # function of FipS 'errl' and its plugins, not this program. # -# This makefile runs 'scanforsrc.pl' which generates -# hostBootSrcParse.H, a file that hostboot plugins will include. - - +# This makefile runs 'genErrlParsers' which generates +# the Hostboot SRC parsers and the makefile to build the +# Hostboot SRC and User Detail Data parsers ROOTPATH=../../../.. @@ -40,18 +39,18 @@ IMGDIR = ${ROOTPATH}/img OBJDIR = ${ROOTPATH}/obj/modules/errl/parser -SRCPARSE_HEADER_TARGET = \ - ${GENDIR}/hostBootSrcParse.H - +ERRLPARSE_TARGETS = \ + ${GENDIR}/plugins/hbfwUdIds.H \ + ${GENDIR}/plugins/makefile CC=i686-mcp6-g++ -m32 CFLAGS:=-g -O0 -I $(ROOTPATH)/src/include/usr -I ${GENDIR} all: gen_pass code_pass -gen_pass: mkdirs ${GENDIR}/comps.C +gen_pass: mkdirs ${GENDIR}/comps.C ${ERRLPARSE_TARGETS} -code_pass: ${SRCPARSE_HEADER_TARGET} ${IMGDIR}/errlparser +code_pass: ${IMGDIR}/errlparser # errlparserbase and errlusrparser are plugins stuff, not errlparser. # OBJFILES = ${OBJDIR}/errlparserbase.o ${OBJDIR}/errlusrparser.o @@ -62,9 +61,9 @@ mkdirs: mkdir -p ${OBJDIR} mkdir -p ${GENDIR} -# Parse for error log tags in the Hostboot code, and generate hostBootSrcParse.H -${SRCPARSE_HEADER_TARGET} :: - ./scanforsrcs.pl -b ${ROOTPATH} -o ${GENDIR} +# Generate error log parser code +${ERRLPARSE_TARGETS} :: + ./genErrlParsers.pl -b ${ROOTPATH} -o ${GENDIR}/plugins ${GENDIR}/comps.C: ${ROOTPATH}/src/include/usr/hbotcompid.H grep "const compId_t [A-Z0-9]*_COMP_ID" $^ | \ @@ -72,7 +71,7 @@ ${GENDIR}/comps.C: ${ROOTPATH}/src/include/usr/hbotcompid.H sed 's/const compId_t \([A-Z0-9]*\)_COMP_ID[ =\t]*\(0[xX][0-9a-fA-F]*\).*/{ "\1", \2 },/' \ > $@ -${OBJDIR}/errlparser.o: errlparser.C ${ROOTPATH}/src/include/usr/errl/hberrltypes.H ${GENDIR}/comps.C ${SRCPARSE_HEADER_TARGET} +${OBJDIR}/errlparser.o: errlparser.C ${ROOTPATH}/src/include/usr/errl/hberrltypes.H ${GENDIR}/comps.C $(CC) -c $(CFLAGS) -o $@ $< @@ -80,7 +79,8 @@ ${IMGDIR}/errlparser: ${OBJDIR}/errlparser.o $(CC) -o $@ $< clean: - rm -f ${SRCPARSE_HEADER_TARGET} + rm -f ${ERRLPARSE_TARGETS} + rm -f ${GENDIR}/plugins/hbfwSrcParse*.C rm -f ${GENDIR}/comps.C rm -f ${IMGDIR}/errlparser rm -fr ${OBJDIR} diff --git a/src/usr/errl/parser/scanforsrcs.pl b/src/usr/errl/parser/scanforsrcs.pl deleted file mode 100755 index ebed31b65..000000000 --- a/src/usr/errl/parser/scanforsrcs.pl +++ /dev/null @@ -1,781 +0,0 @@ -#!/usr/bin/perl -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/errl/parser/scanforsrcs.pl $ -# -# 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 -# -# Purpose: Scan the hostboot source code to extract the doxygen like tags -# and generate a header file for the error log parser to include. -# - -use strict; -use File::Find (); -use Time::localtime; -use File::Path; - -# Vairables -my $DEBUG = 0; -my $component = "VOID"; -my $sandBase = $ENV{HOSTBOOTROOT}; - -my $arg; -my %Comps; -my $wordn = "userdata1"; -my $wordnd = 1; -my $NA = 1; -my $fh; - -my $argOutput = ""; -my $output = ""; - -# Arrays -my @compHeaders; -my %namespaceList; -my @reasonCodeFiles; - -while( $ARGV = shift ) -{ - if( $ARGV =~ m/-b/ ) - { - $sandBase = shift; - } - elsif( $ARGV =~ m/-o/i ) - { - $argOutput = shift; - } - elsif( $ARGV =~ m/-h/i ) - { - usage(); - } - elsif( $ARGV =~ m/-d/i ) - { - $DEBUG = 1; - } - else - { - usage(); - } -} - -# Variables depending on input parameters -if( $argOutput eq "" ) -{ - $output = "$sandBase/obj/genfiles"; -} -else -{ - $output = $argOutput; -} -my $comp_id = "$sandBase/src/include/usr/hbotcompid.H"; - -# Setup all the different paths that need to be searched -my $sourcebasePath = $sandBase."/src/usr"; -my $includePath = $sandBase."/src/include/usr"; -my $genfilesPath = $sandBase."/obj/genfiles"; - -# Get the listing of components -opendir my( $dir ), $sourcebasePath or die "Couldn't open directory $sourcebasePath, $!"; -my @components = readdir $dir; -closedir $dir; - -my %sourcebase; -my %sourcebaseInc; -my %sourcebaseGenfiles; - -my @fileList; - -################################################################ -# Debug Printing -################################################################ -debugMsg( "Comp id file: $comp_id" ); -debugMsg( "Source Base Path: $sourcebasePath" ); -debugMsg( "Sandbox Base Dir: $sandBase" ); -debugMsg( "Output Dir: $output" ); -################################################################ - -foreach( @components ) -{ - # Both src/usr directories as well as src/include/usr directories - # are done here to make sure they line up with the same "component" - # generated files will be done after this loop under the "genfiles" - # component name. - $component = $_; - debugMsg( "Component: $component" ); - - # Print components for debug. - my $compDir = "$sourcebasePath/$component"; - debugMsg( "Component Dir: $compDir" ); - - # Skip files and dirs . and .. - if( -d "$compDir" ) - { - if( ($component eq ".") || - ($component eq ".." ) || - ($component eq "example" ) ) - { - debugMsg( "exiting..." ); - next; - } - } - else - { - debugMsg( "exiting-->" ); - next; - } - - # Check to be sure the main src directory is available - if( -e "$compDir" ) - { - # Get a list of files to be scanned - %sourcebase = getFiles( $compDir ); - } - else - { - # Exit since the path of the user code wasn't found. - die( "\nERROR! Path ($compDir) does not exist. Cannot run!\n" ); - } - - # Get the associated component include files - my $incCompDir = "$includePath/$component"; - debugMsg( "Include Path: $incCompDir" ); - - # Skip files and dirs . and .. - if( -d "$incCompDir" ) - { - # Do nothing, we want the directories - } - else - { - debugMsg( "exiting-->" ); - next; - } - - # if include dir exists, get the files - if( -e "$incCompDir" ) - { - # Add the include files - %sourcebaseInc = getFiles( $incCompDir ); - } - else - { - # Exit since the path of the user code wasn't found. - die( "\nERROR! Path ($incCompDir) does not exist. Cannot run!\n" ); - } - - # Put each file on list to be scanned - foreach( values %sourcebase ) - { - push( @fileList, $_ ); - debugMsg( "File: $_" ); - - # Delete hash entry - delete $sourcebase{$_}; - } - - # Put each file on list to be scanned - foreach( values %sourcebaseInc ) - { - push( @fileList, $_ ); - debugMsg( "File (include): $_" ); - - # Delete hash entry - delete $sourcebaseInc{$_}; - } - - foreach( @fileList ) - { - debugMsg( "Calling extractTags for file: $_" ); - extractTags( $_, $component ); - } - - # Clear the file list so we don't reuse them - @fileList = (); -} - -# Scan the generated files and add to file list -if( -e $genfilesPath ) -{ - %sourcebaseGenfiles = getFiles( $genfilesPath ); - foreach( values %sourcebaseGenfiles ) - { - push( @fileList, $_ ); - debugMsg( "File (genfiles): $_" ); - delete $sourcebaseGenfiles{$_}; - } - - foreach( @fileList ) - { - debugMsg( "Calling extractTags for file: $_" ); - extractTags( $_, "genfiles" ); - } -} -else -{ - die( "\nERROR! Path($genfilesPath) does not exist. Cannot continue!\n" ); -} - -# Get the file open -$fh = openHeaderFile(); - -# Start writing the main header file that will be included by errlparser.C -startMainHeaderFile( $fh ); - -my $found_dup = 0; - -# Write each case statement for printing -foreach my $key (sort(keys(%Comps))) -{ - writePrintStatement( $fh, $key, \@{$Comps{$key}} ); -} -if($found_dup > 0) -{ - die( "ERROR! Duplicate hash found!\n" ); -} - -# Finish writing the header -finishMainHeaderFile( $fh ); - -exit 0; - -#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -# End of Main program -#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -################################################################################ -# -# Print the Usage message -# -################################################################################ - -sub usage -{ - print "Usage: $0 < -b base > <-d> < -o output dir >\"\n"; - print "\n"; - print "-b: base directory ( default is pwd )\n"; - print "-o: Used as the output directory where header file is dropped\n"; - print "-d Enable Debug messages.\n"; - print "-h Display usage message.\n"; - print "\n\n"; - exit 1; -} - - -################################################################################ -# -# Print debug messages if $DEBUG is enabled. -# -################################################################################ - -sub debugMsg -{ - my ($msg) = @_; - if( $DEBUG ) - { - print "DEBUG: $msg\n"; - } -} - - -################################################################################ -# -# Extracts each tag and description from each entry for the given file. -# -################################################################################ - -sub extractTags -{ - my $data; - my ($file, $comp) = @_; - debugMsg( "extractTags: Component: $comp" ); - local *FH; - - debugMsg( "Processing: $file" ); - - open(FH, "$file") or die("Cannot open: $file: $!"); - read(FH, $data, -s FH) or die("Error reading $file: $!"); - close FH; - - # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - # Capture everything from opening '/*@' to end of tags '*/' - # - # Example: - # /*@ - # * @errortype - # * @reasoncode I2C_INVALID_OP_TYPE - # * @severity ERRL_SEV_UNRECOVERABLE - # * @moduleid I2C_PERFORM_OP - # * @userdata1 i_opType - # * @userdata2 addr - # * @devdesc Invalid Operation type. - # */ - # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - while ($data =~ /\/\*\@((.|\n)+?)\*\//mgo ) - { - debugMsg( "Found New Error Tag!" ); - - my $text = $1; - debugMsg( "Text1: $text" ); - my %hash = $text =~ /\@(\S+)(?:\s+|\.+)\b(.+?)$/gm; - my $tmp; - my $tmpKey; - - foreach my $key (sort keys %hash) - { - $tmpKey = AddSlashes( $key ); - debugMsg( "Key: $tmpKey" ); - # Extract multi-line string - $text =~ /\@$tmpKey(?:\s+|\.+)(.+?)(?:\@|$).*/s; - debugMsg( "Text3: $text" ); - $tmp = $1; - debugMsg( "Tmp: $tmp" ); - $tmp =~ s/\s*\*\s*/ \n/gm; - debugMsg( "Tmp again: $tmp" ); - $tmp = stripWhitespace( $tmp ); - debugMsg( "Tmp trimmed: $tmp" ); - $hash{$key} = $tmp; - debugMsg( "Assigning '$key' = '$tmp'" ); - } - - push @{$Comps{$comp}}, \%hash; - } -} - - -################################################################################ -# -# getFiles - find *.H or *.C files -# This recursively searches the input directory passed in for all C/H files. -# -################################################################################ - -sub getFiles -{ - my ($l_input_dir) = @_; - my @dir_entry; - my %l_input_files; - local *DH; - - debugMsg( "Getting Files for dir: $l_input_dir" ); - - # Open the directory and read all entry names. - opendir(DH, $l_input_dir) or die("Cannot open $l_input_dir: $!"); - # skip the dots - @dir_entry = grep { !/^\./ } readdir(DH); - closedir(DH); - while (@dir_entry) - { - my $l_entry = shift(@dir_entry); - my $full_path = "$l_input_dir/$l_entry"; - - debugMsg( "getFiles: Full Path: $full_path" ); - - if ($l_entry =~ /\.[H|C]$/) - { - $l_input_files{$l_entry} = $full_path; - debugMsg( "getFiles: Adding file: $full_path" ); - } - elsif (-d $full_path) - { - # recursive here - my %local_hash = getFiles($full_path); - my @keys = keys(%local_hash); - - foreach(@keys) - { - $l_input_files{$_} = $local_hash{$_}; - } - } - } - return(%l_input_files); -} - - -################################################################################ -# -# Add escape characters to strings -# -################################################################################ - -sub AddSlashes -{ - my ($text) = @_; - ## Make sure to do the backslash first! - $text =~ s/\\/\\\\/g; - $text =~ s/'/\\'/g; - $text =~ s/"/\\"/g; - $text =~ s/\\0/\\\\0/g; - - $text =~ s/\[/\\[/g; - $text =~ s/\]/\\]/g; - return $text; -} - - -################################################################################ -# -# Strip whitespace from beginning/end of string -# -################################################################################ - -sub stripWhitespace -{ - my ($text) = @_; - - $text =~ s/^\s+//; # strip leading spaces - $text =~ s/\s+$//; # strip trailing spaces - - return $text; -} - -################################################################################ -# -# Look for the components reasoncode file and include it -# -################################################################################ - -sub includeReasonCodes -{ - my ( $fh,$incPath,$level ) = @_; - - debugMsg( "includeReasonCodes incpath: $incPath" ); - debugMsg( "includeReasonCodes level: $level" ); - - my @incDirs = glob( $incPath ); - my $incFileName = ""; - - foreach my $file( @incDirs ) - { - debugMsg( "includeReasonCodes file: $file" ); - my @allDirs = split( '/', $file ); - - if( $file =~ m/reasoncodes/i ) - { - for( my $count = 0; $count < $level; $count++ ) - { - my $tmpTxt = pop @allDirs; - - if( $incFileName ne "" ) - { - $incFileName = $tmpTxt . "/$incFileName"; - } - else - { - $incFileName = $tmpTxt; - } - } - debugMsg( "ReasonCode file: $file" ); - debugMsg( "Include string: $incFileName" ); - - print $fh "#include <$incFileName>\n"; - - # Find the namespace of the reason codes - findNameSpace( $file ); - - # Clear out incFileName, in case there are 2 reason code files - # in the same directory - $incFileName = ""; - } - elsif( -d $file ) - { - debugMsg( "includeReasonCodes recursion" ); - # Recursion is done here. - includeReasonCodes( $fh, $file."/*", ($level+1) ); - } - } -} - - -################################################################################ -# -# Build the main header file that errlparser.C will use to include all of -# the generated header files. -# -################################################################################ - -sub startMainHeaderFile -{ - my ($fh) = @_; - my $timestamp = ctime(); - my $imageId = getImageId(); - - print $fh <<EOF; -/* - * Automatically generated by src/usr/errl/parser/scanforsrcs.pl - * - * TimeStamp: $timestamp - * Image Id: $imageId - * -*/ - - -/*****************************************************************************/ -// I n c l u d e s -/*****************************************************************************/ -EOF - - # Add the includes - start in src/include/usr - my $startDir = $sandBase."/src/include/usr/*"; - includeReasonCodes( $fh, $startDir, 1 ); - - # Also include reason codes from generated files - $startDir = $sandBase."/obj/genfiles"; - includeReasonCodes( $fh, $startDir, 0 ); - - print $fh <<EOF; - - -/*****************************************************************************/ -// N a m e s p a c e s -/*****************************************************************************/ -EOF - - foreach( values %namespaceList ) - { - my $namespace = $_; - print $fh "using namespace $namespace;\n" - } - - print $fh <<EOF; - - -static void printErrorTags ( ErrlUsrParser & i_parser, - uint64_t i_src, - uint64_t i_modId ) -{ - uint64_t error = (i_src << 8) | i_modId; - - switch( error ) - { -EOF -} - - -################################################################################ -# -# Finish writing main header file -# -################################################################################ - -sub finishMainHeaderFile -{ - my ($fh) = @_; - - print $fh <<EOF; - - default: - uint32_t src = i_src & 0xFFFFFFFF; - uint32_t modId = i_modId & 0xFFFFFFFF; - printf( "\\nThere was not a valid Errorlog tag found for the given error combination!\\n" ); - printf( " Reason: 0x%04x, Module Id: 0x%02x\\n\\n", src, modId ); - break; - - }; -} -EOF -} - - -################################################################################ -# -# Open generated header file -# -################################################################################ - -sub openHeaderFile -{ - my $filename = "$output/hostBootSrcParse.H"; - my $fh; - - if (! -e $output) - { - debugMsg( "Creating directory $output" ); - eval { mkpath($output) }; - - if ($@) - { - die("Couldn't create $output: $@"); - } - } - - if (-e $filename) - { - chmod(0777, $filename); - } - - open($fh, ">$filename") or die("Cannot open $filename: $!"); - return $fh; -} - - -################################################################################ -# -# Write the print statements to the header -# -################################################################################ - -sub writePrintStatement -{ - my ($fh, $compName, $aref) = @_; - my $wordstart = "userdata1"; - my $modId; - my $reasonCode; - my $caseValue; - my $line; - - my %caseHash = (); - - foreach my $href ( @$aref ) - { - # Get the ModId and Reasoncode tags - foreach my $tag ( sort keys %$href ) - { - $href->{$tag} =~ s/\"/\\\"/g; - my @lines = split /^/, $href->{$tag}; - - if( scalar( @lines ) > 1 ) - { - foreach $line( @lines ) - { - $line =~ s/\n//g; - } - } - else - { - $line = $href->{$tag}; - $line =~ s/\n//g; - } - - $line = stripWhitespace( $line ); - if( "moduleid" eq $tag ) - { - $modId = $line; - } - elsif( "reasoncode" eq $tag ) - { - $reasonCode = $line; - } - } - debugMsg( "Comp Name: $compName" ); - debugMsg( "Module Id: $modId" ); - debugMsg( "Reason Code: $reasonCode" ); - - # If we've got a duplicate Module Id/Reason code go, on to the - # next one. We can't have duplicates, so if we do we set found_dup - # so that we can die after this loop - if( exists $caseHash{ $modId.$reasonCode } ) - { - debugMsg( "Hash exists, skip subsequent." ); - - # Print a error message - print "\n#################################################################\n"; - print " ERROR - Duplicate hash found for:\n"; - print " component $compName\n"; - print " module id $modId\n"; - print " reason code $reasonCode\n"; - print "#################################################################\n"; - $found_dup = 1; - next; - } - else - { - $caseHash{ $modId.$reasonCode } = 1; - } - - - # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - # - # This check will be used to exclude module Ids which aren't set - # in stone... I think they should be, but ... - # So, as more oddities show up, this will need to be modified - # to accomodate. - # - # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - if( ($modId =~ /see/i) && - ($modId =~ /task/i) ) - { - # Move to the next loop if this tag is invalid. - debugMsg( "Invalid Mod Id: $modId" ); - next; - } - # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - - print $fh " case \(\($reasonCode \<\< 8\) \| $modId\) \:\n"; - - foreach my $tag ( sort keys %$href ) - { - $href->{$tag} =~ s/\"/\\\"/g; - my $line = $href->{$tag}; - $line =~ s/\n//g; - print $fh " i_parser.PrintString( \"$tag\" \, \"$line\" )\;\n"; - } - print $fh " break;\n\n"; - } -} - - -################################################################################ -# -# find the namespace of the file. -# -################################################################################ - -sub findNameSpace -{ - my ( $file ) = @_; - my $data; - open(FH, "$file") or die("Cannot open: $file: $!"); - read(FH, $data, -s FH) or die("Error reading $file: $!"); - close FH; - - # get the namespace - my $namespace = "VOID"; - while( $data =~ /^namespace(.+?\n)/gm ) - { - $namespace = $1; - $namespace =~ s/\;+$//; # strip trailing semicolon - $namespace =~ s/\{+$//; # strip opening bracket - $namespace = stripWhitespace( $namespace ); - $namespaceList{$namespace} = $namespace; - } - debugMsg( "Namespace: $namespace" ); - debugMsg( " from File: $file" ); -} - - -################################################################################ -# -# Get the Image id -# -################################################################################ -sub getImageId -{ - my $imageId = `git describe --dirty || echo Unknown-Image \`git rev-parse --short HEAD\``; - chomp $imageId; - - if (($imageId =~ m/Unknown-Image/) || # Couldn't find git describe tag. - ($imageId =~ m/dirty/) || # Find 'dirty' commit. - ($imageId =~ m/^.{15}-[1-9]+/)) # Found commits after a tag. - { - $imageId = $imageId."/".$ENV{"USER"}; - } - - return $imageId; -} diff --git a/src/usr/errl/plugins/ERRL_COMP_ID_Parse.C b/src/usr/errl/plugins/ERRL_COMP_ID_Parse.C new file mode 100644 index 000000000..1e916b014 --- /dev/null +++ b/src/usr/errl/plugins/ERRL_COMP_ID_Parse.C @@ -0,0 +1,34 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/plugins/HBERRL_COMP_ID_Parse.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 ERRL_COMP_ID_Parse.C + * + * Creates the ERRL User Detail Data Parser + */ +#include "errludparser.H" +#include "errludparserfactoryerrl.H" + +ERRL_MAKE_UD_PARSER(ERRORLOG::ErrlUserDetailsParserFactoryErrl, + hbfw::ERRL_COMP_ID) + diff --git a/src/usr/errl/plugins/errlParse.C b/src/usr/errl/plugins/errlParse.C deleted file mode 100644 index daefc640c..000000000 --- a/src/usr/errl/plugins/errlParse.C +++ /dev/null @@ -1,67 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/errl/plugins/errlParse.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 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 - */ -/** - * @file initsvcParse.C - * - * errl user detail data and src parser - */ - -//------------------------------------------------------------------------------ -// User detail data parser -//------------------------------------------------------------------------------ -#include "symbols.H" -#include <errl/errludparser.H> -#include <errl/errludparserfactoryerrl.H> -ERRL_MAKE_UD_PARSER(ERRORLOG::ErrlUserDetailsParserFactoryErrl, HBERRL_COMP_ID) - -//------------------------------------------------------------------------------ -// Src parser (call code generated by scanforsrc.pl) -//------------------------------------------------------------------------------ - -// FSP include -#include <srcisrc.H> - -// Hostboot include -#include <hostBootSrcParse.H> - -static bool hbSrcParse( ErrlUsrParser & i_parser, const SrciSrc & i_src ) -{ - uint32_t src = 0; - - sscanf( i_src.getAsciiString(), "%X", &src ); - - // Call this function in obj/genfiles/hostBootSrcParse.H (a script-generated - // file) which serves for any Hostboot component. This will cause - // the FSP errl tool to add the tagged information to the primary SRC - // section of the error log. For example, the developer description - // (devdesc) tag and associated info as well as the other tags describing - // the userdata1 and userdata2 words. - printErrorTags( i_parser, (src & 0xFFFF), i_src.moduleId() ); - - return false; -} - -// Create an instance of SrcPlugin by type (instead of the usual component). -static errl::SrcPlugin g_SrcPlugin( HBERRL_COMP_ID, hbSrcParse ); - diff --git a/src/usr/errl/plugins/errludbacktrace.H b/src/usr/errl/plugins/errludbacktrace.H new file mode 100644 index 000000000..ad60e9c3e --- /dev/null +++ b/src/usr/errl/plugins/errludbacktrace.H @@ -0,0 +1,150 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/plugins/errludbacktrace.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef ERRL_UDBACKTRACE_H +#define ERRL_UDBACKTRACE_H + +/** + * @file errludbacktrace.H + * + * Defines the ErrlUserDetailsParserBackTrace class that parses backtrace FFDC + * user detail in an error log + */ + +#include "errluserdetails.H" +#include "symbols.H" +#include <vector> + +namespace ERRORLOG +{ + +/** + * @class ErrlUserDetailsParserBackTrace + * + * Parses backtrace user detail in an error log + */ +class ErrlUserDetailsParserBackTrace : public ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + ErrlUserDetailsParserBackTrace() {} + + /** + * @brief Destructor + */ + virtual ~ErrlUserDetailsParserBackTrace() {} + + /** + * @brief Parses backtrace user detail data from an error log + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + // This buffer contains a number of 64-bit frame pointers. + + // A character vector for storing a backtrace entry and the space + // required for the header (frame number and address (with some padding + // for safety)) and the symbol name. This vector is resized if a longer + // symbol name is encountered. + const uint8_t BACKTRACE_ENTRY_HEADER_SIZE = 32; + const uint8_t BACKTRACE_ENTRY_SYMBOL_SIZE = 64; + std::vector<char> l_traceEntry(BACKTRACE_ENTRY_HEADER_SIZE + + BACKTRACE_ENTRY_SYMBOL_SIZE); + + // Initialize l_the symbol table. + const char * l_pSymFile = "hbicore.syms"; + hbSymbolTable symTab; + int readRC = symTab.readSymbols( l_pSymFile ); + if( readRC ) + { + i_parser.PrintString( "Symbols not found", l_pSymFile ); + // symTab.nearestSymbol() will return NULL because of this. + // Carry on. + } + + const char * l_pErrlEntry = "ErrlEntry::ErrlEntry"; + const char * l_pLabel = "Backtrace"; + + // loop thru the buffer which is an array of 64-bit addresses + uint64_t * p64 = static_cast<uint64_t *>(i_pBuffer); + int l_count = i_buflen / sizeof( uint64_t ); + for( int i = 0; i < l_count; i++ ) + { + // endian convert the stack address + uint64_t l_addr = ntohll(*p64); + + // get nearest symbol + const char * l_pSymbol = symTab.nearestSymbol( l_addr ); + + if( l_pSymbol ) + { + if( strstr( l_pSymbol, l_pErrlEntry )) + { + // hackish, makes for better looking output + // it's in every backtrace (jan2012) + l_pSymbol = l_pErrlEntry; + } + + uint16_t l_traceSize = + (BACKTRACE_ENTRY_HEADER_SIZE + strlen(l_pSymbol) + 1); + + if (l_traceEntry.size() < l_traceSize) + { + l_traceEntry.resize(l_traceSize); + } + sprintf(&(l_traceEntry[0]), + "#%2d %016llX %s", i, l_addr, l_pSymbol); + } + else + { + sprintf(&(l_traceEntry[0]),"#%2d %016llX", i, l_addr); + } + i_parser.PrintString( l_pLabel, &(l_traceEntry[0]) ); + + // next stack address in the buffer + p64++; + + // don't print the label for subsequent backtraces + l_pLabel = ""; + } + } + +private: + // Disabled + ErrlUserDetailsParserBackTrace(const ErrlUserDetailsParserBackTrace &); + ErrlUserDetailsParserBackTrace & operator=( + const ErrlUserDetailsParserBackTrace &); +}; + +} + +#endif + diff --git a/src/usr/errl/plugins/errludcallout.H b/src/usr/errl/plugins/errludcallout.H new file mode 100644 index 000000000..3346c6487 --- /dev/null +++ b/src/usr/errl/plugins/errludcallout.H @@ -0,0 +1,83 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/plugins/errludcallout.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef ERRL_UDCALLOU_H +#define ERRL_UDCALLOU_H + +/** + * @file errludcallout.H + * + * Defines the ErrlUserDetailsParserCallout class that parses + * callout user detail in an error log + */ + +#include "errluserdetails.H" + +namespace ERRORLOG +{ + +/** + * @class ErrlUserDetailsCallout + * + * Parses Callout user detail in an error log + */ +class ErrlUserDetailsParserCallout : public ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + ErrlUserDetailsParserCallout() {} + + /** + * @brief Destructor + */ + virtual ~ErrlUserDetailsParserCallout() {} + + /** + * @brief Parses callout user detail data from an error log + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + // TODO fix when parser fixed + // RTC 41707 + } + +private: + // Disabled + ErrlUserDetailsParserCallout(const ErrlUserDetailsParserCallout &); + ErrlUserDetailsParserCallout & operator=( + const ErrlUserDetailsParserCallout &); +}; + +} + +#endif + diff --git a/src/usr/errl/plugins/errludlogregister.H b/src/usr/errl/plugins/errludlogregister.H new file mode 100644 index 000000000..f7f19ae2d --- /dev/null +++ b/src/usr/errl/plugins/errludlogregister.H @@ -0,0 +1,83 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/plugins/errludlogregister.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef ERRL_UDLOGREGISTER_H +#define ERRL_UDLOGREGISTER_H + +/** + * @file errludlogregister.H + * + * Defines the ErrlUserDetailsParserLogRegister class that parses register FFDC + * user detail in an error log + */ + +#include "errluserdetails.H" + +namespace ERRORLOG +{ + +/** + * @class ErrlUserDetailsLogRegister + * + * Parses LogRegister user detail in an error log + */ +class ErrlUserDetailsParserLogRegister : public ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + ErrlUserDetailsParserLogRegister() {} + + /** + * @brief Destructor + */ + virtual ~ErrlUserDetailsParserLogRegister() {} + + /** + * @brief Parses register user detail data from an error log + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + // TODO fix when parser if fix + // RTC 41707 + } + +private: + // Disabled + ErrlUserDetailsParserLogRegister(const ErrlUserDetailsParserLogRegister &); + ErrlUserDetailsParserLogRegister & operator=( + const ErrlUserDetailsParserLogRegister &); +}; + +} + +#endif + diff --git a/src/usr/errl/plugins/errludparser.H b/src/usr/errl/plugins/errludparser.H new file mode 100755 index 000000000..c3b1f95a8 --- /dev/null +++ b/src/usr/errl/plugins/errludparser.H @@ -0,0 +1,89 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/plugins/errludparser.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef ERRL_UDPARSER_H +#define ERRL_UDPARSER_H + +/** + * @file errludparser.H + * + * To create a function that errl calls to parse user detail data, a + * component's plugin/<comp>Parse.C file should include this file and call the + * ERRL_MAKE_UD_PARSER macro + */ + +#include <netinet/in.h> + +/** + * @brief Endian swap a uint64_t. This is not provided by in.h + */ +inline uint64_t ntohll( uint64_t i ) +#if __BYTE_ORDER == __LITTLE_ENDIAN +{ + // CONTEXT_x86_nfp + uint64_t hi; + uint64_t lo; + uint32_t * pword = reinterpret_cast<uint32_t*>(&i); + + hi = ntohl( *pword ); + lo = ntohl( *(pword+1) ); + + return (hi<<32)|lo; +} +#elif __BYTE_ORDER == __BIG_ENDIAN +{ + // CONTEXT_ppc (or maybe CONTEXT_aix_nfp) + return i; +} +#else +#error Unexpected endian context. +#endif + +// FSP includes +#include <errlplugins.H> +#include <errlusrparser.H> +#include "hbfwUdIds.H" + +/** + * @brief Macro that generates a function and plugin object to parse a + * component's error log user detail data + */ +#define ERRL_MAKE_UD_PARSER(FACTORY, COMPID) \ +static bool myDataParse(\ + ErrlUsrParser& i_parser, void* i_buffer, uint32_t i_buflen,\ + errlver_t i_ver, errlsubsec_t i_sst)\ +{\ + bool l_rc = false;\ + FACTORY l_factory;\ + ERRORLOG::ErrlUserDetailsParser * l_pParser =\ + l_factory.createParser(i_sst);\ + if (l_pParser)\ + {\ + l_rc = true;\ + l_pParser->parse(i_ver, i_parser, i_buffer, i_buflen);\ + }\ + return l_rc;\ +}\ +static errl::DataPlugin g_DataPlugin(COMPID, myDataParse); + +#endif + diff --git a/src/usr/errl/plugins/errludparserfactory.H b/src/usr/errl/plugins/errludparserfactory.H new file mode 100755 index 000000000..50df87623 --- /dev/null +++ b/src/usr/errl/plugins/errludparserfactory.H @@ -0,0 +1,130 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/plugins/errludparserfactory.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef ERRL_UDPARSERFACTORY_H +#define ERRL_UDPARSERFACTORY_H + +/** + * @file errludparserfactory.H + * + * Defines the ErrlUserDetailsParserFactory base class + */ +#include "errluserdetails.H" +#include <map> + +namespace ERRORLOG +{ + +/** + * @class ErrlUserDetailsParserFactory + * + * This is a factory that produces ErrlUserDetailsParser objects. If a component + * creates user detail data then it should derive a class from this and register + * all of its ErrlUserDetailsParser classes with it. The parse file in the + * plugins directory can then call the factory to create parser objects to parse + * any user detail data. + */ +class ErrlUserDetailsParserFactory +{ +public: + /** + * @brief Constructor + */ + ErrlUserDetailsParserFactory() + { + } + + /** + * @brief Destructor + */ + ~ErrlUserDetailsParserFactory() + { + } + + /** + * @brief Register a class derived from ErrlUserDetailsParser with the + * factory that can parse user detail data with the specified + * subsection. + * + * @param i_subSection The user detail data subsection that is parsed by + * class T + */ + template<typename T> + void registerParser(const errlsubsec_t i_subSection) + { + iv_createObjectMap[i_subSection] = &(createParserObject<T>); + } + + /** + * @brief Create an object of type ErrlUserDetailsParser that can parse + * user detail data with the specified subsection. The returned + * pointer will be polymorphic and will actually point to a type + * derived from ErrlUserDetailsParser. + * + * @param i_subSection The user detail data subsection to parse + * + * @return ErrlUserDetailsParser * + * Pointer to a ErrlUserDetailsParser object. Null if there is no + * parser registered for the specified subsection. The user must delete + * the object after use. + */ + ErrlUserDetailsParser * createParser(const errlsubsec_t i_subSection) + { + std::map<errlsubsec_t, createParserObject_t>::const_iterator itr = + iv_createObjectMap.find(i_subSection); + + if (itr != iv_createObjectMap.end()) + { + // Call the object creator function (createParserObject) + return((itr->second)()); + } + return NULL; + } + +private: + /** + * @brief Creates a ErrlUserDetailsParser of the specified derived type + * + * @return ErrlUserDetailsParser * Pointer to newly created object + */ + template<typename T> + static ErrlUserDetailsParser * createParserObject() + { + return new T(); + } + + // Function pointer type of createParserObject + typedef ErrlUserDetailsParser *(*createParserObject_t)(); + + // Map of subsections and their createobject function + std::map<errlsubsec_t, createParserObject_t> iv_createObjectMap; + + // Disabled + ErrlUserDetailsParserFactory(const ErrlUserDetailsParserFactory &); + ErrlUserDetailsParserFactory & operator=( + const ErrlUserDetailsParserFactory &); +}; + +} + +#endif + diff --git a/src/usr/errl/plugins/errludparserfactoryerrl.H b/src/usr/errl/plugins/errludparserfactoryerrl.H new file mode 100644 index 000000000..5fffc1a98 --- /dev/null +++ b/src/usr/errl/plugins/errludparserfactoryerrl.H @@ -0,0 +1,76 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/plugins/errludparserfactoryerrl.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef ERRL_UDPARSERFACTORYERRL_H +#define ERRL_UDPARSERFACTORYERRL_H + +/** + * @file errludparserfactoryerrl.H + * + * Defines the errlUserDetailsParserFactoryErrl.H class +*/ +#include "errludparserfactory.H" +#include "errludstring.H" +#include "errludtarget.H" +#include "errludbacktrace.H" +#include "errludattribute.H" +#include "errludlogregister.H" +#include "errludcallout.H" + +namespace ERRORLOG +{ + +/** + * @class ErrlUserDetailsParserFactoryErrl + * + * This factory produces ErrlUserDetailsParser objects to parse the specified + * ERRL user detail data. + */ +class ErrlUserDetailsParserFactoryErrl : public ErrlUserDetailsParserFactory +{ +public: + + /** + * @brief Constructor + */ + ErrlUserDetailsParserFactoryErrl() + { + registerParser<ErrlUserDetailsParserString>(ERRL_UDT_STRING); + registerParser<ErrlUserDetailsParserTarget>(ERRL_UDT_TARGET); + registerParser<ErrlUserDetailsParserBackTrace>(ERRL_UDT_BACKTRACE); + registerParser<ErrlUserDetailsParserAttribute>(ERRL_UDT_ATTRIBUTE); + registerParser<ErrlUserDetailsParserLogRegister>(ERRL_UDT_LOGREGISTER); + registerParser<ErrlUserDetailsParserCallout>(ERRL_UDT_CALLOUT); + } + +private: + + // Disabled + ErrlUserDetailsParserFactoryErrl(const ErrlUserDetailsParserFactoryErrl &); + ErrlUserDetailsParserFactoryErrl & operator=( + const ErrlUserDetailsParserFactoryErrl &); +}; + +} + +#endif + diff --git a/src/usr/errl/plugins/errludstring.H b/src/usr/errl/plugins/errludstring.H new file mode 100644 index 000000000..f12281c16 --- /dev/null +++ b/src/usr/errl/plugins/errludstring.H @@ -0,0 +1,83 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/plugins/errludstring.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef ERRL_UDSTRING_H +#define ERRL_UDSTRING_H + +/** + * @file errludstring.H + * + * Defines the ErrlUserDetailsParserString class that parser string FFDC + * user detail in an error log + */ + +#include "errluserdetails.H" +#include <string.h> + +namespace ERRORLOG +{ + +/** + * @class ErrlUserDetailsString + * + * Parses String user detail in an error log + */ +class ErrlUserDetailsParserString : public ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + ErrlUserDetailsParserString() {} + + /** + * @brief Destructor + */ + virtual ~ErrlUserDetailsParserString() {} + + /** + * @brief Parses string user detail data from an error log + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + i_parser.PrintString("String data", static_cast<char *>(i_pBuffer)); + } + +private: + // Disabled + ErrlUserDetailsParserString(const ErrlUserDetailsParserString &); + ErrlUserDetailsParserString & operator=( + const ErrlUserDetailsParserString &); +}; + +} + +#endif + diff --git a/src/usr/errl/plugins/errludtarget.H b/src/usr/errl/plugins/errludtarget.H new file mode 100644 index 000000000..61a4d8cf9 --- /dev/null +++ b/src/usr/errl/plugins/errludtarget.H @@ -0,0 +1,251 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/plugins/errludtarget.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef ERRL_UDTARGET_H +#define ERRL_UDTARGET_H + +/** + * @file errludTarget.H + * + * Defines the ErrlUserDetailsParserTarget class that parses Target FFDC + * user detail in an error log + */ + +#include "errluserdetails.H" +#include <string.h> + +namespace ERRORLOG +{ + +/** + * @class ErrlUserDetailsParserTarget + * + * Parses Target FFDC user detail in an error log + */ +class ErrlUserDetailsParserTarget : public ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + ErrlUserDetailsParserTarget() {} + + /** + * @brief Destructor + */ + virtual ~ErrlUserDetailsParserTarget() {} + + /** + * @brief Parses Target user detail data from an error log + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + i_parser.PrintString("Target data", NULL); + const char *attrData; + uint32_t i = 0; + + // errlog data + uint8_t *l_ptr = static_cast<uint8_t *>(i_pBuffer); + + // TODO: needs to be updated to handle merged records + + if (*l_ptr == 1) // special - master + { + i_parser.PrintString(NULL, "MASTER_PROCESSOR_CHIP_TARGET_SENTINEL"); + } + else + { + l_ptr += sizeof(uint8_t); // past the marker + + // first 4 are always the same + if (i_buflen >= sizeof(uint32_t) + 3 * sizeof(uint8_t)) + { + char sHuid[12]; + sprintf(sHuid, "0x%x",*((uint32_t *)l_ptr)); + i_parser.PrintString("ATTR_HUID", sHuid); + i += sizeof(uint32_t); + l_ptr += sizeof(uint32_t); + + // CLASS + switch (*l_ptr) { + case 0x00: { attrData = "CLASS_NA"; break; } + case 0x01: { attrData = "CLASS_CARD"; break; } + case 0x02: { attrData = "CLASS_ENC"; break; } + case 0x03: { attrData = "CLASS_CHIP"; break; } + case 0x04: { attrData = "CLASS_UNIT"; break; } + case 0x05: { attrData = "CLASS_DEV"; break; } + case 0x06: { attrData = "CLASS_SYS"; break; } + case 0x07: { attrData = "CLASS_LOGICAL_CARD"; break; } + case 0x08: { attrData = "CLASS_MAX"; break; } + default: { attrData = "UNKNOWN CLASS"; break; } + } // switch + i_parser.PrintString("ATTR_CLASS", attrData); + i ++; + l_ptr ++; + + // TYPE + switch (*l_ptr) { + // TODO: RTC 50828: make these build-time dynamic based + // on values in obj/genfiles/attributeenums.H + case 0x00: { attrData = "TYPE_NA"; break; } + case 0x01: { attrData = "TYPE_SYS"; break; } + case 0x02: { attrData = "TYPE_NODE"; break; } + case 0x03: { attrData = "TYPE_DIMM"; break; } + case 0x04: { attrData = "TYPE_MEMBUF"; break; } + case 0x05: { attrData = "TYPE_PROC"; break; } + case 0x06: { attrData = "TYPE_EX"; break; } + case 0x07: { attrData = "TYPE_CORE"; break; } + case 0x08: { attrData = "TYPE_L2"; break; } + case 0x09: { attrData = "TYPE_L3"; break; } + case 0x0A: { attrData = "TYPE_L4"; break; } + case 0x0B: { attrData = "TYPE_MCS"; break; } + case 0x0C: { attrData = "TYPE_MBS"; break; } + case 0x0D: { attrData = "TYPE_MBA"; break; } + case 0x0E: { attrData = "TYPE_XBUS"; break; } + case 0x0F: { attrData = "TYPE_ABUS"; break; } + case 0x10: { attrData = "TYPE_PCI"; break; } + case 0x11: { attrData = "TYPE_DPSS"; break; } + case 0x12: { attrData = "TYPE_APSS"; break; } + case 0x13: { attrData = "TYPE_OCC"; break; } + case 0x14: { attrData = "TYPE_PSI"; break; } + case 0x15: { attrData = "TYPE_FSP"; break; } + case 0x16: { attrData = "TYPE_PNOR"; break; } + case 0x17: { attrData = "TYPE_LAST_IN_RANGE"; break; } + default: { attrData = "UNKNOWN TYPE"; break; } + } // switch + i_parser.PrintString("ATTR_TYPE", attrData); + i++; + l_ptr++; + + // MODEL + switch (*l_ptr) { + // TODO: RTC 50828: make these build-time dynamic based + // on values in obj/genfiles/attributeenums.H + case 0x00: { attrData = "MODEL_NA"; break; } + case 0x10: { attrData = "MODEL_RESERVED"; break; } + case 0x11: { attrData = "MODEL_VENICE"; break; } + case 0x12: { attrData = "MODEL_MURANO"; break; } + case 0x30: { attrData = "MODEL_CENTAUR"; break; } + case 0x50: { attrData = "MODEL_JEDEC"; break; } + case 0x51: { attrData = "MODEL_CDIMM"; break; } + case 0x70: { attrData = "MODEL_POWER8"; break; } + default: { attrData = "UNKNOWN MODEL"; break; } + } // switch + i_parser.PrintString("ATTR_MODEL", attrData); + i++; + l_ptr++; + } + +// TODO RTC 50828 The following for loop hangs +#if 0 + for (; i < i_buflen; ) + { + if ((*l_ptr == 0x15) || // ATTR_PHYS_PATH + (*l_ptr == 0x16)) // ATTR_AFFINITY_PATH + { + l_ptr++; + const char *pathString; + char outString[128]; + // from targeting/common/entitypath.[CH] + // entityPath is PATH_TYPE:4, NumberOfElements:4, + // [Element, Instance#] + // PATH_TYPE + const uint8_t pathTypeLength = *((uint8_t *)l_ptr); + l_ptr++; + const uint8_t pathType = (pathTypeLength & 0xF0) >> 4; + switch (pathType) { + case 0x01: pathString = "Logical:"; break; + case 0x02: pathString = "Physical:"; break; + case 0x03: pathString = "Device:"; break; + case 0x04: pathString = "Power:"; break; + default: pathString = "Unknown:"; break; + } + uint32_t dataSize = sprintf(outString, "%s",pathString); + const uint8_t pathSize = (pathTypeLength & 0x0F); + uint8_t *lElementInstance = ((uint8_t *)l_ptr); + l_ptr += pathSize * sizeof(uint8_t); + for (uint32_t j=0;j<pathSize;j += 2) { + switch (lElementInstance[j]) { + // TODO: RTC 50828: make these build-time dynamic based + // on values in obj/genfiles/attributeenums.H + case 0x01: pathString = "/Sys"; break; + case 0x02: pathString = "/Node"; break; + case 0x03: pathString = "/DIMM"; break; + case 0x04: pathString = "/Membuf"; break; + case 0x05: pathString = "/Proc"; break; + case 0x06: pathString = "/EX"; break; + case 0x07: pathString = "/Core"; break; + case 0x08: pathString = "/L2"; break; + case 0x09: pathString = "/L3"; break; + case 0x0A: pathString = "/L4"; break; + case 0x0B: pathString = "/MCS"; break; + case 0x0C: pathString = "/MBS"; break; + case 0x0D: pathString = "/MBA"; break; + case 0x0E: pathString = "/XBUS"; break; + case 0x0F: pathString = "/ABUS"; break; + case 0x10: pathString = "/PCI"; break; + case 0x11: pathString = "/DPSS"; break; + case 0x12: pathString = "/APSS"; break; + case 0x13: pathString = "/OCC"; break; + case 0x14: pathString = "/PSI"; break; + case 0x15: pathString = "/FSP"; break; + case 0x16: pathString = "/PNOR"; break; + default: pathString = "/Unknown"; break; + } // switch + // copy next part in, overwritting previous terminator + dataSize += sprintf(outString + dataSize, + "%s%d", pathString, + lElementInstance[j+1]); + } // for + if (*l_ptr == 0x15) // ATTR_PHYS_PATH + { + i_parser.PrintString("ATTR_PHYS_PATH", outString); + } + else + { + i_parser.PrintString("ATTR_AFFINITY_PATH", outString); + } + } + } // for +#endif + } + } // parse() + +private: + // Disabled + ErrlUserDetailsParserTarget(const ErrlUserDetailsParserTarget &); + ErrlUserDetailsParserTarget & operator=( + const ErrlUserDetailsParserTarget &); +}; + +} + +#endif + diff --git a/src/usr/errl/plugins/errluserdetails.H b/src/usr/errl/plugins/errluserdetails.H new file mode 100755 index 000000000..12efbc28b --- /dev/null +++ b/src/usr/errl/plugins/errluserdetails.H @@ -0,0 +1,103 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/errl/plugins/errluserdetails.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* */ +/* 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 */ +#ifndef ERRL_ERRLUSERDETAILS_H +#define ERRL_ERRLUSERDETAILS_H + +/** + * @file errluserdetails.H + * + * Defines the ErrlUserDetailsParser base class + * + * For each class derived from ErrlUserDetails used to create user detail data, + * derive a class from ErrlUserDetailsParser to parse user detail data + */ +#include <stdint.h> + +namespace ERRORLOG +{ + +/** + * + * @class ErrlUserDetailsParser + * + * This is an abstract base class that defines how user detail error log data + * should be parsed. For every different format of user detail data, a + * component should create a class that derives from this class. + */ +class ErrlUserDetailsParser +{ +public: + + /** + * @brief Constructor + * + */ + ErrlUserDetailsParser() + { + } + + /** + * @brief Destructor + * + */ + virtual ~ErrlUserDetailsParser() + { + } + + /** + * @brief Parses user detail data from an error log + * + * Parses the supplied user detail data and outputs info to i_parser. This + * is a pure virtual function that must be overridden by a concrete derived + * class that is specific to a particular component, version and subsection + * + * @param i_version + * Version of the data + * + * @param i_parse + * ErrlUsrParser object for outputting information + * + * @param i_pBuffer + * Pointer to buffer containing detail data + * + * @param i_buflen + * Length of the buffer + * + * @return None + * + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const = 0; + +private: + + // Disabled + ErrlUserDetailsParser(const ErrlUserDetailsParser &); + ErrlUserDetailsParser & operator=(const ErrlUserDetailsParser &); +}; + +} +#endif + diff --git a/src/usr/errl/plugins/fips.mk b/src/usr/errl/plugins/fips.mk deleted file mode 100644 index 1db670df3..000000000 --- a/src/usr/errl/plugins/fips.mk +++ /dev/null @@ -1,45 +0,0 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/errl/plugins/fips.mk $ -# -# IBM CONFIDENTIAL -# -# COPYRIGHT International Business Machines Corp. 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 - -# This is a FipS makefile. The 'hb errlparser' step will copy it -# to a FipS build tree and assign a value for HBCOMPS as it is copied. - - -.if ( $(CONTEXT) == "x86.nfp" || $(CONTEXT) == "ppc" ) - -EXPINC_SUBDIRS = $(HBCOMPS) -EXPLIB_SUBDIRS = $(HBCOMPS) -OBJECTS_SUBDIRS = $(HBCOMPS) -SUBDIRS = $(HBCOMPS) -EXPSHLIB_SUBDIRS = $(HBCOMPS) - -.elif ( $(CONTEXT) == "aix.nfp" ) - -EXPINC_SUBDIRS = -EXPLIB_SUBDIRS = -OBJECTS_SUBDIRS = -SUBDIRS = -EXPSHLIB_SUBDIRS = -.endif - -.include <${RULES_MK}> diff --git a/src/usr/errl/plugins/makefile b/src/usr/errl/plugins/makefile deleted file mode 100644 index 8bb94fb91..000000000 --- a/src/usr/errl/plugins/makefile +++ /dev/null @@ -1,56 +0,0 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/errl/plugins/errl/makefile $ -# -# IBM CONFIDENTIAL -# -# COPYRIGHT International Business Machines Corp. 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 - - -# This is a FipS makefile. This file and C sources will be built -# in a FipS tree. - -# All Hostboot plugins/makefile should .include ../plugins.mk -.include "../plugins.mk" - - -ERRL_PLUGIN = libB-0100 -ERRL_OBJS = errlParse.o symbols.o - - -CFLAGS += -O0 - -.if ( $(CONTEXT) == "x86.nfp" ) - -LIBRARIES = ${ERRL_PLUGIN}.a -EXPLIBS = ${ERRL_PLUGIN}.a -${ERRL_PLUGIN}.a_OFILES = ${ERRL_OBJS} - -.else - -BUILD_SHARED_OBJS = -SHARED_LIBRARIES EXPSHLIBS = ${ERRL_PLUGIN}.so -${ERRL_PLUGIN}.so_EXTRA_LIBS = libbase.so - -${ERRL_PLUGIN}.so_SHLDFLAGS += ${SHLDFLAGS} -Wl,-soname,${.TARGET} - -${ERRL_PLUGIN}.so_OFILES = ${ERRL_OBJS} - -.endif - -.include <${RULES_MK}> diff --git a/src/usr/errl/plugins/plugins.mk b/src/usr/errl/plugins/plugins.mk deleted file mode 100644 index fd1d90b2a..000000000 --- a/src/usr/errl/plugins/plugins.mk +++ /dev/null @@ -1,35 +0,0 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/errl/plugins/plugins.mk $ -# -# IBM CONFIDENTIAL -# -# COPYRIGHT International Business Machines Corp. 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 - -# This is a FipS makefile. It will be copied to the directory above -# the directories for Hostboot components that build an errl plugin. - -# Hostboot plugin makefiles should include this makefile with -# .include "../plugins.mk" -# in order to set CFLAGS. Eventually, there may be other global -# settings common to all Hostboot makefiles. This makefile -# provides a common place for such changes. - - -CFLAGS += -DERRL_TOOLS -DPARSER -I${HOSTBOOTROOT}/obj/genfiles -I${HOSTBOOTROOT}/src/include/usr - diff --git a/src/usr/errl/test/errlReportTest.H b/src/usr/errl/test/errlReportTest.H index 2114a77ce..fc8fc289e 100644 --- a/src/usr/errl/test/errlReportTest.H +++ b/src/usr/errl/test/errlReportTest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -68,8 +68,8 @@ public: // Create an error log l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, - HBERRL_TEST_MOD_ID, - HBERRL_TEST_REASON_CODE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE, l_userData1, l_userData2); if (l_err == NULL) @@ -106,8 +106,8 @@ public: // Create an error log l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, - HBERRL_TEST_MOD_ID, - HBERRL_TEST_REASON_CODE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE, l_loopi, l_loopi); if (l_err == NULL) @@ -144,8 +144,8 @@ public: // Create an error log l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HBERRL_TEST_MOD_ID, - HBERRL_TEST_REASON_CODE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE, l_userData1, l_userData2); if (l_err == NULL) @@ -179,8 +179,8 @@ public: // Create an error log l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, - HBERRL_TEST_MOD_ID, - HBERRL_TEST_REASON_CODE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE, l_userData1, l_userData2); if (l_err == NULL) @@ -213,8 +213,8 @@ public: // Create an error log errlHndl_t l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HBERRL_TEST_MOD_ID, - HBERRL_TEST_REASON_CODE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE, l_userData1, l_userData2); @@ -251,7 +251,7 @@ public: } // Add null data. - pffdc = l_err->addFFDC( HBERRL_COMP_ID, NULL, 0, 9, 10 ); + pffdc = l_err->addFFDC( ERRL_COMP_ID, NULL, 0, 9, 10 ); if ( NULL != pffdc ) { TS_FAIL(" addFFDC() returned non null"); diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H index ccec16892..598d29b01 100644 --- a/src/usr/errl/test/errltest.H +++ b/src/usr/errl/test/errltest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -103,9 +103,9 @@ public: { /*@ * @errortype - * @reasoncode HBERRL_TEST_REASON_CODE + * @reasoncode ERRL_TEST_REASON_CODE * @severity ERRORLOG::ERRL_SEV_INFORMATIONAL - * @moduleid HBERRL_TEST_MOD_ID + * @moduleid ERRL_TEST_MOD_ID * @devdesc Errl test. Error with non-decoded string * and lots of trace buffers. */ @@ -113,8 +113,8 @@ public: // Create an error log errlHndl_t l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, - HBERRL_TEST_MOD_ID, - HBERRL_TEST_REASON_CODE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE, l_userData1, l_userData2); @@ -206,7 +206,7 @@ public: // Add null data. - pffdc = l_err->addFFDC( HBERRL_COMP_ID, NULL, 0, 9, 10 ); + pffdc = l_err->addFFDC( ERRL_COMP_ID, NULL, 0, 9, 10 ); if ( NULL != pffdc ) { TS_FAIL("testErrl1: addFFDC() returned non null"); @@ -220,7 +220,7 @@ public: break; } - if (l_err->reasonCode() != HBERRL_TEST_REASON_CODE) + if (l_err->reasonCode() != ERRL_TEST_REASON_CODE) { TS_FAIL("testErrl1: createErrlLog() returns incorrect reason code!"); break; @@ -287,8 +287,8 @@ public: // Create an error log errlHndl_t l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HBERRL_TEST_MOD_ID, - HBERRL_TEST_REASON_CODE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE, l_userData1, l_userData2); @@ -399,8 +399,8 @@ public: // Create an error log errlHndl_t errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HBERRL_TEST_MOD_ID, - HBERRL_TEST_REASON_CODE); + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE); // test the different callout types TS_TRACE( "test callout pProc %p", *pProc); diff --git a/src/usr/errl/test/errluserdetailtest.H b/src/usr/errl/test/errluserdetailtest.H index 2899bb0cd..825ff5e49 100644 --- a/src/usr/errl/test/errluserdetailtest.H +++ b/src/usr/errl/test/errluserdetailtest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -67,16 +67,16 @@ public: /*@ * @errortype * @severity ERRORLOG_SEV_INFORMATIONAL - * @moduleid HBERRL_USERDATA_TEST_MOD_ID - * @reasoncode HBERRL_TEST_STRING_UD + * @moduleid ERRL_USERDATA_TEST_MOD_ID + * @reasoncode ERRL_TEST_STRING_UD * @userdata1 Test data 1 * @userdata2 Test data 2 * @devdesc User Details unit test - create string user detail data */ errl = new ErrlEntry( ERRL_SEV_INFORMATIONAL, - HBERRL_USERDATA_TEST_MOD_ID, - HBERRL_TEST_STRING_UD, + ERRL_USERDATA_TEST_MOD_ID, + ERRL_TEST_STRING_UD, 0x1234567890, // user1 0x9876543210 ); // user2 @@ -105,16 +105,16 @@ public: /*@ * @errortype * @severity ERRORLOG_SEV_INFORMATIONAL - * @moduleid HBERRL_USERDATA_TEST_MOD_ID - * @reasoncode HBERRL_TEST_ATTRIBUTE_UD + * @moduleid ERRL_USERDATA_TEST_MOD_ID + * @reasoncode ERRL_TEST_ATTRIBUTE_UD * @userdata1 Test data 1 * @userdata2 Test data 2 * @devdesc User Details unit test - create string user detail data */ errl = new ErrlEntry( ERRL_SEV_INFORMATIONAL, - HBERRL_USERDATA_TEST_MOD_ID, - HBERRL_TEST_ATTRIBUTE_UD, + ERRL_USERDATA_TEST_MOD_ID, + ERRL_TEST_ATTRIBUTE_UD, 0x0001002300450067, 0x008900AB00CD00EF); @@ -264,16 +264,16 @@ public: /*@ * @errortype * @severity ERRORLOG_SEV_INFORMATIONAL - * @moduleid HBERRL_USERDATA_TEST_MOD_ID - * @reasoncode HBERRL_TEST_LOGREGISTER_UD + * @moduleid ERRL_USERDATA_TEST_MOD_ID + * @reasoncode ERRL_TEST_LOGREGISTER_UD * @userdata1 Test data 1 * @userdata2 Test data 2 * @devdesc User Details unit test - create log register user detail data */ errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, - HBERRL_USERDATA_TEST_MOD_ID, - HBERRL_TEST_LOGREGISTER_UD, + ERRL_USERDATA_TEST_MOD_ID, + ERRL_TEST_LOGREGISTER_UD, 0x008900AB00CD00EF, // user1 0x0001002300450067 ); // user2 @@ -507,16 +507,16 @@ public: /*@ * @errortype * @severity ERRORLOG_SEV_INFORMATIONAL - * @moduleid HBERRL_USERDATA_TEST_MOD_ID - * @reasoncode HBERRL_TEST_CALLOUT_UD + * @moduleid ERRL_USERDATA_TEST_MOD_ID + * @reasoncode ERRL_TEST_CALLOUT_UD * @userdata1 Test data 1 * @userdata2 Test data 2 * @devdesc User Details unit test - create callout user detail data */ errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, - HBERRL_USERDATA_TEST_MOD_ID, - HBERRL_TEST_CALLOUT_UD, + ERRL_USERDATA_TEST_MOD_ID, + ERRL_TEST_CALLOUT_UD, 0x0001002300450067, // user1 0x008900AB00CD00EF ); // user2 diff --git a/src/usr/hwpf/fapi/fapiParseErrorInfo.pl b/src/usr/hwpf/fapi/fapiParseErrorInfo.pl index 359beb521..fc64a61a4 100755 --- a/src/usr/hwpf/fapi/fapiParseErrorInfo.pl +++ b/src/usr/hwpf/fapi/fapiParseErrorInfo.pl @@ -23,10 +23,7 @@ # IBM_PROLOG_END_TAG # # Purpose: This perl script will parse HWP Error XML files and create required -# FAPI code. The FAPI files created are: -# -# 1/ fapiHwpReturnCodes.H - HwpReturnCode enumeration -# 2/ fapiHwpErrorInfo.H - Error Information macros +# FAPI code. # # Author: CamVan Nguyen and Mike Jones # diff --git a/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.C b/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.C index 6b04682f5..307dc8a40 100644 --- a/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.C +++ b/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.C @@ -21,6 +21,7 @@ /* */ /* IBM_PROLOG_END_TAG */ #include "pbusLinkSvc.H" +#include <hwpf/hwpf_reasoncodes.H> namespace EDI_EI_INITIALIZATION { diff --git a/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.H b/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.H index ee2caffd5..8439df04b 100644 --- a/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.H +++ b/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/hwpf/hwp/edi_ei_initialization/pbusLinkSvc.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 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/usr/hwpf/hwp/bus_training/pbusLinkSvc.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 pbusLinkSvc.H * @@ -35,7 +34,6 @@ #include <stdint.h> #include <util/singleton.H> #include <map> -#include <hwpf/plat/fapiPlatReasonCodes.H> #include <errl/errlentry.H> diff --git a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C index 266141662..988d3eb94 100644 --- a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C +++ b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C @@ -53,6 +53,7 @@ // fapi support #include <fapi.H> #include <fapiPlatHwpInvoker.H> +#include <hwpf/hwpf_reasoncodes.H> #include "dram_initialization.H" #include <pbusLinkSvc.H> @@ -69,7 +70,6 @@ #include "proc_setup_bars/proc_setup_bars.H" #include "proc_pcie_config/proc_pcie_config.H" #include "proc_exit_cache_contained/proc_exit_cache_contained.H" -#include <hwpf/plat/fapiPlatReasonCodes.H> //remove these once memory setup workaround is removed #include <devicefw/driverif.H> #include <vpd/spdenums.H> @@ -845,7 +845,7 @@ void* call_host_mpipl_service( void *io_pArgs ) * @errortype * @reasoncode ISTEP_DRAM_INITIALIZATION_FAILED * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE - * @moduleid TARGETING::ISTEP_HOST_MPIPL_SERVICE + * @moduleid ISTEP_HOST_MPIPL_SERVICE * @userdata1 bytes 0-1: plid identifying first error * bytes 2-3: reason code of first error * @userdata2 bytes 0-1: total number of elogs diff --git a/src/usr/hwpf/hwp/dram_training/hbVddrMsg.C b/src/usr/hwpf/hwp/dram_training/hbVddrMsg.C index f48e6626e..f98c86ee8 100644 --- a/src/usr/hwpf/hwp/dram_training/hbVddrMsg.C +++ b/src/usr/hwpf/hwp/dram_training/hbVddrMsg.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -161,7 +161,14 @@ errlHndl_t HBVddrMsg::sendMsg(uint32_t i_msgType) const TRACFCOMP(g_trac_volt, ERR_MRK "hbVddrMsg::send msg with non-" "valid msg type%08X",i_msgType); //generate errorLog; - /*@ + // TODO RTC 62849 The reason code is in hbVddrMsg.H and does not + // include a component ID. The component ID is essential to + // distinguish errors between components. Error log reason codes and + // module ids should also be in a file called <comp>reasoncodes.H. + // This error causes the scanforsrcs parser to error out. I removed + // '@' from the next line to stop the parser from seeing the tag. + // Add '@' back after this is all fixed + /* * @errortype * @moduleid VDDR_SEND_MSG * @reasoncode INCORRECT_MSG_TYPE @@ -262,7 +269,14 @@ errlHndl_t HBVddrMsg::processVDDRmsg(msg_t* i_recvMsg) const //an error occred in obtaining the extra data from the response msg TRACFCOMP( g_trac_volt, ERR_MRK "HBVddrMsg::processVDDRmsg: l_extraData = NULL"); //create an errorlog - /*@ + // TODO RTC 62849 The reason code is in hbVddrMsg.H and does not + // include a component ID. The component ID is essential to + // distinguish errors between components. Error log reason codes and + // module ids should also be in a file called <comp>reasoncodes.H. + // This error causes the scanforsrcs parser to error out. I removed + // '@' from the next line to stop the parser from seeing the tag. + // Add '@' back after this is all fixed + /* * @errortype * @moduleid VDDR_PROC_VDDR_MSG * @reasoncode VDDR_EMPTY_MSG @@ -303,7 +317,14 @@ errlHndl_t HBVddrMsg::processVDDRmsg(msg_t* i_recvMsg) const TRACFCOMP( g_trac_volt, ERR_MRK "HBVddrMsg::processVDDRmsg: error occured " "on the powr function called in hwsv"); //create an errorlog - /*@ + // TODO RTC 62849 The reason code is in hbVddrMsg.H and does not + // include a component ID. The component ID is essential to + // distinguish errors between components. Error log reason codes and + // module ids should also be in a file called <comp>reasoncodes.H. + // This error causes the scanforsrcs parser to error out. I removed + // '@' from the next line to stop the parser from seeing the tag. + // Add '@' back after this is all fixed + /* * @errortype * @moduleid VDDR_PROC_VDDR_MSG * @reasoncode VDDR_POWR_ERR @@ -360,7 +381,14 @@ errlHndl_t HBVddrMsg::processMsg(msg_t* i_Msg) const { TRACFCOMP( g_trac_volt, ERR_MRK "HBVddrMsg::processMsg recv'd a non valid type"); //generate errorLog; - /*@ + // TODO RTC 62849 The reason code is in hbVddrMsg.H and does not + // include a component ID. The component ID is essential to + // distinguish errors between components. Error log reason codes and + // module ids should also be in a file called <comp>reasoncodes.H. + // This error causes the scanforsrcs parser to error out. I removed + // '@' from the next line to stop the parser from seeing the tag. + // Add '@' back after this is all fixed + /* * @errortype * @moduleid VDDR_PROC_MSG * @reasoncode INCORRECT_MSG_TYPE @@ -378,7 +406,14 @@ errlHndl_t HBVddrMsg::processMsg(msg_t* i_Msg) const //an error occurred so should stop the IPL TRACFCOMP( g_trac_volt, ERR_MRK "HBVddrMsg::RecvMsgHndlr recv'd an error message" ); //generate an errorlog - /*@ + // TODO RTC 62849 The reason code is in hbVddrMsg.H and does not + // include a component ID. The component ID is essential to + // distinguish errors between components. Error log reason codes and + // module ids should also be in a file called <comp>reasoncodes.H. + // This error causes the scanforsrcs parser to error out. I removed + // '@' from the next line to stop the parser from seeing the tag. + // Add '@' back after this is all fixed + /* * @errortype * @moduleid VDDR_PROC_MSG * @reasoncode VDDR_ERROR_MSG diff --git a/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C b/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C index ab8c96fae..63778c3e7 100644 --- a/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C +++ b/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C @@ -40,7 +40,6 @@ /******************************************************************************/ #include <stdint.h> #include <map> -#include <hwpf/plat/fapiPlatReasonCodes.H> #include <trace/interface.H> #include <initservice/taskargs.H> diff --git a/src/usr/hwpf/hwp/hwpistepud.C b/src/usr/hwpf/hwp/hwpistepud.C index bc1ad76f1..83a657678 100644 --- a/src/usr/hwpf/hwp/hwpistepud.C +++ b/src/usr/hwpf/hwp/hwpistepud.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -27,7 +27,7 @@ */ #include <hbotcompid.H> #include <hwpistepud.H> -#include <hwpf/istepreasoncodes.H> +#include <hwpf/hwpf_reasoncodes.H> using namespace ISTEP_ERROR; @@ -45,7 +45,7 @@ HwpUserDetailsIstep::HwpUserDetailsIstep( errlHndl_t i_err ) // Set up ErrlUserDetails instance variables iv_CompId = HWPF_COMP_ID; iv_Version = 1; - iv_SubSection = HWP_UDT_STEP_ERROR_DETAILS; + iv_SubSection = fapi::HWPF_UDT_STEP_ERROR_DETAILS; } //------------------------------------------------------------------------------ diff --git a/src/usr/hwpf/hwp/thread_activate/thread_activate.C b/src/usr/hwpf/hwp/thread_activate/thread_activate.C index 4e98d354f..37096abc3 100644 --- a/src/usr/hwpf/hwp/thread_activate/thread_activate.C +++ b/src/usr/hwpf/hwp/thread_activate/thread_activate.C @@ -49,8 +49,8 @@ // fapi support #include <fapi.H> #include <fapiPlatHwpInvoker.H> -#include <hwpf/plat/fapiPlatReasonCodes.H> #include <hwpf/plat/fapiPlatTrace.H> +#include <hwpf/hwpf_reasoncodes.H> #include <pnor/pnorif.H> #include <vpd/mvpdenums.H> diff --git a/src/usr/hwpf/makefile b/src/usr/hwpf/makefile index 92d195b70..f10e97d44 100644 --- a/src/usr/hwpf/makefile +++ b/src/usr/hwpf/makefile @@ -139,8 +139,9 @@ IF_CMP_YACC_H_TARGET = y.tab.h IF_CMP_FLEX_TARGET = lex.yy.c IF_CMP_COMPILER_TARGET = ifcompiler -# The FAPI return code and error info files generated from Error XML files -FAPI_ERROR_TARGETS = fapiHwpReturnCodes.H fapiHwpErrorInfo.H +# The FAPI files generated from Error XML files +FAPI_ERROR_TARGETS = fapiHwpReturnCodes.H fapiHwpErrorInfo.H \ + fapiCollectRegFfdc.C fapiSetSbeError.H # The PLAT HWP Error Parser file generated from Error XML files PLAT_HWP_ERR_PARSER = fapiPlatHwpErrParser.H @@ -148,11 +149,10 @@ PLAT_HWP_ERR_PARSER = fapiPlatHwpErrParser.H # The FAPI attribute id file generated from Attribute XML files FAPI_ATTR_ID_TARGET = fapiAttributeIds.H -# The FAPI attribute platform check file generated from Attribute XML files -FAPI_ATTR_PLAT_CHECK_TARGET = fapiAttributePlatCheck.H - -# The FAPI attributes supported HTML file generated from Attribute XML files -FAPI_ATTRS_SUPPORTED_TARGET = fapiAttributesSupported.html +# The FAPI files generated from Attribute XML files +FAPI_ATTR_TARGETS = fapiChipEcFeature.C fapiAttributePlatCheck.H \ + fapiAttributesSupported.html fapiAttributeIds.txt \ + fapiAttributeEnums.txt # The binary, list and attr files generated from Initfiles # Generation depends on ifcompiler and fapiAttributeIds.H @@ -173,13 +173,13 @@ GENFILES = ${IF_CMP_YACC_C_TARGET} \ ${IF_CMP_FLEX_TARGET} \ ${IF_CMP_COMPILER_TARGET} \ ${FAPI_ERROR_TARGETS} \ - ${PLAT_HWP_ERR_PARSER} \ ${FAPI_ATTR_ID_TARGET} \ - ${FAPI_ATTR_PLAT_CHECK_TARGET} \ - ${FAPI_ATTRS_SUPPORTED_TARGET} \ + ${FAPI_ATTR_TARGETS} \ ${HWP_IF_ALL_TARGETS} \ ${FAPI_ATTR_IF_TARGET} +GENFILES_PLUGINS = ${PLAT_HWP_ERR_PARSER} + EXTRA_PARTS = $(addprefix ${ROOTPATH}/img/,${HWP_IF_BIN_TARGETS}) include ${ROOTPATH}/config.mk @@ -233,8 +233,7 @@ $(call GENTARGET, ${PLAT_HWP_ERR_PARSER}) : \ # The FAPI attribute id file, the FAPI attribute platform check file and the # FAPI attributes supported file generated from Attribute XML files #------------------------------------------------------------------------------ -$(call GENTARGET, ${FAPI_ATTR_ID_TARGET} ${FAPI_ATTR_PLAT_CHECK_TARGET} \ - ${FAPI_ATTRS_SUPPORTED_TARGET}) : \ +$(call GENTARGET, ${FAPI_ATTR_ID_TARGET} ${FAPI_ATTR_TARGETS}) : \ fapi/fapiParseAttributeInfo.pl ${HWP_ATTR_XML_FILES} $< $(dir $@) ${HWP_ATTR_XML_FILES} diff --git a/src/usr/hwpf/plat/fapiPlatAttributeService.C b/src/usr/hwpf/plat/fapiPlatAttributeService.C index ebe686901..ec260b919 100644 --- a/src/usr/hwpf/plat/fapiPlatAttributeService.C +++ b/src/usr/hwpf/plat/fapiPlatAttributeService.C @@ -35,7 +35,7 @@ #include <targeting/common/targetservice.H> #include <errl/errlentry.H> #include <hwpf/plat/fapiPlatAttributeService.H> -#include <hwpf/plat/fapiPlatReasonCodes.H> +#include <hwpf/hwpf_reasoncodes.H> #include <vpd/spdenums.H> #include <devicefw/driverif.H> #include <hwas/common/hwas.H> diff --git a/src/usr/hwpf/plat/fapiPlatCreateHwpErrParser.pl b/src/usr/hwpf/plat/fapiPlatCreateHwpErrParser.pl index 762e7280b..e97ace6fa 100755 --- a/src/usr/hwpf/plat/fapiPlatCreateHwpErrParser.pl +++ b/src/usr/hwpf/plat/fapiPlatCreateHwpErrParser.pl @@ -6,7 +6,7 @@ # # IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2012 +# COPYRIGHT International Business Machines Corp. 2012,2013 # # p1 # @@ -119,6 +119,7 @@ foreach my $argnum (1 .. $#ARGV) my $errHash24Bit = substr($errHash128Bit, 0, 6); print TGFILE " case 0x$errHash24Bit:\n"; + print TGFILE " i_parser.PrintString(\"HwpReturnCode\", \"$err->{rc}\");\n"; print TGFILE " i_parser.PrintString(\"HWP Error description\", \"$desc\");\n"; print TGFILE " break;\n"; } @@ -179,13 +180,13 @@ foreach my $argnum (1 .. $#ARGV) # the same way as fapiParseErrorInfo.pl. This code must be kept in # sync #------------------------------------------------------------------ - my $ffdcName = $err->{rc} . "_"; - $ffdcName = $ffdcName . $ffdc; + my $ffdcName = $err->{rc} . "_" . $ffdc; my $ffdcHash128Bit = md5_hex($ffdcName); my $ffdcHash32Bit = substr($ffdcHash128Bit, 0, 8); print TGFILE " case 0x$ffdcHash32Bit:\n"; - print TGFILE " i_parser.PrintString(\"FFDC:\", \"$ffdcName\");\n"; + print TGFILE " i_parser.PrintString(\"HwpReturnCode\", \"$err->{rc}\");\n"; + print TGFILE " i_parser.PrintString(\"FFDC:\", \"$ffdc\");\n"; print TGFILE " if (l_buflen) "; print TGFILE "{i_parser.PrintHexDump(l_pBuffer, l_buflen);}\n"; print TGFILE " break;\n"; diff --git a/src/usr/hwpf/plat/fapiPlatHwAccess.C b/src/usr/hwpf/plat/fapiPlatHwAccess.C index 5b1f5ce6c..8f8a4f2b2 100644 --- a/src/usr/hwpf/plat/fapiPlatHwAccess.C +++ b/src/usr/hwpf/plat/fapiPlatHwAccess.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -52,10 +52,10 @@ #include <fapiHwAccess.H> #include <fapiPlatTrace.H> #include <fapiPlatHwAccess.H> +#include <hwpf/hwpf_reasoncodes.H> #include <errl/errlentry.H> #include <devicefw/userif.H> #include <ecmdDataBufferBase.H> -#include <fapiPlatReasonCodes.H> #include <targeting/common/predicates/predicates.H> #include <targeting/common/targetservice.H> #include <scan/scanif.H> @@ -237,8 +237,8 @@ static errlHndl_t verifyCfamAccessTarget(const fapi::Target& i_target) /*@ * @errortype - * @moduleid MOD_VERIFY_CFAM_ACCESS_TARGET - * @reasoncode RC_CFAM_ACCESS_ON_PROC_ERR + * @moduleid fapi::MOD_VERIFY_CFAM_ACCESS_TARGET + * @reasoncode fapi::RC_CFAM_ACCESS_ON_PROC_ERR * @userdata1 Target type * @devdesc Attempt to access CFAM register on a processor chip */ @@ -294,8 +294,8 @@ static errlHndl_t getCfamChipTarget(const TARGETING::Target* i_target, FAPI_ERR("getCfamChipTarget: Invalid number of parent chip for this target chiplet - # parent chips %d", l_list.size()); /*@ * @errortype - * @moduleid MOD_GET_CFAM_CHIP_TARGET - * @reasoncode RC_INVALID_NUM_PARENT_CHIP + * @moduleid fapi::MOD_GET_CFAM_CHIP_TARGET + * @reasoncode fapi::RC_INVALID_NUM_PARENT_CHIP * @userdata1 Number of parent chip found * @devdesc Invalid num of parent chip found for input CFAM target chiplet */ diff --git a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C index fed7d3157..66753c655 100644 --- a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C +++ b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -30,7 +30,7 @@ #include <fapiReturnCode.H> #include <fapiPlatTrace.H> #include <fapiErrorInfo.H> -#include <fapiPlatReasonCodes.H> +#include <hwpf/hwpf_reasoncodes.H> #include <errl/errlentry.H> namespace fapi @@ -180,7 +180,7 @@ errlHndl_t fapiRcToErrl(ReturnCode & io_rc) l_reasonCode &= 0xff; l_reasonCode |= HWPF_COMP_ID; - // HostBoot errlog tags for FAPI errors are in fapiPlatReasonCodes.H + // HostBoot errlog tags for FAPI errors are in hwpfReasonCodes.H l_pError = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, MOD_FAPI_RC_TO_ERRL, l_reasonCode); diff --git a/src/usr/hwpf/plat/fapiPlatMvpdAccess.C b/src/usr/hwpf/plat/fapiPlatMvpdAccess.C index 934137b61..a048b930f 100644 --- a/src/usr/hwpf/plat/fapiPlatMvpdAccess.C +++ b/src/usr/hwpf/plat/fapiPlatMvpdAccess.C @@ -30,8 +30,8 @@ #include <errl/errlentry.H> // fapi support -#include <hwpf/plat/fapiPlatReasonCodes.H> #include <fapiMvpdAccess.H> +#include <hwpf/hwpf_reasoncodes.H> // MVPD #include <devicefw/userif.H> diff --git a/src/usr/hwpf/plat/fapiPlatSystemConfig.C b/src/usr/hwpf/plat/fapiPlatSystemConfig.C index f07d0e15b..ef25ffd2b 100644 --- a/src/usr/hwpf/plat/fapiPlatSystemConfig.C +++ b/src/usr/hwpf/plat/fapiPlatSystemConfig.C @@ -30,7 +30,7 @@ #include <fapiPlatTrace.H> #include <fapiSystemConfig.H> -#include <fapiPlatReasonCodes.H> +#include <hwpf/hwpf_reasoncodes.H> #include <errl/errlentry.H> #include <targeting/common/commontargeting.H> #include <targeting/common/utilFilter.H> @@ -69,8 +69,8 @@ fapi::ReturnCode fapiGetOtherSideOfMemChannel( l_targetList.size()); /*@ * @errortype - * @moduleid fapi:MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL - * @reasoncode fapi:RC_NO_SINGLE_MCS + * @moduleid fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL + * @reasoncode fapi::RC_NO_SINGLE_MCS * @userdata1 Type of input target * @devdesc fapiGetOtherSideOfMemChannel could not find exactly * one target on the other side of the correct state @@ -104,8 +104,8 @@ fapi::ReturnCode fapiGetOtherSideOfMemChannel( l_targetList.size()); /*@ * @errortype - * @moduleid fapi:MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL - * @reasoncode fapi:RC_NO_SINGLE_MEMBUFF + * @moduleid fapi::MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL + * @reasoncode fapi::RC_NO_SINGLE_MEMBUFF * @userdata1 Type of input target * @devdesc fapiGetOtherSideOfMemChannel could not find exactly * one target on the other side of the correct state @@ -204,8 +204,8 @@ fapi::ReturnCode fapiGetChildChiplets( i_chip.getType()); /*@ * @errortype - * @moduleid MOD_FAPI_GET_CHILD_CHIPLETS - * @reasoncode RC_INVALID_REQUEST + * @moduleid fapi::MOD_FAPI_GET_CHILD_CHIPLETS + * @reasoncode fapi::RC_INVALID_REQUEST * @userdata1 Type of input target * @devdesc fapiGetChildChiplets request for non-chip */ @@ -248,8 +248,8 @@ fapi::ReturnCode fapiGetChildChiplets( i_chipletType); /*@ * @errortype - * @moduleid MOD_FAPI_GET_CHILD_CHIPLETS - * @reasoncode RC_UNSUPPORTED_REQUEST + * @moduleid fapi::MOD_FAPI_GET_CHILD_CHIPLETS + * @reasoncode fapi::RC_UNSUPPORTED_REQUEST * @userdata1 Type of requested chiplet * @devdesc fapiGetChildChiplets request for unsupported * or invalid chiplet type @@ -275,8 +275,8 @@ fapi::ReturnCode fapiGetChildChiplets( FAPI_ERR("fapiGetChildChiplets. Embedded NULL target pointer"); /*@ * @errortype - * @moduleid MOD_FAPI_GET_CHILD_CHIPLETS - * @reasoncode RC_EMBEDDED_NULL_TARGET_PTR + * @moduleid fapi::MOD_FAPI_GET_CHILD_CHIPLETS + * @reasoncode fapi::RC_EMBEDDED_NULL_TARGET_PTR * @devdesc fapi target has embedded null target pointer */ errlHndl_t l_pError = new ERRORLOG::ErrlEntry( @@ -345,8 +345,8 @@ fapi::ReturnCode fapiGetAssociatedDimms( FAPI_ERR("fapiGetAssociatedDimms. Embedded NULL target pointer"); /*@ * @errortype - * @moduleid MOD_FAPI_GET_ASSOCIATE_DIMMS - * @reasoncode RC_EMBEDDED_NULL_TARGET_PTR + * @moduleid fapi::MOD_FAPI_GET_ASSOCIATE_DIMMS + * @reasoncode fapi::RC_EMBEDDED_NULL_TARGET_PTR * @devdesc fapi target has embedded null target pointer */ errlHndl_t l_pError = new ERRORLOG::ErrlEntry( @@ -414,8 +414,8 @@ fapi::ReturnCode fapiGetParentChip( /*@ * @errortype - * @moduleid MOD_FAPI_GET_PARENT_CHIP - * @reasoncode RC_INVALID_REQUEST + * @moduleid fapi::MOD_FAPI_GET_PARENT_CHIP + * @reasoncode fapi::RC_INVALID_REQUEST * @userdata1 Type of input target * @devdesc fapiGetParentChip request for non-chiplet */ @@ -438,8 +438,8 @@ fapi::ReturnCode fapiGetParentChip( { /*@ * @errortype - * @moduleid MOD_FAPI_GET_PARENT_CHIP - * @reasoncode RC_EMBEDDED_NULL_TARGET_PTR + * @moduleid fapi::MOD_FAPI_GET_PARENT_CHIP + * @reasoncode fapi::RC_EMBEDDED_NULL_TARGET_PTR * @devdesc fapi target has embedded null target pointer */ errlHndl_t l_pError = new ERRORLOG::ErrlEntry( @@ -461,8 +461,8 @@ fapi::ReturnCode fapiGetParentChip( FAPI_ERR("fapiGetParentChip. Parent not found"); /*@ * @errortype - * @moduleid MOD_FAPI_GET_PARENT_CHIP - * @reasoncode RC_NO_SINGLE_PARENT + * @moduleid fapi::MOD_FAPI_GET_PARENT_CHIP + * @reasoncode fapi::RC_NO_SINGLE_PARENT * @devdesc fapiGetParentChip request did not find one parent */ errlHndl_t l_pError = new ERRORLOG::ErrlEntry( diff --git a/src/usr/hwpf/plugins/hwpfParse.C b/src/usr/hwpf/plugins/HWPF_COMP_ID_Parse.C index 5fe7af402..c67f27f27 100644 --- a/src/usr/hwpf/plugins/hwpfParse.C +++ b/src/usr/hwpf/plugins/HWPF_COMP_ID_Parse.C @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/hwpf/plugins/hwpfParse.C $ */ +/* $Source: src/usr/hwpf/plugins/HWPF_COMP_ID_Parse.C $ */ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -21,14 +21,12 @@ /* */ /* IBM_PROLOG_END_TAG */ /** - * @file hwpfParse.C + * @file HWPF_COMP_ID_Parse.C * * HWPF user data parser */ -#include <errl/errludparser.H> -#include <hwpf/plat/fapiPlatUdParserFactory.H> -#include <hwpf/hwp/hwpistepudparserfactory.H> +#include "errludparser.H" +#include "hwpfUdParserFactory.H" -ERRL_MAKE_UD_PARSER(fapi::PlatUserDetailsParserFactory, HWPF_COMP_ID) -ERRL_MAKE_UD_PARSER(ISTEP_ERROR::HwpIstepUserDetailsParserFactory, HWPF_COMP_ID) +ERRL_MAKE_UD_PARSER(fapi::HwpfUserDetailsParserFactory, hbfw::HWPF_COMP_ID) diff --git a/src/usr/hwpf/plugins/fapiPlatUdParserHwp.H b/src/usr/hwpf/plugins/fapiPlatUdParserHwp.H new file mode 100644 index 000000000..1296fb8a8 --- /dev/null +++ b/src/usr/hwpf/plugins/fapiPlatUdParserHwp.H @@ -0,0 +1,129 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hwpf/plugins/fapiPlatUdParserHwp.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013 */ +/* */ +/* 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 */ +#ifndef FAPIPLATUDPARSERHWP_H +#define FAPIPLATUDPARSERHWP_H + +/** + * @file fapiPlatUdParserHwp.H + * + * Defines ErrlUserDetailsParser subclasses to parse the different types of HWP + * FFDC added as user detail data to an error log. + * + * Note that there are no corresponding ErrlUserDetails subclasses to create + * the user detail data because it is created by the platform neutral + * fapi::ReturnCode + */ +#include "errluserdetails.H" +#include "fapiPlatHwpErrParser.H" + +namespace fapi +{ + +/** + * @class PlatUserDetailsParserHwpRcValue + * + * Parses the HWP RcValue in an error log. + */ +class PlatUserDetailsParserHwpRcValue : public ERRORLOG::ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + PlatUserDetailsParserHwpRcValue() {} + + /** + * @brief Destructor + */ + virtual ~PlatUserDetailsParserHwpRcValue() {} + + /** + * @brief Parses the HWP RcValue in an error log. + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + // Call a FAPI generated function to parse the return code + fapiParseHwpRc(i_parser, i_pBuffer, i_buflen); + } + +private: + // Disabled + PlatUserDetailsParserHwpRcValue(const PlatUserDetailsParserHwpRcValue &); + PlatUserDetailsParserHwpRcValue & operator=( + const PlatUserDetailsParserHwpRcValue &); +}; + +/** + * @class PlatUserDetailsParserHwpTarget + * + * Parses HWP FFDC in an error log. + */ +class PlatUserDetailsParserHwpFfdc : public ERRORLOG::ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + PlatUserDetailsParserHwpFfdc() {} + + /** + * @brief Destructor + */ + virtual ~PlatUserDetailsParserHwpFfdc() {} + + /** + * @brief Parses HWP FFDC in an error log. + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + // Call a FAPI generated function to parse the FFDC + fapiParseHwpFfdc(i_parser, i_pBuffer, i_buflen); + } + +private: + // Disabled + PlatUserDetailsParserHwpFfdc(const PlatUserDetailsParserHwpFfdc &); + PlatUserDetailsParserHwpFfdc & operator=( + const PlatUserDetailsParserHwpFfdc &); +}; + +} + +#endif + diff --git a/src/usr/hwpf/plugins/hwpfUdParserFactory.H b/src/usr/hwpf/plugins/hwpfUdParserFactory.H new file mode 100644 index 000000000..95a732ec1 --- /dev/null +++ b/src/usr/hwpf/plugins/hwpfUdParserFactory.H @@ -0,0 +1,69 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hwpf/plugins/hwpfUdParserFactory.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013 */ +/* */ +/* 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 */ +#ifndef HWPFUDPARSERFACTORY_H +#define HWPFUDPARSERFACTORY_H + +/** + * @file fapiPlatHwpUdDecode.H + * + * Defines the PlatUserDetailsParserFactory class + */ +#include "errludparserfactory.H" +#include "fapiPlatUdParserHwp.H" +#include "hwpistepud.H" + +namespace fapi +{ + +/** + * @class Hwpf UserDetailsParserFactory + * + * This factory produces ErrlUserDetailsParser objects to parse the specified + * HWPF user detail data. + */ +class HwpfUserDetailsParserFactory : public ERRORLOG::ErrlUserDetailsParserFactory +{ +public: + + /** + * @brief Constructor + */ + HwpfUserDetailsParserFactory() + { + registerParser<PlatUserDetailsParserHwpRcValue>(HWPF_UDT_HWP_RCVALUE); + registerParser<PlatUserDetailsParserHwpFfdc>(HWPF_UDT_HWP_FFDC); + registerParser<ISTEP_ERROR::HwpUserDetailsParserIstep> + (HWPF_UDT_STEP_ERROR_DETAILS); + } + +private: + // Disabled + HwpfUserDetailsParserFactory(const HwpfUserDetailsParserFactory &); + HwpfUserDetailsParserFactory & operator=( + const HwpfUserDetailsParserFactory &); +}; + +} + +#endif + diff --git a/src/usr/hwpf/plugins/hwpistepud.H b/src/usr/hwpf/plugins/hwpistepud.H new file mode 100644 index 000000000..8d17e9130 --- /dev/null +++ b/src/usr/hwpf/plugins/hwpistepud.H @@ -0,0 +1,99 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hwpf/plugins/hwpistepud.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef INITSVC_UDSTEP_H +#define INITSVC_UDSTEP_H + +/** + * @file initsvcudistep.H + * + * Defines the HwpUserDetailsParserIstep class that parses + * IStep FFDC user detail in an error log + */ + +#include "errluserdetails.H" + +namespace ISTEP_ERROR +{ + /** + * @struct IStepUserDetailsIstepData + * + * Defines the user detail data + */ + struct HwpUserDetailsIstepErrorData + { + uint32_t eid; + uint32_t reasoncode; + }; + + /** + * @class HwpUserDetailsParserIstep + * + * Parses Istep user detail in an error log + */ + class HwpUserDetailsParserIstep : public ERRORLOG::ErrlUserDetailsParser + { + public: + /** + * @brief Constructor + */ + HwpUserDetailsParserIstep() {} + + /** + * @brief Destructor + */ + virtual ~HwpUserDetailsParserIstep() {} + + /** + * @brief Parses Istep user detail data from an error log + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting + * information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + HwpUserDetailsIstepErrorData * l_pData = + static_cast<HwpUserDetailsIstepErrorData *>(i_pBuffer); + + i_parser.PrintNumber("See error log ID:","0x%X", + ntohl(l_pData->eid)); + + i_parser.PrintNumber("Reasoncode:","0x%X", + ntohl(l_pData->reasoncode) ); + } + + private: + // Disabled + HwpUserDetailsParserIstep(const HwpUserDetailsParserIstep &); + HwpUserDetailsParserIstep & operator=( + const HwpUserDetailsParserIstep &); + }; +} + +#endif + diff --git a/src/usr/hwpf/plugins/makefile b/src/usr/hwpf/plugins/makefile deleted file mode 100644 index 891249f93..000000000 --- a/src/usr/hwpf/plugins/makefile +++ /dev/null @@ -1,47 +0,0 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/hwpf/plugins/makefile $ -# -# IBM CONFIDENTIAL -# -# COPYRIGHT International Business Machines Corp. 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 -# This is a FipS makefile. - -# Include the common hostboot plugins makefile -.include "../plugins.mk" - -MY_PLUGIN = libB-0900 -MY_OBJS = hwpfParse.o - -.if ( $(CONTEXT) == "x86.nfp" ) - -LIBRARIES = ${MY_PLUGIN}.a -EXPLIBS = ${MY_PLUGIN}.a -${MY_PLUGIN}.a_OFILES = ${MY_OBJS} - -.else - -BUILD_SHARED_OBJS = -SHARED_LIBRARIES EXPSHLIBS = ${MY_PLUGIN}.so -${MY_PLUGIN}.so_EXTRA_LIBS = libbase.so -${MY_PLUGIN}.so_SHLDFLAGS += ${SHLDFLAGS} -Wl,-soname,${.TARGET} -${MY_PLUGIN}.so_OFILES = ${MY_OBJS} - -.endif - -.include <${RULES_MK}> diff --git a/src/usr/initservice/plugins/INITSVC_COMP_ID_Parse.C b/src/usr/initservice/plugins/INITSVC_COMP_ID_Parse.C new file mode 100644 index 000000000..fbc50cab1 --- /dev/null +++ b/src/usr/initservice/plugins/INITSVC_COMP_ID_Parse.C @@ -0,0 +1,33 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/initservice/plugins/INITSVC_COMP_ID_Parse.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 INITSVC_COMP_ID_Parse.C + * + * Initservice user data parser + */ +#include "errludparser.H" +#include "initsvcudparserfactory.H" + +ERRL_MAKE_UD_PARSER(INITSERVICE::InitSvcUserDetailsParserFactory, + hbfw::INITSVC_COMP_ID) + diff --git a/src/usr/initservice/plugins/initsvcParse.C b/src/usr/initservice/plugins/initsvcParse.C deleted file mode 100644 index e8894ca4e..000000000 --- a/src/usr/initservice/plugins/initsvcParse.C +++ /dev/null @@ -1,31 +0,0 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/initservice/plugins/initsvcParse.C $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 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 -/** - * @file initsvcParse.C - * - * Initservice user data parser - */ -#include <errl/errludparser.H> -#include <initservice/initsvcudparserfactory.H> -ERRL_MAKE_UD_PARSER(INITSERVICE::InitSvcUserDetailsParserFactory, INITSVC_COMP_ID) - diff --git a/src/usr/initservice/plugins/initsvcudistep.H b/src/usr/initservice/plugins/initsvcudistep.H new file mode 100644 index 000000000..02dcace60 --- /dev/null +++ b/src/usr/initservice/plugins/initsvcudistep.H @@ -0,0 +1,99 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/initservice/plugins/initsvcudistep.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef INITSVC_UDSTEP_H +#define INITSVC_UDSTEP_H + +/** + * @file initsvcudistep.H + * + * Defines the InitSvcUserDetailsParserIstep class that parses + * IStep FFDC user detail in an error log + */ + +#include "errluserdetails.H" + +namespace INITSERVICE +{ + +/** + * @struct InitSvcUserDetailsIstepData + * + * Defines the user detail data + */ +struct InitSvcUserDetailsIstepData +{ + uint16_t iv_step; + uint16_t iv_substep; + char iv_pIstepname[0]; +}; + +/** + * @class InitSvcUserDetailsParserIstep + * + * Parses Istep user detail in an error log +*/ +class InitSvcUserDetailsParserIstep : public ERRORLOG::ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + InitSvcUserDetailsParserIstep() {} + + /** + * @brief Destructor + */ + virtual ~InitSvcUserDetailsParserIstep() {} + + /** + * @brief Parses Istep user detail data from an error log + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + InitSvcUserDetailsIstepData * l_pData = + static_cast<InitSvcUserDetailsIstepData *>(i_pBuffer); + + i_parser.PrintString("IStep name", l_pData->iv_pIstepname); + i_parser.PrintNumber("Step", "%d", ntohs(l_pData->iv_step)); + i_parser.PrintNumber("Sub-step", "%d", ntohs(l_pData->iv_substep)); + } + +private: + // Disabled + InitSvcUserDetailsParserIstep(const InitSvcUserDetailsParserIstep &); + InitSvcUserDetailsParserIstep & operator=( + const InitSvcUserDetailsParserIstep &); +}; + +} + +#endif + diff --git a/src/usr/initservice/plugins/initsvcudparserfactory.H b/src/usr/initservice/plugins/initsvcudparserfactory.H new file mode 100644 index 000000000..d97cb31c6 --- /dev/null +++ b/src/usr/initservice/plugins/initsvcudparserfactory.H @@ -0,0 +1,66 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/initservice/plugins/initsvcudparserfactory.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#ifndef INITSVC_UDPARSERFACTORY_H +#define INITSVC_UDPARSERFACTORY_H + +/** + * @file initsvcudparserfactory.H + * + * Defines the InitSvcUserDetailsParserFactory.H class + */ +#include "errludparserfactory.H" +#include "initsvcudistep.H" + +namespace INITSERVICE +{ + +/** + * @class InitSvcUserDetailsParserFactory + * + * This factory produces ErrlUserDetailsParser objects to parse the specified + * InitService user detail data. +*/ +class InitSvcUserDetailsParserFactory : public ERRORLOG::ErrlUserDetailsParserFactory +{ +public: + + /** + * @brief Constructor + */ + InitSvcUserDetailsParserFactory() + { + registerParser<InitSvcUserDetailsParserIstep>(INIT_SVC_UDT_ISTEP); + } + +private: + + // Disabled + InitSvcUserDetailsParserFactory(const InitSvcUserDetailsParserFactory &); + InitSvcUserDetailsParserFactory & operator=( + const InitSvcUserDetailsParserFactory &); +}; + +} + +#endif + diff --git a/src/usr/initservice/plugins/makefile b/src/usr/initservice/plugins/makefile deleted file mode 100644 index b2583f58d..000000000 --- a/src/usr/initservice/plugins/makefile +++ /dev/null @@ -1,49 +0,0 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/initservice/plugins/makefile $ -# -# IBM CONFIDENTIAL -# -# COPYRIGHT International Business Machines Corp. 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 - -# This is a FipS makefile. - - -# Include the common hostboot plugins makefile -.include "../plugins.mk" - -MY_PLUGIN = libB-0500 -MY_OBJS = initsvcParse.o - -.if ( $(CONTEXT) == "x86.nfp" ) - -LIBRARIES = ${MY_PLUGIN}.a -EXPLIBS = ${MY_PLUGIN}.a -${MY_PLUGIN}.a_OFILES = ${MY_OBJS} - -.else - -BUILD_SHARED_OBJS = -SHARED_LIBRARIES EXPSHLIBS = ${MY_PLUGIN}.so -${MY_PLUGIN}.so_EXTRA_LIBS = libbase.so -${MY_PLUGIN}.so_SHLDFLAGS += ${SHLDFLAGS} -Wl,-soname,${.TARGET} -${MY_PLUGIN}.so_OFILES = ${MY_OBJS} - -.endif - -.include <${RULES_MK}> diff --git a/src/usr/intr/intrrp.C b/src/usr/intr/intrrp.C index d00dc5f8e..775f050f9 100644 --- a/src/usr/intr/intrrp.C +++ b/src/usr/intr/intrrp.C @@ -585,7 +585,7 @@ errlHndl_t IntrRp::initXIVR(enum ISNvalue_t i_isn, bool i_enable) * @userdata1 Interrupt type to register * @userdata2 0 * - * @defdesc Unsupported ISN Requested + * @devdesc Unsupported ISN Requested * */ err = new ERRORLOG::ErrlEntry @@ -705,7 +705,7 @@ errlHndl_t IntrRp::registerInterruptXISR(msg_q_t i_msgQ, * @userdata1 XISR * @userdata2 0 * - * @defdesc Interrupt type already registered + * @devdesc Interrupt type already registered * */ err = new ERRORLOG::ErrlEntry @@ -875,7 +875,7 @@ errlHndl_t IntrRp::checkAddress(uint64_t i_addr) * @userdata1 The bad virtual address * @userdata2 0 * - * @defdesc The virutal address is not a valid IO address + * @devdesc The virutal address is not a valid IO address * */ err = new ERRORLOG::ErrlEntry @@ -1026,7 +1026,7 @@ errlHndl_t INTR::registerMsgQ(msg_q_t i_msgQ, * @userdata1 Interrupt type to register * @userdata2 0 * - * @defdesc Interrupt resource provider not initialized yet. + * @devdesc Interrupt resource provider not initialized yet. * */ err = new ERRORLOG::ErrlEntry @@ -1097,7 +1097,7 @@ errlHndl_t INTR::enableExternalInterrupts() * @userdata1 MSG_INTR_ENABLE * @userdata2 0 * - * @defdesc Interrupt resource provider not initialized yet. + * @devdesc Interrupt resource provider not initialized yet. * */ err = new ERRORLOG::ErrlEntry @@ -1139,7 +1139,7 @@ errlHndl_t INTR::disableExternalInterrupts() * @userdata1 MSG_INTR_DISABLE * @userdata2 0 * - * @defdesc Interrupt resource provider not initialized yet. + * @devdesc Interrupt resource provider not initialized yet. * */ err = new ERRORLOG::ErrlEntry @@ -1178,7 +1178,7 @@ errlHndl_t INTR::enablePsiIntr(TARGETING::Target * i_target) * @userdata1 MSG_INTR_ENABLE_PSI_INTR * @userdata2 0 * - * @defdesc Interrupt resource provider not initialized yet. + * @devdesc Interrupt resource provider not initialized yet. * */ err = new ERRORLOG::ErrlEntry diff --git a/src/usr/mbox/mailboxsp.C b/src/usr/mbox/mailboxsp.C index 8688c43a5..340d6e17a 100644 --- a/src/usr/mbox/mailboxsp.C +++ b/src/usr/mbox/mailboxsp.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/mbox/mailboxsp.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 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/usr/mbox/mailboxsp.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 mailboxsp.C * @brief mailbox service provider definition @@ -37,7 +36,7 @@ #include <mbox/mboxUdParser.H> #include <targeting/common/commontargeting.H> -#define HBMBOX_TRACE_NAME HBMBOX_COMP_NAME +#define MBOX_TRACE_NAME MBOX_COMP_NAME using namespace MBOX; @@ -45,9 +44,9 @@ using namespace MBOX; extern trace_desc_t * g_trac_mbox; extern trace_desc_t * g_trac_mboxmsg; -const char HBMBOXMSG_TRACE_NAME[] = "MBOXMSG"; +const char MBOXMSG_TRACE_NAME[] = "MBOXMSG"; trace_desc_t* g_trac_mboxmsg = NULL; // g_trac_mbox; -TRAC_INIT(&g_trac_mboxmsg, HBMBOXMSG_TRACE_NAME, +TRAC_INIT(&g_trac_mboxmsg, MBOXMSG_TRACE_NAME, 2*KILOBYTE, TRACE::BUFFER_SLOW); @@ -110,7 +109,7 @@ errlHndl_t MailboxSp::_init() * @moduleid MBOX::MOD_MBOXSRV_INIT * @reasoncode MBOX::RC_KERNEL_REG_FAILED * @userdata1 rc from msq_q_register - * @defdesc Could not register mailbox message queue + * @devdesc Could not register mailbox message queue */ err = new ERRORLOG::ErrlEntry ( @@ -227,7 +226,7 @@ void MailboxSp::msgHandler() // or MBOX_DATA_WRITE_ERR - serious - assert if(err) { - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); TRACFCOMP(g_trac_mbox, ERR_MRK"MBOXSP HALTED on critical error!"); crit_assert(0); @@ -292,7 +291,7 @@ void MailboxSp::msgHandler() * @moduleid MBOX::MOD_MBOXSRV_HNDLR * @reasoncode MBOX::RC_INVALID_MBOX_MSG_TYPE * @userdata1 Message type - * @defdesc Invalid message type sent to mailbox msgQ + * @devdesc Invalid message type sent to mailbox msgQ */ err = new ERRORLOG::ErrlEntry ( @@ -303,7 +302,7 @@ void MailboxSp::msgHandler() 0 ); - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); err = NULL; msg_free(msg); @@ -348,7 +347,7 @@ void MailboxSp::handleNewMessage(msg_t * i_msg) * @reasoncode RC_MAILBOX_DISABLED * @userdata1 queue_id * @userdata2 message type - * @defdesc Mailbox is disabled, message dropped. + * @devdesc Mailbox is disabled, message dropped. */ errlHndl_t err = new ERRORLOG::ErrlEntry ( @@ -502,7 +501,7 @@ void MailboxSp::send_msg(mbox_msg_t * i_msg) * @reasoncode RC_INVALID_DMA_LENGTH * @userdata1 DMA length requested * @userdata2 queue_id - * @defdesc Failed to allocate a DMA buffer. + * @devdesc Failed to allocate a DMA buffer. * Message dropped. */ err = new ERRORLOG::ErrlEntry @@ -573,7 +572,7 @@ void MailboxSp::send_msg(mbox_msg_t * i_msg) if(err) // have error log and no where to respond to, so commit it. { - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); err = NULL; } } @@ -672,7 +671,7 @@ void MailboxSp::recv_msg(mbox_msg_t & i_mbox_msg) * @reasoncode MBOX::RC_INVALID_QUEUE * @userdata1 rc from msg_send() * @userdata2 msg queue id - * @defdesc Ivalid msg or msg queue + * @devdesc Ivalid msg or msg queue * */ err = new ERRORLOG::ErrlEntry @@ -692,8 +691,8 @@ void MailboxSp::recv_msg(mbox_msg_t & i_mbox_msg) ffdc.addToLog(err); - err->collectTrace(HBMBOXMSG_TRACE_NAME); - errlCommit(err,HBMBOX_COMP_ID); + err->collectTrace(MBOXMSG_TRACE_NAME); + errlCommit(err,MBOX_COMP_ID); free(msg->extra_data); msg_free(msg); @@ -737,7 +736,7 @@ void MailboxSp::recv_msg(mbox_msg_t & i_mbox_msg) * @reasoncode MBOX::RC_INVALID_MESSAGE_TYPE * @userdata1 msg queue * @userdata2 msg type - * @defdesc Message from FSP. Message type is not + * @devdesc Message from FSP. Message type is not * within a valid range. Message dropped. */ err = new ERRORLOG::ErrlEntry @@ -757,8 +756,8 @@ void MailboxSp::recv_msg(mbox_msg_t & i_mbox_msg) ffdc.addToLog(err); - err->collectTrace(HBMBOXMSG_TRACE_NAME); - errlCommit(err,HBMBOX_COMP_ID); + err->collectTrace(MBOXMSG_TRACE_NAME); + errlCommit(err,MBOX_COMP_ID); free(msg->extra_data); msg_free(msg); @@ -818,7 +817,7 @@ void MailboxSp::handle_hbmbox_msg(mbox_msg_t & i_mbox_msg) * @reasoncode RC_INVALID_QUEUE * @userdata1 msg queue * @userdata2 msg type - * @defdesc Message from FSP. An invalid message queue ID + * @devdesc Message from FSP. An invalid message queue ID * or mesage type was sent to the FSP. */ errlHndl_t err = new ERRORLOG::ErrlEntry @@ -838,7 +837,7 @@ void MailboxSp::handle_hbmbox_msg(mbox_msg_t & i_mbox_msg) ffdc.addToLog(err); - err->collectTrace(HBMBOXMSG_TRACE_NAME); + err->collectTrace(MBOXMSG_TRACE_NAME); // If the msg was sync then we need to respond to the // orignal sender and clean up the respondq @@ -860,12 +859,12 @@ void MailboxSp::handle_hbmbox_msg(mbox_msg_t & i_mbox_msg) } else // nothing to respond to - just log the error { - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); } } else // async - nothing to respond to -just log the error { - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); } } else // unknown/un-architected message from fsp MBOX @@ -881,7 +880,7 @@ void MailboxSp::handle_hbmbox_msg(mbox_msg_t & i_mbox_msg) * @reasoncode MBOX::RC_INVALID_MESSAGE_TYPE * @userdata1 msg type * @userdata2 msg queue id - * @defdesc Message from FSP to HB MBOX of an unknown type + * @devdesc Message from FSP to HB MBOX of an unknown type */ errlHndl_t err = new ERRORLOG::ErrlEntry ( @@ -900,9 +899,9 @@ void MailboxSp::handle_hbmbox_msg(mbox_msg_t & i_mbox_msg) ffdc.addToLog(err); - err->collectTrace(HBMBOXMSG_TRACE_NAME); + err->collectTrace(MBOXMSG_TRACE_NAME); - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); } } @@ -988,7 +987,7 @@ errlHndl_t MailboxSp::send(queue_id_t i_q_id, msg_t * io_msg) * @reasoncode MBOX::RC_INVALID_QUEUE * @userdata1 returncode from msg_sendrecv() * - * @defdesc Invalid message or message queue + * @devdesc Invalid message or message queue * */ err = new ERRORLOG::ErrlEntry @@ -1001,7 +1000,7 @@ errlHndl_t MailboxSp::send(queue_id_t i_q_id, msg_t * io_msg) ); // This Trace has the msg - err->collectTrace(HBMBOXMSG_TRACE_NAME); + err->collectTrace(MBOXMSG_TRACE_NAME); } } else @@ -1012,7 +1011,7 @@ errlHndl_t MailboxSp::send(queue_id_t i_q_id, msg_t * io_msg) * @reasoncode MBOX::RC_MBOX_SERVICE_NOT_READY * @userdata1 The destination message queue id * - * @defdesc Host boot mailbox service is not available + * @devdesc Host boot mailbox service is not available * at this time. * */ @@ -1073,7 +1072,7 @@ errlHndl_t MailboxSp::msgq_register(queue_id_t i_queue_id, msg_q_t i_msgQ) * @userdata1 queue_id_t queueId * @userdata2 0 * - * @defdesc Message queue already registered with mailbox + * @devdesc Message queue already registered with mailbox * using a different queue. * */ @@ -1138,8 +1137,8 @@ errlHndl_t MailboxSp::handleInterrupt() ); if(err) { - err->collectTrace(HBMBOX_TRACE_NAME); - err->collectTrace(HBMBOXMSG_TRACE_NAME); + err->collectTrace(MBOX_TRACE_NAME); + err->collectTrace(MBOXMSG_TRACE_NAME); } else { @@ -1197,7 +1196,7 @@ errlHndl_t MailboxSp::handleInterrupt() * @moduleid MOD_MBOXSRV_HNDLR * @reasoncode RC_DATA_WRITE_ERR * @userdata1 Status from MB device driver - * @defdesc Mailbox Data Write attempted + * @devdesc Mailbox Data Write attempted * before ACK. * */ @@ -1210,8 +1209,8 @@ errlHndl_t MailboxSp::handleInterrupt() 0 ); - err->collectTrace(HBMBOX_TRACE_NAME); - err->collectTrace(HBMBOXMSG_TRACE_NAME); + err->collectTrace(MBOX_TRACE_NAME); + err->collectTrace(MBOXMSG_TRACE_NAME); // return err } @@ -1225,7 +1224,7 @@ errlHndl_t MailboxSp::handleInterrupt() * @moduleid MBOX::MOD_MBOXSRV_HNDLR * @reasoncode MBOX::RC_PARITY_ERR * @userdata1 Status from MB device driver - * @defdesc Mailbox Hardware detected + * @devdesc Mailbox Hardware detected * parity error. */ err = new ERRORLOG::ErrlEntry @@ -1237,8 +1236,8 @@ errlHndl_t MailboxSp::handleInterrupt() 0 ); - err->collectTrace(HBMBOX_TRACE_NAME); - errlCommit(err,HBMBOX_COMP_ID); + err->collectTrace(MBOX_TRACE_NAME); + errlCommit(err,MBOX_COMP_ID); } else if(mbox_status & MBOX_ILLEGAL_OP) { @@ -1250,7 +1249,7 @@ errlHndl_t MailboxSp::handleInterrupt() * @moduleid MBOX::MOD_MBOXSRV_HNDLR * @reasoncode MBOX::RC_ILLEGAL_OP * @userdata1 Status from MB device driver - * @defdesc Retry failed. Bad status + * @devdesc Retry failed. Bad status * indicated in PIB status reg. * */ @@ -1262,8 +1261,8 @@ errlHndl_t MailboxSp::handleInterrupt() mbox_status, // Status from DD 0 ); - err->collectTrace(HBMBOX_TRACE_NAME); - errlCommit(err,HBMBOX_COMP_ID); + err->collectTrace(MBOX_TRACE_NAME); + errlCommit(err,MBOX_COMP_ID); } //else if(mbox_status & MBOX_DATA_READ_ERR) @@ -1320,7 +1319,7 @@ void MailboxSp::handleUnclaimed() * @reasoncode MBOX::RC_INVALID_QUEUE * @userdata1 msg queue * @userdata2 msg type - * @defdesc Message from FSP. Message not claimed + * @devdesc Message from FSP. Message not claimed * by any Hostboot service. */ errlHndl_t err = new ERRORLOG::ErrlEntry @@ -1340,7 +1339,7 @@ void MailboxSp::handleUnclaimed() ffdc.addToLog(err); - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); } iv_pendingq.clear(); } @@ -1357,7 +1356,7 @@ void MailboxSp::handleShutdown() { // If this failed, the whole system is probably buggered up. - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); TRACFCOMP(g_trac_mbox, ERR_MRK"MBOXSP HALTED on critical error!"); crit_assert(0); @@ -1423,7 +1422,7 @@ errlHndl_t MBOX::msgq_register(queue_id_t i_queue_id, msg_q_t i_msgQ) * @userdata1 queue_id_t queueId * @userdata2 0 * - * @defdesc Mailbox service is not available now. + * @devdesc Mailbox service is not available now. * */ err = new ERRORLOG::ErrlEntry diff --git a/src/usr/mbox/plugins/MBOX_COMP_ID_Parse.C b/src/usr/mbox/plugins/MBOX_COMP_ID_Parse.C new file mode 100644 index 000000000..d0dc05bdd --- /dev/null +++ b/src/usr/mbox/plugins/MBOX_COMP_ID_Parse.C @@ -0,0 +1,27 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/mbox/plugins/HBMBOX_COMP_ID_Parse.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#include "errludparser.H" +#include "mboxUdParserFactory.H" + +ERRL_MAKE_UD_PARSER(MBOX::UserDetailsParserFactory, hbfw::MBOX_COMP_ID) + diff --git a/src/usr/mbox/plugins/makefile b/src/usr/mbox/plugins/makefile deleted file mode 100644 index 02560b76f..000000000 --- a/src/usr/mbox/plugins/makefile +++ /dev/null @@ -1,44 +0,0 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/mbox/plugins/makefile $ -# -# IBM CONFIDENTIAL -# -# COPYRIGHT International Business Machines Corp. 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 -.include "../plugins.mk" - -MY_PLUGIN = libB-1100 -MY_OBJS = mboxParse.o - -.if ( $(CONTEXT) == "x86.nfp" ) - -LIBRARIES = ${MY_PLUGIN}.a -EXPLIBS = ${MY_PLUGIN}.a -${MY_PLUGIN}.a_OFILES = ${MY_OBJS} - -.else - -BUILD_SHARED_OBJS = -SHARED_LIBRARIES EXPSHLIBS = ${MY_PLUGIN}.so -${MY_PLUGIN}.so_EXTRA_LIBS = libbase.so -${MY_PLUGIN}.so_SHLDFLAGS += ${SHLDFLAGS} -Wl,-soname,${.TARGET} -${MY_PLUGIN}.so_OFILES = ${MY_OBJS} - -.endif - -.include <${RULES_MK}> diff --git a/src/usr/mbox/plugins/mboxParse.C b/src/usr/mbox/plugins/mboxParse.C deleted file mode 100644 index d0654e671..000000000 --- a/src/usr/mbox/plugins/mboxParse.C +++ /dev/null @@ -1,28 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/mbox/plugins/mboxParse.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 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 - */ -#include <errl/errludparser.H> -#include <mbox/mboxUdParserFactory.H> - -ERRL_MAKE_UD_PARSER(MBOX::UserDetailsParserFactory, HBMBOX_COMP_ID) - diff --git a/src/usr/mbox/plugins/mboxUdParser.H b/src/usr/mbox/plugins/mboxUdParser.H new file mode 100644 index 000000000..38f10297d --- /dev/null +++ b/src/usr/mbox/plugins/mboxUdParser.H @@ -0,0 +1,103 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/mbox/plugins/mboxUdParser.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#if !defined(_MBOXUDPARSER) +#define _MBOXUDPARSER + +#include "errluserdetails.H" + +namespace MBOX +{ + /** + * Parses mbox message user detail in an error log + */ + class UserDetailsParserMboxMsg : public ERRORLOG::ErrlUserDetailsParser + { + public: + + /** + * Constructor + */ + UserDetailsParserMboxMsg() {} + + /** + * Destructor + */ + virtual ~UserDetailsParserMboxMsg() {} + + /** + * Parses a mbox msg in an error log. + * + * @param[in] i_version Version of the data + * @param[in] i_parse ErrlUsrParser object for the output info + * @param[in] i_pBuffer Pointer to the buffer containing detail data + * @param[in] i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + uint32_t * b32 = static_cast<uint32_t *>(i_pBuffer); + uint64_t * b64 = reinterpret_cast<uint64_t *>(b32 + 4); + + uint32_t msg_id = ntohl(*b32); + uint32_t msg_q_id = ntohl(*(b32+1)); + uint32_t msg_type = ntohl(*(b32+2)); + uint32_t msg_flag = ntohl(*(b32+3)); + uint64_t msg_dta0 = ntohll(*(b64)); + uint64_t msg_dta1 = ntohll(*(b64+1)); + uint64_t msg_extd = ntohll(*(b64+2)); + + i_parser.PrintNumber("MBOX message id","0x%08x",msg_id); + i_parser.PrintNumber("MBOX queue id","0x%08x",msg_q_id); + i_parser.PrintNumber("MBOX message type","0x%08x",msg_type); + if(msg_flag & 0x80000000) + { + i_parser.PrintString(NULL, "MBOX mesage is synchronous"); + } + else + { + i_parser.PrintString(NULL, "MBOX message is asynchronous"); + } + + i_parser.PrintNumber("MBOX data[0]","0x%016lx",msg_dta0); + i_parser.PrintNumber("MBOX data[1]","0x%016lx",msg_dta1); + i_parser.PrintNumber("MBOX Extra data pointer","0x%016lx",msg_extd); + + + if(msg_extd != 0 && i_buflen > 40) + { + i_parser.PrintString(NULL, "MBOX extra data:"); + + uint8_t * b08 = reinterpret_cast<uint8_t *>(b64 + 3); + size_t len = i_buflen - 40; + + i_parser.PrintHexDump(b08,len); + + } + } + }; +} + +#endif + diff --git a/src/usr/mbox/plugins/mboxUdParserFactory.H b/src/usr/mbox/plugins/mboxUdParserFactory.H new file mode 100644 index 000000000..a75d5c3c2 --- /dev/null +++ b/src/usr/mbox/plugins/mboxUdParserFactory.H @@ -0,0 +1,50 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/mbox/plugins/mboxUdParserFactory.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ +#if !defined(_MBOXUDPARSERFACTORY_H) +#define _MBOXUDPARSERFACTORY_H + +#include "errludparserfactory.H" +#include "mboxUdParser.H" + +namespace MBOX +{ + class UserDetailsParserFactory + : public ERRORLOG::ErrlUserDetailsParserFactory + { + public: + UserDetailsParserFactory() + { + registerParser<MBOX::UserDetailsParserMboxMsg> + (MBOX_UDT_MBOXMSG_DATA); + } + + private: + + UserDetailsParserFactory(const UserDetailsParserFactory &); + UserDetailsParserFactory & operator= + (const UserDetailsParserFactory &); + }; +}; + +#endif + diff --git a/src/usr/mbox/test/mboxsptest.H b/src/usr/mbox/test/mboxsptest.H index 322bddffe..d1315038b 100644 --- a/src/usr/mbox/test/mboxsptest.H +++ b/src/usr/mbox/test/mboxsptest.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/mbox/test/mboxsptest.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 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/usr/mbox/test/mboxsptest.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* 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 */ #ifndef __MBOXSPTEST_H #define __MBOXSPTEST_H @@ -97,7 +96,7 @@ class MboxSPTest : public CxxTest::TestSuite if(err) { TS_FAIL("MBOX::send returned an error log"); - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); } } @@ -112,7 +111,7 @@ class MboxSPTest : public CxxTest::TestSuite if(err) { TS_FAIL("MBOX: Could not register message queue"); - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); } @@ -124,7 +123,7 @@ class MboxSPTest : public CxxTest::TestSuite if(err) { TS_FAIL("MBOX::send returned an error log"); - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); } // now get the messages - they will look like async messages @@ -198,7 +197,7 @@ class MboxSPTest : public CxxTest::TestSuite if(mboxEnabled()) { TS_FAIL("MBOX::sendrecv returned an error log %p",err); - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); } } else @@ -262,7 +261,7 @@ class MboxSPTest : public CxxTest::TestSuite if(err) { TS_FAIL("MBOXTEST::testInvalidMsg. Unexpected error log from send()"); - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); } } @@ -279,7 +278,7 @@ class MboxSPTest : public CxxTest::TestSuite if(err) { TS_FAIL("MBOXTEST::testHardwareError. Unexpected error log from send()"); - errlCommit(err,HBMBOX_COMP_ID); + errlCommit(err,MBOX_COMP_ID); } msg = msg_allocate(); diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C index 974f91d3a..228771a11 100644 --- a/src/usr/pnor/pnorrp.C +++ b/src/usr/pnor/pnorrp.C @@ -105,8 +105,8 @@ void PnorRP::init( errlHndl_t &io_rtaskRetErrl ) { /*@ errorlog tag * @errortype ERRL_SEV_CRITICAL_SYS_TERM - * @moduleid MOD_PNORRP_DIDSTARTUPFAIL - * @reasoncode RC_BAD_STARTUP_RC + * @moduleid PNOR::MOD_PNORRP_DIDSTARTUPFAIL + * @reasoncode PNOR::RC_BAD_STARTUP_RC * @userdata1 return code * @userdata2 0 * diff --git a/src/usr/targeting/common/xmltohb/common.mk b/src/usr/targeting/common/xmltohb/common.mk index f33852729..2aca50020 100644 --- a/src/usr/targeting/common/xmltohb/common.mk +++ b/src/usr/targeting/common/xmltohb/common.mk @@ -35,11 +35,13 @@ XMLTOHB_HEADER_TARGETS = \ attributetraits.H \ attributestructs.H \ pnortargeting.H \ - fapiplatattrmacros.H + fapiplatattrmacros.H \ + errludattribute.H XMLTOHB_SOURCE_TARGETS = \ attributestrings.C \ - attributedump.C + attributedump.C \ + errludattribute.C XMLTOHB_SYSTEM_BINARIES = \ vbu_targeting.bin \ diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index 98392becc..b6e6e0fad 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -1,26 +1,26 @@ #!/usr/bin/perl -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/targeting/common/xmltohb/xmltohb.pl $ -# -# 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 +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/targeting/common/xmltohb/xmltohb.pl $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2011,2013 +# +# 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 # # Purpose: @@ -1507,6 +1507,7 @@ sub writeAttrErrlCFile { print $outFile "#include <stdio.h>\n"; print $outFile "#include <string.h>\n"; print $outFile "#include <errludattribute.H>\n"; + print $outFile "#include <errl/errlreasoncodes.H>\n"; print $outFile "#include <targeting/common/targetservice.H>\n"; print $outFile "#include <targeting/common/trace.H>\n"; print $outFile "\n"; @@ -1684,9 +1685,9 @@ sub writeAttrErrlCFile { print $outFile " : iv_pTarget(i_pTarget), iv_dataSize(0)\n"; print $outFile "{\n"; print $outFile " // Set up ErrlUserDetails instance variables\n"; - print $outFile " iv_CompId = HBERRL_COMP_ID;\n"; + print $outFile " iv_CompId = ERRL_COMP_ID;\n"; print $outFile " iv_Version = 1;\n"; - print $outFile " iv_SubSection = HBERRL_UDT_ATTRIBUTE;\n"; + print $outFile " iv_SubSection = ERRL_UDT_ATTRIBUTE;\n"; print $outFile " iv_merge = true;\n"; print $outFile "\n"; print $outFile " // first, write out the HUID\n"; @@ -1704,9 +1705,9 @@ sub writeAttrErrlCFile { print $outFile " : iv_pTarget(i_pTarget), iv_dataSize(0)\n"; print $outFile "{\n"; print $outFile " // Set up ErrlUserDetails instance variables\n"; - print $outFile " iv_CompId = HBERRL_COMP_ID;\n"; + print $outFile " iv_CompId = ERRL_COMP_ID;\n"; print $outFile " iv_Version = 1;\n"; - print $outFile " iv_SubSection = HBERRL_UDT_ATTRIBUTE;\n"; + print $outFile " iv_SubSection = ERRL_UDT_ATTRIBUTE;\n"; print $outFile " // override the default of false\n"; print $outFile " iv_merge = true;\n"; print $outFile "\n"; @@ -1759,10 +1760,10 @@ sub writeAttrErrlHFile { print $outFile "#ifndef ERRL_UDATTRIBUTE_H\n"; print $outFile "#define ERRL_UDATTRIBUTE_H\n"; print $outFile "\n"; - print $outFile "#include <errl/errluserdetails.H>\n"; - print $outFile "\n"; print $outFile "#ifndef PARSER\n"; print $outFile "\n"; + print $outFile "#include <errl/errluserdetails.H>\n"; + print $outFile "\n"; print $outFile "namespace TARGETING // Forward reference\n"; print $outFile "{ class Target; }\n"; print $outFile "\n"; @@ -1791,6 +1792,8 @@ sub writeAttrErrlHFile { print $outFile "}\n"; print $outFile "#else // if PARSER defined\n"; print $outFile "\n"; + print $outFile "#include \"errluserdetails.H\"\n"; + print $outFile "\n"; print $outFile "namespace ERRORLOG\n"; print $outFile "{\n"; print $outFile "class ErrlUserDetailsParserAttribute : public ErrlUserDetailsParser {\n"; diff --git a/src/usr/targeting/xmltohb/makefile b/src/usr/targeting/xmltohb/makefile index 2cc853475..bd6c29a45 100644 --- a/src/usr/targeting/xmltohb/makefile +++ b/src/usr/targeting/xmltohb/makefile @@ -5,7 +5,7 @@ # # IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2011,2012 +# COPYRIGHT International Business Machines Corp. 2011,2013 # # p1 # @@ -73,6 +73,8 @@ VMM_CONSTS_FILE = \ GENFILES = ${XMLTOHB_TARGETS} +GENFILES_PLUGINS = errludattribute.H + #debug : # @echo COMMON_TARGETING_PATH_PREFIX = ${COMMON_TARGETING_PATH_PREFIX} # @echo COMMON_TARGETING_REL_PATH = ${COMMON_TARGETING_REL_PATH} @@ -131,6 +133,7 @@ $(call GENTARGET,$(XMLTOHB_TARGETS)) : \ $(addprefix --fapi-attributes-xml-file=,${GENDIR}/${XMLTOHB_FAPI_XML}) \ --src-output-dir=$(dir $@) --img-output-dir=none \ --img-output-file=none + cp ${GENDIR}/errludattribute.H ${GENDIR_PLUGINS} # system-specific XML needs the generic plus the xxx.system.xml file + the # MRW file diff --git a/src/usr/trace/daemon/daemon.C b/src/usr/trace/daemon/daemon.C index cbed7b262..4e4e8df04 100644 --- a/src/usr/trace/daemon/daemon.C +++ b/src/usr/trace/daemon/daemon.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -86,7 +86,7 @@ namespace TRACEDAEMON iv_service->iv_daemon->iv_queue); if (l_errl) { - errlCommit(l_errl, HBTRACE_COMP_ID); + errlCommit(l_errl, TRACE_COMP_ID); } } @@ -455,7 +455,7 @@ namespace TRACEDAEMON errlHndl_t l_errl = MBOX::send(MBOX::FSP_TRACE_MSGQ, msg); if (l_errl) { - errlCommit(l_errl, HBTRACE_COMP_ID); + errlCommit(l_errl, TRACE_COMP_ID); free(i_buffer); msg_free(msg); } @@ -487,7 +487,7 @@ namespace TRACEDAEMON errlHndl_t l_errl = MBOX::send(MBOX::FSP_TRACE_MSGQ, msg); if (l_errl) { - errlCommit(l_errl, HBTRACE_COMP_ID); + errlCommit(l_errl, TRACE_COMP_ID); free(i_buffer); msg_free(msg); } @@ -765,7 +765,7 @@ namespace TRACEDAEMON if (l_errl) { - errlCommit(l_errl, HBTRACE_COMP_ID); + errlCommit(l_errl, TRACE_COMP_ID); } } @@ -781,7 +781,7 @@ namespace TRACEDAEMON if (l_errl) { - errlCommit(l_errl, HBTRACE_COMP_ID); + errlCommit(l_errl, TRACE_COMP_ID); } return value; diff --git a/src/usr/vfs/vfsrp.C b/src/usr/vfs/vfsrp.C index dd6f9617e..c08b10016 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,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -146,7 +146,7 @@ errlHndl_t VfsRp::_init() * @userdata1 returncode from mm_alloc_block() * @userdata2 0 * - * @defdesc Could not allocate virtual memory. + * @devdesc Could not allocate virtual memory. * */ err = new ERRORLOG::ErrlEntry @@ -320,7 +320,7 @@ void VfsRp::_load_unload(msg_t * i_msg) * @userdata1 returncode from mm_set_permission() * @userdata2 0 * - * @defdesc Could not set permissions on virtual memory. + * @devdesc Could not set permissions on virtual memory. * */ err = new ERRORLOG::ErrlEntry @@ -354,7 +354,7 @@ void VfsRp::_load_unload(msg_t * i_msg) * @userdata1 first 8 bytes of module name * @userdata2 next 8 bytes of module name * - * @defdesc Requested Module does not exist. + * @devdesc Requested Module does not exist. * */ err = new ERRORLOG::ErrlEntry @@ -520,7 +520,7 @@ errlHndl_t VFS::module_load_unload(const char * i_module, VfsMessages i_msgtype) * @userdata1 returncode from msg_sendrecv() * @userdata2 VfsMessages type [LOAD | UNLOAD] * - * @defdesc Could not load/unload module. + * @devdesc Could not load/unload module. * */ err = new ERRORLOG::ErrlEntry @@ -570,7 +570,7 @@ errlHndl_t VFS::module_address(const char * i_name, const char *& o_address, siz * @userdata1 0 * @userdata2 0 * - * @defdesc Module is not a data module + * @devdesc Module is not a data module * */ err = new ERRORLOG::ErrlEntry diff --git a/src/usr/xscom/test/xscomtest.H b/src/usr/xscom/test/xscomtest.H index c2fe80b0d..de111e65a 100644 --- a/src/usr/xscom/test/xscomtest.H +++ b/src/usr/xscom/test/xscomtest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -140,8 +140,8 @@ public: TS_FAIL("testXscom1: XSCom read back doesn't match write!"); /*@ * @errortype - * @moduleid XSCOM_TEST_XSCOM1 - * @reasoncode XSCOM_DATA_UNMATCHED + * @moduleid XSCOM::XSCOM_TEST_XSCOM1 + * @reasoncode XSCOM::XSCOM_DATA_UNMATCHED * @userdata1 Write value * @userdata2 Read back value * @devdesc Read back value doesn't match write @@ -267,8 +267,8 @@ public: TS_FAIL("testXscom2: XSCom read back doesn't match write!"); /*@ * @errortype - * @moduleid XSCOM_TEST_XSCOM2 - * @reasoncode XSCOM_DATA_UNMATCHED + * @moduleid XSCOM::XSCOM_TEST_XSCOM2 + * @reasoncode XSCOM::XSCOM_DATA_UNMATCHED * @userdata1 Write value * @userdata2 Read back value * @devdesc Read back value doesn't match write |