summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf/fapi2/tools
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2015-12-07 16:02:33 -0600
committerStephen Cprek <smcprek@us.ibm.com>2016-02-19 15:32:01 -0600
commit0542be2bd93801e3a9e6f4e7c56eecb32f007a05 (patch)
tree1e63aa83fcd4b4385e5991f60f33d6bc857ee0a4 /src/import/hwpf/fapi2/tools
parent505893d625748df21c2841b4ad588016ca510b79 (diff)
downloadtalos-hostboot-0542be2bd93801e3a9e6f4e7c56eecb32f007a05.tar.gz
talos-hostboot-0542be2bd93801e3a9e6f4e7c56eecb32f007a05.zip
Need an option to allow HWP to return an error log to platform code.
-Update ReturnCode object to include plat err pointer. -Modify FFDC code to capture error log pointer -Add FAPI_ASSERT_NO_EXIT macro Change-Id: I9d69535416be9d09434766cc15f7db447a72aa60 RTC:13220 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22572 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23334
Diffstat (limited to 'src/import/hwpf/fapi2/tools')
-rwxr-xr-xsrc/import/hwpf/fapi2/tools/parseErrorInfo.pl34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl
index e192f1802..106bd1b3a 100755
--- a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl
+++ b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl
@@ -8,7 +8,7 @@
#
# EKB Project
#
-# COPYRIGHT 2015
+# COPYRIGHT 2015,2016
# [+] International Business Machines Corp.
#
#
@@ -1183,16 +1183,40 @@ foreach my $argnum (0 .. $#ARGV)
print ECFILE $methods{$key}{method};
}
+ # add a method to adjust the severity if desired
+ print ECFILE " inline void setSev(const fapi2::errlSeverity_t i_sev)\n" .
+ " { iv_sev = i_sev; };\n\n";
+
+ # add a method to read the severity if desired
+ print ECFILE " inline fapi2::errlSeverity_t getSev() const\n" .
+ " { return iv_sev; };\n\n";
+
+
+ #
# Stick the execute method at the end of the other methods. We allow
# passing in of the severity so that macros which call execute() can over-ride
# the default severity.
- print ECFILE " void execute(fapi2::errlSeverity_t i_sev = fapi2::FAPI2_ERRL_SEV_UNDEFINED)\n";
+ print ECFILE " void execute(fapi2::errlSeverity_t" .
+ " i_sev = fapi2::FAPI2_ERRL_SEV_UNDEFINED," .
+ "bool commit = true )\n";
if ($arg_empty_ffdc eq undef)
{
print ECFILE " {\n";
- print ECFILE " FAPI_SET_HWP_ERROR(iv_rc, $err->{rc});\n";
- print ECFILE " fapi2::logError(iv_rc, (i_sev == fapi2::FAPI2_ERRL_SEV_UNDEFINED) ? iv_sev : i_sev);\n";
- print ECFILE " }\n\n";
+ print ECFILE " FAPI_SET_HWP_ERROR(iv_rc, $err->{rc});\n";
+ print ECFILE " if( commit )\n";
+ print ECFILE " {\n";
+ print ECFILE " fapi2::logError(iv_rc, " .
+ "(i_sev == fapi2::FAPI2_ERRL_SEV_UNDEFINED)" .
+ " ? iv_sev : i_sev);\n";
+ print ECFILE " }\n";
+ print ECFILE " else\n";
+ print ECFILE " {\n";
+ print ECFILE " fapi2::createPlatLog(iv_rc, " .
+ "(i_sev == fapi2::FAPI2_ERRL_SEV_UNDEFINED)".
+ " ? iv_sev : i_sev);\n";
+ print ECFILE " }\n\n";
+ print ECFILE " }\n";
+
}
else
{
OpenPOWER on IntegriCloud