summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2012-09-24 20:38:58 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-10-04 16:51:04 -0500
commit9c88d3c004d60d016c4d3bf5a3c2988cce7121c9 (patch)
tree28eb4e6671d865a4c6897ab34ad1fee231a98202 /src/include/usr
parentd05fe5a6cb9d9dfa92954db9923603fdb6c8adca (diff)
downloadtalos-hostboot-9c88d3c004d60d016c4d3bf5a3c2988cce7121c9.tar.gz
talos-hostboot-9c88d3c004d60d016c4d3bf5a3c2988cce7121c9.zip
HWPF: Allow automatic collection of register FFDC data when HWP error created
If HWP Error XML contains an element called <collectRegisterFfdc> which identifies the registers to collect as FFDC then when the error is created, those registers are automatically collected and stored in the error log. Also create Hostboot parsers to parse the data. Change-Id: I521527b97e0db0c808db81773ba0fe9aa00477ad RTC: 46029 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1866 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/hwpf/fapi/fapiCollectRegFfdc.H68
-rw-r--r--src/include/usr/hwpf/fapi/fapiErrorInfo.H85
-rw-r--r--src/include/usr/hwpf/fapi/fapiReturnCode.H123
-rw-r--r--src/include/usr/hwpf/hwp/fapiTestHwpAnalyzeError.H59
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H45
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatReasonCodes.H49
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H48
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatUdParserHwp.H163
-rw-r--r--src/include/usr/mbox/mboxUdParser.H35
-rw-r--r--src/include/usr/mbox/mboxUdParserFactory.H2
-rw-r--r--src/include/usr/targeting/adapters/types.H50
-rw-r--r--src/include/usr/targeting/common/targreasoncodes.H45
12 files changed, 313 insertions, 459 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiCollectRegFfdc.H b/src/include/usr/hwpf/fapi/fapiCollectRegFfdc.H
new file mode 100644
index 000000000..a3c1c46ef
--- /dev/null
+++ b/src/include/usr/hwpf/fapi/fapiCollectRegFfdc.H
@@ -0,0 +1,68 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/fapi/fapiCollectRegFfdc.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 */
+/**
+ * @file fapiCollectRegFfdc.H
+ *
+ * @brief Defines the fapiCollectRegFfdc function that collects chip register
+ * FFDC data. This is called automatically by FAPI_SET_HWP_ERROR (when
+ * a HWP creates an error) and FAPI_ADD_INFO_TO_HWP_ERROR (when an FFDC
+ * HWP adds error information to an existing error) if the error XML
+ * contains a <collectRegisterFfdc> element. This function should not
+ * be called directly by any user code. The function implementation is
+ * automatically generated from FAPI Error XML files.
+ */
+
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * mjjones 09/19/2012 Created.
+ */
+
+#ifndef FAPICOLLECTREGFFDC_H_
+#define FAPICOLLECTREGFFDC_H_
+
+#include <fapiHwpErrorInfo.H>
+
+namespace fapi
+{
+
+class Target;
+class ReturnCode;
+
+/**
+ * @brief Collects Register FFDC from a chip
+ *
+ * This should only be called by FAPI during FAPI_SET_HWP_ERROR or
+ * FAPI_ADD_INFO_TO_HWP_ERROR
+ *
+ * @param[in] i_target Reference to Target to collect FFDC from
+ * @param[in] i_ffdcId FFDC Identifier
+ * @param[out] o_rc Reference to ReturnCode that FFDC is added to
+ */
+void fapiCollectRegFfdc(const fapi::Target & i_target,
+ const fapi::HwpFfdcId i_ffdcId,
+ fapi::ReturnCode & o_rc);
+}
+
+#endif
diff --git a/src/include/usr/hwpf/fapi/fapiErrorInfo.H b/src/include/usr/hwpf/fapi/fapiErrorInfo.H
index 2820ab1f2..6df78114d 100644
--- a/src/include/usr/hwpf/fapi/fapiErrorInfo.H
+++ b/src/include/usr/hwpf/fapi/fapiErrorInfo.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/hwpf/fapi/fapiErrorInfo.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/hwpf/fapi/fapiErrorInfo.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 otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/**
* @file fapiErrorInfo.H
*
@@ -38,6 +37,7 @@
* ctor and assignment operator
* mjjones 08/14/2012 Merge Callout/Deconfig/Gard
* structures into one
+ * mjjones 09/19/2012 Replace FFDC type with ID
*/
#ifndef FAPIERRORINFO_H_
@@ -51,19 +51,6 @@ namespace fapi
{
/**
- * @enum FfdcType
- *
- * This enumeration defines the possible types of FFDC data
- */
-enum FfdcType
-{
- FFDC_TYPE_NONE = 0,
- FFDC_TYPE_TARGET = 1, // FFDC data is a Target ecmd-string
- FFDC_TYPE_ECMDDBB = 2, // FFDC data is the contents of an ecmdDataBaseBuffer
- FFDC_TYPE_DATA = 3, // FFDC data is just raw data
-};
-
-/**
* @class ErrorInfoFfdc
*
* This class contains a copy of some FFDC data
@@ -74,13 +61,13 @@ public:
/**
* @brief Constructor
*
- * @param[in] i_pFfdc Pointer to the FFDC to copy
- * @param[in] i_size Size of the FFDC to copy
- * @param[in] i_type Type of the FFDC to copy
+ * @param[in] i_ffdcId FFDC Identifier (used to decode FFDC)
+ * @param[in] i_pFfdc Pointer to the FFDC to copy
+ * @param[in] i_size Size of the FFDC to copy
*/
- ErrorInfoFfdc(const void * i_pFfdc,
- const uint32_t i_size,
- const FfdcType i_type);
+ ErrorInfoFfdc(const uint32_t i_ffdcId,
+ const void * i_pFfdc,
+ const uint32_t i_size);
/**
* @brief Destructor
@@ -96,25 +83,25 @@ public:
* @return void *. Pointer to the FFDC
*/
const void * getData(uint32_t & o_size) const;
-
+
/**
- * @brief Get the FfdcData type
+ * @brief Get the FFDC Identifier
*
- * @return FfdcType. FFDC type
+ * @return uint32_t The FFDC Identifier
*/
- FfdcType getType() const;
+ uint32_t getFfdcId() {return iv_ffdcId;}
private:
+ // FFDC Identifier
+ uint32_t iv_ffdcId;
+
// Pointer to the FFDC
uint8_t * iv_pFfdc;
// Size of the FFDC
uint32_t iv_size;
- // Type of the FFDC
- FfdcType iv_type;
-
// Disabled
ErrorInfoFfdc(const ErrorInfoFfdc &);
ErrorInfoFfdc & operator=(const ErrorInfoFfdc &);
diff --git a/src/include/usr/hwpf/fapi/fapiReturnCode.H b/src/include/usr/hwpf/fapi/fapiReturnCode.H
index ed6b37309..6c48aac10 100644
--- a/src/include/usr/hwpf/fapi/fapiReturnCode.H
+++ b/src/include/usr/hwpf/fapi/fapiReturnCode.H
@@ -44,6 +44,7 @@
* mjjones 03/16/2012 Allow different PLAT errors
* brianh 07/31/2012 performance/size optimizations
* mjjones 08/14/2012 Created getCreateReturnCodeDataRef
+ * mjjones 09/19/2012 Add FFDC ID to error info
*/
#ifndef FAPIRETURNCODE_H_
@@ -59,18 +60,30 @@
#include <fapiHwpErrorInfo.H>
#include <fapiPlatTrace.H>
#include <fapiHwpReturnCodes.H>
+#include <fapiCollectRegFfdc.H>
/**
* @brief Set HWP Error macro
*
- * This macro should be used by a HWP to set an error code if there is
- * associated Error Information (in the Error Information XML file) that
- * needs to be processed
+ * This macro should be used by a HWP to create an error. The ReturnCode's
+ * internal return code is set and any error information in the Error XML file
+ * is added to the ReturnCode
*/
#define FAPI_SET_HWP_ERROR(RC, ERROR) \
RC._setHwpError(fapi::ERROR); \
- ERROR##_CALL_FUNC_TO_ANALYZE_ERROR(RC); \
ERROR##_CALL_FUNCS_TO_COLLECT_FFDC(RC); \
+ ERROR##_CALL_FUNCS_TO_COLLECT_REG_FFDC(RC); \
+ ERROR##_ADD_ERROR_INFO(RC)
+
+/**
+ * @brief Add info to HWP Error macro
+ *
+ * This macro should be used by an FFDC HWP to add error information from an
+ * Error XML file to an existing error.
+ */
+#define FAPI_ADD_INFO_TO_HWP_ERROR(RC, ERROR) \
+ ERROR##_CALL_FUNCS_TO_COLLECT_FFDC(RC); \
+ ERROR##_CALL_FUNCS_TO_COLLECT_REG_FFDC(RC); \
ERROR##_ADD_ERROR_INFO(RC)
namespace fapi
@@ -90,8 +103,12 @@ class ReturnCodeDataRef;
* function associates heap based PlatData to the ReturnCode (use-case is
* an error log).
* HWP can set an error in the ReturnCode by calling FAPI_SET_HWP_ERROR, this
- * macro adds any error information associated with the HWP error to the
- * ReturnCode (error information is documented in an error XML file).
+ * macro adds any error information specified in the error XML file to the
+ * ReturnCode
+ * HWP can add error information to a ReturnCode that already contains an
+ * error by calling FAPI_ADD_INFO_TO_HWP_ERROR, this is called by HWPs
+ * that are specifically written to collect FFDC. This macro adds any error
+ * information specified in the error XML file to the ReturnCode
* FAPI/PLAT/HWP can set an ecmdDataBufferBase error in the ReturnCode by
* calling setEcmdError
*
@@ -274,17 +291,18 @@ public:
*/
struct ErrorInfoEntry
{
- uint8_t iv_type : 3; // The type of ErrorInfo (from ErrorInfoType enum)
- uint8_t iv_object: 5; // Which object in the i_pObjects array passed to
- // addErrorInfo the ErrorInfoEntry is for
- int16_t iv_data1; // EI_TYPE_FFDC : Size of FFDC
- // EI_TYPE_CALLOUT: CalloutPriority
+ uint8_t iv_type; // The type of ErrorInfo (from ErrorInfoType enum)
+ uint8_t iv_object; // Which object in the i_pObjects array the
+ // ErrorInfoEntry refers to
+ int16_t iv_data1; // EI_TYPE_FFDC : Size of FFDC
+ // EI_TYPE_CALLOUT: CalloutPriority
+ uint32_t iv_data2; // EI_TYPE_FFDC : FFDC Id
};
/**
* @brief Add ErrorInfo
*
- * This is called by the FAPI_SET_HWP_ERROR macro to add ErrorInfo to the
+ * This is called by the FAPI_SET_HWP_ERROR and macro to add ErrorInfo to the
* ReturnCode when a HWP generates an error. The function is designed to add
* all the ErrorInfo at once rather than the FAPI_SET_HWP_ERROR macro making
* multiple function calls to add each piece of ErrorInfo individually in
@@ -304,17 +322,15 @@ public:
/**
* @brief Add a copy of FFDC to the ErrorInfo
*
- * This is called by:
- * - addErrorInfo
- * - ReturnCodeFfdc::addEIFfdc (function template)
+ * This is called by addErrorInfo
*
+ * @param[in] i_ffdcId FFDC Identifier - used for decoding
* @param[in] i_pFfdc Pointer to the FFDC to copy
* @param[in] i_size Size of the FFDC to copy
- * @param[in] i_type Type of the FFDC to copy
*/
- void addEIFfdc(const void * i_pFfdc,
- const uint32_t i_size,
- const FfdcType i_type);
+ void addEIFfdc(const uint32_t i_ffdcId,
+ const void * i_pFfdc,
+ const uint32_t i_size);
/**
* @brief Get a pointer to any ErrorInfo
@@ -399,7 +415,7 @@ private:
/**
* @namespace ReturnCodeFfdc
*
- * This namespace contains a template functions for adding FFDC data to a
+ * This namespace contains template functions used for adding FFDC data to a
* ReturnCode. They cannot be a ReturnCode member functions because a function
* template cannot be specialized within a class
*/
@@ -464,73 +480,6 @@ namespace ReturnCodeFfdc
Error_PtrPassedToGetErrorInfoFfdcSize();
return 0;
}
-
- /**
- * @brief Add a copy of FFDC to the ErrorInfo in a ReturnCode
- *
- * This is called by FFDC HWPs
- *
- * @param[out] o_rc Reference to ReturnCode to copy FFDC to
- * @param[in] i_ffdc Reference to FFDC to copy
- */
- template<typename T>
- void addEIFfdc(ReturnCode & o_rc,
- const T & i_ffdc)
- {
- o_rc.addEIFfdc(&i_ffdc, sizeof(T), FFDC_TYPE_DATA);
- }
-
- /**
- * @brief Specialization of addEIFfdc for ecmdDataBufferBase
- *
- * @param[out] o_rc Reference to ReturnCode to copy FFDC to
- * @param[in] i_ffdc Reference to ecmdDataBufferBase to copy
- */
- template<>
- inline void addEIFfdc<ecmdDataBufferBase>(ReturnCode & o_rc,
- const ecmdDataBufferBase & i_ffdc)
- {
- uint32_t * l_pData = new uint32_t[i_ffdc.getWordLength()];
-
- // getWordLength rounds up to the next 32bit boundary, ensure that after
- // extracting, any unset bits are zero
- l_pData[i_ffdc.getWordLength() - 1] = 0;
-
- // Deliberately not checking return code from extract to save code space
- i_ffdc.extract(l_pData, 0, i_ffdc.getBitLength());
- o_rc.addEIFfdc(l_pData, (i_ffdc.getWordLength() * 4),
- FFDC_TYPE_ECMDDBB);
- delete [] l_pData;
- }
-
- /**
- * @brief Specialization of addEIFfdc for fapi::Target
- *
- * @param[out] o_rc Reference to ReturnCode to copy FFDC to
- * @param[in] i_ffdc Reference to fapi::Target to add FFDC for
- */
- template<>
- inline void addEIFfdc<fapi::Target>(ReturnCode & o_rc,
- const fapi::Target & i_ffdc)
- {
- const char * l_ecmdString = i_ffdc.toEcmdString();
- o_rc.addEIFfdc(l_ecmdString, (strlen(l_ecmdString) + 1),
- FFDC_TYPE_TARGET);
- }
-
- /**
- * @brief Compile error if caller tries to add a pointer as FFDC
- *
- * If this function template is instantiated, the compile will fail due to
- * the construction of an undefined class.
- */
- class Error_PtrPassedToAddEIFfdc;
- template<typename T>
- void addEIFfdc(ReturnCode &,
- const T *)
- {
- Error_PtrPassedToAddEIFfdc();
- }
}
}
diff --git a/src/include/usr/hwpf/hwp/fapiTestHwpAnalyzeError.H b/src/include/usr/hwpf/hwp/fapiTestHwpAnalyzeError.H
deleted file mode 100644
index 85bb19975..000000000
--- a/src/include/usr/hwpf/hwp/fapiTestHwpAnalyzeError.H
+++ /dev/null
@@ -1,59 +0,0 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/hwpf/hwp/fapiTestHwpAnalyzeError.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
-/**
- * @file fapiTestHwpAnalyzeError.H
- *
- * @brief Defines a simple test Hardware Procedure that returns an error
- */
-
-/*
- * Change Log ******************************************************************
- * Flag Defect/Feature User Date Description
- * ------ -------------- ---------- ----------- ----------------------------
- * mjjones 08/08/2011 Created. Moved from other file
- *
- */
-
-#ifndef FAPITESTHWPANALYZEERROR_H_
-#define FAPITESTHWPANALYZEERROR_H_
-
-#include <fapi.H>
-
-typedef fapi::ReturnCode (*hwpTestAnalyzeError_FP_t)(const fapi::Target &);
-
-extern "C"
-{
-
-/**
- * @brief Simple HWP that analyzes an error and returns an error describing the
- * problem (RC_TEST_ERROR_B)
- *
- * @param[in] i_target Reference to target (unused by HWP)
- *
- * @return ReturnCode
- */
-fapi::ReturnCode hwpTestAnalyzeError(const fapi::Target & i_target);
-
-}
-
-#endif
diff --git a/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H b/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H
index c179c0ddb..addf6e1b3 100644
--- a/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H
+++ b/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H
@@ -1,25 +1,25 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/hwpf/plat/fapiPlatHwpExecutor.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/hwpf/plat/fapiPlatHwpExecutor.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 otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/**
* @file fapiPlatHwpExecutor.H
*
@@ -36,7 +36,6 @@
#include <fapiTestHwp.H>
#include <fapiTestHwpError.H>
-#include <fapiTestHwpAnalyzeError.H>
#include <fapiTestHwpFfdc.H>
#include <fapiTestHwpConfig.H>
#include <fapiTestHwpAttr.H>
diff --git a/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H b/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H
index ac6bd71cc..1de3d90b1 100644
--- a/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H
+++ b/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/hwpf/plat/fapiPlatReasonCodes.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/hwpf/plat/fapiPlatReasonCodes.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 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 FAPIPLATREASONCODES_H_
#define FAPIPLATREASONCODES_H_
@@ -121,9 +120,7 @@ namespace fapi
enum hwpfUserDetailDataSubSection
{
HWPF_UDT_HWP_RCVALUE = 1,
- HWPF_UDT_HWP_TARGET = 2,
- HWPF_UDT_HWP_ECMDDBB = 3,
- HWPF_UDT_HWP_DATA = 4,
+ HWPF_UDT_HWP_FFDC = 2,
};
};
diff --git a/src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H b/src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H
index a8aab1817..c67816a77 100644
--- a/src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H
+++ b/src/include/usr/hwpf/plat/fapiPlatUdParserFactory.H
@@ -1,25 +1,25 @@
-// 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
+/* 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
@@ -53,9 +53,7 @@ public:
PlatUserDetailsParserFactory()
{
registerParser<PlatUserDetailsParserHwpRcValue>(HWPF_UDT_HWP_RCVALUE);
- registerParser<PlatUserDetailsParserHwpTarget>(HWPF_UDT_HWP_TARGET);
- registerParser<PlatUserDetailsParserHwpEcmddbb>(HWPF_UDT_HWP_ECMDDBB);
- registerParser<PlatUserDetailsParserHwpData>(HWPF_UDT_HWP_DATA);
+ registerParser<PlatUserDetailsParserHwpFfdc>(HWPF_UDT_HWP_FFDC);
}
private:
diff --git a/src/include/usr/hwpf/plat/fapiPlatUdParserHwp.H b/src/include/usr/hwpf/plat/fapiPlatUdParserHwp.H
index f3cf8931e..420742b1f 100644
--- a/src/include/usr/hwpf/plat/fapiPlatUdParserHwp.H
+++ b/src/include/usr/hwpf/plat/fapiPlatUdParserHwp.H
@@ -1,25 +1,25 @@
-// 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
+/* 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
@@ -36,7 +36,7 @@
* fapi::ReturnCode
*/
#include <errl/errluserdetails.H>
-#include <fapiPlatHwpRcDecode.H>
+#include <fapiPlatHwpErrParser.H>
namespace fapi
{
@@ -72,18 +72,8 @@ public:
void * i_pBuffer,
const uint32_t i_buflen) const
{
- uint32_t l_rcValue = ntohl(*(static_cast<uint32_t *>(i_pBuffer)));
-
- const char * l_pDesc = fapiDecodeHwpRc(l_rcValue);
-
- if (l_pDesc)
- {
- i_parser.PrintString("HWP Error description", l_pDesc);
- }
- else
- {
- i_parser.PrintNumber("Unrecognized Error ID", "0x%x", l_rcValue);
- }
+ // Call a FAPI generated function to parse the return code
+ fapiParseHwpRc(i_parser, i_pBuffer, i_buflen);
}
private:
@@ -96,106 +86,23 @@ private:
/**
* @class PlatUserDetailsParserHwpTarget
*
- * Parses HWP target string user detail in an error log.
+ * Parses HWP FFDC 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
+class PlatUserDetailsParserHwpFfdc : public ERRORLOG::ErrlUserDetailsParser
{
public:
/**
* @brief Constructor
*/
- PlatUserDetailsParserHwpData() {}
+ PlatUserDetailsParserHwpFfdc() {}
/**
* @brief Destructor
*/
- virtual ~PlatUserDetailsParserHwpData() {}
+ virtual ~PlatUserDetailsParserHwpFfdc() {}
/**
- * @brief Parses HWP raw data user detail in an error log.
+ * @brief Parses HWP FFDC in an error log.
*
* @param i_version Version of the data
* @param i_parse ErrlUsrParser object for outputting information
@@ -207,15 +114,15 @@ public:
void * i_pBuffer,
const uint32_t i_buflen) const
{
- i_parser.PrintString("HWP FFDC data", NULL);
- i_parser.PrintHexDump(i_pBuffer, i_buflen);
+ // Call a FAPI generated function to parse the FFDC
+ fapiParseHwpFfdc(i_parser, i_pBuffer, i_buflen);
}
private:
// Disabled
- PlatUserDetailsParserHwpData(const PlatUserDetailsParserHwpData &);
- PlatUserDetailsParserHwpData & operator=(
- const PlatUserDetailsParserHwpData &);
+ PlatUserDetailsParserHwpFfdc(const PlatUserDetailsParserHwpFfdc &);
+ PlatUserDetailsParserHwpFfdc & operator=(
+ const PlatUserDetailsParserHwpFfdc &);
};
}
diff --git a/src/include/usr/mbox/mboxUdParser.H b/src/include/usr/mbox/mboxUdParser.H
index 384c2077e..33f47db46 100644
--- a/src/include/usr/mbox/mboxUdParser.H
+++ b/src/include/usr/mbox/mboxUdParser.H
@@ -26,13 +26,12 @@
#include <errl/errluserdetails.H>
#include <errl/errludparser.H>
-#include <util/align.H>
#include <mbox/mbox_reasoncodes.H>
-namespace MBOX
-{
#if defined(PARSER)
+namespace MBOX
+{
/**
* Parses mbox message user detail in an error log
*/
@@ -64,7 +63,7 @@ namespace MBOX
const uint32_t i_buflen) const
{
uint32_t * b32 = static_cast<uint32_t *>(i_pBuffer);
- uint64_t * b64 = static_cast<uint64_t *>(b32 + 4);
+ uint64_t * b64 = reinterpret_cast<uint64_t *>(b32 + 4);
uint32_t msg_id = ntohl(*b32);
uint32_t msg_q_id = ntohl(*(b32+1));
@@ -74,28 +73,28 @@ namespace MBOX
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);
+ 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("MBOX mesage is synchronous");
+ i_parser.PrintString(NULL, "MBOX mesage is synchronous");
}
else
{
- i_parser.PrintString("MBOX message is asynchronous");
+ 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);
+ 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("MBOX extra data:");
+ i_parser.PrintString(NULL, "MBOX extra data:");
- uint8_t * b08 = static_cast<uint8_t *>(b64 + 3);
+ uint8_t * b08 = reinterpret_cast<uint8_t *>(b64 + 3);
size_t len = i_buflen - 40;
i_parser.PrintHexDump(b08,len);
@@ -103,8 +102,14 @@ namespace MBOX
}
}
};
+}
#else
+
+#include <util/align.H>
+
+namespace MBOX
+{
class UserDetailsMboxMsg : public ERRORLOG::ErrlUserDetails
{
public:
@@ -145,7 +150,7 @@ namespace MBOX
~UserDetailsMboxMsg() {}
};
+}
#endif
-};
#endif
diff --git a/src/include/usr/mbox/mboxUdParserFactory.H b/src/include/usr/mbox/mboxUdParserFactory.H
index a857e5522..8456afa25 100644
--- a/src/include/usr/mbox/mboxUdParserFactory.H
+++ b/src/include/usr/mbox/mboxUdParserFactory.H
@@ -30,7 +30,7 @@
#include <mbox/mbox_reasoncodes.H>
#include <errl/errludparserfactory.H>
-namespace mbox
+namespace MBOX
{
class UserDetailsParserFactory
: public ERRORLOG::ErrlUserDetailsParserFactory
diff --git a/src/include/usr/targeting/adapters/types.H b/src/include/usr/targeting/adapters/types.H
index 264a6e55c..e4b9924fe 100644
--- a/src/include/usr/targeting/adapters/types.H
+++ b/src/include/usr/targeting/adapters/types.H
@@ -1,25 +1,25 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/targeting/adapters/types.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/targeting/adapters/types.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 __TARGETING_TYPES_H
#define __TARGETING_TYPES_H
@@ -34,9 +34,12 @@
// Includes
//******************************************************************************
+#include <hbotcompid.H>
+
+#ifndef PARSER
+
#include <sys/sync.h>
#include <util/singleton.H>
-#include <hbotcompid.H>
#include <vmmconst.h>
/**
@@ -62,4 +65,5 @@
#define TARG_GET_SINGLETON(__TYPE__) \
__TYPE__::instance()
+#endif // PARSER
#endif // __TARGETING_TYPES_H
diff --git a/src/include/usr/targeting/common/targreasoncodes.H b/src/include/usr/targeting/common/targreasoncodes.H
index 0e60da298..804745fc0 100644
--- a/src/include/usr/targeting/common/targreasoncodes.H
+++ b/src/include/usr/targeting/common/targreasoncodes.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/targeting/common/targreasoncodes.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/targeting/common/targreasoncodes.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 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 __TARGETING_COMMON_TARGREASONCODES_H
#define __TARGETING_COMMON_TARGREASONCODES_H
OpenPOWER on IntegriCloud