Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2001 20:39:29 -0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Peter Wemm <peter@yahoo-inc.com>
Cc:        Richard Todd <rmtodd@ichotolot.servalan.com>, current@FreeBSD.ORG
Subject:   Re: Tracking down problem with booting large kernels (bug in locore.s) 
Message-ID:  <200103150439.f2F4dTh78751@mobile.wemm.org>
In-Reply-To: <200103150153.f2F1rxi19074@daintree.yahoo.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm wrote:
> Richard Todd wrote:
> > In message <200103140442.f2E4gni01710@daintree.yahoo.com>, Peter Wemm write
    s:
> > >Richard Todd wrote:
> > >
> > >> <---- No crashes as of here
> > >> 	pushl	$begin				/* jump to high virtualized add
> > >    ress */
> > >> 	ret   
> > >> 
> > >> /* now running relocated at KERNBASE where the system is linked to run *
    /
> > >> begin:
> > >> <==== crashes before it gets here!!!
> > >> 	/* set up bootstrap stack */
> > >> 	movl	proc0paddr,%eax			/* location of in-kernel pages 
> > >    */
> > >
> > >I have some suspicions..  Can you do a nm on your kernel?
> > >
> > >peter@daintree[8:41pm]~-102> nm /boot/kernel/kernel  |grep begin
> > >c0123689 t begin
> > >
> > 
> > Sure.  A working kernel (the one I'm booted off of now) shows:
> > 55 ichotolot ~[11:49PM] Z% nm /boot/kernel.good5/kernel | grep begin
> > c0128c79 t begin
> > c0368b3f t mp_begin
> > 
> > and one that crashes shows:
> > 
> > 56 ichotolot ~[11:50PM] Z% nm /boot/kernel.old/kernel | grep begin
> > c01290a9 t begin
> > c038d49f t mp_begin
> 
> Now I am confused.  I can't see any logical reason why the jump to "begin"
> should fail like that...  It is only ~168K into the text section...

Actually, now I understand it completely.  The problem was the location
of the stack.  If text was too large, the stack (in the data segment) got
pushed beyond the limit of the temporary 4MB P==V mapping during boot.
This is (fortunately) an easy fix.  SMP suffers the same problem during AP
bootstrap and needs fixing there.  I've known about the SMP one for a while.

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103150439.f2F4dTh78751>