summaryrefslogtreecommitdiffstats
path: root/src/usr/errl
diff options
context:
space:
mode:
authorDoug Gilbert <dgilbert@us.ibm.com>2014-04-22 17:32:17 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-05-08 14:42:05 -0500
commit3189f266a58e957f77d7c2bb30a52bb4e1bdec0d (patch)
treedc9b6a6eecd75fc409a76f46b7c5bceb0814e670 /src/usr/errl
parentede62c2119ed0996b744b022cb9a014ef91439d6 (diff)
downloadtalos-hostboot-3189f266a58e957f77d7c2bb30a52bb4e1bdec0d.tar.gz
talos-hostboot-3189f266a58e957f77d7c2bb30a52bb4e1bdec0d.zip
Create SRC description file during build
Change-Id: I636dbfad6cc695e42e6de403e26a91634a4b370d Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/10715 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl')
-rw-r--r--src/usr/errl/errlentry.C2
-rwxr-xr-xsrc/usr/errl/parser/genErrlParsers.pl86
2 files changed, 86 insertions, 2 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index 0ed308a7c..aa05d534a 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -492,7 +492,7 @@ void ErrlEntry::addHwCallout(const TARGETING::Target *i_target,
* @userdata2 Number of EX chips associatd with core
*
* @devdesc Hardware callout could not Gard target
- $ because it could not find EX chip
+ * because it could not find EX chip
* associated with the Core to be called out
*
*/
diff --git a/src/usr/errl/parser/genErrlParsers.pl b/src/usr/errl/parser/genErrlParsers.pl
index 182448a65..85804341a 100755
--- a/src/usr/errl/parser/genErrlParsers.pl
+++ b/src/usr/errl/parser/genErrlParsers.pl
@@ -75,7 +75,7 @@ my $compPath = $base."/src/usr";
my $compIncPath = $base."/src/include/usr";
my $genFilesPath = $base."/obj/genfiles";
my $hbfwTermRcFile = $genFilesPath."/hbfw_term_rc.H";
-
+my $srcFileName = $genFilesPath."/srcListing";
#------------------------------------------------------------------------------
# Call subroutines to populate the following arrays:
# - @reasonCodeFiles (The list of files to parse through for reason codes)
@@ -438,6 +438,7 @@ close(OFILE);
#------------------------------------------------------------------------------
my %compValueToParseHash;
my %rcModValuesUsed;
+my %srcList;
foreach my $file (@filesToParse)
{
@@ -476,6 +477,7 @@ foreach my $file (@filesToParse)
my $rcValue = "";
my @userData;
my $desc = "";
+ my $cdesc = "";
# Read the entire error log tag into an array
my @tag;
@@ -635,6 +637,38 @@ foreach my $file (@filesToParse)
}
}
}
+ elsif ($line =~ /\@custdesc\s+(\S+.*)/i)
+ {
+ # Found a customer description. Strip out any double-quotes
+ # and trailing whitespace
+ $cdesc = $1;
+ $cdesc =~ s/\"//g;
+ $cdesc =~ s/\s+$//;
+
+ # Look for follow-on lines
+ for ($lineNum++; $lineNum < $numLines; $lineNum++)
+ {
+ $line = $tag[$lineNum];
+
+ if ($line =~ /\@/)
+ {
+ # Found the next element, rewind
+ $lineNum--;
+ last;
+ }
+
+ # Continuation of description, strip out any double-
+ # quotes and leading / trailing whitespace
+ $line =~ s/^.+\*\s+//;
+ $line =~ s/\"//g;
+ $line =~ s/\s+$//;
+
+ if ($line ne "")
+ {
+ $cdesc = $cdesc . " " . $line;
+ }
+ }
+ }
}
# Check that the required fields were found
@@ -659,6 +693,21 @@ foreach my $file (@filesToParse)
exit(1);
}
+ # if no customer desc is provided, then use $desc
+ if ($cdesc eq "")
+ {
+ $cdesc =
+ "During processor/memory subsystem initialization,"
+ . " an error was encountered: $desc";
+ }
+
+ # SRC list - eliminate dups
+ my $srcText = sprintf("%04X", hex($rcValue));
+ if($srcList{$srcText} eq "")
+ {
+ $srcList{$srcText} .= $cdesc;
+ }
+
# Create the combined returncode/moduleid value that the parser looks for and
# ensure that it is not a duplicate of one already found
my $rcModValue = $rcValue . $modIdValue;
@@ -695,6 +744,41 @@ foreach my $file (@filesToParse)
close(PARSE_FILE);
}
+## all subsystems HB uses - not every combination is possible, but it makes
+# the list of SRCs thourough. It's not clear yet if we are going to put
+# subsystem text in the output file or not.
+# TODO RTC:106255 Get rid of hardcoded subsys values
+my %subsys = (
+ '10' => 'Processor',
+ '13' => 'Processor Unit',
+ '14' => 'Processor Bus',
+ '20' => 'Memory',
+ '21' => 'Memory Controller',
+ '22' => 'Memory Bus',
+ '23' => 'Memory DIMM',
+ '50' => 'Central Electronic Complex',
+ '55' => 'VPD Hardware Interface',
+ '56' => 'I2C Hardware',
+ '57' => 'Hardware Chip Interface',
+ '58' => 'Clock Controller',
+ '5A' => 'TOD Hardware',
+ '5C' => 'Service Processor to Hypervisor hardware interface',
+ '60' => 'Power',
+ '70' => 'Miscellaneous',
+ '81' => 'Service Processor Firmware',
+ '82' => 'Hypervisor Firmware',
+ '8A' => 'Hostboot Firmware');
+
+open(OFILE, ">", $srcFileName) or die ("Cannot open: $srcFileName: $!");
+foreach my $sub (sort keys %subsys)
+{
+ foreach my $rcVal (sort keys %srcList)
+ {
+ print OFILE "BC$sub$rcVal, $srcList{$rcVal}\n";
+ }
+}
+close(OFILE);
+
#------------------------------------------------------------------------------
# For each component value, print a file containing the parse code
#------------------------------------------------------------------------------
OpenPOWER on IntegriCloud