summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/build/tools/hb153
-rw-r--r--src/include/usr/devicefw/userif.H2
-rwxr-xr-xsrc/include/usr/errl/backtrace.H1
-rw-r--r--src/include/usr/errl/errlentry.H6
-rw-r--r--src/include/usr/errl/errlmanager.H2
-rw-r--r--src/include/usr/errl/errlreasoncodes.H19
-rw-r--r--src/include/usr/errl/errlsctn.H2
-rw-r--r--src/include/usr/errl/errlsctnhdr.H2
-rwxr-xr-xsrc/include/usr/errl/errluserdetails.H23
-rw-r--r--src/include/usr/errl/hberrltypes.H (renamed from src/include/usr/errl/errltypes.H)31
-rwxr-xr-xsrc/include/usr/errl/parser/errlparserbase.H2
-rw-r--r--src/include/usr/hbotcompid.H28
-rw-r--r--src/include/usr/intr/interrupt.H2
-rw-r--r--src/usr/errl/errlUserDetailsTarget.C4
-rw-r--r--src/usr/errl/errlentry.C21
-rw-r--r--src/usr/errl/errlsctn.H2
-rw-r--r--src/usr/errl/errlsrc.C2
-rw-r--r--src/usr/errl/errluserdetails.C2
-rw-r--r--src/usr/errl/parser/errlparser.C53
-rw-r--r--src/usr/errl/parser/makefile67
-rwxr-xr-xsrc/usr/errl/parser/scanforsrcs.pl28
-rw-r--r--src/usr/errl/plugins/errlParse.C254
-rw-r--r--src/usr/errl/plugins/fips.mk45
-rw-r--r--src/usr/errl/plugins/makefile56
-rw-r--r--src/usr/errl/plugins/plugins.mk35
-rw-r--r--src/usr/errl/plugins/symbols.C378
-rw-r--r--src/usr/errl/plugins/symbols.H162
-rw-r--r--src/usr/errl/test/errltest.H36
-rw-r--r--src/usr/errl/test/errluserdetailtest.H30
-rw-r--r--src/usr/fsi/test/fsiddtest.H1
-rw-r--r--src/usr/fsiscom/test/fsiscomtest.H1
-rw-r--r--src/usr/hwpf/plat/fapiPlatAttributeService.C1
-rwxr-xr-xsrc/usr/i2c/eepromdd.H2
-rwxr-xr-xsrc/usr/i2c/i2c.H2
-rwxr-xr-xsrc/usr/i2c/test/eepromddtest.H1
-rwxr-xr-xsrc/usr/i2c/test/i2ctest.H1
-rw-r--r--src/usr/initservice/plugins/makefile50
-rw-r--r--src/usr/intr/intrrp.H2
-rw-r--r--src/usr/parser.mk6
-rw-r--r--src/usr/pnor/test/pnorddtest.H1
-rw-r--r--src/usr/pnor/test/pnorrptest.H1
-rw-r--r--src/usr/scom/test/scomtest.H1
-rwxr-xr-xsrc/usr/spd/spd.H2
-rwxr-xr-xsrc/usr/spd/test/spdtest.H1
-rw-r--r--src/usr/vfs/vfsrp.H2
-rw-r--r--src/usr/xscom/test/xscomtest.H1
46 files changed, 1333 insertions, 191 deletions
diff --git a/src/build/tools/hb b/src/build/tools/hb
index a8cc3fca9..9179966e9 100755
--- a/src/build/tools/hb
+++ b/src/build/tools/hb
@@ -34,7 +34,7 @@ execute_in_sandbox()
fi
SANDBOXRC="${SANDBOXROOT}/hbsandboxrc"
- WORKON_CMD="workon -rc ${SANDBOXRC} -sb ${SANDBOXNAME} -m ppc "
+ WORKON_CMD="workon -rc ${SANDBOXRC} -sb ${SANDBOXNAME} -m $2 "
echo $1 > ${SANDBOXBASE}/src/sandbox_execute_cmd
chmod 700 ${SANDBOXBASE}/src/sandbox_execute_cmd
@@ -166,6 +166,15 @@ hb_helptext()
echo " recent commit in your repository to ensure the prologs are"
echo " all added properly."
;;
+ errlparser)
+ echo " Topic 'errlparser'"
+ echo
+ echo " Usage:"
+ echo " hb errlparser"
+ echo
+ echo " Prepares a copy of FipS errl tool that is hostboot aware,"
+ echo " places it in simics directory."
+ ;;
customrc)
echo " Topic 'customrc'"
echo
@@ -196,7 +205,7 @@ hb_helptext()
echo
echo " Available Commands:"
echo " workon, simsetup, prime, startsimics, rsync, objsizes,"
- echo " copyright_check"
+ echo " copyright_check, errlparser"
echo
echo " Additional Help Topics:"
echo " customrc"
@@ -269,18 +278,23 @@ hb_simsetup()
echo "Running workarounds (presimsetup)."
cp ${HOSTBOOTROOT}/src/build/citest/etc/workarounds.presimsetup ${SANDBOXBASE}/src
- execute_in_sandbox "export BACKING_BUILD=\$bb && ./workarounds.presimsetup"
+ execute_in_sandbox "export BACKING_BUILD=\$bb && ./workarounds.presimsetup" "ppc"
rm ${SANDBOXBASE}/src/workarounds.presimsetup
needs_machine_variable
- execute_in_sandbox "start_simics -no_start -machine ${MACHINE}"
+ execute_in_sandbox "start_simics -no_start -machine ${MACHINE}" "ppc"
echo "Running workarounds (postsimsetup)."
cp ${HOSTBOOTROOT}/src/build/citest/etc/workarounds.postsimsetup ${SANDBOXBASE}/src
- execute_in_sandbox "export BACKING_BUILD=\$bb && ./workarounds.postsimsetup"
+ execute_in_sandbox "export BACKING_BUILD=\$bb && ./workarounds.postsimsetup" "ppc"
rm ${SANDBOXBASE}/src/workarounds.postsimsetup
mkdir ${SANDBOXBASE}/img
+
+ # Put a starter copy of errl to simics directory; refresh w/ "hb errlparser"
+ cd ${SANDBOXBASE}/simics
+ ln -sf ${DRIVER}/obj/x86.nfp/errl/nfp/tool/errl
+
}
hb_startsimics()
@@ -306,7 +320,7 @@ hb_startsimics()
needs_machine_variable
execute_in_sandbox \
- "start_simics -machine ${MACHINE} ${SIMICSOPTIONS} $*"
+ "start_simics -machine ${MACHINE} ${SIMICSOPTIONS} $*" "ppc"
}
hb_rsync()
@@ -343,6 +357,130 @@ hb_copyright_check()
git diff HEAD~1 --name-only | xargs addCopyright.pl validate
}
+
+hb_errlparser()
+{
+ [ -z "${HOSTBOOTROOT}" ] && echo "Missing HOSTBOOTROOT." && exit -1
+ [ -z "${SANDBOXBASE}" ] && echo "Missing SANDBOXBASE." && exit -1
+ [ -z "${SANDBOXNAME}" ] && echo "Missing SANDBOXNAME." && exit -1
+ [ -z "${SANDBOXROOT}" ] && echo "Missing SANDBOXROOT." && exit -1
+
+ DRIVER=`cat ${HOSTBOOTROOT}/src/build/citest/etc/bbuild`
+
+ # sanity checks
+ if [ ! -f ${DRIVER}/src/makefile ]; then
+ echo "Cannot reach backing build: $DRIVER. You may need tokens."
+ exit -1
+ fi
+
+ if [ ! -f ${HOSTBOOTROOT}/src/include/usr/hbotcompid.H ]; then
+ echo "Missing \$HOSTBOOTROOT/src/include/usr/hbotcompid.H"
+ exit -1
+ fi
+
+ if [ ! -f ${HOSTBOOTROOT}/src/include/usr/errl/hberrltypes.H ]; then
+ echo "Missing \$HOSTBOOTROOT/src/include/usr/errl/hberrltypes.H"
+ exit -1
+ fi
+
+ if [ ! -f ${HOSTBOOTROOT}/obj/genfiles/hostBootSrcParse.H ]; then
+ echo "Missing \$HOSTBOOTROOT/obj/genfiles/hostBootSrcParse.H"
+ echo "This is a generated file produced during a Hostboot build."
+ exit -1
+ fi
+
+ # Copy hbotcompid.H to $sb/src/fstp/fsp
+ mkdir -p ${SANDBOXBASE}/src/fstp/fsp
+ cp ${HOSTBOOTROOT}/src/include/usr/hbotcompid.H ${SANDBOXBASE}/src/fstp/fsp
+
+ # Symlink hbotcompid.H into the export trees.
+ # TODO: Eventually, this will be done by src/fstp/nfp/makefile, and when
+ # that's ready, it will require a mk of fstp instead of this.
+ mkdir -p ${SANDBOXBASE}/export/x86.nfp/fips/include
+ cd ${SANDBOXBASE}/export/x86.nfp/fips/include
+ ln -sf ../../../../src/fstp/fsp/hbotcompid.H
+
+ mkdir -p ${SANDBOXBASE}/export/ppc/fips/include
+ cd ${SANDBOXBASE}/export/ppc/fips/include
+ ln -sf ../../../../src/fstp/fsp/hbotcompid.H
+
+ # One-time preparation and x86.nfp full build of epub and errl.
+ if [ ! -f ${SANDBOXBASE}/src/errl/makefile ]; then
+ # First time running 'hb errlparser'
+ echo "Preparing sandbox ..."
+ rm -fr ${SANDBOXBASE}/src/epub ; mkdir -p ${SANDBOXBASE}/src/epub
+ rm -fr ${SANDBOXBASE}/src/errl ; mkdir -p ${SANDBOXBASE}/src/errl
+
+ # TODO When the backing build has Hostboot awareness, remove this
+ # copying from Monte's public directory. Requirement SW105241.
+ if [ -d /gsa/ausgsa/home/c/o/copelanm/public/mamatha/errl ]; then
+ # Copy patch version of epub_service_codes.H
+ cp -a ${DRIVER}/src/epub/* ${SANDBOXBASE}/src/epub
+ cp /gsa/ausgsa/home/c/o/copelanm/public/mamatha/epub/fsp/epub_service_codes.H ${SANDBOXBASE}/src/epub/fsp
+
+ # Copy errl patch.
+ cp -a /gsa/ausgsa/home/c/o/copelanm/public/mamatha/errl/* ${SANDBOXBASE}/src/errl
+ else
+ # Populate with stuff from backing build.
+ cp -a ${DRIVER}/src/epub/* ${SANDBOXBASE}/src/epub
+ cp -a ${DRIVER}/src/errl/* ${SANDBOXBASE}/src/errl
+ fi
+
+ # Trigger a full local build this one time.
+ # Next time can be a partial build.
+ execute_in_sandbox "cd ${SANDBOXBASE}/src/epub && mk -a" "x86.nfp"
+ execute_in_sandbox "cd ${SANDBOXBASE}/src/errl && mk -a" "x86.nfp"
+ fi
+
+ # (Re-)Copy Hostboot plugins sources so they are up to date.
+ rm -fr ${SANDBOXBASE}/src/plugins
+ mkdir -p ${SANDBOXBASE}/src/plugins
+
+ # Locate and copy plugins directories for Hostboot components.
+ PLUGDIRS=`find ${HOSTBOOTROOT}/src/usr -name plugins -type d`
+ ALLCOMPS=""
+
+ for D in $PLUGDIRS; do
+ COMP=`echo $D | sed 's/^.*\/src\/usr\///' | awk '-F/' '{print $1}' `
+ mkdir ${SANDBOXBASE}/src/plugins/$COMP
+ cp -a ${HOSTBOOTROOT}/src/usr/$COMP/plugins/* ${SANDBOXBASE}/src/plugins/$COMP
+ ALLCOMPS="$ALLCOMPS $COMP"
+ done
+
+ # Build a src/plugins/makefile with the component names found above.
+ echo "# This file auto-generated from ${HOSTBOOTROOT}/src/usr/errl/plugins/makefile.fips" >${SANDBOXBASE}/src/plugins/makefile
+ echo "HBCOMPS=$ALLCOMPS" >>${SANDBOXBASE}/src/plugins/makefile
+ grep -v "^ *#" ${HOSTBOOTROOT}/src/usr/errl/plugins/fips.mk >>${SANDBOXBASE}/src/plugins/makefile
+
+ # Copy common plugins.mk included by all plugins makefiles.
+ cp ${HOSTBOOTROOT}/src/usr/errl/plugins/plugins.mk ${SANDBOXBASE}/src/plugins
+
+ # Clean any libB* symlinks in the export tree.
+ find ${SANDBOXBASE}/export/x86.nfp/fips/lib -name "libB*" -exec rm {} \; 2>/dev/null
+
+ # Build all libB* plugins from scratch every time. This should not take long.
+ execute_in_sandbox "cd ${SANDBOXBASE}/src/plugins && mk -a" "x86.nfp"
+
+ # Ensure the errl binary is gone in order to trigger
+ # a relink to pick up changed libB*.a files
+ mkdir -p ${SANDBOXBASE}/src/errl
+ mkdir -p ${SANDBOXBASE}/obj/x86.nfp/errl/nfp/tool
+ rm -f ${SANDBOXBASE}/obj/x86.nfp/errl/nfp/tool/errl
+ execute_in_sandbox "cd ${SANDBOXBASE}/src/errl && mk" "x86.nfp"
+
+ # Get the x86 errl tool to simics directory
+ # cp $SANDBOXBASE/obj/x86.nfp/errl/nfp/tool/errl $SANDBOXBASE/simics
+ cd ${SANDBOXBASE}/simics
+ ln -sf ../obj/x86.nfp/errl/nfp/tool/errl
+}
+
+
+
+
+
+
+
+
if [ 0 == $# ]; then
hb_helptext
exit -1
@@ -373,6 +511,9 @@ objsizes)
copyright_check)
hb_copyright_check $*
;;
+errlparser)
+ hb_errlparser $*
+ ;;
*)
hb_helptext $*
exit -1
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H
index 0fbe63149..336bce720 100644
--- a/src/include/usr/devicefw/userif.H
+++ b/src/include/usr/devicefw/userif.H
@@ -32,7 +32,7 @@
#define __DEVICEFW_USERIF
#include <stdint.h>
-#include <errl/errltypes.H>
+#include <errl/errlentry.H>
#include <targeting/targetservice.H>
namespace DeviceFW
diff --git a/src/include/usr/errl/backtrace.H b/src/include/usr/errl/backtrace.H
index 5db0081d3..e0c8250c5 100755
--- a/src/include/usr/errl/backtrace.H
+++ b/src/include/usr/errl/backtrace.H
@@ -35,7 +35,6 @@
// I n c l u d e s
/*****************************************************************************/
#include <stdint.h>
-#include <errl/errltypes.H>
#include <vector>
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H
index 330a8a813..32eb5a1ea 100644
--- a/src/include/usr/errl/errlentry.H
+++ b/src/include/usr/errl/errlentry.H
@@ -47,7 +47,7 @@
/*****************************************************************************/
#include <stdint.h>
#include <vector>
-#include <errl/errltypes.H>
+#include <errl/hberrltypes.H>
#include <errl/errlsctn.H>
#include <errl/errlprvt.H>
#include <errl/errluh.H>
@@ -558,4 +558,8 @@ inline void ErrlEntry::setSrcType(const srcType_t i_srcType)
} // End namespace
+
+typedef ERRORLOG::ErrlEntry* errlHndl_t;
+
+
#endif //ERRLENTRY_H
diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H
index 67429cbba..7d41c0ea1 100644
--- a/src/include/usr/errl/errlmanager.H
+++ b/src/include/usr/errl/errlmanager.H
@@ -35,7 +35,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <util/singleton.H>
-#include <errl/errltypes.H>
+#include <errl/errlentry.H>
#include <sys/sync.h>
#include <vector>
#include <kernel/timemgr.H>
diff --git a/src/include/usr/errl/errlreasoncodes.H b/src/include/usr/errl/errlreasoncodes.H
index f5fe78f35..00b156f7e 100644
--- a/src/include/usr/errl/errlreasoncodes.H
+++ b/src/include/usr/errl/errlreasoncodes.H
@@ -35,22 +35,23 @@
// Module IDs for ERRL component
enum
{
- ERRL_FIRST_MODULE_ID = 0x00,
- ERRL_USERDETAILS_MODULE_ID,
+ HBERRL_FIRST_MODULE_ID = 0x00,
+ HBERRL_USERDETAILS_MODULE_ID = 1,
+ HBERRL_TEST_MOD_ID = 2,
//........
- ERRL_LAST_MODULE_ID = 0xFF
+ HBERRL_LAST_MODULE_ID = 0xFF
};
// Reason codes for ERRL component
enum errlReasonCode
{
- ERRL_FIRST_ERR = ERRL_COMP_ID | 0x01,
- ERRL_FILENAME_TEST = ERRL_COMP_ID | 0x02,
- ERRL_ERRORMSG_TEST = ERRL_COMP_ID | 0x03,
- ERRL_XMLTOKEN_TEST = ERRL_COMP_ID | 0x04,
-
+ HBERRL_FIRST_ERR = HBERRL_COMP_ID | 0x01,
+ HBERRL_FILENAME_TEST = HBERRL_COMP_ID | 0x02,
+ HBERRL_ERRORMSG_TEST = HBERRL_COMP_ID | 0x03,
+ HBERRL_XMLTOKEN_TEST = HBERRL_COMP_ID | 0x04,
+ HBERRL_TEST_REASON_CODE = HBERRL_COMP_ID | 0x0F,
//........
- ERRL_LAST_ERR = ERRL_COMP_ID | 0xFF
+ HBERRL_LAST_ERR = HBERRL_COMP_ID | 0xFF
};
diff --git a/src/include/usr/errl/errlsctn.H b/src/include/usr/errl/errlsctn.H
index bd31aec40..da7b4adc8 100644
--- a/src/include/usr/errl/errlsctn.H
+++ b/src/include/usr/errl/errlsctn.H
@@ -36,7 +36,7 @@
/*****************************************************************************/
#include <stdint.h>
#include <stdlib.h>
-#include <errl/errltypes.H>
+#include <errl/hberrltypes.H>
#include <hbotcompid.H>
#include <errl/errlsctnhdr.H>
diff --git a/src/include/usr/errl/errlsctnhdr.H b/src/include/usr/errl/errlsctnhdr.H
index 069fa58ba..598b19150 100644
--- a/src/include/usr/errl/errlsctnhdr.H
+++ b/src/include/usr/errl/errlsctnhdr.H
@@ -38,7 +38,7 @@
/*****************************************************************************/
#include <stdint.h>
#include <stdlib.h>
-#include <errl/errltypes.H>
+#include <errl/hberrltypes.H>
#include <hbotcompid.H>
#include <string.h>
diff --git a/src/include/usr/errl/errluserdetails.H b/src/include/usr/errl/errluserdetails.H
index 5ed8fe029..7dd052650 100755
--- a/src/include/usr/errl/errluserdetails.H
+++ b/src/include/usr/errl/errluserdetails.H
@@ -48,22 +48,21 @@
/*****************************************************************************/
// I n c l u d e s
/*****************************************************************************/
-#include <hbotcompid.H> // list of compid's supported
-#include <errl/errltypes.H> // errlver_t, errlsubsec_t
-#include <errl/errlentry.H> // addFFDC, appendFFDC
+
+// safe to include these, PARSER or no PARSER
+#include <hbotcompid.H> // list of compid's supported
+#include <errl/hberrltypes.H> // errlver_t, errlsubsec_t
-/*****************************************************************************/
-// Typedefs
-/*****************************************************************************/
+#ifndef PARSER
+#include <errl/errlentry.H> // addFFDC, appendFFDC
namespace ERRORLOG
{
-#ifndef PARSER
/**
* @brief ERRL User Data Details
@@ -179,6 +178,7 @@ private:
uint32_t iv_BufLen; // Length of internal buffer
};
+} // namespace
#else // (if PARSER defined)
@@ -196,6 +196,10 @@ private:
* These will compile and run in the errl tool.
*
*/
+namespace ERRORLOG
+{
+
+
class ErrlUserDetails
{
public:
@@ -251,8 +255,9 @@ private:
ErrlUserDetails & operator=(const ErrlUserDetails &);
};
-#endif //PARSER
+} // namespace
-} // end namespace
+
+#endif //PARSER
#endif
diff --git a/src/include/usr/errl/errltypes.H b/src/include/usr/errl/hberrltypes.H
index ecd6e8187..3bb767b0c 100644
--- a/src/include/usr/errl/errltypes.H
+++ b/src/include/usr/errl/hberrltypes.H
@@ -1,7 +1,7 @@
// IBM_PROLOG_BEGIN_TAG
// This is an automatically generated prolog.
//
-// $Source: src/include/usr/errl/errltypes.H $
+// $Source: src/include/usr/errl/hberrltypes.H $
//
// IBM CONFIDENTIAL
//
@@ -20,8 +20,8 @@
// Origin: 30
//
// IBM_PROLOG_END
-#ifndef ERRLTYPES_H
-#define ERRLTYPES_H
+#ifndef HBERRLTYPES_H
+#define HBERRLTYPES_H
/**
* @file errltypes.H
*
@@ -40,7 +40,28 @@
* @brief Pointer to an ErrlEntry object
*/
namespace ERRORLOG { class ErrlEntry; };
-typedef ERRORLOG::ErrlEntry* errlHndl_t;
+
+
+
+// Identifiers for Hostboot ERRL user-defined data sections.
+// Range: 0 .. 255
+enum
+{
+ HBERRL_SST_NOFORMAT = 0,
+ HBERRL_SST_DEFAULT = 0,
+ HBERRL_VER_DEFAULT = 0, // 0,0 not handled
+ HBERRL_SST_PRESIDENT = 1, // testing
+ HBERRL_SST_FIRSTLADY = 2, // testing
+ HBERRL_SST_STRING = 3, // null-ended string
+ HBERRL_VER_STRINGNAME = 0, // label: "Name"
+ HBERRL_VER_STRINGTASK = 1, // label: "Task"
+ HBERRL_VER_STRINGTASKNAME = 2, // label: "Task name"
+ HBERRL_VER_STRINGATTRNAME = 3, // label: "Attribute name"
+ HBERRL_VER_STRINGFILENAME = 4, // label: "File name"
+ HBERRL_VER_STRINGPROCNAME = 5, // label: "Procedure name"
+ HBERRL_SST_BACKTRACE = 4, // backtrace
+};
+
/**
* @brief Macros to store different numbers into uint64_t
@@ -493,4 +514,4 @@ typedef struct pelsrcsection
} // End namespace
-#endif // ERRLTYPES_H
+#endif // HBERRLTYPES_H
diff --git a/src/include/usr/errl/parser/errlparserbase.H b/src/include/usr/errl/parser/errlparserbase.H
index f165f7514..b5074f2d5 100755
--- a/src/include/usr/errl/parser/errlparserbase.H
+++ b/src/include/usr/errl/parser/errlparserbase.H
@@ -49,7 +49,7 @@
// Unavoidable include for va_list
#include <cstdarg>
-#include <errl/errltypes.H>
+#include <errl/hberrltypes.H>
/*****************************************************************************/
// Typedefs
diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H
index 711670aa2..6ff09dd16 100644
--- a/src/include/usr/hbotcompid.H
+++ b/src/include/usr/hbotcompid.H
@@ -52,22 +52,12 @@ const compId_t MY_COMP_ID = 0x0000;
const char MY_COMP_NAME[] = "myname";
//@}
-/** @name ERRL
+/** @name HBERRL
* Error Logging component.
- *
- * Oct 2011: Temporarily set ERRL component ID to the
- * same as FSP ERRL in order to make the FSP x86 errl tool
- * format Hostboot error logs with traces. For user-defined
- * trace sections, that tools expects component 0x3100,
- * section ID 0x0C, and version 1.
- *
- * Requirement SW105241 is opened for fips8xx errl tool
- * to start becoming Hostboot aware. TODO When errl becomes
- * Hostboot aware, ERRL comp id can revert to 0x0100. Monte
*/
//@{
-const compId_t ERRL_COMP_ID = 0x3100;
-const char ERRL_COMP_NAME[] = "errl";
+const compId_t HBERRL_COMP_ID = 0x0100;
+const char HBERRL_COMP_NAME[] = "hberrl";
//@}
/** @name DEVFW
@@ -180,6 +170,7 @@ const compId_t INTR_COMP_ID = 0x0F00;
const char INTR_COMP_NAME[] = "intr";
//@}
+
/** @name SPD
* EEPROM device driver component
*/
@@ -188,6 +179,17 @@ const compId_t SPD_COMP_ID = 0x1000;
const char SPD_COMP_NAME[] = "spd";
//@}
+/** @name RESERVED
+ * Reserved component ID. x3100 is the component ID
+ * of FipS ERRL component. Due to our use of
+ * of the FipS errl tool, let no Hostboot component
+ * use this component ID.
+ */
+//@{
+const compId_t RESERVED_COMP_ID = 0x3100;
+const char RESERVED_COMP_NAME[] = "reserved";
+//@}
+
// ----------------------------------------------------------
// CXXTEST Unit Test, reserve compid near the end...
/** @name CXXTEST
diff --git a/src/include/usr/intr/interrupt.H b/src/include/usr/intr/interrupt.H
index 142917df2..7137b2f0e 100644
--- a/src/include/usr/intr/interrupt.H
+++ b/src/include/usr/intr/interrupt.H
@@ -24,7 +24,7 @@
#define INTERRUPT_H
#include <sys/msg.h>
-#include <errl/errltypes.H>
+#include <errl/errlentry.H>
#include <sys/interrupt.h>
namespace INTR
diff --git a/src/usr/errl/errlUserDetailsTarget.C b/src/usr/errl/errlUserDetailsTarget.C
index ece6874bf..2e128fa5c 100644
--- a/src/usr/errl/errlUserDetailsTarget.C
+++ b/src/usr/errl/errlUserDetailsTarget.C
@@ -53,7 +53,7 @@ void ErrlUserDetailsTarget::addToLog( errlHndl_t i_errl,
if (iv_pTarget == TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL)
{
const char *l_bufPtr = "MASTER_PROCESSOR_CHIP_TARGET_SENTINEL";
- iv_pErrlFFDC = i_errl->addFFDC( ERRL_COMP_ID,
+ iv_pErrlFFDC = i_errl->addFFDC( HBERRL_COMP_ID,
l_bufPtr, strlen(l_bufPtr)+1,
ERRL_UDV_DEFAULT_VER_1,
ERRL_UDT_TARGET_FFDC );
@@ -66,7 +66,7 @@ void ErrlUserDetailsTarget::addToLog( errlHndl_t i_errl,
l_bufPtr = iv_pTarget->targetFFDC( l_bufSize );
if (l_bufPtr)
{
- iv_pErrlFFDC = i_errl->addFFDC( ERRL_COMP_ID,
+ iv_pErrlFFDC = i_errl->addFFDC( HBERRL_COMP_ID,
l_bufPtr, l_bufSize,
ERRL_UDV_DEFAULT_VER_1,
ERRL_UDT_TARGET_FFDC );
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index a4e8c6669..89248bce5 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -71,10 +71,10 @@ ErrlEntry::ErrlEntry(const errlSeverity_t i_sev,
{
if( 0 == i )
{
- ffdcPtr = addFFDC( ERRL_COMP_ID,
+ ffdcPtr = addFFDC( HBERRL_COMP_ID,
&bt[i],
sizeof(bt[i]),
- 0, 0 );
+ 0, HBERRL_SST_BACKTRACE );
// Make sure we got a pointer to the user details
if( NULL == ffdcPtr )
@@ -164,6 +164,11 @@ void ErrlEntry::appendToFFDC(ErrlUD * i_pErrlUD,
///////////////////////////////////////////////////////////////////////////////
// Return a Boolean indication of success.
+// Use these to tag the UD section containing the trace.
+const int FIPS_ERRL_UDT_TRACE = 0x0c;
+const int FIPS_ERRL_COMP_ID = 0x3100;
+const int FIPS_ERRL_UDV_DEFAULT_VER_1 = 1;
+
bool ErrlEntry::collectTrace(const char i_name[], const uint64_t i_max)
{
bool l_rc = false; // assume a problem.
@@ -171,6 +176,12 @@ bool ErrlEntry::collectTrace(const char i_name[], const uint64_t i_max)
uint64_t l_cbOutput = 0;
uint64_t l_cbBuffer = 0;
+ // Trying to enforce a rule that no Hostboot component
+ // use the same component ID as FIPS Errl due to our
+ // use of the errl tool and its ability to format
+ // FSP traces attached to Hostboot error logs.
+ CPPASSERT( FIPS_ERRL_COMP_ID == RESERVED_COMP_ID );
+
do
{
// By passing nil arguments 2 and 3, obtain the size of the buffer.
@@ -219,9 +230,9 @@ bool ErrlEntry::collectTrace(const char i_name[], const uint64_t i_max)
// Save the trace buffer as a UD section on this.
ErrlUD * l_udSection = new ErrlUD( l_pBuffer,
l_cbOutput,
- ERRL_COMP_ID,
- ERRL_UDV_DEFAULT_VER_1,
- ERRL_UDT_TRACE );
+ FIPS_ERRL_COMP_ID,
+ FIPS_ERRL_UDV_DEFAULT_VER_1,
+ FIPS_ERRL_UDT_TRACE );
// Add the trace section to the vector of sections
// for this error log.
diff --git a/src/usr/errl/errlsctn.H b/src/usr/errl/errlsctn.H
index 2cb095d46..67fa0f7c2 100644
--- a/src/usr/errl/errlsctn.H
+++ b/src/usr/errl/errlsctn.H
@@ -36,7 +36,7 @@
/*****************************************************************************/
#include <stdint.h>
#include <stdlib.h>
-#include <errl/errltypes.H>
+#include <errl/hberrltypes.H>
#include "errlsctnhdr.H"
namespace ERRORLOG
diff --git a/src/usr/errl/errlsrc.C b/src/usr/errl/errlsrc.C
index 3c50aed25..801ca2234 100644
--- a/src/usr/errl/errlsrc.C
+++ b/src/usr/errl/errlsrc.C
@@ -87,7 +87,7 @@ ErrlSrc::~ErrlSrc()
// Flatten the PS primary SRC data to a minimum standard 72-byte structure.
// Page numbers refer to Platform Event Log and SRC PLDD
// https://mcdoc.boeblingen.de.ibm.com/out/out.ViewDocument.php?documentid=1675
-// Version 0.8 (markup). See also src/include/usr/errl/errltypes.H
+// Version 0.8 (markup). See also src/include/usr/errl/hberrltypes.H
// for the typedef pelSRCSection_t.
uint64_t ErrlSrc::flatten( void * o_pBuffer, const uint64_t i_cbBuffer )
diff --git a/src/usr/errl/errluserdetails.C b/src/usr/errl/errluserdetails.C
index 2ee87f49a..d05af09f3 100644
--- a/src/usr/errl/errluserdetails.C
+++ b/src/usr/errl/errluserdetails.C
@@ -55,7 +55,7 @@ namespace ERRORLOG
// ErrlUserDetails default constructor
/*****************************************************************************/
ErrlUserDetails::ErrlUserDetails()
-: iv_CompId(ERRL_COMP_ID),
+: iv_CompId(HBERRL_COMP_ID),
iv_Version(0),
iv_SubSection(0),
iv_pErrlFFDC(NULL),
diff --git a/src/usr/errl/parser/errlparser.C b/src/usr/errl/parser/errlparser.C
index 9e733a701..20fcac589 100644
--- a/src/usr/errl/parser/errlparser.C
+++ b/src/usr/errl/parser/errlparser.C
@@ -25,28 +25,21 @@
/**
* @file errlparser.C
*
- * @brief Builds a program to display committed Hostboot error logs.
+ * @brief This program spawns the FipS x86 errl tool to display
+ * a Hostboot error log in full detail. This program can also show a
+ * brief list of error logs without the detail. When the user
+ * wants the full detail, this program extracts the error log from
+ * the Hostboot image (or dump) and puts it into a temporary file. When
+ * saved to file, then this program execs "errl -d..." to display
+ * the error log PEL data.
+ *
+ * There are other options, such as "-p" which writes all the PEL files
+ * and does not exec errl. This is useful for debugging.
+ *
* Enter errlparser ? (or -? or -h or --help) to print help.
* This program can be run standalone using a Simics
* L3 memory image and the HB syms file, however it is more likely
- * spawned as "simcis> hb-errl" from the Hostboot/Simics python
- * script.
- *
- * This program spawns the FSP x86 version of errl and fsp-trace
- * which may or may not be in your $PATH. Candidates are:
- *
- * Classic FSP errl:
- * /esw/fips730/Builds/b0829a_1130.730/obj/x86.nfp/errl/nfp/tool/errl
- *
- * Or this version in Monte's sandbox which is more Hostboot aware:
- * /gsa/ausgsa/home/c/o/copelanm/public/bin/errl
- *
- * Building Blocks version of fsp-trace:
- * /opt/mcp/shared/fr_DEV-37/opt/fsp/usr/bin/fsp-trace
- *
- * Camvan has a solution for PATHing to fsp-trace when in Simics.
- * TODO Will need a copy of FSP x86 errl too in the near future.
- *
+ * spawned via "simics> hb-errl"
*/
@@ -62,14 +55,12 @@
#include <vector>
using namespace std;
-#include <errl/errltypes.H>
+#include <errl/hberrltypes.H>
#include <hbotcompid.H>
-// userdetail
-#include <errl/parser/errlusrparser.H>
-
-// this should be last, otherwise it will not find all the namespaces
-#include <hostBootSrcParse.H>
+// These should be included from plugin code.
+// #include <errl/parser/errlusrparser.H>
+// #include <hostBootSrcParse.H>
using namespace ERRORLOG;
@@ -753,9 +744,8 @@ int main( int argc, char *argv[] )
exit(1);
}
- // TODO Need to put a copy of FSP x86 errl tool in the simics path.
- // Try for Monte's sandbox copy, temporary for Sprint 6.
- pszErrlTool = "/gsa/ausgsa/home/c/o/copelanm/public/bin/errl";
+ // There is a copy of FSP x86 errl tool in the simics dir.
+ pszErrlTool = "./errl";
rc = stat( pszErrlTool, &statbuffer );
if( -1 == rc )
@@ -973,13 +963,6 @@ int main( int argc, char *argv[] )
l_reasonCode = pSRCSection->reserved1;
#endif
- printf( "%-20s%s\n",
- "Component",
- FindComp(pPrivateHdr->sectionheader.compId));
-
- // print the Errorlog tags from scanforsrcs.pl
- printErrorTags( l_reasonCode, pSRCSection->moduleId );
-
// done with this tmp file
unlink( szTmpFilename );
diff --git a/src/usr/errl/parser/makefile b/src/usr/errl/parser/makefile
index c030b646c..dd9f132bf 100644
--- a/src/usr/errl/parser/makefile
+++ b/src/usr/errl/parser/makefile
@@ -21,41 +21,50 @@
#
# IBM_PROLOG_END
-# makefile for errlparser,
-# a 32-bit x86 linux binary suitable for running on GFW pool machines.
+# makefile for errlparser a 32-bit x86 linux binary
+# to extract the PEL of an error log and
+# put it in a temporary file so that the
+# FipS errl tool can format and display it.
+# "Pretty printing" of those error logs is the
+# function of FipS 'errl' and its plugins, not this program.
+#
+# This makefile runs 'scanforsrc.pl' which generates
+# hostBootSrcParse.H, a file that hostboot plugins will include.
+
+
ROOTPATH=../../../..
-include ${ROOTPATH}/src/usr/parser.mk
+GENDIR = ${ROOTPATH}/obj/genfiles
+IMGDIR = ${ROOTPATH}/img
+OBJDIR = ${ROOTPATH}/obj/modules/errl/parser
-OBJFILES = errlparserbase.o errlusrparser.o
SRCPARSE_HEADER_TARGET = \
${GENDIR}/hostBootSrcParse.H
+
CC=i686-mcp6-g++ -m32
-CFLAGS:=-g -O0 -I $(ROOTPATH)/src/include/usr -D PARSER
+CFLAGS:=-g -O0 -I $(ROOTPATH)/src/include/usr -I ${GENDIR}
all: gen_pass code_pass
-gen_pass:
+gen_pass: mkdirs ${SRCPARSE_HEADER_TARGET} ${GENDIR}/comps.C
-code_pass: makeobjdir ${IMGDIR}/errlparser ${SRCPARSE_HEADER_TARGET}
+code_pass: ${IMGDIR}/errlparser
-## errlparserbase and errlusrparser
-%.o : %.C
- $(CC) -c $(CFLAGS) -o $@ $<
+# errlparserbase and errlusrparser are plugins stuff, not errlparser.
+# OBJFILES = ${OBJDIR}/errlparserbase.o ${OBJDIR}/errlusrparser.o
+# %.o : %.C
+# $(CC) -c $(CFLAGS) -o $@ $<
-clean:
- rm -fr ${SRCPARSE_HEADER_TARGET}
- rm -fr ${OBJDIR}/errlparser.o
- rm -fr ${GENDIR}/errlparser
- rm -fr ${GENDIR}/comps.C
- rm -fr ${OBJDIR}/*.o
- rm -fr *.o
-
-makeobjdir:
+mkdirs:
mkdir -p ${OBJDIR}
+ mkdir -p ${GENDIR}
+
+# Parse for error log tags in the Hostboot code, and generate hostBootSrcParse.H
+${SRCPARSE_HEADER_TARGET} :
+ ./scanforsrcs.pl -b ${ROOTPATH} -o ${GENDIR}
${GENDIR}/comps.C: ${ROOTPATH}/src/include/usr/hbotcompid.H
grep "const compId_t [A-Z0-9]*_COMP_ID" $^ | \
@@ -63,23 +72,23 @@ ${GENDIR}/comps.C: ${ROOTPATH}/src/include/usr/hbotcompid.H
sed 's/const compId_t \([A-Z0-9]*\)_COMP_ID[ =\t]*\(0[xX][0-9a-fA-F]*\).*/{ "\1", \2 },/' \
> $@
-${OBJDIR}/errlparser.o: errlparser.C ${ROOTPATH}/src/include/usr/errl/errltypes.H ${GENDIR}/comps.C ${SRCPARSE_HEADER_TARGET}
- $(CC) -c $(CFLAGS) -I${ROOTPATH}/obj/genfiles -o $@ $<
+${OBJDIR}/errlparser.o: errlparser.C ${ROOTPATH}/src/include/usr/errl/hberrltypes.H ${GENDIR}/comps.C
+ $(CC) -c $(CFLAGS) -o $@ $<
-${IMGDIR}/errlparser: ${OBJDIR}/errlparser.o ${OBJFILES} ${UD_FILES}
- $(CC) -o $@ $?
-
-## TODO add link step to link in UD_FILES
+${IMGDIR}/errlparser: ${OBJDIR}/errlparser.o
+ $(CC) -o $@ $<
-${SRCPARSE_HEADER_TARGET} :
- ./scanforsrcs.pl -b ${ROOTPATH} -o ${GENDIR}
+clean:
+ rm -f ${SRCPARSE_HEADER_TARGET}
+ rm -f ${GENDIR}/comps.C
+ rm -f ${IMGDIR}/errlparser
+ rm -fr ${OBJDIR}
debug:
ls -l ${GENDIR}
ls -l ${OBJDIR}
ls -l ${IMGDIR}
- ls -l ${UD_DIR}
beam:
- # dummy \ No newline at end of file
+ # dummy
diff --git a/src/usr/errl/parser/scanforsrcs.pl b/src/usr/errl/parser/scanforsrcs.pl
index d6d594a18..6c187a848 100755
--- a/src/usr/errl/parser/scanforsrcs.pl
+++ b/src/usr/errl/parser/scanforsrcs.pl
@@ -550,8 +550,9 @@ EOF
print $fh <<EOF;
-static void printErrorTags ( uint64_t i_src,
- uint64_t i_modId )
+static void printErrorTags ( ErrlUsrParser & i_parser,
+ uint64_t i_src,
+ uint64_t i_modId )
{
uint64_t error = (i_src << 8) | i_modId;
@@ -710,28 +711,13 @@ sub writePrintStatement
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
print $fh " case \(\($reasonCode \<\< 8\) \| $modId\) \:\n";
- print $fh " printf( \"\\n\" \)\;\n";
+
foreach my $tag ( sort keys %$href )
{
$href->{$tag} =~ s/\"/\\\"/g;
- my @lines = split /^/, $href->{$tag};
-
- if( scalar( @lines ) > 1 )
- {
- print $fh " printf( \"\%-20s";
- foreach my $line( @lines )
- {
- $line =~ s/\n//g;
- print $fh "$line";
- }
- print $fh "\\n\"\, \"$tag\" \)\;\n";
- }
- else
- {
- my $line = $href->{$tag};
- $line =~ s/\n//g;
- print $fh " printf( \"\%-20s$line\\n\"\, \"$tag\" \)\;\n";
- }
+ my $line = $href->{$tag};
+ $line =~ s/\n//g;
+ print $fh " i_parser.PrintString( \"$tag\" \, \"$line\" )\;\n";
}
print $fh " break;\n\n";
}
diff --git a/src/usr/errl/plugins/errlParse.C b/src/usr/errl/plugins/errlParse.C
new file mode 100644
index 000000000..a70dc3ab3
--- /dev/null
+++ b/src/usr/errl/plugins/errlParse.C
@@ -0,0 +1,254 @@
+// IBM_PROLOG_BEGIN_TAG
+// This is an automatically generated prolog.
+//
+// $Source: src/usr/errl/plugins/errlParse.C $
+//
+// 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
+
+
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <string.h>
+#include <netinet/in.h>
+#include <endian.h>
+#include <vector>
+
+// Get these from a FipS/FSP backing build.
+#include <errlplugins.H>
+#include <errlusrparser.H>
+#include <srcisrc.H>
+
+// These are from Hostboot.
+#include <hbotcompid.H>
+#include <hostBootSrcParse.H>
+#include <errl/hberrltypes.H>
+
+// Get these from current directory.
+#include "symbols.H"
+
+
+
+//-------------------------------------------------------------
+// endian switch a uint64
+// TODO all plugins are probably going to want this.
+
+static uint64_t ntohll( uint64_t i )
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+{
+ // CONTEXT_x86_nfp
+ uint64_t hi;
+ uint64_t lo;
+ uint32_t * pword = reinterpret_cast<uint32_t*>(&i);
+
+ hi = ntohl( *pword );
+ lo = ntohl( *(pword+1) );
+
+ return (hi<<32)|lo;
+}
+#elif __BYTE_ORDER == __BIG_ENDIAN
+{
+ // CONTEXT_ppc (or maybe CONTEXT_aix_nfp)
+ return i;
+}
+#else
+#error Unexpected endian context.
+#endif
+
+
+
+
+//--------------------------------------------------------------------------
+// Use methods of i_parser such as
+// i_parser.PrintString( "label", "datastring" );
+// to format my user-defined data attached to error logs for my component.
+// Parameters i_sst (subsection type) and i_ver (version) identify
+// the nature of the user-defined data as defined by my component.
+// The file $bb/export/x86.nfp/fips/include/errlusrparser.H defines the
+// ErrlUsrParser class.
+//
+// Return true if handled, suppressing the default hex dump of the data.
+
+static bool myDataParse (
+ ErrlUsrParser& i_parser,
+ void* i_buffer,
+ uint32_t i_buflen,
+ errlver_t i_ver,
+ errlsubsec_t i_sst)
+{
+
+ bool rc = false;
+ char szWork[ 256 ];
+
+
+ switch( i_sst ) {
+ case HBERRL_SST_FIRSTLADY:
+ {
+ memcpy( szWork, i_buffer, i_buflen );
+ szWork[ i_buflen ] = 0;
+ i_parser.PrintString( "First Lady", szWork );
+ rc = true;
+ }
+ break;
+ case HBERRL_SST_PRESIDENT:
+ {
+ memcpy( szWork, i_buffer, i_buflen );
+ szWork[ i_buflen ] = 0;
+ i_parser.PrintString( "President", szWork );
+ rc = true;
+ }
+ break;
+ case HBERRL_SST_STRING:
+ {
+ // How to label this string?
+ const char * l_pLabel;
+ switch( i_ver )
+ {
+ case HBERRL_VER_STRINGTASK:
+ l_pLabel = "Task";
+ break;
+ case HBERRL_VER_STRINGTASKNAME:
+ l_pLabel = "Task name";
+ break;
+ case HBERRL_VER_STRINGATTRNAME:
+ l_pLabel = "Attribute name";
+ break;
+ case HBERRL_VER_STRINGFILENAME:
+ l_pLabel = "File name";
+ break;
+ case HBERRL_VER_STRINGPROCNAME:
+ l_pLabel = "Procedure name";
+ break;
+ case HBERRL_VER_STRINGNAME:
+ default:
+ l_pLabel = "Name";
+ break;
+ }
+ // Expect to have a null-ended string in the data,
+ // but add a null for good measure.
+ int cb = i_buflen + 1;
+ char * pWork = new char[cb];
+ memcpy( pWork, i_buffer, i_buflen );
+ pWork[i_buflen] = 0;
+ i_parser.PrintString( l_pLabel, pWork );
+ delete pWork;
+ rc = true;
+ }
+ break;
+
+ case HBERRL_SST_BACKTRACE:
+ {
+ // This buffer contains a number of 64-bit frame pointers.
+ // Awkward because FipS/FSP errl provides no PrintNumber()
+ // for a 64-bit number as of Jan 2012.
+
+ // Initialize l_the symbol table.
+ const char * l_pSymFile = "hbicore.syms";
+ hbSymbolTable symTab;
+ int readRC = symTab.readSymbols( l_pSymFile );
+ if( readRC )
+ {
+ i_parser.PrintString( "Symbols not found", l_pSymFile );
+ // symTab.nearestSymbol() will return NULL because of this.
+ // Carry on.
+ }
+
+ const char * l_pErrlEntry = "ErrlEntry::ErrlEntry";
+ const char * l_pLabel = "Backtrace";
+
+ // loop thru the buffer which is an array of 64-bit addresses
+ uint64_t * p64 = static_cast<uint64_t*>(i_buffer);
+ int l_count = i_buflen / sizeof( uint64_t );
+ for( int i = 0; i < l_count; i++ )
+ {
+ // endian convert the stack address
+ uint64_t l_addr = ntohll(*p64);
+
+ // get nearest symbol
+ const char * l_pSymbol = symTab.nearestSymbol( l_addr );
+
+ if( l_pSymbol )
+ {
+ if( strstr( l_pSymbol, l_pErrlEntry ))
+ {
+ // hackish, makes for better looking output
+ // it's in every backtrace (jan2012)
+ l_pSymbol = l_pErrlEntry;
+ }
+ sprintf( szWork,"#%2d %016llX %s", i, l_addr, l_pSymbol );
+ }
+ else
+ {
+ sprintf( szWork,"#%2d %016llX", i, l_addr );
+ }
+ i_parser.PrintString( l_pLabel, szWork );
+
+ // next stack address in the buffer
+ p64++;
+
+ // don't print the label for subsequent backtraces
+ l_pLabel = "";
+ }
+
+ rc = true;
+ }
+ break;
+ default:
+ break;
+ }
+
+
+ return rc;
+}
+
+// Map my Hostboot component ID to the function above.
+// static errl::DataPlugin g_DataPlugin( HBERRL_COMP_ID, hberrl_DataParse );
+static errl::DataPlugin g_DataPlugin( HBERRL_COMP_ID, myDataParse );
+
+
+
+
+//----------------------------------------------------------------------------
+// Call the code generated by scanforsrc.pl
+
+static bool hbSrcParse( ErrlUsrParser & i_parser, const SrciSrc & i_src )
+{
+ uint32_t src = 0;
+
+ sscanf( i_src.getAsciiString(), "%X", &src );
+
+ // Call this function in obj/genfiles/hostBootSrcParse.H (a script-generated
+ // file) which serves for any Hostboot component. This will cause
+ // the FSP errl tool to add the tagged information to the primary SRC
+ // section of the error log. For example, the developer description
+ // (devdesc) tag and associated info as well as the other tags describing
+ // the userdata1 and userdata2 words.
+ printErrorTags( i_parser, (src & 0xFFFF), i_src.moduleId() );
+
+ return false;
+}
+
+// Create an instance of SrcPlugin by type (instead of the usual component).
+static errl::SrcPlugin g_SrcPlugin( errl::Plugin::HOSTBOOT_SRCPARSE, hbSrcParse );
+
+
+
diff --git a/src/usr/errl/plugins/fips.mk b/src/usr/errl/plugins/fips.mk
new file mode 100644
index 000000000..1db670df3
--- /dev/null
+++ b/src/usr/errl/plugins/fips.mk
@@ -0,0 +1,45 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/errl/plugins/fips.mk $
+#
+# 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
+
+# This is a FipS makefile. The 'hb errlparser' step will copy it
+# to a FipS build tree and assign a value for HBCOMPS as it is copied.
+
+
+.if ( $(CONTEXT) == "x86.nfp" || $(CONTEXT) == "ppc" )
+
+EXPINC_SUBDIRS = $(HBCOMPS)
+EXPLIB_SUBDIRS = $(HBCOMPS)
+OBJECTS_SUBDIRS = $(HBCOMPS)
+SUBDIRS = $(HBCOMPS)
+EXPSHLIB_SUBDIRS = $(HBCOMPS)
+
+.elif ( $(CONTEXT) == "aix.nfp" )
+
+EXPINC_SUBDIRS =
+EXPLIB_SUBDIRS =
+OBJECTS_SUBDIRS =
+SUBDIRS =
+EXPSHLIB_SUBDIRS =
+.endif
+
+.include <${RULES_MK}>
diff --git a/src/usr/errl/plugins/makefile b/src/usr/errl/plugins/makefile
new file mode 100644
index 000000000..8bb94fb91
--- /dev/null
+++ b/src/usr/errl/plugins/makefile
@@ -0,0 +1,56 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/errl/plugins/errl/makefile $
+#
+# 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
+
+
+# This is a FipS makefile. This file and C sources will be built
+# in a FipS tree.
+
+# All Hostboot plugins/makefile should .include ../plugins.mk
+.include "../plugins.mk"
+
+
+ERRL_PLUGIN = libB-0100
+ERRL_OBJS = errlParse.o symbols.o
+
+
+CFLAGS += -O0
+
+.if ( $(CONTEXT) == "x86.nfp" )
+
+LIBRARIES = ${ERRL_PLUGIN}.a
+EXPLIBS = ${ERRL_PLUGIN}.a
+${ERRL_PLUGIN}.a_OFILES = ${ERRL_OBJS}
+
+.else
+
+BUILD_SHARED_OBJS =
+SHARED_LIBRARIES EXPSHLIBS = ${ERRL_PLUGIN}.so
+${ERRL_PLUGIN}.so_EXTRA_LIBS = libbase.so
+
+${ERRL_PLUGIN}.so_SHLDFLAGS += ${SHLDFLAGS} -Wl,-soname,${.TARGET}
+
+${ERRL_PLUGIN}.so_OFILES = ${ERRL_OBJS}
+
+.endif
+
+.include <${RULES_MK}>
diff --git a/src/usr/errl/plugins/plugins.mk b/src/usr/errl/plugins/plugins.mk
new file mode 100644
index 000000000..fd1d90b2a
--- /dev/null
+++ b/src/usr/errl/plugins/plugins.mk
@@ -0,0 +1,35 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/errl/plugins/plugins.mk $
+#
+# 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
+
+# This is a FipS makefile. It will be copied to the directory above
+# the directories for Hostboot components that build an errl plugin.
+
+# Hostboot plugin makefiles should include this makefile with
+# .include "../plugins.mk"
+# in order to set CFLAGS. Eventually, there may be other global
+# settings common to all Hostboot makefiles. This makefile
+# provides a common place for such changes.
+
+
+CFLAGS += -DERRL_TOOLS -DPARSER -I${HOSTBOOTROOT}/obj/genfiles -I${HOSTBOOTROOT}/src/include/usr
+
diff --git a/src/usr/errl/plugins/symbols.C b/src/usr/errl/plugins/symbols.C
new file mode 100644
index 000000000..c79059ca4
--- /dev/null
+++ b/src/usr/errl/plugins/symbols.C
@@ -0,0 +1,378 @@
+// IBM_PROLOG_BEGIN_TAG
+// This is an automatically generated prolog.
+//
+// $Source: src/usr/errl/plugins/symbols.C $
+//
+// 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
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+#include <vector>
+
+#include "symbols.H"
+
+
+/**
+ * @file symbols.C
+ *
+ * @brief Read HB symbols file and provide a lookup mechanism.
+ *
+ */
+
+
+
+
+//------------------------------------------------------------------------
+// trim white space from end of s
+
+static char * trim( char *s )
+{
+ char *p = s;
+
+ /* bump to last char */
+ while( *p ) p++;
+ p--;
+
+ /* trim */
+ while( p >= s && ( *p == ' ' || *p == '\n' || *p == '\r' || *p == '\t' )) *p-- = 0;
+
+ /* return what was passed in */
+ return s;
+}
+
+
+
+//------------------------------------------------------------------------
+// hbSymbolTable methods
+
+// Read the syms file, return zero for success.
+int hbSymbolTable::readSymbols( const char * i_filename )
+{
+ FILE * f = NULL;
+
+ iv_vecSymbols.clear();
+ iv_fPopulated = false;
+
+ delete[] iv_pFileName;
+ iv_pFileName = NULL;
+
+ f = fopen( i_filename, "r" );
+ if( !f )
+ {
+ return 2;
+ }
+ fclose(f);
+
+ int cb = 1 + strlen( i_filename );
+ iv_pFileName = new char[cb];
+ strcpy( iv_pFileName, i_filename );
+
+ populateSymbolVector();
+
+ return 0;
+}
+
+
+
+
+// private method
+// read the syms file, return 0 if OK
+int hbSymbolTable::populateSymbolVector()
+{
+ FILE * f = NULL;
+ char szWork[ 1024 ];
+
+ if( NULL == iv_pFileName )
+ {
+ return 2;
+ }
+
+ f = fopen( iv_pFileName, "r" );
+ if( !f )
+ {
+ return 2;
+ }
+
+ memset(szWork, 0, sizeof(szWork));
+
+ while( fgets( szWork, sizeof( szWork )-1, f ))
+ {
+ // function symbols only
+ if( 'F' == szWork[0] )
+ {
+ hbSymbol* l_pSymbol = new hbSymbol();
+
+ int k = 0;
+ char * pch;
+ pch = strtok( szWork, "," );
+ while( pch )
+ {
+ switch( k )
+ {
+ case 0:
+ l_pSymbol->setType( *pch );
+ break;
+ case 1:
+ l_pSymbol->setAddress( pch );
+ break;
+ case 3:
+ l_pSymbol->setLength( pch );
+ break;
+ case 4:
+ l_pSymbol->setSymbolName( pch );
+ break;
+ default:
+ // skipping field 2 for now
+ break;
+ }
+ k++;
+ pch = strtok( NULL, "," );
+ }
+
+ if( l_pSymbol->isValid() )
+ {
+ iv_vecSymbols.push_back( l_pSymbol );
+ }
+ else
+ {
+ delete l_pSymbol;
+ }
+ }
+ }
+
+ fclose(f);
+
+ // The Hostboot symbols file is pretty much sorted already, but
+ // ensure vector is sorted for the sake of binary searching.
+
+ int c = iv_vecSymbols.size() - 1;
+ bool fSorted = (iv_vecSymbols.size() <= 1);
+ while( !fSorted )
+ {
+ fSorted = true;
+ for ( int i = 0; i < c; i++ )
+ {
+ if( iv_vecSymbols[i]->iv_Address > iv_vecSymbols[i+1]->iv_Address )
+ {
+ fSorted = false;
+ // swap them
+ hbSymbol * l_tempSymbol;
+ l_tempSymbol = iv_vecSymbols[i];
+ iv_vecSymbols[i] = iv_vecSymbols[i+1];
+ iv_vecSymbols[i+1] = l_tempSymbol;
+ }
+ }
+ }
+
+ iv_fPopulated = true;
+ return 0;
+}
+
+
+
+// private method
+// Given the address, find the vector index of the symbol.
+// Return -1 if not found.
+// Return 0 for exact match.
+// Return 1 for nearest (previous) symbol
+int hbSymbolTable::locateSymbol( uint64_t i_address, int &o_index )
+{
+ int rc = -1;
+ int top, bot, mid, i;
+ int count = iv_vecSymbols.size();
+
+ if( 0 == count )
+ {
+ return -1;
+ }
+
+ if( 1 == count )
+ {
+ return 1;
+ }
+
+
+ top = count - 1;
+ bot = 0;
+
+ while( top >= bot )
+ {
+ mid = (top + bot) / 2;
+
+ uint64_t l_midAddress = iv_vecSymbols[mid]->iv_Address;
+
+ if( i_address > l_midAddress )
+ {
+ /* input address > symtable address */
+ bot = mid + 1;
+ }
+ else if( i_address < l_midAddress )
+ {
+ /* input address < symtable address */
+ top = mid - 1;
+ }
+ else
+ {
+ /* exact match */
+ o_index = mid;
+ return 0;
+ }
+ }
+
+
+ /* The binary search above rarely returns with mid pointing to
+ * the right symbol, so back up a couple of indices and bump along
+ * until we find the right symbol.
+ */
+
+ bot = mid - 2;
+ if( bot < 0 )
+ {
+ bot = 0;
+ }
+
+ top = mid + 1;
+ if( top > count )
+ {
+ top = count;
+ }
+
+
+ for( i = bot; i < top; i++ )
+ {
+ if( ( i_address >= iv_vecSymbols[i]->iv_Address ) &&
+ ( i_address < ( iv_vecSymbols[i]->iv_Address + iv_vecSymbols[i]->iv_Length )))
+ {
+ // this is the one
+ o_index = i;
+
+ // nearest symbol found
+ rc = 1;
+ break;
+ }
+ }
+ return rc;
+}
+
+
+
+
+
+// construtor
+hbSymbolTable::hbSymbolTable()
+{
+ iv_pFileName = NULL;
+ iv_fPopulated = 0;
+}
+
+
+hbSymbolTable::~hbSymbolTable()
+{
+ int c = iv_vecSymbols.size();
+ for( int i = 0; i < c; i++ )
+ {
+ delete iv_vecSymbols[i];
+ }
+ delete[] iv_pFileName;
+}
+
+
+// public method
+char * hbSymbolTable::nearestSymbol( uint64_t i_address )
+{
+ // search
+ int l_index = 0;
+ int rc = locateSymbol( i_address, l_index );
+ if( rc < 0 )
+ {
+ // not found
+ return NULL;
+ }
+ return iv_vecSymbols[l_index]->iv_pszName;
+}
+
+
+
+
+
+//------------------------------------------------------------------------
+// hbSymbol methods
+
+
+hbSymbol::hbSymbol()
+{
+ iv_validationBits = 0;
+ iv_Type = 0;
+ iv_Address = 0;
+ iv_Length = 0;
+ iv_pszName = NULL;
+}
+
+void hbSymbol::setAddress( const char * i_pszAddress )
+{
+ sscanf( i_pszAddress, "%llX", &iv_Address );
+ iv_validationBits |= ADDRESS;
+}
+
+void hbSymbol::setLength( const char * i_pszLength )
+{
+ sscanf( i_pszLength, "%llX", &iv_Length );
+ iv_validationBits |= LENGTH;
+}
+
+void hbSymbol::setType( int i_type )
+{
+ iv_Type = i_type;
+ iv_validationBits |= TYPE;
+}
+
+void hbSymbol::setSymbolName( char * i_pszName )
+{
+ trim( i_pszName );
+
+ delete[] iv_pszName;
+ int cb = strlen( i_pszName ) + 1;
+ iv_pszName = new char[cb];
+ strcpy( iv_pszName, i_pszName );
+ if( cb > 1 )
+ {
+ iv_validationBits |= NAME;
+ }
+}
+
+bool hbSymbol::isValid()
+{
+ // ensure somebody called to set address, length,
+ // name of symbol, and type. This would indicate the
+ // parsing of the symbols input line went OK.
+ return ((TYPE|ADDRESS|LENGTH|NAME)==(iv_validationBits));
+}
+
+
+hbSymbol::~hbSymbol()
+{
+ delete[] iv_pszName;
+}
+
+
+
+
diff --git a/src/usr/errl/plugins/symbols.H b/src/usr/errl/plugins/symbols.H
new file mode 100644
index 000000000..4be1512b4
--- /dev/null
+++ b/src/usr/errl/plugins/symbols.H
@@ -0,0 +1,162 @@
+// IBM_PROLOG_BEGIN_TAG
+// This is an automatically generated prolog.
+//
+// $Source: src/usr/errl/plugins/symbols.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
+
+
+
+
+
+#ifndef ERRL_PLUGINS_SYMS_H
+#define ERRL_PLUGINS_SYMS_H
+
+/**
+ * @file symbols.H
+ *
+ * @brief read HB symbols file and provide a lookup mechanism.
+ *
+ */
+
+
+/**
+ * @brief hbSymbol
+ *
+ * This class contains the data from a line of the HB syms file.
+ */
+
+class hbSymbol
+{
+ public:
+
+ // Data from a line from hbicore.syms
+ uint64_t iv_Address;
+ uint64_t iv_Length;
+ char * iv_pszName;
+
+ // The char in column 1 of hbicore.syms
+ int iv_Type;
+
+ hbSymbol();
+
+ /** @brief Set the starting address of the symbol.
+ */
+ void setAddress( const char * i_pszAddress );
+
+
+ /** @brief Set the length of the data over which
+ * this symbol spans.
+ */
+ void setLength( const char * i_pszLength );
+
+
+ /** @brief Set the symbol name.
+ */
+ void setSymbolName( char * i_pszName );
+
+
+ /** @brief Set the type of symbol. This is
+ * the char found in column 1 of Hostboot
+ * symbol files. F is function, V is variable.
+ */
+ void setType( int i_type );
+
+
+ /** @brief Checks to see if all four set functions
+ * have been called. If so, then this symbol is considered
+ * valid. These symbols are built piecemeal as values are
+ * scanned from the input line of text.
+ */
+ bool isValid();
+
+
+ ~hbSymbol();
+
+ // A validation scheme, since instance
+ // vars are set piecemeal.
+ enum
+ {
+ ADDRESS = 0x0001,
+ LENGTH = 0x0002,
+ NAME = 0x0004,
+ TYPE = 0x0008,
+ };
+
+ private:
+ int iv_validationBits;
+
+};
+
+
+
+
+
+
+/**
+ * @brief hbSymbolTable
+ *
+ * Container for hbSymbols with methods to initialize and access.
+ */
+
+
+class hbSymbolTable
+{
+ public:
+
+ /** @brief Contructor. To use: create instance, then
+ * call readSymbols() to populate the symbol table.
+ * Then call nearestSymbol().
+ */
+ hbSymbolTable();
+
+ /** @brief Read the symbols file, return zero for success.
+ * On success, then you can call nearestSymbol()
+ */
+ int readSymbols( const char * i_filename );
+
+ /** @brief Find and return the nearest symbol for the address given.
+ * Returns null when not found.
+ */
+ char * nearestSymbol( uint64_t i_address );
+
+ /** @brief Destructor.
+ */
+ ~hbSymbolTable();
+
+ private:
+
+ bool iv_fPopulated;
+ char * iv_pFileName;
+ std::vector<hbSymbol*> iv_vecSymbols;
+
+ // Read the file and populate the symbol vector.
+ int populateSymbolVector();
+
+ // Given the address, find the vector index of the symbol.
+ // Return -1 if not found.
+ // Return 0 for exact match.
+ // Return 1 for nearest (previous) symbol
+ int locateSymbol( uint64_t i_address, int & o_index );
+};
+
+
+
+#endif // ERRL_PLUGINS_SYMS_H
+
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H
index 817bcee89..4e186a98e 100644
--- a/src/usr/errl/test/errltest.H
+++ b/src/usr/errl/test/errltest.H
@@ -32,12 +32,13 @@
#include <cxxtest/TestSuite.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
+#include <errl/errlreasoncodes.H>
#include <trace/trace.H>
#include <hbotcompid.H>
-#define TEST_REASON_CODE (ERRL_COMP_ID | 0x0F)
+
#define TEST_SEVERITY ERRORLOG::ERRL_SEV_INFORMATIONAL
-#define TEST_MOD_ID 0x0022
+
#define TEST_USR_8BIT_1 0x80
#define TEST_USR_8BIT_2 0x93
@@ -92,12 +93,19 @@ public:
do
{
+ /*@
+ * @errortype
+ * @reasoncode HBERRL_TEST_REASON_CODE
+ * @severity ERRORLOG::ERRL_SEV_INFORMATIONAL
+ * @moduleid HBERRL_TEST_MOD_ID
+ * @devdesc Errl test, errl log the first.
+ */
// Create an error log
errlHndl_t l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
- TEST_MOD_ID,
- TEST_REASON_CODE,
+ HBERRL_TEST_MOD_ID,
+ HBERRL_TEST_REASON_CODE,
l_userData1,
l_userData2);
@@ -115,7 +123,7 @@ public:
// for it. addFFDC() should return a Boolean indication of success.
const char * pch = "martha washington";
- pffdc = l_err->addFFDC( ERRL_COMP_ID, pch, strlen( pch ), 1, 2 );
+ pffdc = l_err->addFFDC( HBERRL_COMP_ID, pch, strlen( pch ), 0, HBERRL_SST_FIRSTLADY );
if ( NULL == pffdc )
{
TS_FAIL("testErrl1: addFFDC() output NULL pointer");
@@ -124,7 +132,7 @@ public:
// really short user data
pch = "A";
- pffdc = l_err->addFFDC( DEVFW_COMP_ID, pch, strlen( pch ), 3, 4 );
+ pffdc = l_err->addFFDC( DEVFW_COMP_ID, pch, strlen( pch ));
if ( NULL == pffdc )
{
TS_FAIL("testErrl1: addFFDC() output NULL pointer");
@@ -132,7 +140,7 @@ public:
}
pch = "george washington";
- pffdc = l_err->addFFDC( DEVFW_COMP_ID, pch, strlen( pch ), 3, 4 );
+ pffdc = l_err->addFFDC( DEVFW_COMP_ID, pch, strlen( pch ), 0, HBERRL_SST_PRESIDENT );
if ( NULL == pffdc )
{
TS_FAIL("testErrl1: addFFDC() output NULL pointer");
@@ -140,7 +148,7 @@ public:
}
pch = "dwight eisenhour";
- pffdc = l_err->addFFDC( SCOM_COMP_ID, pch, strlen( pch ), 5, 6 );
+ pffdc = l_err->addFFDC( SCOM_COMP_ID, pch, strlen( pch ), 1, 12 );
if ( NULL == pffdc )
{
TS_FAIL("testErrl1: addFFDC() output NULL pointer");
@@ -148,7 +156,7 @@ public:
}
pch = "ronald ";
- pffdc = l_err->addFFDC( ERRL_COMP_ID, pch, strlen( pch ), 7, 8 );
+ pffdc = l_err->addFFDC( HBERRL_COMP_ID, pch, strlen( pch ), 0, HBERRL_SST_PRESIDENT );
if ( NULL == pffdc )
{
TS_FAIL("testErrl1: addFFDC() output NULL pointer");
@@ -209,7 +217,7 @@ public:
if( !fOK )
{
// cb is big enough for the header only, but no
- // room for any entries.
+ // room for any entries.
TS_FAIL( "collectTrace(TARG,l_cb) rets false", l_cb );
break;
}
@@ -227,7 +235,7 @@ public:
// Add null data.
- pffdc = l_err->addFFDC( ERRL_COMP_ID, NULL, 0, 9, 10 );
+ pffdc = l_err->addFFDC( HBERRL_COMP_ID, NULL, 0, 9, 10 );
if ( NULL != pffdc )
{
TS_FAIL("testErrl1: addFFDC() returned non null");
@@ -241,7 +249,7 @@ public:
break;
}
- if (l_err->reasonCode() != TEST_REASON_CODE)
+ if (l_err->reasonCode() != HBERRL_TEST_REASON_CODE)
{
TS_FAIL("testErrl1: createErrlLog() returns incorrect reason code!");
break;
@@ -308,8 +316,8 @@ public:
// Create an error log
errlHndl_t l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- TEST_MOD_ID,
- TEST_REASON_CODE,
+ HBERRL_TEST_MOD_ID,
+ HBERRL_TEST_REASON_CODE,
l_userData1,
l_userData2);
diff --git a/src/usr/errl/test/errluserdetailtest.H b/src/usr/errl/test/errluserdetailtest.H
index 5d0d94682..b32a655f0 100644
--- a/src/usr/errl/test/errluserdetailtest.H
+++ b/src/usr/errl/test/errluserdetailtest.H
@@ -201,16 +201,16 @@ public:
/*@
* @errortype
* @severity ERRORLOG_SEV_INFORMATIONAL
- * @moduleid ERRL_USERDETAILS_MODULE_ID
- * @reasoncode ERRL_FILENAME_TEST
+ * @moduleid HBERRL_USERDETAILS_MODULE_ID
+ * @reasoncode HBERRL_FILENAME_TEST
* @userdata1 <UNUSED>
* @userdata2 <UNUSED>
* @devdesc User Details unit test - post a filename user data section
*/
l_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
- ERRL_USERDETAILS_MODULE_ID,
- ERRL_FILENAME_TEST, // compid/reasoncode
+ HBERRL_USERDETAILS_MODULE_ID,
+ HBERRL_FILENAME_TEST, // compid/reasoncode
0x1234567890, // user1
0x9876543210 ); // user2
if( l_errl == NULL )
@@ -235,7 +235,7 @@ public:
l_FN_userdata.addToLog( l_errl, testfnstr2, sizeof(testfnstr2) );
// commit the errorlog
- errlCommit(l_errl, ERRL_COMP_ID );
+ errlCommit(l_errl, HBERRL_COMP_ID );
// Maybe do some stuff here to find the committed errorlog back and
// see if it is still correct? Later.
@@ -254,8 +254,8 @@ public:
/*@
* @errortype
* @severity ERRORLOG_SEV_INFORMATIONAL
- * @moduleid ERRL_USERDETAILS_MODULE_ID
- * @reasoncode ERRL_ERRORMSG_TEST
+ * @moduleid HBERRL_USERDETAILS_MODULE_ID
+ * @reasoncode HBERRL_ERRORMSG_TEST
* @userdata1 <UNUSED>
* @userdata2 <UNUSED>
* @devdesc User Details unit test - post an error message in a
@@ -263,8 +263,8 @@ public:
*/
l_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
- ERRL_USERDETAILS_MODULE_ID,
- ERRL_ERRORMSG_TEST, // compid/reasoncode
+ HBERRL_USERDETAILS_MODULE_ID,
+ HBERRL_ERRORMSG_TEST, // compid/reasoncode
0x1212121212, // user1
0x3434343434 ); // user2
if( l_errl == NULL )
@@ -280,7 +280,7 @@ public:
l_userdata.addToLog( l_errl );
// commit the errorlog
- errlCommit(l_errl, ERRL_COMP_ID );
+ errlCommit(l_errl, HBERRL_COMP_ID );
}
@@ -296,8 +296,8 @@ public:
/*@
* @errortype
* @severity ERRORLOG_SEV_INFORMATIONAL
- * @moduleid ERRL_USERDETAILS_MODULE_ID
- * @reasoncode ERRL_XMLTOKEN_TEST
+ * @moduleid HBERRL_USERDETAILS_MODULE_ID
+ * @reasoncode HBERRL_XMLTOKEN_TEST
* @userdata1 <UNUSED>
* @userdata2 <UNUSED>
* @devdesc User Details unit test - post an XML token in error as
@@ -305,8 +305,8 @@ public:
*/
l_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
- ERRL_USERDETAILS_MODULE_ID,
- ERRL_XMLTOKEN_TEST, // compid/reasoncode
+ HBERRL_USERDETAILS_MODULE_ID,
+ HBERRL_XMLTOKEN_TEST, // compid/reasoncode
0xa5a5a5a5a5, // user1
0xd2d2d2d2d2 ); // user2
if( l_errl == NULL )
@@ -322,7 +322,7 @@ public:
l_userdata.addToLog( l_errl );
// commit the errorlog
- errlCommit( l_errl, ERRL_COMP_ID );
+ errlCommit( l_errl, HBERRL_COMP_ID );
}
diff --git a/src/usr/fsi/test/fsiddtest.H b/src/usr/fsi/test/fsiddtest.H
index c3d254b7d..74befc8aa 100644
--- a/src/usr/fsi/test/fsiddtest.H
+++ b/src/usr/fsi/test/fsiddtest.H
@@ -32,7 +32,6 @@
#include <cxxtest/TestSuite.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
-#include <errl/errltypes.H>
#include <limits.h>
#include <devicefw/driverif.H>
#include <fsi/fsiif.H>
diff --git a/src/usr/fsiscom/test/fsiscomtest.H b/src/usr/fsiscom/test/fsiscomtest.H
index 76afb9a18..5c570793b 100644
--- a/src/usr/fsiscom/test/fsiscomtest.H
+++ b/src/usr/fsiscom/test/fsiscomtest.H
@@ -23,7 +23,6 @@
#include <cxxtest/TestSuite.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
-#include <errl/errltypes.H>
#include <limits.h>
#include <devicefw/driverif.H>
diff --git a/src/usr/hwpf/plat/fapiPlatAttributeService.C b/src/usr/hwpf/plat/fapiPlatAttributeService.C
index e567a0c74..b106cbb6e 100644
--- a/src/usr/hwpf/plat/fapiPlatAttributeService.C
+++ b/src/usr/hwpf/plat/fapiPlatAttributeService.C
@@ -35,7 +35,6 @@
#include <targeting/targetservice.H>
#include <errl/errlentry.H>
-#include <errl/errltypes.H>
#include <hwpf/plat/fapiPlatAttributeService.H>
#include <hwpf/plat/fapiPlatReasonCodes.H>
diff --git a/src/usr/i2c/eepromdd.H b/src/usr/i2c/eepromdd.H
index 35ae315a7..ab47f692a 100755
--- a/src/usr/i2c/eepromdd.H
+++ b/src/usr/i2c/eepromdd.H
@@ -33,7 +33,7 @@
// ----------------------------------------------
// Includes
// ----------------------------------------------
-#include <errl/errltypes.H>
+#include <errl/errlentry.H>
namespace EEPROM
{
diff --git a/src/usr/i2c/i2c.H b/src/usr/i2c/i2c.H
index ea513f6db..ad7592e2c 100755
--- a/src/usr/i2c/i2c.H
+++ b/src/usr/i2c/i2c.H
@@ -33,7 +33,7 @@
// ----------------------------------------------
// Includes
// ----------------------------------------------
-#include <errl/errltypes.H>
+#include <errl/errlentry.H>
namespace I2C
{
diff --git a/src/usr/i2c/test/eepromddtest.H b/src/usr/i2c/test/eepromddtest.H
index 6cb8adddc..5f31a128b 100755
--- a/src/usr/i2c/test/eepromddtest.H
+++ b/src/usr/i2c/test/eepromddtest.H
@@ -33,7 +33,6 @@
#include <cxxtest/TestSuite.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
-#include <errl/errltypes.H>
#include <devicefw/driverif.H>
#include <i2c/eepromddreasoncodes.H>
#include <targeting/predicates/predicatectm.H>
diff --git a/src/usr/i2c/test/i2ctest.H b/src/usr/i2c/test/i2ctest.H
index 80523c629..865d62248 100755
--- a/src/usr/i2c/test/i2ctest.H
+++ b/src/usr/i2c/test/i2ctest.H
@@ -33,7 +33,6 @@
#include <cxxtest/TestSuite.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
-#include <errl/errltypes.H>
#include <devicefw/driverif.H>
#include <i2c/i2creasoncodes.H>
#include <targeting/predicates/predicatectm.H>
diff --git a/src/usr/initservice/plugins/makefile b/src/usr/initservice/plugins/makefile
new file mode 100644
index 000000000..58f562153
--- /dev/null
+++ b/src/usr/initservice/plugins/makefile
@@ -0,0 +1,50 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/initservice/plugins/makefile $
+#
+# 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
+
+# This is a FipS makefile.
+
+
+# Include the common hostboot plugins makefile
+.include "../plugins.mk"
+
+MY_PLUGIN = libB-0500
+MY_OBJS = # initserviceParse.o
+
+
+.if ( $(CONTEXT) == "x86.nfp" )
+
+LIBRARIES = ${MY_PLUGIN}.a
+EXPLIBS = ${MY_PLUGIN}.a
+${MY_PLUGIN}.a_OFILES = ${MY_OBJS}
+
+.else
+
+BUILD_SHARED_OBJS =
+SHARED_LIBRARIES EXPSHLIBS = ${MY_PLUGIN}.so
+${MY_PLUGIN}.so_EXTRA_LIBS = libbase.so
+${MY_PLUGIN}.so_SHLDFLAGS += ${SHLDFLAGS} -Wl,-soname,${.TARGET}
+${MY_PLUGIN}.so_OFILES = ${MY_OBJS}
+
+.endif
+
+.include <${RULES_MK}>
diff --git a/src/usr/intr/intrrp.H b/src/usr/intr/intrrp.H
index 6c54cf993..bb407bc02 100644
--- a/src/usr/intr/intrrp.H
+++ b/src/usr/intr/intrrp.H
@@ -26,7 +26,7 @@
#include <stdint.h>
#include <builtins.h>
#include <limits.h>
-#include <errl/errltypes.H>
+#include <errl/errlentry.H>
#include <sys/msg.h>
#include <intr/interrupt.H>
#include <map>
diff --git a/src/usr/parser.mk b/src/usr/parser.mk
index 4666d5fc6..2b47925ce 100644
--- a/src/usr/parser.mk
+++ b/src/usr/parser.mk
@@ -20,11 +20,13 @@
# Origin: 30
#
# IBM_PROLOG_END
-# Common file for x86 parser files
+
+# This file used by initservice/build/makefile
+# Not used by errlparser nor plugins as of sprint 9.
+
GENDIR = ${ROOTPATH}/obj/genfiles
IMGDIR = ${ROOTPATH}/img
OBJDIR = ${ROOTPATH}/obj/modules/parser
UD_DIR = ${ROOTPATH}/obj/modules/userdetails
-## UD_FILES = ${UD_DIR}/*.o \ No newline at end of file
diff --git a/src/usr/pnor/test/pnorddtest.H b/src/usr/pnor/test/pnorddtest.H
index 400114ffa..d8eb4af63 100644
--- a/src/usr/pnor/test/pnorddtest.H
+++ b/src/usr/pnor/test/pnorddtest.H
@@ -32,7 +32,6 @@
#include <cxxtest/TestSuite.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
-#include <errl/errltypes.H>
#include <pnor/pnorif.H>
#include <devicefw/userif.H>
diff --git a/src/usr/pnor/test/pnorrptest.H b/src/usr/pnor/test/pnorrptest.H
index 343b7bdb7..bdd28c2b8 100644
--- a/src/usr/pnor/test/pnorrptest.H
+++ b/src/usr/pnor/test/pnorrptest.H
@@ -32,7 +32,6 @@
#include <cxxtest/TestSuite.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
-#include <errl/errltypes.H>
#include <pnor/pnorif.H>
#include <sys/msg.h>
#include <limits.h>
diff --git a/src/usr/scom/test/scomtest.H b/src/usr/scom/test/scomtest.H
index 7545b795b..183ac0ebc 100644
--- a/src/usr/scom/test/scomtest.H
+++ b/src/usr/scom/test/scomtest.H
@@ -32,7 +32,6 @@
#include <cxxtest/TestSuite.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
-#include <errl/errltypes.H>
#include <devicefw/userif.H>
#include <fsi/fsiif.H>
#include <sys/time.h> //mc99 remove
diff --git a/src/usr/spd/spd.H b/src/usr/spd/spd.H
index 65f85119a..81da52888 100755
--- a/src/usr/spd/spd.H
+++ b/src/usr/spd/spd.H
@@ -33,7 +33,7 @@
// ----------------------------------------------
// Includes
// ----------------------------------------------
-#include <errl/errltypes.H>
+#include <errl/errlentry.H>
namespace SPD
{
diff --git a/src/usr/spd/test/spdtest.H b/src/usr/spd/test/spdtest.H
index 3efa690cc..7fff3db2c 100755
--- a/src/usr/spd/test/spdtest.H
+++ b/src/usr/spd/test/spdtest.H
@@ -33,7 +33,6 @@
#include <cxxtest/TestSuite.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
-#include <errl/errltypes.H>
#include <devicefw/driverif.H>
#include <targeting/predicates/predicatectm.H>
diff --git a/src/usr/vfs/vfsrp.H b/src/usr/vfs/vfsrp.H
index 8492f559d..c57603907 100644
--- a/src/usr/vfs/vfsrp.H
+++ b/src/usr/vfs/vfsrp.H
@@ -25,7 +25,7 @@
#include <stdint.h>
#include <builtins.h>
-#include <errl/errltypes.H>
+#include <errl/errlentry.H>
#include <sys/msg.h>
#include <vector>
#include <sys/sync.h>
diff --git a/src/usr/xscom/test/xscomtest.H b/src/usr/xscom/test/xscomtest.H
index 00b9e43a9..b5bd1c705 100644
--- a/src/usr/xscom/test/xscomtest.H
+++ b/src/usr/xscom/test/xscomtest.H
@@ -32,7 +32,6 @@
#include <cxxtest/TestSuite.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
-#include <errl/errltypes.H>
#include <devicefw/userif.H>
#include <xscom/xscomreasoncodes.H>
OpenPOWER on IntegriCloud