summaryrefslogtreecommitdiffstats
path: root/src/build/debug
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2018-10-15 14:00:22 -0500
committerNicholas E. Bofferding <bofferdn@us.ibm.com>2018-10-29 09:11:13 -0500
commit33514fd4143b2d07a35e8d7a6d8b6ddb8ba0e1b7 (patch)
tree5107d5d59cef93a793fc22cb80356377d2a1408b /src/build/debug
parent5ddbd1ea9797ea8eb8a37e255591e532a6813707 (diff)
downloadtalos-hostboot-33514fd4143b2d07a35e8d7a6d8b6ddb8ba0e1b7.tar.gz
talos-hostboot-33514fd4143b2d07a35e8d7a6d8b6ddb8ba0e1b7.zip
Break down Dump requests into 1MB chunks
I have observed situations where it either takes several hours for a large getmem call to return or the call just hung. This commit will break down large reads into smaller 1MB pieces and also display the progress. Change-Id: I31ea4c231ee89a065e53f160d8506f8c8cf607c7 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67503 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Diffstat (limited to 'src/build/debug')
-rwxr-xr-xsrc/build/debug/Hostboot/Dump.pm42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/build/debug/Hostboot/Dump.pm b/src/build/debug/Hostboot/Dump.pm
index 07d91acf5..705638aa2 100755
--- a/src/build/debug/Hostboot/Dump.pm
+++ b/src/build/debug/Hostboot/Dump.pm
@@ -56,29 +56,23 @@ our %memory_maps = (
MEMSTATE_HALF_CACHE() =>
# All of the first 4MB can now be read.
[ MAX_HBB_SIZE, ((1 * _MB) - MAX_HBB_SIZE),
- 1 * _MB, 1 * _MB,
- 2 * _MB, 1 * _MB,
- 3 * _MB, 1 * _MB
+ 1 * _MB, 3 * _MB, #1M..4M
],
MEMSTATE_REDUCED_CACHE() =>
# Initial chips may have 2MB bad cache
- [ 4 * _MB, 1 * _MB,
- 5 * _MB, 1 * _MB,
- 6 * _MB, 1 * _MB,
- 7 * _MB, 1 * _MB
+ [ 4 * _MB, 4 * _MB, #4M..8M
],
MEMSTATE_FULL_CACHE() =>
# Full cache is 10MB
- [ 8 * _MB, 1 * _MB,
- 9 * _MB, 1 * _MB
+ [ 8 * _MB, 2 * _MB, #8M..10M
],
MEMSTATE_MS_48MEG() =>
# Add next 38MB after we expand to memory.
- [ 10 * _MB, 38 * _MB
+ [ 10 * _MB, 38 * _MB, #10M..48M
],
MEMSTATE_MS_64MEG() =>
# Add next 54MB after we expand to memory.
- [ 10 * _MB, 54 * _MB
+ [ 10 * _MB, 54 * _MB, #10M..64M
]
);
@@ -134,6 +128,8 @@ sub main
open( OUTFH, ">$hbDumpFile" ) or die "can't open $hbDumpFile: $!\n";
binmode(OUTFH);
+ ::userDisplay "Using HRMOR=". ::getHRMOR() . "\n";
+
# Read memory regions and output to file.
foreach my $state (@{$memory_states{int $memstate}})
{
@@ -143,11 +139,27 @@ sub main
{
my $start = shift @{$regions};
my $length = shift @{$regions};
- ::userDisplay (sprintf "\t%x@%x\n", $length, $start) if $debug;
- my $data = ::readData($start, $length);
- seek OUTFH, $start, SEEK_SET;
- print OUTFH $data;
+ my $length_remaining = $length;
+ for( my $curstart = $start;
+ $length_remaining > 0;
+ $curstart += (1 * _MB) )
+ {
+ # Only grab 1 MB at a time
+ my $curlength = (1 * _MB);
+ if( $length_remaining < $curlength )
+ {
+ $curlength = $length_remaining;
+ }
+
+ ::userDisplay (sprintf "...%x@%x\n", $curlength, $curstart);
+
+ my $data = ::readData($curstart, $curlength);
+ seek OUTFH, $curstart, SEEK_SET;
+ print OUTFH $data;
+
+ $length_remaining -= $curlength;
+ }
}
}
OpenPOWER on IntegriCloud