Google
 

Trailing-Edge - PDP-10 Archives - cuspbinsrc_2of2_bb-fp63b-sb - 10,7/spear/rfb.eye
There are 8 other files named rfb.eye in the archive. Click here to see a list.
!++
! FILE: RFB.EYE				VERSION: 1(7)
!
! FACILITY: Definition file for ReFormat Blocks (RFB)
!
! FUNCTIONAL DESCRIPTION:
!
!	Contains the definitions of the RFBs.  Compiled into a library
!	with ITRANS and BLISS /lib for use when compiling RETRFB.BLI.
!	Also used as a text input file at runtime by LDRFB.B36.
!
! ENVIRONMENT: Used with SPEAR - Retrieve on TOPS-20 operating systems.
!
! AUTHOR: Scott Sitterly		CREATION DATE: 7-DEC-82
!
! MODIFIED BY:
!
!  Version  1
!   Edit
!     0  SS  12/ 7/82 - - Development started for KLIPA events.
!     1  SS  12/ 9/82 - - Added Diagnostic events.
!     2  PB   1/17/83 - - Added this header and made some minor changes.
!     3  SS   1/18/83 - - Put RFBs in numerical order
!     4  SS   1/18/83 - - Added HSC Error events
!     5  SS   1/02/83 - - Added HSC End events
!     6	 PB   5/12/83 - - Fixed some CI definitions problems
!     7	 PB   2/23/84 - - Enable definitions for TOPS-10
!--

!++
!
! COPYRIGHT (C) 1982, 1983, 1984
! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACUSETTS 01754
!
! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
! ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH LICENSE AND WITH THE
! INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY  OTHER
! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
! OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE  SOFTWARE  IS  HEREBY
! TRANSFERED.
!
! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT  NOTICE
! AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
! CORPORATION.
!
! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY  OF  ITS
! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
!
!--

!++
!
!	REFORMATED BUFFER HEADER DEFINITIONS
!
!--
RFB TOPS10 TOPS20
 000 RFB_HDR_WRD
  HDR_TYPE		0	15-23	! type of block
  HDR_SUBTYPE		0	24-26	! block sub type
  BLOCK_LENGTH		0	27-35	! lenght of block
END RFB

!++
!
!	TOPS-10 / TOPS-20	HEADER DEFINITIONS
!
!--
RFB TOPS10 TOPS20
 001 EVENT_HEADER
  HDR_WRD_0		1	0-35	! Header word 0
  ENTRY_TYPE		1	0-8	! TOPS-10 / TOPS-20 entry type
! Unused		1	9-14	! Reserved
  RETRIEVE_EXTRACT	1	15	! Entry extracted by RETRIEVE
  CRASH_EXTRACT		1	16	! Entry extracted from a crash
  TOPS20_REC		1	17	! Entry recorded by TOPS-20
  BODY_FORMAT		1	18-20	! 0 before TOPS-20 v5
					! 1 with TOPS-20 v5
  HDR_FORMAT		1	21-23	! 1 before TOPS-10 v7.02
					! 2 with TOPS-10 v7.02
  HDR_LENGTH		1	24-26	! 4 for Header format 1
					! 5 for Header format 2
  ENTRY_LENGTH		1	27-35	! Length of MAIN entry excluding HEADER
  ENTRY_DATE_TIME	2	0-35	! Date/Time in universal format
					!  LH = Days since 17 Nov 1858
					!  RH = Fractional part of day
					!   TOPS-10  Local reference
					!   TOPS-20  GMT reference
  SYS_UPTIME		3	0-35	! Time since the system started in
					!  universal format
  SYS_SER_NUM		4	0-35	! System serial number (decimal)
  RDFILE_SEQNUM		5	0	! Sequence # was generated by RDFILE
! Unused		5	1-8	! Reserved - 0
  SEQUENCE_NUMBER	5	9-35	! Unique record sequence number
END RFB

!++
!
!	TIME OF OCCURRENCE
!
!--
RFB TOPS10 TOPS20
 002 TIME_OCCUR
  TIME_OCCUR		1	0-35	! date and time of occurrence
END RFB

!++
!
!  microcode loaded event (code 073, tops10)
!
!--
RFB TOPS10
 073 UC_LOADED
  UC_CODE		1	12-17	! LOAD ERROR CODE
  UC_OFFSET		1	18-35	! OFFSET INTO BOOTSTRAP VECTOR
  UC_DEV		2	0-17	! DEVICE CODE
  UC_UNIT		2	18-35	! UNIT NUMBER
  UC_INTER		3	0-35	! SIXBIT INTERFACE NAME
  UC_CHAN		4	0-35	! SIXBIT CHANNEL NAME
  UC_MVR		5	0-35	! MINIMUM UCODE VERSION
  UC_DTM		6	0-35	! DATE-TIME OF LOAD
  UC_VER		7	0-35	! UCODE VERSION LOADED
END RFB

WORD_10 TOPS10 
 UC_CODE
   $CTR_UC_CODE			12-17
				\V   1 'Loading Disabled'
				\V   2 'No Code Available'
				\V   3 'Wrong Version'
				\V   4 'Load Error'
				\V   5 'Verify Error'
				\V   6 'Microprocessor Check'
				\V   7 'CRAM Load Error'
				\V   8 'CRAM Verify Error'
				\V   9 'DRAM Load Error'
				\V   10 'DRAM Verify Error'
END WORD_10

