summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-02-14 14:50:11 +0000
committerjhb <jhb@FreeBSD.org>2006-02-14 14:50:11 +0000
commita3a3e58c13384ca13edb73c2e84d34db4339b705 (patch)
treeb7d13386c1898952da0190630b755f8cf299d8ed /sys/sparc64
parent3c127fc155e83a0f47730848437b320fb195a5b0 (diff)
downloadFreeBSD-src-a3a3e58c13384ca13edb73c2e84d34db4339b705.zip
FreeBSD-src-a3a3e58c13384ca13edb73c2e84d34db4339b705.tar.gz
Fix the hw.realmem sysctl. The global realmem variable is a count of
pages, not a count of bytes. The sysctl handler for hw.realmem already uses ctob() to convert realmem from pages to bytes. Thus, on archs that were storing a byte count in the realmem variable, hw.realmem was inflated. Reported by: Valerio daelli valerio dot daelli at gmail dot com (alpha) MFC after: 3 days
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 9d7e6cf..7624725 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -201,7 +201,7 @@ cpu_startup(void *arg)
physsz += sparc64_memreg[i].mr_size;
printf("real memory = %lu (%lu MB)\n", physsz,
physsz / (1024 * 1024));
- realmem = (long)physsz;
+ realmem = (long)physsz / PAGE_SIZE;
vm_ksubmap_init(&kmi);
OpenPOWER on IntegriCloud