Help with PDP-11 Unibus Map Hardware / Software under RT-11

Johnny Billquist bqt at softjar.se
Wed Aug 8 05:36:10 CDT 2007


"Jerome H. Fine" <jhfinedp3k at compsys.to> skrev:

 > Hopefully, this request is clear enough to be understood.  Both the
 > software and the hardware portion of the questions are independently
 > important, so please answer one aspect even if you can't help with
 > the other.
 >
 > Over the past 30 years of using PDP-11 software (RT-11 over 95%)
 > and hardware, I have never had occasion to use a Unibus system with
 > more than 256 KB of memory (such as a PDP-11/34).
 >
 > I would appreciate help in understanding the Unibus Map hardware which
 > (if I understand its purpose correctly) is to convert 18 bit addresses given
 > to a Unibus controller into 22 bit addresses for real physical memory for
 > systems like a PDP-11/84 and perform DMA from / to the hard drive.
 >
 > Also helpful would be an explanation of the related software used under
 > RT-11 along with exactly where the Unibus Map hardware is located
 > on a real DEC system (on the CPU board I presume) since the identical
 > CPU board is used for both the Qbus and the Unibus with both the
 > PDP-11/84 and the PDP-11/94.

I can't answer how RT-11 do things, but I can explain the hardware side of it.

First of all, the Unibus map is not in the CPU board of the 11/84 and 11/94. 
It's on the Unibus adapter. KT-whatever.

The whole thing works in a rather simple way, actually. All Unibus devices do 
DMA to an 18-bit address. That can never change, so think of this 256 K of 
memory as a separate memory area, that don't correspond to your actual physical 
memory. It's all fake.
Then divide this whole 256K into 32 equal sized pieces. That will give you 32 
pieces of 8K memory ranges. The same as a page on a PDP-11, but that's not that 
relevant. :-)
Now, when a device will do DMA, it will do DMA to one, or several of these 32 
pages. So you'll have an 18-bit address, of which the high 5 bits tells you 
which "page" it will go to. The Unibus Map have 32 registers. One for each of 
these "pages". So the high 5 bits of the 18-bit DMA address will select a 
register in the Unibus map. The Unibus map will in turn give you a 16-bit value 
from this. This will be the high 16 bits of a 22-bit memory address. The 13 low 
bits of the DMA address is added to this 22-bit address to give the final 
physical address to do DMA to.

So, in essence, what a driver will do when a Unibus map is present, is to find 
some free Unibus map registers (free in the meaning that no other driver is 
using them, so you need to keep track of these, as a resource). Or you could 
statically allocate some map registers for your driver, if you prefer, and if 
all drivers combined don't need more than 31 map registers (I think that the 
last register might not be usable, but I'm not sure. It basically gives a 
mapping for what otherwise is the I/O page).
Once a driver have decided which map register to use, that will decide what 
18-bit address range to use for the DMA. So the 18-bit address is calculated 
from the physical address truncated, and the address for the range covered by 
the map register. The map register is loaded with the corresponding physical 
address high bits, and then you fire the I/O.

	Johnny

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt at softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


More information about the cctech mailing list