Subject: Re: Retaining RAM disk on MobilePro 7x0
To: John Darrow <John.P.Darrow@wheaton.edu>
From: Matthew Orgass <darkstar@city-net.com>
List: port-hpcmips
Date: 09/25/2005 15:50:44
On 2005-09-23 John.P.Darrow@wheaton.edu wrote:

> What would be required to create a kernel which does not take over
> the entire RAM on the machine, but leaves intact the portion allocated
> in WinCE for "Storage Memory"?  This would let me put the kernel on
> the internal drive and be free to reboot the machine if necessary
> (even into WinCE to deal with stupid devices where some functions are
> only accessible through an IE-requiring web interface) without having
> to reload the system from external storage.

  You might be able to modify pbsdboot to use the same tricks it uses to
find memory for the kernel to see if you can get a small number of
contiguous blocks of memory that add up to what you want (see
arch/hpcmips/stand/pbsdboot/vmem.c and VirtualAlloc/VirtualCopy
documentation on MSDN).  Then pass those to the kernel via bootinfo and
use to set mem_clusters in hpcmips/vr/vr.c.

  Since the kernel should then only write to pages that CE considers free,
the object store should be preserved and a reset should clear everything
else.  The main question, I think, is if the pages you get will be
sufficiently contiguious to be useful.  It might work :).

Matthew Orgass
darkstar@city-net.com