Subject: pmap, non-contiguous physical addresses
To: None <amiga-dev@sun-lamp.cs.berkeley.edu>
From: None <newsham@uhunix.uhcc.Hawaii.Edu>
List: amiga-dev
Date: 03/16/1994 13:48:38
Hi,
  I've been looking into changing the kernel from the assumption
of one large contiguous address space of physical memory to
the case where memory can be non-contiguous.  I've been able
to code up some of the changes necessary so far.  The changes
involved are:

   amiga/include/pmap.h    #define MACHINE_NONCONTIG

this tells the vm/* stuff that memory is non-contiguous and
a different approach is needed.  After making this change
a few things need be changed in the amiga/amiga/pmap.c.  The
following routines need be added:

   pmap_free_pages  - returns the number of pages not yet grabbed
                      this is pretty easy since after pmap_bootstrap
                      the pmap module no longer needs to grab
                      pages itself.

   pmap_next_page   - return the next unallocated page if there
                      are any left.

   pmap_virtual_space - a silly routine that just copies out
                      virtual_avail and virtual_end.

   pmap_page_index  -  ***

*** What the hell is this last one?  There is no prototype for it
in the vm includes and there is no mention of it in the Mach
pmap notes.  The x86 port supposedly uses MACHINE_NONCONTIG so
maybe someone who is familiar w/ the x86 port can answer this?

ok..  I wrote those last three routines using the memory list
(mem_list) avail_start and avail_end as well as a new variable
that keeps track of where in mem_list we are.  I also skip
over any chip memory (MEMF_CHIP) but not over zorroII dma-able
memory.  Oh yah,  I assumed that the chunk of memory that we
booted into is the first in the mem_list, is this the case?
If its not loadbsd can easily be changed to make it the case
or we can re-order it in start_c I guess.

One other change that needs be done -- pmap_init() takes on
a new function but I'm not exactly sure what I need to do
as compared to the original pmap_init().  I'll look into this
more, hints appreciated.

I'd appreciate any comments on this so far.  I can post the
routines I've added to pmap.c if anyone would like to help
out here.  This is my first hack to the kernel and it is a
pretty big job to jump right into :)

                             Tim N.


  

------------------------------------------------------------------------------