summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/kernel/console.H4
-rw-r--r--src/include/usr/errl/errlreasoncodes.H1
-rw-r--r--src/include/usr/errl/errludprintk.H69
3 files changed, 73 insertions, 1 deletions
diff --git a/src/include/kernel/console.H b/src/include/kernel/console.H
index 74ab75408..22bd3c5b0 100644
--- a/src/include/kernel/console.H
+++ b/src/include/kernel/console.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2010,2013 */
+/* COPYRIGHT International Business Machines Corp. 2010,2014 */
/* */
/* p1 */
/* */
@@ -54,4 +54,6 @@ class Console : public Util::ConsoleBufferInterface
char * iv_buffer;
};
+extern char kernel_printk_buffer[Console::BUFFER_SIZE];
+
#endif
diff --git a/src/include/usr/errl/errlreasoncodes.H b/src/include/usr/errl/errlreasoncodes.H
index f4cac6249..2a3a690ba 100644
--- a/src/include/usr/errl/errlreasoncodes.H
+++ b/src/include/usr/errl/errlreasoncodes.H
@@ -70,6 +70,7 @@ namespace ERRORLOG
ERRL_UDT_ATTRIBUTE = 0x04,
ERRL_UDT_LOGREGISTER = 0x05,
ERRL_UDT_CALLOUT = 0x06,
+ ERRL_UDT_PRINTK = 0x07,
};
};
diff --git a/src/include/usr/errl/errludprintk.H b/src/include/usr/errl/errludprintk.H
new file mode 100644
index 000000000..5717169ae
--- /dev/null
+++ b/src/include/usr/errl/errludprintk.H
@@ -0,0 +1,69 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/errl/errludprintk.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2014 */
+/* */
+/* 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 ERRL_UDPRINTK_H
+#define ERRL_UDPRINTK_H
+
+/**
+ * @file errludprintk.H
+ *
+ * Defines the ErrlUserDetailsPrintk class that adds a portion of the printk
+ * buffers as FFDC to an error log as user detail data.
+ */
+
+#include <stdint.h>
+#include <errl/errluserdetails.H>
+
+namespace ERRORLOG
+{
+
+ class ErrlUserDetailsPrintk : public ErrlUserDetails
+ {
+ public:
+ enum { DEFAULT_SIZE_BYTES = 256 };
+
+ /** @brief Constructor
+ *
+ * Captures the printk buffer.
+ *
+ * @param[in] i_size - Amount (in bytes) of data to capture.
+ */
+ explicit ErrlUserDetailsPrintk(size_t i_size = DEFAULT_SIZE_BYTES)
+ {
+ _capturePrintk(i_size);
+ }
+
+ /** @brief Destructor
+ */
+ virtual ~ErrlUserDetailsPrintk() {};
+
+ private:
+ //Disabled.
+ ErrlUserDetailsPrintk(const ErrlUserDetailsPrintk&);
+ ErrlUserDetailsPrintk& operator=(const ErrlUserDetailsPrintk&);
+
+ void _capturePrintk(size_t);
+ };
+
+}
+
+#endif
OpenPOWER on IntegriCloud