diff options
Diffstat (limited to 'src/usr')
-rwxr-xr-x | src/usr/diag/prdf/common/iipconst.h | 7 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plugins/prdfProcLogParse.C | 1 | ||||
-rw-r--r-- | src/usr/diag/prdf/plugins/Makefile_errl | 60 | ||||
-rwxr-xr-x | src/usr/errl/parser/genErrlParsers.pl | 55 | ||||
-rwxr-xr-x | src/usr/errl/plugins/errludparser.H | 6 | ||||
-rw-r--r-- | src/usr/errl/plugins/errludsensor.H | 3 | ||||
-rw-r--r-- | src/usr/errl/plugins/errludstate.H | 3 | ||||
-rwxr-xr-x | src/usr/fapi2/platCreateHwpErrParser.pl | 4 | ||||
-rwxr-xr-x | src/usr/targeting/common/xmltohb/xmltohb.pl | 8 |
9 files changed, 137 insertions, 10 deletions
diff --git a/src/usr/diag/prdf/common/iipconst.h b/src/usr/diag/prdf/common/iipconst.h index 7935a3958..cf0ff8247 100755 --- a/src/usr/diag/prdf/common/iipconst.h +++ b/src/usr/diag/prdf/common/iipconst.h @@ -35,7 +35,10 @@ /* Includes */ /*--------------------------------------------------------------------*/ #include <prdf_types.h> + +#ifndef LOGPARSER #include <targeting/common/attributes.H> +#endif /*--------------------------------------------------------------------*/ /* User Types */ @@ -49,7 +52,11 @@ namespace PRDF { +#ifndef LOGPARSER typedef TARGETING::ATTR_HUID_type HUID; +#else + typedef uint32_t HUID; +#endif // FIXME: RTC: 62867 will resolve this enum { INVALID_HUID = 0 }; diff --git a/src/usr/diag/prdf/common/plugins/prdfProcLogParse.C b/src/usr/diag/prdf/common/plugins/prdfProcLogParse.C index ae7287d76..9ae13ca54 100644 --- a/src/usr/diag/prdf/common/plugins/prdfProcLogParse.C +++ b/src/usr/diag/prdf/common/plugins/prdfProcLogParse.C @@ -39,6 +39,7 @@ #include <p9_quad_scom_addresses.H> #include <p9_ppe_defs.H> #include <map> +#include <vector> #include <string> namespace PRDF diff --git a/src/usr/diag/prdf/plugins/Makefile_errl b/src/usr/diag/prdf/plugins/Makefile_errl new file mode 100644 index 000000000..9cffd2508 --- /dev/null +++ b/src/usr/diag/prdf/plugins/Makefile_errl @@ -0,0 +1,60 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/diag/prdf/plugins/Makefile $ +# +# OpenPOWER HostBoot Project +# +# Contributors Listed Below - COPYRIGHT 2018 +# [+] International Business Machines Corp. +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. +# +# IBM_PROLOG_END_TAG +# +# + +include ../../../rules.mk + +CMDS = libhbprdfplugins.a + +LDFLAGS += -static + +CXXFLAGS += -DPRDF_HOSTBOOT_ERRL_PLUGIN -D__HOSTBOOT_MODULE -DLOGPARSER -DPRDPARSER -I. -I../.. -I../../targeting -I../../../include -I../../../include/util -I../../../include/extras -I../../../include/genfiles + +PRDF_PLUGIN_OBJS = prdfBitString.o prdrErrlPluginsSupt.o p9_capp.prf.err.o \ + p9_eq.prf.err.o p9_mca.prf.err.o p9_mcs.prf.err.o \ + p9_obus.prf.err.o p9_phb.prf.err.o prdfLogParse.o \ + p9_capp.prf.reg.o p9_eq.prf.reg.o p9_mca.prf.reg.o \ + p9_mcs.prf.reg.o p9_obus.prf.reg.o p9_phb.prf.reg.o \ + prdfLogParse_common.o prdfMemLogParse.o p9_ec.prf.err.o \ + p9_ex.prf.err.o p9_mcbist.prf.err.o p9_nimbus.prf.err.o \ + p9_pec.prf.err.o p9_xbus.prf.err.o prdfParserUtils.o \ + p9_ec.prf.reg.o p9_ex.prf.reg.o p9_mcbist.prf.reg.o \ + p9_nimbus.prf.reg.o p9_pec.prf.reg.o p9_xbus.prf.reg.o prdfProcLogParse.o + + +all: $(CMDS) + +libhbprdfplugins.a: $(PRDF_PLUGIN_OBJS) + @echo "LD $(WORK_DIR)/$@" + ar rvs $@ $(PRDF_PLUGIN_OBJS) + +$(PRDF_PLUGIN_OBJS):%.o: %.C + @echo "$(CC) $(CXXFLAGS) $(WORK_DIR)/$@" + @$(CC) $(CXXFLAGS) -c $< + +clean: + @echo "Cleaning up $(WORK_DIR) files..." + @rm -rf $(CMDS) $(PRDF_PLUGIN_OBJS) diff --git a/src/usr/errl/parser/genErrlParsers.pl b/src/usr/errl/parser/genErrlParsers.pl index ff9bb8461..1d3af664d 100755 --- a/src/usr/errl/parser/genErrlParsers.pl +++ b/src/usr/errl/parser/genErrlParsers.pl @@ -979,6 +979,59 @@ foreach my $dir(@pluginDirsToParse) } #------------------------------------------------------------------------------ +# Generate the makefile that builds the Hostboot error log parsers for errltool +#------------------------------------------------------------------------------ +$outputFileName = $outputDir . "/Makefile"; +open(OFILE, ">", $outputFileName) or die("Cannot open: $outputFileName: $!"); + +print OFILE "\# Automatically generated by Hostboot's $0\n"; +print OFILE "\# Do not modify this file in the errltool tree, it is provided by\n"; +print OFILE "\# Hostboot and will be overwritten\n"; +print OFILE "\#\n"; + +print OFILE "CXXFLAGS += -D__HOSTBOOT_MODULE -DLOGPARSER \n\n"; +print OFILE "CXXFLAGS += -I. -I../ -I../targeting -I../../include -I../../include/util -I../../include/extras -I../../include/genfiles\n\n"; + +print OFILE "LDFLAGS += -static\n\n"; + +print OFILE "\#-------------------------------------------------------------\n"; +print OFILE "\# Call PRD makefile for prdf plugins\n"; +print OFILE "\#-------------------------------------------------------------\n"; +print OFILE "SUBDIRS = prdf\n\n"; + +print OFILE "CMDS = libhbplugins.a\n\n"; + +print OFILE "\#-------------------------------------------------------------\n"; +print OFILE "\# SRC Parsers\n"; +print OFILE "\#-------------------------------------------------------------\n"; + +print OFILE "HB_PLUGIN_SRC_OBJS = "; +foreach my $compValue (keys %compValueToParseHash) +{ + print OFILE "\\\n"; + print OFILE " hbfwSrcParse$compValue.o "; +} + +print OFILE "\n\n"; +print OFILE "all: \$(CMDS)\n"; +print OFILE "\t\@\$(MAKE) -C prdf\n\n"; +print OFILE "libhbplugins.a: \$(HB_PLUGIN_SRC_OBJS)\n"; +print OFILE "\t\@echo \"LD \$(WORK_DIR)/\$\@\"\n"; +print OFILE "\tar rvs \$\@ \$(HB_PLUGIN_SRC_OBJS)\n\n"; + +print OFILE "\$(HB_PLUGIN_SRC_OBJS):%.o: %.C\n"; +print OFILE "\t\@echo \"\$(CC) \$(CXXFLAGS) \$(WORK_DIR)/\$\@\"\n"; +print OFILE "\t\$(CC) \$(CXXFLAGS) -c \$<\n\n"; + +print OFILE "clean:\n"; +print OFILE "\t\@echo \"Cleaning up \$(WORK_DIR) files...\"\n"; +print OFILE "\trm -rf \$(CMDS) \$(HB_PLUGIN_SRC_OBJS)\n"; +print OFILE "\t\@\$(foreach d,\$(SUBDIRS), \$(MAKE) -C \$d clean;)\n\n"; + +print OFILE "\n\ninclude ../../rules.mk\n"; + +close(OFILE); +#------------------------------------------------------------------------------ # Generate the FSP makefile that builds the Hostboot error log parsers #------------------------------------------------------------------------------ $outputFileName = $outputDir . "/makefile"; @@ -989,7 +1042,7 @@ print OFILE "\# Do not modify this file in the FSP tree, it is provided by\n"; print OFILE "\# Hostboot and will be overwritten\n"; print OFILE "\#\n"; -print OFILE "CFLAGS += -DPARSER\n\n"; +print OFILE "CFLAGS += -DPARSER \n\n"; print OFILE "EXPLIBS =\n\n"; print OFILE "\#-------------------------------------------------------------\n"; diff --git a/src/usr/errl/plugins/errludparser.H b/src/usr/errl/plugins/errludparser.H index 7b44109bc..ddaadade7 100755 --- a/src/usr/errl/plugins/errludparser.H +++ b/src/usr/errl/plugins/errludparser.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -33,6 +35,7 @@ #include <netinet/in.h> +#ifndef LOGPARSER /** * @brief Endian swap a uint64_t. This is not provided by in.h */ @@ -57,6 +60,7 @@ inline uint64_t ntohll( uint64_t i ) #else #error Unexpected endian context. #endif +#endif // FSP includes #include <errlplugins.H> diff --git a/src/usr/errl/plugins/errludsensor.H b/src/usr/errl/plugins/errludsensor.H index cdca6631e..630b45591 100644 --- a/src/usr/errl/plugins/errludsensor.H +++ b/src/usr/errl/plugins/errludsensor.H @@ -33,8 +33,9 @@ */ #include "errluserdetails.H" +#ifndef LOGPARSER #include <targeting/common/target.H> - +#endif namespace ERRORLOG { diff --git a/src/usr/errl/plugins/errludstate.H b/src/usr/errl/plugins/errludstate.H index ac6517b17..99d53c260 100644 --- a/src/usr/errl/plugins/errludstate.H +++ b/src/usr/errl/plugins/errludstate.H @@ -33,8 +33,9 @@ */ #include "errluserdetails.H" +#ifndef LOGPARSER #include <targeting/common/target.H> - +#endif namespace ERRORLOG { diff --git a/src/usr/fapi2/platCreateHwpErrParser.pl b/src/usr/fapi2/platCreateHwpErrParser.pl index 0281a8aca..618459e30 100755 --- a/src/usr/fapi2/platCreateHwpErrParser.pl +++ b/src/usr/fapi2/platCreateHwpErrParser.pl @@ -77,7 +77,7 @@ print TGFILE "// hbfwPlatHwpErrParser.H\n"; print TGFILE "// This file is generated by perl script platCreateHwpErrParser.pl\n\n"; print TGFILE "#ifndef HBFWPLATHWPERRPARSER_H_\n"; print TGFILE "#define HBFWPLATHWPERRPARSER_H_\n\n"; -print TGFILE "#ifdef PARSER\n\n"; +print TGFILE "#if defined(PARSER) || defined(LOGPARSER)\n\n"; print TGFILE "namespace fapi2\n"; print TGFILE "{\n\n"; print TGFILE "void hbfwParseHwpRc(ErrlUsrParser & i_parser,\n"; @@ -207,7 +207,7 @@ print TGFILE "// hbfwPlatHwpErrParserFFDC.H\n"; print TGFILE "// This file is generated by perl script platCreateHwpErrParser.pl\n\n"; print TGFILE "#ifndef HBFWPLATHWPERRPARSERFFDC_H_\n"; print TGFILE "#define HBFWPLATHWPERRPARSERFFDC_H_\n\n"; -print TGFILE "#ifdef PARSER\n\n"; +print TGFILE "#if defined(PARSER) || defined(LOGPARSER)\n\n"; print TGFILE "#include <netinet/in.h>\n\n"; print TGFILE "namespace fapi2\n"; print TGFILE "{\n\n"; diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index 29727c403..a0be4e3e7 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -2964,7 +2964,7 @@ sub writeAttrErrlHFile { print $outFile "#ifndef ERRL_UDATTRIBUTE_H\n"; print $outFile "#define ERRL_UDATTRIBUTE_H\n"; print $outFile "\n"; - print $outFile "#ifndef PARSER\n"; + print $outFile "#if !defined(PARSER) && !defined(LOGPARSER)\n"; print $outFile "\n"; print $outFile "#include <errl/errluserdetails.H>\n"; print $outFile "\n"; @@ -2994,7 +2994,7 @@ sub writeAttrErrlHFile { print $outFile " uint32_t iv_dataSize;\n"; print $outFile "};\n"; print $outFile "}\n"; - print $outFile "#else // if PARSER defined\n"; + print $outFile "#else // if LOGPARSER defined\n"; print $outFile "\n"; print $outFile "#include \"errluserdetails.H\"\n"; print $outFile "\n"; @@ -3864,7 +3864,7 @@ sub writeTargetErrlHFile { print $outFile " };\n"; print $outFile "} TargetLabel_t;\n"; print $outFile "}\n"; - print $outFile "#ifndef PARSER\n"; + print $outFile "#if !defined(PARSER) && !defined(LOGPARSER)\n"; print $outFile "\n"; print $outFile "#include <errl/errluserdetails.H>\n"; print $outFile "\n"; @@ -3887,7 +3887,7 @@ sub writeTargetErrlHFile { print $outFile " ErrlUserDetailsTarget & operator=(const ErrlUserDetailsTarget &);\n"; print $outFile "};\n"; print $outFile "}\n"; - print $outFile "#else // if PARSER defined\n"; + print $outFile "#else // if LOGPARSER defined\n"; print $outFile "\n"; print $outFile "#include \"errluserdetails.H\"\n"; print $outFile "#include <string.h>\n"; |