Subject: Re: Setting up the QDSS as the console and twisted uba stuff.
To: Boris Gjenero <bgjenero@undergrad.math.uwaterloo.ca>
From: Anders Magnusson <ragge@ludd.luth.se>
List: port-vax
Date: 02/17/1998 16:21:54
> 
> It seems this gets called at the beginning.  This is apparently after
> memory management has been enabled but before any configuration has been
> done (because the configuration outputs messages to the console).  So
> basically I have to use a qbus device before the device or tbe bus has
> been configured by the kernel.  I don't think that there is any other
> device driver in NetBSD/vax which does such a thing.
> 
Actually, there is. What you want is somewhere in the kernel virtual
address space where you can put your own mappings. Do something like this
in pmap_bootstrap() where the SPT is allocated:

#if NQD
	MAPVIRT(my_ptr_to_qd_memory, qdsize);
	MAPVIRT(my_ptr_to_ubaiomap, 16);
#endif

and then later on in qdcninit pmap_map() in the iospace and qdss space.

> 
> It seems to me that the first ioaccess maps the *entire* Q-bus IO page. 
> It also seems uba.c does this with kmem_suballoc followed by pmap_map. 
> I don't suppose that two repeated mappings are a good thing.
> The second ioaccess maps a page of Q-bus memory.  Could the
> kmem_suballoc, pmap_map method be used?  Am I making any sense?
> 
As for now, you need to map in the qbus IO space also.  But you are
correct, it is not a good thing, but besides that it only costs
16*4 bytes + some code, so it's cheap.  I may change the way Qbus memory
are mapped sometime in the future and then the double-mapping won't be needed.

> (I think I really need some assistance from somebody who knows what this 
> better than I do.)
> 
I hope I have given you the help you wished... Feel free to ask for more
help if you need; I'll do what I can.

-- Ragge