[comp.sys.apollo] Help! busses + DN10000

acton@grads.cs.ubc.ca (Donald Acton) (04/19/89)

We just recently got an Apollo DN10000 and are running with
ENVIRONMENT set to bsd and SYSTYPE set to bsd4.3 under SR10.0.2.
Coming from a Sun/UNIX environment I am still making my way through
the various Apollo documents so pointers to the relevant places to
help me solve the following problem would be greatly appreciated.

We have two different boards we would like to install on the machine,
one in the VMEbus and the other on the PC AT compatible bus. What I
would like to do is map the bus address spaces for these boards into
the application address space and let the application control the
boards directly. (The interface to these boards is very simple. The
VMEbus board also has dual ported RAM on it that we would like to map
directly into then application's address space.) We are already doing this
on our Sun with the VMEbus board through the use of the mmap(2) system
call and I am hoping there is something similar for the Apollo. Upon
checking out the documentation for mmap(2) on the Apollo it says that
mmap cannot be used on device special files so it initially appears
that I am out of luck in that department. My questions are:
    
   1) Is there a simple way to do what I want in a vein similar to
      that provided by the mmap call?

   2) If the answer to 1 is no then do I have to write a device driver
      and if so where should I look for advice? (I have written device
      drivers for other machines running UNIX so this won't be an
      entirely new experience for me.) 

Any help would be greatly appreciated. Thanks in advance.


    Donald Acton
    acton@cs.ubc.ca

krowitz@RICHTER.MIT.EDU (David Krowitz) (04/21/89)

Hmm ... if mmap will not allow you to map the device file, then
you are going to have to use Apollo's GPIO (General Purpose I/O)
package to write a device driver. The driver could be as simple
as a subroutine call which returns the virtual address of the
I/O page of the device to your program as a pointer.


 -- David Krowitz

krowitz@richter.mit.edu   (18.83.0.109)
krowitz%richter@eddie.mit.edu
krowitz%richter@athena.mit.edu
krowitz%richter.mit.edu@mitvma.bitnet
(in order of decreasing preference)

wescott@LNIC1.HPRC.UH.EDU (Andrew M. Wescott) (04/21/89)

Well I haven't ever really done (on a UNIX system) what you want
to do, but I suggest you obtain the "Series 10000 Technical Reference
Library Volume 2 - I/O Devices" which covers the 10000's VME and PC/AT
bus specs. in detail.  In fact, I would reccommend the entire set - 
Vols. I-V (Apollo numbers 11720,11721,11722,11723,11724).  Some other
related manuals would be  "Installing I/O Devices for Domain Nodes"
(008268-A00) and "Writing Device Drivers with GPIO Calls" (000959).

Hope this is some help.

Andrew Wescott
University of Houston
Department of Chemical Engineering