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/usr/errl/parser | |
| parent | 7c50ac8fa046052334326fd4f3c8447cb0c9514d (diff) | |
| download | blackbird-hostboot-caf328ccd931de4ce4e4d285d1a4e5ddd151abb5.tar.gz blackbird-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/usr/errl/parser')
| -rwxr-xr-x | src/include/usr/errl/parser/errlparserbase.H | 245 | ||||
| -rwxr-xr-x | src/include/usr/errl/parser/errlusrparser.H | 105 | 
2 files changed, 0 insertions, 350 deletions
| 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 | 

