Subject: Re: UNIBUS and Q-bus
To: None <port-vax@NetBSD.ORG>
From: Michael Sokolov <sokolov@alpha.CES.CWRU.Edu>
List: port-vax
Date: 03/15/1998 17:07:07
   Dear Tim,
   
   You wrote:
> The Unibus itself is always 18 (or 16) bit addresses.  But whenever a
> Unibus is bolted onto a CPU with a wider address bus - a 11/70, 11/44,
> 11/84, VAX 11/750, etc. - it's done through a "Unibus Map" that maps
> CPU/memory address to Unibus addresses on a page-like basis.  If you look
> in a PDP Unibus processor handbook or in a 11/750 or 11/780 technical
> manual, this is all explained in great detail.
   
   I know very well how this works on VAX 11/780 and VAX 11/750, I simply
didn't know that the same trick is used on later mixed-bus PDP-11s with the
CPU in a Q-bus backplane and everything else in the UNIBUS one.
   
> It's very analogous to the way that Microvax II and later Q-bus CPU's
> map the 22-bit (4 Mbyte) Q-bus address space into the 16 Mbyte (or
> larger) memory address space so DMA can be done.
   
   I know this. You have to take a chunk of the Q22-bus address space and
map it to a chuck of the VAX address space (typically the main RAM). There
are special registers to put these mappings into.
   
   I wonder, how do UNIBUS/Q22-bus bridges from Able and others handle
this? Do they also have special map registers? I have always been thinking
about the following scenario: taking some UNIBUS device like a UDA50,
plugging it into a UNIBUS backplane, and attaching it to a Q22-bus MicroVAX
via a Quniverter. I have been thinking that the OS running on the MicroVAX
CPU would see it as an equivalent Q-bus device, e.g., a KDA50, without
knowing in any way that it's actually a UDA50 on a UNIBUS. However, if as
you say the UNIBUS is mapped into the Q22-bus in the same way as it's
mapped into the VAX address space on 780 and 750, this won't work. Would
you please clarify this issue for me?
   
> Considering your pontificiation
> about how drivers work, I'm very surprised you don't know these basic
> details which anyone who has written a device driver must know about.
   
   Again, I know how UNIBUS and Q-bus are mapped into the VAX address
space, which is what one actually needs to know in order to write a VAX
device driver. I simply didn't know that these tricks are also used to map
between UNIBUS and Q22-bus.
   
> Have you even written a VAX device driver?
   
   Not yet, but soon will.
   
> > And what
> > about Q18 vs. Q22? How compatible are these two?
>
> Depends on the hardware you're talking about.  Some Q18 peripherals (like
> the RXV21) are "well-behaved" and the driver just has to be careful
> to keep them DMA to/from them in the lower 256 kByte space they can
> address.
   
   I take this to mean that there is no need to mess with any mapping
registers in this case. Is this right?
   
   Sincerely,
   Michael Sokolov
   Phone: 440-449-0299
   ARPA Internet SMTP mail: sokolov@alpha.ces.cwru.edu
   
   P.S. I wonder, how do UNIBUS and Q-bus compare performance-wise? Being
multiplexed, Q-bus should be slower, right? Or did they shorten all the
timings to make it faster?