!++
!	The following is writen by TOPS-10 when it detects
!	a software detected error in the disk subsystem such as a checksum
!	failure or RIB error
!--
RFB TOPS10
 074	SFTWR_DISK_ERROR
  SOF_NAME		1	0-35	! SIXBIT UNIT NAME
  SOF_PACK		2	0-35	! SIXBIT PACK ID(HOME BLOCK)
  SOF_STR		3	0-35	! SIXBIT STRUCTURE NAME
  SOF_LBN		4	0-35	! LBN
  SOF_RETRY		5	18-35	! RETRY COUNT
  SOF_CN1		6	0-35	! 1ST SET OF SOFTWARE COUNTS
  SOF_CN2		7	0-35	! 2ND
  SOF_CN3		8	0-35	! 3RD
  SOF_FILE		9	0-35	! SIXBIT FILE NAME
  SOF_EXT		10 	0-35	!   "      "  EXTENSION
  SOF_PPN		11	0-35	! P,PN
  SOF_PGM		12	0-35	! SIXBIT PROGRAM NAME
  SOF_CODE		13	0-35	! SOFTWARE ERROR CODE
END RFB

!++
!
!  DIAGNOSTIC ENTRY     (EVENT CODE 250)
!
!	DIAGNOSTIC RUN INFORMATION  (RFB)
!
!--
RFB TOPS10 TOPS20 
 010 DIAG_RUN_INFO
  DIAG_NAME             1	0-35 	! diagnostic name in sixbit
  DIAG_VER       	2	0-35 	! diagnostic version
  USER_PPN       	3	0-35 	! user project/programmer number
                                        ! -1 if not available
END RFB

!++
!
!	DIAGNOSTIC TEST RESULTS  (RFB)
!
!--
RFB TOPS10 TOPS20 
 011 DIAG_TEST_RESULTS
  FAILING_TEST_NAME     1	0-35 	! failing test name in sixbit
! RESERVED       	2	0-26 	! reserved
  STRING_OFFSET       	2	27-35 	! (3) points to 1st word of string
!                       3               ! test description in 7-bit asciz
END RFB

!++
!
!	RESPONDER STATISTICS  (RFB)
!
!--
RFB TOPS10 TOPS20 
 012 TIME_LAST_EVENT
  TIME_LAST_EVENT       1	0-35 	! date/time of last statistics event
END RFB


!++
!
!	RESPONDER STATISTICS  (RFB)
!
!--
RFB TOPS10 TOPS20 
 013 REPSOND_STAT
  PORT_NUM       	1	24-27 	! port number
! RESERVED       	1	0-23 	! reserved
! RESERVED         	1	27-31 	! reserved
  NODE_NUM       	1	32-35 	! node number
  NUM_CONNECT_ST        2       0-17    ! number of connects since started
  NUM_CONNECT_LA        2      18-35   ! number of connects since last entry
END RFB

!++
!
!	Misc. ASCII Text  (RFB)
!
!--
RFB TOPS10 TOPS20 
 014 MISC_ASCII_TEXT
! RESERVED       	1	0-26 	! reserved
  STRING_OFFSET       	1	27-35 	! (2) points to 1st word of string
!                       2               ! test description in 7-bit asciz
END RFB

!++
!	KLIPA Event  (CI or NI)  (Event Code 244)
!--

!++
!	KLIPA Summary
!--
RFB TOPS10 TOPS20 
 100 KLIPA_SUM
  CSR_REG		1	0-35	! CONI STATUS
   CSR_ERRORS		1	0-35 	!  For BTT of CSR Error bits only
  CRAM_ADDR		2	24-35	! CRAM address	
   CI_PLANNED_CPE	2	24-35	!  BTT for CI forced parity errors
   NI_PLANNED_CPE	2	24-35	!  BTT for NI forced parity errors
END RFB

!++
!	KLIPA COMMON DATA (RFB)
!--
RFB TOPS10 TOPS20  
 101 KLIPA_COMMON
  CSR_REG		1	0-35	! CONI STATUS
  UCODE_VER		2	18-35	! ucode version
  U_STATUS              3       0-35    ! 0 if continued
					! Date/time of last error if aborted
  CRAM_ADDR		4	24-35	! cram address
   CI_PLANNED_CPE	4	24-35	!  BTT for CI forced parity errors
   NI_PLANNED_CPE	4	24-35	!  BTT for NI forced parity errors
  CRAM_DATA_L		5	6-35	! left  30 bits of cram data
   CRAM_DATA_L1		5	6-20	! first 15 bits of cram data
   CRAM_DATA_L2		5	21-35	! next  15 bits of cram data
  CRAM_DATA_R		6	6-35	! right 30 bits of cram data
   CRAM_DATA_R1		6	6-20	! next  15 bits of cram data
   CRAM_DATA_R2		6	21-35	! last  15 bits of cram data
END RFB

!++
!	CHANNEL COMMON DATA (RFB)
!--
RFB TOPS10 TOPS20  
 102 CHAN_LOGO
  CHAN_LOGO0	        1       0-35    ! channel logout word 0
  CHAN_LOGO1	        2       0-35    ! channel logout word 1
  CHAN_LOGO2	        3       0-35    ! channel logout word 2
  CCW1			4	0-35	! first chan control word
END RFB

!++
!	KLIPA Statistics and counters
!++
RFB TOPS10 TOPS20
 103 KLIPA_STATS
  NI_FLAG		1	0	! NI20 or CI20
  KLIPA_CHAN		1	15-17	! KLIPA Channel #
  REASON		1	11-14	! Reason for counter entry
  PATH_A_ACK_CNT	2	0-35	! Path A ACK count
  PATH_A_NAK_CNT	3	0-35	! Path A NAK count
  PATH_A_NO_RESP_CNT	4	0-35	! Path A no response count
  PATH_B_ACK_CNT	5	0-35	! Path B ACK count
  PATH_B_NAK_CNT	6	0-35	! Path B NAK count
  PATH_B_NO_RESP_CNT	7	0-35	! Path B no response count
  DATAGRAM_DSCRD_CNT    8       0-35    ! Datagrams discarded
  PACKET_XMIT_CNT       9       0-35    ! Packets transmitted
  PACKET_RCVD_CNT       10      0-35    ! Packets recieved
  DESIGNATED_PORT       11      0-35    ! Designated port
  CRC_ERR_PKT_CNT       12      0-35    ! Packets received with CRC errors
  MVR_PAR_PRE_ERRS      13      0-17    !  ?
  CBUS_PAR_ERRS         13      18-35   
  REG_PLIPE_ERRS        14      0-17
  DATA_PLIPE_ERRS       14      18-35
  CHAN_ERRS             15      0-17
  EBUS_PAR_ERRS         15      18-35
  SPURR_CHAN_ERRS       16      0-17    ! Spurious Channel errors
  CBUS_AVAIL_TIMOUTS    16      18-35
  SPURR_RCV_ATT         17      0-17    ! Spurious receive attentions
  SPURR_XMIT_ATT        17      18-35   ! Spurious transmit Attentions
  XMIT_BUFF_PAR         18      0-17    ! Transmit buffer parity errs
  XMIT_TIMOUT           18      18-35   ! Transmit timeouts
