summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2012-06-26 16:30:33 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-08-13 12:25:09 -0500
commit11c8a7dc6e0ec3c31f081d1e30a04a6e7038f918 (patch)
treec1e8babefc8a5447d606a4d13a43f914c50bce95
parent99f217daf307b3cd963bcbce8eb7b025d58f734e (diff)
downloadtalos-hostboot-11c8a7dc6e0ec3c31f081d1e30a04a6e7038f918.tar.gz
talos-hostboot-11c8a7dc6e0ec3c31f081d1e30a04a6e7038f918.zip
ERRL: Hardware Callouts
Support for HW and Procedure Callouts, including GARD and deconfigure information. . Add errl functions to get the information; . Add errlog userdetail code to package callout data; . Add to errlog commit function to find callout user-detail sections and call a HWAS:common function to process the callout. . Remove gardLevel from Targeting hwasState field Change-Id: I01c7c3721e6fd843a0ba2ad4df8399f6db68b590 RTC: 41276 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1266 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/include/usr/errl/errlentry.H171
-rw-r--r--src/include/usr/errl/errlmanager.H87
-rw-r--r--src/include/usr/errl/errlreasoncodes.H46
-rw-r--r--src/include/usr/errl/errludcallout.H159
-rw-r--r--src/include/usr/errl/errludparserfactoryerrl.H46
-rw-r--r--src/include/usr/errl/hberrltypes.H46
-rw-r--r--src/include/usr/hwas/common/hwasCallout.H231
-rw-r--r--src/include/usr/hwas/common/hwas_reasoncodes.H2
-rw-r--r--src/include/usr/hwas/deconfigGard.H69
-rw-r--r--src/usr/errl/errlentry.C85
-rw-r--r--src/usr/errl/errlmanager.C74
-rw-r--r--src/usr/errl/errludcallout.C102
-rw-r--r--src/usr/errl/makefile9
-rw-r--r--src/usr/errl/test/errltest.H124
-rw-r--r--src/usr/errl/test/errluserdetailtest.H69
-rw-r--r--src/usr/hwas/common/hwas.C1
-rw-r--r--src/usr/hwas/common/hwasCallout.C175
-rw-r--r--src/usr/hwas/deconfigGard.C8
-rw-r--r--src/usr/hwas/makefile8
-rw-r--r--src/usr/hwas/test/hwas1test.H60
-rw-r--r--src/usr/hwas/test/hwasGardTest.H67
-rw-r--r--src/usr/hwpf/plat/fapiPlatHwpInvoker.C54
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml13
23 files changed, 1315 insertions, 391 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H
index 32f9c2fe7..b3255a55b 100644
--- a/src/include/usr/errl/errlentry.H
+++ b/src/include/usr/errl/errlentry.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/errl/errlentry.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/errlentry.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
+ */
#ifndef ERRLENTRY_H
#define ERRLENTRY_H
/**
@@ -54,7 +55,8 @@
#include <errl/errlsrc.H>
#include <errl/errlud.H>
#include <hbotcompid.H>
-
+#include <targeting/common/target.H>
+#include <hwas/common/hwasCallout.H>
namespace ERRORLOG
{
@@ -359,85 +361,40 @@ public:
*/
void removeBackTrace();
-private:
- /**
- * @brief The ErrlManager will call here to ask the
- * ErrlEntry to assign the time of commit, and to assign
- * the commiter's comp ID.
- * The ErrlManager is the primary user of this call.
- *
- */
- void commit( compId_t i_commiterComp );
-
-
-
- /**
- * @brief Compute the flattened size of an error log. It is typical
- * to call this function for the size of buffer required, then
- * allocate a buffer, then call flatten().
- * The ErrlManager is the primary user of this call.
- *
- * @return Size in bytes of the flattened data.
- */
- uint64_t flattenedSize();
-
-
- /**
- * @brief Flatten the data to caller's buffer. The resulting flat
- * data will be in PEL (platform event log) format.
- * The ErrlManager is the primary user of this call.
- *
- * @param[in,out] o_buffer Points to data block to be filled
- * @param[in] i_cbBuffer Count of bytes in buffer supplied
- *
- * @return Count of bytes copied to caller's
- * buffer or else zero if it does not fit.
- */
- uint64_t flatten( void * o_buffer, const uint64_t i_cbBuffer );
-
-
- /**
- * @brief Disabled copy constructor and assignment operator
- */
- ErrlEntry(const ErrlEntry& i_right);
- ErrlEntry& operator=(const ErrlEntry& i_right);
-
-
-
-#if 0
-
- //@todo - The interfaces in this block still need support in order
- // to have code written.
-
-
- //@todo: Need to set EPUB_Sub system based on highest
- // priority call out FRU
/**
- * @brief Add a hardware ( FRU ) callout
+ * @brief Add a hardware callout
*
- * @param[in] i_resourceId The resource identifier for the part
* @param[in] i_target The hardware target
+ * @param[in] i_priority Priority of the callout
+ * @param [in] i_deconfigState Enum indicating whether the failing part
+ * should be deconfigured.
+ * @param [in] i_gardErrorType to indicate what type of failure occured
*
* @return void
*/
- void addFruCallout(const target_t i_target,
- const callOutPriority_t i_priority);
-
+ void addHwCallout(const TARGETING::Target *i_target,
+ const HWAS::callOutPriority i_priority,
+ const HWAS::DeconfigEnum i_deconfigState,
+ const HWAS::GARD_ErrorType i_gardErrorType);
- //@todo: Need to set EPUB_Sub system based on highest
- // priority procedure call out
/**
* @brief Add a procedure ( software ) callout
* Adds the given service procedure to the list
* of callouts for the log
*
- * @param[in] i_priority Priority of the callout
* @param[in] i_procedure Procedure identifier.
+ * @param[in] i_priority Priority of the callout
*
* @return void
*/
- void addProcedureCallout(const epubProcedureId_t i_procedure,
- const callOutPriority_t i_priority);
+ void addProcedureCallout(const HWAS::epubProcedureID i_procedure,
+ const HWAS::callOutPriority i_priority);
+
+private:
+
+#if 0
+ //@todo: Need to set EPUB_Sub system based on highest
+ // priority call out FRU
/**
* @brief Adds a software section to the log which is
@@ -465,6 +422,48 @@ private:
#endif
+
+ /**
+ * @brief The ErrlManager will call here to ask the
+ * ErrlEntry to assign the time of commit, and to assign
+ * the commiter's comp ID.
+ * The ErrlManager is the primary user of this call.
+ *
+ */
+ void commit( compId_t i_commiterComp );
+
+
+ /**
+ * @brief Compute the flattened size of an error log. It is typical
+ * to call this function for the size of buffer required, then
+ * allocate a buffer, then call flatten().
+ * The ErrlManager is the primary user of this call.
+ *
+ * @return Size in bytes of the flattened data.
+ */
+ uint64_t flattenedSize();
+
+
+ /**
+ * @brief Flatten the data to caller's buffer. The resulting flat
+ * data will be in PEL (platform event log) format.
+ * The ErrlManager is the primary user of this call.
+ *
+ * @param[in,out] o_buffer Points to data block to be filled
+ * @param[in] i_cbBuffer Count of bytes in buffer supplied
+ *
+ * @return Count of bytes copied to caller's
+ * buffer or else zero if it does not fit.
+ */
+ uint64_t flatten( void * o_buffer, const uint64_t i_cbBuffer );
+
+
+ /**
+ * @brief Disabled copy constructor and assignment operator
+ */
+ ErrlEntry(const ErrlEntry& i_right);
+ ErrlEntry& operator=(const ErrlEntry& i_right);
+
private:
// Data Members
ErrlPrvt iv_Private; // private header object
diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H
index 7d41c0ea1..3dc21b895 100644
--- a/src/include/usr/errl/errlmanager.H
+++ b/src/include/usr/errl/errlmanager.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/errl/errlmanager.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/errlmanager.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
+ */
#ifndef ERRLMANAGER_H
#define ERRLMANAGER_H
/**
@@ -40,15 +41,11 @@
#include <vector>
#include <kernel/timemgr.H>
#include <hbotcompid.H>
-
-
-
+#include <hwas/common/hwasCallout.H>
namespace ERRORLOG
{
-
-
/**
* @brief Global function to log an error
* Writes the log to PNOR where committed logs are kept.
@@ -68,8 +65,6 @@ namespace ERRORLOG
*
* @return None
*/
-
-// TODO Work item 4104 to make comitter comp required, no default.
void errlCommit(errlHndl_t& io_err, compId_t i_committerComp );
/*****************************************************************************/
@@ -119,6 +114,29 @@ public:
*/
uint32_t getUniqueErrId();
+ /**
+ * @brief Sets the HWAS ProcessCallout function pointer
+ *
+ * This is called by HWAS to inform errlmanager that HWAS is loaded and
+ * therefore it can call HWAS to process callout information in an errlog
+ *
+ * It is a static function because a module cannot call an interface on a
+ * singleton in another module
+ */
+ static void setHwasProcessCalloutFn(HWAS::processCalloutFn i_fn);
+
+ /**
+ * @brief Returns the HWAS ProcessCallout function pointer
+ *
+ * This is called by ErrlEntry::commit to get the HWAS ProcessCallout
+ * function pointer, this is called to process callout information in an
+ * errlog, if NULL is returned then the function cannot be called (because
+ * the HWAS module is not loaded)
+ *
+ * @return HWAS::processCalloutFn function pointer
+ */
+ HWAS::processCalloutFn getHwasProcessCalloutFn() const;
+
protected:
/**
* @brief Destructor
@@ -166,8 +184,17 @@ private:
/**
* @brief Serialization for error log commits.
*/
- mutex_t iv_mutex;
+ mutex_t iv_commitMutex;
+ /**
+ * @brief Pointer to the HWAS processCallout function
+ */
+ HWAS::processCalloutFn iv_hwasProcessCalloutFn;
+
+ /**
+ * @brief Serialization for accessing iv_hwasProcessCalloutFn
+ */
+ mutable mutex_t iv_hwasMutex;
};
} // End namespace
diff --git a/src/include/usr/errl/errlreasoncodes.H b/src/include/usr/errl/errlreasoncodes.H
index fda12fcf9..bf10908b6 100644
--- a/src/include/usr/errl/errlreasoncodes.H
+++ b/src/include/usr/errl/errlreasoncodes.H
@@ -1,25 +1,26 @@
-// 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
-//
-// 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/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
+ */
#ifndef __ERRL_REASON_CODES_H
#define __ERRL_REASON_CODES_H
@@ -50,6 +51,7 @@ enum errlReasonCode
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,
//........
HBERRL_LAST_ERR = HBERRL_COMP_ID | 0xFF
};
diff --git a/src/include/usr/errl/errludcallout.H b/src/include/usr/errl/errludcallout.H
new file mode 100644
index 000000000..ce0fb6cec
--- /dev/null
+++ b/src/include/usr/errl/errludcallout.H
@@ -0,0 +1,159 @@
+/* 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
+ */
+#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
+*/
+
+#include <errl/errluserdetails.H>
+
+#ifndef PARSER
+
+// Forward reference
+namespace TARGETING
+{
+ class Target;
+}
+
+#include <hwas/common/hwasCallout.H>
+
+namespace ERRORLOG
+{
+
+/**
+ * @class ErrlUserDetailsCallout
+ *
+ * Adds Callout FFDC to an error log as user detail data
+ */
+class ErrlUserDetailsCallout : public ErrlUserDetails
+{
+public:
+
+ /**
+ * @brief Construct a hardware callout user detail
+ *
+ * @param[in] i_pTargetData The hardware target data
+ * @param[in] i_targetDataLength length of i_pTargetData
+ * @param[in] i_priority Priority of the callout
+ * @param [in] i_deconfigState Enum indicating whether the failing part
+ * should be deconfigured.
+ * @param [in] i_gardErrorType to indicate what type of failure occured
+ *
+ * @return void
+ */
+ ErrlUserDetailsCallout(
+ const void *i_pTargetData,
+ uint32_t i_targetDataLength,
+ const HWAS::callOutPriority i_priority,
+ const HWAS::DeconfigEnum i_deconfigState,
+ const HWAS::GARD_ErrorType i_gardErrorType);
+
+ /**
+ * @brief Add a procedure ( software ) callout
+ * Adds the given service procedure to the list
+ * of callouts for the log
+ *
+ * @param[in] i_procedure Procedure identifier.
+ * @param[in] i_priority Priority of the callout
+ *
+ * @return void
+ */
+ ErrlUserDetailsCallout(const HWAS::epubProcedureID i_procedure,
+ const HWAS::callOutPriority i_priority);
+ /**
+ * @brief Destructor
+ */
+ virtual ~ErrlUserDetailsCallout() { };
+
+private:
+ // Disabled
+ ErrlUserDetailsCallout(const ErrlUserDetailsCallout &);
+ ErrlUserDetailsCallout & operator=(const ErrlUserDetailsCallout &);
+
+};
+
+}
+
+#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/errludparserfactoryerrl.H b/src/include/usr/errl/errludparserfactoryerrl.H
index b38059465..5f5e7ad9b 100644
--- a/src/include/usr/errl/errludparserfactoryerrl.H
+++ b/src/include/usr/errl/errludparserfactoryerrl.H
@@ -1,25 +1,26 @@
-// 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
+/* 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
@@ -60,6 +61,7 @@ public:
registerParser<ErrlUserDetailsParserBackTrace>(HBERRL_UDT_BACKTRACE);
registerParser<ErrlUserDetailsParserAttribute>(HBERRL_UDT_ATTRIBUTE);
registerParser<ErrlUserDetailsParserLogRegister>(HBERRL_UDT_LOGREGISTER);
+ registerParser<ErrlUserDetailsParserCallout>(HBERRL_UDT_CALLOUT);
}
private:
diff --git a/src/include/usr/errl/hberrltypes.H b/src/include/usr/errl/hberrltypes.H
index b9727a694..bea8b8345 100644
--- a/src/include/usr/errl/hberrltypes.H
+++ b/src/include/usr/errl/hberrltypes.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/errl/hberrltypes.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/hberrltypes.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
+ */
#ifndef HBERRLTYPES_H
#define HBERRLTYPES_H
/**
@@ -52,6 +53,7 @@ enum errlUserDataType_t
HBERRL_UDT_BACKTRACE = 3,
HBERRL_UDT_ATTRIBUTE = 4,
HBERRL_UDT_LOGREGISTER = 5,
+ HBERRL_UDT_CALLOUT = 6,
};
diff --git a/src/include/usr/hwas/common/hwasCallout.H b/src/include/usr/hwas/common/hwasCallout.H
new file mode 100644
index 000000000..e1078081b
--- /dev/null
+++ b/src/include/usr/hwas/common/hwasCallout.H
@@ -0,0 +1,231 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/hwas/common/hwasCallout.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 __HWAS_HWASCALLOUT_H
+#define __HWAS_HWASCALLOUT_H
+/**
+ * @file hwasCallout.H
+ *
+ * HardWare Availability Service Callout prototypes.
+ */
+
+
+/******************************************************************************/
+// Includes
+/******************************************************************************/
+#include <targeting/common/target.H>
+#include <errl/errlud.H>
+
+namespace HWAS
+{
+// from hwsv/server/hwsvTypes.H:
+// Legacy HOM deconfig enum
+enum DeconfigEnum
+{
+ NO_DECONFIG,
+ DECONFIG,
+ DELAYED_DECONFIG,
+};
+
+// from gard/fsp/GardExtIntData.H
+typedef enum {
+ GARD_NULL = 0x00,
+ GARD_Pending = 0xE1,
+ GARD_PendingCmplt = 0xEE,
+ GARD_Unrecoverable = 0xE2,
+ GARD_Fatal = 0xE3,
+ GARD_Fabric = 0xE4,
+ GARD_Computation = 0xE5,
+ GARD_ComputationCmplt = 0xEC,
+ GARD_Predictive = 0xE6,
+ GARD_PredictiveCmplt = 0xE9,
+ GARD_ByAssociation = 0xE8,
+ GARD_ResourceRecovery = 0xEA,
+ GARD_Cmplt = 0xEF,
+ GARD_Func = 0xE7,
+ GARD_FuncCmplt = 0xEB,
+ GARD_DmaRecoverable = 0xE0,
+ GARD_DmaUnrecoverable = 0xED,
+ GARD_Tod = 0xD0,
+ GARD_TodCmplt = 0xD1,
+ GARD_Slb = 0xD2,
+ GARD_SlbCmplt = 0xD3,
+ GARD_ProcRecoverable = 0xD4,
+ GARD_ProcRecoverableCmplt = 0xD5,
+ GARD_TimeFac = 0xD6,
+ GARD_TimeFacCmplt = 0xD7,
+ GARD_GxBusError = 0xD8,
+ GARD_PowerBusError = 0xDA,
+ GARD_Withheld = 0xD9,
+ GARD_PoreError = 0xDC,
+ GARD_NxError = 0xDB,
+ GARD_Void = 0xFF
+} GARD_ErrorType;
+
+// from src/epub/fsp/epub_service_codes.H
+// nuVersionSID 1.24.14.36 versionSID 1.24.14.36
+ /** @enum epubProcedureID
+ * This enumeration contains all the Procedures to be used with a callout
+ * in an SRC.
+ */
+enum epubProcedureID
+{
+ EPUB_PRC_NONE = 0x00,
+ EPUB_PRC_FIND_DECONFIGURED_PART = 0x01,
+ EPUB_PRC_EARLY_TERM = 0x02,
+ EPUB_PRC_USER_ERR = 0x03,
+ EPUB_PRC_SP_CODE = 0x04,
+ EPUB_PRC_PHYP_CODE = 0x05,
+ EPUB_PRC_INT_PROB = 0x06,
+ EPUB_PRC_TOD_PROB = 0x07,
+ EPUB_PRC_ALL_PROCS = 0x08,
+ EPUB_PRC_ALL_MEMCRDS = 0x09,
+ EPUB_PRC_INVALID_PART = 0x0A,
+ EPUB_PRC_RIO_PORTX = 0x0B,
+ EPUB_PRC_DIMM_CONNECTOR = 0x0C,
+ EPUB_PRC_FNM_CODE = 0x0D,
+ EPUB_PRC_WAIT_FOR_PHYP = 0x0E,
+ EPUB_PRC_SMA_CODE = 0x0F,
+ EPUB_PRC_LVL_SUPP = 0x10,
+ EPUB_PRC_SUE_PREVERROR = 0x11,
+ EPUB_PRC_CODE_UPDATE = 0x12,
+ EPUB_PRC_PLUG_COUNT_EXCEED = 0x13,
+ EPUB_PRC_SYSUNIT = 0x14,
+ EPUB_PRC_IOPATH = 0x15,
+ EPUB_PRC_PROCPATH = 0x16,
+ EPUB_PRC_FIPS_DUMP = 0x17,
+ EPUB_PRC_REBOOT = 0x18,
+ EPUB_PRC_THERMAL_FAULT = 0x19,
+ EPUB_PRC_BACKPLANE = 0x1A,
+ EPUB_PRC_ATTN_LINE = 0x1B,
+ EPUB_PRC_NO_VPD_FOR_FRU = 0x1C,
+ EPUB_PRC_IOBRIDGE = 0x1D,
+ EPUB_PRC_ANCHOR = 0x1E,
+ EPUB_PRC_SYSTEM_VPD = 0x1F,
+ EPUB_PRC_ENCLOSURE_VPD = 0x20,
+ EPUB_PRC_SURV_HMC_ERROR = 0x21,
+ EPUB_PRC_MEMORY_PLUGGING_ERROR = 0x22,
+ EPUB_PRC_MEM_SCRUB_REBOOT = 0x23,
+ EPUB_PRC_SMP_CABLE = 0x24,
+ EPUB_PRC_MS_PROC_TIMEOUT = 0x25,
+ EPUB_PRC_JTAG_PATH = 0x26,
+ EPUB_PRC_MNFG_DIMM_ISOLATION = 0x27,
+ EPUB_PRC_LOGAUTH_WARN = 0x28,
+ EPUB_PRC_IIC_BUS_ISOLATION = 0x29,
+ EPUB_PRC_FABRIC_ISOLATION = 0x2A,
+ EPUB_PRC_STATIC_IP = 0x2B,
+ EPUB_PRC_MUX_CARD = 0x2C,
+ EPUB_PRC_FSI_PATH = 0x2D,
+ EPUB_PRC_SERV_PROC = 0x2E,
+ EPUB_PRC_PSI_LINK = 0x2F,
+ EPUB_PRC_PROC_AB_BUS = 0x30,
+ EPUB_PRC_PROC_XYZ_BUS = 0x31,
+ EPUB_PRC_GX_SLOT = 0x32,
+ EPUB_PRC_MEMBUS_REPAIR = 0x33,
+ EPUB_PRC_MEMBUS_ERROR = 0x34,
+ EPUB_PRC_NET_SWITCH = 0x35,
+ EPUB_PRC_OVER_TEMP = 0x36,
+ EPUB_PRC_EIBUS_ERROR = 0x37,
+ EPUB_PRC_CCM_VPD_CARD = 0x38,
+ EPUB_PRC_HOST_ONE_NETWORK = 0x39,
+ EPUB_PRC_NET_CABLE_MISPLUG = 0x3A,
+ EPUB_PRC_NET_DATA_NOT_AVAILABLE = 0x3B,
+ EPUB_PRC_MAC_ADDRESS_DUP = 0x3C,
+ EPUB_PRC_INVALID_HUB_CONNECTION = 0x3D,
+ EPUB_PRC_MISSING_NODE = 0x3E,
+ EPUB_PRC_POWER_ERROR = 0x3F,
+ EPUB_PRC_NO_LINKS = 0x40,
+ EPUB_PRC_BAD_IP_SUBNET = 0x41,
+ EPUB_PRC_RFSP = 0x42,
+ EPUB_PRC_STANDBY_POWR = 0x43,
+ EPUB_PRC_FSP_LVL_SUPP = 0x44,
+ EPUB_PRC_BALANCED_MEMORY = 0x45,
+ EPUB_PRC_CHECK_POWR_SRCS = 0x46,
+ EPUB_PRC_BPC_PROC = 0x47,
+ EPUB_PRC_BLADE_LNK_DWN = 0x48,
+ EPUB_PRC_WRAP_PRBS = 0x49,
+ EPUB_PRC_PRBS_SWRAP = 0x4A,
+ EPUB_PRC_INVALID_IP = 0x4B,
+ EPUB_PRC_CCIN_NOT_FOUND = 0x4C,
+ EPUB_PRC_PERFORMANCE_DEGRADED = 0x4D,
+ EPUB_PRC_WKP_FAIL = 0x4E,
+ EPUB_PRC_MEMORY_UE = 0x4F,
+ EPUB_PRC_PLATFORM_CODE = 0x50,
+ EPUB_PRC_MAX
+};
+
+// from srci/fsp/srci.H
+enum callOutPriority
+{
+ SRCI_PRIORITY_LOW = 1,
+ SRCI_PRIORITY_MEDC = 2,
+ SRCI_PRIORITY_MEDB = 3,
+ SRCI_PRIORITY_MEDA = 4,
+ SRCI_PRIORITY_MED = 5,
+ SRCI_PRIORITY_HIGH = 6
+};
+
+
+/**
+ * @brief processCallout process the userdetail for a callout, calling
+ * the deconfigure and/or GARD funcationality as appropriate
+ *
+ * @param[in] i_errlPlid Error log PLID to store in GARD Record.
+ * @param[in] i_pData Pointer to the callout bundle
+ * @param[in] i_Size size of the data in the callout bundle
+ *
+ * @return void
+ */
+void processCallout(const uint32_t i_errlPlid,
+ uint8_t *i_pData,
+ uint64_t i_Size);
+
+// typedef for function pointer that the errlog class will use.
+typedef void (*processCalloutFn)(const uint32_t, uint8_t *, uint64_t);
+
+//
+const uint8_t HW_CALLOUT = 0x01;
+const uint8_t PROCEDURE_CALLOUT = 0x02;
+
+const uint8_t TARGET_IS_SENTINEL = 0xF0;
+
+typedef struct callout_ud
+{
+ uint8_t type;
+ callOutPriority priority; // uint8_t
+ union {
+ struct { // deconfigure / gard
+ DeconfigEnum deconfigState; // uint8_t
+ GARD_ErrorType gardErrorType; // uint8_t
+ uint32_t cpuid;
+ } __attribute__((packed));
+ struct { // callout
+ epubProcedureID procedure; // uint8_t
+ } __attribute__((packed));
+ };
+} __attribute__((packed)) callout_ud_t;
+
+
+}; // end namespace
+
+#endif
diff --git a/src/include/usr/hwas/common/hwas_reasoncodes.H b/src/include/usr/hwas/common/hwas_reasoncodes.H
index afd26b95a..384bfba70 100644
--- a/src/include/usr/hwas/common/hwas_reasoncodes.H
+++ b/src/include/usr/hwas/common/hwas_reasoncodes.H
@@ -31,6 +31,7 @@ namespace HWAS
enum HwasModuleID
{
MOD_DECONFIG_GARD = 0x01,
+ MOD_PROCESS_CALLOUT = 0x02,
};
enum HwasReasonCode
@@ -39,6 +40,7 @@ namespace HWAS
RC_TARGET_NOT_GARDABLE = HWAS_COMP_ID | 0x02,
RC_GARD_REPOSITORY_FULL = HWAS_COMP_ID | 0x03,
RC_TARGET_NOT_FOUND_FOR_GARD_RECORD = HWAS_COMP_ID | 0x04,
+ RC_INVALID_TARGET = HWAS_COMP_ID | 0x05,
};
};
diff --git a/src/include/usr/hwas/deconfigGard.H b/src/include/usr/hwas/deconfigGard.H
index b3045d8b4..8d34070b7 100644
--- a/src/include/usr/hwas/deconfigGard.H
+++ b/src/include/usr/hwas/deconfigGard.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/hwas/deconfigGard.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/hwas/deconfigGard.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
+ */
/**
* @file deconfigGard.H
*
@@ -70,18 +71,6 @@ class DeconfigGard
public:
/**
- * @enum GardSeverity
- *
- * Defines the possible severities of a GARD Record
- */
- enum GardSeverity
- {
- GARD_SEVERITY_FATAL = 1,
- GARD_SEVERITY_PREDICTIVE = 2,
- GARD_SEVERITY_MANUAL = 3,
- };
-
- /**
* @enum DeconfigCause
*
* Defines the possible causes for the creation of a Deconfigure Record
@@ -110,7 +99,7 @@ public:
uint32_t iv_chipMruEcid; // TODO is there an ECID type?
};
uint32_t iv_errlogPlid;
- uint8_t iv_severity; // Value from GardSeverity
+ uint8_t iv_errorType; // Value from GARD_ErrorType
uint8_t iv_padding[3];
uint32_t iv_gardTime;
};
@@ -122,7 +111,7 @@ public:
/**
* @struct DeconfigureRecord
*
- * Defines a Deconfigure Record
+ * Defines a Deconfigure Record for deferred deconfigures
*
* Only one Deconfigure Record can exist for a specific Target
*/
@@ -197,13 +186,13 @@ public:
*
* @param[in] i_target Reference to Target to create GARD Record for.
* @param[in] i_errlPlid Error log PLID to store in GARD Record.
- * @param[in] i_severity Severity of the GARD Record.
+ * @param[in] i_errorType error type of the GARD Record.
*
* @return errlHndl_t. Error log handle.
*/
errlHndl_t createGardRecord(const TARGETING::Target & i_target,
const uint32_t i_errlPlid,
- const GardSeverity i_severity);
+ const GARD_ErrorType i_errorType);
/**
* @brief Gets the specified Deconfigure Records.
@@ -382,13 +371,13 @@ private:
*
* @param[in] i_target Reference to Target to create GARD Record for.
* @param[in] i_errlPlid Error log PLID to store in GARD Record.
- * @param[in] i_severity Severity of the GARD Record.
+ * @param[in] i_errorType Error Type of the GARD Record.
*
* @return errlHndl_t. Error log handle.
*/
errlHndl_t _createGardRecord(const TARGETING::Target & i_target,
const uint32_t i_errlPlid,
- const GardSeverity i_severity);
+ const GARD_ErrorType i_errorType);
/**
* @brief Clears the specified GARD Records.
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index 5f0fa4fbf..992f0a0c1 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -37,8 +37,11 @@
#include <errl/errlentry.H>
#include <errl/errlmanager.H>
#include <errl/errludbacktrace.H>
+#include <errl/errludcallout.H>
#include <trace/interface.H>
#include <arch/ppc.H>
+#include <hwas/common/hwasCallout.H>
+#include <targeting/common/targetservice.H>
namespace ERRORLOG
{
@@ -245,6 +248,48 @@ void ErrlEntry::removeBackTrace()
iv_pBackTrace = NULL;
}
+
+////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+void ErrlEntry::addHwCallout(const TARGETING::Target *i_target,
+ const HWAS::callOutPriority i_priority,
+ const HWAS::DeconfigEnum i_deconfigState,
+ const HWAS::GARD_ErrorType i_gardErrorType)
+{
+ TRACFCOMP(g_trac_errl, ENTER_MRK"addHwCallout(%p, 0x%x)",
+ i_target, i_priority);
+
+ if (i_target == TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL)
+ {
+ ErrlUserDetailsCallout(
+ &HWAS::TARGET_IS_SENTINEL, sizeof(HWAS::TARGET_IS_SENTINEL),
+ i_priority, i_deconfigState, i_gardErrorType).addToLog(this);
+ }
+ else
+ { // we got a non MASTER_SENTINEL target, therefore the targeting
+ // module is loaded, therefore we can make this call.
+ TARGETING::EntityPath ep;
+ ep = i_target->getAttr<TARGETING::ATTR_PHYS_PATH>();
+
+ ErrlUserDetailsCallout(&ep, sizeof(ep),
+ i_priority, i_deconfigState, i_gardErrorType).addToLog(this);
+ }
+} // addHwCallout
+
+
+////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+void ErrlEntry::addProcedureCallout(const HWAS::epubProcedureID i_procedure,
+ const HWAS::callOutPriority i_priority)
+{
+ TRACDCOMP( g_trac_errl, ENTER_MRK"addProcedureCallout(0x%x, 0x%x)",
+ i_procedure, i_priority);
+
+ ErrlUserDetailsCallout(i_procedure, i_priority).addToLog(this);
+
+} // addProcedureCallout
+
+
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
errlSeverity_t ErrlEntry::sev() const
@@ -253,7 +298,6 @@ errlSeverity_t ErrlEntry::sev() const
}
-
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
void ErrlEntry::setSev(const errlSeverity_t i_sev)
@@ -288,7 +332,6 @@ epubSubSystem_t ErrlEntry::subSys() const
}
-
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
void ErrlEntry::setSubSys(const epubSubSystem_t i_subSys)
@@ -297,6 +340,7 @@ void ErrlEntry::setSubSys(const epubSubSystem_t i_subSys)
return;
}
+
///////////////////////////////////////////////////////////////////////////////
// for use by ErrlManager
void ErrlEntry::commit( compId_t i_committerComponent )
@@ -308,6 +352,41 @@ void ErrlEntry::commit( compId_t i_committerComponent )
// User header contains the component ID of the committer.
iv_User.setComponentId( i_committerComponent );
+ // see if HWAS has been loaded and has set the processCallout function
+ // TODO RTC 46680
+ // If the PNOR resource provider commits an error then this function will
+ // call HWAS to process the callouts/deconfigure/GARD requests in the
+ // error log, if the HWAS function is not paged into memory then VMM will
+ // attempt to page it in which will invoke the PNOR resource provider,
+ // this will deadlock if the PNOR resource provider is waiting for the
+ // error log commit to complete before processing further requests. There
+ // may be other similar deadlock scenarios involving 'base' functions
+ // logging errors. This can be solved with a separate errl-manager task
+ // that processes error logs
+ HWAS::processCalloutFn pFn;
+ pFn = ERRORLOG::theErrlManager::instance().getHwasProcessCalloutFn();
+ if (pFn != NULL)
+ {
+ // look thru the errlog for any Callout UserDetail sections
+ for(std::vector<ErrlUD*>::iterator it = iv_SectionVector.begin();
+ it != iv_SectionVector.end();
+ it++ )
+ {
+ // if this is a CALLOUT
+ if ((HBERRL_COMP_ID == (*it)->iv_header.iv_compId) &&
+ (1 == (*it)->iv_header.iv_ver) &&
+ (HBERRL_UDT_CALLOUT == (*it)->iv_header.iv_sst))
+ {
+ // call HWAS to have this processed
+ (*pFn)(plid(),(*it)->iv_pData, (*it)->iv_Size);
+ }
+ } // for each SectionVector
+ } // if HWAS module loaded
+ else
+ {
+ TRACFCOMP(g_trac_errl, INFO_MRK"hwas processCalloutFn not set!");
+ }
+
// Add the captured backtrace to the error log
if (iv_pBackTrace)
{
@@ -354,7 +433,7 @@ uint64_t ErrlEntry::flatten( void * o_pBuffer, uint64_t i_bufsize )
if ( i_bufsize < l_flatCount )
{
// buffer is not big enough; return zero
- TRACFCOMP( ERRORLOG::g_trac_errl, ERR_MRK"Invalid buffer size");
+ TRACFCOMP( g_trac_errl, ERR_MRK"Invalid buffer size");
l_flatCount = 0;
break;
}
diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C
index 45a1fd3ca..c615aeeba 100644
--- a/src/usr/errl/errlmanager.C
+++ b/src/usr/errl/errlmanager.C
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/errl/errlmanager.C $
-//
-// 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/usr/errl/errlmanager.C $
+ *
+ * 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
+ */
/**
* @file errlmanager.C
*
@@ -81,7 +82,10 @@ ErrlManager::ErrlManager()
// PNOR will be reinitialized every time hostboot runs
iv_currLogId = 0;
- mutex_init(&iv_mutex);
+ iv_hwasProcessCalloutFn = NULL;
+
+ mutex_init(&iv_commitMutex);
+ mutex_init(&iv_hwasMutex);
// Scaffolding.
// For now, put error logs in a 64KB buffer in L3 RAM
@@ -132,7 +136,7 @@ void ErrlManager::commitErrLog(errlHndl_t& io_err, compId_t i_committerComp )
TRACFCOMP(g_trac_errl, "commitErrLog() called by %.4X for plid=0x%X, Reasoncode=%.4X", i_committerComp, io_err->plid(), io_err->reasonCode() );
// lock sem
- mutex_lock(&iv_mutex);
+ mutex_lock(&iv_commitMutex);
// Ask the ErrlEntry to assign commit component, commit time, etc.
io_err->commit( i_committerComp );
@@ -174,7 +178,7 @@ void ErrlManager::commitErrLog(errlHndl_t& io_err, compId_t i_committerComp )
// unlock sem
- mutex_unlock(&iv_mutex);
+ mutex_unlock(&iv_commitMutex);
delete io_err;
io_err = NULL;
@@ -194,6 +198,26 @@ uint32_t ErrlManager::getUniqueErrId()
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
+void ErrlManager::setHwasProcessCalloutFn(HWAS::processCalloutFn i_fn)
+{
+ mutex_lock(&(ERRORLOG::theErrlManager::instance().iv_hwasMutex));
+ ERRORLOG::theErrlManager::instance().iv_hwasProcessCalloutFn = i_fn;
+ mutex_unlock(&(ERRORLOG::theErrlManager::instance().iv_hwasMutex));
+}
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+HWAS::processCalloutFn ErrlManager::getHwasProcessCalloutFn() const
+{
+ HWAS::processCalloutFn l_fp = NULL;
+ mutex_lock(&iv_hwasMutex);
+ l_fp = iv_hwasProcessCalloutFn;
+ mutex_unlock(&iv_hwasMutex);
+ return l_fp;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
// Global function (not a method on an object) to commit the error log.
void errlCommit(errlHndl_t& io_err, compId_t i_committerComp )
{
diff --git a/src/usr/errl/errludcallout.C b/src/usr/errl/errludcallout.C
new file mode 100644
index 000000000..aa6b61204
--- /dev/null
+++ b/src/usr/errl/errludcallout.C
@@ -0,0 +1,102 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/errl/errludcallout.C $
+ *
+ * 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
+ */
+/**
+ * @file errludcallout.C
+ *
+ * @brief Implementation of ErrlUserDetailsCallout
+ */
+#include <sys/task.h>
+#include <errl/errludcallout.H>
+
+#include <targeting/common/targetservice.H>
+#include <targeting/common/util.H>
+#include <targeting/common/trace.H>
+
+namespace ERRORLOG
+{
+
+extern TARGETING::TARG_TD_t g_trac_errl;
+
+//------------------------------------------------------------------------------
+// Hardware callout
+ErrlUserDetailsCallout::ErrlUserDetailsCallout(
+ const void *i_pTargetData,
+ uint32_t i_targetDataLength,
+ const HWAS::callOutPriority i_priority,
+ const HWAS::DeconfigEnum i_deconfigState,
+ const HWAS::GARD_ErrorType i_gardErrorType)
+{
+ TRACDCOMP(g_trac_errl, "HWCallout entry");
+
+ // Set up ErrlUserDetails instance variables
+ iv_CompId = HBERRL_COMP_ID;
+ iv_Version = 1;
+ iv_SubSection = HBERRL_UDT_CALLOUT;
+
+ //iv_merge = false; // use the default of false
+
+ uint32_t pDataLength = sizeof(HWAS::callout_ud_t) + i_targetDataLength;
+ HWAS::callout_ud_t *pData;
+ pData = reinterpret_cast<HWAS::callout_ud_t *>
+ (reallocUsrBuf(pDataLength));
+ pData->type = HWAS::HW_CALLOUT;
+ pData->priority = i_priority;
+ pData->cpuid = task_getcpuid();
+ pData->deconfigState = i_deconfigState;
+ pData->gardErrorType = i_gardErrorType;
+ memcpy(pData + 1, i_pTargetData, i_targetDataLength);
+
+ TRACDCOMP(g_trac_errl, "HWCallout exit; pDataLength %d", pDataLength);
+
+} // Hardware callout
+
+
+//------------------------------------------------------------------------------
+// Procedure callout
+ErrlUserDetailsCallout::ErrlUserDetailsCallout(
+ const HWAS::epubProcedureID i_procedure,
+ const HWAS::callOutPriority i_priority)
+{
+ TRACDCOMP(g_trac_errl, "Procedure Callout");
+
+ // Set up ErrlUserDetails instance variables
+ iv_CompId = HBERRL_COMP_ID;
+ iv_Version = 1;
+ iv_SubSection = HBERRL_UDT_CALLOUT;
+
+ //iv_merge = false; // use the default of false
+
+ HWAS::callout_ud_t *pData;
+ pData = reinterpret_cast<HWAS::callout_ud_t *>
+ (reallocUsrBuf(sizeof(HWAS::callout_ud_t)));
+
+ pData->type = HWAS::PROCEDURE_CALLOUT;
+ pData->procedure = i_procedure;
+ pData->priority = i_priority;
+
+ TRACDCOMP(g_trac_errl, "Procedure Callout exit");
+
+} // Procedure callout
+
+}
diff --git a/src/usr/errl/makefile b/src/usr/errl/makefile
index 72f9ab76f..7ce89dc70 100644
--- a/src/usr/errl/makefile
+++ b/src/usr/errl/makefile
@@ -1,11 +1,11 @@
-# IBM_PROLOG_BEGIN_TAG
+# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/usr/errl/makefile $
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011
+# COPYRIGHT International Business Machines Corp. 2011-2012
#
# p1
#
@@ -19,13 +19,14 @@
#
# Origin: 30
#
-# IBM_PROLOG_END
+# IBM_PROLOG_END_TAG
ROOTPATH = ../../..
MODULE = errl
OBJS = errlentry.o errlmanager.o errlsctn.o errlsctnhdr.o errlprvt.o errluh.o \
errlud.o errlsrc.o errluserdetails.o backtrace.o errludtarget.o \
- errludstring.o errludbacktrace.o errludattribute.o errludlogregister.o
+ errludstring.o errludbacktrace.o errludattribute.o errludlogregister.o \
+ errludcallout.o
SUBDIRS = test.d parser.d
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H
index 2abca0d09..31d128b75 100644
--- a/src/usr/errl/test/errltest.H
+++ b/src/usr/errl/test/errltest.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/errl/test/errltest.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/usr/errl/test/errltest.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
+ */
#ifndef __ERRLTEST_H
#define __ERRLTEST_H
@@ -36,6 +37,12 @@
#include <trace/trace.H>
#include <hbotcompid.H>
+#include <errl/errludtarget.H>
+#include <targeting/common/target.H>
+#include <targeting/common/iterators/rangefilter.H>
+#include <targeting/common/predicates/predicates.H>
+#include <hwas/common/hwasCallout.H>
+
#define TEST_SEVERITY ERRORLOG::ERRL_SEV_INFORMATIONAL
@@ -331,6 +338,79 @@ public:
}
}
+
+ /**
+ * @brief Test callouts
+ */
+ void testErrl3(void)
+ {
+ TS_TRACE( "test testErrl3");
+ do
+ {
+ // Create an error log
+ errlHndl_t errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ HBERRL_TEST_MOD_ID,
+ HBERRL_TEST_REASON_CODE);
+
+ // Make sure log is created
+ if (errl == NULL)
+ {
+ TS_FAIL("testErrl3: createErrlLog() returns NULL pointer!");
+ break;
+ }
+
+ // test the different callout types
+
+ // find a proc target
+ TARGETING::PredicateCTM procChipFilter(
+ TARGETING::CLASS_CHIP, TARGETING::TYPE_PROC);
+ TARGETING::TargetRangeFilter pProc(
+ TARGETING::targetService().begin(),
+ TARGETING::targetService().end(),
+ &procChipFilter);
+
+ // find a membuf target
+ TARGETING::PredicateCTM membufChipFilter(
+ TARGETING::CLASS_CHIP,TARGETING::TYPE_MEMBUF);
+ TARGETING::TargetRangeFilter pMembuf(
+ TARGETING::targetService().begin(),
+ TARGETING::targetService().end(),
+ &membufChipFilter);
+
+ TS_TRACE( "test callout pProc %p", *pProc);
+ ERRORLOG::ErrlUserDetailsTarget(*pProc).addToLog(errl);
+
+ errl->addHwCallout(*pProc,
+ HWAS::SRCI_PRIORITY_LOW,
+ HWAS::DECONFIG,
+ HWAS::GARD_Fatal);
+
+ errl->addHwCallout(*pMembuf,
+ HWAS::SRCI_PRIORITY_MED,
+ HWAS::DECONFIG,
+ HWAS::GARD_NULL);
+
+ errl->addHwCallout(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL,
+ HWAS::SRCI_PRIORITY_LOW,
+ HWAS::DECONFIG,
+ HWAS::GARD_PoreError);
+
+ errl->addHwCallout(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL,
+ HWAS::SRCI_PRIORITY_MED,
+ HWAS::DECONFIG,
+ HWAS::GARD_NULL);
+
+ errl->addProcedureCallout(
+ HWAS::EPUB_PRC_MEMORY_UE,
+ HWAS::SRCI_PRIORITY_HIGH);
+
+ errlCommit(errl, CXXTEST_COMP_ID);
+ TS_TRACE( "test callout done");
+
+ }
+ while(0);
+ }
};
#endif
diff --git a/src/usr/errl/test/errluserdetailtest.H b/src/usr/errl/test/errluserdetailtest.H
index 2adeefd86..34401ae35 100644
--- a/src/usr/errl/test/errluserdetailtest.H
+++ b/src/usr/errl/test/errluserdetailtest.H
@@ -39,6 +39,7 @@
#include <errl/errludbacktrace.H>
#include <errl/errludtarget.H>
#include <errl/errludlogregister.H>
+#include <errl/errludcallout.H>
#include <errludattribute.H>
#include <targeting/common/targetservice.H>
#include <targeting/common/iterators/rangefilter.H>
@@ -445,6 +446,74 @@ public:
errlCommit(errl, CXXTEST_COMP_ID);
TS_TRACE( "testLogRegister errorlog user detail data - complete");
} // testLogRegister
+
+ /**
+ * @test testCallout - Capture a callout
+ */
+ void testCallout(void)
+ {
+ errlHndl_t errl = NULL;
+
+ TS_TRACE( "testCallout errorlog user detail data");
+ /*@
+ * @errortype
+ * @severity ERRORLOG_SEV_INFORMATIONAL
+ * @moduleid HBERRL_USERDATA_TEST_MOD_ID
+ * @reasoncode HBERRL_TEST_CALLOUT_UD
+ * @userdata1 Test data 1
+ * @userdata2 Test data 2
+ * @devdesc User Details unit test - create callout user detail data
+ */
+ errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ HBERRL_USERDATA_TEST_MOD_ID,
+ HBERRL_TEST_CALLOUT_UD,
+ 0x0001002300450067, // user1
+ 0x008900AB00CD00EF ); // user2
+
+ using namespace TARGETING;
+ ErrlUserDetailsString("Callout test").addToLog(errl);
+
+ // first test with Master
+ ErrlUserDetailsCallout(
+ &HWAS::TARGET_IS_SENTINEL,
+ sizeof(HWAS::TARGET_IS_SENTINEL),
+ HWAS::SRCI_PRIORITY_LOW,
+ HWAS::DECONFIG,
+ HWAS::GARD_PoreError).addToLog(errl);
+
+ ErrlUserDetailsCallout(
+ &HWAS::TARGET_IS_SENTINEL,
+ sizeof(HWAS::TARGET_IS_SENTINEL),
+ HWAS::SRCI_PRIORITY_MED,
+ HWAS::DECONFIG,
+ HWAS::GARD_NULL).addToLog(errl);
+
+ // find a proc target
+ PredicateCTM procChipFilter(CLASS_CHIP,TYPE_PROC);
+ TargetRangeFilter pProc(
+ targetService().begin(), targetService().end(),
+ &procChipFilter);
+ TARGETING::EntityPath ep;
+ ep = pProc->getAttr<TARGETING::ATTR_PHYS_PATH>();
+
+ ErrlUserDetailsCallout(
+ &ep,
+ sizeof(ep),
+ HWAS::SRCI_PRIORITY_LOW,
+ HWAS::DECONFIG,
+ HWAS::GARD_Fatal).addToLog(errl);
+
+ ErrlUserDetailsCallout(
+ HWAS::EPUB_PRC_MEMORY_UE,
+ HWAS::SRCI_PRIORITY_HIGH).addToLog(errl);
+
+ // commit the errorlog
+ errlCommit(errl, CXXTEST_COMP_ID);
+ TS_TRACE( "testCallout done");
+
+ } // testCallout
+
};
#endif
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C
index 9080f64c0..3d3ab10ca 100644
--- a/src/usr/hwas/common/hwas.C
+++ b/src/usr/hwas/common/hwas.C
@@ -88,7 +88,6 @@ errlHndl_t discoverTargets()
hwasState.present = false;
hwasState.functional = false;
hwasState.changedSinceLastIPL = false;
- hwasState.gardLevel = 0;
target->setAttr<ATTR_HWAS_STATE>(hwasState);
}
diff --git a/src/usr/hwas/common/hwasCallout.C b/src/usr/hwas/common/hwasCallout.C
new file mode 100644
index 000000000..6d90c3b6d
--- /dev/null
+++ b/src/usr/hwas/common/hwasCallout.C
@@ -0,0 +1,175 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwas/common/hwasCallout.C $
+ *
+ * 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
+ */
+/**
+ * @file hwasCallout.C
+ *
+ * HardWare Availability Service Callout functions.
+ *
+ */
+
+
+/******************************************************************************/
+// Includes
+/******************************************************************************/
+#include <stdint.h>
+
+#include <hwas/common/hwasCallout.H>
+#include <hwas/common/hwasCommon.H>
+#include <hwas/common/hwas_reasoncodes.H>
+#include <hwas/deconfigGard.H>
+#include <targeting/common/attributes.H>
+#include <errl/errlmanager.H>
+
+namespace HWAS
+{
+
+class RegisterHWASFunctions
+{
+ public:
+ RegisterHWASFunctions()
+ {
+ // HWAS is awake - register our processCallout function
+ HWAS_DBG("module load: calling errlog::setHwasProcessCalloutFn");
+ ERRORLOG::ErrlManager::setHwasProcessCalloutFn((processCalloutFn)(&processCallout));
+ }
+};
+// this causes the function to get run at module load.
+RegisterHWASFunctions registerHWASFunctions;
+
+void processCallout(const uint32_t i_errlPlid,
+ uint8_t *i_pData,
+ uint64_t i_Size)
+{
+ HWAS_INF("processCallout entry. plid 0x%x data %p %lld",
+ i_errlPlid, i_pData, i_Size);
+
+ callout_ud_t *pCalloutUD = (callout_ud_t *)i_pData;
+ errlHndl_t errl = NULL;
+ switch (pCalloutUD->type)
+ {
+ case (HW_CALLOUT):
+ {
+ TARGETING::Target *pTarget;
+ // data after the pCalloutUD structure is either a token
+ // indicating it's the MASTER_PROCESSOR_CHIP_TARGET_SENTINEL
+ // or it's the EntityPath - getAttr<TARGETING::ATTR_PHYS_PATH>()
+ if (*((uint8_t *)(pCalloutUD + 1)) == TARGET_IS_SENTINEL)
+ {
+ pTarget = TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL;
+ // TODO RTC: 45780
+ HWAS_INF("TARGET_SENTINEL - can't handle; exiting");
+ break; // HWAS can't handle this right now...
+ }
+ else
+ {
+ // convert the EntityPath to a Target pointer
+ TARGETING::EntityPath ep;
+ memcpy(&ep, (pCalloutUD + 1), sizeof(ep));
+ pTarget = TARGETING::targetService().toTarget(ep);
+ }
+
+ if (pTarget == NULL)
+ { // should only happen if we have a corrupt errlog or targeting.
+ HWAS_ERR("HW callout; pTarget was NULL!!!");
+
+ /*@
+ * @errortype
+ * @moduleid MOD_PROCESS_CALLOUT
+ * @reasoncode INVALID_TARGET
+ * @devdesc Invalid Target encountered into processCallout
+ */
+ errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ MOD_PROCESS_CALLOUT,
+ RC_INVALID_TARGET);
+ errlCommit(errl, HWAS_COMP_ID);
+ break;
+ }
+
+ HWAS_INF("HW callout; pTarget %p", pTarget);
+ const DeconfigEnum deconfigState = pCalloutUD->deconfigState;
+ const GARD_ErrorType gardErrorType = pCalloutUD->gardErrorType;
+ //const callOutPriority priority = pCalloutUD->priority;
+ switch (gardErrorType)
+ {
+ case (GARD_NULL):
+ { // means no GARD operations
+ break;
+ }
+ default:
+ {
+ // call HWAS common function
+ errl = HWAS::theDeconfigGard().createGardRecord(*pTarget,
+ i_errlPlid,
+ GARD_Fatal);
+ break;
+ }
+ } // switch gardErrorType
+ switch (deconfigState)
+ {
+ case (NO_DECONFIG):
+ {
+ break;
+ }
+ case (DECONFIG):
+ {
+ // call HWAS common function
+ errl = HWAS::theDeconfigGard().deconfigureTarget(*pTarget,
+ i_errlPlid);
+ break;
+ }
+ case (DELAYED_DECONFIG):
+ {
+ // call HWAS common function
+ // TODO RTC: 45781
+ //errl = HWAS::theDeconfigGard().registerDelayedDeconfigure(*pTarget,
+ //i_errlPlid);
+ break;
+ }
+ } // switch deconfigState
+ break;
+ }
+ case (PROCEDURE_CALLOUT):
+ {
+ HWAS_INF("Procedure callout; proc 0x%x priority 0x%x",
+ pCalloutUD->type, pCalloutUD->type);
+ //const HWAS::epubProcedureID procedure = pCalloutUD->procedure;
+ //const callOutPriority priority = pCalloutUD->priority;
+
+ // TODO RTC: 35108
+ // call HWAS common function
+ //errl = HWAS::processCallout(procedure, priority, i_errlPlid);
+ break;
+ }
+ default:
+ {
+ HWAS_ERR("bad data in Callout UD %x", pCalloutUD->type);
+ break;
+ }
+ } // switch
+
+ HWAS_INF("processCallout exit errl %p", errl);
+} // processCallout
+
+}; // end namespace
diff --git a/src/usr/hwas/deconfigGard.C b/src/usr/hwas/deconfigGard.C
index 549c5e09d..6bb65cf39 100644
--- a/src/usr/hwas/deconfigGard.C
+++ b/src/usr/hwas/deconfigGard.C
@@ -206,11 +206,11 @@ errlHndl_t DeconfigGard::deconfigureTarget(TARGETING::Target & i_target,
//******************************************************************************
errlHndl_t DeconfigGard::createGardRecord(const TARGETING::Target & i_target,
const uint32_t i_errlPlid,
- const GardSeverity i_severity)
+ const GARD_ErrorType i_errorType)
{
TRAC_ERR("Usr Request: Create GARD Record");
mutex_lock(&iv_mutex);
- errlHndl_t l_pErr = _createGardRecord(i_target, i_errlPlid, i_severity);
+ errlHndl_t l_pErr = _createGardRecord(i_target, i_errlPlid, i_errorType);
mutex_unlock(&iv_mutex);
return l_pErr;
}
@@ -468,7 +468,7 @@ void DeconfigGard::_getDeconfigureRecords(
//******************************************************************************
errlHndl_t DeconfigGard::_createGardRecord(const TARGETING::Target & i_target,
const uint32_t i_errlPlid,
- const GardSeverity i_severity)
+ const GARD_ErrorType i_errorType)
{
errlHndl_t l_pErr = NULL;
@@ -539,7 +539,7 @@ errlHndl_t DeconfigGard::_createGardRecord(const TARGETING::Target & i_target,
l_pRecord->iv_targetId = l_id;
// TODO Setup iv_cardMruSn or iv_chipMruEcid
l_pRecord->iv_errlogPlid = i_errlPlid;
- l_pRecord->iv_severity = i_severity;
+ l_pRecord->iv_errorType = i_errorType;
l_pRecord->iv_padding[0] = 0;
l_pRecord->iv_padding[1] = 0;
l_pRecord->iv_padding[2] = 0;
diff --git a/src/usr/hwas/makefile b/src/usr/hwas/makefile
index 57958474a..e17115296 100644
--- a/src/usr/hwas/makefile
+++ b/src/usr/hwas/makefile
@@ -30,11 +30,11 @@ VPATH += ${ROOTPATH}/src/usr/hwas/common
MODULE = hwas
-# files in this directory
-OBJS = hwas.o deconfigGard.o
+# files in hwas/common directory
+OBJS = hwas.o hwasCallout.o
-# files in hwas/plat
-OBJS += hwasPlat.o hostbootIstep.o
+# files in this directory
+OBJS += hwasPlat.o hostbootIstep.o deconfigGard.o
SUBDIRS = test.d
diff --git a/src/usr/hwas/test/hwas1test.H b/src/usr/hwas/test/hwas1test.H
index 894db8a1a..168aeba15 100644
--- a/src/usr/hwas/test/hwas1test.H
+++ b/src/usr/hwas/test/hwas1test.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/targeting/test/targetingtest.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/usr/hwas/test/hwas1test.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
+ */
#ifndef __TESTTARGETING_H
#define __TESTTARGETING_H
@@ -80,7 +81,6 @@ public:
l_hwasState.present = true;
l_hwasState.functional = true;
l_hwasState.changedSinceLastIPL = true;
- l_hwasState.gardLevel = 3;
// Now write the modified value back to Targeting.
l_pTarget->setAttr<ATTR_HWAS_STATE>( l_hwasState );
@@ -110,13 +110,6 @@ public:
l_pTarget->getAttr<ATTR_HWAS_STATE>().changedSinceLastIPL );
}
- if ( l_pTarget->getAttr<ATTR_HWAS_STATE>().gardLevel != 3 )
- {
- TS_FAIL( " gardLevel = 0x%x, should be 3",
- l_pTarget->getAttr<ATTR_HWAS_STATE>().gardLevel );
- }
-
-
//
// Now write the original value back.
//
@@ -150,13 +143,6 @@ public:
TS_FAIL( " changedSinceLastIPL = 0x%x, not restored",
l_pTarget->getAttr<ATTR_HWAS_STATE>().changedSinceLastIPL );
}
-
- if ( l_pTarget->getAttr<ATTR_HWAS_STATE>().gardLevel
- != l_orgHwasState.gardLevel )
- {
- TS_FAIL( " gardLevel = 0x%x, not restored",
- l_pTarget->getAttr<ATTR_HWAS_STATE>().gardLevel );
- }
}
TS_TRACE( "testHWASReadWrite exit" );
diff --git a/src/usr/hwas/test/hwasGardTest.H b/src/usr/hwas/test/hwasGardTest.H
index 9338678e9..f1d10c032 100644
--- a/src/usr/hwas/test/hwasGardTest.H
+++ b/src/usr/hwas/test/hwasGardTest.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/hwas/test/hwasGardTest.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/usr/hwas/test/hwasGardTest.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
+ */
#ifndef _HWASGARDTEST_H
#define _HWASGARDTEST_H
@@ -445,7 +446,7 @@ public:
// valid PLID
l_pErr = HWAS::theDeconfigGard().
createGardRecord(*l_pTarget, 0,
- HWAS::DeconfigGard::GARD_SEVERITY_PREDICTIVE);
+ HWAS::GARD_Predictive);
if (l_pErr)
{
@@ -469,11 +470,11 @@ public:
break;
}
- if (l_records[0].iv_severity !=
- HWAS::DeconfigGard::GARD_SEVERITY_PREDICTIVE)
+ if (l_records[0].iv_errorType !=
+ HWAS::GARD_Predictive)
{
- TS_FAIL("testGard4: Record severity %d, expected predictive",
- l_records[0].iv_severity);
+ TS_FAIL("testGard4: Record errorType %d, expected predictive",
+ l_records[0].iv_errorType);
break;
}
@@ -552,7 +553,7 @@ public:
// valid PLID
l_pErr = HWAS::theDeconfigGard().
createGardRecord(*l_pTarget, 0,
- HWAS::DeconfigGard::GARD_SEVERITY_PREDICTIVE);
+ HWAS::GARD_Predictive);
if (l_pErr)
{
@@ -563,7 +564,7 @@ public:
// Create another GARD Record for the chip
l_pErr = HWAS::theDeconfigGard().
createGardRecord(*l_pTarget, 0,
- HWAS::DeconfigGard::GARD_SEVERITY_FATAL);
+ HWAS::GARD_Fatal);
if (l_pErr)
{
@@ -662,7 +663,7 @@ public:
// valid PLID
l_pErr = HWAS::theDeconfigGard().
createGardRecord(*l_pTarget, 0,
- HWAS::DeconfigGard::GARD_SEVERITY_PREDICTIVE);
+ HWAS::GARD_Predictive);
if (l_pErr)
{
@@ -673,7 +674,7 @@ public:
// Create another GARD Record for the chip
l_pErr = HWAS::theDeconfigGard().
createGardRecord(*l_pTarget, 0,
- HWAS::DeconfigGard::GARD_SEVERITY_FATAL);
+ HWAS::GARD_Fatal);
if (l_pErr)
{
@@ -801,7 +802,7 @@ public:
// valid PLID
l_pErr = HWAS::theDeconfigGard().
createGardRecord(*l_pTarget, 0,
- HWAS::DeconfigGard::GARD_SEVERITY_PREDICTIVE);
+ HWAS::GARD_Predictive);
if (l_pErr)
{
@@ -812,7 +813,7 @@ public:
// Create another GARD Record for the chip
l_pErr = HWAS::theDeconfigGard().
createGardRecord(*l_pTarget, 0,
- HWAS::DeconfigGard::GARD_SEVERITY_FATAL);
+ HWAS::GARD_Fatal);
if (l_pErr)
{
diff --git a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C
index 22e954e2d..c35a90eec 100644
--- a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C
+++ b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/hwpf/plat/fapiPlatHwpInvoker.C $
-//
-// 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/usr/hwpf/plat/fapiPlatHwpInvoker.C $
+ *
+ * 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
+ */
/**
* @file fapiPlatHwpInvoker.C
*
@@ -85,6 +86,7 @@ void processEICallouts(const ErrorInfo & i_errInfo,
l_itr != i_errInfo.iv_callouts.end(); ++l_itr)
{
// TODO Add callout to error log
+ // RTC 45800
FAPI_ERR("processEICallouts: Adding target callout to errlog (TODO). Type: 0x%x. Pri: 0x%x",
(*l_itr)->iv_target.getType(), (*l_itr)->iv_priority);
}
@@ -103,6 +105,7 @@ void processEIDeconfigs(const ErrorInfo & i_errInfo,
l_itr != i_errInfo.iv_deconfigs.end(); ++l_itr)
{
// TODO Deconfigure target
+ // RTC 45800
FAPI_ERR("processEIDeconfigs: Deconfiguring target (TODO). Type: 0x%x",
(*l_itr)->iv_target.getType());
}
@@ -110,10 +113,10 @@ void processEIDeconfigs(const ErrorInfo & i_errInfo,
//******************************************************************************
-// processEiGards
+// processEIGards
// Processes any Gard requests in the ReturnCode Error Information
//******************************************************************************
-void processEiGards(const ErrorInfo & i_errInfo,
+void processEIGards(const ErrorInfo & i_errInfo,
errlHndl_t io_pError)
{
// Iterate through gard requests, creating a GARD record for each target
@@ -121,6 +124,7 @@ void processEiGards(const ErrorInfo & i_errInfo,
l_itr != i_errInfo.iv_gards.end(); ++l_itr)
{
// TODO Create GARD record for target
+ // RTC 45800
FAPI_ERR("processEIGards: Garding target (TODO). Type: 0x%x",
(*l_itr)->iv_target.getType());
}
@@ -177,7 +181,7 @@ errlHndl_t fapiRcToErrl(ReturnCode & io_rc)
processEIFfdcs(*l_pErrorInfo, l_pError);
processEICallouts(*l_pErrorInfo, l_pError);
processEIDeconfigs(*l_pErrorInfo, l_pError);
- processEiGards(*l_pErrorInfo, l_pError);
+ processEIGards(*l_pErrorInfo, l_pError);
}
else
{
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index c05071a7a..747334984 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -796,10 +796,9 @@
<id>HWAS_STATE</id>
<description>HardWare Availability Service State Attribute.
Keeps track of Target values poweredOn, present, functional,
- changedSinceLastIPL, and gardLevel</description>
+ and changedSinceLastIPL</description>
<complexType>
- <description>struct - so far contains 4 booleans and a 4-bit GARD level
- field</description>
+ <description>struct - so far contains 5 booleans</description>
<field>
<name>poweredOn</name>
<description>boolean: Target is powered on, or Not.
@@ -833,14 +832,6 @@
<default>0</default>
</field>
<field>
- <name>gardLevel</name>
- <description>GARD Level. This is a 4-bit value.
- comes up as 0 </description>
- <type>uint8_t</type>
- <bits>4</bits>
- <default>0</default>
- </field>
- <field>
<name>dumpfunctional</name>
<description>FSP Only, used by DUMP applet to indicate targets dump capability.
Comes up as 0 which indicates the target is not dump capable</description>
OpenPOWER on IntegriCloud