IOT TITLE 'DMKIOT (CP) VM/370 - RELEASE 6' 00001000
ISEQ 73,80 00002000
MACRO 00003000
&LABEL INCR &COUNT 00004000
&LABEL LA R0,1 00005000
AL R0,&COUNT 00006000
ST R0,&COUNT 00007000
MEND 00008000
*********************************************************************** 00009000
* * 00010000
*MODULE NAME = DMKIOT * 00011000
* * 00012000
*DESCRIPTIVE NAME = DMKIOT (CP) I/O INTERRUPT HANDLER * 00013000
* * 00014000
*COPYRIGHT = NONE * 00015000
* * 00016000
*STATUS = VM/370 - RELEASE 6, LEVEL 0 * 00017000
* * 00018000
*FUNCTION = TO SERVICE ALL I/O INTERRUPTS * 00019000
* * 00020000
*NOTES = SEE BELOW * 00021000
* * 00022000
* DEPENDENCIES = NONE * 00023000
* * 00024000
* RESTRICTIONS = NONE * 00025000
* * 00026000
* REGISTER CONVENTIONS = R0 = SCRATCH * 00027000
* R1 = SCRATCH * 00028000
* R2 = I/O RESTART INDEX (0, 4, 8 OR 12) * 00029000
* R3 = INTERNAL SUBROUTINE LINKAGE (1ST LEVEL * 00030000
* R4 = INTERNAL SUBROUTINE LINKAGE (3RD LEVEL * 00031000
* R5 = INTERNAL SUBROUTINE LINKAGE (2ND LEVEL * 00032000
* R6 = RCHBLOK BASE * 00033000
* R7 = RCUBLOK BASE * 00034000
* R8 = RDEVBLOK BASE * 00035000
* R9 = DMKIOT 2ND BASE * 00036000
* R10 = IOBLOK BASE * 00037000
* R11 = VMBLOK BASE * 00038000
* R12 = DMKIOT BASE * 00039000
* R13 = ZERO IF ENTERED VIA INTERRUPT * 00040000
* R14 = EXTERNAL SUBROUTINE LINKAGE * 00041000
* R15 = EXTERNAL SUBROUTINE LINKAGE * 00042000
* * 00043000
* PATCH LABEL = N/A * 00044000
* * 00045000
*MODULE TYPE = CSECT * 00046000
* * 00047000
* PROCESSOR = ASSEMBLER XF * 00048000
* * 00049000
* MODULE SIZE = 8K BYTES (2 BASE REGISTERS DESIGN POINT) * 00050000
* * 00051000
* ATTRIBUTES = REENTRANT, RESIDENT. * 00052000
* * 00053000
*ENTRY POINT = DMKIOTIN * 00054000
* * 00055000
* PURPOSE = PROCESS AN I/O INTERRUPT * 00056000
* * 00057000
* LINKAGE = ENTERED DIRECTLY VIA I/O NEW PSW * 00058000
* * 00059000
*ENTRY POINT = DMKIOTCT * 00060000
* * 00061000
* PURPOSE = TOTAL I/O INTERRUPT COUNT. * 00062000
* * 00063000
* LINKAGE = NONE * 00064000
* * 00065000
*INPUT = * 00066000
* DMKIOTIN * 00067000
* R6 = RCHBLOK BASE * 00068000
* R7 = RCUBLOK BASE * 00069000
* R8 = RDEVBLOK BASE * 00070000
* R10 = IOBLOK BASE * 00071000
* R11 = VMBLOK BASE * 00072000
* DMKIOTCT * 00073000
* NONE * 00074000
*OUTPUT = * 00075000
* DMKIOTIN * 00076000
* CPEXBLOK TO RETURN TO DMKIOSER * 00077000
* CPEXBLOK TO RETURN TO DMKIOSRC * 00078000
* * 00079000
* DMKIOTCT * 00080000
* * 00081000
*EXIT-NORMAL = * 00082000
* DMKIOTIN * 00083000
* DISPATCHER * 00084000
* DMKIOSST B IOSTART ISSUE SIO * 00085000
* DMKIOSRS B IOTRSTDV RESTART DEVICE * 00086000
* DMKIOSRQ B IOTREQUE REQUEUE REQUEST * 00087000
* DMKIOSRU B IOTRSTCU RESTART CU & CH * 00088000
* DMKIOSRH B IOTRSTCH RESTART CH * 00089000
* DMKIOSRY B CALLERP PERFORM ERROR RECOVERY * 00090000
* DMKIOSER VIA CPEXBLOK * 00091000
* DMKIOSRC VIA CPEXBLOK * 00092000
* * 00093000
* DMKIOTCT * 00094000
* NONE * 00095000
* * 00096000
*EXIT-ERROR = * 00097000
* DMKIOTIN * 00098000
* NONE * 00099000
* DMKIOTCT * 00100000
* NONE * 00101000
* * 00102000
*EXTERNAL REFERENCES = SEE BELOW * 00103000
* * 00104000
* ROUTINES = DMKSTKIO - TO STACK FOR 2ND LEVEL PROCESSING IOBLOKS FOR* 00105000
* COMPLETED OPERATIONS. * 00106000
* DMKSTKCP - TO STACK CPEXBLOK FOR DEFERRED CALL TO I/O * 00107000
* ERROR RECORDER (DMKIOERR) * 00108000
* DMKSCNRU - TO LOCATE RCHBLOK, RCUBLOK, AND RDEVBLOK FOR * 00109000
* THE UNIT CAUSING THE INTERRUPT * 00110000
* DMKIOERR - TO RECORD I/O ERRORS * 00111000
* DMKCCHNT - TO HANDLE CHANNEL ERRORS DETECTED VIA AN I/O * 00112000
* INTERRUPT * 00113000
* DMKCCHSI - TO HANDLE CHANNEL ERRORS DETECTED VIA STATUS * 00114000
* STORED ON CC 1 AFTER A SIO * 00115000
* DMKDASER - TO RETRY FAILING DASD OPERATIONS * 00116000
* DMKRSPER - TO RETRY FAILING UNIT RECORD OPERATIONS * 00117000
* DMKTAPER - TO RETRY FAILING TAPE OPERATIONS * 00118000
* DMKTRDSI - TO TRACE VIRTUAL MACHINE START I/O INSTRUCTION 00119000
* DMKFREE - TO OBTAIN FREE STORAGE FOR AN IOBLOK * 00120000
* DMKFRET - TO RETURN IOBLOKS TO FREE STORAGE * 00121000
* DMKSCHDL - TO ALTER A VIRTUAL MACHINE'S DISPATCH STATUS * 00122000
* INTERRUPT HANDLERS FOR UNSOLICITED INTERRUPTS: * 00123000
* DMKVIOIN - INTERRUPT HANDLER FOR DEDICATED DEVICES * 00124000
* DMKRSPEX - INTERRUPT HANDLER FOR SYSTEM SPOOL DEVICES * 00125000
* DMKCNSIN - INTERRUPT HANDLER FOR SLOW-SPEED TERMINAL LINE 00126000
* DMKGRFIN - INTERRUPT HANDLER FOR LOCAL GRAPHICS DEVICES * 00127000
* DMKRNHIN - INTERRUPT HANDLER FOR THE 3704 AND 3705 * 00128000
* DMKDSBRD - INTERRUPT HANDLER FOR DASD * 00129000
* DMKRGAIN - INTERRUPT HANDLER FOR 3270 REMOTE SUPPORT * 00130000
* DATA AREAS = DMKSYSVM - SYSTEM VMBLOK * 00131000
* PSA - PREFIX STORAGE AREA * 00132000
* IOERBLOK - I/O ERROR INFORMATION BLOCK * 00133000
* IOBLOK - I/O TACK CONTROL BLOCK * 00134000
* CPEXBLOK - * 00135000
* RCHBLOK - REAL CHANNEL BLOCK * 00136000
* RCUBLOK - REAL CONTROL UNIT BLOCK * 00137000
* RDEVBLOK - REAL DEVICE BLOCK * 00138000
* VMBLOK - VIRTUAL MACHINE CONTROL BLOCK * 00139000
* SAVEAREA - SAVE AREA SVC CALL * 00140000
* * 00141000
*TABLES = TEMPSAVE - SAVES INITL SYSTEM STATUS UPON ENTRY TO DMKIOTIN * 00146000
* * 00147000
*MACROS = INCR * 00148000
* PSA * 00149000
* * 00150000
*CHANGE ACTIVITY = AS FOLLOWS: * 00151000
* CHANGE 01 02/16/79 SPLIT OF MODULE DMKIOS - DMKIOSIN PORTION * 00152000
* * 00153000
*********************************************************************** 00154000
EJECT 00155000
COPY OPTIONS 00156000
COPY LOCAL OPTIONS 00157000
SPACE 2 00158000
DMKIOT CSECT @VA09587 00159000
ENTRY DMKIOTIN,DMKIOTCT @VA09587 00160000
EXTRN DMKSCHDL,DMKSTKCP,DMKSTKIO,DMKSCNRU @VA09587 00161000
EXTRN DMKCCHNT,DMKCCHIS,DMKIOERR,DMKDASER,DMKTAPER @VA09587 00162000
EXTRN DMKRSPER,DMKIOSRC,DMKIOSER @VA09587 00163000
EXTRN DMKVIOIN,DMKGRFIN,DMKCNSIN,DMKRNHIN,DMKRSPEX @VA09587 00164000
EXTRN DMKDSBRD,DMKBSCER,DMKRGAIN @VA09587 00165000
EXTRN DMKIOSRS,DMKIOSSV @VA09587 00166000
EXTRN DMKIOSRH,DMKIOSRQ,DMKIOSRU,DMKIOSRY,DMKIOSST @VA09587 00167000
EXTRN DMKDIAIR @VA09587 00168000
EXTRN DMKRIOCN @VA09587 00169000
EXTRN DMKENTSK @V60BEBC 00170000
AIF (NOT &AP).DSPRU6 00172000
EXTRN DMKDSPRU,DMKLOKSY @V4M0173 00173000
.DSPRU6 ANOP 00174000
EXTRN DMKSTKMP,DMKDSPA @V4M0173 00175000
EXTRN DMKSTKLF @V4M0154 00176000
EXTRN DMKSSUI1,DMKSSUI2 @VA11455 00177010
SPACE 00178000
AIF (NOT &TRACE(6)).IOTNDX 00179000
EXTRN DMKTRDSI @V4M0240 00180000
.IOTNDX ANOP (END OF EXTRN'S) 00181000
SPACE 00182000
USING PSA,R0 00183000
USING CPEXBLOK,R1 00184000
USING RCHBLOK,R6 00185000
USING RCUBLOK,R7 00186000
USING RDEVBLOK,R8 00187000
USING IOBLOK,R10 00188000
USING VMBLOK,R11 00189000
USING SAVEAREA,R13 00190000
SPACE 00191000
USING DMKIOT,R12,R9 @VA09587 00192000
EJECT 00193000
EJECT 00194000
EJECT 00195000
*. 00196000
* 00197000
* D. OPERATION OF DMKIOTIN - 00198000
* 0. AP SUPPORT -- SET CPSUPER FLAG ON 00199000
* 1. IF THE I/O OLD PSW INDICATES PROBLEM MODE, SAVE THE RUN- 00200000
* NING USER'S CPU STATUS IN HIS VMBLOK 00201000
* 2. CALL DMKSCNRU TO LOCATE THE RCHBLOK, RCUBLOK, AND RDEVBLOK 00202000
* FOR THE INTERRUPTING UNIT. 00203000
* 3. IF THE INTERRUPT TYPE INDICATES THAT A PREVIOUSLY BUSY RE- 00204000
* SOURCE IS NOW AVAILABLE (CUE OR CHANNEL AVAILABLE), RESTART 00205000
* AT THE APPROPRIATE LEVEL; OTHERWISE THE INTERRUPT MUST BE 00206000
* STACKED FOR FURTHER PROCESSING 00207000
* 4. IF THERE IS AN IOBLOK ACTIVE ON THE INTERRUPTING DEVICE, 00208000
* CONTINUE; OTHERWISE, CALL THE 2ND LEVEL SUBROUTINE IOTGTIOB 00209000
* (H, BELOW) TO CONSTRUCT ONE, AND CONTINUE 00210000
* 00211000
*. 00212000
SPACE 00213000
DMKIOTIN DS 0D I/O INTERRUPTION SUPERVISOR @VA09587 00214000
OI CPSTATUS,CPSUPER WE ARE NOW IS SUPERVISOR STA@V407593 00215000
STM R9,R15,TEMPR9 SAVE REGISTERS AT ENTRY @V407511 00216000
BALR R15,0 ESTABLISH ADDRESABILITY @V408246 00217000
USING *,R15 @V408246 00218000
L R12,IOTBASE1 LOAD BASE REGISTER TO DMKIOT @VA09587 00219000
L R9,IOTBASE2 LOAD SECOND BASE REG @VA09587 00220000
DROP R15 @V407511 00221000
USING DMKIOT,R12,R9 @VA09587 00222000
TM CPSTATUS,CPRUN RUNNING VIRTUAL MACHINE? @V408246 00223000
BZ IOTRSYS NO, WAIT STATE OR DISPATCH WINDOW@V408246 00224000
L R14,RUNUSER VMBLOK POINTER @V408246 00225000
USING VMBLOK,R14 @V408246 00226000
STPT VMTMOUTQ CHECKPOINT PROBLEM OR WAIT @V408246 00227000
* STATE TIMER 00228000
MVC QUANTUMR,TIMER SAVE INTERVAL TIMER AT INTERRUPT @V408246 00229000
LCTL C0,C0,CPCREG0 RE-ESTABLISH SYSTEM'S CONTROL @V408246 00230000
* REGS. 00231000
LCTL C8,C8,CPCREG8 . . @V408246 00232000
STM R0,R8,VMGPRS SAVE THE USER'S REGISTERS @V407511 00233000
MVC VMGPRS+R9*4(28),TEMPR9 @V407511 00234000
AIF (NOT &FLOATPT).NOFP1 00235000
STD Y0,VMFPRS SAVE FLOATING POINT REGISTERS 00236000
STD Y2,VMFPRS+8 ... 00237000
STD Y4,VMFPRS+16 ... 00238000
STD Y6,VMFPRS+24 ... 00239000
.NOFP1 ANOP 00240000
MVC VMPSW+4(4),IOOPSW+4 SAVE THE INTERRUPTION ADDRESS 00241000
IC R1,IOOPSW+2 SAVE THE CC AND PGM MASK 00242000
TM VMESTAT,VMEXTCM EXTENDED CONTROL MACHINE ?? 00243000
BZ IOTMNORM NO, NORMAL MODE 00244000
STC R1,VMPSW+2 00245000
B IOTRSYS1 CONTINUE @V407511 00246000
IOTMNORM STC R1,VMPSW+4 00247000
B IOTRSYS1 @V407511 00248000
SPACE 00249000
SPACE 00250000
DROP R14 00251000
USING VMBLOK,R11 @V408246 00252000
EJECT 00253000
IOTRSYS DS 0H @V408246 00254000
TM CPSTATUS,CPWAIT INTERRUPT FROM WAIT? @V408246 00255000
BO IOTWAIT YES, HANDLE INTERRUPT FROM WAIT @V4M0173 00256000
AIF (NOT &AP).LOKSY6 00257000
TM APSTAT1,APUOPER IS THIS AN AP SYSTEM? @V4M0173 00258000
BZ IOTRSYS1 NO, CONTINUE AS IN UP MODE @V4M0173 00259000
L R15,=A(DMKLOKSY+2) GET ADDR OF SYSTEM LOCK @V4M0173 00260000
CLC LPUADDR,0(R15) IS THE SYSTEM LOCK HELD? @V4M0173 00261000
BNE IOTRSYS1 NO, CONTINUE PROCESSING @V4M0173 00262000
LOCK RELEASE,TYPE=SYS RELEASE SYSTEM LOCK @V4M0173 00263000
.LOKSY6 ANOP 00264000
B IOTRSYS1 CONTINUE INTERRUPT PROCESSING @V4M0173 00265000
IOTWAIT DS 0H @V4M0173 00266000
STPT WAITEND STOP WAITTIME ACCOUNTING @V407511 00267000
IOTRSYS1 DS 0H V407511 00268000
L R11,ASYSVM CHARGE SYSTEM FOR OVERHEAD UNTIL 00269000
CHARGE START TRUE OWNER OF INTERRUPT IS ESTABL@V407593 00270000
SPACE 00271000
AIF (NOT &TRACE(9)).TR1 @V408246 00272000
TM TRACFLG1,TRAC05 TRACING ACTIVE? @V408246 00273000
BZ NOTRAC1 BRANCH IF NOT @V408246 00274000
* GET TRACE-TABLE PTR, A 00275000
TRACE CODE=IOTRCODE,R14,R0,R1 FLAG AS I/O INTER. @V407593 00276000
MVI 1(R14),0 CLEAR 2ND BYTE @V408246 00277000
MVC 2(2,R14),INTTIO SAVE INTERUPTING DEVICE ADDRESS @V408246 00278000
MVC 4(4,R14),IOOPSW+4 SAVE RIGHT HALF OF I/O OLD PSW@V408246 00279000
MVC 8(8,R14),CSW SAVE CSW @V408246 00280000
L R14,RUNUSER RESTORE GPR14 @V408246 00281000
NOTRAC1 EQU * @V408246 00282000
.TR1 ANOP 00283000
L R13,DMKIOTCT GET TOTAL I/O INTERRUPT COUNT @VA09587 00284000
AL R13,F1 BUMP 00285000
ST R13,DMKIOTCT AND SAVE @VA09587 00286000
SLR R13,R13 INDICATE ENTRY FROM AN I/O INTERRUPT 00287000
LH R1,INTTIO GET THE INTERRUPTING UNIT'S ADDRESS 00288000
CALL DMKSCNRU GET REAL CHANNEL, CU, AND DEVICE BLOCKS 00289000
BC 4,IOTGDISP EXIT IF CHANNEL NOT FOUND 00290000
L R3,=A(DMKIOSSV) @VA09587 00291000
ST R6,0(R3) SAVE RCH AND RCU VALUE @VA09587 00292000
ST R7,4(R3) IN CASE OF RESTART @VA09587 00293000
BNZ IOTNODEV DO NOT TEST FOR RESET IF DEVICE NOT FOUND 00294000
TM RDEVTYPC,CLASTAPE TAPE DEVICE?? @VA11340 00295000
BZ NOTTAPES NO SKIP @VA11340 00295010
L R4,RDEVAIOB IS IT UNSOLICITED?? @VA11340 00295020
LTR R4,R4 INTERRUPT @VA11340 00295030
BZ IOTNODEV YES, INVESTIGATE @VA11340 00295040
NOTTAPES EQU * @VA11340 00295050
TM RDEVSTA2,RDEVRACT IS THIS DEVICE BEING RESET? @VA11340 00295060
BZ IOTNODEV NOPE, BR. @VA11340 00295070
NI RCHSTAT,X'FF'-RCHBUSY CLEAR CHANNEL BUSY @VA00931 00303000
NI RCUSTAT,X'FF'-RCUBUSY CLEAR CU BUSY @VA00931 00304000
TM RDEVSTAT,RDEVSCED I/O Q'D FROM C.U. OR CHAN? @VA10176 00304020
BNO NONEQUED NO, FORGET THE SEARCH @VA10176 00304040
L R10,RCUFIOB CHECK IF IOB OFF CTLUNIT @VA10176 00304060
CUCKLOOP EQU * @VA10176 00304080
CR R7,R10 IS THIS THE LAST ONE? @VA10176 00304100
BE CHKCHAN YES, CHECK IF IOB OFF CHANNEL @VA10176 00304120
CLC IOBRADD(2),INTTIO IS THIS FOR US? @VA10176 00304140
BE CUCKOUT YES, GO DEQUEUE IT @VA10176 00304160
L R10,IOBFPNT-IOBLOK(R10) NO, CHECK NEXT IOBLOK @VA10176 00304180
B CUCKLOOP ... @VA10176 00304200
CUCKOUT EQU * @VA10176 00304220
LH R1,RCUQCNT DECREASE QUEUED COUNT @VA10176 00304240
BCTR R1,0 ... @VA10176 00304260
STH R1,RCUQCNT ... @VA10176 00304280
B FNDIOB CONTINUE @VA10176 00304300
CHKCHAN EQU * @VA10176 00304320
L R10,RCHFIOB FIRST IOB ON CHANNEL @VA10176 00304340
CHKCHAN1 EQU * @VA10176 00304360
CR R6,R10 IS THIS THE END OF CHAIN? @VA10176 00304380
BE NONEQUED YES, NORMAL PROCESSING @VA10176 00304400
CLC IOBRADD(2),INTTIO IS THIS ONE FOR US? @VA10176 00304420
BE CHCLOOP1 YES, GO DEQUEQE IT @VA10176 00304440
L R10,IOBFPNT-IOBLOK(R10) NO, CHECK NEXT ONE @VA10176 00304460
B CHKCHAN1 CONTINUE @VA10176 00304480
CHCLOOP1 EQU * @VA10176 00304500
LH R1,RCHQCNT DECREASE QUEUED COUNT @VA10176 00304520
BCTR R1,0 ... @VA10176 00304540
STH R1,RCHQCNT ... @VA10176 00304560
FNDIOB EQU * @VA10176 00304580
LM R4,R5,IOBFPNT-IOBLOK(R10) DEQUEUE IOBLOK @VA10176 00304600
ST R4,IOBFPNT-IOBLOK(R5) ... @VA10176 00304620
ST R5,IOBBPNT-IOBLOK(R4) ... @VA10176 00304640
NI RDEVSTAT,X'FF'-(RDEVBUSY+RDEVSCED) RESET FLAGS @VA14143 00304661
B IOTTART @VA10176 00304680
NONEQUED EQU * @VA10176 00304700
B IOTRSTCU @VA00931 00305000
SPACE 3 00306000
IOTBASE1 DC A(DMKIOT) ADCONS MUST BE IN THE FIRST 4K @VA09587 00307000
IOTBASE2 DC A(DMKIOT+4096) AND AFTER THE LAST ENTRY POINT @VA09587 00308000
* VA04182 00309000
EJECT 00310000
IOTNODEV EQU * @VA01382 00311000
TM CSW+5,CDC+CCC+IFCC CHANNEL ERRORS ? @VA01382 00312000
BZ IOTCLRCH NO - @VM08622 00313000
LTR R8,R8 HAVE AN RDEVBLOK? @VMD0141 00314000
BM IOTCCR NO, CALL DMKCCHNT NOW. @VMD0141 00315000
ICM R10,15,RDEVAIOB UNSOLICITED INTERRUPT ?? @V508690 00316000
BNZ IOTCCR NO, CALL DMKCCHNT NOW @V508690 00317000
TM RDEVSTAT,RDEVDED UNSOL FROM DEDICATED DEVICE ? @V508690 00318000
BZ IOTCCR NO, GO CALL DMKCCHNT @V508690 00319000
BAL R5,IOTGTIOB YES, BUILD IOBLOK,FLAG IT UNSOL. @V508690 00320000
ST R10,RDEVAIOB SAVE IOBLOK ADDRESS @V508690 00321000
IOTCCR EQU * SET UP FOR CALL TO DMKCCHNT @V508690 00322000
LM R4,R5,CSW SAVE CSW FOR CHANNEL HANDLER. @VM08622 00323000
LH R3,INTTIO ALSO THE DEVICE ADDRESS. @VM08622 00324000
AIF (NOT &AP).LOKSY7 00325000
TM APSTAT1,APUOPER RUNNING IN ATTACHED MODE @V4M0154 00326000
BZ CALLCCH NO, JUST CALL CHANNEL CHECK @V4M0154 00327000
L R15,=A(DMKLOKSY+2) GET ADDR SYSTEM LOCK @V4M0154 00328000
CLC LPUADDR,0(R15) DO WE HOLD SYSTEM LOCK @V4M0154 00329000
BE CALLCCH YES, OK TO CALL CHANNEL CHECK @V4M0154 00330000
LOCK OBTAIN,TYPE=SYS,SPIN=NO,SAVE @V4M0154 00331000
BNE CCHSTACK STACK A CPEXBLOK @V4M0154 00332000
CALL DMKCCHNT,AFFINITY GO PROCESS CHANNEL CHECK @V4M0154 00333000
LOCK RELEASE,TYPE=SYS,SAVE RELEASE SYSTEM LOCK @V4M0154 00334000
B CCHRET CONTINUE @VA09044 00335000
CCHSTACK DS 0H @V4M0154 00336000
LA R1,X'F00' CHANNEL MASK @VA07955 00337000
NR R1,R3 CHANNEL ADDRESS @VA07955 00338000
SRL R1,8 POSITION FOR COUNT @VA07955 00339000
L R2,CHANOFF CHANNEL MASK BIT @VA07955 00340000
SRL R2,0(R1) POSITION BIT MASK @VA07955 00341000
X R2,FFS INVERT BITS @VA07955 00342000
STCTL C2,C2,TEMPSAVE STORE CONTROL REG 2 @V4M0154 00343000
N R2,TEMPSAVE DISABLE FAILING CHANNEL @V4M0154 00344000
ST R2,TEMPSAVE STORE UPDATED CONTROL REG @V4M0154 00345000
LCTL C2,C2,TEMPSAVE LOAD UPDATED CONTROL REG @V4M0154 00346000
LA R0,CPEXSIZE GET SIZE OF A CPEXBLOK @V4M0154 00347000
CALL DMKFREE OBTAIN A CPEXBLOK FROM FREE STOR @V4M0154 00348000
USING CPEXBLOK,R1 ADDRESSIBILITY TO CPEXBLOK @V4M0154 00349000
LA R15,CCHUNSTK LOAD ADDR RETURN POINT @V4M0154 00350000
STM R15,R12,CPEXADD SAVE REGISTERS @V4M0154 00351000
XC CPEXR13,CPEXR13 INDICATE NO SAVEAREA UPON RETURN@V4M0154 00352000
MVC CPEXPROC,LPUADDR IND UNSTACKING ON THIS PROC @V4M0154 00353000
CALL DMKSTKLF STACK A PRIORITY CPEXBLOK @V4M0154 00354000
GOTO DMKDSPRU RETURN TO DISPATCHER @V4M0154 00355000
DROP R1 @V4M0154 00356000
CCHUNSTK DS 0H ENTERED VIA CPEXBLOK @V4M0154 00357000
L R1,=A(DMKIOSSV) IOS SAVE AREA ADDRESS @VA09587 00358000
ST R6,0(R1) SAVE RCH AND RCU ADDRESS @VA09587 00359000
ST R7,4(R1) IN CASE LOSE CONTROL @VA09587 00360000
LA R1,X'F00' CHANNEL MASK @VA07955 00361000
NR R1,R3 GET INTERUPT ADDRESS @VA07955 00362000
SRL R1,8 SHIFT FOR COUNT @VA07955 00363000
L R2,CHANOFF CHANNEL MASK BIT @VA07955 00364000
SRL R2,0(R1) CORRECTLY POSITION BIT @VA07955 00365000
STCTL C2,C2,TEMPSAVE STORE CONTROL REG FOR UPDATING @V4M0154 00366000
O R2,TEMPSAVE REENABLE FAILING CHANNEL @V4M0154 00367000
ST R2,TEMPSAVE STORE UPDATED CONTROL REG @V4M0154 00368000
LCTL C2,C2,TEMPSAVE LOAD UPDATED CONTROL REG @V4M0154 00369000
.LOKSY7 ANOP 00370000
CALLCCH DS 0H @V4M0154 00371000
CALL DMKCCHNT,AFFINITY GO PROCESS CHANNEL CHECK @V4M0154 00372000
CCHRET EQU * @VA09044 00373000
LTR R7,R7 DO WE HAVE RCUBLOK ? @VA09044 00374000
BM IOTRSTCH NO, START CHANNEL @VA09044 00375000
LTR R8,R8 DO WE HAVE RDEVICE ? @VA09044 00376000
BM IOTRSTCU NO, START CU @VA09044 00377000
IOTCLRCH NI RCHSTAT,X'FF'-RCHBUSY CHANNEL NO-LONGER BUSY @VM08622 00378000
SLR R2,R2 CLEAR... @VM08622 00379000
CL R2,CSW IS CCW ADDRESS+8 EQ. ZERO? @VA01834 00380000
BNE PARIS NON, POSSIBLE HIO... @VA01834 00381000
CH R2,CSW+4 CHANNEL AVAILABLE INTERRUPT? @VA01834 00382000
BE IOTRSTCH YES, RESTART CHANNEL @VA01834 00383000
PARIS LTR R7,R7 MEFIONS-NOUS DU HIO..HANDLE HIO @VA01834 00384000
BNP OFFLINE NO - RCUBLOK NOT FOUND. @VM08622 00385000
TM RCUTYPE,RCUSUB IS IT A SUBORDINATE CU @VA07009 00386000
BZ *+8 NO...BRANCH @VA07009 00387000
L R7,RCUPRIME GET ADDRESS OF THE PRIME @VA07009 00388000
TM RCUSTAT,RCUDISA CONTROL UNIT OFFLINE ? @VM08622 00389000
BO CHTIO YES, SEE IF WE CAN IGNOR @VA09242 00390000
TIORET EQU * @VA09242 00391000
NI RCUSTAT,X'FF'-RCUBUSY C.U. NO-LONGER BUSY @VM08622 00392000
CLI CSW+4,CUE C.U. END INTERRUPT ? @VM08622 00393000
BE IOTRSTCU YES - RESTART C.U. AND CHANNEL @VM08622 00394000
CLC CSW+4(2),=X'7000' CUE+SM+BUSY+0 CHAN STATUS @VA08741 00395000
BE IOTRSTCU YES - RESTART C.U. AND CHANNEL @VA05140 00396000
CLI CSW+4,SM+BUSY C.U. BUSY INTERRUPT @VM08622 00397000
BE IOTGDISP YES - IGNORE THIS INTERRUPT @VM08622 00398000
CLI CSW+4,BUSY DEVICE BUSY INTERRUPT ? @VA01940 00399000
BE IOTGDISP YES - IGNORE THIS INTERRUPT @VA01940 00400000
LTR R8,R8 RDEVBLOK FOUND @VM08622 00401000
BNP TESTCUE NO--TEST UC AND CUE @VA05188 00402000
NI RDEVSTA2,X'FF'-RDEVBUCH RESET DEVICE/CHANNEL @VM08622 00403000
* BUSY 00404000
TM RDEVSTAT,RDEVDISA IS THE DEVICE OFFLINE @VM08622 00405000
BO TESTCUE YES--TEST UC AND CUE @VA05188 00406000
SPACE 1 00407000
L R10,RDEVAIOB CHECK FOR ACTIVE IOBLOK @VM08622 00408000
LTR R10,R10 IS THE DEVICE ACTIVE @VM08622 00409000
BZ IOTUNSOL NO - GO BUILD AN IOBLOK. @VM08622 00410000
CLC INTTIO(2),IOBRADD @VA09325 00410100
BNE IOTGDISP @VA09325 00410200
CLI RDEVTYPC,CLASGRAF GRAF DEVICE? @VA09500 00411100
BNE NO3270 NO @VA07390 00412000
TM RDEVTYPE,TYP3277+TYP3284 3277 OR 3284? @VA09500 00412100
BZ NO3270 NO - BRANCH @VA09500 00412110
CLI CSW+4,CE+DE+UE THIS DEVICE COULD HAVE A BUSY @VA07390 00413000
BE UE3270 CONDITION REQUIRING A WAIT FOR @VA07390 00414000
CLI CSW+4,DE+UE DEVICE END BEFORE RESTARTING @VA07390 00415000
BE UE3270 THIS CHANNEL PROGRAM @VA07390 00416000
NO3270 EQU * @VA07390 00417000
TM CSW+4,ATTN ATTENTION INTERRUPT? @VA05089 00418000
BZ NODIALCK NO - SKIP DIAL CHECK @VA05089 00419000
CLI RDEVTYPC,CLASGRAF IS IT A GRAPHICS DEVICE? @VA05089 00420000
BNE NODIALCK NO -NO NEED TO CHECK FOR DIALING @VA05089 00421000
L R15,ASYSVM SYSTEM VMBLOK @VA05089 00422000
LCTL C1,C1,VMSEG-VMBLOK(R15) SYSTEM SEGMENT TABLE @VA05089 00423000
L R5,=A(DMKDIAIR) GET REAL ADDRESS @VA05089 00424000
LRA R2,0(0,R5) OF DIALIRA @VA05089 00425000
BNZ NODIALCK PAGE NOT RESIDENT @VA05089 00426000
C R2,IOBIRA IS ACTIVE IOB FOR DIALING? @VA05089 00427000
BE IOTGDISP YES - IGNORE THE ATTENTION INT @VA05089 00428000
NODIALCK EQU * @VA05089 00429000
L R5,IOBRADD CHECK IOB STATUS FLAGS FOR ... @VM08622 00430000
IC R5,IOBSPEC2 GET IOBUC & IOBSNSIO BITS @V407438 00431000
N R5,=AL1(0,0,IOBSPLT+IOBERP,IOBUC+IOBSNSIO) @VM08622 00432000
BZ CKSTATUS FURTHER CHECK @VA05406 00433000
TM IOBFLAG,IOBERP ERP IN CONTROL ? @VA09274 00434500
BO CKSENS YES, CHECK NEXT @VA09274 00435000
TM IOBSPEC,IOBUNSL IF UNSOL-INT ? @VA09274 00435500
BZ IOTCKIOB NO, -- IOB IN CONTROL IOS -- @VA09274 00436000
CKSENS EQU * @VA09274 00436500
TM IOBSPEC2,IOBSNSIO DOING A SENSE ? @VA09274 00437000
BO IOTCKIOB YES, PROCESS INT @VA09274 00437500
TM RDEVSTAT,RDEVBUSY IS DEV BUSY ? @VA09274 00438000
BO IOTCKIOB YES, CHECK IOB @VA09274 00438500
TM IOBFLAG,IOBERP ERP IN CONTROL ? @VA09274 00439000
BZ IOTCKIOB NO; GO CHECK IOB STATUS @VA14003 00439600
TM CSW+4,UC YES; IS THERE ANOTHER UNIT CHECK? @VA14003 00439700
BO CNTNGNCY YES; GO CLEAR CONTINGENCY @VA14003 00439800
B IOTGDISP NO; IGNORE THIS INTERRUPT @VA14003 00439900
CKSTATUS EQU * @VA05406 00443000
TM IOBCSW+4,CE HAD THE CHANNEL COMPLETED EARLIER@VA03817 00444000
BO PART YES- SAVE ONLY THE STATUS @VA03817 00445000
MVC IOBCSW(4),CSW SAVE THE FULL CSW IF NO CE OR IF @VA03817 00446000
MVC IOBCSW+6(2),CSW+6 THE OLD STATUS WAS STACKED. @VA03817 00447000
PART OC IOBCSW+4(2),CSW+4 COMBINE THE STATUS. @VA03817 00448000
LA R5,(256*(CE+DE)) NICE CLEAN STATUS BITS. @VM08622 00449000
CH R5,CSW+4 CLEAN CHANNEL + DEVICE END ? @VM08622 00450000
BE TESTCYL YES - CHECK FOR MSS CYL FLT @V60B6B8 00451000
TM CSW+5,PCI+IL @VA13092 00452100
BZ IOTCKIOB NO - CONTINUE @VM08622 00453000
CLI CSW+4,0 ANY UNIT STATUS PRESENT W/PCI @VM08622 00454000
BNE IOTCKIOB YES - PRESENT ALL TOGETHER @VM08622 00455000
TM CSW+5,X'FF'-(PCI+IL) ANY BAD CHANNEL STATUS @VA01616 00456000
BNZ IOTCKIOB YES - CONTINUE @VM08622 00457000
BAL R5,COPYIOB COPY IOBLOK ON PCI INTERRUPTS @VM08622 00458000
B IOTGDISP WAIT FOR FINAL INTERRUPT @VM08622 00459000
EJECT 00460000
IOTUNSOL EQU * UNSOLICITED I/O INTERRUPT @VM08864 00461000
TM CSW+4,ATTN IS IT AN ATTN INTERRUPT @V60B6B8 00462000
BZ UNSOL1 NO, CAN'T BE MSS CYL FLT @V60B6B8 00463000
CLI RDEVTYPC,CLASDASD IS THIS A DASD DEVICE @V60B6B8 00464000
BNE UNSOL1 @V60B6B8 00465000
CLI RDEVTYPE,TYP3330 IS THIS A 3330 DEVICE @V60B6B8 00466000
BNE UNSOL1 NO, CAN'T BE MSS CYL FLT @V60B6B8 00467000
TM RDEVFTR,VIRTUAL+SYSVIRT IS THIS AN MSS VUA @V60B6B8 00468000
BZ UNSOL1 NO, CAN'T BE MSS CYL FLT @V60B6B8 00469000
* 00470000
* THIS IS AN ATTN ON AN MSS VUA. SEE WHETHER THE 00471000
* VIRTUAL MACHINE IS HANDLING CYLINDER 00472000
* FAULTS. IF NOT, CALL DMKSSSI1 TO SCHEDULE 00473000
* THE OPERATION WHICH CAUSED THE ORIGINAL 00474000
* CYLINDER FAULT. 00475000
* 00476000
TM RDEVFLAG,RDEV333V VM HANDLE OWN CYLINDER FAULTS?@VA09299 00477000
BO UNSOL1 YES, CALL STKIO TO REFLECT ATTN @V60B6B8 00478000
CALLMSSA EQU * CALL DMKSSSI1 TO RESTART QUEUED @V60B6B8 00479000
* I/O 00480000
L R15,SSSI1ADD ADDR OF DMKSSSI1 @V60B6B8 00481000
BALR R14,R15 RESTART ANY IOBLOKS, TURN OFF @V60B6B8 00482000
* TIMER 00483000
B IOTRSTDV GO RESTART THE DEVICE @V60B6B8 00484000
UNSOL1 EQU * @V60B6B8 00485000
TM RDEVSTAT,RDEVBUSY IS THERE A WAITING IOBLOK ? @VM08864 00486000
BZ IOTUNSIN NO -- TRULY UNSOLICITED @VM08864 00487000
CLI CSW+4,DE DEVICE END BY ITSELF ? @VM08864 00488000
BE IOTRSTDV YES - RESTART THE DEVICE @VM08864 00489000
NI RDEVSTAT,255-RDEVBUSY NO LONGER BUSY @VM08864 00490000
NI CSW+4,255-DE REMOVE THE DEVICE END @VM08864 00491000
IOTUNSIN EQU * BUILD IOBLOK FOR THIS INTERRUPT @VM08864 00492000
TM RDEVSTA3,RDEVDIIP DIAL IN PROGRESS ? @VA09164 00492150
BNO NODIAL NO @VA09164 00492300
TM CSW+4,ATTN UNSOLICITED ATTENTION ? @VA09164 00492450
BO IOTGDISP YES, IGNORE @VA09164 00492600
NODIAL EQU * @VA09164 00492750
BAL R5,IOTGTIOB BUILD AN IOBLOK @VM08622 00493000
ST R10,RDEVAIOB SAVE ITS ADDR. IN RDEVBLOK @VM08622 00494000
B IOTCKIOB PROCESS THIS INTERRUPT @VM08622 00495000
SPACE 1 00496000
TESTCUE TM CSW+4,UC UNIT CHECK? @VA05188 00497000
BO CNTNGNCY YES--CLEAR CONTINGENCY @VA04771 00498000
TM CSW+4,CUE CONTROL UNIT END? @VA04771 00499000
BO IOTRSTCU YES--RESTART CONTROL UNIT @VA04771 00500000
B IOTGDISP NO--IGNORE INTERRUPT @VA04771 00501000
CHTIO EQU * @VA09242 00502000
L R10,RDEVAIOB GET IOB @VA09242 00503000
LTR R10,R10 IS THERE ONE ? @VA09242 00504000
BNZ ACTIOB YES, SEE IF TIO @VA09738 00504300
TM CSW+4,CUE CONTROL UNIT END ? @VA09738 00504600
BO IOTRSTCU START CONTROL UNIT @VA09738 00504900
B OFFLINE NO, FORGET IT @VA09738 00505200
ACTIOB EQU * @VA09738 00505500
TM IOBSPEC,IOBTIO TIO IOB @VA09242 00506000
BO TIORET YES, FOR TIO CU CAN BE OFFLINE @VA09242 00507000
OFFLINE TM CSW+4,UC UNIT CHECK? @VA05188 00508000
BZ IOTGDISP NO--IGNORE THIS INTERRUPT @VA05188 00509000
CNTNGNCY EQU * @VA04771 00510000
LA R1,CLRSNS GET ADDR. OF SENSE CMD. @VM08622 00511000
ST R1,CAW THIS WILL CLEAR CONTENTION @VM08622 00512000
LH R1,INTTIO GET ADDR. OF INTERRUPTING UNIT @VM08622 00513000
TIO 0(R1) IN CASE CHANNEL END WITH IT. @VM08622 00514000
RSIO SIO 0(R1) NOW CLEAR CONTENTION CONNECTION @VA02863 00515000
BC 2,RSIO KEEP TRYING ON CC=2 @VA02863 00516000
BC 8+1,IOTGDISP EXIT WHEN STARTED OR NOT THERE @VA02863 00517000
TM CSW+4,UC UNIT CHECK WITH SENSE INTERRUPT? @VA02863 00518000
BO IOTGDISP EXIT IF UNIT CHECK PERSISTS @VA03689 00519000
TM CSW+5,CDC+CCC+IFCC CHAN. ERRORS ? @VA03689 00520000
BZ RSIO NO, LOOP @VA03689 00521000
TM CSW,X'04' YES, IS LOGOUT PENDING ? @VA03689 00522000
BO IOTGDISP YES, EXIT SO CHAN. CAN LOGOUT @VA03689 00523000
B RSIO NO, LOOP TO REISSUE SIO @VA03689 00524000
SPACE 00525000
DMKIOTCT DC F'0' COUNT OF I/O INTERRUPTS @VA09587 00526000
EJECT 00527000
*. 00528000
* 00529000
* 5. IF THERE IS A UNIT CHECK INDICATED, CALL IOSENSE (J, BELOW) 00530000
* TO SCHEDULE THE SENSE, THEN EXIT TO DMKDSPCH. IF ERP IS 00531000
* IN CONTROL OF THE TASK, RETURN THE IOBLOK TO THE PROPER 00532000
* ERROR ROUTINE 00533000
* 6. IF THE DEVICE IS STILL ACTIVE (INTERRUPT IS PCI OR CE), 00534000
* COPY AND STACK THE IOBLOK AND CALL THE RECURSIVE RE- 00535000
* START ROUTINE IOSRSTRT (E, BELOW), THEN EXIT TO DMKDSPCH 00536000
* 7. FOR GRAPHICS AND NON-DEDICATED TP LINES, CALL DMKCNSIN TO 00537000
* HANDLE FURTHER PROCESSING 00538000
* 8. IF THE I/O OPERATION HAD AND ERROR AN SENSE BYTES ARE NOW 00539000
* AVAILABLE, RECORD THE ERROR FOR USER TASKS AND ATTEMPT TO 00540000
* RECOVER FOR CP TASKS 00541000
* 9. IF THE INTERRUPT IS DUE TO THE COMPLETION OF A SPLIT SEEK, 00542000
* RECHAIN THE SEEK AND RESCHEDULE THE OPERATION; OTHERWISE 00543000
* 10. CALL DMKSTKIO TO STACK THE IOBLOK FOR THE 2ND LEVEL 00544000
* INTERRUPT HANDLER SPECIFIED VIA IOBIRA AND RESTART ANY 00545000
* UNITS FREED UP BY THE INTERRUPT 00546000
* 00547000
*. 00548000
SPACE 00549000
IOTCKIOB DS 0H CHECK OUT THIS IOBLOK 00550000
TM IOBSPEC2,IOBUC+IOBSNSIO INT. FROM SNS OR WAITING@V407438 00551000
* TO DO THE SENSE OPERATION ? 00552000
BNZ IOTNOSWS YES - PROCEED WITH NORMAL PATH 00553000
L R5,IOBIOER CHECK FOR EXISTANCE OF IOERBLOK 00554000
LTR R5,R5 IS THERE ONE 00555000
BZ IOTNOSWS NO - 00556000
USING IOERBLOK,R5 00557000
TM IOERCSW+5,CDC+CCC+IFCC ARE THERE ANY CHANNEL ERROR'S 00558000
BZ IOTRSTCU NO -- WAIT FOR ERP TO FINISH FIRST ERROR 00559000
TM CSW+5,CDC+CCC+IFCC CHAN ERR WHILE CHAN ERR @VA02014 00560000
BZ IOTRSTCU RECOVERY - NO FORGET IT @VA02014 00561000
DROP R5 00562000
SPACE 00563000
IOTNOSWS EQU * STOP CHARGING SYSTEM, @V407593 00564000
* GET OWNER OF INTERRUPT, AND 00565000
CHARGE SWITCH,IOBUSER START CHARGING HIM @V407593 00566000
TM IOBSPEC2,IOBSNSIO IS THIS A SENSE OPERATION? @V407438 00567000
BZ IOTAVCSW NO - GO SAVE CSW 00568000
L R1,IOBIOER GET IOERBLOK ADDRESS 00569000
USING IOERBLOK,R1 00570000
CLI RDEVTYPC,CLASDASD IS THIS A DASD DEVICE @VA14597 00570100
BNE NORDOCK NO-GET OUT @VA14597 00570150
SR R15,R15 CLEAR OUT REG 15 @VA14597 00570200
ICM R15,B'0111',IOERCSW+1 FAILING CSW+8 @VA14597 00570250
BZ NORDOCK NO IOERCSW-THEN GET OUT @VA14597 00570300
S R15,F8 SUB 8 FAILING CCW @VA14597 00570350
CLI 0(R15),X'FE' WRITE TO READ ONLY DISK @VA14597 00570400
BNE NORDOCK NO-GET OUT @VA14597 00570450
CLI IOERDATA,CMDREJ IS IT A COMMAND REJECT @VA14597 00570500
BNE NORDOCK NO-GET OUT @VA14597 00570550
MVI IOERDATA+1,X'02' TURN ON WRITE INHIBIT SW. @VA14597 00570600
NORDOCK EQU * @VA14597 00570650
LH R0,IOERLEN GET LENGTH OF SENSE 00571000
SH R0,CSW+6 SUBTRACT RESIDUAL COUNT 00572000
STH R0,IOERLEN SAVE NUMBER OF SENSE BYTES 00573000
CLC RDEVTYPC(2),=AL1(CLASDASD,TYP3330) IS IT A 3330 @VA11437 00574010
BNE IOTCHKUC NO, CAN'T BE MSS VUA @V60B6B8 00575000
TM RDEVFTR,VIRTUAL+SYSVIRT IS IT A VUA @V60B6B8 00576000
BZ IOTCHKUC NO, CAN'T BE MSS VUA @V60B6B8 00577000
TM RDEVFLAG,RDEV333V VM HANDLE OWN CYLINDER FAULTS?@VA09299 00578000
BO IOTCHKUC YES, REFLECT UC TO VIRT MACH @V60B6B8 00579000
TESTUC EQU * TEST FOR IMBEDDED SEEK @V60B6B8 00580000
* 00581000
* IF WE REACH THIS POINT, THERE HAS BEEN A UNIT 00582000
* CHECK ON A CHANNEL PROGRAM DIRECTED TO A VUA 00583000
* WHICH IS NOT DEDICATED TO A USER AS A 3330V. 00584000
* 00585000
* TEST TO SEE IF THE SENSE DATA WAS A 'COMMAND 00586000
* REJECT'. IF SO, THE STAGING ADAPTER IS FLAGGING 00587000
* A CYLINDER FAULT ON AN IMBEDDED SEEK. 00588000
* 00589000
* RESET THE PREFIX SEEK CCW TO POINT TO THE FAILING 00590000
* SEEK ARGUMENT AND REISSUE THE I/O, THUS CAUSING 00591000
* THE STANDARD CYLINDER FAULT INDICATION, WHICH 00592000
* WILL LATER BE TRAPPED BY THE TEST AT LABEL 'PART' 00593000
* 00594000
TM IOBCSW+4,UC WAS FIRST CSW UC @V60B6B8 00595000
BZ IOTCHKPR NO, CHECK MSS PREFIX @VMI2013 00596000
TM IOERDATA,CMDREJ WAS SENSE DATA 'CMD REJ' @V60B6B8 00597000
BZ IOTCHKPR NO, CAN'T BE CYL FLT @V60B6B8 00598000
CLI IOERDATA+7,X'0F' MSS UNIQUE ERROR @VMI2023 00599000
BNE IOTCHKPR NO, NOT CYL FLT @VMI2023 00600000
CLI IOERDATA+18,X'03' EMBEDDED SEEK @VMI2023 00601000
BNE IOTCHKPR NO, VALID UNIT CHECK @VMI2023 00602000
L R15,IOERCSW ADDR OF FAILING CCW @VMI2001 00603000
RESETPRE EQU * @V60B6B8 00604000
LA R0,CCWL TO DECREMENT @V60B6B8 00605000
SR R15,R0 POINT TO FAILING CCW @V60B6B8 00606000
L R3,IOBCAW FIRST CCW IN THE CHAIN @V60B6B8 00607000
MVC 1(SEEKPTL,R3),1(R15) SET UP PTR TO SEEK ARGUMENT@V60B6B8 00608000
STCM R15,7,TICOFF(R3) SET UP PREFIX TIC CCW @V60B6B8 00609000
B IOTSTACK GO RESTACK THE IOBLOK @VMI2001 00610000
IOTCHKPR EQU * UC ON 3330V CHAN PROG @V60B6B8 00611000
* 00612000
* TEST TO SEE IF THE ERROR WAS DETECTED ON THE PREFIX 00613000
* CHANNEL PROGRAM. RESET IOBCSW ADDR IF SO. 00614000
* 00615000
L R14,IOBCAW FIRST CCW (PREFIX SEEK) @V60B6B8 00616000
L R15,IOERCSW ADDRESS OF FAILING CSW +8 @VA11460 00617100
CR R15,R14 SEE IF UC IN THE PREFIX @VA11460 00617200
BL IOTCHKUC NO, MUST BE USER CCW @VA11460 00617300
LA R14,PREL(R14) FIRST CCW PAST THE PREFIX @VA11460 00617400
CR R15,R14 SEE IF UC IN THE PREFIX @V60B6B8 00619000
BH IOTCHKUC NO, UC IN USER CCW @VMI2001 00620000
LA R14,CCWL(R14) 8 BYTES PAST FIRST USER CCW @V60B6B8 00621000
STCM R14,7,IOERCSW+1 ERROR IN USER PROGRAM @VMI2001 00622000
B IOTCHKUC AND SET UP THE BLOCK @V60B6B8 00623000
SPACE 00624000
IOTAVCSW DS 0H SAVE CSW IN IOBLOK 00625000
TM IOBCSW+5,CDC+CCC+IFCC ANY CHANNEL ERRORS @VA06201 00626000
BZ PARTCSW1 NO CONTINUE IN LINE CODE @VA06201 00627000
MVC IOBCSW(8),CSW SAVE ENTIRE CSW @VA06201 00628000
B PARTCSW2 BRANCH AROUND FOLLOWING MOVES @VA06201 00629000
PARTCSW1 TM IOBCSW+4,CE HAD THE CHANNEL COMPLETED EARLIER@VA06201 00630000
BO PARTCSW YES- SAVE ONLY THE STATUS @VA03817 00631000
MVC IOBCSW(4),CSW SAVE THE FULL CSW IF NO CE OR IF @VA03817 00632000
MVC IOBCSW+6(2),CSW+6 THE OLD STATUS WAS STACKED. @VA03817 00633000
PARTCSW OC IOBCSW+4(2),CSW+4 COMBINE THE STATUS. @VA03817 00634000
TM IOBCSW+5,PCI PCI? @V408246 00635000
BZ CHKUC NO, BYPASS STANDALONE CHECK @V408246 00636000
CLI IOBCSW+4,0 ANY UNIT STATUS ? @V408246 00637000
BNE CHKUC YES - TEST FOR UNIT CHECK @V408246 00638000
TM IOBCSW+5,255-(PCI+IL) ANYTHING BAD IN CHAN @V408246 00639000
* STATUS 00640000
BZ IOTGDISP IF NOT IGNORE INTERUPT @V408246 00641000
CHKUC DS 0H @V408246 00642000
PARTCSW2 TM IOBSPEC2,IOBUC ERROR TASK WAITING FOR DE? @V407438 00643000
BO DOSENSE YES -- GO DO SENSE NOW 00644000
IOTCHKUC EQU * @VA01599 00645000
TM CSW+5,CDC+CCC+IFCC ANY CHANNEL ERRORS ? 00646000
BNZ IOTIOERR YES, DON'T BUILD IOERBLOK @VA01174 00647000
TM CSW+4,UC WAS THERE A UNIT CHECK ? 00648000
BZ IOTCKPRG NO - TEST FOR OTHER ERRORS 00649000
SPACE 00650000
DOSENSE TM CSW+5,CDC+CCC+IFCC ANY CHANNEL ERRORS ? 00651000
BNZ IOTIOERR YES, DON'T BUILD IOERBLOK @VA01174 00652000
TM IOBFLAG,IOBSPLT ERROR ON D.E. DOING A SPLIT SSEK 00653000
BO IOTREQUE YES - RECHAIN CCW'S AND RE-ISSUE SIO 00654000
BAL R5,IOTENSE OK TO BUILD IOERBLOK IF NO CHAN. ERRORS 00655000
B IOTGDISP IF SENSE STARTED OK, LEAVE NOW -- 00656000
B IOTIOERR IF SENSE DID NOT START, GO RECORD ERROR 00657000
SPACE 00658000
IOTCKPRG TM CSW+5,PRGC+PRTC+CHC PROGRAM, PROTECTION OR CHAINING ERR 00659000
BZ IOTCKERP NO ... 00660000
BAL R5,IOTENSE GO BUILD AN IOERBLOK 00661000
B IOTIOERR RECORD AND STACK IOBLOK @VA00915 00662000
SPACE 00663000
IOTCKERP EQU * @VA01762 00664000
NI IOBSPEC2,X'FF'-(IOBUC+IOBSNSIO) CLEAR ERR. FLAGS@V407438 00665000
TM IOBFLAG,IOBERP IS ERP IN CONTROL @VA01762 00666000
BZ IOTCKBSY NO, SEE IF DEVICE IS STILL BUSY @VA13728 00667100
CLI IOBCSW+4,CE CE ALONE ON CH PGM RESTART ? @VA13728 00667200
BE IOTRSTCU WAIT FOR I/O BEFORE RETURN TO @VA13728 00667300
B IOTCPERR RETURN CONTROL TO ERP NOW @VA13728 00667400
SPACE 00668000
IOTCKBSY TM IOBCSW+4,CE DEVICE STILL BUSY ? 00669000
BZ IOTCECUE BRANCH IF NO 00670000
TM IOBCSW+4,DE+ATTN WITHOUT DEVICE END OR ATTENTION ? 00671000
BNZ IOTCECUE NO -- DEVICE IS FREE 00672000
TM IOBFLAG,IOBPAG+IOBCP IS THIS PAGING IOBLOK? @VA05614 00673000
BO IOTSTACK LET HIM TAKE IT FROM HERE @VA05614 00674000
BAL R5,COPYIOB IF CHANNEL END ONLY AND DEVICE IS BUSY, 00675000
B IOTRSTCU GIVE USER THE INTERRUPT AND RESTART CU 00676000
SPACE 00677000
IOTCECUE DS 0H HERE IF DEVICE IS NOT BUSY 00678000
TM IOBCSW+4,UC WAS THERE A UNIT CHECK @VA07109 00679000
BNZ IOTIOERR YES, CALL THE ERROR ROUTINE 00680000
TM IOBCSW+5,255-(PCI+IL) ANY BAD CHANNEL STATUS @VA07109 00681000
BZ IOTCHKSS NO -- TEST FOR SPLIT SEEK 00682000
SPACE 00683000
IOTIOERR EQU * @VA01762 00684000
NI IOBSPEC2,X'FF'-(IOBUC+IOBSNSIO) CLEAR ERR. FLAGS@V407438 00685000
TM IOBSPEC,IOBTIO WAS IOBLOK MARKED FOR 'TIO' ONLY @VA01762 00686000
BO IOTSTACK YES - BYPASS ERP PROCESSING 00687000
TM IOBFLAG,IOBCP+IOBHVC IS IT A CP GENERATED I/O 00688000
BNZ IOTCPERR YES--GO TRY TO RESTART. 00689000
BAL R5,IOTRECER GO, RECORD USER ERROR . 00690000
B IOTRSTDV AND CONTINUE PROCESSING 00691000
SPACE 00692000
IOTCPERR DS 0H HERE FOR ERRORS IN CP GENERATED I/O 00693000
CLI RDEVTYPC,CLASTERM IS THIS A TERMINAL CLASS ? @V2D3931 00694000
BNE IOTBSC NO, CHECK OTHER CLASES @V2D3931 00695000
TM RDEVSTAT,RDEVDED IS THIS DEVICE DEDICATED @V2D3931 00696000
BO IOTBSC YES, BYPASS CHECK FOR LINE @V2D3931 00697000
TM IOBFLAG,IOBHVC IS THIS A DIAGNOSE REQUEST @V2D3931 00698000
BO IOTBSC YES, BYPASS BISYNC LINE FTN. @V2D3931 00699000
TM RDEVTYPE,TYPBSC IS THIS A BISYNC LINE ? @V2D3931 00700000
BO IOTSERP YES, GO TO ERP SUPPORT @V2D3931 00701000
IOTBSC EQU * @V2D3931 00702000
TM RDEVTYPC,CLASURI+CLASURO+CLASDASD+CLASTAPE @V200820 00703000
BZ IOTSTACK NO ERP - STACK THE IOBLOK @V200820 00704000
TM RDEVTYPC,CLASURI+CLASURO @VA01599 00705000
BZ IOTSERP NO, GO TO EREP SUPPORT @VA01599 00706000
TM IOBFLAG,IOBHVC IS THIS A DIAGNOSE REQUEST @VA01599 00707000
BO IOTSTACK YES, GO STACK THE IOBLOK @VA01599 00708000
IOTSERP EQU * @VA01599 00709000
TM IOBSPEC2,IOBRETRY HAVE ALREADY STACKED CPEX @VA08119 00710000
BZ IOTER ERROR RECOVERY NOT IN PROCESS @VA12941 00711000
TM RDEVSTAT,RDEVNRDY INTERVENTION REQUIRED PENDING @VA12941 00711100
BZ IOTRSTCU NO, IGNORE THIS INTERRUPT @VA12941 00711200
TM CSW+4,DE+ATTN NOT-READY TO READY SEQUENCE @VA12941 00711300
BZ IOTRSTCU NO, IGNORE THIS INTERRUPT @VA12941 00711400
IOTER OI IOBSPEC2,IOBRETRY CONTINUE WITH ERROR RECOVERY @VA12941 00711500
OI IOBFLAG,IOBERP INDICATE ERP IN CONTROL @V408246 00713000
LA R5,IOTRSTCU SET UP RETURN FROM THE CPEXBLOK ROUTINE 00714000
* TO DEQUE THE NEXT IOBLOK AND LET THE 00715000
* SYSTEM GO TO WORK. 00716000
L R2,=A(DMKIOSER) @VA09587 00717000
B IOTGCPEX BUILD A CP EXECUTION BLOCK @VA09587 00718000
* THE NEXT INSTRUCTION 00719000
EJECT 00720000
* 00721000
* WHEN THE FOLLOWING ROUTINE IS ENTERED, WE HAVE 00722000
* RECEIVED A CHANNEL END - DEVICE END 00723000
* 00724000
* TEST TO SEE IF THE REAL DEVICE IS AN MSS VUA 00725000
* IF SO, SEE IF THE CE - DE WAS RECEIVED 00726000
* ON THE NOP CCW. IF IT WAS, TEST TO SEE 00727000
* IF THE CALLING VIRTUAL MACHINE WANTS TO 00728000
* PROCESS CYLINDER FAULTS. IF SO, PASS THE 00729000
* INTERRUPT TO HIM. OTHERWISE, CALL DMKSSS 00730000
* TO QUEUE THIS IOBLOK AND WAIT FOR AN ATTN 00731000
* 00732000
TESTCYL EQU * @V60B6B8 00733000
CLC RDEVTYPC(2),=AL1(CLASDASD,TYP3330) IS IT A 3330 @VA11437 00734010
BNE IOTSTACK NO @V60B6B8 00735000
TM RDEVFTR,VIRTUAL+SYSVIRT IS IT A VUA @V60B6B8 00736000
BZ IOTSTACK NO @V60B6B8 00737000
L R15,IOBCSW ADDR OF ENDING CCW + 8 @V60B6B8 00738000
L R14,IOBCAW ADDR OF THE PREFIX FOR VUA @V60B6B8 00739000
LA R14,PREL(R14) ADDR OF FIRST BYTE PAST NOP @V60B6B8 00740000
LA R15,0(R15) CLEAR HI-ORDER BYTE @V60B6B8 00741000
CR R14,R15 DID WE END ON THE NOP @V60B6B8 00742000
BNE IOTSTACK NOPE, NOT CYL FLT @V60B6B8 00743000
TM RDEVFLAG,RDEV333V VM HANDLE OWN CYLINDER FAULTS?@VA09299 00744000
BO IOTSTACK YES, REFLECT INTERRUPT TO USER @V60B6B8 00745000
L R15,SSSI2ADD ADDR OF DMKSSSI2 ENTRY POINT @V60B6B8 00746000
BALR R14,R15 SAVE THE IOBLOK WITH IOBFLT SET @V60B6B8 00747000
SR R15,R15 CLEAR FOR NEXT INSTR. @VMI2013 00748000
ST R15,RDEVAIOB NO ACTIVE I/O @VMI2013 00749000
NI RDEVSTAT,X'FF'-RDEVBUSY TURN OFF BUSY BIT @VA09589 00749100
B IOTTEXIT AND RETURN @V60B6B8 00750000
SPACE 00751000
IOTCHKSS TM IOBFLAG,IOBSPLT IS THIS A SPLIT SEEK ? 00752000
BO IOTREQUE YES -- GO RESTART THE OPERATION 00753000
SPACE 00754000
IOTSTACK DS 0H HERE TO 00755000
CALL DMKSTKIO STACK THE IOBLOK 00756000
* STOP CHARGING FOR INTERRUPT AND 00757000
* START CHARGING RESTARTED USER 00758000
CHARGE SWITCH,ASYSVM @V407593 00759000
B IOTRSTDV @VA09587 00760000
SPACE 00761000
IOTTART EQU * ISSUE SIO @VA09587 00762000
GOTO DMKIOSST @VA09587 00763000
IOTRSTDV EQU * RESTART DEVICE-CU-CH @VA09587 00764000
GOTO DMKIOSRS @VA09587 00765000
IOTREQUE EQU * REQUE REQUEST @VA09587 00766000
GOTO DMKIOSRQ @VA09587 00767000
IOTRSTCU EQU * RESTART CU @VA09587 00768000
GOTO DMKIOSRU @VA09587 00769000
IOTRSTCH EQU * RESTART CH @VA09587 00770000
GOTO DMKIOSRH @VA09587 00771000
CALLERP EQU * PERFORM ERROR RECOVERY @VA09587 00772000
GOTO DMKIOSRY @VA09587 00773000
EJECT 00774000
IOTTEXIT LTR R13,R13 WAS ENTRY TO IOS FROM A "CALL" 00775000
BNZ IOTRETRN YES, RETURN TO CALLER 00776000
SLR R3,R3 SET BRANCH INDEX TO ZERO @V407438 00777000
CL R6,RCHRSTQ DID WE RESTART DIFF. CHAN ON INT?@V407438 00778000
BE CHKCU NOPE, GO CHECK CTL UNIT @V407438 00779000
L R4,RCHRSTQ GET INTERRUPTING CHANNEL ADDR @V407438 00780000
ST R6,RCHRSTQ RESTARTED CHANNEL IS DONE NOW @V407438 00781000
LR R6,R4 SET TO INT. CHAN FOR 2ND RESTART @V407438 00782000
LA R3,4(R3) SET FOR CHANNEL CHANGE ONLY @V407438 00783000
CHKCU LTR R7,R7 DOES CU EXIST (COULD BE CH AVAIL)@V407438 00784000
BNP BRESTART(R3) NOPE, GO TO DISP OR CH RESTART @V407438 00785000
CL R7,RCURSTQ DID WE RESTART DIFF. CU ON INT? @V407438 00786000
BE BRESTART(R3) NOPE, GO TO DISP OR CH RESTART @V407438 00787000
L R5,RCURSTQ GET INTERRUPTING CTL UNIT ADDR @V407438 00788000
ST R7,RCURSTQ RESTARTED CTL UNIT IS DONE NOW @V407438 00789000
LR R7,R5 SET TO INT. CU FOR 2ND RESTART @V407438 00790000
LA R3,8(R3) SET FOR CTL UNIT CHANGE @V407438 00791000
C R3,=F'12' @V407438 00792000
BNE BRESTART(R3) @V407438 00793000
B *+4(R3) GO TO EXIT OR RESTART ROUTINE @V407438 00794000
SPACE 00795000
BRESTART B IOTGDISP EXIT FORTHWITH @V407438 00796000
B IOTRSTCH CH CHANGE ONLY, RESTART INT CH @V407438 00797000
B IOTRSTCU CU CHANGE ONLY, RESTART INT CU @V407438 00798000
B IOTRSTCU CH & CU CHNGE, RESTRT FROM INT CU@V407438 00799000
EJECT 00800000
SPACE 00801000
* STOP CHARGING FOR RESTART, AND 00802000
* RE-ESTABLISH RUNUSER FOR DISPATCH 00803000
* START CHARGING HIM 00804000
IOTGDISP CHARGE SWITCH,LASTUSER @V407511 00805000
AIF (NOT &AP).LOKSY8 00806000
* IF MPSYSLOCK CAN BE OBTAINED, 00807000
* THEN GOTO DSPCH, OTHERWISE, 00808000
* GOTO DSPRU 00809000
TM APSTAT1,APUOPER RUNNING IN ATTACHED MODE @V407511 00810000
BZ GOTOCH NO, GOTO DSPCH @V407511 00811000
L R15,=A(DMKLOKSY+2) GET ADDR OF SYSTEM LOCK @V407511 00812000
CLC LPUADDR,0(R15) DO I ALREADY HAVE THE SYSTEM LOCK@V407511 00813000
BE GOTOCH YES, GOTO DSPCH @V407511 00814000
LOCK OBTAIN,TYPE=SYS,SPIN=NO @V407593 00815000
BNE GOTODSPA COULDNT GET LOCK - GOTO DSPA @V4M0173 00816000
.LOKSY8 ANOP 00817000
GOTOCH GOTO DMKDSPCH @V407593 00818000
GOTODSPA GOTO DMKDSPA GO TRY TO REDISPATCH RUNUSER @V4M0173 00819000
IOTRETRN DS 0H HERE TO EXIT FROM RESTART 00820000
* STOP CHARGING RESTARTED USER 00821000
* GET CALLERS R11 AND 00822000
* START CHARGING HIM 00823000
CHARGE SWITCH,SAVER11 @V407593 00824000
EXIT RETURN TO CALLER 00825000
EJECT 00826000
SPACE 00827000
PTHSAVE DC 2F'0' A(CHANNEL) & A(CTL UNIT) ON ENTRY@V407438 00828000
EJECT 00829000
*. 00830000
* 00831000
* H. OPERATION OF IOTGTIOB - 00832000
* 1. IOTGTIOB IS CALLED WHEN AN UNSOLICITED INTERRUPT MUST BE 00833000
* STACKED FOR FURTHER PROCESSING 00834000
* 2. AN IOBLOK IS OBTAINED FROM FREE STORAGE 00835000
* 3. AN APPROPRIATE IRA IS SELECTED FOR THE IOBLOK, BASED ON 00836000
* THE DEVICE TYPE OF THE INTERRUPTING UNIT 00837000
* 4. IF THE DEVICE IS DEDICATED, FILL IN THE VIRTUAL ADDRESS 00838000
* AND THE USER 00839000
* 5. EXIT TO CALLER 00840000
* 00841000
*. 00842000
SPACE 00843000
IOTGTIOB DS 0H 00844000
LM R2,R3,CSW SAVE CSW @VA0706 00845000
LH R4,INTTIO SAVE INTERRUPT DEVICE ADDR. @VA0706 00846000
LA R0,IOBSIZE SIZE OF AN IOBLOK 00847000
CALL DMKFREE GET ONE 00848000
LR R10,R1 THE USUAL BASE 00849000
XC IOBLOK(IOBSIZE*8),IOBLOK ZERO IT OUT 00850000
ST R10,IOBLINK IOBLOK POINTS TO ITSELF (= ORIGINAL COPY) 00851000
STH R4,IOBRADD ADDR INTERRUPTED DEV. INTO IOBLOK @VA0706 00852000
STM R2,R3,CSW RESTORE CSW @VA0706 00853000
L R1,ASYSVM GET ADDRESS OF SYSTEM VMBLOK 00854000
ST R1,IOBUSER ASSUME ACCOUNTING FOR SYSTEM. 00855000
L R0,ASYSVM GET SYSTEM VMBLOK PTR. @VA04573 00856000
LTR R8,R8 IS THERE A RDEVBLOK ? 00857000
BNP IOTGTIGN NO -- 00858000
CLI RDEVTYPC,CLASDASD DASD DEVICE ? @VA04680 00859000
BE IOTGTCON YES..LET IT GO... @VA04680 00860000
TM APSTAT1,CPINITD IS CPI FINISHED @VA07842 00861000
BO IOTGTCON YES, LET IT GO @VA07842 00862000
L R14,=A(DMKRIOCN) CONSOLE TABLE POINTER @VA05684 00863000
CLC INTTIO(2),2(R14) IS IT PRIMARY CONSOLE? @VA05684 00864000
BE IOTGTCON YES, PROCESS INTERRUPT @VA05684 00865000
LA R14,4(R14) POINT TO COUNT OF ALT. CONSOLES @V60BCAA 00866000
L R1,0(R14) ACCESS NUMBER OF ALT. CONSOLES @V60BCAA 00867000
ALTLOOP LTR R1,R1 ANY MORE ALTERNATE CONSOLES? @V60BCAA 00868000
BZ IOTGTIGN NO, IGNORE INTERRUPT @V60BCAA 00869000
BCTR R1,0 DECREMENT COUNT FOR NEXT TIME @V60BCAA 00870000
* THROUGH LOOP 00871000
LA R14,4(R14) POINT TO NEXT ALT. CONSOLE DATA @V60BCAA 00872000
CLC INTTIO(2),2(R14) IS THIS AN ALTERNATE CONSOLE? @V60BCAA 00873000
BE IOTGTCON YES, PROCESS INTERRUPT @V60BCAA 00874000
B ALTLOOP GO SEE IF IT IS ANOTHER ALT CONS @V60BCAA 00875000
IOTGTCON EQU * @VA04680 00876000
TM RDEVSTAT,RDEVDED IS THE DEVICE DEDICATED ?? 00877000
BO IOTGTDED YES -- 00878000
OI IOBFLAG,IOBCP FLAG AS CP IO 00879000
L R1,=A(DMKCNSIN) CLASTERM INTERRUPT HANDLER @V200820 00880000
CLI RDEVTYPC,CLASTERM ? @V200820 00881000
BNE *+20 NO, BYPASS TERMINAL SUPPORT @V2D3931 00882000
CLI RDEVTYPE,TYPBSC IS THIS A BISYNC LINE - 3270 @V2D3931 00883000
BNE IOTGTUSR NO, SET UP IOBUSER & IOBIRA @V2D3931 00884000
L R1,=A(DMKRGAIN) 3270 REMOTE INTERRUPT HANDLER @V305798 00885000
B IOTGTUSR SET UP IOBUSER & IOBIRA @V2D3931 00886000
L R1,=A(DMKRSPEX) SPOOL INTERRUPT HANDLER @V200820 00887000
TM RDEVTYPC,CLASURI+CLASURO SPOOL DEVICE ? @V200820 00888000
BNZ IOTGTUSR YES - SETUP IOBIRA@V200820 00889000
L R1,=A(DMKDSBRD) CLASDASD ASYNCHRONOUS I/O @VA08187 00890000
CLI RDEVTYPC,CLASDASD IS THIS DIRECT ACCESS ? @V200820 00891000
BE IOTGTIRA YES, SET IOBUSER @VA01672 00892000
L R1,=A(DMKGRFIN) CLASGRAF INTERRUPT HANDLER @V200820 00893000
CLI RDEVTYPC,CLASGRAF GRAPHIC DEVICE ? @V200820 00894000
BE IOTGTCHK YES - CHECK FOR PROCESSOR @V200820 00895000
L R1,=A(DMKRNHIN) CLASSPEC INTERRUPT HANDLER @V200820 00896000
CLI RDEVTYPC,CLASSPEC SPECIAL DEVICE ? @V200820 00897000
BE IOTGTCHK YES - CHECK FOR PROCESSOR @V200820 00898000
* B IOTGTIGN IGNORE THE INTERRUPT 00899000
EJECT 00900000
IOTGTIGN EQU * IGNORE THE INTERRUPT @V200820 00901000
LA R1,IOTIGNOR SET IOBIRA = A(IOSIGNOR) @V200820 00902000
B IOTGTIRA @V200820 00903000
IOTGTCHK EQU * CHECK FOR 'SOMETIMES' MODULES @V200820 00904000
LTR R1,R1 DOES THE INTERRUPT HANDLER EXIST @V200820 00905000
BZ IOTGTIGN NO -- IGNORE THE INTERRUPT @V200820 00906000
B IOTGTUSR @V200820 00907000
IOTGTDED EQU * SET FOR DEDICATED DEVICE @V200820 00908000
L R1,=A(DMKVIOIN) VIRTUAL I/O INTRPT HANDLER @VA07486 00909000
LH R0,RDEVATT VIRTUAL DEVICE ADDRESS @V200820 00910000
STH R0,IOBVADD ...INTO IOBLOK FOR DMKVIO @V200820 00911000
IOTGTUSR EQU * SET IOBUSER = RDEVUSER @V200820 00912000
L R0,RDEVUSER @V200820 00913000
TM RDEVTYPC,CLASURO IS IT A 3800 PRINTER ? @V60B9BA 00914000
BZ IOTGTIRA XFER IF NOT @V60B9BA 00915000
CLI RDEVTYPE,TYP3800 IS IT REALLY A 3800 ? @V60B9BA 00916000
BNE IOTGTIRA XFER IF NOT @V60B9BA 00917000
TM RDEVSTAT,RDEVDED ATTACHED TO A USER? @V60B9BA 00918000
BO IOTGTIRA XFER, RDEVUSER IS OK @V60B9BA 00919000
L R0,ASYSVM BETTER LOAD SYSTEM VMBLOK @V60B9BA 00920000
IOTGTIRA EQU * SET IOBUSER, IOBIRA FIELDS @V200820 00921000
ST R0,IOBUSER @V200820 00922000
ST R1,IOBIRA @V200820 00923000
OI IOBSPEC,IOBUNSL FLAG AS UNSOLICITED INTRUPT @V200820 00924000
BR R5 AND EXIT TO CALLER 00925000
EJECT 00926000
COPYIOB EQU * HERE TO COPY IOBLOKS FOR NON-DEVICE-END INTERRUPTS 00927000
LA R0,IOBSIZE GET IOBLOK SIZE 00928000
CALL DMKFREE GET CORE 00929000
CL R10,RDEVAIOB STILL ACTIVE OVER THE CALL ? @VA03817 00930000
BNE FRETCOPY NO- SYSTEM EXTENDED, INT CAME IN @VA03817 00931000
TM IOBCSW+4,CE IF CHANNEL END WITH... @VA03817 00932000
BZ COPYBLOK DEVICE END OR ATTENTION... @VA03817 00933000
TM IOBCSW+4,DE+ATTN THAN DON'T COPY THE IOBLOK, @VA03817 00934000
BZ COPYBLOK ENDING STATUS WAS RECEIVED..@VA03817*00935000
WHILE THE SYSTEM WAS EXTENDING FREE STORAGE. 00936000
FRETCOPY CALL DMKFRET FRET BLOCK, ENDING STATUS CAME IN@VA03817 00937000
BR R5 THEN RETURN TO THE CALLER @VA03817 00938000
SPACE 1 00939000
COPYBLOK EQU * HERE IF ENDING STATUS NOT RECEIVED FOR THE DEVICE 00940000
MVC 0(IOBSIZE*8,R1),0(R10) COPY THE BLOK 00941000
* NOTE: "IOBLINK" IN COPIED IOBLOK DOES 00942000
* NOT "POINT TO ITSELF" - INDICATING THAT 00943000
* THIS IS "NOT THE FINAL INTERRUPT". 00944000
LR R2,R10 SAVE THE ADDRESS OF THE OLD BLOK @VA04182 00945000
LR R10,R1 GET ADDRESS OF NEW BLOK 00946000
SLR R1,R1 CLEAR IOERBLOK POINTER @VA01225 00947000
ST R1,IOBIOER . . .TO AVOID DOUBLE FRET @VA01225 00948000
CALL DMKSTKIO STACK THE IOBLOK 00949000
LR R10,R2 RESTORE ADDRESS OF OLD BLOK @VA04182 00950000
XC IOBCSW(8),IOBCSW ZERO OLD CSW FOR NEXT INT. @VA03817 00951000
BR R5 AND RETURN TO CALLER 00952000
EJECT 00953000
SPACE 00954000
IOTIGNOR DS 0H 00955000
LA R0,IOBSIZE SIZE OF IOBLOK 00956000
IOTIGN01 LR R1,R10 AND ITS ADDRESS 00957000
L R2,IOBIOER IOERBLOK ADDRESS IF THERE IS ONE @V200820 00958000
CALL DMKFRET RETURN IOBLOK TO FREE STORAGE 00959000
L R12,ADSPCH A(DMKDSPCH) FOR 'GOTO'-STYLE EXIT@V200820 00960000
LTR R1,R2 WAS THERE AN IOERBLOK ? @V200820 00961000
BCR 8,R12 NO -- GOTO DMKDSPCH @V200820 00962000
LA R0,IOERSIZE IOERBLOK SIZE IN DOUBLE-WORDS @V200820 00963000
AH R0,IOEREXT-IOERBLOK(,R1) ...PLUS EXTENSION @V200820 00964000
CALL DMKFRET RELEASE THE IOERBLOK @V200820 00965000
BR R12 GOTO DMKDSPCH @V200820 00966000
SPACE 00967000
EJECT 00968000
* 00969000
* QUEUE AN IOBLOK FIRST ON REAL DEVICE QUEUE 00970000
* 00971000
UE3270 EQU * @VA07390 00972000
SLR R1,R1 CLEAR FOR INSERT @VA07390 00973000
IC R1,RDEVQCNT ADD 1 TO COUNT OF IOBLOKS @VA07390 00974000
LA R1,1(R1) QUEUED OFF THIS DEVICE BLOCK @VA07390 00975000
STC R1,RDEVQCNT @VA07390 00976000
LR R2,R8 SAVE BACK CHAIN POINTER @VA07390 00977000
L R1,RDEVFIOB POINT TO 1ST IOBLOK @VA07390 00978000
STM R1,R2,IOBFPNT STORE FWD & BWD CHAIN POINTERS @VA07390 00979000
ST R10,RDEVFIOB INSERT NEW 1ST IOBLOK @VA07390 00980000
ST R10,IOBBPNT-IOBLOK(R1) BACK CHAIN POINTER @VA07390 00981000
SLR R10,R10 @VA07390 00982000
ST R10,RDEVAIOB CLEAR ACTIVE IOBLOK @VA07390 00983000
NI RDEVSTA2,255-RDEVRACT THIS DEVICE NOT BEING @VA08381 00984000
* RESET 00985000
OI RDEVSTAT,RDEVBUSY IT IS BUSY @VA07390 00986000
B IOTGDISP NOW WAIT FOR DEVICE END @VA07390 00987000
EJECT 00988000
*. 00989000
* 00990000
* J. OPERATION OF IOTENSE - 00991000
* 1. FLAG THE IOBLOK AS AN ERROR TASK 00992000
* 2. IF THE DEVICE IS STILL BUSY, EXIT TO CALLER TO WAIT FOR THE 00993000
* DEVICE END 00994000
* 3. IF THE DEVICE IS FREE, START THE SENSE AND EXIT TO CALLER 00995000
* 00996000
*. 00997000
SPACE 00998000
IOTENSE EQU * HERE TO SENSE ALL UNITS @VA09137 00999100
TM IOBSPEC2,IOBSNSIO UC WHILE ATTEMPTING SENSE @VA09137 01000100
BO IOTENBAD TROUBLE -INTERRUPT TIME - SENSE @VA10398 01016010
TM IOBSPEC2,IOBUC FIRST ENTRY AFTER UNIT CHECK? @V407438 01017000
BZ IOTGTERR YES -- GO BUILD ERROR BLOK 01018000
L R4,IOBIOER GET ADDRESS OF ERROR BLOK 01019000
USING IOERBLOK,R4 @VM01071 01020000
TM RDEVSTAT,RDEVDED IS DEVICE DEDICATED? @VA03834 01021000
BO IOTETCAW YES--GIVE CURRENT STATUS ONLY @VA03834 01022000
OC IOBCSW(8),IOERCSW ADD OLD CSW TO NEW CSW @VM01071 01023000
B IOTETCAW AND GO START SENSE 01024000
SPACE 01025000
IOTGTERR DS 0H SET ERROR CONTROL BLOKS 01026000
LA R0,IOERSIZE GET ERROR RECORDING BLOK 01027000
CALL DMKFREE -- 01028000
ST R1,IOBIOER AND SAVE ITS ADDRESS 01029000
LR R4,R1 AND USE GPR4 FOR ADDRESSABILITY 01030000
XC IOERBLOK(IOERSIZE*8),IOERBLOK CLEAR TO ZEROES 01031000
MVC IOERCSW,IOBCSW SAVE UNIT CHECK CSW 01032000
TM IOBCSW+4,UC UNIT CHECK PRESENT @VA01599 01033000
BCR 8,R5 NO, RETURN TO IN LINE CODE @VA01599 01034000
LM R0,R1,IOTSNCCW GET MODEL SENSE CCW @VA09137 01034100
ALR R0,R4 ADJUST DATA ADDRESS @VA09137 01034150
STM R0,R1,IOERCCW SAVE IN IOERBLOK @VA09137 01034200
OI IOBSPEC2,IOBUC FLAG ERROR TASK @VA09137 01034250
TM IOBSPEC,IOBTIO+IOBHIO WAS THIS A SIO REQUEST @VA01599 01035000
BNZ IOTPERP NO, GET SENSE CCW @VA01599 01036000
TM IOBFLAG,IOBCP+IOBHVC IS THIS A CP OR DIAGNOSE @VA01599 01037000
* REQUEST 01038000
BNZ NOT3203 YES, GO AROUND 3203 CODE @VA09137 01039050
TM RDEVSTAT,RDEVDED DEVICE DEDICATED ? @VA09137 01039100
BNO IOTPERP NO,NO CHECK FOR 3203 @VA09137 01039150
CLC RDEVTYPC(2),=AL1(CLASURO,TYP3203) 3203 PRINTER? @VA09137 01039200
BNE IOTPERP NO, GET SENSE CCW @VA09137 01039250
CLC CSW+4(2),=AL1(CE+UC,0) SPECIAL 3203 INTERRUPT? @VA09137 01039300
BE SPECINT SPECIAL 3203 INTERRUPT @VA14489 01039360
CLC CSW+4(2),=AL1(CE+UC+IL,0) SPECIAL 3203 @VA14489 01039365
* INTERRUPT? 01039370
BNE IOTPERP NO, GET SENSE CCW @VA14489 01039375
SPECINT EQU * @VA14489 01039380
OI IOBSPEC3,IOBPST TELL VIO TO POST @VA09137 01039400
LR R3,R5 SAVE R5 IN R3 ACROSS BAL @VA09137 01039450
BAL R5,COPYIOB REFLECT THIS INTERRUPT @VA09137 01039500
LR R5,R3 RESTORE R5 @VA09137 01039550
NI IOBSPEC3,255-IOBPST TURN OFF POST @VA09137 01039600
B SNS3203 DO TIO @VA09137 01039650
NOT3203 EQU * @VA09137 01039700
OI IOBFLAG,IOBERP SET INDICATOR FOR ERP SUPPORT @VA01599 01040000
IOTPERP EQU * @VA01599 01041000
SPACE 01046000
TM IOBCSW+4,CE IS THE DEVICE FREE ? @VA01068 01047000
BZ IOTETCAW YES -- GO START THE SENSE 01048000
TM IOBCSW+4,DE+ATTN IS DEVICE STILL BUSY ? @VA01068 01049000
BNZ IOTETCAW NO, ISSUE SENSE COMMAND 01050000
LH R1,IOBRADD GET REAL DEVICE ADDRESS @VM01011 01051000
XC CSW(8),CSW CLEAR THE REAL CSW @VM01011 01052000
TIO 0(R1) SEE IF IT'S REALLY BUSY @VM01011 01053000
BC 8+1,IOTETCAW GO AHEAD WITH THE SENSE @VM01011 01054000
BC 2,IOTENSWT REALLY BUSY - WAIT FOR IT @VM01011 01055000
TM CSW+4,DE+UC+ATTN ENDING STATUS ? @VM01011 01056000
BZ IOTENSWT NO -- WAIT FOR IT @VM01011 01057000
OI IOBCSW+4,DE FAKE DEVICE END REGARDLESS @VM01011 01058000
B IOTETCAW AND GO AHEAD WITH THE SENSE @VM01011 01059000
IOTENSWT EQU * @VM01011 01060000
TM RDEVSTAT,RDEVDED IS DEVICE DEDICATED 01061000
BO COPYIOB YES, COPY IOBLOK FOR DEDICATED USER'S 01062000
BR R5 MUST WAIT FOR DEVICE END 01063000
SPACE 01063100
SNS3203 EQU * 3203 TIO CODE FOR 0A STATUS @VA09137 01063150
LH R1,IOBRADD GET REAL DEVICE ADDRESS @VA09137 01063200
XC CSW(8),CSW CLEAR CSW @VA09137 01063250
TIO 0(R1) IS IT BUSY ? @VA09137 01063300
BC 8+1,IOTETCAW GO AHEAD WITH SENSE @VA09137 01063350
BCR 2,R5 WAIT FOR DEVICE END @VA09137 01063400
TM CSW+4,DE DEVICE END ? @VA09137 01063450
BZR R5 NO, WAIT FOR IT @VA09137 01063500
OI IOBCSW+4,DE SET DE FOR REFLECTION @VA09137 01063550
B IOTETCAW GO DO SENSE @VA09137 01063600
SPACE 3 01064000
EJECT 01065000
IOTETCAW DS 0H 01066000
LA R1,IOERCCW GET ADDRESS OF SENSE CCW 01067000
ST R1,CAW SET UP CHANNEL ADDRESS WORD 01068000
XI IOBSPEC2,IOBUC+IOBSNSIO UNFLAG UC, FLAG SENSE @V407438 01069000
LH R1,IOBRADD GET DEVICE ADDRESS 01070000
OI RDEVSTA2,RDEVCONC ALLOW PRESERVATION OF @VA01044*01071000
CONTINGENT CONNECTION FOR VIRTUAL USER. @VA01044 01072000
CLI RDEVTYPC,CLASGRAF GRAF DEVICE? @VA09500 01073100
BNE IOTNSIO1 NO, NOT 3270 TYPE @VA05088 01074000
TM RDEVTYPE,TYP3277+TYP3284 3277 OR 3284? @VA09500 01074100
BZ IOTNSIO1 NO - BRANCH @VA09500 01074110
LA R15,2000(R0) LOAD COUNT FOR 3270 @VA05088 01075000
B IOTNSIO GO TO SIO FOR SENSE @VA05088 01076000
RETYCNT DC F'40000' RETRY COUNT @VA09500 01076100
IOTNSIO1 EQU * @VA05088 01077000
L R15,RETYCNT LOAD RETRY COUNT @VA09500 01078100
IOTNSIO SIO 0(R1) ATTEMPT TO DO SENSE 01079000
BCR 8,R5 SENSE STARTED -- GO WAIT FOR INTERRUPT 01080000
BC 1,IOTENFAL ERROR FOR CC = 3 ON SIO 01081000
BC 4,IOTNCC1 GO CHECK OUT CSW FOR CC = 1 ON SIO 01082000
TM RCHTYPE,RCHBMX BUSY VALID ONLY ON BLOCK MULTIPLEXOR 01083000
BZ IOTINBAD OTHERWISE, PROBABLE FAILURE @VA01350 01084000
CLI RDEVTYPC,CLASGRAF GRAF DEVICE @VA09500 01085100
BNE NOTGRAF1 NO-BRANCH @VA09500 01085200
TM RDEVTYPE,TYP3277+TYP3284 @VA09500 01085300
BM IOTINBAD IF EITHER LIMITED RETRY @VA09500 01085400
NOTGRAF1 DS 0H @VA09500 01085500
B IOTNSIO FOR BMPX, LOOP UNTIL STARTED 01087000
SPACE 01088000
IOTNCC1 TM CSW+4,X'FF'-(SM+CUE+BUSY) U.C.OR IRREG STATUS? @VX04718 01089000
BNZ IOTINBAD YES,RETRY 16 TIMES @VX04718 01090000
CLI RDEVTYPC,CLASGRAF GRAF DEVICE @VA09500 01091100
BNE NOTGRAF2 NO-BRANCH @VA09500 01091200
TM RDEVTYPE,TYP3277+TYP3284 @VA09500 01091300
BM ROUT3277 @VA09500 01091400
NOTGRAF2 DS 0H @VA09500 01091500
CLI CSW+4,BUSY IS IT JUST A DEVICE BUSY @VA12629 01093100
BE IOTINBAD YES USE LIMITED RETRY @VA12629 01093200
TM CSW+4,SM+CUE+BUSY CUE OR CU PENDING @VA12629 01093300
BNZ IOTNSIO YES UNLIMITED RETRY @VX04718 01094000
NOUN3277 EQU * @VA05088 01095000
TM CSW+5,X'FF' ANY BAD CHANNEL STATUS 01096000
BZ IOTNSIO NO, RETRY SENSE COMMAND 01097000
TM CSW+5,IFCC+CCC IS THIS A CHANNEL DATA CHECK @VA01599 01098000
BNZ IOTENFAL NO, GO INDICATE SENSE FAILED @VA01599 01099000
SPACE 01100000
IOTINBAD DS 0H RETRY FOR 'UC' OR BUSY ON SENSE @VA01350 01101000
BCT R15,IOTNSIO RETRY 16 TIMES @VA01350 01102000
SPACE 01103000
IOTENFAL DS 0H HERE IF THE SENSE HAS FAILED 01104000
MVC IOERLEN,ZEROES SENSE NOT AVAILABLE @VA10398 01104010
IOTENBAD DS 0H @VA10398 01104020
NI IOBSPEC2,X'FF'-IOBSNSIO SENSE NOT GOING -- @V407438 01105000
NI RCHSTAT,X'FF'-RCHBUSY RESET CHANNEL BUSY 01106000
NI RCUSTAT,X'FF'-RCUBUSY RESTE CU BUSY 01107000
OI IOBSTAT,IOBFATAL SENSE HAS FAILED @VA01581 01108000
B 4(,R5) TAKE ERROR EXIT - 01109000
ROUT3277 TM CSW+4,SM+CUE+BUSY @VA05088 01110000
BNZ IOTINBAD DO LIMITED RETRY @VA05088 01111000
B NOUN3277 GO CHECK OTHER CONDITIONS @VA05088 01112000
SPACE 01113000
IOTSNCCW CCW 4,IOERDATA-IOERBLOK,SILI,IOERSNSZ MDL SENSE CCW @V407438 01114000
DROP R4 01115000
CLRSNS CCW 4,*-*,SILI+SKIP,24 CLEAR CONTENTION CONNECTION @VM08622 01116000
EJECT 01117000
IOTRECER DS 0H SET UP TO RECORD IOERROR 01118000
L R0,RDEVIOER GET PRIMARY IOERBLOK 01119000
LTR R0,R0 ANY QUEUED ?? 01120000
BZ IOTGTEX NO -- USE IOBIOER 01121000
ST R0,IOBIOER AND CHAIN TO IOBLOK 01122000
SR R0,R0 CLEAR OUT 01123000
ST R0,RDEVIOER REVBLOK POINTER 01124000
IOTGTEX EQU * GET A CPEXBLOK TO STACK 01125000
L R2,=A(DMKIOSRC) @VA09587 01126000
SPACE 2 01127000
IOTGCPEX EQU * BUILD AND STACK CPEXBLOK 01128000
LA R0,CPEXSIZE GET A CP REQUEST BLOK 01129000
CALL DMKFREE 01130000
USING CPEXBLOK,R1 01131000
LR R15,R2 SET THE RETURN TO EXECUTION ADDRESS 01132000
* SET UP BY THE CALLER 01133000
XC CPEXR13(4),CPEXR13 ZERO OUT REG 13 (NO SAVE AREA) 01134000
STM R15,R12,CPEXADD AND SAVE REGISTERS 01135000
L R3,=A(DMKIOSSV) @VA09587 01136000
L R14,0(R3) @VA09587 01137000
L R15,4(R3) @VA09587 01138000
ST R14,CPEXR0 IN CASE LOSE CONTROL @VA07225 01139000
ST R15,CPEXR1 IN CASE LOSE CONTROL @VA07225 01140000
CALL DMKSTKMP STACK REQ. ON MAIN(I/O) PROC. @V407593 01141000
BR R5 AND RETURN TO CALLER 01142000
SPACE 3 01143000
CHANOFF DC A(X'80000000') MASK FOR DISABLING CHANNEL @VA07955 01144000
SPACE 3 01145000
CCWL EQU 8 CCL LENGTH @V60B6B8 01146000
SEEKPTL EQU 3 LENGTH OF PTR TO SEEK ARG @V60B6B8 01147000
TICOFF EQU 9 OFFSET TO CCW PTR IN TIC @V60B6B8 01148000
PREL EQU 24 LENGTH OF PREFIX @V60B6B8 01149000
SSSI1ADD DC V(DMKSSUI1) @VA11455 01150010
SSSI2ADD DC V(DMKSSUI2) @VA11455 01150020
* CONSTANTS 01152000
SET EQU X'FF' USED TO TEST IF FLAG IS SET @V407593 01153000
IOTRCODE EQU 5 TRACE-TABLE FLAG FOR I/O INTERRUP@V407593 01154000
SKSHDR EQU 6 SEEKS HEADER LENGTH @V60BEBC 01155000
INCLUDE EQU X'80' SEEKS INCLUDE OPTION @V60BEBC 01156000
EXCLUDE EQU X'40' SEEKS EXCLUDE OPTION @V60BEBC 01157000
SEEKCL EQU X'01' SEEKS MONITOR MASK @VMI0067 01158000
SPACE 1 @V407593 01159000
LTORG @V407593 01160000
EJECT 01161000
COPY EQU 01162000
COPY DEVTYPES 01163000
PSA 01164000
COPY SAVE 01165000
COPY VMBLOK 01166000
COPY IOBLOKS 01167000
COPY RBLOKS 01168000
COPY VBLOKS 01169000
COPY IOER 01170000
END DMKIOT 01171000