END RFB

!++
!	RFB DEFINITIONS FOR HSC50 ENTRIES
!--

!++
!	ERROR Common data RFB (FORMAT = ALL)
!--

RFB TOPS10 TOPS20
 110 HSC_ERROR_COMMON                   ! common data
  KLIPA_PORT		1	0-17	! KLIPA port #
  HSC_NODE		1	18-35	! HSC50 node #
  CMD_REF_NUM		2	4-35	! Command reference number, 4 bytes
					!  0 if no related command
  CMD_REF_NUM_T20	3	4-35	! Command reference number, 36bit style
  SEQUENCE_NUM		4	4-19	! Error log sequence number, 2 bytes
  FORMAT		5	28-35	! Error log message format
  FLAGS                 5	20-27	! Error log message flags
  STATUS_EVENT_CODE	5	4-19	! Specific error or event code, 2 bytes
  CNTLR_ID_L            6	4-35	! Controller identifier - low 4 bytes
  CNTLR_ID_H            7	4-35	! Controller identifier - high 4 bytes
    CNTLR_DEV_NUM_L	6	4-35    ! Unique device number - low 4 bytes
    CNTLR_DEV_NUM_H	7	20-35   ! Unique device number - high 2 bytes
    CNTLR_MODEL         7       12-19   ! Controller model 
    ID_CLASS	        7       4-11    ! Controller class
  CSVRSN		8	28-35	! Controller software (ucode) version
  CHVRSN                8	20-27	! Controller hardware revision number
END RFB

!++
!	ERROR - HOST MEMORY ACCESS (FORMAT = 1)
!--
RFB TOPS10 TOPS20
 112 HOST_MEM_ADDR
  HOST_MEM_ADDR		1	 4-35	! host memory address
END RFB

!++
!	ERROR unit id RFB (FORMAT = 2, 3, or 4)
!--

RFB TOPS10 TOPS20
 113 UNIT_ID                            ! Unit ID data 
  UNIT_NUMBER		1	20-35	! Unit being accessed (decimal) 2 bytes
					!  0 if no specific unit
  MULTI_UNIT_CODE       1	4-19	! Code for related unit, 2 bytes
  UNIT_ID_L             2	4-35	! Unit identifier - low 4 bytes
  UNIT_ID_H             3	4-35	! Unit identifier - high 4 bytes
    UNIT_DEV_NUM_L	2	4-35    ! Unique device number - low 4 bytes
    UNIT_DEV_NUM_H	3	20-35   ! Unique device number - high 2 bytes
    UNIT_MODEL          3       12-19   ! Unit model 
    ID_CLASS	        3       4-11    ! Unit class
  USVRSN		4	28-35	! Unit software (ucode) version
  UHVRSN                4	20-27	! Unit hardware revision number
  VOL_SERIAL_NUM        5       4-35    ! Low order 32 bits of S/N, 4 bytes
END RFB

!++
!	ERROR - DISK TRANSFER RFB (FORMAT = 2)
!--

RFB TOPS10 TOPS20
 114 DISK_TRANSFER
  LEVEL			1        12-19  ! error recovery level
  DSK_RETRY		1        4-11   ! number of retries
  HEADER_CODE		2        4-35	! header code & lbn or rbn
  LRBN			2        8-35   ! if code = 0110 rbn, otherwise lbn
END RFB


!++
!	ERROR - SDI RFB (FORMAT = 3)
!--

RFB TOPS10 TOPS20
 115 SDI_CNTLR
  HEADER_CODE		1        4-35	! header code & lbn or rbn
  LRBN			1        8-35   ! if code = 0110 rbn, otherwise lbn
  SDI_WRD_1		2	 4-35	! GET STATUS bytes 4-7
    REQUEST_BYTE	2	28-35	! Byte	4
    MODE_BYTE		2	20-27	! 	5
    ERROR_BYTE		2	12-19	!	6
    CONTROLLER_BYTE	2	 4-11	!	7
  SDI_WRD_2		3	 4-35	! GET STATUS bytes 8-11
    RETRY$FAILURE	3	28-35	! Byte	8
END RFB

!+
!	GET STATUS bytes for DRIVE
!-

RFB TOPS10 TOPS20
 116 SDI_DRIVE
  SDI_WRD_2		3	 4-35	! GET STATUS bytes 8-11 - RA80/RA81
    LAST_POSITION_CMD	3	20-27	! 	9
    SDI_ERROR_STATUS	3	12-19	!	10
    LAST_SEEK_CYL_LO	3	 4-11	!	11
  SDI_WRD_3		4	 4-35	! GET STATUS bytes 12-15
    LAST_SEEK_CYL_HI	4	28-35	! Byte	12
    RA81_R_W_HEAD	4	20-27	! 	13 (RA81 Group Address)
    MICROPROCESSOR_LEDS	4	12-19	!	14
    FRONTPANEL_FAULT_CODE 4	 4-11	!	15

