📄 aic79xx.reg
字号:
address 0x0C8 access_mode RO modes M_CFG}/* * Data FIFO Backup Read Pointer * Contains the data FIFO address to be restored if the last * data accessed from the data FIFO was not transferred successfully. */register DFBKPTR { address 0x0C9 access_mode RW size 2 modes M_DFF0, M_DFF1}/* * Skew Calculator */register SKEWCALC { address 0x0C9 access_mode RO modes M_CFG}/* * Data FIFO Debug Control */register DFDBCTL { address 0x0CB access_mode RW modes M_DFF0, M_DFF1 field DFF_CIO_WR_RDY 0x20 field DFF_CIO_RD_RDY 0x10 field DFF_DIR_ERR 0x08 field DFF_RAMBIST_FAIL 0x04 field DFF_RAMBIST_DONE 0x02 field DFF_RAMBIST_EN 0x01}/* * Data FIFO Space Count * Number of FIFO locations that are free. */register DFSCNT { address 0x0CC access_mode RO size 2 modes M_DFF0, M_DFF1}/* * Data FIFO Byte Count * Number of filled FIFO locations. */register DFBCNT { address 0x0CE access_mode RO size 2 modes M_DFF0, M_DFF1}/* * Sequencer Program Overlay Address. * Low address must be written prior to high address. */register OVLYADDR { address 0x0D4 modes M_SCSI size 2 access_mode RW}/* * Sequencer Control 0 * Error detection mode, speed configuration, * single step, breakpoints and program load. */register SEQCTL0 { address 0x0D6 access_mode RW field PERRORDIS 0x80 field PAUSEDIS 0x40 field FAILDIS 0x20 field FASTMODE 0x10 field BRKADRINTEN 0x08 field STEP 0x04 field SEQRESET 0x02 field LOADRAM 0x01}/* * Sequencer Control 1 * Instruction RAM Diagnostics */register SEQCTL1 { address 0x0D7 access_mode RW field OVRLAY_DATA_CHK 0x08 field RAMBIST_DONE 0x04 field RAMBIST_FAIL 0x02 field RAMBIST_EN 0x01}/* * Sequencer Flags * Zero and Carry state of the ALU. */register FLAGS { address 0x0D8 access_mode RO field ZERO 0x02 field CARRY 0x01}/* * Sequencer Interrupt Control */ register SEQINTCTL { address 0x0D9 access_mode RW field INTVEC1DSL 0x80 field INT1_CONTEXT 0x20 field SCS_SEQ_INT1M1 0x10 field SCS_SEQ_INT1M0 0x08 field INTMASK2 0x04 field INTMASK1 0x02 field IRET 0x01}/* * Sequencer RAM Data Port * Single byte window into the Sequencer Instruction Ram area starting * at the address specified by OVLYADDR. To write a full instruction word, * simply write four bytes in succession. OVLYADDR will increment after the * most significant instrution byte (the byte with the parity bit) is written. */register SEQRAM { address 0x0DA access_mode RW}/* * Sequencer Program Counter * Low byte must be written prior to high byte. */register PRGMCNT { address 0x0DE access_mode RW size 2}/* * Accumulator */register ACCUM { address 0x0E0 access_mode RW accumulator}/* * Source Index Register * Incrementing index for reads of SINDIR and the destination (low byte only) * for any immediate operands passed in jmp, jc, jnc, call instructions. * Example: * mvi 0xFF call some_routine; * * Will set SINDEX[0] to 0xFF and call the routine "some_routine. */register SINDEX { address 0x0E2 access_mode RW size 2 sindex}/* * Destination Index Register * Incrementing index for writes to DINDIR. Can be used as a scratch register. */register DINDEX { address 0x0E4 access_mode RW size 2}/* * Break Address * Sequencer instruction breakpoint address address. */register BRKADDR0 { address 0x0E6 access_mode RW}register BRKADDR1 { address 0x0E6 access_mode RW field BRKDIS 0x80 /* Disable Breakpoint */}/* * All Ones * All reads to this register return the value 0xFF. */register ALLONES { address 0x0E8 access_mode RO allones}/* * All Zeros * All reads to this register return the value 0. */register ALLZEROS { address 0x0EA access_mode RO allzeros}/* * No Destination * Writes to this register have no effect. */register NONE { address 0x0EA access_mode WO none}/* * Source Index Indirect * Reading this register is equivalent to reading (register_base + SINDEX) and * incrementing SINDEX by 1. */register SINDIR { address 0x0EC access_mode RO}/* * Destination Index Indirect * Writing this register is equivalent to writing to (register_base + DINDEX) * and incrementing DINDEX by 1. */register DINDIR { address 0x0ED access_mode WO}/* * Function One * 2's complement to bit value conversion. Write the 2's complement value * (0-7 only) to the top nibble and retrieve the bit indexed by that value * on the next read of this register. * Example: * Write 0x60 * Read 0x40 */register FUNCTION1 { address 0x0F0 access_mode RW}/* * Stack * Window into the stack. Each stack location is 10 bits wide reported * low byte followed by high byte. There are 8 stack locations. */register STACK { address 0x0F2 access_mode RW}/* * Interrupt Vector 1 Address * Interrupt branch address for SCS SEQ_INT1 mode 0 and 1 interrupts. */register INTVEC1_ADDR { address 0x0F4 access_mode RW size 2 modes M_CFG}/* * Current Address * Address of the SEQRAM instruction currently executing instruction. */register CURADDR { address 0x0F4 access_mode RW size 2 modes M_SCSI}/* * Interrupt Vector 2 Address * Interrupt branch address for HST_SEQ_INT2 interrupts. */register INTVEC2_ADDR { address 0x0F6 access_mode RW size 2 modes M_CFG}/* * Last Address * Address of the SEQRAM instruction executed prior to the current instruction. */register LASTADDR { address 0x0F6 access_mode RW size 2 modes M_SCSI}register AHD_PCI_CONFIG_BASE { address 0x100 access_mode RW size 256 modes M_CFG}/* ---------------------- Scratch RAM Offsets ------------------------- */scratch_ram { /* Mode Specific */ address 0x0A0 size 8 modes 0, 1, 2, 3 REG0 { size 2 } REG1 { size 2 } REG_ISR { size 2 } SG_STATE { size 1 field SEGS_AVAIL 0x01 field LOADING_NEEDED 0x02 field FETCH_INPROG 0x04 } /* * Track whether the transfer byte count for * the current data phase is odd. */ DATA_COUNT_ODD { size 1 }}scratch_ram { /* Mode Specific */ address 0x0F8 size 8 modes 0, 1, 2, 3 LONGJMP_ADDR { size 2 } ACCUM_SAVE { size 1 }}scratch_ram { address 0x100 size 128 modes 0, 1, 2, 3 /* * Per "other-id" execution queues. We use an array of * tail pointers into lists of SCBs sorted by "other-id". * The execution head pointer threads the head SCBs for * each list. */ WAITING_SCB_TAILS { size 32 } WAITING_TID_HEAD { size 2 } WAITING_TID_TAIL { size 2 } /* * SCBID of the next SCB in the new SCB queue. */ NEXT_QUEUED_SCB_ADDR { size 4 } /* * head of list of SCBs that have * completed but have not been * put into the qoutfifo. */ COMPLETE_SCB_HEAD { size 2 } /* * The list of completed SCBs in * the active DMA. */ COMPLETE_SCB_DMAINPROG_HEAD { size 2 } /* * head of list of SCBs that have * completed but need to be uploaded * to the host prior to being completed. */ COMPLETE_DMA_SCB_HEAD { size 2 } /* Counting semaphore to prevent new select-outs */ QFREEZE_COUNT { size 2 } /* * Mode to restore on legacy idle loop exit. */ SAVED_MODE { size 1 } /* * Single byte buffer used to designate the type or message * to send to a target. */ MSG_OUT { size 1 } /* Parameters for DMA Logic */ DMAPARAMS { size 1 field PRELOADEN 0x80 field WIDEODD 0x40 field SCSIEN 0x20 field SDMAEN 0x10 field SDMAENACK 0x10 field HDMAEN 0x08 field HDMAENACK 0x08 field DIRECTION 0x04 /* Set indicates PCI->SCSI */ field FIFOFLUSH 0x02 field FIFORESET 0x01 } SEQ_FLAGS { size 1 field NOT_IDENTIFIED 0x80 field NO_CDB_SENT 0x40 field TARGET_CMD_IS_TAGGED 0x40 field DPHASE 0x20 /* Target flags */ field TARG_CMD_PENDING 0x10 field CMDPHASE_PENDING 0x08 field DPHASE_PENDING 0x04 field SPHASE_PENDING 0x02 field NO_DISCONNECT 0x01 } /* * Temporary storage for the * target/channel/lun of a * reconnecting target */ SAVED_SCSIID { size 1 } SAVED_LUN { size 1 } /* * The last bus phase as seen by the sequencer. */ LASTPHASE { size 1 field CDI 0x80 field IOI 0x40 field MSGI 0x20 field P_BUSFREE 0x01 enum PHASE_MASK CDO|IOO|MSGO { P_DATAOUT 0x0, P_DATAIN IOO, P_DATAOUT_DT P_DATAOUT|MSGO, P_DATAIN_DT P_DATAIN|MSGO, P_COMMAND CDO, P_MESGOUT CDO|MSGO, P_STATUS CDO|IOO, P_MESGIN CDO|IOO|MSGO } } /* * Value to "or" into the SCBPTR[1] value to * indicate that an entry in the QINFIFO is valid. */ QOUTFIFO_ENTRY_VALID_TAG { size 1 } /* * Base address of our shared data with the kernel driver in host * memory. This includes the qoutfifo and target mode * incoming command queue. */ SHARED_DATA_ADDR { size 4 } /* * Pointer to location in host memory for next * position in the qoutfifo. */ QOUTFIFO_NEXT_ADDR { size 4 } /* * Kernel and sequencer offsets into the queue of * incoming target mode command descriptors. The * queue is full when the KERNEL_TQINPOS == TQINPOS. */ KERNEL_TQINPOS { size 1 } TQINPOS { size 1 } ARG_1 { size 1 mask SEND_MSG 0x80 mask SEND_SENSE 0x40 mask SEND_REJ 0x20 mask MSGOUT_PHASEMIS 0x10 mask EXIT_MSG_LOOP 0x08 mask CONT_MSG_LOOP_WRITE 0x04 mask CONT_MSG_LOOP_READ 0x03 mask CONT_MSG_LOOP_TARG 0x02 alias RETURN_1 } ARG_2 { size 1 alias RETURN_2 } /* * Snapshot of MSG_OUT taken after each message is sent. */ LAST_MSG { size 1 } /* * Sequences the kernel driver has okayed for us. This allows * the driver to do things like prevent initiator or target * operations. */ SCSISEQ_TEMPLATE { size 1 field MANUALCTL 0x40 field ENSELI 0x20 field ENRSELI 0x10 field MANUALP 0x0C field ENAUTOATNP 0x02 field ALTSTIM 0x01 } /* * The initiator specified tag for this target mode transaction. */ INITIATOR_TAG { size 1 } SEQ_FLAGS2 { size 1 field TARGET_MSG_PENDING 0x02 field SELECTOUT_QFROZEN 0x04 } ALLOCFIFO_SCBPTR { size 2 } /* * The maximum amount of time to wait, when interrupt coalescing * is enabled, before issueing a CMDCMPLT interrupt for a completed * command. */ INT_COALESCING_TIMER { size 2 } /* * The maximum number of commands to coalesce into a single interrupt. * Actually the 2's complement of that value to simplify sequencer * code. */ INT_COALESCING_MAXCMDS { size 1 } /* * The minimum number of commands still outstanding required * to continue coalescing (2's complement of value). */ INT_COALESCING_MINCMDS { size 1 } /* * Number of commands "in-flight". */ CMDS_PENDING { size 2 } /* * The count of commands that have been coalesced. */ INT_COALESCING_CMDCOUNT { size 1 } /* * Since the HS_MAIBOX is self clearing, copy its contents to * this position in scratch ram every time it changes. */ LOCAL_HS_MAILBOX { size 1 } /* * Target-mode CDB type to CDB length table used * in non-packetized operation. */ CMDSIZE_TABLE { size 8 }}/************************* Hardware SCB Definition ****************************/scb { address 0x180 size 64 modes 0, 1, 2, 3 SCB_RESIDUAL_DATACNT { size 4 alias SCB_CDB_STORE alias SCB_HOST_CDB_PTR } SCB_RESIDUAL_SGPTR { size 4 field SG_ADDR_MASK 0xf8 /* In the last byte */ field SG_OVERRUN_RESID 0x02 /* In the first byte */ field SG_LIST_NULL 0x01 /* In the first byte */ } SCB_SCSI_STATUS { size 1 alias SCB_HOST_CDB_LEN } SCB_TARGET_PHASES { size 1 } SCB_TARGET_DATA_DIR { size 1 } SCB_TARGET_ITAG { size 1 } SCB_SENSE_BUSADDR { /* * Only valid if CDB length is less than 13 bytes or * we are using a CDB pointer. Otherwise contains * the last 4 bytes of embedded cdb information. */ size 4 alias SCB_NEXT_COMPLETE } SCB_TAG { alias SCB_FIFO_USE_COUNT size 2 } SCB_CONTROL { size 1 field TARGET_SCB 0x80 field DISCENB 0x40 field TAG_ENB 0x20 field MK_MESSAGE 0x10 field STATUS_RCVD 0x08 field DISCONNECTED 0x04 field SCB_TAG_TYPE 0x03 } SCB_SCSIID { size 1 field TID 0xF0 field OID 0x0F } SCB_LUN { size 1 field LID 0xff } SCB_TASK_ATTRIBUTE { size 1 /* * Overloaded field for non-packetized * ignore wide residue message handling. */ field SCB_XFERLEN_ODD 0x01 } SCB_CDB_LEN { size 1 field SCB_CDB_LEN_PTR 0x80 /* CDB in host memory */ } SCB_TASK_MANAGEMENT { size 1 } SCB_DATAPTR { size 8 } SCB_DATACNT { /* * The last byte is really the high address bits for * the data address. */ size 4 field SG_LAST_SEG 0x80 /* In the fourth byte */ field SG_HIGH_ADDR_BITS 0x7F /* In the fourth byte */ } SCB_SGPTR { size 4 field SG_STATUS_VALID 0x04 /* In the first byte */ field SG_FULL_RESID 0x02 /* In the first byte */ field SG_LIST_NULL 0x01 /* In the first byte */ } SCB_BUSADDR { size 4 } SCB_NEXT { alias SCB_NEXT_SCB_BUSADDR size 2 } SCB_NEXT2 { size 2 } SCB_SPARE { size 8 alias SCB_PKT_LUN } SCB_DISCONNECTED_LISTS { size 8 }}/*********************************** Constants ********************************/const MK_MESSAGE_BIT_OFFSET 4const TID_SHIFT 4const TARGET_CMD_CMPLT 0xfeconst INVALID_ADDR 0x80#define SCB_LIST_NULL 0xff#define QOUTFIFO_ENTRY_VALID_TOGGLE 0x80const CCSGADDR_MAX 0x80const CCSCBADDR_MAX 0x80const CCSGRAM_MAXSEGS 16/* Selection Timeout Timer Constants */const STIMESEL_SHIFT 3const STIMESEL_MIN 0x18const STIMESEL_BUG_ADJ 0x8/* WDTR Message values */const BUS_8_BIT 0x00const BUS_16_BIT 0x01const BUS_32_BIT 0x02/* Offset maximums */const MAX_OFFSET 0xfeconst MAX_OFFSET_PACED 0xfeconst MAX_OFFSET_PACED_BUG 0x7f/* * Some 160 devices incorrec
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -