*BSD News Article 18551


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!gatech!udel!sbcs.sunysb.edu!stark.UUCP!gene
From: gene@cs.sunysb.edu!stark (Gene Stark)
Newsgroups: comp.os.386bsd.questions
Subject: Re: KERNEL PANIC ANYONE
Date: 17 Jul 93 07:47:43
Organization: Gene Stark's home system
Lines: 34
Message-ID: <GENE.93Jul17074743@stark.uucp>
References: <22222@durer.cme.nist.gov> <1993Jul12.180752.29982@prepress.com>
	<GENE.93Jul14074659@stark.uucp> <CA8wL9.7G4@veda.is>
NNTP-Posting-Host: stark.uucp
In-reply-to: adam@veda.is's message of 16 Jul 93 06:55:42 GMT

In article <CA8wL9.7G4@veda.is> adam@veda.is (Adam David) writes:

   Julian's bootblocks will let you have 612k of kernel starting at 0, and zeroes
   out the BSS if the kernel is bigger than 576k. 612k corresponds to 0xFE099000.
   It is also possible to use 'size' to determine kernel size, if the hex value
   does not go above 99000 it is alright. Since patchkit 0.2.4 the boot code is
   changed so that if the kernel is too big it will not try to run.

This is wrong.  Julian's bootblocks print the message: "Loader overlaps BSS,
kernel must bzero."  Referring to the kernel file "/sys/i386/i386/locore.s",
we find the following comment:

	/*
	 * Finished with old stack; load new %esp now instead of later so
	 * we can trace this code without having to worry about the trace
	 * trap clobbering the memory test or the zeroing of the bss+bootstrap
	 * page tables.
	 *
	 * XXX - wdboot clears the bss after testing that this is safe.
	 * This is too wasteful - memory below 640K is scarce.  The boot
	 * program should check:
	 *	text+data <= &stack_variable - more_space_for_stack
	 *	text+data+bss+pad+space_for_page_tables <= end_of_memory
	 * Oops, the gdt is in the carcass of the boot program so clearing
	 * the rest of memory is still not possible.
	 */

Notice the last line.  I can say from sore experience that the kernel does
*NOT* reliably bzero all the BSS when it overlaps the loader.  Build kernels
with BSS beyond 0xFE090000 at your own risk!

							- Gene Stark
--
							stark@cs.sunysb.edu