summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2013-10-03 17:07:20 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-10 13:08:56 -0500
commitc9343d971c4410c80ff92bd554d61740cd39b8dd (patch)
tree3d1cfe2c369e7b0a664019d305e6cfd41b0a8523 /src
parentcb4b721956f9a0a347db3b838608ffc0b08fd7e5 (diff)
downloadtalos-hostboot-c9343d971c4410c80ff92bd554d61740cd39b8dd.tar.gz
talos-hostboot-c9343d971c4410c80ff92bd554d61740cd39b8dd.zip
Added common header file for reason code
Change-Id: Ifea8a00b9a36817e0b42054dfb9ce13dad8f15a6 RTC: 76269 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6478 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/build/mkrules/dist.targets.mk3
-rw-r--r--src/include/usr/errl/errlreasoncodes.H63
-rw-r--r--src/include/usr/example/example.H49
-rw-r--r--src/include/usr/example/examplerc.H55
-rwxr-xr-xsrc/usr/errl/parser/genErrlParsers.pl77
-rw-r--r--src/usr/errl/test/errlReportTest.H46
-rw-r--r--src/usr/errl/test/errltest.H26
-rw-r--r--src/usr/example/example.C79
-rw-r--r--src/usr/example/makefile30
-rw-r--r--src/usr/example/test/exampletest.H123
-rw-r--r--src/usr/example/test/makefile28
-rw-r--r--src/usr/makefile2
12 files changed, 148 insertions, 433 deletions
diff --git a/src/build/mkrules/dist.targets.mk b/src/build/mkrules/dist.targets.mk
index b36c92a34..44405b6a2 100644
--- a/src/build/mkrules/dist.targets.mk
+++ b/src/build/mkrules/dist.targets.mk
@@ -204,7 +204,8 @@ fsp.tar_CONTENTS = \
$(call ROOTPATH_WILDCARD,obj/genfiles/plugins/prdf/*)) \
$(addsuffix :plugins/,\
$(call ROOTPATH_WILDCARD,src/usr/*/plugins/*)) \
- src/build/debug/fsp-memdump.sh:src/build/debug/
+ src/build/debug/fsp-memdump.sh:src/build/debug/ \
+ obj/genfiles/hbfw_term_rc.H
#
# Portions of the FSP sandbox which must be rebuilt based on file changes.
diff --git a/src/include/usr/errl/errlreasoncodes.H b/src/include/usr/errl/errlreasoncodes.H
index 04f4c3d19..4e3de79db 100644
--- a/src/include/usr/errl/errlreasoncodes.H
+++ b/src/include/usr/errl/errlreasoncodes.H
@@ -32,39 +32,42 @@
#include <hbotcompid.H>
-// Module IDs for ERRL component
-enum errlModuleId
+namespace ERRORLOG
{
- ERRL_FIRST_MODULE_ID = 0x00,
- ERRL_USERDATA_TEST_MOD_ID = 0x01,
- ERRL_TEST_MOD_ID = 0x02,
- //........
- ERRL_LAST_MODULE_ID = 0xFF
-};
+ // Module IDs for ERRL component
+ enum errlModuleId
+ {
+ ERRL_FIRST_MODULE_ID = 0x00,
+ ERRL_USERDATA_TEST_MOD_ID = 0x01,
+ ERRL_TEST_MOD_ID = 0x02,
+ //........
+ ERRL_LAST_MODULE_ID = 0xFF
+ };
-// Reason codes for ERRL component
-enum errlReasonCode
-{
- ERRL_FIRST_ERR = ERRL_COMP_ID | 0x01,
- ERRL_TEST_STRING_UD = ERRL_COMP_ID | 0x02,
- ERRL_TEST_REASON_CODE = ERRL_COMP_ID | 0x03,
- ERRL_TEST_ATTRIBUTE_UD = ERRL_COMP_ID | 0x04,
- ERRL_TEST_LOGREGISTER_UD = ERRL_COMP_ID | 0x05,
- ERRL_TEST_CALLOUT_UD = ERRL_COMP_ID | 0x06,
- //........
- ERRL_LAST_ERR = ERRL_COMP_ID | 0xFF
-};
+ // Reason codes for ERRL component
+ enum errlReasonCode
+ {
+ ERRL_FIRST_ERR = ERRL_COMP_ID | 0x01,
+ ERRL_TEST_STRING_UD = ERRL_COMP_ID | 0x02,
+ ERRL_TEST_REASON_CODE = ERRL_COMP_ID | 0x03,
+ ERRL_TEST_ATTRIBUTE_UD = ERRL_COMP_ID | 0x04,
+ ERRL_TEST_LOGREGISTER_UD = ERRL_COMP_ID | 0x05,
+ ERRL_TEST_CALLOUT_UD = ERRL_COMP_ID | 0x06,
+ //........
+ ERRL_LAST_ERR = ERRL_COMP_ID | 0xFF
+ };
-// Identifiers for ERRL user data sections.
-enum errlUserDetailDataSubsection
-{
- ERRL_UDT_NOFORMAT = 0x00,
- ERRL_UDT_STRING = 0x01,
- ERRL_UDT_TARGET = 0x02,
- ERRL_UDT_BACKTRACE = 0x03,
- ERRL_UDT_ATTRIBUTE = 0x04,
- ERRL_UDT_LOGREGISTER = 0x05,
- ERRL_UDT_CALLOUT = 0x06,
+ // Identifiers for ERRL user data sections.
+ enum errlUserDetailDataSubsection
+ {
+ ERRL_UDT_NOFORMAT = 0x00,
+ ERRL_UDT_STRING = 0x01,
+ ERRL_UDT_TARGET = 0x02,
+ ERRL_UDT_BACKTRACE = 0x03,
+ ERRL_UDT_ATTRIBUTE = 0x04,
+ ERRL_UDT_LOGREGISTER = 0x05,
+ ERRL_UDT_CALLOUT = 0x06,
+ };
};
#endif
diff --git a/src/include/usr/example/example.H b/src/include/usr/example/example.H
deleted file mode 100644
index 9f1a535f3..000000000
--- a/src/include/usr/example/example.H
+++ /dev/null
@@ -1,49 +0,0 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/example/example.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// 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
-// This file is where you export all external module interfaces (i.e.
-// interfaces required by other modules)
-
-#ifndef __EXAMPLE_EXAMPLE_H
-#define __EXAMPLE_EXAMPLE_H
-
-
- /**
- * @brief Example Function
- *
- * Some more details on the example function.
- *
- * @return 0 on success, otherwise a failure code.
- *
- */
-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
deleted file mode 100644
index 65bdb6288..000000000
--- a/src/include/usr/example/examplerc.H
+++ /dev/null
@@ -1,55 +0,0 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/example/examplerc.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// 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
-// 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>reasoncodes.H) that defines its module IDs and
-// unique reason codes.
-// See errlreasoncodes.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
diff --git a/src/usr/errl/parser/genErrlParsers.pl b/src/usr/errl/parser/genErrlParsers.pl
index a21ae94e1..b1093dbbe 100755
--- a/src/usr/errl/parser/genErrlParsers.pl
+++ b/src/usr/errl/parser/genErrlParsers.pl
@@ -74,6 +74,7 @@ my $compIdFile = $base."/src/include/usr/hbotcompid.H";
my $compPath = $base."/src/usr";
my $compIncPath = $base."/src/include/usr";
my $genFilesPath = $base."/obj/genfiles";
+my $hbfwTermRcFile = $genFilesPath."/hbfw_term_rc.H";
#------------------------------------------------------------------------------
# Call subroutines to populate the following arrays:
@@ -183,6 +184,30 @@ if ($DEBUG)
my %modIdToValueHash;
my %rcToValueHash;
my %udIdToValueHash;
+open(TERM_RC_FILE, ">", "$hbfwTermRcFile") or die("Cannot open: $hbfwTermRcFile: $!");
+
+# print header of file
+print TERM_RC_FILE "#ifndef __HBFW_TERM_RC_H\n";
+print TERM_RC_FILE "#define __HBFW_TERM_RC_H\n\n";
+print TERM_RC_FILE "namespace HBFW\n{\n\n";
+
+# print body of file
+sub print_term_rc
+{
+ my ($namespace, $enumName, @taggedLines) = @_;
+
+ # spaces in front to ensure correct headerfile format
+ print TERM_RC_FILE "namespace $namespace\n";
+ print TERM_RC_FILE "{\n";
+ print TERM_RC_FILE " $enumName\n";
+ print TERM_RC_FILE " {\n";
+ foreach my $line (@taggedLines)
+ {
+ print TERM_RC_FILE " $line\n";
+ }
+ print TERM_RC_FILE " };\n";
+ print TERM_RC_FILE "};\n\n";
+}
foreach my $file (@reasonCodeFiles)
{
@@ -193,6 +218,10 @@ foreach my $file (@reasonCodeFiles)
my $processingRcs = 2;
my $processingUds = 3;
my $compId = "";
+ my $term_rc_tag = 0;
+ my $printEnum = 0;
+ my $enumName = "";
+ my @taggedLines;
while (my $line = <RC_FILE>)
{
@@ -230,6 +259,20 @@ foreach my $file (@reasonCodeFiles)
}
elsif ($line =~ /enum.+ReasonCode/i)
{
+ # avoids comment lines '@enum *ReasonCode'
+ if ($line !~ /\s*\@/ )
+ {
+ # requiring namespaces in reason code header files
+ if ($namespace eq "NO_NS")
+ {
+ print ("No namespace in '$file'\n");
+ exit(1);
+ }
+ # strip leading whitespace and trailing characters
+ $enumName = $line;
+ $enumName =~ s!^\s+!!;
+ chomp($enumName);
+ }
$processing = $processingRcs;
next;
}
@@ -241,6 +284,11 @@ foreach my $file (@reasonCodeFiles)
elsif ($line =~ /}/)
{
$processing = 0;
+ if ($printEnum)
+ {
+ print_term_rc($namespace, $enumName, @taggedLines);
+ $printEnum = 0;
+ }
next;
}
@@ -254,6 +302,11 @@ foreach my $file (@reasonCodeFiles)
}
elsif ($processing == $processingRcs)
{
+ if ($line =~ /termination_rc/i)
+ {
+ $term_rc_tag = 1;
+ next;
+ }
if ($compId ne "")
{
# Reason code line does not contain Component ID
@@ -267,6 +320,16 @@ foreach my $file (@reasonCodeFiles)
}
$rcToValueHash{$namespace}->{$1} =
$compIdToValueHash{$compId} . $2;
+
+ # if comment tag "termination_rc" is above enum
+ # in reasoncode.H files
+ if($term_rc_tag)
+ {
+ my $line = $1." = 0x".$rcToValueHash{$namespace}->{$1};
+ push @taggedLines, $line;
+ $printEnum = 1;
+ $term_rc_tag = 0;
+ }
}
}
else
@@ -282,6 +345,16 @@ foreach my $file (@reasonCodeFiles)
}
$rcToValueHash{$namespace}->{$1} =
$compIdToValueHash{$2} . $3;
+
+ # if comment tag "termination_rc" is above enum
+ # in reasoncode.H files
+ if($term_rc_tag)
+ {
+ my $line = $1." = 0x".$rcToValueHash{$namespace}->{$1};
+ push @taggedLines, $line;
+ $printEnum = 1;
+ $term_rc_tag = 0;
+ }
}
}
}
@@ -304,9 +377,11 @@ foreach my $file (@reasonCodeFiles)
}
}
}
-
close(RC_FILE);
}
+# print footer of file
+print TERM_RC_FILE "};\n#endif\n";
+close(TERM_RC_FILE);
if ($DEBUG)
{
diff --git a/src/usr/errl/test/errlReportTest.H b/src/usr/errl/test/errlReportTest.H
index fc8fc289e..1e22d6419 100644
--- a/src/usr/errl/test/errlReportTest.H
+++ b/src/usr/errl/test/errlReportTest.H
@@ -49,7 +49,7 @@ class ErrlReportTest: public CxxTest::TestSuite
public:
/**
- * @brief Send a small size error log to FSP
+ * @brief Send a small size error log to FSP
* - Create an error log with only 192 bytes
* - Verify that hostbot created error log and sent it to FSP
* - Found an issue with FSI mailbox DMA code to realign data len
@@ -65,11 +65,11 @@ public:
TS_TRACE( "test testErrlReport1");
do
{
- // Create an error log
+ // Create an error log
l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
- ERRL_TEST_MOD_ID,
- ERRL_TEST_REASON_CODE,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
l_userData1,
l_userData2);
if (l_err == NULL)
@@ -80,14 +80,14 @@ public:
// Commit error log.
errlCommit(l_err, CXXTEST_COMP_ID);
-
+
} while(0);
}
/**
* @brief Send multiple error logs back to back to FSP
- * - Create several error logs and send them to FSP in a loop.
+ * - Create several error logs and send them to FSP in a loop.
* - Verify that error logs are created and sent to FSP
* - Verify that FSP received all the error logs and log them properly.
*/
@@ -103,11 +103,11 @@ public:
for (l_loopi = 0; l_loopi < 5; l_loopi++)
{
- // Create an error log
+ // Create an error log
l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
- ERRL_TEST_MOD_ID,
- ERRL_TEST_REASON_CODE,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
l_loopi,
l_loopi);
if (l_err == NULL)
@@ -118,7 +118,7 @@ public:
// Commit error log
errlCommit(l_err, CXXTEST_COMP_ID);
- }
+ }
} while(0);
}
@@ -129,7 +129,7 @@ public:
* - Verify that an error log with severity unrecoverable created successfully
* - Verify that the error log is sent to FSP
* - Verify that FSP log the error as unrecoverable one.
- *
+ *
*/
void testErrlReport3(void)
@@ -144,8 +144,8 @@ public:
// Create an error log
l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ERRL_TEST_MOD_ID,
- ERRL_TEST_REASON_CODE,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
l_userData1,
l_userData2);
if (l_err == NULL)
@@ -172,15 +172,15 @@ public:
errlHndl_t l_err = NULL;
uint64_t l_userData1 = 0xAAAAAAAA;
uint64_t l_userData2 = 0xBBBBBBBB;
-
+
TS_TRACE( "test testErrlReport4");
do
{
// Create an error log
l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM,
- ERRL_TEST_MOD_ID,
- ERRL_TEST_REASON_CODE,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
l_userData1,
l_userData2);
if (l_err == NULL)
@@ -197,8 +197,8 @@ public:
/**
* @brief Send a big size error log to FSP
* - Verfiy that an error log with ffdc and traces is created successfully
- * - Verify that the error log is sent to FSP
- * - Verify that FSP logged the error with correct data successfully
+ * - Verify that the error log is sent to FSP
+ * - Verify that FSP logged the error with correct data successfully
*/
void testErrlReport5(void)
{
@@ -213,8 +213,8 @@ public:
// Create an error log
errlHndl_t l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ERRL_TEST_MOD_ID,
- ERRL_TEST_REASON_CODE,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
l_userData1,
l_userData2);
@@ -226,7 +226,7 @@ public:
break;
}
- // add FFDC
+ // add FFDC
const char * l_str = "Error log report testing.";
pffdc = l_err->addFFDC( DEVFW_COMP_ID, l_str, strlen( l_str ), 0, 0);
if ( NULL == pffdc )
@@ -258,9 +258,9 @@ public:
break;
}
- // Commit error log.
+ // Commit error log.
errlCommit(l_err, CXXTEST_COMP_ID);
-
+
} while(0);
}
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H
index 08163abee..8cd640fbb 100644
--- a/src/usr/errl/test/errltest.H
+++ b/src/usr/errl/test/errltest.H
@@ -103,9 +103,9 @@ public:
{
/*@
* @errortype
- * @reasoncode ERRL_TEST_REASON_CODE
+ * @reasoncode ERRORLOG::ERRL_TEST_REASON_CODE
* @severity ERRORLOG::ERRL_SEV_INFORMATIONAL
- * @moduleid ERRL_TEST_MOD_ID
+ * @moduleid ERRORLOG::ERRL_TEST_MOD_ID
* @devdesc Errl test. Error with non-decoded string
* and lots of trace buffers.
*/
@@ -113,8 +113,8 @@ public:
// Create an error log
errlHndl_t l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
- ERRL_TEST_MOD_ID,
- ERRL_TEST_REASON_CODE,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
l_userData1,
l_userData2);
@@ -220,7 +220,7 @@ public:
break;
}
- if (l_err->reasonCode() != ERRL_TEST_REASON_CODE)
+ if (l_err->reasonCode() != ERRORLOG::ERRL_TEST_REASON_CODE)
{
TS_FAIL("testErrl1: createErrlLog() returns incorrect reason code!");
break;
@@ -287,8 +287,8 @@ public:
// Create an error log
errlHndl_t l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ERRL_TEST_MOD_ID,
- ERRL_TEST_REASON_CODE,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
l_userData1,
l_userData2);
@@ -406,8 +406,8 @@ public:
// Create an error log
errlHndl_t errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ERRL_TEST_MOD_ID,
- ERRL_TEST_REASON_CODE);
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE);
// test the different callout types
TS_TRACE("test callout target %.8X", TARGETING::get_huid(pTarget));
@@ -583,8 +583,8 @@ public:
// Create an error log
errlHndl_t errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ERRL_TEST_MOD_ID,
- ERRL_TEST_REASON_CODE);
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE);
// test the different callout types
TS_TRACE( "test callout pEx %p", l_target);
@@ -669,8 +669,8 @@ public:
// Create an error log
errlHndl_t errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ERRL_TEST_MOD_ID,
- ERRL_TEST_REASON_CODE);
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE);
// test the different callout types
TS_TRACE( "test callout pEx %p", l_target);
diff --git a/src/usr/example/example.C b/src/usr/example/example.C
deleted file mode 100644
index bb8cef2a3..000000000
--- a/src/usr/example/example.C
+++ /dev/null
@@ -1,79 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/example/example.C $ */
-/* */
-/* IBM CONFIDENTIAL */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2010,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 */
-#include <kernel/console.H>
-#include <sys/sync.h>
-#include <sys/vfs.h>
-#include <sys/task.h>
-#include <trace/interface.H>
-#include <example/example.H>
-#include <example/examplerc.H>
-#include <errl/errlentry.H>
-
-#if 0
-//static mutex_t value = MUTEX_INITIALIZER;
-trace_desc_t *g_trac_test = NULL;
-TRAC_INIT(&g_trac_test, "EXAMPLE", 4096);
-#endif
-
-extern "C"
-void* _start(void *ptr)
-{
- /**
- * @todo fix printk to accept (NULL)
- */
- printk( "Executing Example module, arg=%s\n", ( (ptr==NULL) ? "(NULL)" : (char*)ptr ) );
-
- return NULL;
-}
-
-uint64_t example1_function()
-{
- uint64_t l_rc = 0;
-
- //TRACFCOMP(g_trac_test, "Someone Called example1_function!");
-
- return l_rc;
-}
-
-// This example shows how to create an error log with passed-in
-// defined parameters
-void example2_create_errorlog_function()
-{
- /*@
- * @errortype
- * @moduleid MY_MODULE_ID_1
- * @reasoncode MY_REASON_CODE_1
- * @userdata1 Meaning of userdata1 value
- * @userdata2 Meaning of userdata2 value
- * @devdesc Example of creating an error log
- */
- errlHndl_t l_err = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
- MY_MODULE_ID_1,
- MY_REASON_CODE_1,
- 0x8000000000000001,
- 0x9000000000000003);
- delete l_err;
- l_err = NULL;
- return;
-}
diff --git a/src/usr/example/makefile b/src/usr/example/makefile
deleted file mode 100644
index 88d8ef436..000000000
--- a/src/usr/example/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
-#
-# $Source: src/usr/example/makefile $
-#
-# IBM CONFIDENTIAL
-#
-# COPYRIGHT International Business Machines Corp. 2010 - 2011
-#
-# 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
-ROOTPATH = ../../..
-MODULE = example
-
-OBJS = example.o
-
-SUBDIRS = test.d
-
-include ${ROOTPATH}/config.mk
diff --git a/src/usr/example/test/exampletest.H b/src/usr/example/test/exampletest.H
deleted file mode 100644
index c08a30db5..000000000
--- a/src/usr/example/test/exampletest.H
+++ /dev/null
@@ -1,123 +0,0 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/example/test/exampletest.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// 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
-#ifndef __TEST_EXAMPLETEST_H
-#define __TEST_EXAMPLETEST_H
-
-/**
- * @file exampletest.H
- *
- * @brief Example for people to use when writing test cases for their module.
- * @todo add more doxygen blocks
- */
-
-#include <cxxtest/TestSuite.H>
-#include <example/example.H>
-
-
-class ExampleTest: public CxxTest::TestSuite
-{
-public:
-
-
- /**
- * @test TS_WARN will run if the testExampleWarn_function FAILS
- */
- void testExampleWarn(void)
- {
- uint64_t l_rc = 0;
- l_rc = example1_function();
- if(l_rc)
- {
- TS_WARN("Warning, Call to testExampleWarn returned bad value.\n");
- }
- }
-
-
- /**
- * @test TS_TRACE will run if the testExampleTrace function FAILS
- *
- */
- void testExampleTrace(void)
- {
- uint64_t l_rc = 0;
- l_rc = example1_function();
- if(l_rc)
- {
- TS_TRACE("Tracing a failure in testExampleTrace function1\n");
- }
- }
-
- /**
- * @test TS_FAIL will run if the testExampleFail function FAILS
- */
- void testExampleFail(void)
- {
- uint64_t l_rc = 0;
- l_rc = example1_function();
- if(l_rc)
- {
- TS_FAIL("Call to testExampleFail failed!\n");
- }
- }
- /**
- * @test this will always run TS_FAIL
- */
- void testExampleForceFail(void)
- {
-
- TS_FAIL("Run TS_FAIL() as part of the example test.\n" );
- }
-
- /**
- * @test this will always run TS_WARN
- */
- void testExampleForceWarn(void)
- {
-
- TS_WARN("Run TS_WARN() as part of the example test\n" );
- }
- /**
- * @test this will always run TS_TRACE
- */
- void testExampleForceTrace(void)
- {
- uint32_t i_32test = 0xdeadbeef;
- i_32test--; i_32test++;
- uint64_t i_64test = 0xbadc0ffee0ddf00d;
- i_64test--; i_64test++;
-
- TS_TRACE("Run TS_TRACE() as part of the example test\n" );
-
- TS_TRACE("Run TS_TRACE() with one print parameter: %d\n", 5 );
-
- TS_TRACE("Run TS_TRACE() with 2 parameters: 0x%x 0x%x \n", i_32test, 0x78 );
-
- TS_TRACE("Run TS_TRACE() with 3 parameters: %d, 0x%llx, %p", 328, i_64test, &i_64test );
- }
-
-
-
-};
-
-#endif
-
diff --git a/src/usr/example/test/makefile b/src/usr/example/test/makefile
deleted file mode 100644
index d47937b3b..000000000
--- a/src/usr/example/test/makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
-#
-# $Source: src/usr/example/test/makefile $
-#
-# IBM CONFIDENTIAL
-#
-# COPYRIGHT International Business Machines Corp. 2011
-#
-# 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
-ROOTPATH = ../../../..
-
-MODULE = testexample
-TESTS = *.H
-
-include ${ROOTPATH}/config.mk
diff --git a/src/usr/makefile b/src/usr/makefile
index 5855729f0..890756706 100644
--- a/src/usr/makefile
+++ b/src/usr/makefile
@@ -26,7 +26,7 @@ ROOTPATH = ../..
HOSTBOOT_PROFILE_NO_INSTRUMENT = 1
OBJS = module_init.o
-SUBDIRS = example.d trace.d cxxtest.d testcore.d errl.d devicefw.d \
+SUBDIRS = trace.d cxxtest.d testcore.d errl.d devicefw.d \
scom.d xscom.d targeting.d initservice.d hwpf.d \
ecmddatabuffer.d pnor.d i2c.d vfs.d fsi.d hwas.d fsiscom.d \
intr.d pore.d util.d mbox.d diag.d vpd.d scan.d \
OpenPOWER on IntegriCloud