summaryrefslogtreecommitdiffstats
path: root/src/include/usr/example
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2011-05-12 12:51:31 -0500
committerAndrew J. Geissler <andrewg@us.ibm.com>2011-05-24 10:08:00 -0500
commited023e4eb60989a43b1e1e672dd77d84d3a543b3 (patch)
tree9e109d40d46fdc7f67e62817e851bee678e64b5e /src/include/usr/example
parent50e70ce9facb233be4158569c11dc8b64d4297b2 (diff)
downloadtalos-hostboot-ed023e4eb60989a43b1e1e672dd77d84d3a543b3.tar.gz
talos-hostboot-ed023e4eb60989a43b1e1e672dd77d84d3a543b3.zip
Initial Error Log code delivery
Merge src/usr/makefile conflict Update after first review Update after 2nd review. Add error creation example Update example with review comments Re-arrange parameters' order of error log constructor Update with additional comments from Patrick Change-Id: I18001f6232492a3acfd8819b34ef670a785ac483 Reviewed-on: http://gfwr801.rchland.ibm.com:8080/gerrit/72 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'src/include/usr/example')
-rw-r--r--src/include/usr/example/example.H9
-rw-r--r--src/include/usr/example/examplerc.H33
2 files changed, 42 insertions, 0 deletions
diff --git a/src/include/usr/example/example.H b/src/include/usr/example/example.H
index 1444893b2..b22c38da2 100644
--- a/src/include/usr/example/example.H
+++ b/src/include/usr/example/example.H
@@ -15,4 +15,13 @@
*/
uint64_t example1_function();
+/**
+ * @brief Example of creating an error log function
+ *
+ * @return void
+ *
+ */
+void example2_create_errorlog_function();
+
+
#endif
diff --git a/src/include/usr/example/examplerc.H b/src/include/usr/example/examplerc.H
new file mode 100644
index 000000000..9e65d3515
--- /dev/null
+++ b/src/include/usr/example/examplerc.H
@@ -0,0 +1,33 @@
+// This file is an example how you create a reason code to pass in an
+// error log creation
+
+#ifndef __EXAMPLE_RC_H
+#define __EXAMPLE_RC_H
+
+#include <hbotcompid.H>
+
+// The definitions in this file is an example that shows how to define
+// reason codes. Each Host Boot component should have a service code
+// file (<component>servicecodes.H) that defines its module IDs and
+// unique reason codes.
+// See errlservicecodes.H for example of this file for ERRL component.
+
+// Below is an example of defining reason codes
+enum myModuleId
+{
+ MY_MODULE_ID_1 = 0x00,
+ //........
+ MY_LAST_MODULE_ID = 0xFF
+};
+
+// This enum definition should be in an .H file in your component area.
+// MY_COMPONENT_ID is your component name defined in hbotcompid.H file
+// included above.
+enum myReasonCode
+{
+ MY_REASON_CODE_1 = MY_COMP_ID | 0x01,
+ //........
+ ERRL_LAST_REASON_CODE = MY_COMP_ID | 0xFF
+};
+
+#endif
OpenPOWER on IntegriCloud