From 7e3be8261db520e172688c70dd1a71c0bef652f6 Mon Sep 17 00:00:00 2001 From: Ilya Smirnov Date: Mon, 24 Apr 2017 14:13:44 -0500 Subject: [PATCH] Add support of HBEL parsing to eSEL.pl Implemented the decode_hbel_data option that takes an HBEL PNOR partition and parses out the errors. There is also an option to filter out ACKed errors by passing the -r flag to the script (only works with decode_hbel_data option). The script now removes the temporary files created during the process. Change-Id: Ia75e119a65b10edc107a4ba0ee1a75c74aaa4054 RTC:170649 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40090 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Reviewed-by: Stephen M. Cprek Reviewed-by: Prachi Gupta Reviewed-by: Daniel M. Crowell --- src/build/debug/eSEL.pl | 155 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 143 insertions(+), 12 deletions(-) diff --git a/src/build/debug/eSEL.pl b/src/build/debug/eSEL.pl index c8c9723d13c..1e10b1fb998 100755 --- a/src/build/debug/eSEL.pl +++ b/src/build/debug/eSEL.pl @@ -30,8 +30,14 @@ use Getopt::Long; use File::Basename; use Data::Dumper; +use File::Copy qw(copy); +use Fcntl qw(:seek); -use constant ESEL_HEADER_LENGTH => 16; +use constant ESEL_HEADER_LENGTH => 16; +use constant PNOR_ERROR_LENGTH => 4096; +use constant WORD_5_OFFSET => 100; +use constant ACK_MASK => 0x00200000; +use constant EMPTY_ERRLOG_IN_PNOR => "ffffffff"; # options and usage my $target = ''; # Target BMC name / IP (convert to IP) @@ -44,17 +50,21 @@ my $output_path = cwd(); my $debug = 0; my $usage = 0; -my $version = "201702221413"; my $option = ""; my $esel_file = ""; my $bad_option = 0; +my $removeEcc = 0; +my $filterAcked = 0; +my $keepTempFiles = 0; +my @filesToDelete = (); +my $ecc_executable = ""; my %options_table = ( get_ami_data => 0, decode_ami_data => 0, get_and_decode_ami => 0, decode_obmc_data => 0, - decode_hberrl_data => 0 + decode_hbel_data => 0 ); sub printUsage @@ -66,17 +76,20 @@ sub printUsage print " [-f ] # default $fspt_path(*)\n"; print " [-i ] # default $img_path(*)\n"; print " [-l ]\n"; + print " [-c] # remove ECC before processing the HBEL partition\n"; + print " [-r] # filter out ACKed logs from HBEL\n"; + print " [-k] # keep the temp files created by the script\n"; + print " [--ecc ] # path to the ECC executable\n"; print " [-p