! SDI_WRD_2		3	 4-35	! GET STATUS bytes 8-11 - RA60
    PREVIOUS_CYL	3	12-27	! Bytes	9-10
    PREVIOUS_HEAD	3	 4-11	!	11
! SDI_WRD_3		4	 4-35	! GET STATUS bytes 12-15
    CURRENT_CYL		4	20-35	! Bytes	12-13
    CURRENT_HEAD	4	12-19	!	14
    ERROR_CODE		4	 4-11	!	15
END RFB

!++
!	ERROR - SMALL DISK RFB (FORMAT = 4)
!--

RFB TOPS10 TOPS20
 117 SMALL_DISK
  CYLINDER		1        4-19   ! cylinder
END RFB


!++
!	ERROR - CONTROLLER OR DISK DEPENDBENT INFO (FORMAT = 3,5)
!		       UNDEFINED_DATA  (32-bit data left justified)
!--

RFB TOPS10 TOPS20
 120 UNDEFINED_DATA
  UNDEF_DATA		1	 0-35	! whole word
  UNDEF_DATA_1		1        0-7    ! MSB
  UNDEF_DATA_2		1        8-15
  UNDEF_DATA_3		1        16-23
  UNDEF_DATA_4		1        24-31  ! LSB
  UNDEF_DATA_5		1        32-35  ! Unused 4 bits in 36-bit word
  FIRST_BYTE            2	 0-17	! first byte count
  LAST_BYTE             2	 18-35	! last byte count
END RFB


!++
!	MSCP ERROR     (Event type 245)
!--

RFB TOPS10 TOPS20
 121 MSCP_ERROR_RFB
  MSCP_STATUS		1	 4-35
END RFB


!++
!	Dummy RFB for "Untranslated Data" header
!--

RFB TOPS10 TOPS20
 122 UNTRANSLATED_DATA
  DUMMY			1	 4-35
END RFB


!++
!	Dummy RFB for "Extraneous Data" header
!--

RFB TOPS10 TOPS20
 123 EXTRANEOUS_DATA
  DUMMY			1	 4-35
END RFB


!++
!	Parameter blocks for HSC50 END 242 full style reports
!--

!++
!	END - Common data (ENDCODE = ALL)
!--

RFB TOPS10 TOPS20
 200 HSC_END_COMMON                     ! common data
  KLIPA_PORT		1	0-17	! KLIPA port #
  HSC_NODE		1	18-35	! HSC50 node #
  MEDIAID		2	0-35	! Media / volume ID in SIXBIT
  NUM_READS		3	0-35	! Blocks read from disk
					!  or frames read from tape
  NUM_WRITES		4	0-35	! Blocks written to disk
					!  or frames written to tape
  POSITION_AT_ERR_1	5	0-35	! File # in error for tape
                                        !  CYL in error for disk (NOTE: Not
                                        !  accurate for multiple requests)
  POSITION_AT_ERR_2	6	0-35	! Record # in error for tape
                                        !  SURF/SECT (LBN) for disk (NOTE: Not
                                        !  accurate for multiple requests)
  CMD_REF_NUM		7	4-35	! Command reference number, 4 bytes
  CMD_REF_NUM_T20	8	4-35	! Command reference number, 36bit style
  UNIT_NUMBER		9	20-35	! Unit being accessed (decimal) 2 bytes
  ENDCODE		10	28-35	! End message flag and command type
  END_FLAGS		10	20-27	! End flags (Error Log Gen = 40 octal)
  STATUS_EVENT_CODE	10	4-19	! Operation stat & err subcode, 2 bytes
END RFB


!++
!	END - Read or Write Command (ENDCODE = READ OR WRITE)
!--

RFB TOPS10 TOPS20
 201 READ_OR_WRITE_HSC
  BYTE_COUNT		1	4-35	! # of bytes successfully transferred
                                        !  host xfer byte cnt on tape, 4 bytes
  FIRST_BAD_BLOCK	2	4-35	! First bad block detected (if any) in
					!  disk transfer, 4 bytes
END RFB

!++
!	BTT definitions for KLIPA event (244)
!--

!++
!	KLIPA Command & Status Register (CSR)
!--

WORD_10  TOPS10 TOPS20
 CSR_REG
  $PORT_PRESENT		0
				\V    0	'No port'
				\V    1	'Port present'
  $DIAG_RQST_CSR	1
				\V    1	'DIAG RQST'
  $DIAG_CSR_CHNG	2
				\V    1	'CSR changed'
! Unused		3
  $RQST_EXAM_OR_DEP	4
				\V    1	'PI 00 interrupt request'
  $RQST_INTERRUPT	5
				\V    1	'PI 01-07 interrupt request'
  $CRAM_PAR_ERR		6
				\V    1	'CRAM parity error'
  $MBUS_ERR		7
				\V    1	'MBUS error'
! Unused		8-10
  $IDLE_LOOP		11
				\V    1	'Idle loop'
  $ENABLE_DISABLE	12-13
				\V    0	'Port cleared'
				\V    1	'Port enabled'
				\V    2	'Port disabled'
				\V    3	'Both enable & disable set'
! Unused		14
  $PORT_ID_CODE		15-17		! Should be 3 for a KLIPA
				\V    0	'No port ID code'
				\V    1	'Bad port ID code'
				\V    2	'Bad port ID code'
				\V    4	'Bad port ID code'
				\V    5	'Bad port ID code'
				\V    6	'Bad port ID code'
				\V    7	'Bad port ID code'
  $CLEAR_PORT		18
				\V    1	'Clear port'
  $DIAG_TEST_EBUF	19
				\V    1	'Test EBUF'
  $DIAG_GEN_EBUS_PE	20
				\V    1	'Generate EBUS parity error'
  $DIAG_SEL_LAR		21
				\V    1	'Select LAR'
  $DIAG_SINGLE_CYC	22
				\V    1	'Single cycle'
  $SPARE_23		23
				\V    1	'Spare bit 23 set'
  $EBUS_PARITY_ERR	24
				\V    1	'EBUS parity error'
  $FREE_QUEUE_ERR	25		! I think this was changed??
  $CHAN_ERR		26		! Was DATA PATH ERR
				\V    1	'Channel error'
  $CMD_QUEUE_AVAIL	27
				\V    1	'Command queue available'
  $RESP_QUEUE_AVAIL	28
				\V    1	'Response queue available'
