Subject: Re: NONCONTIG hook now in current
To: 3 Rob Healey 726-4529 <>
From: Tim Newsham <>
List: amiga
Date: 12/01/1994 11:16:13
> As of today's sup a hook for ports with non contiguous memory has been added
> to the port independant portion of the VM system. See sun3 port for
> details. Those with vested interests in seeing this work on the Amiga
> port may want to nab the current OS code and start hacking!

The system already supports non-contiguous memory configurations
if the macro MACHINE_NONCONTIG is defined.  This changes the way
the vm system initializes itself, asking for pages from the machine
dependant code, pmap.c, in a different way.  

The changes recently added where for systems who memory was
"mostly-contiguous" with only a few small holes.  The new code
simplifies things like getting a pages index given its address.
Since amiga doesn't have a few small holes but rather a few
very big holes its probably not desirable to use this optimization.

Getting the system to run with non-contiguous memory is
pretty easy, you just make a function to pass in a page at a
time to the higher level when asked and another function to
return the index of a page given its address.  The hard part
is working this in with the amiga's specific needs.  Other
parts of the system need to allocate chip and sometimes
24bit-DMAable memory after the VM system is initialized.
The easy solution is to save chipmem (all of it, or at least
a large portion of it) and dmaable memory (as much as will
be needed later) before starting up the VM system.  In the
kernel I originally made to run with all of my memory no
chipmem was used by the VM system and I had no dmaable
bounce buffers in 24bit memory.
(btw. I no longer use a non-contiguous memory setup because
problems with my 16bit memory (thanks gvp) and the performance
penalty of using it).

> -Rob