User`s manual
Overview
2-6 Single Board Computers SCSI Software UserÕs Manual
2
Functional Overview
The following sections describe the functional attributes of the Firmware. A
simplistic description of the flow of a command request through the Firmware
is given. The SIOP interrupts are explained in some detail as are the Firmware
responses to various SCSI messages which may be received.
Command Flow
The basic flow of the Firmware is followed as a command request is executed.
This flow should give the reader an understanding of the interdependence
between the MPU code, SCRIPTS code, and SIOP in executing a user request.
The first user access to the Firmware is through a call to siop_init(). The
parameters passed to this initialization call set the operation mode of the SIOP
and Firmware. Interrupt level, snoop mode, clock speed, and SCSI address are
all parameters which are used to program the hardware. Different software
paths are taken if the interrupt level is 0 (polled mode) as opposed to non-zero
(interrupt mode). The Firmware needs to be initialized only once, but may be
initialized many times as long as there are no outstanding command requests
to the Firmware when siop_init() is called.
After the Firmware has been initialized, the user initiates a command to an
SCSI device by passing a command structure (siop_struc) to the command
entry point, siop_cmd(). Some of the fields in the siop_struc which the user
must initialize for all command requests are command control (cmd_ctrl),
device SCSI address and LUN (addr_ilvl and lun), command descriptor block
(cdb), and return status routine pointer (status_ptr). Once called, the Firmware
MPU code performs minimal management operations to enqueue the
command structure (siop_struc) for execution by the SCRIPTS. Additionally,
the user may not alter any field within the siop_struc until the control of the
structure is returned to the user through the invocation of the return status
routine.
From this point, the functional flow of the Firmware differs depending on
whether the interrupt level is set for polled mode or interrupt mode. The
following sections outline the flow for the separate modes.
Interrupt Mode
After the command structure (siop_struc) is enqueued for execution, the
Firmware returns control of the MPU back to the user. All subsequent
Firmware MPU code processing of the user's command request is initiated
through the Firmware interrupt handler entry point, siop_int(). The user calls
this entry point when an interrupt from the SIOP is detected.