[LispM-Hackers] load band help

jm@mak.com jm@mak.com
Tue, 05 Mar 2002 13:34:58 -0500


Hi;

Dave Richards wrote:
> 
> Ah...  Recognition sets in.  The load band is really nothing more than a
> memory dump!

Sorry to not reply earlier.  I think that the first few pages are the
"wired" down memory and they are stored in the file in in-memory order. 
I seem to recall this included the sca, and the DPMT, and some other
stuff (scratch pad area?), too.

> The key is to use the system-communication-area (SCA) which is location at
> byte offset 0x800 (word offset 0x100) to boot-strap.  The magic 2k+9 is
> really obtained by:
> 
>         Go to SCA offset 0.  This is the address of the area origin table.  The
> 10th element is the address of the DPMT (encoed as a fix).  In fact, this
> area-origin table provides us 99% of what is needed to get rolling.  It
> points to our page table (absolutely necessary if there are non-identity
> mapped pages, which the comments indicate that there are).
> 
> I think the basic bootstrap process should go something like:
> 
>         1. Read the first page.
>         2. Inside the SCA within the first page is the number of words to read.
>         3. Read up to the max number of words into memory.  (Now we have all the
> memory filled that is necessary).
>         4. Initialize pointers to the DPMT, the page table, etc. from the
> area-origin table.
>         5. Find our starting address (I don't know how to do this yet).

I thought we found that as the "initial function entry frame" or
INITIAL-FEF or whatever.  I thought that was in either the sca or the
scratchpad area....  However, I don't have sources in front of me...

> Also, it looks like the constant words 0x06000000 and 0x06000005 correspond
> to NIL and T respectively.  Those probably will need to be emulator
> constants, since I do not see any indirection that would tell us this, shy
> of actually comparing symbol names (as strings), which might be elegant but
> probably doesn't add much value.
> 
> I will start a document when I get home tonight,
> unlambda.com/~dave/load-band.html which lays all of this out.  I think
> everything makes sense up to finding that first instruction, which I have
> not figured out how to do yet.
> 
>         Dave
> 
> http://lists.unlambda.com/mailman/listinfo/lispm-hackers

Thanks for the help!

-jm

-- 
==== John Morrison
==== MAK Technologies Inc.
==== 185 Alewife Brook Parkway, Cambridge, MA 02138
==== http://www.mak.com/
==== vox:617-876-8085 x115
==== fax:617-876-9208
==== jm@mak.com