From owner-freebsd-ia64 Fri Feb 14 17:36: 7 2003 Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D041137B401 for ; Fri, 14 Feb 2003 17:36:05 -0800 (PST) Received: from caduceus.sc.intel.com (fmr04.intel.com [143.183.121.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BAE043F3F for ; Fri, 14 Feb 2003 17:36:05 -0800 (PST) (envelope-from adsharma@unix-os.sc.intel.com) Received: from petasus.sc.intel.com (petasus.sc.intel.com [10.3.253.4]) by caduceus.sc.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id h1F1Z4g15272; Sat, 15 Feb 2003 01:35:04 GMT Received: from unix-os.sc.intel.com (unix-os.sc.intel.com [143.183.96.244]) by petasus.sc.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.28 2003/01/13 19:44:39 dmccart Exp $) with ESMTP id h1F1Z8w02753; Sat, 15 Feb 2003 01:35:08 GMT Received: from unix-os.sc.intel.com.intel.com (adsharma-mobl3.sc.intel.com [143.183.130.51]) by unix-os.sc.intel.com (8.11.6/8.11.2) with ESMTP id h1F1a3r09202; Fri, 14 Feb 2003 17:36:04 -0800 To: Marcel Moolenaar Cc: freebsd-ia64@FreeBSD.ORG Subject: Re: Maxmem should be bytes ? References: <200302080111.h181Bkr26574@unix-os.sc.intel.com> <20030214002346.GA1267@athlon.pn.xcllnt.net> <20030214010244.GA1344@athlon.pn.xcllnt.net> From: Arun Sharma Date: 14 Feb 2003 17:36:01 -0800 In-Reply-To: <20030214010244.GA1344@athlon.pn.xcllnt.net> Message-ID: Lines: 34 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Marcel Moolenaar writes: > > New code that tries to use ia64_ptob(Maxmem) for something other than > > VHPT sizing would be broken. > > Like machdep.c:164? > > printf("real memory = %ld (%ld MB)\n", ia64_ptob(Maxmem), > ia64_ptob(Maxmem) / 1048576); This one is ok, because it's before line 598. Any code executed after line 598 would be broken. > > As for the fact that Maxmem is in bytes and physmem isn't: we define > Maxmem to be equal to physmem (machdep.c:598). So they are in fact > equal. All I'm saying is: --- machdep.c.old Fri Feb 14 17:32:26 2003 +++ machdep.c Fri Feb 14 17:33:22 2003 @@ -595,7 +595,7 @@ } phys_avail[phys_avail_cnt] = 0; - Maxmem = physmem; + Maxmem = ia64_ptob(physmem); init_param2(physmem); /* i386 does something equivalent. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message