summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2013-04-25 11:31:53 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-05-06 13:52:52 -0500
commit31267d99d061245ce7eebb1eb55465a56aa67113 (patch)
tree10e3fc8dfc93ff7075ceabcbc30dae0904115e8d /src
parent7b9f62561602ec8cee11f085c9d524da9959ffc1 (diff)
downloadtalos-hostboot-31267d99d061245ce7eebb1eb55465a56aa67113.tar.gz
talos-hostboot-31267d99d061245ce7eebb1eb55465a56aa67113.zip
HWPF: Allow easy collection of multiple register sets as FFDC on HWP Error
With current code, FAPI Error XML needs to have a separate collectRegisterFfdc element for each register set, each element specifies the register set and the target. With this change, you can specify multiple register sets for a particular target in the same collectRegisterFfdc element. This was requested by Jeshua and is clearly an improvement. Change-Id: I234177b63df6da61f2efd579f36336e12a429fbb Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4213 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/hwpf/fapi/fapiParseErrorInfo.pl28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/usr/hwpf/fapi/fapiParseErrorInfo.pl b/src/usr/hwpf/fapi/fapiParseErrorInfo.pl
index 996ec414c..4076ff5b0 100755
--- a/src/usr/hwpf/fapi/fapiParseErrorInfo.pl
+++ b/src/usr/hwpf/fapi/fapiParseErrorInfo.pl
@@ -52,6 +52,8 @@
# mjjones 01/09/13 Fix CFAM register capture
# mjjones 03/14/13 Allow 64bit literals for SCOM reg capture
# mjjones 03/22/13 Support Procedure Callouts
+# mjjones 04/25/13 Allow multiple register ffdc ids in a
+# collectRegisterFfdc element
#
# End Change Log ******************************************************
@@ -338,7 +340,8 @@ foreach my $argnum (1 .. $#ARGV)
#--------------------------------------------------------------------------
my $errors = $xml->XMLin($infile, ForceArray =>
['hwpError', 'collectFfdc', 'ffdc', 'callout', 'deconfigure', 'gard',
- 'registerFfdc', 'collectRegisterFfdc', 'cfamRegister', 'scomRegister']);
+ 'registerFfdc', 'collectRegisterFfdc', 'cfamRegister', 'scomRegister',
+ 'id']);
# Uncomment to get debug output of all errors
#print "\nFile: ", $infile, "\n", Dumper($errors), "\n";
@@ -412,9 +415,9 @@ foreach my $argnum (1 .. $#ARGV)
#------------------------------------------------------------------
# Check that expected fields are present
#------------------------------------------------------------------
- if (! exists $collectRegisterFfdc->{id})
+ if (! exists $collectRegisterFfdc->{id}[0])
{
- print ("fapiParseErrorInfo.pl ERROR. id missing from collectRegisterFfdc\n");
+ print ("fapiParseErrorInfo.pl ERROR. id(s) missing from collectRegisterFfdc\n");
exit(1);
}
@@ -424,8 +427,11 @@ foreach my $argnum (1 .. $#ARGV)
exit(1);
}
- print EIFILE "fapiCollectRegFfdc($collectRegisterFfdc->{target}, ";
- print EIFILE "fapi::$collectRegisterFfdc->{id}, RC); ";
+ foreach my $id (@{$collectRegisterFfdc->{id}})
+ {
+ print EIFILE "fapiCollectRegFfdc($collectRegisterFfdc->{target}, ";
+ print EIFILE "fapi::$id, RC); ";
+ }
}
print EIFILE "\n";
@@ -589,21 +595,27 @@ foreach my $argnum (1 .. $#ARGV)
#----------------------------------------------------------------------
# Check that expected fields are present
#----------------------------------------------------------------------
- if (! exists $registerFfdc->{id})
+ if (! exists $registerFfdc->{id}[0])
{
print ("fapiParseErrorInfo.pl ERROR. id missing from registerFfdc\n");
exit(1);
}
+ if (scalar @{$registerFfdc->{id}} > 1)
+ {
+ print ("fapiParseErrorInfo.pl ERROR. multiple ids in registerFfdc\n");
+ exit(1);
+ }
+
#----------------------------------------------------------------------
# Set the FFDC enum value in a global hash
#----------------------------------------------------------------------
- setFfdcEnumValue($registerFfdc->{id});
+ setFfdcEnumValue($registerFfdc->{id}[0]);
#----------------------------------------------------------------------
# Generate code to capture the registers in fapiCollectRegFfdc.C
#----------------------------------------------------------------------
- print CRFILE " case $registerFfdc->{id}:\n";
+ print CRFILE " case $registerFfdc->{id}[0]:\n";
# Look for CFAM Register addresses
foreach my $cfamRegister (@{$registerFfdc->{cfamRegister}})
OpenPOWER on IntegriCloud