summaryrefslogtreecommitdiffstats
path: root/src/build/tools
diff options
context:
space:
mode:
authorMonte Copeland <copelanm@us.ibm.com>2012-01-05 13:36:20 -0600
committerMonte K. Copeland <copelanm@us.ibm.com>2012-01-09 09:40:15 -0600
commit0700cb28c8c52a9cc675db648adddcf822af8652 (patch)
tree8df613d88689838ae0386f776f4e1e5135685702 /src/build/tools
parenta8ac662f8643211032077043eace4b92108fc5fe (diff)
downloadtalos-hostboot-0700cb28c8c52a9cc675db648adddcf822af8652.tar.gz
talos-hostboot-0700cb28c8c52a9cc675db648adddcf822af8652.zip
Perl fixes for variable-sized trace buffers.
Change-Id: I40e5efaba9bde0a2b75b8cd5b316f7b8642db8bd Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/594 Tested-by: Jenkins Server Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Monte K. Copeland <copelanm@us.ibm.com>
Diffstat (limited to 'src/build/tools')
-rwxr-xr-xsrc/build/tools/hb-parsedump.pl14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/build/tools/hb-parsedump.pl b/src/build/tools/hb-parsedump.pl
index 9816eca8c..c190d3a2b 100755
--- a/src/build/tools/hb-parsedump.pl
+++ b/src/build/tools/hb-parsedump.pl
@@ -49,10 +49,12 @@ use File::Copy;
#------------------------------------------------------------------------------
# Constants
#------------------------------------------------------------------------------
-use constant MAX_NUM_TRACE_BUFFERS => 24;
+use constant MAX_NUM_TRACE_BUFFERS => 48;
use constant DESC_ARRAY_ENTRY_ADDR_SIZE => 8;
use constant DESC_ARRAY_ENTRY_COMP_NAME_SIZE => 16;
use constant TRAC_DEFAULT_BUFFER_SIZE => 0x0800;
+use constant TRAC_BUFFER_SIZE_OFFSET => 20;
+use constant TRAC_BUFFER_SIZE_SIZE => 4;
#------------------------------------------------------------------------------
@@ -287,9 +289,17 @@ if ((0 != $addr) && (0 != $size))
#print "Component: $compName, $buffer, $compBufAddr\n";
$addr += DESC_ARRAY_ENTRY_ADDR_SIZE;
+ # read a portion of the buffer header to get its size
+ $buffer = readBinFile($hbDumpFile,
+ $compBufAddr+TRAC_BUFFER_SIZE_OFFSET,
+ TRAC_BUFFER_SIZE_SIZE);
+ my $compBufferSize = unpack('H*',$buffer);
+ $compBufferSize = hex $compBufferSize;
+
+
#read the component trace buffer and save to file
#read the component trace buffer
- $buffer = readBinFile($hbDumpFile, $compBufAddr, TRAC_DEFAULT_BUFFER_SIZE);
+ $buffer = readBinFile($hbDumpFile, $compBufAddr, $compBufferSize );
chdir "$extDir";
OpenPOWER on IntegriCloud