summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/errl/errlentry.H32
-rw-r--r--src/include/usr/errl/errlsrc.H44
-rw-r--r--src/include/usr/errl/hberrltypes.H55
3 files changed, 95 insertions, 36 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H
index 2837d61ac..dde25243e 100644
--- a/src/include/usr/errl/errlentry.H
+++ b/src/include/usr/errl/errlentry.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2016 */
+/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -134,9 +134,35 @@ public:
const uint16_t i_reasonCode,
const uint64_t i_user1 = 0,
const uint64_t i_user2 = 0,
- const bool i_hbSwError = false );
+ const bool i_hbSwError = false);
/**
+ * @brief ErrlEntry constructor. Builds an error log with info
+ * constructed from the input.
+ * Event type, Sub System, SRC type, and Terminate state are defaulted
+ * to the most common values for Host Boot environment. These values
+ * can also be set to specific values by users if needed.
+ * For available values, see errltypes.H
+ * To understand the meaning of these values, refer to the
+ * Platform Event Log and SRC PLDD at: https://mcdoc.boeblingen.de.
+ * ibm.com/out/out.ViewDocument.php?documentid=1675
+ *
+ * The backtrace is captured as user detail data. Use removeBackTrace to
+ * remove
+ *
+ * The order of parameters is arranged so that Host Boot error log
+ * is as close to SP as possible.
+ *
+ * @param[in] i_sev Log's severity. See errltypes.H for
+ * available values
+ * @param[in] i_srcWords The SRC words that will fill in other
+ * parameters
+ * @return None
+ */
+
+ ErrlEntry(const errlSeverity_t i_sev,
+ uint32_t i_srcWords[9]);
+ /**
* @brief Destructor
*
* Releases all resources owned by the handle. If the log has not
@@ -766,9 +792,9 @@ private:
private:
// Data Members
+ ErrlSrc iv_Src; // primary SRC section
ErrlPrvt iv_Private; // private header object
ErrlUH iv_User; // user header object
- ErrlSrc iv_Src; // primary SRC section
std::vector<ErrlUD*> iv_SectionVector; // list of user defined sections
std::vector<uint64_t> iv_btAddrs; // list of addresses for the backtrace
ErrlUserDetailsBackTrace * iv_pBackTrace; // Pointer to back trace
diff --git a/src/include/usr/errl/errlsrc.H b/src/include/usr/errl/errlsrc.H
index 33f2a4fb0..e08be1893 100644
--- a/src/include/usr/errl/errlsrc.H
+++ b/src/include/usr/errl/errlsrc.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -82,6 +84,14 @@ private:
uint64_t i_user1,
uint64_t i_user2 );
+ /**
+ * @brief Constructor. Pass in items destined for the primary SRC
+ * section in the error log.
+ *
+ * @param[in] i_srcWords SRC Words
+ *
+ */
+ ErrlSrc( uint32_t i_srcWords[9]);
/** @brief Destructor. */
~ErrlSrc();
@@ -150,15 +160,31 @@ private:
*/
uint64_t aschex2bin(char c) const;
+ /*
+ * @brief Fill in the SRC words with current data. This is called
+ * at the beginning of flatten()
+ */
+ void setSRCWords();
+
+ /*
+ * @brief Fill in the other class variables from the src words.
+ * This is only called if we go through the correct constructor
+ */
+ void formatSRCWords();
+
// Instance data
- srcType_t iv_srcType : 8; // SRC type, the ?? in SRC ??xxxxxx
- uint8_t iv_modId; // module ID
- uint16_t iv_reasonCode; // reason code
- epubSubSystem_t iv_ssid : 8 ; // subsystem type, the ?? in SRC xx??xxxx
- uint64_t iv_user1; // user data 1
- uint64_t iv_user2; // user data 2
- bool iv_deconfig; // true if there is a deconfigure callout
- bool iv_gard; // true if there is a gard callout
+ srcType_t iv_srcType : 8; // SRC type, the ?? in SRC ??xxxxxx
+ uint8_t iv_modId; // module ID
+ uint16_t iv_reasonCode; // reason code
+ epubSubSystem_t iv_ssid : 8 ; // subsystem type, the ?? in SRC xx??xxxx
+ uint64_t iv_user1; // user data 1
+ uint64_t iv_user2; // user data 2
+ bool iv_deconfig; // true if there is a deconfigure callout
+ bool iv_gard; // true if there is a gard callout
+ uint32_t iv_srcWords[9]; // filled in to match what PRD needs
+
+ //when true, the error log is formed from the given src words.
+ bool iv_fromSRCWords;
};
diff --git a/src/include/usr/errl/hberrltypes.H b/src/include/usr/errl/hberrltypes.H
index 427029305..7ed897f40 100644
--- a/src/include/usr/errl/hberrltypes.H
+++ b/src/include/usr/errl/hberrltypes.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2016 */
+/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -84,6 +84,36 @@ namespace ERRORLOG { class ErrlEntry; };
( (TO_UINT32(TWO_UINT8_TO_UINT16(mostleft_8, left_8)) << 16) | \
(TO_UINT32(TWO_UINT8_TO_UINT16(right_8, mostright_8))) )
+
+/**
+ * @brief SRC type definitions
+ * Needs to fit into 1 byte for flattening purposes.
+ *
+ * This represents the byte in an SRC in position
+ * XX...... such as BC in BC81F00B.
+ *
+ * Refer to errlentry.H and this setter:
+ * void ErrlEntry::setSrcType(const srcType_t i_srcType)
+ *
+ */
+enum srcType_t
+{
+ SRCI_INTERVENTION_REQ = 0xA1,
+ SRCI_MACH_CHECK = 0xB1,
+ SRCI_ERR_INFO = 0xB1,
+ SRCI_IPL_STATUS = 0xC1,
+ SRCI_GENERAL_STATUS = 0xD1,
+ SRCI_DUMP_STATUS = 0xD1,
+
+ HBT_INTERVENTION_REQ = 0xAC,
+ HBT_ERR_INFO = 0xBC,
+ HBT_IPL_STATUS = 0xCC,
+ HBT_GENERAL_STATUS = 0xDC,
+
+ POWR_PHYP_STATUS = 0x10,
+};
+
+
namespace ERRORLOG
{
@@ -204,29 +234,6 @@ enum errlEventType_t
ERRL_ETYPE_CAPACITY_UPGRADE = 0x60,
};
-
-
-
-/**
- * @brief SRC type definitions
- * Needs to fit into 1 byte for flattening purposes.
- *
- * This represents the byte in an SRC in position
- * XX...... such as BC in BC81F00B.
- *
- * Refer to errlentry.H and this setter:
- * void ErrlEntry::setSrcType(const srcType_t i_srcType)
- *
- */
-enum srcType_t
-{
- SRC_INTERVENTION_REQ = 0xAC,
- SRC_ERR_INFO = 0xBC,
- SRC_IPL_STATUS = 0xCC,
- SRC_GENERAL_STATUS = 0xDC,
-};
-
-
/**
* @brief Sub system definitions
* Needs to fit into 1 byte for flattening purposes.
OpenPOWER on IntegriCloud