diff options
author | Marty Gloff <mgloff@us.ibm.com> | 2017-06-19 11:54:55 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-06-30 10:18:59 -0400 |
commit | 178ec2a3c04b60d6abba4a6a9d344c9fb6f61027 (patch) | |
tree | 465293af14f04aff634cd58288334ab79e0ed8a3 /src/build/debug/Hostboot/BlTrace.pm | |
parent | f70e2531c2b0bafc08151294d904991f0e376493 (diff) | |
download | talos-hostboot-178ec2a3c04b60d6abba4a6a9d344c9fb6f61027.tar.gz talos-hostboot-178ec2a3c04b60d6abba4a6a9d344c9fb6f61027.zip |
Change Bootloader data alignments
The data defined in bootloader_data.H is not aligned as originally
thought. Some changes should be made to this file and the
BlData.pm tool to nicely align this data and output it.
Also add static_assert statements to alert for future changes.
Use default address to find data and traces with optional argument
to override that address.
Change-Id: I4ed61273baa54b2c7cb510ef9a24cebb239d9300
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42057
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/debug/Hostboot/BlTrace.pm')
-rw-r--r-- | src/build/debug/Hostboot/BlTrace.pm | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/build/debug/Hostboot/BlTrace.pm b/src/build/debug/Hostboot/BlTrace.pm index 27a5e6aa6..8aa93a951 100644 --- a/src/build/debug/Hostboot/BlTrace.pm +++ b/src/build/debug/Hostboot/BlTrace.pm @@ -129,13 +129,22 @@ sub main { ::setBootloader(); - my $btLdrHrmorOffset = 0x0000000000200000; + my ($packName,$args) = @_; - my ($dataSym, $dataSize) = ::findSymbolAddress("Bootloader::g_blData"); - if (not defined $dataSym) { ::userDisplay "Cannot find symbol.\n"; die; } - my $dataAddr = ::read64($dataSym|$btLdrHrmorOffset); + my $traceAddr = 0x08208000; + my $traceSize = 64; - my $indexAddr = $dataAddr + 64; + # Parse trace address from options. + if (defined $args->{"address"}) + { + $traceAddr = $args->{"address"}; + } + elsif (defined $args->{"addr"}) + { + $traceAddr = $args->{"addr"}; + } + + my $indexAddr = $traceAddr + $traceSize; my $index = ::read8($indexAddr); my $indexStr = sprintf("0x%02X", $index); @@ -143,9 +152,7 @@ sub main ::userDisplay "\nNext Entry Index: "; ::userDisplay $indexStr; - my $traceAddr = $dataAddr; my $traceAddrStr = sprintf("0x%08X", $traceAddr); - my $traceSize = 64; my $trace = ::readData($traceAddr,$traceSize); $trace =~ s/\0+//g; #strip off nulls my $traceData = formatTrace($trace); @@ -164,5 +171,9 @@ sub helpInfo my %info = ( name => "BlTrace", intro => ["Displays the Bootloader trace buffer."], + options => { + "address='trace address'" => ["Address of trace buffer."], + }, + notes => ["addr can be used as a short-name for 'address'."] ); } |