From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 1 12:20:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E44C1065670 for ; Sat, 1 Mar 2008 12:20:44 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 013EB8FC1C for ; Sat, 1 Mar 2008 12:20:43 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 29BF6673415; Sat, 1 Mar 2008 13:20:43 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gJYgKXOsmUXO; Sat, 1 Mar 2008 13:20:42 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id F3D60666E71; Sat, 1 Mar 2008 13:20:41 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id m21CKfac073707; Sat, 1 Mar 2008 13:20:41 +0100 (CET) (envelope-from rdivacky) Date: Sat, 1 Mar 2008 13:20:41 +0100 From: Roman Divacky To: fchang@cs.ubc.ca Message-ID: <20080301122041.GB73096@freebsd.org> References: <20080301121701.GA73096@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080301121701.GA73096@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Updating vmware3 (and missing "avail_end" from /usr/include/machine/pmap.h) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2008 12:20:44 -0000 On Sat, Mar 01, 2008 at 01:17:01PM +0100, Roman Divacky wrote: > On Fri, Feb 29, 2008 at 01:29:23PM -0800, fchang@cs.ubc.ca wrote: > > Hi all: > > > > I'm trying to get vmware3 working on FreeBSD RELEASE 7.0 for i386 > > I've resolved every compilation problem except one: > > the driver.c in vmware3 requires the "avail_end" variable > > in 6.2's /usr/include/machine/pmap.h > > but is missing from 7.0's /usr/include/machine/pmap.h > > > > The vmware3 code goes like this: > > > > r = malloc(sizeof *r, M_DEVBUF, M_WAITOK); > > if (r == NULL) return ENOMEM; > > if (avail_end > ISA_DMA_BOUNCE_THRESHOLD) > > high = trunc_page(ISA_DMA_BOUNCE_THRESHOLD); > > else > > high = trunc_page(avail_end); > > > > It turns out "avail_end" was removed from /usr/include/machine/pmap.h > > by revision 1.125, whose commit message reads: > > > > The global variable avail_end is redundant and only used once. > > Eliminate it. Make avail_start static to the pmap on amd64. > > (It no longer exists on other architectures.) > > > > So it appears that we can still get the value represented by > > the old avail_end variable, but I don't know anything about the kernel > > and I don't understand that comment. Could some kind soul help me > > decipher that so I can try to get vmware3 compilable again? > > I think you can use "ptoa(Maxmem) - round_page(MSGBUF_SIZE)", the ptoa(Maxmem) > being the thing written during dmesg as: > > real memory = 1039007744 (990 MB), I think its exported as hw.realmem sysctl > > hope that helps.. let us know about your VMWare experiences! erm.. what I meant to say what that hw.realmem - round_page(MSGBUF_SIZE) should work