summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2007-05-23 20:33:48 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2007-05-23 20:33:48 +0000
commita1c89e25c5c346f99dc51b78682349788f845846 (patch)
tree2dc182bdfb2d42eb1fa7ff2e40c8f70b24e5e63d /sys
parent25f0a82c2a3f761cc8804e53e0deb876ba827cc5 (diff)
Print real/available memory in MB as well as bytes in dmesg, and unify
architectures to print it the same way. ok henning, miod; i386 part from tom
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/machdep.c9
-rw-r--r--sys/arch/arm/arm/arm32_machdep.c10
-rw-r--r--sys/arch/hp300/hp300/machdep.c9
-rw-r--r--sys/arch/i386/i386/machdep.c11
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c9
-rw-r--r--sys/arch/macppc/macppc/machdep.c9
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c9
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c8
-rw-r--r--sys/arch/mvmeppc/mvmeppc/machdep.c9
-rw-r--r--sys/arch/sgi/sgi/machdep.c11
-rw-r--r--sys/arch/sparc/sparc/machdep.c8
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c8
-rw-r--r--sys/arch/vax/vax/machdep.c8
13 files changed, 68 insertions, 50 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index 542807f4887..a49db688c75 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.55 2007/02/17 23:59:03 marco Exp $ */
+/* $OpenBSD: machdep.c,v 1.56 2007/05/23 20:33:46 pvalchev Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -300,7 +300,8 @@ cpu_startup(void)
printf("%s", version);
- printf("real mem = %u (%uK)\n", ctob(physmem), ctob(physmem)/1024);
+ printf("real mem = %u (%uMB)\n", ctob(physmem),
+ ctob(physmem)/1024/1024);
if (physmem >= btoc(1ULL << 32)) {
extern int amdgart_enable;
@@ -339,8 +340,8 @@ cpu_startup(void)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- printf("avail mem = %lu (%luK)\n", ptoa(uvmexp.free),
- ptoa(uvmexp.free)/1024);
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free)/1024/1024);
printf("using %u buffers containing %u bytes (%uK) of memory\n",
nbuf, bufpages * PAGE_SIZE, bufpages * PAGE_SIZE / 1024);
diff --git a/sys/arch/arm/arm/arm32_machdep.c b/sys/arch/arm/arm/arm32_machdep.c
index 0a0f4992ce4..ce628cccc41 100644
--- a/sys/arch/arm/arm/arm32_machdep.c
+++ b/sys/arch/arm/arm/arm32_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arm32_machdep.c,v 1.22 2006/07/12 17:29:53 miod Exp $ */
+/* $OpenBSD: arm32_machdep.c,v 1.23 2007/05/23 20:33:46 pvalchev Exp $ */
/* $NetBSD: arm32_machdep.c,v 1.42 2003/12/30 12:33:15 pk Exp $ */
/*
@@ -312,8 +312,8 @@ cpu_startup()
*/
printf(version);
- printf("real mem = %u (%uK) %uMB\n", ctob(physmem),
- ctob(physmem)/1024, ctob(physmem)/1024/1024);
+ printf("real mem = %u (%uMB)\n", ctob(physmem),
+ ctob(physmem)/1024/1024);
/*
* Find out how much space we need, allocate it,
@@ -390,8 +390,8 @@ cpu_startup()
*/
bufinit();
- printf("avail mem = %lu (%uK)\n", ptoa(uvmexp.free),
- ptoa(uvmexp.free)/1024);
+ printf("avail mem = %lu (%uMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free)/1024/1024);
printf("using %d buffers containing %u bytes (%uK) of memory\n",
nbuf, bufpages * PAGE_SIZE, bufpages * PAGE_SIZE / 1024);
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index b8cc30817e7..449dcfb9604 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.110 2006/06/16 20:48:49 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.111 2007/05/23 20:33:46 pvalchev Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -276,7 +276,8 @@ cpu_startup()
*/
printf(version);
identifycpu();
- printf("real mem = %u (%uK)\n", ctob(physmem), ctob(physmem)/1024);
+ printf("real mem = %u (%uMB)\n", ctob(physmem),
+ ctob(physmem)/1024/1024);
/*
* Find out how much space we need, allocate it,
@@ -345,8 +346,8 @@ cpu_startup()
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- printf("avail mem = %lu (%luK)\n", ptoa(uvmexp.free),
- ptoa(uvmexp.free) / 1024);
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free)/1024/1024);
printf("using %d buffers containing %u bytes (%uK) of memory\n",
nbuf, bufpages * PAGE_SIZE, bufpages * PAGE_SIZE / 1024);
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index fbb97f47acc..22306883185 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.388 2007/05/15 16:27:38 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.389 2007/05/23 20:33:46 pvalchev Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -427,8 +427,8 @@ cpu_startup()
curcpu()->ci_feature_flags = cpu_feature;
identifycpu(curcpu());
- printf("real mem = %lu (%uK)\n", ctob((paddr_t)physmem),
- ctob((paddr_t)physmem)/1024U);
+ printf("real mem = %llu (%lluMB)\n", ctob((unsigned long long)physmem),
+ ctob((unsigned long long)physmem)/1024U/1024U);
/*
* Find out how much space we need, allocate it,
@@ -459,8 +459,9 @@ cpu_startup()
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- printf("avail mem = %lu (%uK)\n", ptoa((paddr_t)uvmexp.free),
- ptoa((paddr_t)uvmexp.free) / 1024U);
+ printf("avail mem = %llu (%lluMB)\n",
+ ptoa((unsigned long long)uvmexp.free),
+ ptoa((unsigned long long)uvmexp.free)/1024U/1024U);
printf("using %d buffers containing %u bytes (%uK) of memory\n",
nbuf, bufpages * PAGE_SIZE, bufpages * PAGE_SIZE / 1024);
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index d17be476954..46956d3b101 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.136 2007/03/17 20:05:22 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.137 2007/05/23 20:33:46 pvalchev Exp $ */
/* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */
/*
@@ -405,7 +405,8 @@ cpu_startup(void)
printf("this kernel.\n\n");
for (delay = 0; delay < 1000000; delay++);
}
- printf("real mem = %u (%uK)\n", ctob(physmem), ctob(physmem)/1024);
+ printf("real mem = %u (%uMB)\n", ctob(physmem),
+ ctob(physmem)/1024/1024);
/*
* Find out how much space we need, allocate it,
@@ -469,8 +470,8 @@ cpu_startup(void)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- printf("avail mem = %lu (%luK)\n", ptoa(uvmexp.free),
- ptoa(uvmexp.free) / 1024);
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free) / 1024 / 1024);
printf("using %d buffers containing %u bytes (%uK) of memory\n",
nbuf, bufpages * PAGE_SIZE, bufpages * PAGE_SIZE / 1024);
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 40b765da52e..1dde4fb97e9 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.89 2007/03/20 20:59:54 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.90 2007/05/23 20:33:46 pvalchev Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -497,7 +497,8 @@ cpu_startup()
printf("%s", version);
- printf("real mem = %d (%dK)\n", ctob(physmem), ctob(physmem)/1024);
+ printf("real mem = %u (%uMB)\n", ctob(physmem),
+ ctob(physmem)/1024/1024);
/*
* Find out how much space we need, allocate it,
@@ -563,8 +564,8 @@ cpu_startup()
VM_PHYS_SIZE, 0, FALSE, NULL);
ppc_malloc_ok = 1;
- printf("avail mem = %ld (%ldK)\n", ptoa(uvmexp.free),
- ptoa(uvmexp.free) / 1024);
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free) / 1024 / 1024);
printf("using %u buffers containing %u bytes (%uK) of memory\n",
nbuf, bufpages * PAGE_SIZE, bufpages * PAGE_SIZE / 1024);
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 9e9560c73b2..bde27ec65c1 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.100 2006/07/03 20:48:27 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.101 2007/05/23 20:33:46 pvalchev Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -247,7 +247,8 @@ cpu_startup()
*/
printf("%s", version);
identifycpu();
- printf("real mem = %d (%dK)\n", ctob(physmem), ctob(physmem) / 1024);
+ printf("real mem = %u (%uMB)\n", ctob(physmem),
+ ctob(physmem) / 1024 / 1024);
/*
* Find out how much space we need, allocate it,
@@ -327,8 +328,8 @@ cpu_startup()
*/
bufinit();
- printf("avail mem = %d (%dK)\n",
- ptoa(uvmexp.free), ptoa(uvmexp.free) / 1024);
+ printf("avail mem = %u (%uMB)\n",
+ ptoa(uvmexp.free), ptoa(uvmexp.free) / 1024 / 1024);
printf("using %d buffers containing %d bytes of memory\n",
nbuf, bufpages * PAGE_SIZE);
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index b3038827a2c..6123305b6d6 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.187 2007/05/14 17:00:40 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.188 2007/05/23 20:33:46 pvalchev Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -349,7 +349,8 @@ cpu_startup()
*/
printf(version);
identifycpu();
- printf("real mem = %d\n", ctob(physmem));
+ printf("real mem = %u (%uMB)\n", ctob(physmem),
+ ctob(physmem)/1024/1024);
/*
* Find out how much space we need, allocate it,
@@ -442,7 +443,8 @@ cpu_startup()
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- printf("avail mem = %ld (%d pages)\n", ptoa(uvmexp.free), uvmexp.free);
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free)/1024/1024);
printf("using %d buffers containing %d bytes of memory\n", nbuf,
bufpages * PAGE_SIZE);
diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c
index 3bfa7a89ebf..321a3b190aa 100644
--- a/sys/arch/mvmeppc/mvmeppc/machdep.c
+++ b/sys/arch/mvmeppc/mvmeppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.51 2007/02/27 01:04:01 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.52 2007/05/23 20:33:47 pvalchev Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -402,7 +402,8 @@ cpu_startup()
printf("%s", version);
- printf("real mem = %d (%dK)\n", ctob(physmem), ctob(physmem)/1024);
+ printf("real mem = %u (%uMB)\n", ctob(physmem),
+ ctob(physmem)/1024/1024);
/*
* Find out how much space we need, allocate it,
@@ -469,8 +470,8 @@ cpu_startup()
VM_PHYS_SIZE, 0, FALSE, NULL);
ppc_malloc_ok = 1;
- printf("avail mem = %ld (%ldK)\n", ptoa(uvmexp.free),
- ptoa(uvmexp.free) / 1024);
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free) / 1024 / 1024);
printf("using %d buffers containing %d bytes of memory\n", nbuf,
bufpages * PAGE_SIZE);
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index 8326a59fa98..8953dc13de4 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.38 2007/05/03 19:34:01 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.39 2007/05/23 20:33:47 pvalchev Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -751,8 +751,10 @@ cpu_startup()
* Good {morning,afternoon,evening,night}.
*/
printf(version);
- printf("real mem = %d\n", ptoa(physmem));
- printf("rsvd mem = %d\n", ptoa(rsvdmem));
+ printf("real mem = %u (%uMB)\n", ptoa(physmem),
+ ptoa(physmem)/1024/1024);
+ printf("rsvd mem = %u (%uMB)\n", ptoa(rsvdmem),
+ ptoa(physmem)/1024/1024);
/*
* Allocate virtual address space for file I/O buffers.
@@ -806,7 +808,8 @@ cpu_startup()
#ifdef PMAPDEBUG
pmapdebug = opmapdebug;
#endif
- printf("avail mem = %d\n", ptoa(uvmexp.free));
+ printf("avail mem = %u (%uMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free)/1024/1024);
printf("using %d buffers containing %d bytes of memory\n",
nbuf, bufpages * PAGE_SIZE);
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 1a76dc4d19c..e2295603534 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.109 2006/06/29 17:53:35 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.110 2007/05/23 20:33:47 pvalchev Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -189,7 +189,8 @@ cpu_startup()
*/
printf(version);
/*identifycpu();*/
- printf("real mem = %d\n", ctob(physmem));
+ printf("real mem = %u (%uMB)\n", ctob(physmem),
+ ctob(physmem)/1024/1024);
/*
* Find out how much space we need, allocate it,
@@ -300,7 +301,8 @@ cpu_startup()
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- printf("avail mem = %ld\n", ptoa(uvmexp.free));
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free)/1024/1024);
printf("using %d buffers containing %d bytes of memory\n",
nbuf, bufpages * PAGE_SIZE);
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index faf51063204..229efbf7b1d 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.87 2007/03/31 22:16:48 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.88 2007/05/23 20:33:47 pvalchev Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -255,7 +255,8 @@ cpu_startup()
*/
printf(version);
/*identifycpu();*/
- printf("total memory = %ld\n", (long)physmem * PAGE_SIZE);
+ printf("real mem = %lu (%luMB)\n", ctob(physmem),
+ ctob(physmem)/1024/1024);
/*
* Find out how much space we need, allocate it,
* and then give everything true virtual addresses.
@@ -324,7 +325,8 @@ cpu_startup()
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
- printf("avail memory = %ld\n", (long)uvmexp.free * PAGE_SIZE);
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free)/1024/1024);
printf("using %d buffers containing %ld bytes of memory\n", nbuf,
(long)bufpages * PAGE_SIZE);
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c
index 0591d486a9e..3859e55af67 100644
--- a/sys/arch/vax/vax/machdep.c
+++ b/sys/arch/vax/vax/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.86 2007/05/16 16:30:42 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.87 2007/05/23 20:33:47 pvalchev Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
@@ -195,7 +195,8 @@ cpu_startup()
if (dep_call->cpu_conf)
(*dep_call->cpu_conf)();
- printf("total memory = %d\n", avail_end);
+ printf("real mem = %u (%uMB)\n", avail_end,
+ avail_end/1024/1024);
physmem = btoc(avail_end);
panicstr = NULL;
mtpr(AST_NO, PR_ASTLVL);
@@ -273,7 +274,8 @@ cpu_startup()
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- printf("avail memory = %ld\n", ptoa(uvmexp.free));
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free)/1024/1024);
printf("using %d buffers containing %d bytes of memory\n", nbuf, bufpages * PAGE_SIZE);
/*