From owner-freebsd-current Mon Dec 11 16:47:24 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA21864 for current-outgoing; Mon, 11 Dec 1995 16:47:24 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id QAA21859 for ; Mon, 11 Dec 1995 16:47:22 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id RAA02243 for current@freebsd.org; Mon, 11 Dec 1995 17:46:07 -0700 From: Terry Lambert Message-Id: <199512120046.RAA02243@phaeton.artisoft.com> Subject: What is this thing in locore.s? To: current@freebsd.org Date: Mon, 11 Dec 1995 17:46:07 -0700 (MST) 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 The following code live in i386/i386/locore.s: ============================================================================= /* now initialize the page dir, upages, and p0stack PT */ movl $(1+UPAGES+1),%ecx /* number of PTEs */ movl %esi,%eax /* phys address of PTD */ andl $PG_FRAME,%eax /* convert to PFN, should be a NOP */ orl $PG_V|PG_KW,%eax /* valid, kernel read/write */ 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 */ fillkpt ============================================================================= 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 */ ============================================================================= The kernel boots and runs fine without it -- it doesn't seem to do anything really useful?!? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.