! Unused		29
  $ENABLE_DISABLE_RQST	30-31
				\V    1	'Enable request'
				\V    2	'Disable request'
				\V    3	'Both enable & disable requests'
  $MPROC_RUN		32
				\V    0	'Microprocessor halted'
				\V    1	'Microprocessor running'
  $PIA			33-35
				\V    0	'PI 00'
				\V    1	'PI 01'
				\V    2	'PI 02'
				\V    3	'PI 03'
				\V    4	'PI 04'
				\V    5	'PI 05'
				\V    6	'PI 06'
				\V    7	'PI 07'
END WORD_10

!++
!	KLIPA CSR BIT DEFINITIONS IN TEXT (VALUES)
!	for CSR_ERRORS (ie Only the error bits)
!--

WORD_10  TOPS10 TOPS20
 CSR_ERRORS
  $CSR_ERRORS		0-35
				\V    0	'No CSR error indication'
  E$CRAM_PAR_ERR	6
				\V    1	'CRAM parity error'
  E$MBUS_ERR		7
				\V    1	'MBUS error'
  E$EBUS_PARITY_ERR	24
				\V    1	'EBUS parity error'
  E$CHAN_ERR		26		! Was DATA PATH ERR
				\V    1	'Channel error'
END WORD_10

!++
!	Translations for NI flag field
!--

WORD_10  TOPS10 TOPS20
 NI_FLAG
  $NI_FLAG		35
				\V    0	'CI20'
				\V    1	'NI20'
END WORD_10

!++
!	Translations for U-code status field
!--

WORD_10  TOPS10 TOPS20
 U_STATUS
  $U_STATUS		0-35
				\V    0	'Continued'
END WORD_10

!++
!	Translations for planned CRAM parity errors for CI ucode
!--

WORD_10  TOPS10 TOPS20
 CI_PLANNED_CPE
  $CI_PLANNED_CPE	0-35
					! CRAM addresses 7750-7777 octal
				\V 4072 'Internal Port Hardware Error'
				\V 4073 'Failed Self Test,
				\V 4074	'PCPE EBUS Parity Error during API Function'
				\V 4075	'EBUS Parity Error while manipulating Queue'
				\V 4076	'PCPE PLI Parity Error'
				\V 4077	'CBUS Parity Error'
				\V 4078	'Data Path Error'
				\V 4079	'CBUS Not Available'
				\V 4080	'EBUS Request Error'
				\V 4081	'GRANT CSR Error'
				\V 4082	'Channel Error'
				\V 4083	'Spurious Channel Error'
				\V 4084	'Spurious Transmit Attention'
				\V 4085	'Spurious Receive Attention'
				\V 4086	'Transmitter Time Out'
				\V 4087	'UNKNOWN to SPEAR, occured at addr 7767'
				\V 4088	'UNKNOWN to SPEAR, occured at addr 7770'
				\V 4089	'UNKNOWN to SPEAR, occured at addr 7771'
				\V 4090	'UNKNOWN to SPEAR,occurred at addr 7772'
				\V 4091	'UNKNOWN to SPEAR,occurred at addr 7773'
				\V 4092	'UNKNOWN to SPEAR,occurred at addr 7774'
				\V 4093	'UNKNOWN to SPEAR,occurred at addr 7775'
				\V 4094	'Real CRAM PE in this location'
				\V 4095	'UNKNOWN to SPEAR, occurred at addr 7777'
END WORD_10

!++
!	Translations for planned CRAM parity errors for NI ucode
!--

WORD_10  TOPS10 TOPS20
 NI_PLANNED_CPE
  $NI_PLANNED_CPE	0-35
				\V 4072 'Internal Port Hardware Error'
				\V 4073 'Failed Self Test,
				\V 4074	'PCPE EBUS Parity Error during API Function'
				\V 4075	'EBUS Parity Error while manipulating Queue'
				\V 4076	'PCPE PLI Parity Error'
				\V 4077	'CBUS Parity Error'
				\V 4078	'Data Path Error'
				\V 4079	'CBUS Not Available'
				\V 4080	'EBUS Request Error'
				\V 4081	'GRANT CSR Error'
				\V 4082	'Channel Error'
				\V 4083	'Spurious Channel Error'
				\V 4084	'Spurious Transmit Attention'
				\V 4085	'Spurious Receive Attention'
				\V 4086	'Transmitter Time Out'
				\V 4087	'UNKNOWN to SPEAR, occured at addr 7767'
				\V 4088	'UNKNOWN to SPEAR, occured at addr 7770'
				\V 4089	'UNKNOWN to SPEAR, occured at addr 7771'
				\V 4090	'UNKNOWN to SPEAR,occurred at addr 7772'
				\V 4091	'UNKNOWN to SPEAR,occurred at addr 7773'
				\V 4092	'UNKNOWN to SPEAR,occurred at addr 7774'
				\V 4093	'UNKNOWN to SPEAR,occurred at addr 7775'
				\V 4094	'Real CRAM PE in this location'
				\V 4095	'UNKNOWN to SPEAR, occurred at addr 7777'
