Subject: Re: "bootinfo" record for pmax bootblocks?
To: None <port-pmax@netbsd.org>
From: Simon Burge <simonb@telstra.com.au>
List: port-pmax
Date: 03/19/1999 03:03:50
Chris suggested tinkering what stack pointers.  I played around with
something that seems like it should work by saving the old stack pointer
at the very start of kernel.  However...

The more I think about this the more I'm tempted to go back to an option
I touched on earlier (now that I know more about the immediate start-up
of the kernel) - "look at the two ints immediately before the kernel
start address for a magic number and a pointer."  This can easily be
done by increasing CALLFRAME_SIZ by 8 bytes to start the inital kernel
stack a little bit lower and poking the bootinfo values above the
stack.  This achieves Chris' ideal of not having a fixed address for the
bootinfo structure, is easy to do in C in both the boot loader and the
kernel, and sounds much easier that frobbing stack pointers, argument
lists and the like.

If we use old bootblocks with a new kernel, we have a temporary kernel
stack that wastes 8 bytes.  If we use new bootblocks with an old kernel,
the initial kernel stack will just write over info that wasn't going to
be used anyway.  Seems like a win win situation.

Any problems that anyone can see?

Simon.