Subject: "bootinfo" record for pmax bootblocks?
To: None <port-pmax@netbsd.org>
From: Simon Burge <simonb@telstra.com.au>
List: tech-kern
Date: 03/18/1999 13:18:55
[[ CC'd to tech-kern, reply-to set to port-pmax ]]
What do folks think of adding a "bootinfo"-type record that is passed by
the bootblocks to the kernel, similar to what the i386, bebox and Alpha
do? The main purpose of this now is to help find the kernel's symbols
by passing the start and end of the symbol table and the type of symbol
table, and I figured on using something a little bit extensible rather
than just poking some numbers in a few registers.
As to the implementation, Ultrix puts the netblock for diskless kernels
at 0x8001fc00 and reserves 1kb for this. 0x80020000 to 0x8002ffff is
reserved for the PROM, and the kernel starts at 0x80030000. Memory
between 0x80010000 and 0x8001ffff seems to be free for standalone
program and kernel use, and the PROM stack starts at 0x8000ffff and
grows down. I was thinking of allocating 4kb (same as the maximum
bootinfo size for the i386) starting at 0x8001f000 and finishing at
0x8001ffff. A magic number in the first bootinfo structure would
indicate a valid bootinfo record.
We can start with info on symbol table info and kernel type (ELF, ecoff,
a.out), and bootpath (made available by a sysctl in the machdep "mib").
Perhaps add network info with a 2 stage netboot later, to save RARPing,
etc yet another time.
As for backward/forward compatibility, if a new kernel is booted with
old bootblocks you loose nothing but this. If an old a.out kernel is
booted with new bootblocks, it will still be able to find its symbols
via the existing method of looking for the a.out exec header and
locating the symbol table from there. Maybe we can remove this later,
but it certainly doesn't hurt to leave it at the moment.
Barring any better suggestions, I'll start working on this next Monday
or Tuesday (and have a peaceful break until then :-).
Simon.