From owner-freebsd-current Mon Dec 18 23:49:53 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id XAA28391 for current-outgoing; Mon, 18 Dec 1995 23:49:53 -0800 (PST) Received: from mail.barrnet.net (mail.barrnet.net [131.119.246.7]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id XAA28386 for ; Mon, 18 Dec 1995 23:49:51 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by mail.barrnet.net (8.7.1/MAIL-RELAY-LEN) with SMTP id NAA21863 for ; Tue, 12 Dec 1995 13:14:46 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id OAA01741; Tue, 12 Dec 1995 14:10:05 -0700 From: Terry Lambert Message-Id: <199512122110.OAA01741@phaeton.artisoft.com> Subject: Re: What is this thing in locore.s? To: bde@zeta.org.au (Bruce Evans) Date: Tue, 12 Dec 1995 14:10:05 -0700 (MST) Cc: current@freebsd.org, terry@lambert.org In-Reply-To: <199512120940.UAA25385@godzilla.zeta.org.au> from "Bruce Evans" at Dec 12, 95 08:40:17 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org Precedence: bulk > >What is the purpose of: > >============================================================================= > > movl %esi,%ebx /* calculate pte offset to ptd */ > > shrl $PGSHIFT-2,%ebx > > addl %esi,%ebx /* address of page directory */ > > addl $((1+UPAGES+1)*NBPG),%ebx /* offset to kernel page tables */ > >============================================================================= > > This initializes %ebx :-). > > >The kernel boots and runs fine without it -- it doesn't seem to do > >anything really useful?!? > > There are some ifdefs before it. Apparently %ebx is left with the > correct value for the case that you use. I think it is left with the > correct value for all cases, but this is only true now that the kernel > is loaded above 1MB. Previously, in the BDE_DEBUGGER case, %ebx was > left pointing to the pte for physical address 0xa0000, while the page > dir was either somewhat lower (at KERNend - KERNBASE) or perhaps at 1MB. > This depends on the page dir going at (KERNend - KERNBASE). I think that %ebx is definitely preserved. Looking at the code from Oct 1994, it was preserved there as well. I don't think the 4.4BSD code was ever loading kernels below 1M, was it? BTW: since you *are* "BDE"... 8-). I am apparently having a problem with either PTD initialization or something else on a second processor. I presume that the envirnment for the second processor should be identical to the environment for the first. Any chance of you looking at my hacked up locore.s and telling me what you think is different between the processor settings after the code has executed? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.