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/usr/hwpf/plugins | |
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/usr/hwpf/plugins')
-rw-r--r-- | src/usr/hwpf/plugins/HWPF_COMP_ID_Parse.C (renamed from src/usr/hwpf/plugins/hwpfParse.C) | 14 | ||||
-rw-r--r-- | src/usr/hwpf/plugins/fapiPlatUdParserHwp.H | 129 | ||||
-rw-r--r-- | src/usr/hwpf/plugins/hwpfUdParserFactory.H | 69 | ||||
-rw-r--r-- | src/usr/hwpf/plugins/hwpistepud.H | 99 | ||||
-rw-r--r-- | src/usr/hwpf/plugins/makefile | 47 |
5 files changed, 303 insertions, 55 deletions
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}> |