diff options
author | Mike Jones <mjjones@us.ibm.com> | 2012-03-16 11:30:45 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-03-21 16:41:45 -0500 |
commit | 13cba5a729ae4e0f7e6f0f23b6b302e63e1f2ade (patch) | |
tree | 121076fad6e415df8cccd7cecac7f729cdc437e0 /src/include/usr/hwpf/plat | |
parent | 0c281617a249edc58f4b615355ab0221084b1330 (diff) | |
download | talos-hostboot-13cba5a729ae4e0f7e6f0f23b6b302e63e1f2ade.tar.gz talos-hostboot-13cba5a729ae4e0f7e6f0f23b6b302e63e1f2ade.zip |
HWPF: Decode HWP FFDC in error logs
RTC: 37921
Change-Id: I6c8bbe5e92eb6e22eb18cba3529128ae70a9786f
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/768
Tested-by: Jenkins Server
Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf/plat')
-rw-r--r-- | src/include/usr/hwpf/plat/fapiPlatReasonCodes.H | 26 | ||||
-rw-r--r-- | src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H | 71 | ||||
-rw-r--r-- | src/include/usr/hwpf/plat/fapiPlatUdParserHwp.H | 172 |
3 files changed, 264 insertions, 5 deletions
diff --git a/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H b/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H index 9afc348fc..5d37d1ad5 100644 --- a/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H +++ b/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H @@ -27,6 +27,9 @@ namespace fapi { + /** + * @brief Defines the HWPF::PLAT error log module IDs + */ enum hwpfModuleId { // HWP generated errors @@ -47,11 +50,14 @@ namespace fapi }; - // Note that for HWP generated errors (MOD_HWP_RC_TO_ERRL), the - // reason code is in the generated fapiHwpReasonCodes.H file - + /** + * @brief Defines the HWPF::PLAT error log reason codes + */ enum hwpfReasonCode { + // Note that for HWP generated errors (MOD_HWP_RC_TO_ERRL), the + // reason code is in the generated fapiHwpReasonCodes.H file + // FAPI generated errors (see fapiReturnCodes.H) RC_INVALID_ATTR_GET = HWPF_COMP_ID | 0x01, @@ -65,9 +71,20 @@ namespace fapi RC_ATTR_BASE_BAD_PARAM = HWPF_COMP_ID | 0x16, RC_INVALID_NUM_PARENT_CHIP = HWPF_COMP_ID | 0x17, }; + + /** + * @brief Defines the HWPF::PLAT (Hostboot) error log user detail data + * sections + */ + enum hwpfUserDetailDataSubSection + { + HWPF_UDT_HWP_TARGET = 1, + HWPF_UDT_HWP_ECMDDBB = 2, + HWPF_UDT_HWP_DATA = 3, + }; }; -// HostBoot ErrorLog tags for FAPI errors +// HostBoot ErrorLog tags for FAPI errors (see fapiReturnCodes.H) /*@ * @errortype * @moduleid MOD_FAPI_RC_TO_ERRL @@ -75,5 +92,4 @@ namespace fapi * @devdesc InitFile HW Procedure requested an invalid attribute */ - #endif diff --git a/src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H b/src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H new file mode 100644 index 000000000..e9db032a4 --- /dev/null +++ b/src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H @@ -0,0 +1,71 @@ +// 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 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 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<PlatUserDetailsParserHwpTarget>(HWPF_UDT_HWP_TARGET); + registerParser<PlatUserDetailsParserHwpEcmddbb>(HWPF_UDT_HWP_ECMDDBB); + registerParser<PlatUserDetailsParserHwpData>(HWPF_UDT_HWP_DATA); + } + +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 new file mode 100644 index 000000000..a5b3e8190 --- /dev/null +++ b/src/include/usr/hwpf/plat/fapiPlatUdParserHwp.H @@ -0,0 +1,172 @@ +// 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 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 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> + +namespace fapi +{ + +/** + * @class PlatUserDetailsParserHwpTarget + * + * Parses HWP target string user detail in an error log. + */ +class PlatUserDetailsParserHwpTarget : public ERRORLOG::ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + PlatUserDetailsParserHwpTarget() {} + + /** + * @brief Destructor + */ + virtual ~PlatUserDetailsParserHwpTarget() {} + + /** + * @brief Parses HWP target string user detail 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 + { + i_parser.PrintString("Target ecmd string", static_cast<char *>(i_pBuffer)); + } + +private: + // Disabled + PlatUserDetailsParserHwpTarget(const PlatUserDetailsParserHwpTarget &); + PlatUserDetailsParserHwpTarget & operator=( + const PlatUserDetailsParserHwpTarget &); +}; + +/** + * @class PlatUserDetailsParserHwpEcmddbb + * + * Parses HWP ecmdDataBufferBase user detail in an error log. +*/ +class PlatUserDetailsParserHwpEcmddbb : public ERRORLOG::ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + PlatUserDetailsParserHwpEcmddbb() {} + + /** + * @brief Destructor + */ + virtual ~PlatUserDetailsParserHwpEcmddbb() {} + + /** + * @brief Parses HWP ecmdDataBufferBase user detail 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 + { + i_parser.PrintString("ecmd data buffer data", NULL); + i_parser.PrintHexDump(i_pBuffer, i_buflen); + } + +private: + // Disabled + PlatUserDetailsParserHwpEcmddbb(const PlatUserDetailsParserHwpEcmddbb &); + PlatUserDetailsParserHwpEcmddbb & operator=( + const PlatUserDetailsParserHwpEcmddbb &); +}; + +/** + * @class PlatUserDetailsParserHwpData + * + * Parses HWP raw data user detail in an error log. +*/ +class PlatUserDetailsParserHwpData : public ERRORLOG::ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + PlatUserDetailsParserHwpData() {} + + /** + * @brief Destructor + */ + virtual ~PlatUserDetailsParserHwpData() {} + + /** + * @brief Parses HWP raw data user detail 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 + { + i_parser.PrintString("HWP FFDC data", NULL); + i_parser.PrintHexDump(i_pBuffer, i_buflen); + } + +private: + // Disabled + PlatUserDetailsParserHwpData(const PlatUserDetailsParserHwpData &); + PlatUserDetailsParserHwpData & operator=( + const PlatUserDetailsParserHwpData &); +}; + +} + +#endif +#endif + |