summaryrefslogtreecommitdiffstats
path: root/src/include/usr/errl
diff options
context:
space:
mode:
authorPaul Nguyen <nguyenp@us.ibm.com>2012-10-03 13:57:02 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-10-30 14:05:30 -0500
commitbc18309697f7a711b04736a4260094377b33f478 (patch)
treec661d34edf0e77ad7968760053cad481ec95c9c5 /src/include/usr/errl
parentc7f00b4ca316fa8296f350cddb7149c09fa21551 (diff)
downloadtalos-hostboot-bc18309697f7a711b04736a4260094377b33f478.tar.gz
talos-hostboot-bc18309697f7a711b04736a4260094377b33f478.zip
Report host boot error log to FSP
Change-Id: Iad4be4f0a45a607f7b56fc5d194f1812f74fbfe8 RTC: 34235 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1949 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/errl')
-rw-r--r--src/include/usr/errl/errlmanager.H94
-rw-r--r--src/include/usr/errl/hberrltypes.H53
2 files changed, 112 insertions, 35 deletions
diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H
index 2ac6bd69f..3b9ad6572 100644
--- a/src/include/usr/errl/errlmanager.H
+++ b/src/include/usr/errl/errlmanager.H
@@ -32,15 +32,15 @@
/*****************************************************************************/
// I n c l u d e s
/*****************************************************************************/
-#include <stdint.h>
-#include <stdlib.h>
#include <util/singleton.H>
#include <errl/errlentry.H>
#include <sys/sync.h>
-#include <vector>
#include <kernel/timemgr.H>
#include <hbotcompid.H>
#include <hwas/common/hwasCallout.H>
+#include <mbox/mbox_queues.H>
+#include <mbox/mboxif.H>
+
namespace ERRORLOG
{
@@ -66,6 +66,7 @@ namespace ERRORLOG
*/
void errlCommit(errlHndl_t& io_err, compId_t i_committerComp );
+
/*****************************************************************************/
// Forward class declarations
/*****************************************************************************/
@@ -124,6 +125,7 @@ public:
*/
static void setHwasProcessCalloutFn(HWAS::processCalloutFn i_fn);
+
/**
* @brief Returns the HWAS ProcessCallout function pointer
*
@@ -161,11 +163,88 @@ protected:
private:
/**
+ * @enum ERRLOG_MSG_TYPE
+ *
+ * @brief Message types that recognized by the error log message queue
+ */
+ enum ERRLOG_MSG_TYPE
+ {
+ ERRLOG_NEEDS_TO_BE_COMMITTED_TYPE = 0x00000030 | MBOX::FIRST_SECURE_MSG,
+ ERRLOG_SEND_TO_FSP_TYPE = 0x00000031 | MBOX::FIRST_SECURE_MSG,
+ ERRLOG_COMMITTED_ACK_RESPONSE_TYPE = 0x00000032 | MBOX::FIRST_UNSECURE_MSG,
+ ERRLOG_SHUTDOWN = 0x00000033 | MBOX::FIRST_SECURE_MSG,
+ };
+
+ /**
* @brief Disabled copy constructor and assignment operator
*/
ErrlManager(const ErrlManager& i_right);
ErrlManager& operator=(const ErrlManager& i_right);
+ /**
+ * @brief Create and register the error log message queue
+ *
+ * @param[in/out] NONE
+ * @return NONE.
+ */
+ void msgQueueInit ( void );
+
+
+ /**
+ * @brief Performs startup of the error log processing thread.
+ *
+ * @param[in/out]
+ * @return NONE
+ */
+ static void * startup ( void* i_self );
+
+ /**
+ * @brief Message handler for process Hostboot error log message
+ * and send it to FSP.
+ *
+ * @param[in/out] NONE
+ * @return NONE
+ *
+ */
+ void errlogMsgHndlr ( void );
+
+ /**
+ * @brief Send Host boot error log to error message queue for committing.
+ *
+ * @param[in,out] io_err Error log handle to be committed
+ * @param[in] i_committerComp Component id that committed the error
+ *
+ * @return NONE
+ *
+ */
+ void sendErrlogToMessageQueue ( errlHndl_t& io_err, compId_t i_committerComp );
+
+ /**
+ * @brief Create a mailbox message with the error log and send it to Fsp.
+ *
+ * @param[in,out] io_err Error log handle to be committed
+ * @return NONE
+ *
+ */
+ void sendMboxMsg ( errlHndl_t& io_err );
+
+ /**
+ * @brief Save errlog entry in the memory
+ *
+ * @param[in,out] io_err Error log handle to be committed
+ * @return NULL
+ *
+ */
+ void saveErrLogEntry( errlHndl_t& io_err );
+
+ /**
+ * @brief Shutdown error log manager
+ *
+ * @param[in,out] None
+ * @return NULL
+ *
+ */
+ void errlogShutdown( void );
/**
* @brief Current log ID. As new error logs are created,
@@ -173,7 +252,6 @@ private:
*/
uint32_t iv_currLogId;
-
/**
* @brief
* Pointer to the header that preceeds the error log storage buffer
@@ -184,14 +262,14 @@ private:
storage_header_t * iv_pStorage;
/**
- * @brief Serialization for error log commits.
+ * @brief Pointer to the HWAS processCallout function
*/
- mutex_t iv_commitMutex;
+ HWAS::processCalloutFn iv_hwasProcessCalloutFn;
/**
- * @brief Pointer to the HWAS processCallout function
+ * @brief Message queue for error log
*/
- HWAS::processCalloutFn iv_hwasProcessCalloutFn;
+ msg_q_t iv_msgQ;
};
diff --git a/src/include/usr/errl/hberrltypes.H b/src/include/usr/errl/hberrltypes.H
index bea8b8345..418a80b21 100644
--- a/src/include/usr/errl/hberrltypes.H
+++ b/src/include/usr/errl/hberrltypes.H
@@ -1,26 +1,25 @@
-/* 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
- */
+/* 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 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 HBERRLTYPES_H
#define HBERRLTYPES_H
/**
@@ -181,10 +180,10 @@ enum errlSectionId_t
*/
enum errlSeverity_t
{
- ERRL_SEV_INFORMATIONAL = 0x00,
- ERRL_SEV_UNRECOVERABLE = 0x10,
- ERRL_SEV_CRITICAL_SYS_TERM = 0x20,
- ERRL_SEV_UNKNOWN = 0xFF
+ ERRL_SEV_INFORMATIONAL = 0x00, //Information
+ ERRL_SEV_UNRECOVERABLE = 0x40, //Unrecoverable, general
+ ERRL_SEV_CRITICAL_SYS_TERM = 0x51, //Critical, System Termination
+ ERRL_SEV_UNKNOWN = 0xFF //Reserved
};
OpenPOWER on IntegriCloud