[comp.sys.apollo] Adding SCSI devices

Chuck_SirVAX_Staatse@cup.portal.com (06/13/90)

I am considering making a Widget that would interface to the SCSI bus.
This device would do block mode transfers (like a disk) when accessed
thru one device address, and character like transfers when accessed 
at a different device address. Although designing  the hardware
play on the SCSI bus seems very straightforward, getting a user written
program to access this device thru a standard SCSI port is not
so straightforward.  My user program should be able to:

           dma_read(staring_block,buffer_address,byte_count,&stat)
           dma_write(staring_block,buffer_address,byte_count,&stat)
           char_read(buffer_address,byte_count,&stat)
           char_write(buffer_address,byte_count,&stat)

In addition, each call should be able to set up a function address, so
that the specified function could be called when the operation is
finished.

Is this functionality available without writing a device driver?

krowitz%richter@UMIX.CC.UMICH.EDU (David Krowitz) (06/13/90)

The General Purpose I/O package (GPIO) contains all the system
calls for controlling the I/O bus for multibus, VME bus, AT bus
and SCSI periperals. There are a series of calls contained in
the library that a specifically for SCSI devices:

procedure scsi_$abort_operation(               { abort operation }

procedure scsi_$acquire(                       { acquire device }

procedure scsi_$acquire_stream(                { acquire device }

procedure scsi_$do_command(                    { do scsi command }

procedure scsi_$get_ec(                        { get device eventcount }

procedure scsi_$get_info(                      { get implementation information }

procedure scsi_$release(                       { release device }

procedure scsi_$reset_device(                  { reset scsi device }

procedure scsi_$unwire(                        { unwire buffer }

function scsi_$wait(                           { wait for operation to complete }

procedure scsi_$wire(                          { wire buffer }


The complete call definitions can be found in /sys/ins/scsi.ins.pas
if you have GPIO installed (it is an optional product).


 -- David Krowitz

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