summaryrefslogtreecommitdiffstats
path: root/src/usr/errl/plugins
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2012-03-16 11:30:45 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-03-21 16:41:45 -0500
commit13cba5a729ae4e0f7e6f0f23b6b302e63e1f2ade (patch)
tree121076fad6e415df8cccd7cecac7f729cdc437e0 /src/usr/errl/plugins
parent0c281617a249edc58f4b615355ab0221084b1330 (diff)
downloadtalos-hostboot-13cba5a729ae4e0f7e6f0f23b6b302e63e1f2ade.tar.gz
talos-hostboot-13cba5a729ae4e0f7e6f0f23b6b302e63e1f2ade.zip
HWPF: Decode HWP FFDC in error logs
RTC: 37921 Change-Id: I6c8bbe5e92eb6e22eb18cba3529128ae70a9786f Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/768 Tested-by: Jenkins Server Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl/plugins')
-rw-r--r--src/usr/errl/plugins/errlParse.C79
1 files changed, 13 insertions, 66 deletions
diff --git a/src/usr/errl/plugins/errlParse.C b/src/usr/errl/plugins/errlParse.C
index bd859ad42..8e5005e34 100644
--- a/src/usr/errl/plugins/errlParse.C
+++ b/src/usr/errl/plugins/errlParse.C
@@ -24,79 +24,26 @@
/**
* @file initsvcParse.C
*
- * errl user data parser
+ * errl user detail data and src parser
*/
-#include <netinet/in.h>
-// FSP includes
-#include <errlplugins.H>
-#include <errlusrparser.H>
-#include <srcisrc.H>
-
-// Hostboot includes.
-#include <hbotcompid.H>
-#include <hostBootSrcParse.H>
+//------------------------------------------------------------------------------
+// User detail data parser
+//------------------------------------------------------------------------------
#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
-
+#include <errl/errludparser.H>
#include <errl/errludparserfactoryerrl.H>
+ERRL_MAKE_UD_PARSER(ERRORLOG::ErrlUserDetailsParserFactoryErrl, HBERRL_COMP_ID)
-static bool myDataParse(
- ErrlUsrParser& i_parser,
- void* i_buffer,
- uint32_t i_buflen,
- errlver_t i_ver,
- errlsubsec_t i_sst)
-{
-
- bool l_rc = false;
+//------------------------------------------------------------------------------
+// Src parser (call code generated by scanforsrc.pl)
+//------------------------------------------------------------------------------
- // Create a ErrlUserDetailsParserFactoryErrl object
- ERRORLOG::ErrlUserDetailsParserFactoryErrl l_factory;
-
- // Use the factory to create a ErrlUserDetailsParser object
- ERRORLOG::ErrlUserDetailsParser * l_pParser = l_factory.createParser(i_sst);
-
- if (l_pParser)
- {
- l_rc = true;
- l_pParser->parse(i_ver, i_parser, i_buffer, i_buflen);
- }
-
- return l_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 );
+// FSP include
+#include <srcisrc.H>
-//----------------------------------------------------------------------------
-// Call the code generated by scanforsrc.pl
+// Hostboot include
+#include <hostBootSrcParse.H>
static bool hbSrcParse( ErrlUsrParser & i_parser, const SrciSrc & i_src )
{
OpenPOWER on IntegriCloud