Updating vmware3 (and missing "avail_end" from /usr/include/machine/pmap.h)

fchang at cs.ubc.ca fchang at cs.ubc.ca
Sat Mar 1 15:07:04 UTC 2008


On Sat, 1 Mar 2008, Roman Divacky wrote:
> I think you can use "ptoa(Maxmem) - round_page(MSGBUF_SIZE)",
> the ptoa(Maxmem)
> erm.. what I meant to say what
> that hw.realmem - round_page(MSGBUF_SIZE) should work

Hi:

Before I saw your message, I continued my search and found an January 2007
mailing list message by Kip Macy on how to compute avail_end:
http://groups.google.com/group/mailing.freebsd.current/msg/7039973c1586a8a7

   static vm_paddr_t
   get_avail_end(void)
    {
     vm_paddr_t avail_end;
     int i;
     avail_end = phys_avail[1];
     for (i = 0; phys_avail[i + 1]; i += 2) {
       if (phys_avail[i + 1] > avail_end)
         avail_end = phys_avail[i + 1];
       }
     return avail_end;
    }

Are the two methods equivalent?

Also, how do I use hw.realmem like you suggested?
I tried the following, but the file wouldn't compile:

   static vm_paddr_t avail_end = hw.realmem - round_page(MSGBUF_SIZE);

Thank you!




More information about the freebsd-hackers mailing list