Page 2 - MVME147 SCSI Firmware Entry Points
GENERAL INFORMATION 1-2 1 Interrupt mode is the most processor-efficient mode of operation. Multitasking is allowed for TARGETs that support arbitration, reselection, and the message-out phase. When using the interrupt mode, you must specify the interrupt level in the packet description (refer to th...
Page 3 - Branches to FUNNEL entry.; o t e; The SCSI firmware initializes these vectors.
MVME147 SCSI Firmware Entry Points 1-3 1 6. $FFFE079A (RTE entry) N o t e Within the SCSI firmware, which can stand alone withoutthe debug monitor, the first six longwords are the branchtable entries referenced above. The hex offsets providedreside within the non-volatile RAM. The following are desc...
Page 4 - GENERAL INFORMATION; Equipment Supported
GENERAL INFORMATION 1-4 1 Interrupt Structure paragraph in Chapter 4) or SCSI bus activity is slowed down. Additional commands may be sent to the SCSI firmware for a different peripheral device. $FFFE078E: FUNNEL COMMAND ENTRY This entry point is used by applications that require multiple interfaces...
Page 5 - CONTROLLE
Equipment Supported 1-5 1 any particular controller, nor does Motorola assume responsibility for the operation of equipment manufactured by non-Motorola companies. Refer to Appendix A for information on how to use this firmware program. CONTROLLE R DEVICE PART CODE TYPE MANUFACTUR ER/MODEL NUMBER NO...
Page 7 - Devices Supported Under Common Command Set
Equipment Supported 1-7 1 Floppy 2,3 18 8mm Tape Exabyte EXB-8200 820010-009 2 Devices Supported Under Common Command Set Winchester Televideo 7000/7400/3500 1,2 Floppy Televideo 7000/7400/3500 1002921-1B 1,2,3 Winchester Seagate WREN III 94161 77774620 1,2 Winchester Seagate WREN IIIHH 94211 1,2 Wi...
Page 8 - Related Documentation; MOTOROLA; DOCUMENT TITLE
GENERAL INFORMATION 1-8 1 Related Documentation The publications listed in the following table may provide additional helpful information. If not shipped with this product, they may be purchased from Motorola’s Literature Distribution Center, 616 West 24th Street, Tempe, AZ 85282; telephone (602) 99...
Page 9 - Manual Terminology
Manual Terminology 1-9 1 NOTE: Although not shown in the above list, each Motorola Computer Group manual publication number is suffixed with characters which represent the revision level of the document, such as /D2 (the second revision of a manual); supplement bears the same number as the manual bu...
Page 11 - CUSTOM SCSI PACKETS; Introduction; You wish to request linked commands from a disk controller.; Initiator Role Custom Packet; The initiator role custom packet is shown in the following table.
2 CUSTOM SCSI PACKETS Introduction The SCSI firmware requests "canned" functions from SCSI disk controllers and from SCSI tape controllers. Some of these functions are disk read and write, disk format, tape read and write, and tape positioning operations. The "canned" functions are o...
Page 15 - PHASE; DIRECTION
Initiator Role Custom Packet 2-5 2 commonly called a "thread"). The script allows the SCSI firmware to follow the TARGET bus sequences and also allows the firmware to resume a disconnected thread once a disconnect/ reselect occurs. Because the SBC allows "multithreading" of SCSI comm...
Page 16 - CODE; BUS PHASES
CUSTOM SCSI PACKETS 2-6 2 Scripts only specify the information transfer phases. The bus free, arbitration, and selection phases do not need to be specified in a script. The script codes that are understood by the MVME147 SCSI firmware are listed in the following table. (Note that TARGET role scripts...
Page 26 - SCRIPT for a READ followed by a WRITE:
CUSTOM SCSI PACKETS 2-16 2 second command. The following linked command example may be performed on the Archive 2150 disk controller (it supports linked commands). The SCSI firmware does not support linked command with flag. PACKET FOR THE LINKED COMMAND EXAMPLE: PACKET DC.W $0400 CONTROLLER LEVEL=4...
Page 29 - TARGET Enable Custom Packet; The TARGET enable custom packet is shown in the following table.
TARGET Enable Custom Packet 2-19 2 N o t e A linked command with the flag bit set is not supported,and the flag bit is ignored if it is set. TARGET Enable Custom Packet The TARGET enable custom packet is shown in the following table. Even Byte \ Odd Byte \ FC B8 74 30 +$00 Controller LUN Device LUN ...
Page 32 - TARGET Sequence Custom Packet; The TARGET sequence custom packet is shown in the following table.
CUSTOM SCSI PACKETS 2-22 2 WORD $16: The interrupt level must be no-zero because TARGET role support is not used in non-interrupt mode. (If TARGET role support were done in polled mode, nothing else would be able to run on the MVME147 other than the TARGET firmware because the microprocessor would p...
Page 35 - Target script for example 1:
TARGET Sequence Custom Packet 2-25 2 WORDS $04 and $06: SCRIPT POINTER -- The address of the TARGET script to be performed to service the initiator request. In TARGET role, the MVME147 controls the SCSI bus. The TARGET script tells the firmware which information transfer phases to cycle through to s...
Page 41 - PACKET RETURN STATUS; Packet Return Status; Status word offset $02; Control Flags
3 PACKET RETURN STATUS Packet Return Status When packets are returned to the user, they contain two status words: one with an offset of $02 and the other with an offset of $18, as shown in the tables below, respectively. The first table details the status codes contained in the word at offset $02. R...
Page 42 - Status word offset $18; SCSI; Request Sense
PACKET RETURN STATUS 3-2 3 Bit 15 (FINALSTAT) 1 = Intermediate return.0 = Final status. The script processing completed succ-essfully, OR the script processingencountered a fatal error. N o t e This does not mean that the operation that theuser requested on the SCSI was successful. Thestatus is cont...
Page 45 - MEANING; Intermediate Return
Packet Return Status 3-5 3 This is the memory address of the next byte to be transferred. $68 xxxxxxxx xxxxxxxx Transfer address -- for a read or write. . . . . $72 xxxxxxxx Command error status byte (valid following a command error $0B) $73 xxxxxxxx Offset within packet. $74 xxxxxxxx xxxxxxxx Sense...
Page 46 - Final Return Codes
PACKET RETURN STATUS 3-6 3 $09 (TARGET mode) data received from initiator with parity error, user must interpret then continue with new t_seq. 1,9 Final Return Codes $00 GOOD. Script processing is OK. 2 $01 Undefined problem. 2 $02 TARGET has Received Data without error, and user may interpret then ...
Page 49 - SCSI Status Returned in Status Phase
Packet Return Status 3-9 3 Table 3-4. Packet Status Codes (cont’d) CODE MEANING NOTES $26 UNIT ATTENTION. Indicates that the removable media may have been changed or the TARGET has been reset. 2,3 $27 DATA PROTECT. Indicates that a command that reads or writes the medium was attempted on a block tha...
Page 53 - SCSI Firmware Interrupt Structure; Processor control is returned to the user in a variety of ways:
4 SCSI FIRMWARE INTERRUPT STRUCTURE SCSI Firmware Interrupt Structure The SCSI interface firmware was designed for processor efficiency. Whenever the SCSI bus is in a state that does not need monitoring, the firmware releases the processor so it may perform other functions such as user tasks and low...
Page 54 - SCSI FIRMWARE INTERRUPT STRUCTURE
SCSI FIRMWARE INTERRUPT STRUCTURE 4-2 4 the REACTIVATION entry point of the SCSI firmware. The WAIT FOR INTERRUPT (OPEN) status is usually given when a particular TARGET is "threaded" to the MVME147 on the SCSI bus, and is slow in transitioning between information transfer phases. A bus phas...
Page 55 - WRITING A DRIVER
5 WRITING A DRIVER Introduction This chapter covers information essential in writing a driver to support the SCSI interface in interrupt mode. A driver for non-interrupt mode is a trivial subset of the interrupt mode driver. The approach taken is to describe the major sections of a driver that need ...
Page 56 - Figure 5-1. SCSI Disk Driver Interface to VERSAdos; Building the Packet; SCSI firmware may be called by single or multiple callers.
WRITING A DRIVER 5-2 5 Return from the SCSI firmware to the driver is done through the vector supplied in the packet. The VERSAdos driver uses vector $4E (offset $138), and tape driver uses vector $4D (offset $134). These vectors must be initialized to point to a driver routine which handles the ret...
Page 57 - Interface Rules for the SCSI Firmware; Multiple callers; of the SCSI firmware are separate, independent drivers that; Interface Rules for Multiple Callers
Interface Rules for the SCSI Firmware 5-3 5 information; it does imply that only one routine handles the exit conditions dictated by bit 13 of the second word in the user packet (also known as the status word). Multiple callers of the SCSI firmware are separate, independent drivers that handle SCSI ...
Page 59 - CAUTION
Interface Rules for the SCSI Firmware 5-5 5 RTE required, or the RTE entry ($FFFE079A) RTE required as status code $xx04 above. This intermediate status only happens when the TARGET role is enabled. All final status code returns use bits 15 through 13 of the status word in the packet (second word of...
Page 67 - Interface Rules for a Single Caller
Interface Rules for the SCSI Firmware 5-13 5 * RESTORE REGISTERS FOR SCSI ROUTINE * The driver must restore the registers the SCSI firmware has used. * A3 is pointing to a list of the registers to restore. * The following code is for 68010 or newer processor and could be more * efficient if more adv...
Page 69 - TARGET ROLE ROUTINES
6 TARGET ROLE ROUTINES Introduction According to SCSI definitions, an initiator is an SCSI device that initiates a command on the bus to be executed by the TARGET; a TARGET is an SCSI device that is selected by an initiator and executes what is requested by the initiator. The MVME147 is capable of p...
Page 70 - SCSI Versus SASI Rules; Custom Sequence Packet; Custom Sequence packets are detailed in Chapter 2.
TARGET ROLE ROUTINES 6-2 6 particular device on the SCSI bus. The indexing is accomplished by simply splitting the 64 entries into 8 entries of 8 peripheral devices. Each block of eight devices corresponded to each SCSI device. The MVME147 is one of these SCSI devices. Seven other SCSI devices may b...
Page 71 - MVME147 SCSI Firmware TARGET Role Structure Requirements; Script; Below are the TARGET role script codes for SCSI bus phases.; Command Table; A command table is shown in the Initiator Role section in Chapter 2.
MVME147 SCSI Firmware TARGET Role Structure Requirements 6-3 6 Command Table pointerScript pointerInterrupt level 7 through 1Return vectorTARGET enable/TARGET sequenceControl number = MVME147 levelPeripheral device LUN (0 through 7) Script Below are the TARGET role script codes for SCSI bus phases. ...
Page 72 - Enabling TARGET Role
TARGET ROLE ROUTINES 6-4 6 Data Area Only one direction allowed per command. If multiple directions of data transfer are required, linked commands could provide a solution. Message-In Area (user defined) For messages to be sent to the initiator. Message-Out Area (user defined) 258 byte maximum for e...
Page 74 - Servicing the TARGET Requests
TARGET ROLE ROUTINES 6-6 6 the user command table. The service of this command is provided by you. This service is provided by a custom SCSI sequence -- TARGET sequence, which is described in the next section. IMPLEMENTATION NOTE: The TARGET LUN is deciphered from the identify message sent immediate...
Page 78 - STEP 3: Data Preparation
TARGET ROLE ROUTINES 6-10 6 The operation code of $08 is for the RECEIVE command. The LUN should match the logical unit for the MVME147 TARGET. The transfer length tells you how many bytes are going to be exchanged during the data-out phase. The flag and link bits should be treated in the same manne...
Page 81 - SCSI PACKETS; FUNCTION CODE
7 SCSI PACKETS Introduction Command packets for the SCSI functions are listed in Table 7-1. The command packets are described in detail in the following paragraphs. Table 7-1. SCSI Functions SCSI FUNCTION CODE DESCRIPTION $00 Read (use new read, refer to $70 below) $04 Write (use new write, refer to...
Page 89 - DMA Scatter/Gather Table Entry
Read/Write Packet 7-9 7 DMA Scatter/Gather Table Entry Each scatter/gather table entry has two longwords: first one is DMA memory address, second is control/byte count. 310 |function code (3 bits)1 = link to next entryFor example $5 is0 = no link, last entryused here (supervisorydata space) NOTES: 1...
Page 90 - COMMAND; CONTROLLER
SCSI PACKETS 7-10 7 Attach/Detach Packet (all devices) For common command set refer to Appendix A. The following SCSI commands are executed during an attach: NOTES: There may be any number of scatter/gather entries. The scatter/gather table must be in local MVME147 RAM (the DMA channel does not tabl...
Page 97 - Old Packet Supported for Compatibility
Attach/Detach Packet (all devices) 7-17 7 Old Packet Supported for Compatibility Even Byte \ Odd Byte \ attributes (byte offset $10). $29 xxxxxxxx Alternate cylinders defines the number of alternate cylinders per disk that are to be reserved at the end of the disk for alternates. NOTE: 1. Refer to C...
Page 112 - Format Packet; For common command set operation refer to Appendix A.
SCSI PACKETS 7-32 7 Format Packet For common command set operation refer to Appendix A. The command sent to the controller is: format device ($04). The following SCSI commands are executed: $72 xxxxxxxx Command error status byte (valid following a command error $08) -- SCSI command in error. $73 xxx...
Page 119 - SCSI Bus Reset Packet
SCSI Bus Reset Packet 7-39 7 SCSI Bus Reset Packet This function activates the RST* (RESET) line on the SCSI bus (hardware reset). All devices on the bus are reset and any commands that were pending are terminated. The SCSI firmware cleans up internal flags and the status returned to the user is ...
Page 121 - SCSI Controller Reset Packet; Erase Packet; The table below shows the erase packet.
SCSI Controller Reset Packet 7-41 7 SCSI Controller Reset Packet This function sends a bus device reset message ($0C) to the controller specified in the packet. All outstanding packets are returned with a "reset status" ($0A). This command affects only the specified controller. After the con...
Page 123 - Rewind Packet; The SCSI firmware table shows the rewind packet.
Rewind Packet 7-43 7 Rewind Packet The Rewind command ($01) rewinds the tape to the BOT. If the immediate response bit is set, status is returned immediately, even though the controller is still busy rewinding. If a new command is sent before the controller is finished, a busy status may be sent to ...
Page 125 - Read Block Limits Packet; The table below shows the read block limits packet.
Read Block Limits Packet 7-45 7 Read Block Limits Packet The read block limits command ($05) returns the maximum and minimum block size written on the tape. The controllers supported by the SCSI firmware only support QIC 24 or QIC 11 type blocks which equal 512 ($200) bytes. The table below shows th...
Page 129 - Write Filemarks Packet; The table below shows the write filemarks packet.
Write Filemarks Packet 7-49 7 Write Filemarks Packet The write filemarks command ($10) writes the specified number of filemarks to the tape. N o t e The controller must be in general mode or write mode.Refer to tape read/write packet for more information. The table below shows the write filemarks pa...
Page 131 - Verify CRC Packet; The controller must be in general or read mode.; The table below shows the verify CRC packet.
Verify CRC Packet 7-51 7 Verify CRC Packet The verify Cyclic Redundancy Character (CRC) command ($13) instructs the controller to read the specified number of blocks and check the CRC of each block. The verify begins at the current tape position and the tape is left positioned at the end of the last...
Page 132 - Tape Mode Select/Sense Packet
SCSI PACKETS 7-52 7 Tape Mode Select/Sense Packet The tape mode select command ($15) configures the controller for the specified operational parameters. The tape mode sense command ($1A) returns the QIC format, controller and drive type, block size, and buffered mode. $02 xxxxxxxx Status from SCSI f...
Page 135 - Inquiry Packet
Inquiry Packet 7-55 7 Inquiry Packet The inquiry command ($12) returns information from the controller that identifies which controller is attached and its attributes. The format and the number of bytes returned varies from controller to controller (refer to the appropriate controller manual for thi...
Page 139 - The table below shows the load/unload packet.
Load/Unload Packet 7-59 7 Load/Unload Packet The load/unload command ($1B) positions the tape for removal or to BOT. The load mode positions the tape at BOT, and the unload mode positions the tape at End Of Tape (EOT). The retension bit causes the tape to go to BOT, then to EOT, then to BOT for the ...
Page 141 - Recover Buffer Data Packet; The table below shows the recover buffer data packet.
Recover Buffer Data Packet 7-61 7 Recover Buffer Data Packet The recover buffer data command ($14) is used to recover the data remaining in the controller’s buffer following an error while writing to tape. This command returns the data not yet written to tape. The data is read and put in the address...
Page 143 - Request Sense Data Packet; The table below shows the request sense data packet.
Request Sense Data Packet 7-63 7 Request Sense Data Packet The request sense data command ($03) returns the status of the controller. The maximum length parameter and the data pointer are used to return this status. The actual format and the number of bytes returned is controller- specific. Refer to...
Page 145 - Check Status Packet; The table below shows the check status packet.
Check Status Packet 7-65 7 Check Status Packet The check status command ($60) senses a $00 test unit ready command to the device. The returned status is in the 4 status bytes (refer to Returned Status Command Table in Chapter 3). The table below shows the check status packet. Even Byte \ Odd Byte \ ...
Page 146 - Open Packet
SCSI PACKETS 7-66 7 Open Packet The open packet is a read of the first blocks of a device. This command is intended as a "safe" read that won’t overrun the byte count when the block size of the device is unknown. $02 xxxxxxxx Status from SCSI firmware (byte 0) (Note 1) $03 xxxxxxxx Status fr...
Page 149 - The ATTACH command performs the following to a Winchester disk:; BYTE OFFSET; BYTE; VALUE
A COMMON COMMAND SET AND DISK OPERATION The first high level command required to interface with a Winchester disk is an ATTACH. An ATTACH initializes the SCSI firmware pointers and internal flags. A RAM work area is used to build the SCSI command descriptor block, messages sent in the message-out ph...
Page 151 - ENTRY NUMBER; ENTRY
A-3 A If the scatter/gather field at byte offset $10 in the user packet is not zero, the address at offset $4 is taken as a scatter/gather table address. Otherwise the address is the READ/WRITE buffer starting address. A typical scatter/gather table example would be: Scatter/Gather Table Example The...
Page 155 - DEFECT LIST
A-7 A Below is the Command Descriptor Block for the Format command. Format Command CDB User Defect List Type and Defect List Format. BYTE OFFSET VALUE COMMENTS 0 04 Command code 1 (Note 1) LUN is inserted, FMT data, CMP list, defect list format 2 00 Reserved 3 00 Reserved 4 (Note 2) Interleave 5 00 ...
Page 160 - COMMON COMMAND SET AND DISK OPERATION
COMMON COMMAND SET AND DISK OPERATION A-12 A Mode Select Parameter List: Page 3 Parameters for Winchester drives (cont’d) 8 (Note 4) Alternate tracks per volume (MSB) 9 (Note 4) Alternate tracks per volume (LSB) A (Note 5) Sectors per track (MSB) B (Note 5) Sectors per track (LSB) C (Note 6) Bytes p...
Page 161 - Mode Select Command CDB
A-13 A Before formatting a Winchester disk, the MVME147 SCSI firmware sends a mode select command for drive geometry parameters (page 4) to the controller. Below is the command descriptor block for the mode select command: Mode Select Command CDB 4. Alternate tracks per volume is taken from the atta...
Page 168 - PIN 34 CONTROL; PIN 2 CONTROL; BIT; COMMENTS
COMMON COMMAND SET AND DISK OPERATION A-20 A Pin 2 and Pin 34 Definition for High Density. Pin 2 and Pin 34 Definition for Low Density. 3. Sectors/track is taken from the attach packet, byte offset $0C. 4. The number of bytes/sector is taken from the bytes per block field in the attach packet, byte ...