summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-02-04 17:19:18 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-02-04 17:19:18 +0000
commited1908a5314982e32aceafdc84e9ec3be343df48 (patch)
tree7d76c3d75fe663a47d710ed6fa0abdfa98e25700 /sys
parentdeaef39c57e0bee6c4450718402784d5c2bbd013 (diff)
Unify memory size reports a bit more: always report size in MB, and report
reserved memory on alpha and hppa on its own line (as done on sgi).
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/machdep.c24
-rw-r--r--sys/arch/hppa/hppa/machdep.c10
-rw-r--r--sys/arch/hppa64/hppa64/machdep.c10
-rw-r--r--sys/arch/luna88k/luna88k/machdep.c8
-rw-r--r--sys/arch/sh/sh/sh_machdep.c9
-rw-r--r--sys/arch/solbourne/solbourne/machdep.c8
6 files changed, 40 insertions, 29 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index f6536464908..f2d1f09302d 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.116 2008/06/27 17:22:12 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.117 2009/02/04 17:19:16 miod Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -859,17 +859,19 @@ cpu_startup()
*/
printf(version);
identifycpu();
- printf("total memory = %lu (%luK)\n", ptoa((psize_t)totalphysmem),
- ptoa((psize_t)totalphysmem) / 1024);
- printf("(%lu reserved for PROM, ", ptoa((psize_t)resvmem));
- printf("%lu used by OpenBSD)\n", ptoa((psize_t)physmem));
+ printf("real mem = %lu (%luMB)\n", ptoa((psize_t)totalphysmem),
+ ptoa((psize_t)totalphysmem) / 1024 / 1024);
+ printf("rsvd mem = %lu (%luMB)\n", ptoa((psize_t)resvmem),
+ ptoa((psize_t)resvmem) / 1024 / 1024);
if (unusedmem) {
- printf("WARNING: unused memory = %lu (%luK)\n",
- ptoa((psize_t)unusedmem), ptoa((psize_t)unusedmem) / 1024);
+ printf("WARNING: unused memory = %lu (%luMB)\n",
+ ptoa((psize_t)unusedmem),
+ ptoa((psize_t)unusedmem) / 1024 / 1024);
}
if (unknownmem) {
- printf("WARNING: %lu (%luK) of memory with unknown purpose\n",
- ptoa((psize_t)unknownmem), ptoa((psize_t)unknownmem) / 1024);
+ printf("WARNING: %lu (%luMB) of memory with unknown purpose\n",
+ ptoa((psize_t)unknownmem),
+ ptoa((psize_t)unknownmem) / 1024 / 1024);
}
/*
@@ -896,8 +898,8 @@ cpu_startup()
#if defined(DEBUG)
pmapdebug = opmapdebug;
#endif
- printf("avail memory = %lu (%luK)\n", ptoa((psize_t)uvmexp.free),
- ptoa((psize_t)uvmexp.free) / 1024);
+ printf("avail mem = %lu (%luMB)\n", ptoa((psize_t)uvmexp.free),
+ ptoa((psize_t)uvmexp.free) / 1024 / 1024);
#if 0
{
extern u_long pmap_pages_stolen;
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 4f395192bdb..2b0f98e6d54 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.168 2008/07/14 13:37:39 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.169 2009/02/04 17:19:17 miod Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -632,8 +632,9 @@ cpu_startup(void)
printf(version);
printf("%s\n", cpu_model);
- printf("real mem = %u (%u reserved for PROM, %u used by OpenBSD)\n",
- ptoa(physmem), ptoa(resvmem), ptoa(resvphysmem - resvmem));
+ printf("real mem = %u (%uMB)\n", ptoa(physmem),
+ ptoa(physmem) / 1024 / 1024);
+ printf("rsvd mem = %u (%uKB)\n", ptoa(resvmem), ptoa(resvmem) / 1024);
/*
* Determine how many buffers to allocate.
@@ -662,7 +663,8 @@ cpu_startup(void)
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- printf("avail mem = %lu\n", ptoa(uvmexp.free));
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free) / 1024 / 1024);
/*
* Set up buffers, so they can be used to read disk labels.
diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c
index b232ad0ea75..3794891ae17 100644
--- a/sys/arch/hppa64/hppa64/machdep.c
+++ b/sys/arch/hppa64/hppa64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.12 2008/06/27 17:22:14 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.13 2009/02/04 17:19:17 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -395,8 +395,9 @@ cpu_startup(void)
* join me in this one love dream
*/
printf("%s%s\n", version, cpu_model);
- printf("real mem = %u (%u reserved for PROM, %u used by OpenBSD)\n",
- ptoa(physmem), ptoa(resvmem), ptoa(resvphysmem - resvmem));
+ printf("real mem = %lu (%luMB)\n", ptoa((psize_t)physmem),
+ ptoa((psize_t)phsymem) / 1024 / 1024);
+ printf("rsvd mem = %u (%uKB)\n", ptoa(resvmem), ptoa(resvmem) / 1024);
/*
* Determine how many buffers to allocate.
@@ -428,7 +429,8 @@ printf("here4\n");
VM_PHYS_SIZE, 0, FALSE, NULL);
printf("here5\n");
- printf("avail mem = %lu\n", ptoa(uvmexp.free));
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free) / 1024 / 1024);
/*
* Set up buffers, so they can be used to read disk labels.
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c
index ba22da815a9..b2b145f0fab 100644
--- a/sys/arch/luna88k/luna88k/machdep.c
+++ b/sys/arch/luna88k/luna88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.59 2008/12/30 05:33:17 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.60 2009/02/04 17:19:17 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -385,7 +385,8 @@ cpu_startup()
*/
printf(version);
identifycpu();
- printf("real mem = %d\n", ptoa(physmem));
+ printf("real mem = %u (%uMB)\n", ptoa(physmem),
+ ptoa(physmem) / 1024 / 1024);
/*
* Check front DIP switch setting
@@ -489,7 +490,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);
/*
* Set up buffers, so they can be used to read disk labels.
diff --git a/sys/arch/sh/sh/sh_machdep.c b/sys/arch/sh/sh/sh_machdep.c
index 2e0047fb45e..9d2b3a33dbd 100644
--- a/sys/arch/sh/sh/sh_machdep.c
+++ b/sys/arch/sh/sh/sh_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sh_machdep.c,v 1.22 2008/12/30 05:33:17 miod Exp $ */
+/* $OpenBSD: sh_machdep.c,v 1.23 2009/02/04 17:19:17 miod Exp $ */
/* $NetBSD: sh3_machdep.c,v 1.59 2006/03/04 01:13:36 uwe Exp $ */
/*
@@ -279,7 +279,8 @@ sh_startup()
sh_vector_interrupt_end - sh_vector_interrupt);
#endif /* DEBUG */
- printf("real mem = %u (%uK)\n", ptoa(physmem), ptoa(physmem) / 1024);
+ printf("real mem = %u (%uMB)\n", ptoa(physmem),
+ ptoa(physmem) / 1024 / 1024);
/*
* Find out how much space we need, allocate it,
@@ -325,8 +326,8 @@ sh_startup()
*/
bufinit();
- printf("avail mem = %u (%uK)\n", ptoa(uvmexp.free),
- ptoa(uvmexp.free) / 1024);
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
+ ptoa(uvmexp.free) / 1024 / 1024);
if (boothowto & RB_CONFIG) {
#ifdef BOOT_CONFIG
diff --git a/sys/arch/solbourne/solbourne/machdep.c b/sys/arch/solbourne/solbourne/machdep.c
index d24d05b83b9..5e240c0c371 100644
--- a/sys/arch/solbourne/solbourne/machdep.c
+++ b/sys/arch/solbourne/solbourne/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.7 2008/05/03 20:18:24 martin Exp $ */
+/* $OpenBSD: machdep.c,v 1.8 2009/02/04 17:19:17 miod Exp $ */
/* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */
/*
@@ -168,7 +168,8 @@ cpu_startup()
*/
printf(version);
/*identifycpu();*/
- printf("real mem = %d\n", ptoa(physmem));
+ printf("real mem = %d (%dMB)\n", ptoa(physmem),
+ ptoa(physmem) / 1024 / 1024);
/*
* Find out how much space we need, allocate it,
@@ -230,7 +231,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);
/*
* Set up buffers, so they can be used to read disk labels.