📄 aic79xx.reg
字号:
register SEECTL { address 0x0BE access_mode RW modes M_SCSI mask SEEOPCODE 0x70 mask SEEOP_ERASE 0x70 mask SEEOP_READ 0x60 mask SEEOP_WRITE 0x50 /* * The following four commands use special * addresses for differentiation. */ mask SEEOP_ERAL 0x40 mask SEEOP_EWEN 0x40 mask SEEOP_WALL 0x40 mask SEEOP_EWDS 0x40 bit SEERST 0x02 bit SEESTART 0x01}const SEEOP_ERAL_ADDR 0x80const SEEOP_EWEN_ADDR 0xC0const SEEOP_WRAL_ADDR 0x40const SEEOP_EWDS_ADDR 0x00/* * SCB Counter */register SCBCNT { address 0x0BF access_mode RW modes M_SCSI}/* * Data FIFO Write Address * Pointer to the next QWD location to be written to the data FIFO. */register DFWADDR { address 0x0C0 access_mode RW size 2 modes M_DFF0, M_DFF1}/* * DSP Filter Control */register DSPFLTRCTL { address 0x0C0 access_mode RW modes M_CFG bit FLTRDISABLE 0x20 bit EDGESENSE 0x10 mask DSPFCNTSEL 0x0F}/* * DSP Data Channel Control */register DSPDATACTL { address 0x0C1 access_mode RW modes M_CFG bit BYPASSENAB 0x80 bit DESQDIS 0x10 bit RCVROFFSTDIS 0x04 bit XMITOFFSTDIS 0x02}/* * Data FIFO Read Address * Pointer to the next QWD location to be read from the data FIFO. */register DFRADDR { address 0x0C2 access_mode RW size 2 modes M_DFF0, M_DFF1}/* * DSP REQ Control */register DSPREQCTL { address 0x0C2 access_mode RW modes M_CFG mask MANREQCTL 0xC0 mask MANREQDLY 0x3F}/* * DSP ACK Control */register DSPACKCTL { address 0x0C3 access_mode RW modes M_CFG mask MANACKCTL 0xC0 mask MANACKDLY 0x3F}/* * Data FIFO Data * Read/Write byte port into the data FIFO. The read and write * FIFO pointers increment with each read and write respectively * to this port. */register DFDAT { address 0x0C4 access_mode RW modes M_DFF0, M_DFF1}/* * DSP Channel Select */register DSPSELECT { address 0x0C4 access_mode RW modes M_CFG bit AUTOINCEN 0x80 mask DSPSEL 0x1F}const NUMDSPS 0x14/* * Write Bias Control */register WRTBIASCTL { address 0x0C5 access_mode WO modes M_CFG bit AUTOXBCDIS 0x80 mask XMITMANVAL 0x3F}const WRTBIASCTL_CPQ_DEFAULT 0x97/* * Receiver Bias Control */register RCVRBIOSCTL { address 0x0C6 access_mode WO modes M_CFG bit AUTORBCDIS 0x80 mask RCVRMANVAL 0x3F}/* * Write Bias Calculator */register WRTBIASCALC { address 0x0C7 access_mode RO modes M_CFG}/* * Data FIFO Pointers * Contains the byte offset from DFWADDR and DWRADDR to the current * FIFO write/read locations. */register DFPTRS { address 0x0C8 access_mode RW modes M_DFF0, M_DFF1}/* * Receiver Bias Calculator */register RCVRBIASCALC { address 0x0C8 access_mode RO modes M_CFG}/* * Data FIFO Debug Control */register DFDBCTL { address 0x0C8 access_mode RW modes M_DFF0, M_DFF1 bit DFF_CIO_WR_RDY 0x20 bit DFF_CIO_RD_RDY 0x10 bit DFF_DIR_ERR 0x08 bit DFF_RAMBIST_FAIL 0x04 bit DFF_RAMBIST_DONE 0x02 bit DFF_RAMBIST_EN 0x01}/* * 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 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 bit PERRORDIS 0x80 bit PAUSEDIS 0x40 bit FAILDIS 0x20 bit FASTMODE 0x10 bit BRKADRINTEN 0x08 bit STEP 0x04 bit SEQRESET 0x02 bit LOADRAM 0x01}/* * Sequencer Control 1 * Instruction RAM Diagnostics */register SEQCTL1 { address 0x0D7 access_mode RW bit OVRLAY_DATA_CHK 0x08 bit RAMBIST_DONE 0x04 bit RAMBIST_FAIL 0x02 bit RAMBIST_EN 0x01}/* * Sequencer Flags * Zero and Carry state of the ALU. */register FLAGS { address 0x0D8 access_mode RO bit ZERO 0x02 bit CARRY 0x01}/* * Sequencer Interrupt Control */ register SEQINTCTL { address 0x0D9 access_mode RW bit INTVEC1DSL 0x80 bit INT1_CONTEXT 0x20 bit SCS_SEQ_INT1M1 0x10 bit SCS_SEQ_INT1M0 0x08 mask INTMASK 0x06 bit 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 bit 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 } REG2 { size 2 } SG_STATE { size 1 bit SEGS_AVAIL 0x01 bit LOADING_NEEDED 0x02 bit 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 } LONGJMP_SCB { 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 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 bit PRELOADEN 0x80 bit WIDEODD 0x40 bit SCSIEN 0x20 bit SDMAEN 0x10 bit SDMAENACK 0x10 bit HDMAEN 0x08 bit HDMAENACK 0x08 bit DIRECTION 0x04 /* Set indicates PCI->SCSI */ bit FIFOFLUSH 0x02 bit FIFORESET 0x01 } SEQ_FLAGS { size 1 bit NOT_IDENTIFIED 0x80 bit TARGET_CMD_IS_TAGGED 0x40 bit NO_CDB_SENT 0x40 bit DPHASE 0x20 /* Target flags */ bit TARG_CMD_PENDING 0x10 bit CMDPHASE_PENDING 0x08 bit DPHASE_PENDING 0x04 bit SPHASE_PENDING 0x02 bit 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 bit CDI 0x80 bit IOI 0x40 bit MSGI 0x20 mask PHASE_MASK CDI|IOI|MSGI mask P_DATAOUT 0x00 mask P_DATAIN IOI mask P_DATAOUT_DT P_DATAOUT|MSGO mask P_DATAIN_DT P_DATAIN|MSGO mask P_COMMAND CDI mask P_MESGOUT CDI|MSGI mask P_STATUS CDI|IOI mask P_MESGIN CDI|IOI|MSGI mask P_BUSFREE 0x01 } /* * 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 bit MANUALCTL 0x40 bit ENSELI 0x20 bit ENRSELI 0x10 mask MANUALP 0x0C bit ENAUTOATNP 0x02 bit ALTSTIM 0x01 } /* * The initiator specified tag for this target mode transaction. */ INITIATOR_TAG { size 1 } SEQ_FLAGS2 { size 1 bit SCB_DMA 0x01 bit TARGET_MSG_PENDING 0x02 bit SELECTOUT_QFROZEN 0x04 } /* * 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 } SCB_RESIDUAL_SGPTR { size 4 alias SCB_CDB_PTR mask SG_ADDR_MASK 0xf8 /* In the last byte */ bit SG_OVERRUN_RESID 0x02 /* In the first byte */ bit SG_LIST_NULL 0x01 /* In the first byte */ } SCB_SCSI_STATUS { size 1 } 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_CDB_LEN { size 1 bit SCB_CDB_LEN_PTR 0x80 /* CDB in host memory */ } SCB_TASK_MANAGEMENT { size 1 } SCB_TAG { size 2 } SCB_NEXT { alias SCB_NEXT_SCB_BUSADDR size 2 } SCB_NEXT2 { size 2 } SCB_DATAPTR { size 8 } SCB_DATACNT { /* * The last byte is really the high address bits for * the data address. */ size 4 bit SG_LAST_SEG 0x80 /* In the fourth byte */ mask SG_HIGH_ADDR_BITS 0x7F /* In the fourth byte */ } SCB_SGPTR { size 4 bit SG_STATUS_VALID 0x04 /* In the first byte */ bit SG_FULL_RESID 0x02 /* In the first byte */ bit SG_LIST_NULL 0x01 /* In the first byte */ } SCB_CONTROL { size 1 bit TARGET_SCB 0x80 bit DISCENB 0x40 bit TAG_ENB 0x20 bit MK_MESSAGE 0x10 bit STATUS_RCVD 0x08 bit DISCONNECTED 0x04 mask SCB_TAG_TYPE 0x03 } SCB_SCSIID { size 1 mask TID 0xF0 mask OID 0x0F } SCB_LUN { size 1 mask LID 0xff } SCB_TASK_ATTRIBUTE { size 1 alias SCB_NONPACKET_TAG } SCB_BUSADDR { size 4 } SCB_DISCONNECTED_LISTS { size 16 }}/*********************************** Constants ********************************/const SEQ_STACK_SIZE 8const MK_MESSAGE_BIT_OFFSET 4const TID_SHIFT 4const TARGET_CMD_CMPLT 0xfeconst INVALID_ADDR 0x80#define SCB_LIST_NULL 0xffconst 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 0x7fconst HOST_MSG 0xff/* * The size of our sense buffers. * Sense buffer mapping can be handled in either of two ways. * The first is to allocate a dmamap for each transaction. * Depending on the architecture, dmamaps can be costly. The * alternative is to statically map the buffers in much the same * way we handle our scatter gather lists. The driver implements * the later. */const AHD_SENSE_BUFSIZE 256/* Target mode command processing constants */const CMD_GROUP_CODE_SHIFT 0x05const STATUS_BUSY 0x08const STATUS_QUEUE_FULL 0x28const STATUS_PKT_SENSE 0xFFconst TARGET_DATA_IN 1const SCB_TRANSFER_SIZE 48/* PKT_OVERRUN_BUFSIZE must be a multiple of 256 less than 64K */const PKT_OVERRUN_BUFSIZE 512/* * Downloaded (kernel inserted) constants */const SG_PREFETCH_CNT downloadconst SG_PREFETCH_CNT_LIMIT downloadconst SG_PREFETCH_ALIGN_MASK downloadconst SG_PREFETCH_ADDR_MASK downloadconst SG_SIZEOF downloadconst PKT_OVERRUN_BUFOFFSET download/* * BIOS SCB offsets */const NVRAM_SCB_OFFSET 0x2C
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -