From owner-freebsd-alpha@FreeBSD.ORG Tue Feb 14 14:50:28 2006 Return-Path: X-Original-To: freebsd-alpha@freebsd.org Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B19C16A422 for ; Tue, 14 Feb 2006 14:50:28 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 854A843D48 for ; Tue, 14 Feb 2006 14:50:27 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 8586456 for multiple; Tue, 14 Feb 2006 09:49:50 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k1EEoN5t060427; Tue, 14 Feb 2006 09:50:24 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-alpha@freebsd.org Date: Tue, 14 Feb 2006 09:49:30 -0500 User-Agent: KMail/1.9.1 References: <27dbfc8c0602140252o6ae09399taaedac8266c09c64@mail.gmail.com> In-Reply-To: <27dbfc8c0602140252o6ae09399taaedac8266c09c64@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602140949.31367.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1288/Tue Feb 14 04:24:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED,AWL autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Subject: Re: Error in sysctl realmem on alpha X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 14:50:28 -0000 On Tuesday 14 February 2006 05:52, Valerio daelli wrote: > Hi > we have an AlphaServer DS10 with FreeBSD 5.4 with 256Mb of RAM. > > root@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@webgate.ifom-firc.it:/usr/src/sys/alpha > > It looks like the sysctl of realmem is a bit to high: > > root@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@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 Your diagnosis appears correct. I'll fix it shortly. Thanks! -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org