! used to be before [1070] - Ray.
!					! CRAM addresses 7760-7777 octal
!				\V 4080	'Internal consistancy error'
!				\V 4081	'Failed self test'
!				\V 4082	'EBUS parity error'
!				\V 4083	'Unrecoverable PLI parity error'
!				\V 4084	'Fatal channel error'
!				\V 4085	'Unrecoverable CBUS parity error'
!				\V 4086	'Spurrious transmit attention'
!				\V 4087	'Spurrious receive attention'
!				\V 4088	'Transmitter time out'
!				\V 4089	'Unrecoverable parity prediction error'
!				\V 4090	'occurred at addr 7772'
!				\V 4091	'occurred at addr 7773'
!				\V 4092	'occurred at addr 7774'
!				\V 4093	'occurred at addr 7775'
!				\V 4094	'Real CRAM PE in this location'
!				\V 4095	'occurred at addr 7777'
END WORD_10

!++
!	Translations for Channel Logout Word 1 in Channel EPT area
!--

WORD_10  TOPS10 TOPS20
 CHAN_LOGO1
  $MEM_PE		1
				\V    1	'Memory Parity Error'
  $NOT_ADR_PE		2
				\V    0	'Address Parity Error'
  $NOT_WRD_CNT_0	3
				\V    1	'Chan Wrd Cnt not 0'
  $NXM			4
				\V    1	'Non-Existent Memory'
  $LXE			9
				\V    1	'Late Transfer Error'
  $RH20_ERR		10
				\V    1	'RH20 Error'
  $LONG_WRD_CNT		11
				\V    1	'Long Word Count'
  $SHORT_WRD_CNT	12
				\V    1	'Short Word Count'
  $OVERRUN		13
				\V    1	'OverRun'
END WORD_10

!++
!	Reason for KLIPA counter gathers
!++
WORD_10 TOPS10 TOPS20
 REASON
   $CTR_REASON		32-35
				\V   0	'Invalid reason value detected'
				\V   1  'Cram Parity Error'
				\V   2  'Path A went from good to bad'
				\V   3  'Path A went from bad to good'
				\V   4  'Path B went from good to bad'
				\V   5  'Path B went from bad to good'
				\V   6  'Periodic Counter gathering'
				\V   7  'Monitor getting Ucode version'
				\V   8  'DIAG% requested counters'
END WORD_10

!+
!	CI node counters from
!-
WORD_10 TOPS10 TOPS20
 DESIGNATED_PORT
   $DESIGNATED_PORT	24-31
				\V   0	 '0'
				\V   1   '1'
				\V   2   '2'
				\V   3   '3'
				\V   4   '4'
				\V   5   '5'
				\V   6   '6'
				\V   7   '7'
				\V   8   '8'
				\V   9   '9'
				\V   10  '10'
				\V   11  '11'
				\V   12  '12'
				\V   13  '13'
				\V   14  '14'
				\V   15  '15'
				\V   255 'ALL'
END WORD_10


!++
!	BTT definitions for MSCP End Message fields
!--

!++
!	MSCP End Message ENDCODE field
!--

WORD_11  TOPS10 TOPS20
 ENDCODE
  MSCP$K_OP_END		7
  MSCP$K_OP_CODE	6-0
				\V    0	'Invalid Command'
				\V    1	'ABORT'
				\V   16	'ACCESS'
				\V    8	'AVAILABLE'
				\V   17	'COMPARE CONTROLLER DATA'
				\V   32	'COMPARE HOST DATA'
				\V   11	'DETERMINE ACCESS PATHS'
				\V   18	'ERASE'
				\V   19	'FLUSH'
				\V    2	'GET COMMAND STATUS'
				\V    3	'GET UNIT STATUS'
				\V    9	'ONLINE'
				\V   33	'READ'
				\V   20	'REPLACE'
				\V    4	'SET CONTROLLER CHARACTERISTICS'
				\V   10	'SET UNIT CHARACTERISTICS'
				\V   34	'WRITE'
				\V    7	'Serious Exception End Message'
				\V   64	'AVAILABLE Attention Message'
				\V   65	'DUPLICATE UNIT NUMBER Attention Msg'
				\V   66	'ACCESS PATH Attention Message'
END WORD_11

!++
!	MSCP End Message FLAGS field
!--

WORD_11  TOPS10 TOPS20
 END_FLAGS
  MSCP$V_EF_BBLKR	7
				\V    1	'Bad Block Reported'
  MSCP$V_EF_BBLKU	6
				\V    1	'Bad Block Unreported'
  MSCP$V_EF_ERLOG	5
				\V    1	'Error Log Generated'
  MSCP$V_EF_SEREX	4
				\V    1	'Serious Exception'
END WORD_11

!++
!	MSCP End Message STATUS field
!
!	See MSCP Error Log Message EVENT CODE field
!--

!++
!	BTT definitions for MSCP Error Log Message fields
!--

!++
!	MSCP Error Log Message FORMAT field
!--

WORD_11  TOPS10 TOPS20
 FORMAT
  $FORMAT		7-0
				\V    0	'Controller Error'
				\V    1	'Host Memory Access Err with Bus Addr.'
				\V    2	'Disk Transfer Error'
				\V    3	'SDI Error'
				\V    4	'Small Disk Error'
END WORD_11

!++
!	MSCP Error Log Message FLAGS field
!--

WORD_11  TOPS10 TOPS20
 FLAGS
  MSLG$V_LF_SUCC	7
				\V    1	'Operation Successful'
  MSLG$V_LF_CONT	6
				\V    1	'Operation Continuing'
  MSLG$V_LF_SQNRS	0
				\V    1	'Sequence Number Reset'
END WORD_11

!++
!	MSCP Error Log Message EVENT CODE field
!	and End Message STATUS field
!--

