Error in sysctl realmem on alpha
Valerio daelli
valerio.daelli at gmail.com
Tue Feb 14 02:52:49 PST 2006
Hi
we have an AlphaServer DS10 with FreeBSD 5.4 with 256Mb of RAM.
root at webgate:~ uname -a
FreeBSD webgate.ifom-ieo-campus.it 5.4-RELEASE-p8 FreeBSD
5.4-RELEASE-p8 #0: Thu Nov 17 13:13:48 CET 2005
eldon at webgate.ifom-firc.it:/usr/src/sys/alpha
It looks like the sysctl of realmem is a bit to high:
root at webgate:~ sysctl -a|egrep '(real|phys|user)mem'
hw.physmem: 265486336
hw.usermem: 225648640
hw.realmem: 2174864064512
but the realmem of dmesg is right
root at webgate:~ dmesg |grep mem
real memory = 265486336 (253 MB)
avail memory = 250503168 (238 MB)
Maybe everything is due to a shift of 13 bits in
/usr/src/sys/alpha/alpha/machdep.c:
realmem = alpha_ptob(Maxmem)
and the realmem is again shifted 13 bits (so it is shifted twice
instead of once) in /usr/src/sys/kern/kern_mib.c:
val = ctob(realmem);
Sorry I am not really sure I am not so strong in C and kernel
programming is a bit far from my knowledge.
Thanks
Valerio Daelli
More information about the freebsd-alpha
mailing list