Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Mar 2008 13:17:01 +0100
From:      Roman Divacky <rdivacky@freebsd.org>
To:        fchang@cs.ubc.ca
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Updating vmware3 (and missing "avail_end" from /usr/include/machine/pmap.h)
Message-ID:  <20080301121701.GA73096@freebsd.org>
In-Reply-To: <Pine.GSO.4.60.0802291321580.18632@cascade.cs.ubc.ca>
References:  <Pine.GSO.4.60.0802291321580.18632@cascade.cs.ubc.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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!

roman




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080301121701.GA73096>