summaryrefslogtreecommitdiffstats
path: root/src/include/usr/mbox
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2013-01-22 09:41:25 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-02-08 16:49:45 -0600
commitcaf328ccd931de4ce4e4d285d1a4e5ddd151abb5 (patch)
tree650c28362fef4b7fd3d8e727d2b13e25f119434b /src/include/usr/mbox
parent7c50ac8fa046052334326fd4f3c8447cb0c9514d (diff)
downloadtalos-hostboot-caf328ccd931de4ce4e4d285d1a4e5ddd151abb5.tar.gz
talos-hostboot-caf328ccd931de4ce4e4d285d1a4e5ddd151abb5.zip
ERRL: Create Hostboot error log SRC/UD parser and deliver to FSP bld
A new script called genErrlParsers will scan the Hostboot code for error log tags and create a SRC parser for each component. The script will also scan the Hostboot code for plugin directories containing User Detail Data parsers and will create a makefile that is used by the FSP to build each component's SRC/UD parser. Change-Id: I7113f6cd8069447a1caaa199aff199b663d59072 RTC: 47518 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2975 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/mbox')
-rw-r--r--src/include/usr/mbox/mboxUdParser.H129
-rw-r--r--src/include/usr/mbox/mboxUdParserFactory.H54
-rw-r--r--src/include/usr/mbox/mbox_reasoncodes.H79
3 files changed, 63 insertions, 199 deletions
diff --git a/src/include/usr/mbox/mboxUdParser.H b/src/include/usr/mbox/mboxUdParser.H
index 33f47db46..a4306241a 100644
--- a/src/include/usr/mbox/mboxUdParser.H
+++ b/src/include/usr/mbox/mboxUdParser.H
@@ -1,111 +1,30 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/mbox/mboxUdParser.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
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/mbox/mboxUdParser.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
#if !defined(_MBOXUDPARSER)
#define _MBOXUDPARSER
#include <errl/errluserdetails.H>
-#include <errl/errludparser.H>
#include <mbox/mbox_reasoncodes.H>
-
-#if defined(PARSER)
-
-namespace MBOX
-{
- /**
- * Parses mbox message user detail in an error log
- */
- class UserDetailsParserMboxMsg : public ERRORLOG::ErrlUserDetailsParser
- {
- public:
-
- /**
- * Constructor
- */
- UserDetailsParserMboxMsg() {}
-
- /**
- * Destructor
- */
- virtual ~UserDetailsParserMboxMsg() {}
-
- /**
- * Parses a mbox msg in an error log.
- *
- * @param[in] i_version Version of the data
- * @param[in] i_parse ErrlUsrParser object for the output info
- * @param[in] i_pBuffer Pointer to the buffer containing detail data
- * @param[in] 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
- {
- uint32_t * b32 = static_cast<uint32_t *>(i_pBuffer);
- uint64_t * b64 = reinterpret_cast<uint64_t *>(b32 + 4);
-
- uint32_t msg_id = ntohl(*b32);
- uint32_t msg_q_id = ntohl(*(b32+1));
- uint32_t msg_type = ntohl(*(b32+2));
- uint32_t msg_flag = ntohl(*(b32+3));
- uint64_t msg_dta0 = ntohll(*(b64));
- 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);
- if(msg_flag & 0x80000000)
- {
- i_parser.PrintString(NULL, "MBOX mesage is synchronous");
- }
- else
- {
- 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);
-
-
- if(msg_extd != 0 && i_buflen > 40)
- {
- i_parser.PrintString(NULL, "MBOX extra data:");
-
- uint8_t * b08 = reinterpret_cast<uint8_t *>(b64 + 3);
- size_t len = i_buflen - 40;
-
- i_parser.PrintHexDump(b08,len);
-
- }
- }
- };
-}
-
-#else
-
#include <util/align.H>
namespace MBOX
@@ -119,7 +38,7 @@ namespace MBOX
uint64_t * i_extra_data = NULL,
size_t i_data_byte_size = 0)
{
- iv_CompId = HBMBOX_COMP_ID;
+ iv_CompId = MBOX_COMP_ID;
iv_Version = 1;
iv_SubSection = MBOX_UDT_MBOXMSG_DATA;
iv_merge = false;
@@ -153,4 +72,4 @@ namespace MBOX
}
#endif
-#endif
+
diff --git a/src/include/usr/mbox/mboxUdParserFactory.H b/src/include/usr/mbox/mboxUdParserFactory.H
deleted file mode 100644
index 8456afa25..000000000
--- a/src/include/usr/mbox/mboxUdParserFactory.H
+++ /dev/null
@@ -1,54 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/mbox/mboxUdParserFactory.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
- */
-#if !defined(_MBOXUDPARSERFACTORY_H)
-#define _MBOXUDPARSERFACTORY_H
-
-#if defined(PARSER)
-
-#include <mbox/mboxUdParser.H>
-#include <mbox/mbox_reasoncodes.H>
-#include <errl/errludparserfactory.H>
-
-namespace MBOX
-{
- class UserDetailsParserFactory
- : public ERRORLOG::ErrlUserDetailsParserFactory
- {
- public:
- UserDetailsParserFactory()
- {
- registerParser<MBOX::UserDetailsParserMboxMsg>
- (MBOX_UDT_MBOXMSG_DATA);
- }
-
- private:
-
- UserDetailsParserFactory(const UserDetailsParserFactory &);
- UserDetailsParserFactory & operator=
- (const UserDetailsParserFactory &);
- };
-};
-
-#endif
-#endif
diff --git a/src/include/usr/mbox/mbox_reasoncodes.H b/src/include/usr/mbox/mbox_reasoncodes.H
index ca298aad7..09cf1bfd4 100644
--- a/src/include/usr/mbox/mbox_reasoncodes.H
+++ b/src/include/usr/mbox/mbox_reasoncodes.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/mbox/mbox_reasoncodes.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
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/mbox/mbox_reasoncodes.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
#ifndef __MBOX_REASONCODES_H
#define __MBOX_REASONCODES_H
@@ -45,22 +44,22 @@ namespace MBOX
enum MBOXReasonCode
{
- RC_INVALID_LENGTH = HBMBOX_COMP_ID | 0x01,
- RC_INVALID_MESSAGE_TYPE = HBMBOX_COMP_ID | 0x02,
- RC_NO_PERM_TO_SEND = HBMBOX_COMP_ID | 0x03,
- RC_MSG_PENDING = HBMBOX_COMP_ID | 0x04,
- RC_INVALID_QUEUE = HBMBOX_COMP_ID | 0x05,
- RC_RETRY_FAILED = HBMBOX_COMP_ID | 0x06,
- RC_ALREADY_REGISTERED = HBMBOX_COMP_ID | 0x07,
- RC_UNREGISTERED_MSG_QUEUE = HBMBOX_COMP_ID | 0x08,
- RC_ILLEGAL_OP = HBMBOX_COMP_ID | 0x09,
- RC_DATA_WRITE_ERR = HBMBOX_COMP_ID | 0x0A,
- RC_PARITY_ERR = HBMBOX_COMP_ID | 0x0B,
- RC_INVALID_MBOX_MSG_TYPE = HBMBOX_COMP_ID | 0x0C,
- RC_MBOX_SERVICE_NOT_READY = HBMBOX_COMP_ID | 0x0D,
- RC_INVALID_DMA_LENGTH = HBMBOX_COMP_ID | 0x0E,
- RC_KERNEL_REG_FAILED = HBMBOX_COMP_ID | 0x0F,
- RC_MAILBOX_DISABLED = HBMBOX_COMP_ID | 0x10,
+ RC_INVALID_LENGTH = MBOX_COMP_ID | 0x01,
+ RC_INVALID_MESSAGE_TYPE = MBOX_COMP_ID | 0x02,
+ RC_NO_PERM_TO_SEND = MBOX_COMP_ID | 0x03,
+ RC_MSG_PENDING = MBOX_COMP_ID | 0x04,
+ RC_INVALID_QUEUE = MBOX_COMP_ID | 0x05,
+ RC_RETRY_FAILED = MBOX_COMP_ID | 0x06,
+ RC_ALREADY_REGISTERED = MBOX_COMP_ID | 0x07,
+ RC_UNREGISTERED_MSG_QUEUE = MBOX_COMP_ID | 0x08,
+ RC_ILLEGAL_OP = MBOX_COMP_ID | 0x09,
+ RC_DATA_WRITE_ERR = MBOX_COMP_ID | 0x0A,
+ RC_PARITY_ERR = MBOX_COMP_ID | 0x0B,
+ RC_INVALID_MBOX_MSG_TYPE = MBOX_COMP_ID | 0x0C,
+ RC_MBOX_SERVICE_NOT_READY = MBOX_COMP_ID | 0x0D,
+ RC_INVALID_DMA_LENGTH = MBOX_COMP_ID | 0x0E,
+ RC_KERNEL_REG_FAILED = MBOX_COMP_ID | 0x0F,
+ RC_MAILBOX_DISABLED = MBOX_COMP_ID | 0x10,
};
@@ -69,7 +68,7 @@ namespace MBOX
*/
enum mboxUserDetailDataSubsection
{
- MBOX_UDT_MBOXMSG_DATA = 1,
+ MBOX_UDT_MBOXMSG_DATA = 0x01,
};
};
OpenPOWER on IntegriCloud