Subject: Re: kvm
To: Chris G. Demetriou <cgd@pa.dec.com>
From: Simon Burge <simonb@telstra.com.au>
List: tech-kern
Date: 08/21/1997 10:37:04
On Wed, 20 Aug 97 16:10:07 -0700  "Chris G. Demetriou" wrote:

> > How about if sysctl retrieves the booted kernel name, and on those
> > architectures where there is no kernel name sysctl returns something
> > "special" and rc just knows to use /netbsd by default?
> 
> Oh, that's perfectly fine by me.  In particular, I was using something
> like:
> 
> KERNELNAME=`sysctl -n machdep.booted_kernel`
> kvm_mkdb ${KERNELNAME:=/netbsd}
> 
> (since the value is directly derived from the firmware's "booted
> kernel" environment variable, which is used by the boot block to pick
> the file to load.  If the empty string, the boot block uses /netbsd.)
> 
> Obviously, this doesn't necessarily work in the case where your kernel
> is not on your root partition (e.g. tftpbooting), or when you're
> pulling your kernel from a different partition than your root
> partition.  However, in the common case (booting from a single
> partition, or netbooting where your current kernel _is_ in your root
> partition), it works just fine.

A while ago, I seem to recall of some talk about loading the symbols
_with_ the kernel, and then making these accessable in some way.  If I
remember correctly, the main objection was the extra memory that would
be taken up by the symbol table, and whether or not it could be marked
as pagable and not hard-wirded.  I'm not sure off hand if this will help
with the netbooting though, unless the symbol table was embedded in one
of the segments the boot firmware loads...

Anyone else remember this?