[LispM-Hackers] load band help

Dave Richards dave@synergy.org
Wed Mar 6 22:31:01 2002


I spoke prematurely.  Although I continue to believe the load is just a
memory dump and I can chase data structures after reading in the number of
words specified in the SCA, I still am not smart enough to build a page
table.  The virtual address space *has* to be constructed prior to us
invoking the first instruction, but I don't see what information allows us
to do that.

I dumped the DPMT tonight.  There's not enough there to correctly construct
a page table.  I think I know what the PHT and DDTs should look like, but
initializing them isn't obvious.  Maybe after a good night's sleep and a
nice shower.

The DPMT is close.  The problem is that entries 0-2 are clearly wrong.  If
you believe the DPMT, you would mark the pages as "invalid" and "available"
for re-allocation, but we know a priori this is wrong, because NIL and T
reside down there.  I'm missing something.

	Dave

> -----Original Message-----
> From: lispm-hackers-admin@lists.unlambda.com
> [mailto:lispm-hackers-admin@lists.unlambda.com]On Behalf Of Dave
> Richards
> Sent: Tuesday, March 05, 2002 9:17 AM
> To: lispm-hackers
> Subject: RE: [LispM-Hackers] load band help
>
>
> Ah...  Recognition sets in.  The load band is really nothing more than a
> memory dump!
>
> 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).
>
> 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