Subject: Re: Support for PMAG-C upwards almost ready ;)
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-pmax
Date: 03/01/1999 11:08:25
On Sun, 28 Feb 1999 22:15:38 -0800 
 Jonathan Stone <jonathan@DSG.Stanford.EDU> wrote:

 >   a) "dma" buffer (for command packets) must be physically contiguous
 >   b) dma buffer must be in < first 8 Mbytes of RAM
 >   c) dma buffer must be mis-aligned to 32kbytes up from a 128k byte
 >      boundary.
 > 
 > iirc, b) and c) are due to a hardware design bug, where the address
 > lines were laid out incorrectly between the TC and the accelerator
 > hardware.
 > 
 > The hard one is (b). Andy's point is that we need to grab the memory
 > before it gets allocated to the buffer pool (and lost forevermore).
 > Either that, or add magic hooks to steal those physical pages back
 > from the buffer pool and replace them with other pages.

Actually, it's trivial to handle this.  Use the multiple prioritized
memory freelist support in UVM.  See the i386 port for an example.  Note
how it places RAM <= 16M onto a freelist which is allocated from only
when there are no pages available on the >16M freelist.

Then, the bus_dma allocator can have a better chance of getting the
memory it needs (which is handled in MI code for you already).  I.e.
all you need to solve this problem is multiple free lists.

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>