Subject: Re: Finding Kernel VA that maps given physical address?
To: Jason Thorpe <>
From: Paul Goyette <>
List: tech-kern
Date: 07/20/1997 19:45:49
Hmmm.  Putting in the hooks in the pmap_* routines would work, but don't
those routines get called in multiple places?

All I really need is the start KVA of the card's address space - one base
address per slot (max 6 slots).  It would seem to this naive mind that any
implementation that would occur in the pmap_* routines would have a lot of
unnecessary entries.  And in order to be able to delete entries (in the
case of pmap_unmap) the list would have to be ordered or at least search-

Or am I missing something obvious here?

On Sun, 20 Jul 1997, Jason Thorpe wrote:

> On Sun, 20 Jul 1997 18:46:54 -0700 (PDT) 
>  Paul Goyette <> wrote:
>  > Actually, what I thought might be possible was to have the individual
>  > driver (in my case, grf_mv, the NuBus-board video driver) make a call-back
>  > to some (new) routine.  The individual driver needs to map the board's
>  > address space into the kernel, so it has the virtual address handy.  If it
>  > simply called some routine to stash that address in some globally
>  > accessible array (indexed by NuBus slot #).  Then later on I could consult
>  > that array to do the reverse translation.
> No need to do that... you could put the hooks for keeping this list
> into bus_space_map() and bus_space_unmap().
>  > BTW, what is the difference between "managed" vs "unmanaged" pages?  Does
>  > "managed" imply that the page is possibly paged/swapped out at some time?
>  > If so, then I rather doubt that that would work in my situation - just how
>  > _could_ you swap out a hardware component?  :)
> Managed pages are those that are managed by the VM subsystem.  Hardware
> devices, the kernel text/data/bss, and overhead memory used by the pmap
> and vm system are examples of pages which are _NOT_ managed.
> All managed pages correspond to RAM, and appear on the VM page free list
> at some point in their lifetime.
> Jason R. Thorpe                             
> NASA Ames Research Center                               Home: 408.866.1912
> NAS: M/S 258-6                                          Work: 415.604.0935
> Moffett Field, CA 94035                                Pager: 415.428.6939

| Paul Goyette       | PGP Public Key fingerprint:  | E-mail addresses:     |
| Network Consultant |     0E 40 D2 FC 2A 13 74 A0  |    |
| and kernel hacker  |     E4 69 D5 BE 65 E4 56 C6  | |