WORD_11  TOPS10 TOPS20
 STATUS_EVENT_CODE
  MSCP$V_ST_CODE	4-0
				\V    0	'Success'
				\V    1	'Invalid Command'
				\V    2	'Command Aborted'
				\V    3	'Unit-Offline'
				\V    4	'Unit-Available'
				\V    5	'Media Format Error'
				\V    6	'Write Protected'
				\V    7	'Compare Error'
				\V    8	'Data Error'
				\V    9	'Host Buffer Access Error'
				\V   10	'Controller Error'
				\V   11	'Drive Error'
				\V   31	'Message from an internal diagnostic'
  MSCP$V_ST_CODE_SUBCOD	15-0
			    ! "Success" (0)  sub-code values:
				\V    0	'Normal'
				\V   32	'Spin-down Ignored'
				\V   64	'Still Connected'
				\V  128	'Duplicate Unit Number'
				\V  256	'Already Online'
				\V  512	'Still Online'

			    ! "Invalid Command" (1)  sub-code values:
				\V    1	'Invalid Message Length'
			    ! Many more - but I don't understand the spec

			    ! "Command Aborted" (2)  sub-code values:
			    !   Sub-codes are not used.			

			    ! "Unit-Offline" (3)  sub-code values:
				\V    0	'Unknown or online to another cntlr'
				\V   35	'No media or drive disabled'
				\V   67	'Unit is inoperative'
				\V  131	'Duplicate unit number'
				\V  259	'Unit disabled by F-S or Diag.'

			    ! "Unit-Available" (4)  sub-code values:
			    !   Sub-codes are not used.			

			    ! "Media Format Error" (5)  sub-code values:
				\V   69	'FCT unreadable, Invalid sector header'
				\V  101	'FCT unreadable, Data sync timeout'
				\V  165	'Not formatted with 512 byte sectors'
				\V  197	'Not formatted or FCT corrupted'
				\V  229	'FCT unreadable, Uncorrectable ECC Err'

			    ! "Write Protected" (6)  sub-code values:
				\V 8198	'Unit is Hardware Write protected'
				\V 4102	'Unit is Software Write protected'

			    ! "Compare Error" (7)  sub-code values:
			    !   Sub-codes are not used.			

			    ! "Data Error" (8)  sub-code values:
				\V    8	'Sector written with "Force Error"'
				\V   72	'Header compare error'
				\V  104	'Data Sync not found'
				\V  232	'Uncorrectable ECC Error'
				\V  264	'One Symbol ECC Error'
				\V  296	'Two Symbol ECC Error'
				\V  328	'Three Symbol ECC Error'
				\V  360	'Four Symbol ECC Error'
				\V  392	'Five Symbol ECC Error'
				\V  424	'Six Symbol ECC Error'
				\V  456	'Seven Symbol ECC Error'
				\V  488	'Eight Symbol ECC Error'

			    ! "Host Buffer Access Error" (9)  sub-code values:
				\V   41	'Odd transfer address'
				\V   73	'Odd byte count'
				\V  105	'Non-existent memory error'
				\V  137	'Host memory parity error'

			    ! "Controller Error" (10)  sub-code values:
				\V   10	'Command timeout, Retry limit exceeded'
				\V   42	'SERDES overrun error'
				\V   74	'EDC Error'
				\V  106	'Inconsistent internal data structure'

			    ! "Drive Error" (11)  sub-code values:
				\V   43	'SDI command timed out'
				\V   75	'Transmission or protocol error'
				\V  107	'Positioner error'
				\V  139	'Lost R/W ready'
				\V  171	'Drive clock droupout'
				\V  203	'Lost receiver ready between sectors'
				\V  235	'Drive detecetd error'
				\V  267	'Pulse or state parity error'

			    ! "Message from an internal diagnostic" (31)
			    ! sub-code values:
			    ! None in MSCP spec!
END WORD_11

!++
!	MSCP Error Log Message Controller & Unit ID CLASS fields
!--

WORD_11  TOPS10 TOPS20
 ID_CLASS
  $ID_CLASS		7-0
				\V    0	'Illegal Subsystem Type'
				\V    1	'Mass Storage Controller'
				\V    2	'DEC Std 166 Disk'
				\V    3	'Tape Class Device'
				\V    4	'DEC Std 144 Disk'
END WORD_11

!++
!	MSCP Error Log Message Controller ID MODEL field
!--

WORD_11  TOPS10 TOPS20
 CNTLR_MODEL		! BTT for Mass Storage Controllers  (CNTLR_CLASS = 1)
  $CNTLR_MODEL		7-0
				\V   0	'Illegal Controller Type'
				\V   1	'HSC50'
				\V   2	'UDA50
				\V   3	'Aztec'
				\V   4	'VMS (software MSCP server)'
				\V   5	'TU81'
				\V   6	'UDA52'
				\V   7	'RD51 / RX50'
END WORD_11

!++
!	MSCP Error Log Message Unit ID MODEL field
!--

WORD_11  TOPS10 TOPS20
 UNIT_MODEL		! BTT for DEC Std 166 disks  (UNIT_CLASS = 2)
  UNIT_MODEL_BYTE	7-0
				\V    0	'Illegal Media Type'
				\V    1	'RA80'
				\V    2	'RC25'
				\V    3	'RCF25'
				\V    4	'RA60'
				\V    5	'RA81'
				\V    6	'RD51'
				\V    7	'RX50'
END WORD_11

!++
!	BTT definitions for MSCP Error Log Message with FORMAT = 0
!	Controller Error fields
!--

!++
!	BTT definitions for MSCP Error Log Message with FORMAT = 1
!	Host Memory Access Error with Bus Address
!--

!++
!	BTT definitions for MSCP Error Log Message with FORMAT = 2
!	Disk Transfer Error
!--

!++
!	BTT definitions for MSCP Error Log Message with FORMAT = 3
!	SDI Error
!--

!++
!	SDI Error Header Code fields
!--

WORD_11  TOPS10 TOPS20
 HEADER_CODE
  $BLOCK_TYPE		31-28
				\V    0	'Logical Block'
				\V    6	'Replacement Block'
  $BLOCK_NUMBER		27-0
END WORD_11

!++
!	SDI Request Byte fields (GET STATUS byte 4)
!--

