From owner-freebsd-current Wed Mar 14 20:39:35 2001 Delivered-To: freebsd-current@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [65.0.135.147]) by hub.freebsd.org (Postfix) with ESMTP id 767A837B718 for ; Wed, 14 Mar 2001 20:39:31 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from mobile.wemm.org (mobile.wemm.org [10.0.0.5]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f2F4dVp50844 for ; Wed, 14 Mar 2001 20:39:31 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by mobile.wemm.org (8.11.1/8.11.1) with ESMTP id f2F4dTh78751; Wed, 14 Mar 2001 20:39:30 -0800 (PST) (envelope-from peter@netplex.com.au) Message-Id: <200103150439.f2F4dTh78751@mobile.wemm.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Peter Wemm Cc: Richard Todd , current@FreeBSD.ORG Subject: Re: Tracking down problem with booting large kernels (bug in locore.s) In-Reply-To: <200103150153.f2F1rxi19074@daintree.yahoo.com> Date: Wed, 14 Mar 2001 20:39:29 -0800 From: Peter Wemm Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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