Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Dec 1995 17:46:07 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        current@freebsd.org
Subject:   What is this thing in locore.s?
Message-ID:  <199512120046.RAA02243@phaeton.artisoft.com>

next in thread | raw e-mail | index | archive | help
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.



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