Need info on 4.1 UBA routines (Help!)

irv at emory.UUCP irv at emory.UUCP
Tue Aug 2 14:42:51 AEST 1983


I am currently working on some new drivers for BSD 4.1 and
have run into some problems regarding the UBA routines.  I will
also write a paper on the device driver system when I'm done, so
I need a good understanding of what is going on.

I have no problems with giving commands to a device via it's CSR
registers, as that's very straightforward.  Unfortunately, I do
not quite understand the mapping procedures if the device is going
to do DMA I/O.  Assume that I have to feed the device the address
of some area in the kernel's data segment which it will read from or
write into.  In a PDP-11, you just give it the address.  As I under-
stand it, in a VAX (we have a 750) you first must give the virtual
address to a mapping routine (ubasetup() I presume) which returns in
the lower 18 bits the address that I should give to the device.
Then when the device trys to access that address, the UBA will map it
to the right physical address in the VAX memory.  When I'm done with
the DMA, I call ubarelse() to make the UBA forget.  This seems
relatively simple, but none of the block oriented drivers that do
DMA do it this way.  They all call ubago(), which in turn calls the
device's dgo() routine, and ubadone().  I have not figured out
what this method does that the other doesn't.  In fact, I don't even
know what these routine accomplish.

If there is someone out there in net-land who has dealt with these
issues before, I would appreciate it if he/she could get in touch with
me via mail.  Perhaps you could tell me what ubago() and ubadone()
do and why they are used instead of ubasetup() and ubarelse().  I need
this information yesterday, so speed would be appreciated.  If you
are able to help me (or just interested), I will send you a copy of my
paper when I'm done (hopefully in 2 weeks).

Thanks in Advance,
	Irving J.P. Elshoff     (...!emory!irv)
	Emory University.



More information about the Comp.unix.wizards mailing list