Subject: Re: Some VAX pmap observations
To: Anders Magnusson <ragge@ludd.luth.se>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-vax
Date: 04/29/2002 10:31:18
On Mon, Apr 29, 2002 at 07:21:12PM +0200, Anders Magnusson wrote:

 > pmap_enter() enter pages with the valid bit not set in the pte to be
 > able to simulate the non-existing reference bit. The kernel stack is
 > not legal to have invalid, therefore the valid bit must be set in 
 > each pte.

But when pmap_enter() is called to wire the kernel stack, it should be
called with an access type (in the flags argument) of VM_PROT_READ |
VM_PROT_WRITE.  You can use this informat to seed the "referenced" emulation
and immediately set the valid bits in the PTEs.

...in fact, it looks like it does this already :-)

 > Due to a recent change (some year ago or so) the valid bit in the pte 
 > is already set in pmap_enter() on wired pages, so this small loop can
 > probably be removed :-)

Ah, indeed :-)

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>