summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2002-04-03 05:11:59 +0000
committermarcel <marcel@FreeBSD.org>2002-04-03 05:11:59 +0000
commit436b1d297cccd055217830e1047a70aa8eb9afc3 (patch)
treed990e5e140d2f366052117dabdde7ce635791195 /sys/ia64
parent6625b0cb224168f956ef6665096f92f6c08c7a51 (diff)
downloadFreeBSD-src-436b1d297cccd055217830e1047a70aa8eb9afc3.zip
FreeBSD-src-436b1d297cccd055217830e1047a70aa8eb9afc3.tar.gz
Use a twiddle to show that we're busy dumping. The initial code
emitted the total number of pages it still had to dump prior to dumping a block of up to 16 pages. For a 128MB region this would result in 8M number of printf()s. Barf! The problem in general is that memory typically has one really big region and a number of "scattered" smaller regions. Some may even be just a few pages. The twiddle works best for now, but it doesn't really give a good progress indication for the large regions. Those are the cases where you definitely want good PI to avoid having the user turn into a twiddle :-)
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/dump_machdep.c12
-rw-r--r--sys/ia64/ia64/ia64dump.c12
2 files changed, 14 insertions, 10 deletions
diff --git a/sys/ia64/ia64/dump_machdep.c b/sys/ia64/ia64/dump_machdep.c
index a407070..d49265d 100644
--- a/sys/ia64/ia64/dump_machdep.c
+++ b/sys/ia64/ia64/dump_machdep.c
@@ -124,17 +124,19 @@ cb_dumpdata(EFI_MEMORY_DESCRIPTOR *mdp, int seqnr, void *arg)
vm_offset_t pa;
uint64_t pgs;
size_t sz;
- int error;
-
- printf(" region %d:", seqnr);
+ int error, twiddle;
error = 0; /* catch case in which mdp->NumberOfPages is 0 */
+ twiddle = 0;
pgs = mdp->NumberOfPages;
pa = IA64_PHYS_TO_RR7(mdp->PhysicalStart);
+
+ printf(" region %d: %ld pages ", seqnr, (long)pgs);
+
while (pgs) {
sz = (pgs > (DFLTPHYS >> EFI_PAGE_SHIFT))
? DFLTPHYS : pgs << EFI_PAGE_SHIFT;
- printf(" %lld", pgs);
+ printf("%c\b", "|/-\\"[twiddle++ & 3]);
error = di->dumper(di->priv, (void*)pa, NULL, dumplo, sz);
if (error)
break;
@@ -142,7 +144,7 @@ cb_dumpdata(EFI_MEMORY_DESCRIPTOR *mdp, int seqnr, void *arg)
pgs -= sz >> EFI_PAGE_SHIFT;
pa += sz;
}
- printf("\n");
+ printf("... %s\n", (error) ? "fail" : "ok");
return (error);
}
diff --git a/sys/ia64/ia64/ia64dump.c b/sys/ia64/ia64/ia64dump.c
index a407070..d49265d 100644
--- a/sys/ia64/ia64/ia64dump.c
+++ b/sys/ia64/ia64/ia64dump.c
@@ -124,17 +124,19 @@ cb_dumpdata(EFI_MEMORY_DESCRIPTOR *mdp, int seqnr, void *arg)
vm_offset_t pa;
uint64_t pgs;
size_t sz;
- int error;
-
- printf(" region %d:", seqnr);
+ int error, twiddle;
error = 0; /* catch case in which mdp->NumberOfPages is 0 */
+ twiddle = 0;
pgs = mdp->NumberOfPages;
pa = IA64_PHYS_TO_RR7(mdp->PhysicalStart);
+
+ printf(" region %d: %ld pages ", seqnr, (long)pgs);
+
while (pgs) {
sz = (pgs > (DFLTPHYS >> EFI_PAGE_SHIFT))
? DFLTPHYS : pgs << EFI_PAGE_SHIFT;
- printf(" %lld", pgs);
+ printf("%c\b", "|/-\\"[twiddle++ & 3]);
error = di->dumper(di->priv, (void*)pa, NULL, dumplo, sz);
if (error)
break;
@@ -142,7 +144,7 @@ cb_dumpdata(EFI_MEMORY_DESCRIPTOR *mdp, int seqnr, void *arg)
pgs -= sz >> EFI_PAGE_SHIFT;
pa += sz;
}
- printf("\n");
+ printf("... %s\n", (error) ? "fail" : "ok");
return (error);
}
OpenPOWER on IntegriCloud