Source to bsd/dev/ppc/drvSymbios8xx/Sym8xxScript.ss


Enter a symbol's name here to quickly find it.

;   Copyright: 1997, 1998 by Apple Computer, Inc., all rights reserved.
;
;   File Ownership:
;
;       DRI:            Mike Johnson
;
;       Other Contact:  Russ Berkoff
;
;       Technology:     SCSI
;
;   Writers:
;
;       (MLJ)   Mike Johnson
;       (RRA)   Rick Auricchio


;       NCR Errata Listing 125 Item 1 : Clear the SCNTL0 start bit
;       when jump to reselect during select (try_reselect)
;
;       NCR Errata Listing 117 Item 4 : Bad parity if odd bytes during
;       wide transfer. Only for DATA OUT in Initiator mode.
;       (Confirm by Manfred Eierle 3rd June 93 not during DATA IN)

    ARCH     825A                ;specifically for 825a and 875 (new instructions)


        ;*****************************************************************
        ;
        ;   Phase codes - These values represent which action is being handled
        ;
        ;*****************************************************************

    ABSOLUTE kphase_DATA_OUT                = 0x00
    ABSOLUTE kphase_DATA_IN                 = 0x01
    ABSOLUTE kphase_COMMAND                 = 0x02
    ABSOLUTE kphase_STATUS                  = 0x03
    ABSOLUTE kphase_MSG_OUT                 = 0x06
    ABSOLUTE kphase_MSG_IN                  = 0x07
    ABSOLUTE kphase_SELECT                  = 0x08
    ABSOLUTE kphase_RESELECT                = 0x09
    ABSOLUTE kphase_ABORT_CURRENT           = 0x0A
    ABSOLUTE kphase_ABORT_MAILBOX           = 0x0B
    ABSOLUTE kphase_CMD_COMPLETE            = 0x0C
    ABSOLUTE kphase_DISCONNECT              = 0x0D
    ABSOLUTE kphase_saveDataPointer         = 0x0E  ; ??? driver work to be done
    ABSOLUTE kphase_restoreDataPointer      = 0x0F  ; ??? driver work to be done


        ;*****************************************************************
        ;   interrupt codes
        ;*****************************************************************

    ABSOLUTE unknown_phase              = 0x00  ; A spurious phase on SCSI Bus
    ABSOLUTE status_error               = 0x01  ; IO completes, but with status error
    ABSOLUTE unexpected_msg             = 0x02  ; An 'unknown' message is in ld_message var
    ABSOLUTE unexpected_ext_msg         = 0x03  ; An 'unknown' extended message in ld_message
    ABSOLUTE wide_32_not_supported      = 0x04  ; The device wants 32 bits data phase
    ABSOLUTE no_msgin_after_reselect    = 0x05  ; No message-in after reselection
    ABSOLUTE reqack_too_large           = 0x06  ; The device answer ReqAck offset is greater than 8
    ABSOLUTE unknown_reselect           = 0x07  ; The valid bit in SFBR reg not set
    ABSOLUTE unallocated_nexus          = 0x08  ; nexus index -> 0xFFFFFFFF
    ABSOLUTE abort_mailbox              = 0x09  ; Abort/BDR mailbox completed
    ABSOLUTE abort_current              = 0x0A  ; Abort/BDR current op completed
    ABSOLUTE unknown_message_out        = 0x0B  ; Unknown phase before message out
    ABSOLUTE unknown_msg_reject         = 0x0C  ; Unknown message reject
    ABSOLUTE negotiateSDTR              = 0x0D  ; Sync negotiation rx'd
    ABSOLUTE negotiateWDTR              = 0x0E  ; Wide negotiation rx'd
    ABSOLUTE sglist_complete            = 0x0F  ; SGList complete


        ;*****************************************************************
        ;
        ; Data structure for T/L/Q Nexus:
        ;
        ;*****************************************************************

    ABSOLUTE TLQ_SCSI_ID    =  0    ;  4 SCSI ID et al for SELECT instruction
    ABSOLUTE TLQ_xferAdr    =  4    ;  4 Physical address of CHMOV instructions
    ABSOLUTE TLQ_MSGOp      =  8    ;  8 Byte count, data adr   -> TLQ_MSGO
    ABSOLUTE TLQ_CDBp       = 16    ;  8 Byte count, data adr   -> TLQ_CDB
    ABSOLUTE TLQ_CDP        = 24    ;  4 Current Data Pointer
    ABSOLUTE TLQ_SDP        = 28    ;  4 Saved   Data Pointer
    ABSOLUTE TLQ_index      = 32    ;  1 index into nexus array
    ABSOLUTE TLQ_xferStarted= 33    ;  1 transfer started flag
    ABSOLUTE TLQ_IWR        = 34    ;  1 flag to Ignore Wide Residue
    ABSOLUTE TLQ_pad        = 35    ;  1 pad byte


        ;*****************************************************************
        ;
        ; ENTRY declarations - Declare entry points for driver
        ;
        ;*****************************************************************

    ENTRY   select_phase
    ENTRY   phase_handler
    ENTRY   issueMessageOut         ; for negotiation and Reject messages
    ENTRY   issueAbort_BDR          ; to immediately Abort or Bus-Device-Reset
    ENTRY   clearACK                ; MsgIn done - clr ACK, jump to phase handler


        ;*****************************************************************
        ;
        ; Define local data structure at start of SCRIPTS.
        ; This structure is allocated by the following nops.