WORD_11  TOPS10 TOPS20
 REQUEST_BYTE
  OA			7
				\V    0	'Drive-online or available'
				\V    1	'Drive unavailable'
  RR			6
				\V    1	'Readjustment requested'
  DR			5
				\V    1	'Diag load request'
  SR			4
				\V    0	'Spindle not ready'
  EL			3
! Not Used		2
  PS			1
				\V    0	'Port switch out'
				\V    1	'Port switch in'
  RU			0
				\V    0	'Run/Stop switch out'
				\V    1	'Run/Stop switch in'
END WORD_11

!++
!	SDI Mode Byte fields (GET STATUS byte 5)
!--

WORD_11  TOPS10 TOPS20
 MODE_BYTE
  W4			7
				\V    1	'Unit 4 Write Protected'
  W3			6
				\V    1	'Unit 3 Write Protected'
  W2			5
				\V    1	'Unit 2 Write Protected'
  W1			4
				\V    1	'Unit 1 Write Protected'
  DD			3
				\V    1	'Drive disabled'
  FO			2
				\V    0	'Formatting disabled'
				\V    1	'Formatting enabled'
  DB			1
				\V    0	'Diag Cyl access disabled'
				\V    1	'Diag Cyl access enabled'
  S7			0
				\V    0	'512 byte'
				\V    1	'576 byte'
END WORD_11

!++
!	SDI Error Byte fields (GET STATUS byte 6)
!--

WORD_11  TOPS10 TOPS20
 ERROR_BYTE
  DE			7
				\V    1	'Drive Error'
  RE			6
				\V    1	'Transmission Error'
  PE			5
				\V    1	'Level 2 Protocol Error'
  DF			4
				\V    1	'Initialization Diagnostic Failure'
  WE			3
				\V    1	'Write Lock Error'
! Not used		2-0
END WORD_11

!++
!	SDI Controller Byte fields (GET STATUS byte 7)
!--

WORD_11  TOPS10 TOPS20
 CONTROLLER_BYTE
  S_FLAGS		7-4
  C_FLAGS		3-0
END WORD_11

!++
!	SDI Retry Count / Failure Code Byte (GET STATUS byte 8)
!--

WORD_11  TOPS10 TOPS20
 RETRY$FAILURE
  $RETRY$FAILURE	7-0	! No Info
END WORD_11

!++
!    SDI_ERROR_STATUS	2	12-19	!	10
!	RA80 / RA81 Last Position Command (GET STATUS byte 9)
!--

WORD_11  TOPS10 TOPS20
 LAST_POSITION_CMD
  $LAST_POSITION_CMD	7-0	!Controller command function code last executed
END WORD_11

!++
!	RA80 / RA81 SDI Error Status (GET STATUS byte 10)
!--

WORD_11  TOPS10 TOPS20
 SDI_ERROR_STATUS
  OVERRUN		3
				\V    1	'Overrun'
  PARITY_ERROR		4
				\V    1	'Parity Error'
  CNTRL_PULSE_ERROR	5
				\V    1	'Control Pulse Error'
  DATA_PULSE_ERROR	7
				\V    1	'Data Pulse Error'
END WORD_11

!++
!	RA80 / RA81 Last Seek Cylinder Low byte (GET STATUS byte 11)
!--

WORD_11  TOPS10 TOPS20
 LAST_SEEK_CYL_LO
  $LAST_SEEK_CYL_LO	7-0
END WORD_11

!++
!	RA80 / RA81 Last Seek Cylinder High byte (GET STATUS byte 12)
!--

WORD_11  TOPS10 TOPS20
 LAST_SEEK_CYL_HI
  $LAST_SEEK_CYL_HI	7-0
END WORD_11

!++
!	RA81 Group Address (Head 0-13) (GET STATUS byte 13)
!--

WORD_11  TOPS10 TOPS20
 RA81_R_W_HEAD
  $RA81_R_W_HEAD	7-0
END WORD_11

!++
!	RA80 / RA81 Microprocessor LEDs (GET STATUS byte 14)
!--

WORD_11  TOPS10 TOPS20
 MICROPROCESSOR_LEDS
  $MICROPROCESSOR_LEDS	7-0
END WORD_11

!++
!	RA80 / RA81 Front Panel Fault Indicator (GET STATUS byte 15)
!--

WORD_11  TOPS10 TOPS20
 FRONTPANEL_FAULT_CODE
  $FRONTPANEL_FAULT_CODE	7-0
				\V   17	'Index Error'
				\V   18	'Master/Slave Error'
				\V   19	'Servo Diag. Error'
				\V   20	'Microprocessor Fault'
				\V   21	'Drive Disabled by DD bit'
				\V   22	'Servo Coarse Positioning Error'
				\V   23	'Diag. Idle Loop Test Error'
				\V   24	'Spin Error'
				\V   25	'Write and Bad Embedded Data'
				\V   26	'Servo Fine Position Error'
				\V   27	'Read/Write Diag. Test Error'
				\V   28	'SDI Error'
				\V   29	'Write Enable and Write Protect'
				\V   30	'Spindle Motor Interlock Error'
				\V   48	'Servo or HDA Overtemp Error'
				\V   52	'Read/Write Command Error'
				\V   54	'Control Panel/Micro-p. Interlock Err'
				\V   56	'Read/Write Unsafe Error'
				\V   58	'Read/Write Microprocessor'
				\V   60	'Servo/HDA Interlock Error'
				\V   62	'Personality/Micro-p. Interlock Error'
				\V   63	'Microprocessor Hardcore Test Error'
END WORD_11


!++
!	BTT definitions for MSCP Error Log Message with FORMAT = 4
!	Small Disk Error
!--

!++
!	SDI Error xxxx field
!--

WORD_11  TOPS10 TOPS20
 xxxxx
  $xxxxx		7-0
				\V    0	' '
END WORD_11