diff options
author | Mike Jones <mjjones@us.ibm.com> | 2013-01-22 09:41:25 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-02-08 16:49:45 -0600 |
commit | caf328ccd931de4ce4e4d285d1a4e5ddd151abb5 (patch) | |
tree | 650c28362fef4b7fd3d8e727d2b13e25f119434b /src/include | |
parent | 7c50ac8fa046052334326fd4f3c8447cb0c9514d (diff) | |
download | talos-hostboot-caf328ccd931de4ce4e4d285d1a4e5ddd151abb5.tar.gz talos-hostboot-caf328ccd931de4ce4e4d285d1a4e5ddd151abb5.zip |
ERRL: Create Hostboot error log SRC/UD parser and deliver to FSP bld
A new script called genErrlParsers will scan the Hostboot code for
error log tags and create a SRC parser for each component. The
script will also scan the Hostboot code for plugin directories
containing User Detail Data parsers and will create a makefile
that is used by the FSP to build each component's SRC/UD parser.
Change-Id: I7113f6cd8069447a1caaa199aff199b663d59072
RTC: 47518
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2975
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
28 files changed, 350 insertions, 2190 deletions
diff --git a/src/include/usr/diag/mdia/mdiareasoncodes.H b/src/include/usr/diag/mdia/mdiareasoncodes.H index bdfab0a1c..a9b523977 100644 --- a/src/include/usr/diag/mdia/mdiareasoncodes.H +++ b/src/include/usr/diag/mdia/mdiareasoncodes.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -55,8 +55,8 @@ enum ModuleId */ enum ReasonCode { - INVALID_REASONCODE = HBMDIA_COMP_ID | 0x00, // Invalid Reasoncode - MAINT_COMMAND_TIMED_OUT = HBMDIA_COMP_ID | 0x01, + INVALID_REASONCODE = MDIA_COMP_ID | 0x00, // Invalid Reasoncode + MAINT_COMMAND_TIMED_OUT = MDIA_COMP_ID | 0x01, }; } diff --git a/src/include/usr/diag/prdf/common/prdf_service_codes.H b/src/include/usr/diag/prdf/common/prdf_service_codes.H index aca34a49a..ca7da483d 100755 --- a/src/include/usr/diag/prdf/common/prdf_service_codes.H +++ b/src/include/usr/diag/prdf/common/prdf_service_codes.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2003,2012 */ +/* COPYRIGHT International Business Machines Corp. 2003,2013 */ /* */ /* p1 */ /* */ @@ -33,10 +33,6 @@ #include <hbotcompid.H> -// FIXME: Will need to make a change in hbotcompid.H later -#define PRDF_COMP_ID HBPRDF_COMP_ID -#define PRDF_COMP_NAME HBPRDF_COMP_NAME - #else #include <fips_comp_id.H> @@ -51,7 +47,7 @@ namespace PRDF * Each module Id corresponds to a particular * method in a class or an individual function. */ -enum ModId +enum ModuleId { PRDF_MAIN = 0x01, PRDF_HOM_HOM_TYPE = 0x02, // FIXME: May be deprecated @@ -81,7 +77,7 @@ enum ModId /** * @brief Enum specifying Reason Codes (Refcodes), range 0xE501 to 0xE5FF */ -enum +enum ReasonCode { PRDF_FIRST_REASONCODE = PRDF_COMP_ID | 0x01, diff --git a/src/include/usr/errl/errlreasoncodes.H b/src/include/usr/errl/errlreasoncodes.H index bf10908b6..04f4c3d19 100644 --- a/src/include/usr/errl/errlreasoncodes.H +++ b/src/include/usr/errl/errlreasoncodes.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/errl/errlreasoncodes.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2011-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/errl/errlreasoncodes.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_REASON_CODES_H #define __ERRL_REASON_CODES_H @@ -34,27 +33,38 @@ #include <hbotcompid.H> // Module IDs for ERRL component -enum +enum errlModuleId { - HBERRL_FIRST_MODULE_ID = 0x00, - HBERRL_USERDATA_TEST_MOD_ID = 1, - HBERRL_TEST_MOD_ID = 2, + ERRL_FIRST_MODULE_ID = 0x00, + ERRL_USERDATA_TEST_MOD_ID = 0x01, + ERRL_TEST_MOD_ID = 0x02, //........ - HBERRL_LAST_MODULE_ID = 0xFF + ERRL_LAST_MODULE_ID = 0xFF }; // Reason codes for ERRL component enum errlReasonCode { - HBERRL_FIRST_ERR = HBERRL_COMP_ID | 0x01, - HBERRL_TEST_STRING_UD = HBERRL_COMP_ID | 0x02, - HBERRL_TEST_REASON_CODE = HBERRL_COMP_ID | 0x03, - HBERRL_TEST_ATTRIBUTE_UD = HBERRL_COMP_ID | 0x04, - HBERRL_TEST_LOGREGISTER_UD = HBERRL_COMP_ID | 0x05, - HBERRL_TEST_CALLOUT_UD = HBERRL_COMP_ID | 0x06, + ERRL_FIRST_ERR = ERRL_COMP_ID | 0x01, + ERRL_TEST_STRING_UD = ERRL_COMP_ID | 0x02, + ERRL_TEST_REASON_CODE = ERRL_COMP_ID | 0x03, + ERRL_TEST_ATTRIBUTE_UD = ERRL_COMP_ID | 0x04, + ERRL_TEST_LOGREGISTER_UD = ERRL_COMP_ID | 0x05, + ERRL_TEST_CALLOUT_UD = ERRL_COMP_ID | 0x06, //........ - HBERRL_LAST_ERR = HBERRL_COMP_ID | 0xFF + ERRL_LAST_ERR = ERRL_COMP_ID | 0xFF }; +// Identifiers for ERRL user data sections. +enum errlUserDetailDataSubsection +{ + ERRL_UDT_NOFORMAT = 0x00, + ERRL_UDT_STRING = 0x01, + ERRL_UDT_TARGET = 0x02, + ERRL_UDT_BACKTRACE = 0x03, + ERRL_UDT_ATTRIBUTE = 0x04, + ERRL_UDT_LOGREGISTER = 0x05, + ERRL_UDT_CALLOUT = 0x06, +}; #endif diff --git a/src/include/usr/errl/errludbacktrace.H b/src/include/usr/errl/errludbacktrace.H index 193064e36..9d8e8aecf 100644 --- a/src/include/usr/errl/errludbacktrace.H +++ b/src/include/usr/errl/errludbacktrace.H @@ -1,37 +1,33 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errludbacktrace.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 +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/errl/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 following classes: - * - * ErrlUserDetailsBackTrace: Adds backtrace FFDC to an error log as user detail - * data - * ErrlUserDetailsParserBackTrace: Parses backtrace FFDC user detail in an - * error log + * Defines the ErrlUserDetailsBackTrace class that adds backtrace FFDC to an + * error log as user detail data */ #include <errl/errluserdetails.H> @@ -39,13 +35,11 @@ namespace ERRORLOG { -#ifndef PARSER - /** * @class ErrlUserDetailsBackTrace * * Adds backtrace FFDC to an error log as user detail data -*/ + */ class ErrlUserDetailsBackTrace : public ErrlUserDetails { public: @@ -67,117 +61,6 @@ private: ErrlUserDetailsBackTrace & operator=(const ErrlUserDetailsBackTrace &); }; -#else // (if PARSER defined) - -/** - * @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 - } #endif diff --git a/src/include/usr/errl/errludcallout.H b/src/include/usr/errl/errludcallout.H index ce0fb6cec..9357baa3f 100644 --- a/src/include/usr/errl/errludcallout.H +++ b/src/include/usr/errl/errludcallout.H @@ -1,43 +1,37 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/errl/errludcallout.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/include/usr/errl/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 following classes: - * - * ErrlUserDetailsCallout: Adds register FFDC to an error log as - * user detail data - * ErrlUserDetailsParserCallout: Parses register FFDC user detail in - * an error log -*/ + * Defines the ErrlUserDetailsCallout class that adds a hardware callout to an + * error log as user detail data + */ #include <errl/errluserdetails.H> - -#ifndef PARSER +#include <hwas/common/hwasCallout.H> // Forward reference namespace TARGETING @@ -45,8 +39,6 @@ namespace TARGETING class Target; } -#include <hwas/common/hwasCallout.H> - namespace ERRORLOG { @@ -104,56 +96,5 @@ private: } -#else // (if PARSER defined) - -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 - #endif diff --git a/src/include/usr/errl/errludlogregister.H b/src/include/usr/errl/errludlogregister.H index b590fc3b0..060f017d5 100644 --- a/src/include/usr/errl/errludlogregister.H +++ b/src/include/usr/errl/errludlogregister.H @@ -1,44 +1,38 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/errl/errludlogregister.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/include/usr/errl/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 following classes: - * - * ErrlUserDetailsLogRegister: Adds register FFDC to an error log as - * user detail data - * ErrlUserDetailsParserLogRegister: Parses register FFDC user detail in - * an error log -*/ + * Defines the ErrlUserDetailsLogRegister class that adds register FFDC to an + * error log as user detail data + */ #include <errl/errluserdetails.H> #include <stdarg.h> - -#ifndef PARSER +#include <devicefw/userif.H> // Forward reference namespace TARGETING @@ -46,8 +40,6 @@ namespace TARGETING class Target; } -#include <devicefw/userif.H> - namespace ERRORLOG { @@ -271,56 +263,5 @@ private: } -#else // (if PARSER defined) - -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 - #endif diff --git a/src/include/usr/errl/errludparser.H b/src/include/usr/errl/errludparser.H deleted file mode 100755 index e80a3d9c8..000000000 --- a/src/include/usr/errl/errludparser.H +++ /dev/null @@ -1,91 +0,0 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errludparser.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 -#ifndef ERRL_UDPARSER_H -#define ERRL_UDPARSER_H - -#ifdef PARSER - -/** - * @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> - -/** - * @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 -#endif - diff --git a/src/include/usr/errl/errludparserfactory.H b/src/include/usr/errl/errludparserfactory.H deleted file mode 100755 index ea39297cc..000000000 --- a/src/include/usr/errl/errludparserfactory.H +++ /dev/null @@ -1,134 +0,0 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errludparserfactory.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 -#ifndef ERRL_UDPARSERFACTORY_H -#define ERRL_UDPARSERFACTORY_H - -#ifdef PARSER - -/** - * @file errludparserfactory.H - * - * Defines the ErrlUserDetailsParserFactory base class - */ -#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. - * - * This class is only compiled when PARSER is defined - */ -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 -#endif - diff --git a/src/include/usr/errl/errludparserfactoryerrl.H b/src/include/usr/errl/errludparserfactoryerrl.H deleted file mode 100644 index c3607fa9a..000000000 --- a/src/include/usr/errl/errludparserfactoryerrl.H +++ /dev/null @@ -1,80 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/errl/errludparserfactoryerrl.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 - */ -#ifndef ERRL_UDPARSERFACTORYERRL_H -#define ERRL_UDPARSERFACTORYERRL_H - -#ifdef PARSER - -/** - * @file errludparserfactoryerrl.H - * - * Defines the errlUserDetailsParserFactoryErrl.H class -*/ -#include <errl/errludstring.H> -#include <errl/errludtarget.H> -#include <errl/errludbacktrace.H> -#include <errludattribute.H> -#include <errl/errludlogregister.H> -#include <errl/errludcallout.H> -#include <errl/errludparserfactory.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>(HBERRL_UDT_STRING); - registerParser<ErrlUserDetailsParserTarget>(HBERRL_UDT_TARGET); - registerParser<ErrlUserDetailsParserBackTrace>(HBERRL_UDT_BACKTRACE); - registerParser<ErrlUserDetailsParserAttribute>(HBERRL_UDT_ATTRIBUTE); - registerParser<ErrlUserDetailsParserLogRegister>(HBERRL_UDT_LOGREGISTER); - registerParser<ErrlUserDetailsParserCallout>(HBERRL_UDT_CALLOUT); - } - -private: - - // Disabled - ErrlUserDetailsParserFactoryErrl(const ErrlUserDetailsParserFactoryErrl &); - ErrlUserDetailsParserFactoryErrl & operator=( - const ErrlUserDetailsParserFactoryErrl &); -}; - -} - -#endif -#endif - diff --git a/src/include/usr/errl/errludstring.H b/src/include/usr/errl/errludstring.H index 795075677..de91af03f 100644 --- a/src/include/usr/errl/errludstring.H +++ b/src/include/usr/errl/errludstring.H @@ -1,44 +1,40 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errludstring.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 +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/errl/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 following classes: - * - * ErrlUserDetailsString: Adds string FFDC to an error log as user detail data - * ErrlUserDetailsParserString: Parses string FFDC user detail in an error log -*/ + * Defines the ErrlUserDetailsString class that adds string FFDC to an + * error log as user detail data + */ #include <errl/errluserdetails.H> namespace ERRORLOG { -#ifndef PARSER - /** * @class ErrlUserDetailsString * @@ -67,58 +63,6 @@ private: ErrlUserDetailsString & operator=(const ErrlUserDetailsString &); }; -#else // (if PARSER defined) - -#include <string.h> -/** - * @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 - { - char *outputString= static_cast<char *>(i_pBuffer); - for (uint32_t i = 0; i < i_buflen; ) - { - i_parser.PrintString("String data", outputString); - i += strlen(outputString) + 1; - outputString += strlen(outputString) + 1; - } - } - -private: - // Disabled - ErrlUserDetailsParserString(const ErrlUserDetailsParserString &); - ErrlUserDetailsParserString & operator=( - const ErrlUserDetailsParserString &); -}; - -#endif - } #endif diff --git a/src/include/usr/errl/errludtarget.H b/src/include/usr/errl/errludtarget.H index 3db4b89cb..67ba891c3 100644 --- a/src/include/usr/errl/errludtarget.H +++ b/src/include/usr/errl/errludtarget.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -26,16 +26,12 @@ /** * @file errludTarget.H * - * Defines the following classes: - * - * ErrlUserDetailsTarget: Adds Target FFDC to an error log as user detail data - * ErrlUserDetailsParserTarget: Parses Target FFDC user detail in an error log + * Defines the ErrlUserDetailsTarget class that adds target FFDC to an + * error log as user detail data */ #include <errl/errluserdetails.H> -#ifndef PARSER - // Forward reference namespace TARGETING { @@ -75,219 +71,5 @@ private: } -#else // (if PARSER defined) - -#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++; - } - - 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 - } - } // parse() - -private: - // Disabled - ErrlUserDetailsParserTarget(const ErrlUserDetailsParserTarget &); - ErrlUserDetailsParserTarget & operator=( - const ErrlUserDetailsParserTarget &); -}; - -} - -#endif #endif diff --git a/src/include/usr/errl/errluserdetails.H b/src/include/usr/errl/errluserdetails.H index 5ffda115b..3ff68c1b0 100755 --- a/src/include/usr/errl/errluserdetails.H +++ b/src/include/usr/errl/errluserdetails.H @@ -1,41 +1,38 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errluserdetails.H $ -// -// 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/include/usr/errl/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 ErrlUserDetails and ErrlUserDetailsParser base classes + * Defines the ErrlUserDetails base classes * - * Derive a class from ErrlUserDetails to create user detail data - * Derive a class from ErrlUserDetailsParser to parse user detail data + * Derive a class from ErrlUserDetails to create user detail data. For each + * class, in the component's plugins directory, derive a class from + * ErrlUserDetailsParser to parse user detail data */ #include <stdint.h> -#include <errl/hberrltypes.H> // errlver_t, errlsubsec_t - -#ifndef PARSER - #include <errl/errlentry.H> namespace ERRORLOG @@ -46,8 +43,6 @@ namespace ERRORLOG * * This class creates user detail data. If a component creates user detail data * then for each different type of data it should derive a class from this. - * - * This class is only compiled when PARSER is not defined. */ class ErrlUserDetails { @@ -136,78 +131,5 @@ private: } -#else // (if PARSER defined) - -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. - * - * This is only compiled when PARSER is defined. - * -*/ -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 #endif diff --git a/src/include/usr/errl/hberrltypes.H b/src/include/usr/errl/hberrltypes.H index 418a80b21..90e40ad33 100644 --- a/src/include/usr/errl/hberrltypes.H +++ b/src/include/usr/errl/hberrltypes.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -42,20 +42,6 @@ */ namespace ERRORLOG { class ErrlEntry; }; -// Identifiers for Hostboot ERRL user-defined data sections. -// Range: 0 .. 255 -enum errlUserDataType_t -{ - HBERRL_UDT_NOFORMAT = 0, - HBERRL_UDT_STRING = 1, - HBERRL_UDT_TARGET = 2, - HBERRL_UDT_BACKTRACE = 3, - HBERRL_UDT_ATTRIBUTE = 4, - HBERRL_UDT_LOGREGISTER = 5, - HBERRL_UDT_CALLOUT = 6, -}; - - /** * @brief Macros to store different numbers into uint64_t */ diff --git a/src/include/usr/errl/parser/errlparserbase.H b/src/include/usr/errl/parser/errlparserbase.H deleted file mode 100755 index b5074f2d5..000000000 --- a/src/include/usr/errl/parser/errlparserbase.H +++ /dev/null @@ -1,245 +0,0 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/parser/errlparserbase.H $ -// -// 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 -#ifndef ERRL_ERRLPARSERBASE_H -#define ERRL_ERRLPARSERBASE_H - -/** - * @file errlparserbase.H - * - * @brief Base class for parser routines - * - * pulled from fips740/ .. /src/errl/fsp/errlparser.H - * - * @note - * There are many more routines in fips code to print out specialty - * fields and such, these are not used presently and IMHO should be in - * their own file. - * Leave out for now. - * - */ - - -/*****************************************************************************/ -// I n c l u d e s -/*****************************************************************************/ -#include <stdint.h> -#include <stdlib.h> -#include <stdio.h> -#include <netinet/in.h> // network byte-swapping routines. -// Unavoidable include for va_list -#include <cstdarg> - -#include <errl/hberrltypes.H> - -/*****************************************************************************/ -// Typedefs -/*****************************************************************************/ -/** - * @struct BCD_time8_t - * - * pulled from fips740/ .. /src/rtim/fsp/rtim.H - */ -struct BCD_time8_t -{ - uint16_t year; - uint8_t month; - uint8_t day; - uint8_t hours; - uint8_t minutes; - uint8_t seconds; - uint8_t hundredths; -} __attribute__ ((packed)); - - - -/*****************************************************************************/ -// User Types -/*****************************************************************************/ -class ErrlParser -{ -public: - - - /** - * @brief Build an associated parser object - * - * Builds an associated parser object which is tied to the - * given stream. The net effect is the addition of some - * simple methods to standardize log output - * - * @param i_output - * Stream to be used for output, defaults to stdout - * - */ - ErrlParser( - FILE * i_output = stdout - ); - - - /** - * @brief Cleanup handler - * - * Currently no-op - * - */ - virtual ~ErrlParser(); - - - /** - * @brief Set Stream pointer - * - * Changes the output stream pointer which ultimately - * determines what OS device receives the data - * - * @param i_val - * Output stream - * - * @note The stream handle is not owned by this object - * and will therefore not be released automatically - * - */ - void setStream( FILE * i_val ) - { - iv_Stream = i_val; - } - - - /** - * @brief Display a standard parser message - * - * Displays the a message in the error log parser - * format of "Label: Desc" - * - * @param i_label - * Label for the message - * - * @param i_string - * Description string - * - */ - virtual void PrintString( - const char * i_label, - const char * i_string - ) = 0; - - - /** - * @brief Output a standard message for numeric data - * - * A message consisting of the label and a hex formatted - * number is forwarded to the PrintString interface - * - * @param i_label - * Left-hand label for the data - * - * @param i_fmt - * Numeric format used to parse the data value - * - * @param i_value - * Numberic value - * - * @note Current implementation templates the output - * to PrintString after generating a string - * of the proper type. - */ - virtual void PrintNumber( - const char * i_label, - const char * i_fmt, - uint32_t i_value - ); - - - /** - * @brief Classical Hex dump of data - * - * A 5 column output consisting of an offset, 4 hex words, - * and an ascii equivalent will be dumped in big endian - * mode - * - * @param i_data - * Pointer to data buffer - * - * @param i_len - * Length of data in bytes - * - */ - virtual void PrintHexDump( - const void * i_data, - uint32_t i_len - ) = 0; - - -protected: - /** - * @brief Load a message string. - * - * FSP allows this to reference a message file. This is pulled out - * here, perhaps can be added later if needed. - * - * @param i_MsgId - * Message Identifier ( see errllang.H ) - * - * @return Constant pointer to the message string - * - * @note The message is static and should not be modified by - * the caller. - * - */ - const char * LoadMsg( const char * i_MsgId ) const - { - return i_MsgId; - } - - - /** - * @brief endian switch a uint64 - * - * @param[in] i_value - * uint64_t value to be byteswapped - * - * @return byte-swapped uint64_t value - * - */ - uint64_t ntohll( uint64_t i ) const - { - 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; - } - - - // Data - FILE * iv_Stream; ///< Associated stream - - -}; - - - - -#endif //ERRLPARSER_H diff --git a/src/include/usr/errl/parser/errlusrparser.H b/src/include/usr/errl/parser/errlusrparser.H deleted file mode 100755 index 7594321bc..000000000 --- a/src/include/usr/errl/parser/errlusrparser.H +++ /dev/null @@ -1,105 +0,0 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/parser/errlusrparser.H $ -// -// 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 -#ifndef PARSER_ERRLUSRPARSER_H -#define PARSER_ERRLUSRPARSER_H - -/** - * @file errlusrparser.H - * - * @brief Console interface implementation for error log parser - * - * Concrete implementation of the parser interface specialization for - * the console. - * -*/ - - -/*****************************************************************************/ -// I n c l u d e s -/*****************************************************************************/ -#include <stdint.h> -#include <stdlib.h> -#include <stdio.h> - - -#include <errl/parser/errlparserbase.H> - -/*****************************************************************************/ -// User Types -/*****************************************************************************/ -class ErrlUsrParser : public ErrlParser -{ -public: - - - /** - * @brief Build an associated parser object - * - * Builds an associated parser object which is tied to the - * given stream. The net effect is the addition of some - * simple methods to standardize log output - * - * @param i_output - * Stream to be used for output - * - * @param i_parent - * A pointer to the parent object - * - * @note The parent could be null - * - */ - ErrlUsrParser( - FILE * i_output = stdout - ) - : ErrlParser( i_output ) - { - } - - - // String - void PrintString( - const char * i_label, - const char * i_string - ); - - - // Print a Number - void PrintNumber( - const char * i_label, - const char * i_fmt, - uint32_t i_value - ); - - - // Hex Dump - void PrintHexDump( - const void * i_data, - uint32_t i_len - ); - - -}; - - - -#endif //ERRLUSRPARSER_H diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H index ea2d20224..e9ee15166 100644 --- a/src/include/usr/hbotcompid.H +++ b/src/include/usr/hbotcompid.H @@ -52,12 +52,12 @@ const compId_t MY_COMP_ID = 0x0000; const char MY_COMP_NAME[] = "myname"; //@} -/** @name HBERRL +/** @name ERRL * Error Logging component. */ //@{ -const compId_t HBERRL_COMP_ID = 0x0100; -const char HBERRL_COMP_NAME[] = "hberrl"; +const compId_t ERRL_COMP_ID = 0x0100; +const char ERRL_COMP_NAME[] = "errl"; //@} /** @name DEVFW @@ -172,12 +172,12 @@ const char INTR_COMP_NAME[] = "intr"; // 0x1000 - open to reclaim -/** @name HBMBOX +/** @name MBOX * MBOX component */ //@{ -const compId_t HBMBOX_COMP_ID = 0x1100; -const char HBMBOX_COMP_NAME[] = "mbox"; +const compId_t MBOX_COMP_ID = 0x1100; +const char MBOX_COMP_NAME[] = "mbox"; //@} // 0x1200 - open to reclaim @@ -186,24 +186,24 @@ const char HBMBOX_COMP_NAME[] = "mbox"; * PRDF component */ //@{ -const compId_t HBPRDF_COMP_ID = 0x1300; //FIXME working with ERRL owner to resolve errl parsing issue -const char HBPRDF_COMP_NAME[] = "prdf"; //FIXME +const compId_t PRDF_COMP_ID = 0x1300; +const char PRDF_COMP_NAME[] = "prdf"; //@} /** @name MDIA * MDIA memory diagnostics component */ //@{ -const compId_t HBMDIA_COMP_ID = 0x1400; -const char HBMDIA_COMP_NAME[] = "mdia"; +const compId_t MDIA_COMP_ID = 0x1400; +const char MDIA_COMP_NAME[] = "mdia"; //@} /** @name TRACE * Trace component */ //@{ -const compId_t HBTRACE_COMP_ID = 0x1500; -const char HBTRACE_COMP_NAME[] = "trace"; +const compId_t TRACE_COMP_ID = 0x1500; +const char TRACE_COMP_NAME[] = "trace"; //@} /** @name UTIL @@ -221,12 +221,12 @@ const char UTIL_COMP_NAME[] = "util"; const compId_t ISTEP_COMP_ID = 0x1700; const char ISTEP_COMP_NAME[] = "istep"; -/** @name HBATTN - * HBATTN attention service component +/** @name ATTN + * ATTN attention service component */ //@{ -const compId_t HBATTN_COMP_ID = 0x1800; -const char HBATTN_COMP_NAME[] = "attn"; +const compId_t ATTN_COMP_ID = 0x1800; +const char ATTN_COMP_NAME[] = "attn"; //@} /** @name SCAN diff --git a/src/include/usr/hwpf/hwp/hwpistepud.H b/src/include/usr/hwpf/hwp/hwpistepud.H index ab0d486c4..bc295c0ff 100644 --- a/src/include/usr/hwpf/hwp/hwpistepud.H +++ b/src/include/usr/hwpf/hwp/hwpistepud.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -26,22 +26,17 @@ /** * @file initsvcudistep.H * - * Defines the following classes: - * - * IStepUserDetailsIstep: Adds IStep FFDC to an error log as user detail data - * IStepUserDetailsParserIstep: Parses IStep FFDC user detail in an error log + * Defines the HwpUserDetailsIstep class that adds IStep FFDC to an + * error log as user detail data */ #include <errl/errluserdetails.H> -// user data type for istep error details -static const uint32_t HWP_UDT_STEP_ERROR_DETAILS = 0x01; - namespace ISTEP_ERROR { /** - * @struct IStepUserDetailsIstepData + * @struct HwpUserDetailsIstepErrorData * * Defines the user detail data */ @@ -51,10 +46,8 @@ namespace ISTEP_ERROR uint32_t reasoncode; }; -#ifndef PARSER - /** - * @class IStepUserDetailsIstep + * @class HwpUserDetailsIstep * * Adds IStep FFDC to an error log as user detail data */ @@ -83,61 +76,7 @@ namespace ISTEP_ERROR HwpUserDetailsIstep(const HwpUserDetailsIstep &); HwpUserDetailsIstep & operator=(const HwpUserDetailsIstep &); }; - -#else // (if PARSER defined) - - /** - * @class IStepUserDetailsParserIstep - * - * 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 - } #endif - diff --git a/src/include/usr/hwpf/hwp/hwpistepudparserfactory.H b/src/include/usr/hwpf/hwp/hwpistepudparserfactory.H deleted file mode 100644 index be89a89f6..000000000 --- a/src/include/usr/hwpf/hwp/hwpistepudparserfactory.H +++ /dev/null @@ -1,68 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/hwpistepudparserfactory.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 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 __ISTEP_UDPARSERFACTORY_H -#define __ISTEP_UDPARSERFACTORY_H - -#ifdef PARSER - -/** - * @file initsvcudparserfactory.H - * - * Defines the IStepUserDetailsParserFactory.H class -*/ -#include <hwpf/istepvcreasoncodes.H> -#include <errl/errludparserfactory.H> - -namespace INITSERVICE -{ - -/** - * @class IStepUserDetailsParserFactory - * - * This factory produces ErrlUserDetailsParser objects to parse the specified - * InitService user detail data. -*/ -class IStepUserDetailsParserFactory : public ERRORLOG::ErrlUserDetailsParserFactory -{ -public: - - /** - * @brief Constructor - */ - IStepUserDetailsParserFactory() - { - registerParser<IStepUserDetailsParserIstep>( ISTEP_UDT_PLID ); - } - -private: - - // Disabled - IStepUserDetailsParserFactory(const IStepUserDetailsParserFactory &); - IStepUserDetailsParserFactory & operator=( - const IStepUserDetailsParserFactory &); -}; - -} - -#endif -#endif diff --git a/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H b/src/include/usr/hwpf/hwpf_reasoncodes.H index 9f59f79cc..0d7fe9c17 100644 --- a/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H +++ b/src/include/usr/hwpf/hwpf_reasoncodes.H @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/include/usr/hwpf/plat/fapiPlatReasonCodes.H $ */ +/* $Source: src/include/usr/hwpf/hwpf_reasoncodes.H $ */ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2013 */ /* */ /* p1 */ /* */ @@ -20,15 +20,15 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -#ifndef FAPIPLATREASONCODES_H_ -#define FAPIPLATREASONCODES_H_ +#ifndef HWPFREASONCODES_H_ +#define HWPFREASONCODES_H_ #include <hbotcompid.H> namespace fapi { /** - * @brief Defines the HWPF::PLAT error log module IDs + * @brief Defines the HWPF error log module IDs */ enum hwpfModuleId { @@ -83,7 +83,7 @@ namespace fapi }; /** - * @brief Defines the HWPF::PLAT error log reason codes + * @brief Defines the HWPF error log reason codes */ enum hwpfReasonCode { @@ -121,13 +121,13 @@ namespace fapi }; /** - * @brief Defines the HWPF::PLAT (Hostboot) error log user detail data - * sections + * @brief Defines the HWPF error log user detail data sections */ enum hwpfUserDetailDataSubSection { - HWPF_UDT_HWP_RCVALUE = 1, - HWPF_UDT_HWP_FFDC = 2, + HWPF_UDT_HWP_RCVALUE = 0x01, + HWPF_UDT_HWP_FFDC = 0x02, + HWPF_UDT_STEP_ERROR_DETAILS = 0x03, }; }; diff --git a/src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H b/src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H deleted file mode 100644 index c67816a77..000000000 --- a/src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H +++ /dev/null @@ -1,70 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/plat/fapiPlatUdParserFactory.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 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 FAPIPLATUDPARSERFACTORY_H -#define FAPIPLATUDPARSERFACTORY_H - -#ifdef PARSER - -/** - * @file fapiPlatHwpUdDecode.H - * - * Defines the PlatUserDetailsParserFactory class - */ -#include <hwpf/plat/fapiPlatUdParserHwp.H> -#include <hwpf/plat/fapiPlatReasonCodes.H> -#include <errl/errludparserfactory.H> - -namespace fapi -{ - -/** - * @class PlatUserDetailsParserFactory - * - * This factory produces ErrlUserDetailsParser objects to parse the specified - * PLAT user detail data. -*/ -class PlatUserDetailsParserFactory : public ERRORLOG::ErrlUserDetailsParserFactory -{ -public: - - /** - * @brief Constructor - */ - PlatUserDetailsParserFactory() - { - registerParser<PlatUserDetailsParserHwpRcValue>(HWPF_UDT_HWP_RCVALUE); - registerParser<PlatUserDetailsParserHwpFfdc>(HWPF_UDT_HWP_FFDC); - } - -private: - // Disabled - PlatUserDetailsParserFactory(const PlatUserDetailsParserFactory &); - PlatUserDetailsParserFactory & operator=( - const PlatUserDetailsParserFactory &); -}; - -} - -#endif -#endif - diff --git a/src/include/usr/hwpf/plat/fapiPlatUdParserHwp.H b/src/include/usr/hwpf/plat/fapiPlatUdParserHwp.H deleted file mode 100644 index 420742b1f..000000000 --- a/src/include/usr/hwpf/plat/fapiPlatUdParserHwp.H +++ /dev/null @@ -1,132 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/plat/fapiPlatUdParserHwp.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 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 - -#ifdef PARSER - -/** - * @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 <errl/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 -#endif - diff --git a/src/include/usr/initservice/initsvcudistep.H b/src/include/usr/initservice/initsvcudistep.H index 9dc8f2106..7918bc701 100644 --- a/src/include/usr/initservice/initsvcudistep.H +++ b/src/include/usr/initservice/initsvcudistep.H @@ -1,36 +1,34 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/initservice/initsvcudistep.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 +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/initservice/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 following classes: - * - * InitSvcUserDetailsIstep: Adds IStep FFDC to an error log as user detail data - * InitSvcUserDetailsParserIstep: Parses IStep FFDC user detail in an error log -*/ + * Defines the InitSvcUserDetailsIstep class that adds IStep FFDC to an + * error log as user detail data + */ #include <errl/errluserdetails.H> @@ -49,8 +47,6 @@ struct InitSvcUserDetailsIstepData char iv_pIstepname[0]; }; -#ifndef PARSER - /** * @class InitSvcUserDetailsIstep * @@ -83,56 +79,6 @@ private: InitSvcUserDetailsIstep & operator=(const InitSvcUserDetailsIstep &); }; -#else // (if PARSER defined) - -/** - * @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 - } #endif diff --git a/src/include/usr/initservice/initsvcudparserfactory.H b/src/include/usr/initservice/initsvcudparserfactory.H deleted file mode 100644 index ea1178282..000000000 --- a/src/include/usr/initservice/initsvcudparserfactory.H +++ /dev/null @@ -1,69 +0,0 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/initservice/initsvcudparserfactory.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 -#ifndef INITSVC_UDPARSERFACTORY_H -#define INITSVC_UDPARSERFACTORY_H - -#ifdef PARSER - -/** - * @file initsvcudparserfactory.H - * - * Defines the InitSvcUserDetailsParserFactory.H class -*/ -#include <initservice/initsvcudistep.H> -#include <initservice/initsvcreasoncodes.H> -#include <errl/errludparserfactory.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 -#endif diff --git a/src/include/usr/mbox/mboxUdParser.H b/src/include/usr/mbox/mboxUdParser.H index 33f47db46..a4306241a 100644 --- a/src/include/usr/mbox/mboxUdParser.H +++ b/src/include/usr/mbox/mboxUdParser.H @@ -1,111 +1,30 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/mbox/mboxUdParser.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/include/usr/mbox/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 <errl/errluserdetails.H> -#include <errl/errludparser.H> #include <mbox/mbox_reasoncodes.H> - -#if defined(PARSER) - -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); - - } - } - }; -} - -#else - #include <util/align.H> namespace MBOX @@ -119,7 +38,7 @@ namespace MBOX uint64_t * i_extra_data = NULL, size_t i_data_byte_size = 0) { - iv_CompId = HBMBOX_COMP_ID; + iv_CompId = MBOX_COMP_ID; iv_Version = 1; iv_SubSection = MBOX_UDT_MBOXMSG_DATA; iv_merge = false; @@ -153,4 +72,4 @@ namespace MBOX } #endif -#endif + diff --git a/src/include/usr/mbox/mboxUdParserFactory.H b/src/include/usr/mbox/mboxUdParserFactory.H deleted file mode 100644 index 8456afa25..000000000 --- a/src/include/usr/mbox/mboxUdParserFactory.H +++ /dev/null @@ -1,54 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/mbox/mboxUdParserFactory.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 - */ -#if !defined(_MBOXUDPARSERFACTORY_H) -#define _MBOXUDPARSERFACTORY_H - -#if defined(PARSER) - -#include <mbox/mboxUdParser.H> -#include <mbox/mbox_reasoncodes.H> -#include <errl/errludparserfactory.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 -#endif diff --git a/src/include/usr/mbox/mbox_reasoncodes.H b/src/include/usr/mbox/mbox_reasoncodes.H index ca298aad7..09cf1bfd4 100644 --- a/src/include/usr/mbox/mbox_reasoncodes.H +++ b/src/include/usr/mbox/mbox_reasoncodes.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/mbox/mbox_reasoncodes.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/include/usr/mbox/mbox_reasoncodes.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 __MBOX_REASONCODES_H #define __MBOX_REASONCODES_H @@ -45,22 +44,22 @@ namespace MBOX enum MBOXReasonCode { - RC_INVALID_LENGTH = HBMBOX_COMP_ID | 0x01, - RC_INVALID_MESSAGE_TYPE = HBMBOX_COMP_ID | 0x02, - RC_NO_PERM_TO_SEND = HBMBOX_COMP_ID | 0x03, - RC_MSG_PENDING = HBMBOX_COMP_ID | 0x04, - RC_INVALID_QUEUE = HBMBOX_COMP_ID | 0x05, - RC_RETRY_FAILED = HBMBOX_COMP_ID | 0x06, - RC_ALREADY_REGISTERED = HBMBOX_COMP_ID | 0x07, - RC_UNREGISTERED_MSG_QUEUE = HBMBOX_COMP_ID | 0x08, - RC_ILLEGAL_OP = HBMBOX_COMP_ID | 0x09, - RC_DATA_WRITE_ERR = HBMBOX_COMP_ID | 0x0A, - RC_PARITY_ERR = HBMBOX_COMP_ID | 0x0B, - RC_INVALID_MBOX_MSG_TYPE = HBMBOX_COMP_ID | 0x0C, - RC_MBOX_SERVICE_NOT_READY = HBMBOX_COMP_ID | 0x0D, - RC_INVALID_DMA_LENGTH = HBMBOX_COMP_ID | 0x0E, - RC_KERNEL_REG_FAILED = HBMBOX_COMP_ID | 0x0F, - RC_MAILBOX_DISABLED = HBMBOX_COMP_ID | 0x10, + RC_INVALID_LENGTH = MBOX_COMP_ID | 0x01, + RC_INVALID_MESSAGE_TYPE = MBOX_COMP_ID | 0x02, + RC_NO_PERM_TO_SEND = MBOX_COMP_ID | 0x03, + RC_MSG_PENDING = MBOX_COMP_ID | 0x04, + RC_INVALID_QUEUE = MBOX_COMP_ID | 0x05, + RC_RETRY_FAILED = MBOX_COMP_ID | 0x06, + RC_ALREADY_REGISTERED = MBOX_COMP_ID | 0x07, + RC_UNREGISTERED_MSG_QUEUE = MBOX_COMP_ID | 0x08, + RC_ILLEGAL_OP = MBOX_COMP_ID | 0x09, + RC_DATA_WRITE_ERR = MBOX_COMP_ID | 0x0A, + RC_PARITY_ERR = MBOX_COMP_ID | 0x0B, + RC_INVALID_MBOX_MSG_TYPE = MBOX_COMP_ID | 0x0C, + RC_MBOX_SERVICE_NOT_READY = MBOX_COMP_ID | 0x0D, + RC_INVALID_DMA_LENGTH = MBOX_COMP_ID | 0x0E, + RC_KERNEL_REG_FAILED = MBOX_COMP_ID | 0x0F, + RC_MAILBOX_DISABLED = MBOX_COMP_ID | 0x10, }; @@ -69,7 +68,7 @@ namespace MBOX */ enum mboxUserDetailDataSubsection { - MBOX_UDT_MBOXMSG_DATA = 1, + MBOX_UDT_MBOXMSG_DATA = 0x01, }; }; diff --git a/src/include/usr/util/util_reasoncodes.H b/src/include/usr/util/util_reasoncodes.H index f9e1c0b01..ed690cecc 100644 --- a/src/include/usr/util/util_reasoncodes.H +++ b/src/include/usr/util/util_reasoncodes.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/util/util_reasoncodes.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 +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/util/util_reasoncodes.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 __UTIL_REASONCODES_H #define __UTIL_REASONCODES_H @@ -30,8 +30,8 @@ namespace Util { enum ModuleId { - UTIL_MOD_MEM_READ, // UtilMem::Read - UTIL_MOD_MEM_WRITE, // UtilMem::Write + UTIL_MOD_MEM_READ = 0x01, // UtilMem::Read + UTIL_MOD_MEM_WRITE = 0x02, // UtilMem::Write }; enum ReasonCode diff --git a/src/include/usr/vfs/vfs_reasoncodes.H b/src/include/usr/vfs/vfs_reasoncodes.H index ea4410de7..2607c2f1b 100644 --- a/src/include/usr/vfs/vfs_reasoncodes.H +++ b/src/include/usr/vfs/vfs_reasoncodes.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/vfs/vfs_reasoncodes.H $ -// -// 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/include/usr/vfs/vfs_reasoncodes.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 VFS_REASONCODES_H #define VFS_REASONCODES_H @@ -29,8 +29,8 @@ namespace VFS { enum VfsModuleID { - UNDEFINED_MODULE_ERRL_ID = 0, - VFS_MODULE_ID, + UNDEFINED_MODULE_ERRL_ID = 0x00, + VFS_MODULE_ID = 0x01, }; enum VfsReasonCode |