diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2007-05-23 20:33:48 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2007-05-23 20:33:48 +0000 |
commit | a1c89e25c5c346f99dc51b78682349788f845846 (patch) | |
tree | 2dc182bdfb2d42eb1fa7ff2e40c8f70b24e5e63d /sys/arch/i386 | |
parent | 25f0a82c2a3f761cc8804e53e0deb876ba827cc5 (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/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 11 |
1 files changed, 6 insertions, 5 deletions
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); |