adaptec AHA-1740A/1742A/1744 EISA-to-Fast SCSI Host Adapter Technical Reference Manual
Copyright © Copyright 1992 Adaptec, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means; electronic, mechanical, photocopying, recording or otherwise, without the prior written consent of Adaptec, Inc., 691 South Milpitas Blvd., Milpitas, CA 95035. Trademarks EISA is a registered trademark of BCPR Services Inc. Intel is a registered trademark, and 286, 386 are trademarks of Intel Corporation.
FCC Compliance Statement NOTE: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference in residential installations. This equipment generates, uses, and can radiate radio frequency energy, and if not installed and used in accordance with the instructions, may cause harmful interference to radio communications.
iv
Table of Contents Preface ............................................................................................................................... xi Conventions...................................................................................................................... xii Chapter One - Introduction Document Scope.............................................................................................................. 1-1 Purpose.........................................................
Table of Contents ASW-C174 Configuration Diskette.............................................................................. 2-12 Chapter Three - Installation Unpacking and Inspection.............................................................................................. 3-1 Installation ...................................................................................................................... 3-1 System Configuration Background for Standard Mode........................................
Table of Contents Digital Output Registers (Write 3F2) ................................................................... 4-23 Diskette Controller Registers (Read/write 3F4 and 3F5) .................................... 4-24 Digital Input Register (Read 3F7)......................................................................... 4-25 Diskette Control Register (Write 3F7).................................................................. 4-25 Firmware Download (AHA-1740/1744 Only) ..........................
Table of Contents Interrupt Initialization................................................................................................. 5-32 Chapter Six - Enhanced Mode Firmware Description Introduction..................................................................................................................... 6-1 Control Block................................................................................................................... 6-3 Command Word.....................................
Table of Contents SCSI Bus Reset Handling ............................................................................................ 6-46 Reset Initiated by the Host.................................................................................... 6-46 Reset Initiated by the Host Adapter ..................................................................... 6-47 Reset Initiated by Another SCSI Device...............................................................
Table of Contents SCSI Messages ......................................................................................................... 9-3 Target Mode SCSI Description ...................................................................................... 9-3 Initiator Conformance Level Requirements ........................................................... 9-3 Synchronous Transfer Support ...............................................................................
Preface This Technical Reference Manual provides technical information for Adaptec’s AHA-1740A/1742A/1744 EISA-to-Fast SCSI Host Adapters. It is prepared for customer technical personnel requiring detailed information on the operation of the board at a register and command protocol level. Documentation of board schematics, integrated circuits, microcode and BIOS routines is not provided.
Conventions The following typographic conventions are used throughout this Technical Reference Manual. bold Used for keystrokes (.. press the Enter key ..) and screen selection fields (.. select Backup Device and ..). Helvetica Used for operator entry that must be typed exactly as shown ( .. device=c:\cdrom\cdrom.tsd ..) and for screen messages (.. Enter Password ..). Helvetica Italics Used as a placeholder for text you must determine and type in (.. enter nn for number ..).
Chapter One Introduction Document Scope This manual provides information on installation and defines the program interfaces of the AHA-1740A/1742A/1744 intelligent host adapters in EISA bus-based systems. Programming peripheral drivers directly to the hardware interface of the board is not recommended. The ASPI (Advanced SCSI Programming Interface) specifications provide a simpler and more flexible interface which is protected against changes, upgrades and obsolescence of the boards.
adaptec AHA-1740A/1742A/1744 AHA-1740A/1742A/1744 Product Features EISA Features The AHA-1740A/1742A/1744 is a full-performance EISA board offering the highest performance available across the bus. It takes advantage of first-party DMA operations, also known as bus mastering, which allow data transfers to proceed at high data rates without system processor intervention.
EISA-to-Fast SCSI Host Adapter • Internal and external SCSI connectors • Initiator and target modes of operation fully supported • Differential SCSI (AHA-1744 only) • SCSI-1 and SCSI-2 compatible • Tagged queuing Introduction Board Features In addition to extensive functions on the two main interfaces of the board, the intelligence built into the board microcode and BIOS software allows a number of additional functions to be offered, including: • Scatter/Gather operation • Boot from any targ
adaptec AHA-1740A/1742A/1744 mode dictates the software manager revision which can support the board, but has no effect on the SCSI or host bus hardware connections. Standard Mode allows software drivers written for the AHA-1540 or AHA-1640 families to run unaltered on the AHA-1740 family. There is no performance penalty for this on the EISA bus. The AHA-1740A/1742A/1744 still performs 32-bit transfers at speeds up to 33 MBytes/second.
EISA-to-Fast SCSI Host Adapter Introduction Product Specifications Physical Dimensions Length 13-3/8 inches Width 5/8 inch Height 5 inches Standard EISA-compatible form factor. Power Requirements +5.0 +/- 0.25 Volts at 2.9 Amps maximum.
adaptec AHA-1740A/1742A/1744 SCSI Interface Electrical Interface for AHA-1740A/1742A As specified by ANSI X3.131-1986 for single-ended operation. Output Signals All signals use open collector or three-state drivers. Each signal driven by a SCSI device has the following output characteristics when measured at the SCSI device’s connector: Signal Definition Characteristics VOL Low-level output voltage 0.0 to 0.5 volts DC at 48 mA sinking (signal assertion) VOH High-level output voltage 2.5 to 5.
EISA-to-Fast SCSI Host Adapter Introduction Electrical Interface for AHA-1744 As specified by ANSI X359.2/86-109 Rev. 10h for differential alternatives. Output Signals Each signal driven has the following output characteristics when measured at the SCSI device’s connector: Signal Definition Characteristics VOL Low-level output voltage 1.7 volts DC maximum at IOL (low-level output current) = 55 mA) VOH High-level output voltage 2.
adaptec AHA-1740A/1742A/1744 External Connector Shielded 50-pin high density (Alternative 1) connector as specified in proposed ANSI standard X3T9.2/86-109 Revision 10h, Section 4, Figure 5. For connector pin out, see Appendix B.
EISA-to-Fast SCSI Host Adapter Introduction Floppy Disk Interface Standard Electronic and Physical interface Driver Output Signals VOL 0 volts minimum 0.5 volts maximum VOH Open collector 5.25 volts maximum IOL 60 mA IOH 0.1 mA Receiver Input Signals VT- 1.0 volts maximum VT+ 1.4 volts minimum Tied to +5 volt supply through 150 ohm resistors. Schmidt Trigger with 0.8-volt hysteresis Connector Unshrouded 34-pin header.
adaptec AHA-1740A/1742A/1744 • • ❏ 1- 10 Adaptec AHA-1740A/1742A/AHA-1744 Host Adapter Installation Guide Using the ASW-C174 Intel® 82077A Floppy Disk Controller Data Sheet
Chapter Two Architecture Hardware The hardware of the AHA-1740A/1742A/1744 products is based on the latest VLSI technology for maximum performance in a minimum of board space. Where commercial products with sufficient performance and functionality were not available, Adaptec has developed custom circuits using its long experience in high-performance silicon design for peripheral control applications.
adaptec AHA-1740A/1742A/1744 Bus Master DMA The AHA-1740A/1742A/1744 controls the host EISA bus as a master and transfers data directly to and from main system memory. This implementation is known as Bus Master DMA. Bus Master DMA greatly reduces the host software overhead because the host CPU is no longer required to maintain the DMA channel’s address pointers and word counts. Bus Master DMA also reduces the number of interrupts generated per I/O command.
EISA-to-Fast SCSI Host Adapter Architecture synchronous and asynchronous peripherals can be freely mixed on a cable connected to the AHA-1740A/1742A/1744. In addition, the host adapter has the ability to select particular targets during configuration to initiate synchronous negotiation, enable parity checking, send start-up, and allow disconnection.
adaptec AHA-1740A/1742A/1744 EISA Configuration Chip (AIC-575) The host adapter provides a number of options which may be programmed at configuration time.
EISA-to-Fast SCSI Host Adapter Architecture systems with a large amount of bus latency, typically found in performance EISA systems. Standard Mode Firmware The AHA-1740A/1742A/1744 support multithreaded SCSI initiator operation through a simple mailbox protocol. The firmware accepts as many Command Control Blocks (CCBs) as required and executes them from its local RAM.
adaptec AHA-1740A/1742A/1744 A typical mailbox structure is: Base Adr +0 CMD CCB 4 Pointer MBO 0 +4 CMD CCB 2 Pointer MBO 1 +8 00 Free Entry MBO 2 +12 CMD CCB 3 Pointer MBO 3 +16 00 Free Entry MBI 0 +20 Status CCB 1 Pointer MBI 1 +24 00 Free Entry MBI 2 +28 00 Free Entry MBI 3 In this example there are four MBOs and four MBIs. The first byte of each MBO contains the MBO Command byte. The remaining three bytes point to a Command Control Block (CCB).
EISA-to-Fast SCSI Host Adapter Architecture A typical CCB is shown below: Byte 0 +1 Command Control Block Opcode Tar/Init Data Out Data In +2 SCSI Command Length = m +3 Returned Sense Info Length = n +4 Data Length (MSB, MID, LSB) +7 Data Pointer (MSB, MID, LSB) +10 Link Pointer (MSB, MID, LSB) +13 Command Link ID +14 Host Status +15 Target Status +16 Reserved +17 Reserved +18 SCSI Command Bytes (m Bytes) 18 + m LUN Allocated for Sense Data (n Bytes) Command Descriptor Block T
adaptec AHA-1740A/1742A/1744 Please refer to the SCSI specification ANSI X3.131, the Common Command Set (CCS) revision 4B, and the SCSI-2 draft for additional information on Command Descriptor Blocks. Principles of Operation At power-up, the host must inform the host adapter of the location and number of mailboxes. To start a task, the host builds a CCB and stores its memory address into a free mailbox.
EISA-to-Fast SCSI Host Adapter Architecture The host adapter dequeues on a first in, first out (FIFO) basis for each target/LUN combination. However, due to the optimization algorithm used by the host adapter, a task may sometimes be started earlier in spite of its late entrance in the queue on multiple target/LUN systems. Task queuing should not be used where changes in the order of command execution may cause data integrity failures.
adaptec AHA-1740A/1742A/1744 The control block is a 48-byte structure created and maintained in shared memory by software in the system unit. It is used to convey requests to the host adapter.
EISA-to-Fast SCSI Host Adapter Architecture Onboard BIOS Operation A host adapter BIOS is provided to emulate the standard hard disk BIOS and boot functions. With this BIOS, the host adapter can be used in lieu of a standard hard disk controller on any ISA-compatible system. The BIOS is compatible with the standard hard disk BIOS. This allows DOS to access up to two hard disk devices on the SCSI bus without a driver. All normal I/O functions are supported including system booting.
adaptec AHA-1740A/1742A/1744 Flash Code Possible Meanings of Flash Code LED Remains On Host Adapter Control Processor inoperative, terminators missing or not powered, or card enable has not been asserted after reset. 1 Flash RAM test failed. 2 Flashes AIC-6251 SCSI protocol chip verification failed. 3 Flashes FIFO write/read data path test failed. Continuous Flashes EEPROM has not been programmed.
EISA-to-Fast SCSI Host Adapter Architecture The utility disk will also include copies of the microcode files for the AHA-1740/1744 to be downloaded by the download utility. These are normally not required, except in the case of microcode upgrade. The AHA-1740A/1742A do not have downloadable microcode. The configuration overlay file uses a freeform data area.
Chapter Three Installation Unpacking and Inspection The carrier is responsible for damage incurred during shipment. In case of damage, have the carrier note the damage on both the delivery receipt and the freight bill, then notify your freight company representative so that the necessary insurance claims can be initiated. After opening the shipping container, use the packing slip to verify receipt of the individual items listed on the slip.
adaptec AHA-1740A/1742A/1744 WARNING Connection of a single-ended board to a differential drive or vice versa may cause permanent electrical damage to one or both devices. System Configuration Background for Standard Mode The DOS operating system and standard BIOS supports two hard disk drives; drive C and drive D. If two standard hard disk drives are installed, they are the only hard disk drives accessible from the operating system.
EISA-to-Fast SCSI Host Adapter Installation Each EISA system is shipped with a configuration utility to assign parameters such as port addresses and interrupt priorities to boards installed in the system. This must be used to identify and configure the board in your system. The details vary from vendor to vendor. Refer to the system documentation for details.
adaptec AHA-1740A/1742A/1744 SCSI Parity Check all SCSI devices to ensure that they generate parity. If any SCSI device does not generate parity, then all SCSI devices should be set to disable parity checking. If all SCSI devices generate parity, it is recommended that parity checking be turned on for all devices. Please note that generating parity and checking parity are two separate functions. The AHA-1740A/1742A/1744 configuration overlay can be used to enable/disable parity checking for each SCSI ID.
EISA-to-Fast SCSI Host Adapter Installation Product Identification Label Here AIC 4600 adaptec, inc AHA-1740/1742A AIC 565 RN5 RN6 AIC 575 RN7 AIC 6251 BMC ASSY46806-00 Microcode 82077 (1742A Only) BIOS Floppy enable jumper (normally present) Floppy secondary address jumper (normally absent) Terminator Power Supply Jumper (normally present) Installed (default) = Host adapter will supply term power Removed = Host adapter will not supply term power Figure 3-2.
adaptec AHA-1740A/1742A/1744 7. Align the EISA bus connector on the bottom of the AHA-1740A/1742A/1744 to the open chassis slot with the slot cover removed. Ensure the external connector and bracket pass cleanly through the cutout in the rear wall. 8. Firmly plug the board into the slot. Use the screw from the corresponding expansion slot cover to secure the board bracket to the system frame. 9. If an internal SCSI peripheral is to be used, install a 50-pin SCSI ribbon cable to the host adapter.
EISA-to-Fast SCSI Host Adapter Installation selected for external SCSI devices must not overlap with the addresses of the host adapter or any other SCSI devices attached internally. Generally speaking, there can be no more than seven other SCSI devices attached, each with its own unique address and the total cable length must not exceed 20 feet for single-ended and 80 feet for differential.
adaptec AHA-1740A/1742A/1744 2. Ignore any error which indicates that an unknown board has been detected in the system. Selection of board configuration varies with the configuration utility supplied with the EISA system. There are two main types, supplied by MCS and Phoenix. The type may be obscured by the screen banner used by the system vendor. Follow the procedure which is closest to your environment. In the case of the MCS configuration, type cf. For Phoenix configuration type ptlecu.
EISA-to-Fast SCSI Host Adapter Installation MCS Configuration For configuration under MCS, select the slot in which the AHA-1740A/1742A/1744 is installed and press Enter. The screen will display the System Configuration Detailed View. These settings should normally not be changed for Standard Mode operation. Use the cursor arrows to make selections and the Enter key to enter the selection.
adaptec AHA-1740A/1742A/1744 When Enhanced Mode is selected, IRQ 11 is used by default. By default, if multiple AHA-1740 family host adapters are in the system in Enhanced Mode, all will use IRQ 11. For the MCS EISA Configuration Utility, this can be shown by selecting Change System Resources under the Edit pull down menu (or entering CtrlR) when the Host Adapter Interface Mode is highlighted. To increase system performance, select a different IRQ for every AHA-1740 family host adapter in the system.
EISA-to-Fast SCSI Host Adapter Installation Standard Mode SCSI Configuration The view for Standard Mode is a simple selection for those variables which apply to all SCSI peripherals connected. This is shown in Figure 3-5. Normally, the default of one device at SCSI ID 0 with normal default parameters is selected.
adaptec AHA-1740A/1742A/1744 Enhanced Mode SCSI Configuration The view for Enhanced Mode allows more flexible selection and is shown in Figure 3-6. System Configuration Detailed View System Edit View Settings Help Host Adapter Interface Mode ..........
EISA-to-Fast SCSI Host Adapter Installation System Configuration Detailed View System Edit View Settings Help Host Adapter Interface Mode ..........
adaptec AHA-1740A/1742A/1744 When the selection is completed, press Esc to reach the SCSI configuration exit menu shown in Figure 3-8. System Configuration Detailed View System Edit View Settings Help Host Adapter Interface Mode ..........
EISA-to-Fast SCSI Host Adapter Installation Phoenix Configuration Configuration using the Phoenix utility is similar to that under MCS. Use the arrow keys to select the board to configure after entering the Configuration menu, selecting function choices and pressing Enter. Press Enter when the appropriate board slot is highlighted. Selection among the available system options is made by using the up/down arrows. Press the Spacebar at the option to allow for a toggling among options available.
adaptec AHA-1740A/1742A/1744 • 32-bit addresssing capability • Single fast mailbox handling • Contingent allegiance (SCSI) • Tagged queueing (SCSI) • 10 MBytes/second Fast SCSI data transfer Adaptec’s AHA-1740/1744 adl utility is used for three main features: • Download firmware (AHA-1740/1744 only) • Firmware information • Low-level disk format ADL Operation Insert the ASW-C174 configuration diskette into drive A.
EISA-to-Fast SCSI Host Adapter • Download Firmware • Firmware Information • Low-Level Format Installation Use the up and down arrow key to choose the operation. Press Enter to start an operation. Following is a description of each operation. Download Firmware (AHA-1740/1744 Only) The AHA-1740/1744 (not the AHA-1740A or AHA-1742A) have the unique flexibility of allowing firmware to be altered or upgraded while the board is installed in a system.
adaptec AHA-1740A/1742A/1744 Subsequently, a confirm message window will be displayed to allow verification of the download operation. If the displayed information is valid, press Esc to continue and return to the main menu. Firmware Information (AHA-1740/1744/1740A/1742A) For any of the AHA-1740/1744/1740A/1742A boards, this menu selection is an easy way to check the versions of microcode currently installed.
Chapter Four Hardware Functional Description Hardware Overview This section provides a description of the AHA-1740A/1742A/1744 hardware funtional interface to the EISA host software.
adaptec AHA-1740A/1742A/1744 The base port is for control and status, the second port for command and data transfer, and the third port for interrupt flags.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description Control and Status Port Writing a one to the bits of the Control Port initiates certain special host adapter operations. There is no requirement to return the bits to the zero state, since they are reset automatically after the requested operation is initiated. Read operations to the Status Port address return host adapter status information.
adaptec AHA-1740A/1742A/1744 continue after the reset occurs. See the section on Reset Functions describing the overall reset structure. Bits 0-3 - Reserved Reserved bits must be set to zero to avoid compatibility problems with future extensions of the control register. Base+0 Port, Read: Host Adapter Status Port Bit 7 - Self Testing in progress (STST) This bit, when one, indicates that the host adapter is performing self-initialization and internal diagnostics.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description Bit 2 - Data In Port Full (DF) The host uses the DF bit to synchronize transfers of data from the host adapter to the host. When the DF bit is set to one, the host adapter has placed a byte in the Data In Port for the host to remove and process.
adaptec AHA-1740A/1742A/1744 terminated abnormally. The use of CDF as a handshaking bit is required to prevent the transfer of invalid data. If an adapter command requires data transfer from the host adapter, the host adapter will place the data bytes in the Data In Port and set the DF bit (Status Port bit 2) to indicate that the requested parameter is ready for the host to read. When the host reads the Data port, DF is automatically reset.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description Bit 3 - SCSI Reset Detected (SCRD) This bit, when one, indicates that a SCSI Reset has been received on the SCSI bus. The Any Interrupt bit and the AT interrupt signal will also be set. The host adapter supports SCSI Soft Reset (see Section 4.3). Any ongoing target or initiator activities will continue normally after first clearing the SCSI bus.
adaptec AHA-1740A/1742A/1744 Mailbox In entries, so the host should check the next entry to determine if more than one set of information has been provided. The MBI entries are filled in round-robin order, so the host should simply check the next MBI entry after the last one that was found when a new MBIF interrupt occurs. If an MBIF interrupt is set and other Mailbox In entries are made before the interrupt is cleared, then all the entries can be scanned as found.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description SCSI Reset Operations The SCSI Reset condition is defined in the SCSI Standard, X3.131-1986, Section 5.2.2. A SCSI Reset condition may be forced by any SCSI device on the bus. The condition is forced by the assertion of the SCSI Reset signal. The AHA-1740A/1742A/1744 has four mechanisms which may force a SCSI Reset condition.
adaptec AHA-1740A/1742A/1744 The SCSI Soft Reset option is useful in multitasking systems that cannot tolerate the overhead of a complex reconfiguration and reinitialization after a normal reset operation. For the SCSI Soft Reset option to operate correctly, all SCSI devices that communicate on the SCSI bus must support the Soft Reset option.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description resources such as interrupt levels and DMA channels when they are assigned. Refer to the EISA Specification, Section 2.6 and Section 3.3 for more information.
adaptec AHA-1740A/1742A/1744 Host ID 1 (HID1, zC81, R) HID1 is the second byte of the expansion board ID. It is written by the local processor and read by the system processor. RESDRV, HARDST or SOFTRST has no effect. Bit Definition 7-5 Least significant three bits of the second compressed character of manufacturer’s ID. The most significant two bits are found in register HID0. The character is always "D," which is represented by ’00100’B. 4-0 Third compressed character of manufacturer’s ID.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description I/O Port Address (PORTADDR, zCC0, W/R) PORTADDR selects the base address for the I/O port interface. It is compared with the system address every cycle. If a match occurs, data will either be driven or sampled on the bus. PORTADDR is initialized with a value provided in the configuration file during configuration. Bit Definition 7 ENHANCED INTERFACE When set, the host adapter will power up in Enhanced Mode.
adaptec AHA-1740A/1742A/1744 BIOS Address Register (BIOSADDR, zCC1, W/R) The BIOSADDR register maps the BIOS to one of 12 locations between C0000h and EFFFFh at 16K boundaries. In addition, the BIOS has the last 2 KBytes of address space as overlaid RAM. The RAM may be written to when enabled by setting the RAMEN bit and clearing the WRTPRT bit. The RAM may be read by setting the RAMEN bit. On power-up, the RAM is disabled. Bit Definition 7 WRTPRT When set, write protects the RAM.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description Interrupt Definition (INTDEF, zCC2, W/R) An interrupt channel may be selected from one of several on the EISA bus. The interrupt may be programmed as high true or low true. When high true, the interrupt is a two state signal and acts like an edge triggered interrupt, and may not be shared with another board. If the interrupt is on and disabled, it will go to the low state, and back again to the high state when enabled again.
adaptec AHA-1740A/1742A/1744 SCSI Definition (SCSIDEF, zCC3, W/R) Programming this byte sets up basic SCSI parameters. Bit Definition 7-5 Reserved (0) 4 RSTPWR When set, the host adapter will generate a SCSI Reset on power up and on a Hard Reset. When cleared, the host adapter will not generate a SCSI Reset on power up or on a Hard Reset to the board. 3-0 HSCSIID These bits define the SCSI ID of the host adapter. Bit 3 is the MSB.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description Reserved Registers The following registers are reserved for future use. • Reserved 0 (RESV0, zCC5, W/R) • Reserved 1 (RESV1, zCC6, W/R) • Reserved 2 (RESV2, zCC7, W/R) I/O Port Register Standard Mode (Group 1) The I/O Control Standard Mode (Group 1) registers form the primary communication channel between the system and the adapter for Standard Mode operation.
adaptec AHA-1740A/1742A/1744 system STATUS register and this state means that a hardware error has occurred on the board. Control Port (CNTRL, Base address + 0, W) The Control Port is written by the system at the Base address. It is used to control the hardware directly. Bit Definition 7 HARDRST When set, the host adapter will be put in a power on state. The firmware will be loaded from EEPROM to RAM and power on diagnostics will be run. This bit is self-clearing and need not be reset by the system.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description Bit Definition 2 HAVAIL Information is Available to the system. When this bit is one, the local processor has loaded CMD/DAT (Base + 1) with data. It is cleared when the system reads CMD/DAT. This bit is also read by the local processor. (0) 1 Reserved. (0) 0 INVCMD Invalid Host Command. When this bit is one it indicates that the command or parameter received from the Local Command/Data register is illegal.
adaptec AHA-1740A/1742A/1744 I/O Port Register Enhanced Mode (Group 2) These registers are used for operating in Enhanced Mode and may be used at any time. They consist of mailbox out, mailbox in, control, status, attention, interrupt 1 status, and interrupt 2 status. The mailbox out and in are used for general data transfer and represent either an address or Immediate command parameters. Control, status, attention and the interrupt registers are used for general operation.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description adapter fails diagnostics, then the local processor will load the value appropriate for the failure in MBOXIN0, according to the following list, and read ATTN to clear the busy bit.
adaptec AHA-1740A/1742A/1744 Mailbox in 3 (MBOXIN3, zCDB, R) This is the most significant byte of a 32-bit address pointer to a CCB or additional data for an immediate command. Attention (ATTN, zCD4, W/R) Bit Definition 7-4 OP Code Operation Code. Defines the contents and usage of the mailbox out registers. All codes not named will be ignored.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description Enhanced Mode (Group 2) Status (G2STAT, zCD7, R) Bit Definition 7-3 Reserved 2 Mailbox out empty Set to one by firmware when it is done with the mailbox out. Cleared by software writing to any mailbox out location. 1 Interrupt pending Reflects the state of the EISA interrupt line from the Enhanced Mode (Group 2) interrupt before the enable/disable logic. 0 Busy Set by a write to the Attention register or a hard reset.
adaptec AHA-1740A/1742A/1744 Bit Definition 7 Reserved (set to 0) 6 Reserved (set to 0) 5 Drive B Motor Enable 4 Drive Motor Enable 3 Enable diskette interrupts and DMA 2 Diskette function reset 1 Reserved (set to 0) 0 Drive Select: A "0" on this bit indicates that drive A is selected. Diskette Controller Registers (Read/write 3F4 and 3F5) The diskette controller has two main system processor accesses; a status register and a data register.
EISA-to-Fast SCSI Host Adapter • • • Hardware Functional Description Command Phase: The processor issues a sequence of write commands to the diskette controller that direct the controller to perform a specific operation. Execution Phase: The diskette controller performs the specified operation. Result Phase: After completion of the operation, status and other housekeeping information is made available to the processor through a sequence of read operations from the data register.
adaptec AHA-1740A/1742A/1744 Data Rate Delay 1 Mps 83.00 500 Kps 125.00 300 Kps 125.00 250 Kps 125.00 DRATESEL Data Rate Select These bits select the data transfer rate. Reset clears these two bits. Data rates get selected as follows: Bit Data Rate (bits/second) 1 0 MFM FM 0 0 500 250 0 1 300 150 1 0 250 125 1 1 1000 Not defined Firmware Download (AHA-1740/1744 Only) The AHA-1740A/1742A permanently stores both Standard and Enhanced Mode firmware in an EPROM.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description Hardware Configuration Requirements The following host adapter configuration options must be defined prior to setting the card enable bit in register zC84: • • • • • The BIOS location must be set to an address which does not conflict with other system resources. It may also be enabled or disabled for the particular board. The interrupt channel needs to be selected and enabled.
adaptec AHA-1740A/1742A/1744 BIOS Driver Needs At power-on time the BIOS needs information about the SCSI bus to aid in minimum power-on time and confidence in a complete working system. The information given tells the BIOS that a device is, or is not, installed; if intalled and a selection error occurs, to wait for no error, or report the error after a timeout; if installed and a selection error occurs, to not report the error and continue with power-on initialization.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description Refer to Appendix D, EISA Free-Form Data for the initial SCSI subsystem data structure. Configuration Byte Description and Defaults The following describes the SCSI device configuration byte format. Firmware default values are also given. These defaults are used by the firmware to interface with the various targets in the event that no Initialize SCSI Subsystem command has been received by the host adapter.
adaptec AHA-1740A/1742A/1744 Bit 1 - Ignore error if device not present This bit is used by the BIOS only, and does not affect firmware operation. When set, this bit indicates that the DIOS should not display an error message if an installed device does not respond with ready status during the BIOS target scan. When cleared, the BIOS will follow its normal error reporting algorithm. Bit 0 Enable disk BIOS support This bit is used by the BIOS only, and does not affect firmware operation.
EISA-to-Fast SCSI Host Adapter Hardware Functional Description Function Configuration Information Data Block for SCSI Subsystem Data Byte Offset Description 22h Function Information Byte B6 = 1 to indicate free from data 23h Type and Subtype ASCII string "SCSIDEVS" 73h Length of the following data block 74h ASCII string "AHA-174x" 7C-7Fh Reserved 80h SCSI device 0 byte 0 81h SCSI device 1 byte 1 82h SCSI device 2 byte 2 83h SCSI device 3 byte 3 ... ...
Chapter Five Standard Mode Firmware Description Host Adapter Command Overview Standard Mode is the mode in which the AHA-1740A/1742A/1744 can operate in order to run existing software for earlier Bus Master host adapters. In Standard Mode, the AHA-1740A/1742A/1744 supports two types of commands: SCSI and adapter commands. SCSI commands are issued using the mailbox protocol and a Command Control Block (CCB). When SCSI commands are used, the AHA-1740A/1742A/1744 is operating in true multithreading mode.
adaptec AHA-1740A/1742A/1744 20 21 Adapter Diagnostic Set Host Adapter Options *This command can be issued when the host adapter is executing a SCSI command. All adapter commands except Start SCSI (02) and Enable Mailbox Out Available Interrupt (05) must be executed only when the IDLE bit (Status bit 4) is one. Many commands require additional parameter bytes which are then written to the Command/Data Out I/O port (base + 1).
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description Mailbox Count. If the Mailbox Count is zero, the INVDCMD bit will be set with HACC to indicate that the parameter is invalid. At command completion, HACC will be set to one and INIT will be reset to zero. HACC will be reset as specified in the Interrupt Flag Port section of Chapter Four, Hardware Functional Description.
adaptec AHA-1740A/1742A/1744 Byte Description Value Meaning 01 Special Options Identification The value in this byte indicates what special options are supported on the AHA1740A/1742A/1744 host adapter. Other host adapters use other values in this byte.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description Set Selection Time out (Operation Code 06) This command sets the SCSI selection time out value. The SCSI Selection time out value is used to determine whether a SCSI selection was successful. If the SCSI BSY signal is not returned within the specified time out value, the selection will be terminated and an appropriate error message posted with the returned CCB.
adaptec AHA-1740A/1742A/1744 Set Bus Off Time (Operation Code 08) Note This command is not used by the AHA-1740A/1742A/1744 but is supported in order to be compatible with software written for earlier host adapters, such as the AHA1542B. This command sets the time that the host adapter will spend off the bus during a data transfer. The bus off duration is adjustable from one to 64 microseconds. The default setting is four microseconds.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description Data Byte 0 AT Bus Transfer Speed 80-FFh Bit Custom Transfer Speed 7 1 6-4 000 Read Pulse Width (ns) = 100 001 Read Pulse Width (ns) = 150 010 Read Pulse Width (ns) = 200 011 Read Pulse Width (ns) = 250 100 Read Pulse Width (ns) = 300 101 Read Pulse Width (ns) = 350 110 Read Pulse Width (ns) = 400 111 Read Pulse Width (ns) = 450 0 Strobe off time = 100ns 1 Strobe off time = 150ns 000 Write Pulse Width (ns) = 100
adaptec AHA-1740A/1742A/1744 After receiving this command, the host adapter returns eight bytes of information which specify the installed configuration as shown below: Byte Configuration Bit Byte 0 Target 0 Configuration Bit 7 LU 7 Installed Bit 6 LU 6 Installed Bit 5 LU 5 Installed Bit 4 LU 4 Installed Bit 3 LU 3 Installed Bit 2 LU 2 Installed Bit 1 LU 1 Installed Bit 0 LU 0 Installed Byte 1 Target 1 Configuration Byte 2 Target 2 Configuration Byte 3 Target 3 Configuration Byt
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description Byte Description Bit 1 Interrupt Channel Bit 7 Reserved (0) Bit 6 Interrupt channel 15 Bit 5 Interrupt channel 14 Bit 4 Reserved (0) Bit 3 Interrupt channel 12 Bit 2 Interrupt channel 11 Bit 1 Interrupt channel 10 Bit 0 Interrupt channel 9 Bits 7-3 Reserved (0) Bits 2-0 Binary value of SCSI Identifier Byte 2 SCSI Identifier After completing this command, HACC will be set indicating normal completion.
adaptec AHA-1740A/1742A/1744 If target mode is not enabled, the host adapter will behave on the SCSI interface as if it were an ordinary SCSI initiator. Any attempt to select the host adapter will result in a SCSI selection time out. Most reset operations, including Soft Reset, Hard Reset, and Power-On Reset will return the AHA-1740A/1742A/1744 Target Mode to the disabled state.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description Byte Description Meaning 03 Bus Off Time Indicates the Bus Off Time specified by the Bus Off Time Value in microseconds (see Set Bus Off Time in this chapter) 04 Number of Mailboxes The number of Mailboxes established by a previous Mailbox Initialization command will be returned in this byte. This number will be 00h if the Mailbox Initialization command has not yet been successfully completed.
adaptec AHA-1740A/1742A/1744 Byte Description Meaning 10 Disconnection Option Each bit corresponds to a SCSI device, e.g., bit 0 corresponds to the device at SCSI address 0. When set to one, the host adapter will prevent the SCSI device from disconnecting. 11-FF Reserved (00) If the command completes normally, the HACC interrupt will be set to one. If the mailbox area has not been properly initialized, all 17 bytes are still requested by the host.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description Read Adapter Channel 2 Buffer (Operation Code 1B) After receiving this command, the host adapter expects three outbound information bytes to be transferred which point to an area of 64 bytes in system RAM. The area pointed to will be used as a buffer to receive 64 bytes of information transferred from the host adapter’s channel 2 buffer to the host’s memory using the host adapter’s DMA circuitry.
adaptec AHA-1740A/1742A/1744 Echo Command Data (Operation Code 1F) This command is used to test the Command/Data Out Port, the Data In Port, and the associated control bits in the other I/O Ports. After receiving this command, the host adapter expects one byte of outbound information to be transferred through the Command/Data Out Port. The host adapter then sends (Echos) the same data value back to the host through the Data In Port.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description Base Addr +0 CMD CCB 4 Pointer MBO 0 +4 CMD CCB 2 Pointer MBO 1 +8 00 Free Entry MBO 2 +12 CMD CCB 3 Pointer MBO 3 +16 00 Free Entry MBO 0 +20 Status CCB 1 Pointer MBO 1 +24 00 Free Entry MBO 2 +28 00 Free Entry MBO 3 In this example, there are four MBOs and four MBIs. The Mailbox Count in the Mailbox Initialization command was set to four.
adaptec AHA-1740A/1742A/1744 The MBO format is described in detail below: Byte Description Value Meaning 0 MBO Command This byte specifies the state of the MBO entry. 00h Mailbox Out is free 01h SCSI or Host Adapter command is to be started. CCB pointer indicates location of CCB to be processed. 02h SCSI or Host Adapter command is to be aborted. CCB pointer indicates location of CCB to be terminated.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description host adapter will not change the MBOA interrupt bit and will continue to scan for other stored MBO entries. 3. If interrupts other than the Mailbox Out Available interrupt are pending, the host adapter will wait for the pending interrupts to be cleared before setting the Mailbox Out Available Interrupt. This guarantees that the MBO Available interrupt will not be cleared accidentally by clearing another interrupt.
adaptec AHA-1740A/1742A/1744 Mailbox In Format for CCB Complete Byte Description Value Meaning 0 MBI Status This byte specifies the state of the MBI entry. 00h Mailbox In is free 01h CCB completed without error. CCB pointer indicates location of successfully completed CCB. 02h CCB aborted by host. CCB pointer indicates location of CCB that was aborted. 03h Aborted CCB not found. CCB pointer indicates the supposed location of the CCB that was to have been aborted.
EISA-to-Fast SCSI Host Adapter Byte 2-3 Definition Data Length Standard Mode Firmware Description Value Meaning Bit 3 The SCSI Target command received was a Send command. A CCB must be prepared to transmit data from the Initiator. Bits 2-0 Binary address of the logical unit of the Target Mode host adapter that was addressed by the Initiator. The high-order two bytes of the data length specified in the Send or the Recieve command.
adaptec AHA-1740A/1742A/1744 Note Careful host Target Mode software design is necessary to prevent ambiguity in the notification process. If a CCB was just prepared but the MBO has not yet been searched by the host adapter at the time the MBI entry is made to the host, the host may choose to examine the MBI entry and not act on it, having already provided the needed CCB.
EISA-to-Fast SCSI Host Adapter Byte Description 7-9 Data Pointer (Byte 7 most significant) 10-12 Link Pointer (Byte 10 most significant) 13 Command Linking Identifier 14 Host Adapter Status (HASTAT) 15 Target Device Status (TARSTAT) 16-17 Reserved (00) 18-n SCSI Command Descriptor Block (Length specified by byte 2) n-m Reserved for Request Sense information bytes (Length of reserved space in byte 3) Standard Mode Firmware Description Value Meaning 5-21
adaptec AHA-1740A/1742A/1744 The standard format of the Command Control Block is shown in the following diagram: Byte 0 1 Command Control Block Opcode Tar/Init Data Out Data In 2 SCSI Command Length = m 3 equest Sense Allocation 4 Data Length (MSB, MID, LSB) 7 Data Pointer (MSB, MID, LSB) 10 Link Pointer (MSB, MID, LSB) 13 Command Link ID 14 Host Status 15 Target Status 16 Reserved 17 Reserved 18 SCSI Command Bytes (m Bytes) 18+m LUN Allocated for Sense Data (n Bytes) The byte
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description AHA-1740A/1742A/1744. Operation codes 00h and 03h differ only in the updating of Bytes 4, 5, and 6, following completion of the command. If the operation code value is 01h, the CCB is intended to service a Send or Receive command sent to the host adapter as a target from another initiator. The values in the other fields are used to service the Target Mode operation.
adaptec AHA-1740A/1742A/1744 Mode CCB, the handling of incorrect lengths is described in Incorrect Length Management for Target Mode Operation in Chapter Nine, SCSI Features. If a data underrun/overrun condition occurs for an operation that accesses the drive’s media (Read/Write, Extended Read/Write, Write and Verify) and the direction bits are set to zero, the host adapter will complete the operation without error. However, some or all of the data specified by the host may not be transferred.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description This byte indicates the length, in bytes, of the area reserved for information that may be obtained by a Request Sense command. A value of 00h indicates that an allocation length of 14 bytes is to be used, sufficient to capture the sense key and error code of all normal extended sense type devices. A value of 01h requests that no automatic Request Sense be executed. The values from 02h to 07h are reserved.
adaptec AHA-1740A/1742A/1744 set, an interrupt will be generated before the next command is started. A completed CCB is always reported back in an MBI, but MBIF interrupts are only reported if the linked set of commands is finished or if a Link with Flag message is presented. There must be enough MBI entries to receive the entire set of linked commands. Target Mode does not support the linking function. Byte 13 : Command Link ID This byte is used in conjunction with linked commands.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description Byte 15: Target Status For an initiator CCB, this byte is used to return the SCSI status byte sent to the host adapter from the initiator. If a SCSI command returns with Busy status, the normal recovery process is to execute the command again. The AHA-1740A/1742A/1744 takes that burden off the host and periodically restarts the command automatically until the command completes with a status other than busy.
adaptec AHA-1740A/1742A/1744 Scatter/Gather List Definition Using the normal CCB operation codes of 00h and 01h (SCSI Initiator and SCSI Target CCBs), the CCB itself contains a pointer to the first byte of a contiguous area of data of a specified length. The direction of transfer with respect to the data area and the checking of the length of the data transfer to the data area are both managed by the AHA-1740A/1742A/1744 according to the requirements of the particular mode and control bit set-up.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description The actual boundary limitation is somewhat less restrictive. If the binary values of the starting address of a segment, the byte count of that segment, and the starting address of the next segment are all exclusive OR’d together, and the result of that exclusive OR is an even number, the boundary between those two segments is valid.
adaptec AHA-1740A/1742A/1744 If a check condition status is received from the target, the AHA-1740A/1742A/1744 will issue a Request Sense command to get the sense data. The sense data is stored in the CCB after the SCSI command data. The driver software must reserve the allocated number of bytes at the end of the CCB to hold the sense data which is returned as result of a receiving a check status. Automatic request sense can be optionally disabled by jumpers or by using the CCB.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description in the MBI by an interrupt from the host adapter. The host then prepares a new CCB to control the target’s next activity expected from the initiator. Execution of Target Mode Operations Without a Prepared CCB Alternatively, the processor-type device may be addressed by an initiator when no CCB has yet been prepared for use by the host adapter.
adaptec AHA-1740A/1742A/1744 DMA Channel DMA Controller Port Data 0 0B 0A 0C 00 5 D6 D4 C1 01 6 D6 D4 C2 02 7 D6 D4 C3 03 Interrupt Initialization This setup procedure is normally completed by the BIOS during initialization so that no other activity is required. If modifications to the interrupt handler are required, this information together with the programming information provided by the host system should be sufficient to properly set up the interrupt vectors.
EISA-to-Fast SCSI Host Adapter Standard Mode Firmware Description Interrupt Mask Bit Definition (Port Address A1h) Bit Interrupt 0 Int 8 1 Int 9 2 Int 10 3 Int 11 4 Int 12 5 Int 13 6 Int 14 7 Int 15 ❏ 5-33
Chapter Six Enhanced Mode Firmware Description Introduction The Enhanced mode is an interface architecture which allows the AHA1740A/1742A/1744 to take full advantage of the EISA bus facilities. It utilizes a distinct hardware interface control logic, known as the configuration chip. This permits features such as full 32-bit addressing and the entire EISA register set to be used. This mode is not compatible with versions of the ASW-1400 series of software managers before version 3.0.
adaptec AHA-1740A/1742A/1744 The host then checks the busy bit (Bit 0) in zCD7 to ensure that the AHA1740A/1742A/1744 has serviced any previous requests placed in the Attention register. If the bit is false, which will almost always be the case, the host writes a byte into the attention register with the format: Command SCSI ID The command will be either a Start command (4), Immediate command (1), or Abort command (5).
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Control Block The control block is a 48-byte structure created and maintained in shared memory by software in the system unit. It is used to convey requests to the host adapter.
adaptec AHA-1740A/1742A/1744 Command Word The command word is a 16-bit structured field used to identify the operation to be performed by the host adapter.
EISA-to-Fast SCSI Host Adapter Flag Name and Function CNE Chain No Error Enhanced Mode Firmware Description The Chain No Error flag (bit 0) indicates whether control block chaining is enabled. If this bit is set to one, chaining is enabled. Upon successful completion of the control block, the host adapter will fetch the next control pointed to by the chain address. In the event of an error, chaining is halted.
adaptec AHA-1740A/1742A/1744 Flag Name and Function DSB Disable Status Block The Disable Status Block flag (bit 14) indicates whether the status block is to be stored. If this bit is set to one, then the host adapter does not store the status block if the control block is completed without error. In the event of an error, the status block will be stored. If this bit is set to zero, then the status block is stored unconditionally upon completion of the control block.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Flag Name and Function LUN Logical Unit Number This field (bits 2-0) specifies the logical unit number of the target for which the command is to be executed. TAG Tagged Queuing This flag (bit 3) indicates whether tagged queuing should be implemented for this control block. If this bit is set to one, the host adapter will send a 2-byte tag queue message to the target immediately following the Identify message.
adaptec AHA-1740A/1742A/1744 Flag Name and Function DAT Data Transfer - Check Direction This flag (bit 8) determines whether the host adapter should verify the direction of the expected data phase for this command. If this bit is set to one, the host adapter expects the target to enter a data phase during command operation. The host adapter will check the Direction flag to determine the direction of the expected data phase (Data In or Data Out).
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Flag Name and Function ST Suppress Transfer to Host Memory This flag (bit 10) indicates whether an incoming data transfer is to be suppressed. This flag will be ignored if the Data Transfer flag (bit 8) is set to zero. If this bit is set to one, the host adapter will accept data from the target, but will not transfer it to host memory. If this bit is set to zero, data transfer is not suppressed.
adaptec AHA-1740A/1742A/1744 Flag Name and Function REC Error Recovery This flag (bit 14) is used by the host to perform error recovery procedures while the associated target is in a state of extended contingent allegiance. A state of extended contingent allegiance exists as long as the host adapter returns this status (Status Word 1, bit 14) in the status block. The condition is cleared by issuing a Resume immediate command.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description 1F 1E 1D 1C 1B 1A 19 18 17 16 15 14 13 12 11 10 F E D C B A 9 8 7 6 5 4 3 2 1 0 Data Pointer 1 Data Length 1 Data Pointer 2 Data Length 2 . . . Data Pointer n Data Length n The data lengths must be less than 4 MBytes and the total length of the transfer must be less than 16 MBytes. Data or Scatter/Gather List Length This 32-bit field contains the length in bytes (least significant byte first) of the data transfer.
adaptec AHA-1740A/1742A/1744 Chain Address This 32-bit field contains the physical memory address (least significant byte first) of the next control block to be processed by the host adapter. This field is optional and used only when the Chain No Error flag (Flag Word 1, bit 0) is set to one. Control block chaining will only occur when the current control block operation completes without error.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description SCSI Command Descriptor Block This 6-, 10-, or 12-byte field contains the actual CDB to be sent to the target during command phase. Status Block The status block is a 32-byte structure created in shared memory by software in the system unit. Information is placed into this structure by the host adapter to report completion status of a control block.
adaptec AHA-1740A/1742A/1744 Status Word The status word is a 16-bit structured field used to hold flags indicating how the command for the associated control block is completed. F E D C B E M C E A A 9 8 7 6 5 4 3 I S A I C D S N N S N H O C I S A T 2 1 0 Q D D F U O N Fields that are empty are reserved and will be set to zero.
EISA-to-Fast SCSI Host Adapter Flag Name and Function SC Specification Check Enhanced Mode Firmware Description The Specification Check flag (bit 4) indicates that the host adapter detected an error in the control block. If this bit is set to one, the host adapter has rejected the control block due to an error in one of the control block’s fields (i.e., unsupported operation code). No action is taken on the control block.
adaptec AHA-1740A/1742A/1744 Flag Name and Function SNS Sense Information Stored The Sense Information Stored flag (bit 9) indicates whether the target’s sense information has been stored in host memory pointed to by the address in the sense information pointer field. If this bit is set to one, the sense information data area for the associated control block contains the target’s sense data.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Host Adapter Status This 8-bit field contains additional error information pertaining to the host adapter or SCSI subsystem in general. This field is valid when the Command Done flag is set to zero and one of the following flags is set to one: Specification Check, Initialization Required, or Major Error/Exception.
adaptec AHA-1740A/1742A/1744 Code Description 04 Condition Met (For Search Data and Pre-Fetch SCSI Commands) 10 Intermediate (For Linked SCSI Commands) 14 Intermediate Condition Met 18 Reservation Conflict When this field contains 02 (check condition) and the Sense Information Stored flag (Status Word, bit 9) is set to zero, a state of contingent allegiance exists for the target. All outstanding operations for the associated target queued in the host adapter and/or the target is suspended.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description If Scatter/Gather was enabled for the associated control block, then this field contains the address of the data pointer in the Scatter/Gather list that was most recently used to transfer data. If Scatter/Gather was not enabled for the associated control block, then this field contains the address specified in the data pointer field of the control block.
adaptec AHA-1740A/1742A/1744 7 6 5 4 0 1 0 0 3 2 1 0 SCSI ID The SCSI ID specifies either the SCSI address of a particular target or initiator, or the SCSI address of the host adapter. The host adapter’s ID can be found in bits 3-0 of the SCSI Definition register. Multiple control blocks or chains of control blocks can be issued for a single SCSI ID. When the Attention register is written to, the host adapter is interrupted.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Download Firmware F 0 E D Options C B A 9 8 7 6 5 4 3 2 1 0 Byte Offset 0 0 0 0 0 0 0 0 1 0 0 1 00 Flag Word 1 02 Flag Word 2 04 06 Pointer to firmware 08 0A Length of firmware 0C 0E Status Block Pointer 10 12 14 16 18 1A 1C 1E 20 Checksum of Data 22 24 26 28 2A 2C 2E Fields that are empty are reserved and should be set to zero.
adaptec AHA-1740A/1742A/1744 After a Hard Reset, the host adapter will default to the firmware stored in its EEPROM. If the Configure flag (PORTADDR register, bit 6) is set to one, the host adapter will reject all commands (control block and immediate) other than a Download Firmware command. After receiving this command, the host adapter will download the firmware into its internal RAM as described above.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Initialize SCSI Subsystem F E D C B A 9 8 7 6 5 4 3 2 1 0 Byte Offset 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 00 Flag Word 1 02 04 06 Pointer to Initialization Configuration Data 08 0A Length of Initialization Configuration Data 0C 0E Status Block Pointer 10 12 14 16 18 1A 1C 1E 20 22 24 26 28 2A 2C 2E Fields that are empty are reserved and should be set to zero.
adaptec AHA-1740A/1742A/1744 field contains the number of bytes available to the host adapter. The maximum number of bytes read by the host adapter will be 32. If this command is not sent, the host adapter will use its default settings. After a Hard Reset, any configuration data sent prior to the reset will be lost and the settings will revert to their default state.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description All bits not defined above are ignored by the host adapter and may be set to either 0 or 1. The Disconnection Enable bit (least significant byte, bit 2) determines whether the host adapter will allow the specified target to disconnect during a SCSI operation. If the enable bit is one, then disconnection is allowed for that device. The default is disconnection enabled for all devices.
adaptec AHA-1740A/1742A/1744 Initiator SCSI Command F 0 E D C Options B A 9 8 7 6 5 4 3 2 1 0 Byte Offset 0 0 0 0 0 0 0 0 0 0 0 1 00 Flag Word 1 02 Flag Word 2 04 06 Data or Scatter/Gather List Pointer 08 0A Data or Scatter/Gather List Length 0C 0E Status Block Pointer 10 12 Chain Address 14 16 18 1A Sense Information Pointer CDB Length 1C 1E Sense Length 20 22 CDB Byte 1 CDB Byte 0 24 CDB Byte 3 CDB Byte 2 26 CDB Byte 5 CDB Byte 4 28 CDB Byte 7 CDB
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description No Operation F 0 E D Options C B A 9 8 7 6 5 4 3 2 1 0 Byte Offset 0 0 0 0 0 0 0 0 0 0 0 0 00 Flag Word 1 02 Flag Word 2 04 06 08 0A 0C 0E Status Block Pointer 10 12 Chain Address 14 16 18 1A 1C 1E 20 22 24 26 28 2A 2C 2E Fields that are empty are reserved and should be set to zero.
adaptec AHA-1740A/1742A/1744 If the SCSI ID specified in the Attention register specifies the SCSI address of a particular target, then this command is intended to queue an interrupt to signal a progress point in a chain of control blocks. Supported Options • • 6-28 Flag Word 1 - Chain No Error (bit 0), Disable Interrupt (bit 7) and Disable Status Block (bit 14) are supported. All other flags should be zero. Flag Word 2 - Logical Unit Number (bits 2-0) are supported. All other flags should be zero.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Read Host Adapter Inquiry Data F 0 E D Options C B A 9 8 7 6 5 4 3 2 1 0 Byte Offset 0 0 0 0 0 0 0 0 1 0 1 0 00 Flag Word 1 02 04 06 Destination Pointer of inquiry data 08 0A Length of inquiry data 0C 0E Status Block Pointer 10 12 14 16 18 1A 1C 1E 20 22 24 26 28 2A 2C 2E Fields that are empty are reserved and should be set to zero.
adaptec AHA-1740A/1742A/1744 number of bytes this command supports is 256. The host adapter may not transfer the total number of bytes allocated, therefore, the Suppress Error on Underrun flag (Flag Word 1, bit 10) should be set to one. Supported Options • • Flag Word 1 - Disable Interrupt (bit 7), Suppress Error on Underrun (bit 10) and Disable Status Block (bit 14) are supported. All other flags should be zero. Flag Word 2 - None of the options in Flag Word 2 are supported by this command.
EISA-to-Fast SCSI Host Adapter F E D C B Enhanced Mode Firmware Description A 9 8 7 6 5 4 3 2 1 0 Byte Offset SCSI Device Type 00 SCSI Support Level 02 No. of LUNs Additional Lng 04 Flags No. of CBs 06 Vendor Verification 08 0A 0C 0E Product Identification 10 12 14 16 Firmware Type 18 1A 1C 1E Firmware Revision Level 20 22 Release Date 24 26 28 2A Release Time 2C 2E 30 32 Firmware Checksum 34 Reserved 36 Reserved for Information on SSCI Peripherals . . .
adaptec AHA-1740A/1742A/1744 The SCSI device type word contains the following information. F E D C 0 B A 9 8 Reserved 7 6 5 4 3 2 1 0 0 T T 0 0 0 1 1 M M S D Bits 4-0 will be set to a value of 03 indicating that the host adapter is a processor type. Bit 5 indicates whether the host adapter is enabled for Target Mode. If this bit is zero, then Target Mode is enabled. Byte 5 specifies the number of LUNs the host adapter has enabled for Target Mode.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description 7 6 5 4 3 2 1 0 0 0 W S L D 0 0 I Y N I D N K F Bit 2 indicates whether the board SCSI electrical interface is Single-Ended/AHA1740A/1742A (bit reset) or Differential/AHA-1744 (bit set). Bit 3 indicates that the host adapter supports SCSI-linked commands and will always be set to one. Bit 4 indicates that the host adapter supports synchronous transfers and will always be set to one.
adaptec AHA-1740A/1742A/1744 Read Sense Information F E D C B A 9 8 7 6 5 4 3 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 0 Byte Offset 00 Flag Word 1 02 Flag Word 2 04 06 08 0A 0C 0E Status Block Pointer 10 12 14 16 18 1A Sense Information Pointer 1C 1E Sense Length 20 22 24 26 28 2A 2C 2E Fields that are empty are reserved and should be set to zero. This Command causes the host adapter to issue a Request Sense command to the target.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description contingent allegiance was reported in the status block of the Initiator SCSI command, this command must be followed by a Resume command to release extended contingent allegiance. Supported Options • • Flag Word 1 - Suppress Error on Underrun (bit 10) and Disable Status Block (bit 14) are supported. All other flags should be zero. Flag Word 2 - Logical Unit Number (bits 2-0) and No Disconnect (bit 6) are supported.
adaptec AHA-1740A/1742A/1744 Run Diagnostic Test F 0 E D Options C B A 9 8 7 6 5 4 3 2 1 0 Byte Offset 0 0 0 0 0 0 0 0 0 1 0 1 00 Flag Word 1 02 Write FIFO Data Pointer 04 06 Read FIFO Data Pointer 08 0A Test FIFO Data Length 0C 0E Status Block Pointer 10 12 14 16 18 1A 1C 1E 20 22 24 26 28 2A 2C 2E Fields that are empty are reserved and should be set to zero. This command causes the host adapter to perform certain diagnostic routines.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Value Meaning 000 Self-Test The host adapter performs a subset to its self-diagnostic routines that it normally performs at power-up. The two data pointer fields and the data length field is ignored. 001 Test FIFO The host adapter will transfer data from the address in the write FIFO data pointer field (least significant byte first) to its internal FIFO.
adaptec AHA-1740A/1742A/1744 Target SCSI Command F E D C B A 9 8 7 6 5 4 3 2 1 0 Byte Offset 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 00 Flag Word 1 02 Flag Word 2 04 06 Data or Scatter/Gather List Pointer 08 0A Data or Scatter/Gather List Length 0C 0E Status Block Pointer 10 12 14 16 18 1A Sense Information Pointer 1C 1E Sense Length 20 22 24 26 28 2A 2C 2E Fields that are empty are reserved and should be set to zero.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Supported Options • • Flag Word 1 - Scatter/Gather (bit 12) is supported. Suppress Error on Underrun (bit 10) should be used with care since the exact length of the transfer may not be known. Disable Status Block (bit 14) should also be used with care since the status block will return information regarding the actual command received.
adaptec AHA-1740A/1742A/1744 Control Block is Queued for Operation A control block is queued for operation when it has not yet initiated any activity on the SCSI bus. The host adapter will terminate the control block and place it on the interrupt queue. When the host is interrupted for this control block, the Enhanced Mode (Group 2) Interrupt Status register will report control block complete with error. The Mailbox In registers will contain the address of the aborted control block.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Asynchronous Event Notification An asynchronous event occurs when the host adapter detects an unexpected condition on the SCSI subsystem. Asynchronous Event Conditions • A SCSI bus reset has occurred • The host adapter was selected by another initiator The host adapter notifies the host of an asynchronous event via an interrupt.
adaptec AHA-1740A/1742A/1744 Host Adapter Selected by Another Initiator If the host adapter is selected by another initiator on the SCSI subsystem, the host adapter will respond as a processor-type target.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description 7 6 5 4 0 0 0 1 3 2 1 0 SCSI ID The SCSI ID specifies either the SCSI address of a particular target, or the SCSI address of the host adapter. The host adapter’s ID can be found in bits 3-0 of the SCSI Definition register. When the Attention register is written to, the host adapter is interrupted.
adaptec AHA-1740A/1742A/1744 completes, with or without error, and the host adapter has not yet issued the interrupt to the host. The action taken on the target depends on the setting of the Device Reset Option flag (byte 3, bit 2). If the Device Reset Option flag is set to zero, the host adapter will attempt to issue a bus device reset to the target. The host adapter will attempt to select the target with Attention and send a bus device reset message.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description returned will reflect that the command was aborted by the host adapter (error code = 05). Any commands received after the acknowledgment of the Asynchronous Event Notification interrupt will be operated on normally. Reset Host Adapter If the Attention register contains the SCSI ID of the host adapter, then this command is intended to reset the SCSI subsystem to a known state.
adaptec AHA-1740A/1742A/1744 Resume F E D C B A 9 8 7 6 5 4 3 2 1 0 Byte Offset 1 0 0 1 0 0 0 0 00 1 02 Fields that are empty are reserved and should be set to zero. This command is used to clear an extended contingent allegiance condition. The host adapter notifies the host that a target is in a state of extended contingent allegiance by setting bit 14 in the status word.
EISA-to-Fast SCSI Host Adapter Enhanced Mode Firmware Description Reset Initiated by the Host Adapter The host adapter will reset the bus if it encounters an error on a SCSI operation that it cannot recover from. Some examples include: the target goes to an invalid bus phase, the host adapter cannot force the target to go bus free when attempting to abort a command, or the host adapter cannot send a bus device reset message. After resetting the bus, the host adapter will perform the following sequence: 1.
adaptec AHA-1740A/1742A/1744 Asynchronous Event Notification interrupt will be returned with error status. The status returned will reflect that the command was aborted by the host adapter (error code: 05). Any commands received after the acknowledgment of the asynchronous event notification will be will be operated on normally.
Chapter Seven Onboard BIOS Interface Introduction The AHA-1740A/1742A/1744 BIOS operates in two different modes which correspond to the two possible firmware configurations. The two modes supported by the BIOS are Standard Mode (communicates with the adapter via the standard compatible interface) and the Enhanced (EISA) Mode (communicates with the adapter via the enhanced interface).
adaptec AHA-1740A/1742A/1744 attached SCSI devices depends on the number of standard hard disks installed directly on the system. No Standard Hard Disks Installed In this case, two SCSI drives can be supported by the AHA-1740A/1742A/1744 BIOS. SCSI target 0 Logical Unit Number (LUN) 0 is designated as drive 0 (drive C). Either SCSI target 0 LUN 1 or SCSI target 1 LUN 0 may be designated as drive 1 (drive D).
EISA-to-Fast SCSI Host Adapter Onboard BIOS Interface BIOS base address in the boards setup registers. In the case where the board is not functioning properly, the BIOS will display the message: Unable to initialize SCSI host adapter! and the BIOS will fail initialization. The failure will be flagged to the system via the BP register so that the system BIOS can halt system initialization until the user strikes a key (F1 on most systems). 2. The BIOS will normally reset the adapter.
adaptec AHA-1740A/1742A/1744 Other Changes The BIOS is interrupt driven in Enhanced Mode and fully supports Int 15h allowing operation with various write caching programs. The BIOS supports drives 80h on one board and 81h on the next board with both boards sharing the same interrupt. The BIOS also supports a new Interrupt 13h call to identify which Int 13h drives (80h and 81h) correspond to which host adapter and SCSI ID. Note that aspiedos.sys, afdisk.exe and aspidisk.
EISA-to-Fast SCSI Host Adapter Onboard BIOS Interface AHA-1740A/1742A CMOS configuration so the desired boot drive is the first drive found by the system. Interrupt 13h Interface Functionality Disk I/O requests are passed from the operating system to the BIOS through software interrupt 13h. CPU registers are used to pass a function code as well as the associated parameters for the function.
adaptec AHA-1740A/1742A/1744 system processor is in real mode. Because this is the case at system boot time and under normal DOS operation, simple segment arithmetic is normally used to convert ES:BX to a physical address usable by the AHA-1740A/1742A: Physical address = (Segment * 16) + Offset The 386 processor, however has given rise to a large number of software products which use the 386 memory management feature to provide virtual 8086 operation.
EISA-to-Fast SCSI Host Adapter Onboard BIOS Interface AH (Hex) Definition 11 ECC Corrected Data Error: Returned SCSI ASC: 17h - Recovered Read Error without ECC 18h - Recovered Read Error with ECC 20 General Controller Failure: Returned SCSI ASC: 01h 03h 05h 06h 07h 08h 09h 1Bh 1Ch 1Dh 40h 41h 42h 43h 44h 46h 47h 48h 49h 40 Seek Operation Failed: Returned SCSI ASC: 15h - Seek Positioning Error 02h - No Seek Complete 80 Time-out: Host adapter not responding to BIOS AA Device Not Ready: Returned
adaptec AHA-1740A/1742A/1744 The ID of the first supported drive is returned in BL. If an error code is returned (C is set) on this call, it indicates that the SCSI adapter BIOS is not in the Int 13h chain at all. No SCSI drives are supported by the BIOS. (AH) = 08h - Read Drive Parameters A SCSI Read Capacity command is used to determine the maximum logical block of the selected SCSI drive. This information is then used to calculate the proper number of cylinders to be returned to the host system.
EISA-to-Fast SCSI Host Adapter Onboard BIOS Interface The output of this function is defined as follows: Register Function AH Status of Operation DL 00h - Drive not present or invalid DL 03h - Fixed Disk Present 01h, 02h - Reserved CX Number of blocks on disk CF Return Code The following function codes are not supported by the AHA-1740A/1742A BIOS: (AH) = 05h Format Desired Cylinder (AH) = 06h Format Desired Cylinder and Set Bad Sector Flags (AH) = 07h Format Drive Starting at Desired Cylinder (
adaptec • AHA-1740A/1742A/1744 In Standard Mode, disk devices must be installed sequentially starting at target 0 Multiple Adapter Support When multiple SCSI adapters are installed, the BIOS should be enabled on all boards. Each BIOS is responsible for initializing the board on which it resides.
Appendix A Memory Cycle Timing Diagram AHA-1740A/1742A/1744 Timing Diagram A-1
adaptec AHA-1740A/1742A/1744 EISA Access Number Definition 1 EISA Standard Access (Start of Burst) 2 EISA Burst Access 3 EISA Burst Access with One Wait State 4, 5 EISA Burst Access 6 EISA Standard Access Parameter Table Note 1 ❏ A-2 Description Minimum1 Maximum1 1 LA addr, BE* <> delay from BCLK falling 2.0 45.0 2 MSBURST* delay from BCLK falling 0.0 35.0 3 SLBURST* setup to BDLK rising 15.0 4 SLBURST* held from BCLK rising 25.0 5 Data delay from BCLK rising (write) 2.
Appendix B Connector Pinout Internal Connector Pin Assignments AHA-1740A/1742A (Single-Ended) Signal Name Pin Pin Signal Name Ground 1 2 -DB(0) Ground 3 4 -DB(1) Ground 5 6 -DB(2) Ground 7 8 -DB(3) Ground 9 10 -DB(4) Ground 11 12 -DB(5) Ground 13 14 -DB(6) Ground 15 16 -DB(7) Ground 17 18 -DB(P) Ground 19 20 Ground Ground 21 22 Ground Ground 23 24 Ground Open 25 26 Term Power (Fused) Ground 27 28 Ground Ground 29 30 Ground Ground 31 32 -ATN
adaptec AHA-1740A/1742A/1744 AHA-1744 (Differential) Signal Name B-2 Pin Pin Signal Name Ground 1 2 Ground +DB(0) 3 4 -DB(0) +DB(1) 5 6 -DB(1) +DB(2) 7 8 -DB(2) +DB(3) 9 10 -DB(3) +DB(4) 11 12 -DB(4) +DB(5) 13 14 -DB(5) +DB(6) 15 16 -DB(6) +DB(7) 17 18 -DB(7) +DB(P) 19 20 -DB(P) DIFFSENS 21 22 Ground Reserved 23 24 Reserved Term Power (Fused) 25 26 Term Power (Fused) Reserved 27 28 Reserved +ATN 29 30 -ATN Ground 31 32 Ground +BSY 33 3
EISA-to-Fast SCSI Host Adapter Connector Pinout External Connector Pin Assignments AHA-1740A/1742A (Single-Ended) Signal Name Pin Pin Signal Name Ground 1 26 -DB(0) Ground 2 27 -DB(1) Ground 3 28 -DB(2) Ground 4 29 -DB(3) Ground 5 30 -DB(4) Ground 6 31 -DB(5) Ground 7 32 -DB(6) Ground 8 33 -DB(7) Ground 9 34 -DB(P) Ground 10 35 Ground Ground 11 36 Ground Ground 12 37 Reserved Open 13 38 Term Power (Fused) Ground 14 39 Reserved Ground 15 40 Gro
adaptec AHA-1740A/1742A/1744 AHA-1744 (Differential) Signal Name ❏ B-4 Pin Pin Signal Name Ground 1 26 Ground +DB(0) 2 27 -DB(0) +DB(1) 3 28 -DB(1) +DB(2) 4 29 -DB(2) +DB(3) 5 30 -DB(3) +DB(4) 6 31 -DB(4) +DB(5) 7 32 -DB(5) +DB(6) 8 33 -DB(6) +DB(7) 9 34 -DB(7) +DB(P) 10 35 -DB(P) DIFFSENS 11 36 Ground Reserved 12 37 Reserved Term Power (Fused) 13 38 Term Power (Fused) Reserved 14 39 Reserved +ATN 15 40 -ATN Ground 16 41 Ground +BSY 17
Appendix C Register Reference System Register Reference Expansion Board IDs Definition Signal EISA Slot Write/Read Host ID 0 HID0 zC80 R Host ID 1 HID1 zC81 R Host ID 2 HID2 zC82 R Expansion Board Control EBCTRL zC84 W/R zC88-zC9F W/R BMIC Registers Group 1 Definition Signal EISA Slot Write/Read I/O Port Address PORTADDR zCC0 W/R BIOS Address BIOSADDR zCC1 W/R Interrupt Definition INTDEF zCC2 W/R SCSI Definition SCSIDEF zCC3 W/R Bus Definition BUSDEF zCC4 W/R
adaptec AHA-1740A/1742A/1744 Definition Signal EISA Slot Write/Read Mailbox In Byte 2 MBOXIN2 zCDA R Mailbox In Byte 3 MBOXIN3 zCDB R Group 2 Status 2 G2STAT2 zCDC R Control Group 1 (Programmable Location) Definition Signal ISA Port Address Control Port CNTRL Base Address + 0 W Status Port STATUS Base Address + 0 R Command/Data CMD/DAT Base Address + 1 W/R System Interrupt INTRPT Base Address + 2 R Signal Address (hex) Write/Read Write/Read Local Control Registers Defini
EISA-to-Fast SCSI Host Adapter Register Reference Definition Signal Address (hex) Write/Read Local Mailbox In Byte 2 LMBOXIN2 3016 W Local Mailbox In Byte 3 LMBOXIN3 3017 W Local Group 2 Control LG2CNTRL 3018 W Local Group 2 Status LG2STAT 3019 R Local Group 2 Interrupt Status LG2INTST 301A W Local Group 2 Attention LATN 301C R Local Expansion Board Control LEXBCTL 3020 W Local Expansion Board Control LEXBCTL 3020 R Local Data Register LDAT 4000 W/R Local Index Regi
Appendix D EISA Free-Form Data SCSI Subsystem Data Structure SCSI Device Byte Bit Definitions 0 Bit 7 - Allow removable media in BIOS disk scan Bit 6 - More than 1 LUN supported Bit 5 - Parity check enable Bit 4 - Send start command Bit 3 - Synchronous negotiation enable Bit 2 - Disconnection enable Bit 1 - Ignore error if device not present Bit 0 - Enable disk BIOS support 0 1 Bits 7-3 Reserved Bits 2-0 Maximum synchronous transfer rate 000 - 10.0 MBytes/second 001 - 6.67 MBytes/second 010 - 5.
adaptec 691 south milpitas blvd. • milpitas, ca 95035 • (408)945-8600 STOCK NO.: 510208-00 Rev.