UNT TITLE 'DMKUNT (CP) VM/370 - RELEASE 6' 00001000 ISEQ 73,80 VALID SEQUENCING OF SOURCE 00002000 COPY OPTIONS 00003000 COPY LOCAL 00004000 *. 00005000 * MODULE NAME - 00006000 * 00007000 * DMKUNT 00008000 * 00009000 * CONTENTS - 00010000 * 00011000 * DMKUNTRN - UNTRANSLATE A REAL CSW TO A VIRTUAL CSW 00012000 * DMKUNTFR - UNLOCK PAGES & RETURN CCW-CHAIN TO FREE STORAGE 00013000 * DMKUNTRS - RELOCATE SENSE BYTE DATA 00014000 * DMKUNTIS - UNDO ISAM PATCHES IN RCWTASKS 00015000 *. 00016000 EJECT 00017000 *. 00018000 * SUBROUTINE NAME - 00019000 * 00020000 * DMKUNTRN - UNTRANSLATE A REAL CSW TO A VIRTUAL CSW 00021000 * 00022000 * FUNCTION - 00023000 * 00024000 * TO UNTRANSLATE A REAL CSW, CONVERTING IT TO A VIRTUAL CSW 00025000 * 00026000 * ATTRIBUTES - 00027000 * 00028000 * REENTRANT, RESIDENT, CALLED VIA BALR 00029000 * 00030000 * ENTRY POINT - 00031000 * 00032000 * DMKUNTRN 00033000 * 00034000 * ENTRY CONDITIONS - 00035000 * 00036000 * GPR 8 = ADDRESS OF VDEVBLOK, WHICH CONTAINS 00037000 * REAL (UNTRANSLATED) CSW. 00038000 * GPR 11 = ADDRESS OF USER'S VMBLOK 00039000 * GPR 14 = RETURN ADDRESS 00040000 * GPR 15 = ADDRESS OF DMKUNTRN 00041000 * 00042000 * EXIT CONDITIONS - 00043000 * 00044000 * CORRECT VIRTUAL CSW HAS BEEN COMPUTED IN VCHBLOK. 00045000 * 00046000 * CALLS TO OTHER ROUTINES - 00047000 * 00048000 * NONE 00049000 * 00050000 * EXTERNAL REFERENCES - 00051000 * 00052000 * NONE 00053000 * 00054000 * TABLES / WORK AREAS - 00055000 * 00056000 * RCCWLST 00057000 EJECT 00058000 * REGISTER USAGE - 00059000 * 00060000 * GPR 0 = CONSTANT X'FFFFFFFF' (-1); ALSO WORK REGISTER 00061000 * GPR 1 = COUNT OF REAL CCWS (IN MULTIPLES OF 8) 00062000 * GPR 2 = CONSTANT +8 00063000 * GPR 3 = WORK REGISTER 00064000 * GPR 4 = ADDRESS OF LOOP (FOR 'BCR' USE) 00065000 * GPR 8 = ADDRESS OF VDEVBLOK 00066000 * GPR 11 = ADDRESS OF USER'S VMBLOK 00067000 * GPR 14 = RETURN REGISTER 00068000 * GPR 15 = BASE REGISTER 00069000 * 00070000 * ALL OTHER REGISTERS ARE NOT USED 00071000 * 00072000 * NOTES - 00073000 * 00074000 * NONE 00075000 * 00076000 * OPERATION - 00077000 * 00078000 * THE APPROPRIATE VIRTUAL CSW, INCLUDING THE CORRECT VIRTUAL 00079000 * CORE-ADDRESS, IS COMPUTED FROM THE REAL CSW, TAKING INTO 00080000 * ACCOUNT THE ADDRESS OF THE REAL CCW CHAIN AND OTHER 00081000 * FACTORS AS NEEDED. 00082000 *. 00083000 EJECT 00084000 DMKUNT CSECT -LOADER CONTROL- 00085000 SPACE 00086000 ENTRY DMKUNTF1 CP ASSIST POINTERS @VA14280 00086510 ENTRY DMKUNTRN "UNTRANS" ENTRY POINT 00087000 ENTRY DMKUNTFR "FREECCW" ENTRY POINT 00088000 ENTRY DMKUNTRS RELOCATE SENSE BYTES 00089000 SPACE 00090000 USING PSA,R0 (FOR ALL ENTRIES) 00091000 USING VDEVBLOK,R8 00092000 USING RCWCCW,R3 00093000 USING VMBLOK,R11 00094000 USING DMKUNTRN,R15 00095000 SPACE 00095400 *. 00095800 *********************************************************************** 00096200 * 00096600 * 00097000 * CP ASSIST INSTRUCTION "UNTRN" - UNTRANSLATE A CSW 00097400 * 00097800 * 00098200 * OPERANDS: 00098600 * 1 = ADDRESS OF 'VDEVCSW' (ADDRESS OF CSW TO UNTRANSLATE) 00099000 * 2 = NOT USED 00099400 * 00099800 * REGISTER INPUT: 00100200 * GPR 14 = EXIT ADDRESS 00100600 * 00101000 * SYSTEM DATA AREAS REFERENCED: 00101400 * RCWTASK 00101800 * 00102200 * 00102600 * EXITS: 00103000 * 00103400 * 1. ADDRESS IN GPR 14 (NORMAL COMPLETION) 00103800 * 00104200 * REGISTER OUTPUT: NONE CHANGED BY THIS INSTRUCTION 00104600 * 00105000 * 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL COMPLETION) 00105400 * 00105800 * NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT TO A NO-OP. 00106200 * 00106600 *********************************************************************** 00107000 *. 00107400 SPACE 00107800 DMKUNTRN DS 0D ENTER "UNTRANS" @V3M4038 00108200 SPACE 00108600 DS 0H EXECUTE CP ASSIST "UNTRN" @V3M4038 00109000 DC X'E610',S(VDEVCSW,0) ***@V3M4038 00109400 SPACE 00109800 STM R0,R4,BALRSAVE - SAVE ONLY REGISTERS WE USE %V3M4038 00110200 LA R2,8 8 INTO R2, %V3M4038 00110600 L R3,VDEVCSW GET REAL CCW ADDR FROM REAL CSW %V3M4038 00111000 LA R3,0(,R3) CLEAR HI BYTE %V3M4038 00111400 SR R3,R2 GET CSW ADDRESS LESS 8 %V3M4038 00111800 BM UNEXIT IF 0 (ORIG. CSW ADDR=0) EXIT %V3M4038 00112200 L R0,FFS -1 INTO R0 FOR HEADER TEST %V3M4038 00112600 SLR R1,R1 CLEAR ADJUSTER BEFORE LOOP START %V3M4038 00113000 LA R4,TSTSUB SET R4 FOR BCR BELOW (FOR SPEED) %V3M4038 00113400 SPACE 00113800 TSTSUB TM RCWCTL,RCWGEN IS THIS A CP-GENERATED CCW ? %V3M4038 00114200 BO STBK IF YES DON'T COUNT IT. %V3M4038 00114600 ALR R1,R2 INCREMENT "REAL CCW COUNT" BY 8 %V3M4038 00115000 STBK SLR R3,R2 BACK UP ONE CCW %V3M4038 00115400 CH R0,RCWFLAG TEST FOR BACKUP INTO HEADER %V3M4038 00115800 BCR 7,R4 "BNE TSTSUB" IF NO, REENTER LOOP %V3M4038 00116200 SPACE 00116600 SLR R3,R2 BACKUP 8 BYTES TO HEADER START %V3M4038 00117000 L R0,RCWVCAW-RCWTASK(,R3) GET VIRT. CCW LIST ADDR %V3M4038 00117400 ALR R0,R1 ADD "REAL CCW CNT" TO GET V. CSW %V3M4038 00117800 STCM R0,7,VDEVCSW+1 STORE ADDRESS BITS %V3M4038 00118200 UNEXIT LM R0,R4,BALRSAVE RESTORE ONLY THE REGS WE USED %V3M4038 00118600 BR R14 AND EXIT. %V3M4038 00119000 SPACE 2 00120000 DROP R15 HERE ENDETH DMKUNTRN = "UNTRANS". 00121000 EJECT 00122000 *. 00123000 * SUBROUTINE NAME - 00124000 * 00125000 * DMKUNTFR - UNLOCK PAGES & RETURN CCW-CHAIN TO FREE STORAGE 00126000 * 00127000 * FUNCTION - 00128000 * 00129000 * TO UNLOCK PAGES ASSOCIATED WITH A COMPLETED I/O OPERATION, 00130000 * AND TO RETURN CCW CHAIN(S) TO FREE STORAGE. 00131000 * 00132000 * ATTRIBUTES - 00133000 * 00134000 * REENTRANT, RESIDENT, CALLED VIA SVC 00135000 * 00136000 * ENTRY POINT - 00137000 * 00138000 * DMKUNTFR 00139000 * 00140000 * ENTRY CONDITIONS - 00141000 * 00142000 * GPR 8 = ADDRESS OF VDEVBLOK 00143000 * GPR 10 = ADDRESS OF IOBLOK 00144000 * GPR 12 = ADDRESS OF DMKUNTFR 00145000 * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00146000 * 00147000 * EXIT CONDITIONS - 00148000 * 00149000 * LOCKED PAGES ASSOCIATED WITH THE CCW-CHAIN HAVE BEEN UNLOCKED, 00150000 * AND FREE STORAGE FOR THE CCW-CHAIN HAS BEEN RETURNED. 00151000 * 00152000 * CALLS TO OTHER ROUTINES - 00153000 * 00154000 * DMKPTRUL - TO UNLOCK A PAGE 00155000 * DMKFRET - TO RETURN CCW CHAIN(S) TO FREE STORAGE 00156000 * DMKPTRFT - TO CHAIN A PAGE ON THE FREE-LIST 00157000 * DMKSTKCP - TO STACK CPEXBLOKS 00157100 * DMKSCNVD - TO GET THE VIRTUAL DEVICE ADDRESS IN CCU FORM 00157200 * 00158000 * EXTERNAL REFERENCES - 00159000 * 00160000 * DMKSYSRM - REAL MACHINE STORAGE SIZE 00161000 * DMKVIOIN - PRESENT DE STATUS FOR MDISKS WHICH DESERVE IT 00161100 * 00162000 * TABLES / WORK AREAS - 00163000 * 00164000 * RCCWLST 00165000 * RCWTASK 00166000 EJECT 00167000 * REGISTER USAGE - 00168000 * 00169000 * GPR 4 = ADDRESS OF CCW-CHAIN HEADER 00170000 * GPR 7 = ADDRESS OF REAL CCW CHAIN 00171000 * GPR 8 = ADDRESS OF VDEVBLOK 00172000 * GPR 9 = STORAGE SIZE OF REAL MACHINE 00173000 * GPR 10 = ADDRESS OF IOBLOK 00174000 * GPR 12 = BASE REGISTER = A(DMKUNTFR) 00175000 * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00176000 * 00177000 * OTHER REGISTERS ARE USED FOR WORK REGISTERS 00178000 * 00179000 * NOTES - 00180000 * 00181000 * NONE 00182000 * 00183000 * OPERATION - 00184000 * 00185000 * THE ADDRESSES OF PAGES TO BE UNLOCKED ARE COMPUTED FROM 00186000 * FLAGBITS IN THE REAL CCW CHAIN AND FROM ANY INDIRECT 00187000 * DATA LISTS INVOLVED; SUCH PAGES ARE UNLOCKED VIA CALLS 00188000 * TO DMKPTRUL; SIMILARLY, REAL CCW CHAIN(S) ARE 00189000 * RETURNED TO FREE STORAGE VIA DMKFRET. 00190000 * FOR I/O TASKS WHICH HAVE BEEN FLAGGED AS CONTAINING 00190100 * A RELEASE CCW STRING (ONLY SET FOR MINI DISKS WITH 00190200 * VIRTUAL RESERVE/RELEASE FEATURE REQUESTED), THE VIRTUAL 00190300 * RESERVE/RELEASE BLOCK AND THE VIRTUAL DEVICE BLOCK ARE 00190400 * MARKED NO LONGER RESERVED. ANY STACKED EXECUTION REQUESTS 00190500 * ARE UNSTACKED AND STACKED ON THE DISPATCH CPEXBLOK CHAIN. 00190600 * AN IOB INDICATING DEVICE END IS BUILT AND STACKED FOR 00190700 * PROCESSING BY DMKVIOIN FOR EACH VIRTUAL DEVICE BLOCK ON 00190800 * THE VDEVLINK CHAIN WHICH INDICATES THAT DEVICE END STATUS 00190900 * IS DUE WHEN THE DEVICE IS RELEASED. 00191000 *. 00191100 EJECT 00192000 * RELEASE THE STORAGE USED FOR THE REAL CCW LISTS 00193000 * UNLOCK I/O DATA AREA PAGES * 00194000 * UNTRANSLATE RHA CCW I/O 00195000 * 00196000 EXTRN DMKPTRUL,DMKSYSRM @V200820 00197000 EXTRN DMKPTRFT @V304735 00198000 EXTRN DMKVIOIN @V407438 00198100 EXTRN DMKSTKCP @V407438 00198200 EXTRN DMKSCNVD @V407438 00198300 EXTRN DMKSTKIO 00198400 USING RCWTASK,R4 00199000 USING IOBLOK,R10 00200000 USING RCWCCW,R7 00201000 USING VDEVBLOK,R8 00202000 USING DMKUNTFR,R12 00206000 USING SAVEAREA,R13 00207000 SPACE 2 00207150 *. 00207300 *********************************************************************** 00207450 * 00207600 * 00207750 * CP ASSIST INSTRUCTION "UNTFR" - FREE CCW STORAGE 00207900 * 00208050 * 00208200 * OPERANDS: 00208350 * 1 = ADDRESS OF 'DMKUNTF1' (DATA LIST) 00208500 * 2 = ADDRESS OF 'DMKUNTF2' (EXIT LIST) 00208650 * 00208800 * REGISTER INPUT: 00208950 * GPR 10 = ADDRESS OF THE IOBLOK 00209100 * GPR 11 = ADDRESS OF THE VMBLOK 00209250 * GPR 13 = ADDRESS OF THE SAVEAREA 00209400 * 00209550 * SYSTEM DATA AREAS REFERENCED: 00209700 * IOBLOK, RCWTASK, SAVEAREA 00209850 * 00210000 * 00210150 * EXITS TO SPECIFIED OPERAND 2 LIST ADDRESSES: 00210300 * 00210450 * +0 'UNREL' (MUST UN-RELOCATE CYLINDER NUMBER OR SENSE DATA) 00210600 * REGISTER OUTPUT: 00210750 * GPR 0 = NUMBER OF IDAWS LEFT TO PROCESS 00210900 * GPR 4 = ADDRESS OF RCWTASK 00211050 * GPR 5 = DATA ADDRESS FROM THE CCW (EQUALS IDAL ADDRESS) 00211200 * GPR 6 = NUMBER OF CCW'S LEFT TO UNTRANSLATE 00211350 * GPR 7 = ADDRESS OF THE CURRENT CCW 00211500 * GPR 9 = 'DMKPTRRM' - THE REAL MACHINE STORAGE SIZE 00211650 * GPR 14 = STARTING ADDRESS OF DATA 00211800 * GPR 15 = ENDING ADDRESS OF DATA 00211950 * 00212100 * +4 'UNTFRET' (CP ASSIST "FRET" COULD NOT FRET RCWTASK) 00212250 * REGISTER OUTPUT: 00212400 * GPR 0 = NUMBER OF DOUBLEWORDS IN THE RCWTASK 00212550 * GPR 1 = ADDRESS OF RCWTASK 00212700 * GPR 4 = VALUE FROM RCWPNT 00212850 * GPR 6 = UNPREDICTABLE 00213000 * GPR 9 = 'DMKPTRRM' - THE REAL MACHINE STORAGE SIZE 00213150 * GPR 14-15 = UNPREDICTABLE 00213300 * 00213450 * +8 'PTRUL2' (CP ASSIST "PTRUL" DETECTED ABEND CONDITION) 00213600 * REGISTER OUTPUT: 00213750 * GPR 0 = NUMBER OF IDAWS LEFT TO PROCESS 00213900 * GPR 2 = CURRENT IDAW THAT COULDN'T BE HANDLED 00214050 * GPR 4 = ADDRESS OF RCWTASK 00214200 * GPR 5 = ADDRESS OF THE IDAW 00214350 * GPR 6 = NUMBER OF CCW'S LEFT TO UNTRANSLATE 00214500 * GPR 7 = ADDRESS OF THE CURRENT CCW 00214650 * GPR 9 = 'DMKPTRRM' - THE REAL MACHINE STORAGE SIZE 00214800 * GPR 14-15 = UNPREDICTABLE 00214950 * 00215100 * +12 'UNTFRXIT' (MUST EXIT WITHOUT USING CP ASSIST "RETURN") 00215250 * REGISTER OUTPUT: 00215400 * GPR 0-11,14-15 = UNPREDICTABLE 00215550 * 00215700 * +16 'NXTCCW' (CCW DATA AREA IS IN A SHARED PAGE) 00215850 * REGISTER OUTPUT: 00216000 * GPR 4 = ADDRESS OF RCWTASK 00216150 * GPR 6 = NUMBER OF CCW'S LEFT TO UNTRANSLATE 00216300 * GPR 7 = ADDRESS OF THE CURRENT CCW 00216450 * GPR 9 = 'DMKPTRRM' - THE REAL MACHINE STORAGE SIZE 00216600 * GPR 14-15 = UNPREDICTABLE 00216750 * 00216900 * +20 'PTRUL1' (CP ASSIST "PTRUL" DETECTED ABEND CONDITION) 00217050 * REGISTER OUTPUT: 00217200 * GPR 2 = CURRENT DATA ADDRESS THAT COULDN'T BE UNLOCKED 00217350 * GPR 4 = ADDRESS OF RCWTASK 00217500 * GPR 5 = SAME VALUE AS THAT OF GPR 2 00217650 * GPR 6 = NUMBER OF CCW'S LEFT TO UNTRANSLATE 00217800 * GPR 7 = ADDRESS OF THE CURRENT CCW 00217950 * GPR 9 = 'DMKPTRRM' - THE REAL MACHINE STORAGE SIZE 00218100 * GPR 14-15 = UNPREDICTABLE 00218250 * 00218400 * +24 'ITSAREL' (VIRTUAL RESERVE/RELEASE DETECTED) 00218410 * REGISTER OUTPUT: 00218420 * GPR 0 = UNPREDICTABLE 00218430 * GPR 1 = UNPREDICTABLE 00218440 * GPR 4 = UNPREDICTABLE 00218450 * GPR 6 = UNPREDICTABLE 00218460 * GPR 9 = 'DMKPTRRM' - THE REAL MACHINE STORAGE SIZE 00218470 * GPR 14-15 = UNPREDICTABLE 00218480 * 00218490 * 00218500 * EXIT TO CALLER: (FULL COMPLETION EXIT VIA CP ASSIST "RETURN") 00218550 * REGISTER OUTPUT: 00218700 * GPR 14-15 = UNPREDICTABLE 00218850 * 00219000 *********************************************************************** 00219150 *. 00219300 SPACE 00219450 DMKUNTFR DS 0D ENTER "FREECCW" @V3M4038 00219600 SPACE 00219750 DS 0H EXECUTE CP ASSIST "UNTFR" @V3M4038 00219900 DC X'E605',S(DMKUNTF1,DMKUNTF2) ***@V3M4038 00220050 SPACE 00220200 STM R0,R11,SAVEREGS SAVE REGS R0 THRU R11 %V3M4038 00220350 L R9,=A(DMKSYSRM) GET REAL MACHINE STORAGE SIZE %V3M4038 00220500 L R9,0(,R9) KEEP IN R9 FOR HANDY REFERENCE %V3M4038 00220650 L R4,IOBCAW GET ADDRESS OF THE FIRST RCWTASK %V3M4038 00220800 LA R4,0(,R4) STRIP POSSIBLE HIGH ORDER KEY %V3M4038 00220950 SL R4,F16 BACK OFF 16 TO 1ST HEADER START %V3M4038 00221100 NXTFRET EQU * HANDLE NEXT CCW LIST: %V3M4038 00221250 LA R7,16(,R4) POINT R7 TO 1ST CCW IN TASK %V3M4038 00221400 LH R6,RCWRCNT %V3M4038 00221550 LTR R6,R6 DON'T GET INTO 'BCT' TROUBLE... %V3M4038 00221700 BNP FRETRCW ...GLAD WE CHECKED %V3M4038 00221850 SPACE 00222000 NXTCCW TM RCWCTL,RCWIO+RCWSHR LOCKED OR 'SHARED' PAGE ? %V3M4038 00222150 BZ INCR8 NOPE - JUST ADVANCE TO NEXT CCW %V3M4038 00222300 L R5,RCWADDR YES, GET DATA ADDRESS IN THE CCW %V3M4038 00222450 TM RCWFLAG,IDA DOES RCCW HAVE IDA ON ? %V3M4038 00222600 BO IDASET YES - HANDLE VARIOUS SITUATIONS. %V3M4038 00222750 LA R2,0(,R5) DATA ADDR INTO R2 (MINUS BYTE 0) %V3M4038 00222900 TM RCWCTL,RCWIO WAS PAGE LOCKED ? %V3M4038 00223050 BO PTRUL1 IF YES UNLOCK IT. %V3M4038 00223200 ST R7,SAVEWRK9 SAVE THIS REGISTER @V304735 00228000 LR R7,R2 CHANGE REGISTERS FOR DMKPTRFT @V304735 00229000 N R7,XPAGNUM DROP OFF DISPLACEMENT @V304735 00230000 SRL R7,8 LEAVE INDEX INTO CORTABLE @V304735 00231000 AL R7,ACORETBL GET THE PROPER TABLE ENTRY @V304735 00232000 XC CORPGPNT-CORTABLE(4,R7),CORPGPNT-CORTABLE(R7) @V304735 00233000 CALL DMKPTRFT PUT THIS PAGE ON THE FREE-LIST @V304735 00234000 L R7,SAVEWRK9 RESTORE R7 @V304735 00235000 B INCR8 GET THE NEXT REAL CCW @V304735 00236000 PTRUL1 CALL DMKPTRUL UNLOCK THIS PAGE %V3M4038 00237000 INCR8 LA R7,8(,R7) ADVANCE TO NEXT REAL CCW %V3M4038 00238000 BCT R6,NXTCCW AND ITERATE THRU CCW-CHAIN. %V3M4038 00239000 B FRETRCW GO RELEASE THE RCWTASK WHEN THRU %V3M4038 00240000 SPACE 00241000 IDASET SLR R1,R1 RCWIO AND REAL IDA FLAGS SET: %V3M4038 00242000 * (NOTE: THE 1ST IDAW IS KNOWN TO BE OK) 00243000 ICM R1,3,RCWCNT GET THE REAL COUNT %V3M4038 00244000 BCTR R1,0 LESS ONE, PLEASE %V3M4038 00245000 L R14,0(,R5) GET 1ST IDAW = STARTING ADDRESS %V3M4038 00246000 LR R15,R14 ALSO IN R15 %V3M4038 00247000 IC R0,RCWCOMND IS THE CCW A READ-BACKWARD TYPE? %V3M4038 00248000 N R0,F15 ... %V3M4038 00249000 CH R0,=H'12' ... %V3M4038 00250000 BNE IDLFWD NOT TODAY. %V3M4038 00251000 SR R14,R1 DEC. START ADDR IF BACKWARD READ %V3M4038 00252000 B IDLCHK FIND HOW MANY HALF-PAGES CROSSED %V3M4038 00253000 IDLFWD AR R15,R1 SUM TO GIVE LAST ADDR %V3M4038 00254000 SPACE 00255000 IDLCHK SRA R14,11 DIVIDE BOTH BY 2048.. %V3M4038 00256000 SRA R15,11 TO YIELD START & END PAGE ADDR %V3M4038 00257000 SR R15,R14 DIFF = NO. OF "PAGE" CROSSOVERS %V3M4038 00258000 LA R0,1(,R15) +1 = NO. OF HALF-PAGES TO UNLOCK %V3M4038 00259000 TM RCWCTL,RCWHMR+RCW2311 ANY UN-RELOCATING TO DO? %V3M4038 00260000 BNZ UNREL YES - "DO WHAT'S BEST" FIRST. %V3M4038 00261000 * 00262000 * LOOP TO UNLOCK DATA PAGES GIVEN BY IDAWS IN REAL IDAL: 00263000 * R0 = NUMBER OF HALF-PAGES TO BE UNLOCKED 00264000 * R5 = ADDRESS OF "NEXT" (OR FIRST) IDAW: 00265000 * 00266000 UNLOCK DS 0H @VA12570 00267200 L R11,SAVER11 BE SURE IT POINTS TO VMBLOK @VA12570 00267400 L R2,0(,R5) GET THE REAL DATA PAGE ADDRESS @VA12570 00267600 CLR R2,R9 ADDRESS WITHIN THE REAL MACHINE? %V3M4038 00268000 BNL INCR8 NO, THEN FINISHED WITH THIS CCW %V3M4038 00269000 TM RCWCTL,RCWIO WAS PAGE LOCKED ? %V3M4038 00270000 BO PTRUL2 IF YES UNLOCK IT. %V3M4038 00271000 ST R7,SAVEWRK9 SAVE THIS REGISTER @V304735 00272000 LR R7,R2 CHANGE REGISTERS FOR DMKPTRFT @V304735 00273000 N R7,XPAGNUM DROP OFF DISPLACEMENT @V304735 00274000 SRL R7,8 LEAVE INDEX INTO CORTABLE @V304735 00275000 AL R7,ACORETBL GET THE PROPER TABLE ENTRY @V304735 00276000 CLC CORPGPNT-CORTABLE(4,R7),F0 HAS PAGE BEEN @V304735 00277000 * RELEASED ? 00278000 BE NOPTRFT IF YES - DON'T CALL DMKPTRFT @V304735 00279000 XC CORPGPNT-CORTABLE(4,R7),CORPGPNT-CORTABLE(R7) @V304735 00280000 CALL DMKPTRFT PUT THIS PAGE ON THE FREE-LIST @V304735 00281000 NOPTRFT L R7,SAVEWRK9 RESTORE R7 @V304735 00282000 B NXTIDA GET THE NEXT IDA WORD @V304735 00283000 PTRUL2 CALL DMKPTRUL UNLOCK THIS PAGE %V3M4038 00283450 NXTIDA DS 0H PROCESS NEXT IDA WORD %V3M4038 00283900 LA R5,4(,R5) ADVANCE TO THE NEXT IDAW %V3M4038 00284350 BCT R0,UNLOCK LOOP THRU ALL IDAW IN THE IDAL %V3M4038 00284800 LA R7,8(,R7) ADVANCE TO THE NEXT REAL CCW %V3M4038 00285250 BCT R6,NXTCCW ITERATE THRU CCW-CHAIN. %V3M4038 00285700 FRETRCW EQU * RELEASE REAL CCW PACKAGE %V3M4038 00286150 LH R0,RCWCCNT TOTAL WORD-COUNT INTO R0, %V3M4038 00286600 LR R1,R4 - PUT START ADDR IN R1 %V3M4038 00287050 L R4,RCWPNT - PICK UP NEXT RCCWLST %V3M4038 00287500 UNTFRET CALL DMKFRET - FREE THE RCCWLST STORAGE %V3M4038 00287950 LTR R4,R4 - TEST IF NEXT ADDR IS ZERO %V3M4038 00288400 BNZ NXTFRET - KEEP AT WORK IF NOT. %V3M4038 00288850 ST R4,IOBCAW ZERO IOBCAW AFTER STORAGE FREED %V3M4038 00289300 * IOBUNREL IS ONLY SET FOR MINIDISKS WITH VIRT RES/REL FEATURE 00289775 TM IOBSPEC2,IOBUNREL WAS THERE A RELEASE IN CHAIN %V407438 00289800 BZ UNTFRXIT NOPE, DONE, BR. %V407438 00289825 TM IOBSPEC2,IOBCLN DOING CLEANUP JOB FOR DMKCCW %V407438 00289850 BO UNTFRXIT YES, THEN DON'T RELEASE MDISK %V407438 00289875 ITSAREL DS 0H @V4M0156 00289885 L R2,VDEVRRB GET THE ADDRESS OF THE VRRBLOK @V407438 00289900 USING VRRBLOK,R2 ADDRESS THE VRRBLOK @V407438 00289925 NI VDEVFLG2,X'FF'-VDEVRES VIRT DEV NO LONGER RESV @V407438 00289950 NI VRRSTAT,X'FF'-VRRRES DITTO @V407438 00289975 NXTCPEX L R1,VRRCPEX GET FIRST/NEXT CPEXBLOK WAITING @V407438 00290000 LTR R1,R1 IS ANYONE WAITING FOR THE MDISK? @V407438 00290025 BZ NXTDE NOPE, GO TRY DEVICE END INTS @V407438 00290050 USING CPEXBLOK,R1 ADDRESS THE CPEXBLOK @V407438 00290075 L R0,CPEXFPNT GET THE ADDRESS OF THE NEXT ONE @V407438 00290100 ST R0,VRRCPEX AND MAKE IT FIRST ON CHAIN @V407438 00290125 CALL DMKSTKCP STACK THE UNCHAINED CPEXBLOK @V407438 00290150 B NXTCPEX CONTINUE UNTIL ALL UNSTACKED @V407438 00290175 DROP R1 NO MORE CPEXBLOK @V407438 00290200 SPACE 00290225 NXTDE L R8,VDEVLINK GET NEXT VDEVBLOK USING THIS MDSK@V407438 00290250 CL R8,SAVER8 SAME ONE WE ENTERED ON? @V407438 00290275 BE UNTFRXIT YUP, WERE DONE, BR. @V407438 00290300 TM VDEVFLG2,VDEVODE DO WE OWE THIS VDEV A DE INT @V407438 00290325 BZ NXTDE NOPE, LOOK THROUGH ALL VDEVBLOKS @V407438 00290350 NI VDEVFLG2,X'FF'-VDEVODE WE DON'T OWE IT ANYMORE @V407438 00290375 LA R0,IOBSIZE GET AN IOBLOK @V407438 00290400 CALL DMKFREE FROM FREE STORAGE @V407438 00290425 LR R10,R1 NORMAL ADDRESSABILITY PLEASE @V407438 00290450 XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR OUT THE BLOCK @V407438 00290475 ST R1,IOBLINK AS THOUGH IT CAME FROM IOS @V407438 00290500 MVI IOBCSW+4,DE ENDING STATUS = DEVICE END @V407438 00290525 L R0,VDEVUSER GET THE VMBLOK FOR THE VDEVBLOK @V407438 00290550 ST R0,IOBUSER SAVE IT IN THE IOB @V407438 00290575 L R0,=A(DMKVIOIN) ADDRESS OF THE INT. HANDLER @V407438 00290600 ST R0,IOBIRA THATS WHERE WE WANT IT TO GO @V407438 00290625 L R11,VDEVUSER GET VMBLOK FOR SCN AND IOB @V407438 00290650 ST R11,IOBUSER IOB BELONGS TO DE RECEIVER @V407438 00290675 CALL DMKSCNVD GET THE VIRTUAL CCU PLEASE @V407438 00290700 L R11,SAVER11 RESTORE CALLERS R11 @V407438 00290725 STH R1,IOBVADD PUT CCU IN THE IOB TOO. @V407438 00290750 CALL DMKSTKIO THAT SHOULD DO IT... @V407438 00290775 B NXTDE CONTINUE WITH THE NEXT NOW. @V407438 00290800 SPACE 00290825 UNTFRXIT EXIT EXIT TO CALLER WHEN ALL DONE %V407438 00290850 SPACE 3 00290875 * THE FOLLOWING TWO DATA LISTS MUST BE KEPT CONTIGUOUS AND IN ORDER 00290900 * BECAUSE THEY ARE USED BY THE CP ASSIST INSTRUCTION "UNTFR". 00290925 SPACE 2 00291550 DMKUNTF1 DS 0F "UNTFR" ASSIST DATA LIST @V3M4026 00292000 SPACE , 00292450 * NOTE: THE SECOND WORD IN THIS LIST WILL BE INCREMENTED BY 00292520 * 4 BY DMKCPI DURING IPL IF THIS CPU HAS ASSIST LEVEL 00292590 * 18 OR 19. THIS WILL ALLOW USE OF THE "OLD" FRET 00292660 * ASSIST. 00292730 SPACE , 00292800 DC V(DMKPTRPL) +0 FOR USE BY "PTRUL" ASSIST @V3M4026 00292900 DC V(DMKFREMX) +4 FOR USE BY "FRET" ASSIST @VA14280 00293351 DC V(DMKFRETL) +8 MORE DATA FOR "FRET" ASSIST @V3M4026 00293800 SPACE 2 00294250 DMKUNTF2 DS 0F "UNTFR" ASSIST EXIT LIST @V3M4026 00294700 SPACE 00295150 DC A(UNREL) +0 DATA NEEDS TO BE RELOCATED @V3M4026 00295600 DC A(UNTFRET) +4 MUST DO SOFTWARE 'FRET' @V3M4026 00296050 DC A(PTRUL2) +8 TROUBLE TRYING TO UNLOCK PAGE @V3M4026 00296500 DC A(UNTFRXIT) +12 COULDN'T DO THE 'SVC 12' @V3M4026 00296950 DC A(NXTCCW) +16 CCW DATA AREA IS SHARED @V3M4026 00297400 DC A(PTRUL1) +20 COULDN'T DO UNLOCK FUNCTION @V3M4026 00297850 DC A(ITSAREL) +24 RELEASE VIRTUAL DEVICE @V4M0156 00297860 EJECT 00299000 * "UN-RELOCATE" CYLINDER NUMBER OR SENSE DATA FOR READ HOME ADDRESS, 00300000 * READ RECORD R0, OR A SENSE OF A SIMULATED 2311 OR AN EXTENDED 00301000 * SENSE DASD DEVICE (24 SENSE BYTES), FOR EXAMPLE : 3340 OR 3350. 00302000 * 00303000 * NOTE REGISTER USAGE AT THIS POINT: 00304000 * R0 = NUMBER OF IDAWS TO BE PROCESSED 00305000 * R1 = BYTE-COUNT-LESS-1 IN THE CCW 00306000 * R4 = ADDRESS OF RCWTASK 00307000 * R5 = ADDRESS OF THE FIRST IDAW 00308000 * R6 = RCWRCNT (COUNT OF REAL CCWS) 00309000 * R7 = ADDRESS OF CURRENT REAL CCW 00310000 * R8 = ADDRESS OF VDEVBLOK 00311000 * R9 = REAL MACHINE SIZE 00312000 * R10 = ADDRESS OF IOBLOK 00313000 * R11-R13 = THE USUAL VALUES 00314000 * 00315000 UNREL TM IOBFLAG,IOBRES HAS IO BEEN RESET ? 00316000 BO UNLOCK YES - NO VIRTUAL DEVICE EXISTS 00317000 TM IOBSTAT,IOBCC3 OR NONZERO CONDITION-CODE ? 00318000 BNZ UNLOCK YES - LEAVE MEMORY ALONE. 00319000 SLR R2,R2 OK SO FAR, CLEAR R2 (FOR ICM USE) 00320000 LA R15,RCWCCW+8 POINT TO END OF THE CCW 00321000 CLM R15,7,IOBCSW+1 PERCHANCE MATCHES THE REAL CSW ADDRESS ? 00322000 BNE UNREL1 NOPE - DIDN'T TERMINATE ON THIS CCW. 00323000 TM IOBCSW+4,UC IF YES, WAS THERE A UNIT CHECK ? 00324000 BO UNLOCK YES - LEAVE IT ALONE. 00325000 TM IOBCSW+5,PRGC+PRTC+CDC+CCC+IFCC+CHC BAD CHANNEL ERROR ? 00326000 BNZ UNLOCK YES - LEAVE IT ALONE. 00327000 ICM R2,3,IOBCSW+6 GET RESIDUAL COUNT FROM CSW 00328000 SR R1,R2 COMPUTE EFFECTIVE NO. OF BYTES (LESS 1) 00329000 BM UNLOCK IF BYTE COUNT NOT AT LEAST 1, FORGET IT 00330000 BAL R14,UNRELSUB COMPUTE ADD'TL BYTE COUNT & SAVE DATA ETC 00331000 B UNREL4 AND NOW GO UN-RELOCATE THE DATA. 00332000 SPACE 00333000 * END OF CCW DOESN'T MATCH ADDRESS IN IOBCSW - CHECK WHETHER THE DATA 00334000 * SAVED AFTER THE IDAWS BY DMKCCWTR HAS CHANGED OR NOT: 00335000 * IF IT HAS CHANGED, ASSUME THAT THE CCW WAS EXECUTED; 00336000 * IF IT HAS NOT CHANGED, ASSUME THE CCW WAS NOT EXECUTED: 00337000 * 00338000 UNREL1 TM RCWFLAG,CD CHAIN-DATA PERCHANCE SET ? 00339000 BZ UNREL3 NOPE (WHEW). 00340000 * 00341000 DROP R7 00342000 LA R3,8(,R7) POINT AT NEXT CCW TO ACCUMULATE COUNT 00343000 USING RCWCCW,R3 00344000 UNREL2 TM RCWFLAG,SKIP SKIP FLAG SET ? 00345000 BO UNREL3 YES - FORGET IT (NO GAMES PLEASE). 00346000 ICM R2,3,RCWCNT NO, GET BYTE-COUNT FROM CHAINED-TO CCW 00347000 AR R1,R2 COMPUTE ACCUMULATED BYTE-COUNT 00348000 TM RCWFLAG,CD CHAIN DATA SET IN THIS ONE TOO ? 00349000 BZ UNREL3 NOPE - WE'RE DONE. 00350000 LA R3,8(,R3) YES - ADVANCE TO NEXT CCW, 00351000 CLM R3,7,IOBCSW+1 IS THAT THE ENDING CCW ? 00352000 BNE UNREL2 NOPE - KEEP GOING, MEN. 00353000 ICM R2,3,IOBCSW+6 YES, PICK UP RESIDUAL COUNT (IF ANY) 00354000 SR R1,R2 AND SUBTRACT FROM ACCUMULATED COUNT 00355000 DROP R3 RESTORE NORMAL USAGE 00356000 USING RCWCCW,R7 ... 00357000 * 00358000 UNREL3 BAL R14,UNRELSUB COMPUTE ADD'TL BYTE COUNT & SAVE DATA ETC 00359000 LR R3,R0 GET THE NUMBER OF IDAWS 00360000 ALR R3,R3 TIMES 4 PLEASE 00361000 ALR R3,R3 ... 00362000 ALR R3,R5 PLUS ADDRESS OF THE 1ST IDAW 00363000 CLC 0(8,R3),SAVEWRK6 DID THE USER'S DATA CHANGE ? 00364000 BE UNLOCK NO - FORGET THE WHOLE THING. 00365000 * 00366000 UNREL4 DS 0H DATA WAS READ IN; NOW UN-RELOCATE SAME: 00367000 IC R0,RCWCOMND GET CCW OP-CODE 00368000 N R0,F15 ISOLATE LOW-ORDER 4 BITS 00369000 CL R0,F4 IS IT A SENSE COMMAND (OR EQUIVALENT) ? 00370000 BNE SETRHA IF NOT, SET R5 FOR READ HOME ADDRESS 00371000 * 00372000 LA R0,1 BYTE-COUNT 00373000 A R0,SAVEWRK2 INTO R0, 00374000 LA R1,SAVEWRK6 LET R1 POINT TO DATA IN SAVE-AREA 00375000 LA R15,DMKUNTRS SET R15 FOR ADDRESSABILITY NEEDS 00376000 BAL R2,UNTRSREL CALL INTERNAL SUBR TO RELOCATE SENSE DATA 00377000 UNREL5 L R5,RCWADDR RESTORE R5 (IN CASE LOST) 00378000 LA R3,SAVEWRK6 LET R3 POINT TO SAVEWRK6 AREA 00379000 LM R0,R1,SAVEWRK3 RESTORE R0 AND THE FIRST BYTE COUNT 00380000 L R2,0(,R5) LET R2 POINT TO THE FIRST DATA-AREA 00381000 BAL R14,CHKPKEY CHECK FOR POSSIBLE PROTECTION VIOLATION 00382000 BNZ UNREL6 CC NONZERO - LEAVE WELL ENOUGH ALONE 00383000 LR R15,R2 CC ZERO, SET R15, AND ... 00384000 EX R1,UNRELMVC MOVE 1ST CHUNK OF DATA BACK AGAIN 00385000 UNREL6 LA R3,1(R3,R1) BUMP R3 FOR THE NEXT CHUNK (IF ANY) 00386000 L R1,SAVEWRK5 GET THE SECOND COUNT LESS ONE 00387000 LTR R1,R1 ANY MORE DATA ? 00388000 BM UNLOCK NOPE - WE'RE ALL SET. 00389000 L R2,4(,R5) GET SECOND ADDRESS 00390000 CLR R2,R9 IN STORAGE ? 00391000 BNL UNLOCK NO - FORGET IT. 00392000 BAL R14,CHKPKEY CHECK FOR POSSIBLE PROTECTION VIOLATION 00393000 BNZ UNLOCK CC NONZERO - LEAVE WELL ENOUGH ALONE 00394000 LR R15,R2 CC ZERO, SET R15, AND ... 00395000 EX R1,UNRELMVC OK - MOVE 2ND CHUNK OF DATA BACK AGAIN 00396000 B UNLOCK AND GO UNLOCK THE PAGES (WHEW). 00397000 * 00398000 SETRHA MVI SAVEWRK1,00 CLEAR FLAG USED BELOW, 00399000 LH R14,VDEVRELN CYLINDER RELOCATION FACTOR INTO R14 00400000 SLR R15,R15 CLEAR R15 (FOR "ICM" USE) 00401000 LA R5,1 SET R5 TO UNRELOCATE 2ND & 3RD BYTES 00402000 TM RCWCOMND,X'1A' WAS IT A READ HOME ADDRESS (1A/9A) ? 00403000 BO CFCNT IF YES, R5=1 IS CORRECT (2ND & 3RD BYTES) 00404000 SLR R5,R5 NO, SET R5=0 FOR THE FIRST TWO BYTES 00405000 CFCNT C R5,SAVEWRK2 CYL OR HEAD INCLUDED YET ? 00406000 BNL UNREL5 NO - FORGET IT - FINISH UP. 00407000 LA R3,SAVEWRK6 GET DATA ADDRESS 00408000 ALR R3,R5 ADD DISPLACEMENT (FOR CC OR HH BYTES) 00409000 ICM R15,3,0(R3) GET CYLINDER OR HEAD TO R15 00410000 CLI VDEVTYPE,TYP3340 IS IS A 334X? @V56BDA8 00410050 BNE NOT3340C NO, NORMAL PATH @V56BDA8 00410100 CH R15,=H'696' IS IT AN ALTERNATE? @V56BDA8 00410150 BNL UNREL5 YES, DONT UNRELOCATE @V56BDA8 00410200 L R1,VDEVREAL -->RDEVBLOK @V56BDA8 00410250 TM RDEVFTR-RDEVBLOK(R1),FTR35MB SMALL DISK? @V56BDA8 00410300 BZ NOT3340C NO, UNRELOCATE @V56BDA8 00410350 CH R15,=H'348' 35MB ALTERNATE? @V56BDA8 00410400 BE UNREL5 YES, DONT UNRELOCATE @V56BDA8 00410450 NOT3340C EQU * @V56BDA8 00410500 SR R15,R14 RELOCATE 00411000 * IF MINUS DONT STORE BACK 00412000 * MAY BE TRYING TO RELOCATE DATA NOT HA 00413000 * HAPPENS IF DATA READ ON TOP OF HA DATA 00414000 BM UNREL5 IF MINUS DON'T STORE ANYTHING - FINISH UP 00415000 STCM R15,3,0(R3) ...AND STORE IT BACK 00416000 TM VDEVFLAG,VDEV231B BOTTOM HALF OF SIMULATED 2311 ? 00417000 BZ UNREL5 IF NOT, FORGET IT (FINISH UP). 00418000 TM SAVEWRK1,X'01' CYL +&HEAD BOTH RELOCATED? 00419000 BO UNREL5 YES - FINISH UP. 00420000 LA R5,2(,R5) SET DISPLACEMENT FOR HEAD 00421000 LA R14,10 SET R14 TO UN-RELOCATE HEAD NUMBER, 00422000 OI SAVEWRK1,X'01' SET FLAG-BIT 00423000 B CFCNT 00424000 SPACE 00425000 UNRELSUB SLR R2,R2 R2=0 MEANS NO HALF-PAGES CROSSED BY DATA 00426000 CL R1,F7 BYTE-COUNT-LESS-1 EXCEEDS 7 ? 00427000 BNH UNRELSB1 NOPE 00428000 LA R1,7 YES - LIMIT TO 7 00429000 UNRELSB1 ST R1,SAVEWRK2 REMEMBER THIS COUNT 00430000 LA R15,2047 NOW COMPUTE END OF HALF-PAGE 00431000 O R15,0(,R5) ... 00432000 SL R15,0(,R5) NO. OF BYTES LESS 1 IN THIS HALF-PAGE 00433000 CLR R15,R1 COMPARE WITH ACTUAL COUNT-LESS-1 00434000 BNL UNRELSB3 IT'S OK - NO BOUNDARY IS CROSSED 00435000 CL R0,F1 BEWARE OF POSSIBLE CASE OF JUST ONE IDAW 00436000 BE UNRELSB2 IF YES, ADJUST R1 BUT LEAVE R2=0. 00437000 LR R2,R1 TOTAL COUNT (LESS 1) INTO R2 BRIEFLY 00438000 SR R2,R15 NEW COUNT (> 0) FOR THE NEXT PAGE 00439000 UNRELSB2 LR R1,R15 NEW COUNT (LESS 1) FOR THE 1ST PAGE 00440000 UNRELSB3 MVC SAVEWRK6(8),ZEROES CLEAR DBL-WORD AT SAVEWRK6 00441000 LA R15,SAVEWRK6 LET R15 POINT TO SAVEWRK6 AREA 00442000 L R3,0(,R5) ADDRESS OF 1ST DATA AREA 00443000 EX R1,UNRELMVC MOVE 1ST FEW BYTES TO SAVEWRK6 AREA 00444000 S R2,F1 DECREMENT 2ND COUNT (IF ANY) FOR "EX" USE 00445000 STM R0,R2,SAVEWRK3 REMEMBER R0 AND THESE TWO COUNTS 00446000 BCR 4,R14 IF MINUS RETURN TO CALLER - WE'RE DONE 00447000 LA R15,1(R15,R1) BUMP R15 FOR NO. OF BYTES OBTAINED 00448000 L R3,4(,R5) ADDRESS OF 2ND DATA AREA 00449000 CLR R3,R9 IN REAL MACHINE STORAGE ? 00450000 BCR 11,R14 NO - RETURN TO CALLER. 00451000 EX R2,UNRELMVC OK - MOVE 2ND BATCH OF BYTES TO SAVEWRK6 00452000 BR R14 AND RETURN. 00453000 * 00454000 UNRELMVC MVC 0(*-*,R15),0(R3) TO MOVE USER DATA TO/FROM SAVEWRK6 AREA 00455000 EJECT 00456000 * "CHKPKEY" = SUBROUTINE TO DETERMINE IF SENSE-BYTES OR THE LIKE 00457000 * CAN BE STORED IN USER'S MEMORY (GIVEN BY REAL ADDRESS FROM A CCW) 00458000 * AT ENTRY: 00459000 * GPR 2 = REAL DATA ADDRESS 00460000 * GPR 14 = RETURN ADDRESS 00461000 * AT EXIT: 00462000 * CONDITION CODE 0 = OK TO STORE DATA IN USER'S MEMORY. 00463000 * CONDITION CODE NONZERO = DO NOT STORE DATA THEREIN. 00464000 * 00465000 * NOTE: CODE IS FUNCTIONALLY IDENTICAL TO "CHKPKEY" IN "DMKVCA". 00466000 * 00467000 CHKPKEY EQU * CHECK FOR PROTECTION VIOLATION: 00468000 CLI IOBCAW,X'00' IF HIS CAW KEY IS ZERO... 00469000 BCR 8,R14 ... HE CAN STORE ANYWHERE 00470000 L R15,X2048BND ALIGNMENT MASK 00471000 NR R15,R2 REAL ADDRESS IS IN GR 2 00472000 ISK R15,R15 GET REAL STORAGE KEY 00473000 N R15,F240 REDUCE TO FOUR BIT KEY 00474000 CLM R15,1,IOBCAW TEST FOR KEY MATCH 00475000 BR R14 AND RETURN WITH CONDITION CODE SET. 00476000 SPACE 00477000 DROP R10,R12 00478000 EJECT 00479000 *. 00480000 * SUBROUTINE NAME - 00481000 * 00482000 * DMKUNTRS - RELOCATE SENSE BYTE DATA 00483000 * 00484000 * FUNCTION - 00485000 * 00486000 * FOR 3330/3340/3350/2305 COMPUTE THE VIRTUAL CYLINDER NUMBER IN 00487000 * BYTES 5 AND 6 OF THE SENSE BYTE DATA, BY UNRELOCATING THE REAL 00488000 * CYLINDER NUMBER GIVEN BY THE HARDWARE. 00489000 * OR: 00490000 * FOR A PSEUDO 2311 SIMULATED ON A 2314/2319, TO COMPUTE THE 00491000 * APPROPRIATE STATUS FOR BYTE 3 OF THE SENSE BYTE DATA FROM 00492000 * THE REAL SENSE DATA GIVEN BY THE HARDWARE. 00493000 * 00494000 * ATTRIBUTES - 00495000 * 00496000 * REENTRANT, RESIDENT, CALLED VIA BALR 00497000 * 00498000 * ENTRY POINT - 00499000 * 00500000 * DMKUNTRS 00501000 * 00502000 * ENTRY CONDITIONS - 00503000 * 00504000 * GPR 2 = ADDRESS OF IOERBLOK CONTINAING SENSE BYTE DATA 00505000 * GPR 8 = ADDRESS OF VDEVBLOK 00506000 * GPR 14 = RETURN ADDRESS 00507000 * GPR 15 = ADDRESS OF DMKUNTRS 00508000 * 00509000 * EXIT CONDITIONS - 00510000 * 00511000 * APPROPRIATE VIRTUAL SENSE BYTE DATA HAS BEEN 00512000 * COMPUTED AND STORED IN THE IOERBLOK SENSE DATA; 00513000 * AND A FLAG-BIT IS SET INDICATING IT HAS BEEN DONE. 00514000 * 00515000 * CALLS TO OTHER ROUTINES - 00516000 * 00517000 * NONE 00518000 * 00519000 * EXTERNAL REFERENCES - 00520000 * 00521000 * NONE 00522000 * 00523000 * TABLES / WORK AREAS - 00524000 * 00525000 * BALRSAVE USED TO SAVE NEEDED REGISTERS 00526000 EJECT 00527000 * REGISTER USAGE - 00528000 * 00529000 * GPR 0-2 = WORK REGISTERS 00530000 * GPR 8 = ADDRESS OF VDEVBLOK 00531000 * GPR 11 = ADDRESS OF USER'S VMBLOK 00532000 * GPR 14 = RETURN REGISTER 00533000 * GPR 15 = ADDRESSABILITY 00534000 * 00535000 * OTHER REGISTERS ARE NOT USED 00536000 * 00537000 * NOTES - 00538000 * 00539000 * NONE 00540000 * 00541000 * OPERATION - 00542000 * 00543000 * 1. CHECKS IF FLAGBIT (IOERCYLR IN IOERFLG2) IN IOERBLOK 00544000 * IS ALREADY SET (EXIT IMMEDIATELY IF YES). IF NOT, SETS 00545000 * THE FLAG INDICATING THE SENSE DATA HAS BEEN ADJUSTED. 00546000 * 00547000 * 2. SAVES REGISTERS 0-2 (IN BALRSAVE); POINTS TO IOERDATA SENSE 00548000 * DATA IN IOERBLOK, INDICATES THAT AT LEAST 7 SENSE BYTES ARE 00549000 * AVAILABLE, AND CALLS 'UNTRSREL' INTERNAL SUBROUTINE (VIA 00550000 * GPR 2) TO ADJUST THE SENSE BYTES (SEE STEP 3 ETC). THEN 00551000 * RESTORES REGISTERS 0-2 AND RETURNS TO CALLER VIA GPR 14. 00552000 * 00553000 * 3. UNTRSREL SUBROUTINE (CALLED BY EITHER DMKUNTFR OR DMKUNTRS) 00554000 * CHECK WHETHER DEVICE IS 3330/3340/3350/2305 (STEP 4) OR 00555000 * PSEUDO 2311 (STEP 5). 00556000 * 00557000 * 4. FOR 3330/3340/3350/2305, CHECKS BYTE COUNT; IF LESS THAN 7, 00558000 * EXITS IMMEDIATELY TO CALLER. IF AT LEAST 7 SENSE BYTES 00559000 * ARE AVAILABLE, OBTAINS CYLINDER NUMBER FROM BYTES 5 AND 00560000 * 6 OF THE REAL SENSE DATA, SUBTRACTS THE VIRTUAL RELOCATION 00561000 * FACTOR, AND STORES THE RESULTANT VIRTUAL CYLINDER NUMBER 00562000 * IN BYTES 5 AND 6 OF THE SENSE DATA. 00563000 * 00564000 * 5. FOR A PSEUDO 2311 SIMULATED ON A 2314/2319, CHECKS THE 00565000 * BYTE COUNT; IF LESS THAN 4, EXITS IMMEDIATELY TO CALLER. 00566000 * IF AT LEAST 4, COMPUTES AND STORES THE APPROPRIATE SENSE 00567000 * DATA (E.G. READY ETC.) FOR SENSE BYTE 3 FROM THE REAL 00568000 * 2314/2319 SENSE BYTE. 00569000 *. 00570000 USING DMKUNTRS,R15 NOTE R15 ADDRESSABILITY REQUIREMENT 00571000 DMKUNTRS DS 0H AND THAT R14 = RETURN-REGISTER 00572000 USING IOERBLOK,R2 R2 MUST POINT TO IOERBLOK 00573000 TM IOERFLG2,IOERCYLR HAS THE DATA ALREADY BEEN RELOCATED ? 00574000 BCR 1,R14 YES - EXIT FORTHWITH - DON'T DO IT TWICE 00575000 OI IOERFLG2,IOERCYLR NO - FLAG IT AS HAVING BEEN RELOCATED 00576000 STM R0,R3,BALRSAVE SAVE THE REG WE WILL USE 00577000 LA R1,IOERDATA POINT AT THE ACTUAL DATA 00578000 LH R0,IOERLEN GET THE LENGTH OF THE SENSE DATA 00579000 DROP R2 00580000 BAL R2,UNTRSREL CALL INTERNAL SUBR TO RELOCATE SENSE DATA 00581000 LM R0,R3,BALRSAVE RESTORE THE REGS USED 00582000 BR R14 AND EXIT. 00583000 * 00584000 USING VDEVBLOK,R8 R8 MUST POINT TO VIRTUAL DEVICE BLOCK 00585000 UNTRSREL SR R3,R3 SET UP DEVICE INDEX REG 00586000 TM VDEVTYPE,TYP2305 2305 DEVICE TYPE ? 00587000 BO DATA2305 YES - BRANCH @VA04740 00588500 CLI VDEVTYPE,TYP3350 3350 DEVICE TYPE ? @V304498 00589000 BE UNT3340 YES -- @V304498 00590000 CLI VDEVTYPE,TYP3340 3340 DEVICE TYPE ? @V2A2029 00591000 BE UNT3340 YES -- @V2A2029 00592000 TM VDEVTYPE,TYP3330 3330 DEVICE TYPE ? 00593000 BNO CHNG2311 NO- BRANCH MUST BE A 2314 00594000 L R3,VDEVREAL POINT TO THE REAL DEVICE BLOCK 00595000 CLI RDEVMDL-RDEVBLOK(R3),X'0B' IS IT 3330 MOD11 ? @VA07933 00595500 BE UNT3340 YES @VA07933 00596500 LA R3,2 SET UP FOR A STANDARD 3330 00597000 B *+8 NOT 3330 MOD11 @VA07933 00598000 UNT3340 LA R3,3 SHIFT NUMBER 'CYLINDER HIGH BITS'@V304498 00599000 * FOR 3330 MOD 11/3340/3350 00600000 TM 7(R1),X'A0' * TEST SENSE BYTE 7 BITS 0-3 @VA04633 00601100 BNZ STEP2 * TO DECODE THE FORMAT OF @VA04633 00601600 TM 7(R1),X'40' * SENSE BYTES 8-23; BRANCH @VA04633 00602100 BZ STEP2 * TO STEP2 IF NOT FORMAT 4 OR 5. @VA04633 00602600 * SENSE INFORMATION FOR 3330/3340 IS EITHER FORMAT 4 OR FORMAT 5 00603200 DATA2305 TM 0(R1),DATACHK DATA CHECK OF SOME SORT? @VA04740 00603800 BZ STEP1 NO - OK TO UNRELOCATE BYTES 8-9 @VA04633 00604100 TM 2(R1),CRCTABLE "CORRECTABLE" DATA CHECK ? @VA04633 00604600 BO STEP2 YES - LEAVE BYTES 8-9 ALONE. @VA04633 00605100 * UNRELOCATE CYLINDER NUMBER IN BYTES 8-9 FOR 3330, 3340, AND 2305 00605800 STEP1 CL R0,F9 MUST HAVE 9 SENSE BYTES FOR STEP1 00607000 BL STEP2 NO- BRANCH 00608000 CLI VDEVTYPE,TYP3340 IS THIS A 334X? @V56BDA8 00608100 BNE NOT3340A NO, SKIP SPECIAL TEST @V56BDA8 00608150 LA R0,MB35AD 35MB ALTERNATE CYLINDER ADDRESS @V56BDA8 00608200 TM 2(R1),MB35 35MB 3340? @V56BDA8 00608250 BO *+8 YES IT IS @V56BDA8 00608300 LA R0,MB70AD ELSE USE 70MB/3344 CYLINDER @V56BDA8 00608350 * ADDRESS 00608400 CH R0,8(,R1) PAST PRIME CYLINDER AREA? @V56BDA8 00608450 BNH STEP2 YES, SKIP SENSE UPDATE @V56BDA8 00608500 NOT3340A EQU * END OF ALTERNATE TRACK TEST @V56BDA8 00608550 LH R0,8(,R1) GET THE CYLINDER NO FROM SENSE BYTES 8-9 00609000 SH R0,VDEVRELN RELOCATE--- 00610000 BM NEXT AND IF VALID--- 00611000 STH R0,8(,R1) SAVE THEM. 00612000 B NEXT NOW DO THE HARD ONE 00613000 STEP2 CL R0,F7 IS BYTE-COUNT (IN R0) AT LEAST 7 ? 00614000 BCR 4,R2 IF NOT, FORGET IT - EXIT TO CALLER. 00615000 NEXT IC R0,6(,R1) GET BYTE WITH 'CYLINDER HIGH' BIT(S) 00616000 SLL R0,0(R3) SHIFT THE CYLINDER HIGH BITS UP @VA06155 00617100 N R0,=A(256+512) ISOLATE CAR 256 & 512; CYL HIGH BITS 00618000 IC R0,5(,R1) NOW ADD IN THE LOW-ORDER 8 BITS OF CYL NO 00619000 CLI VDEVTYPE,TYP3340 IS THIS A 334X? @V56BDA8 00619100 BNE NOT3340B NO, SKIP SPECIAL TEST @V56BDA8 00619200 CH R0,=H'696' 70MB ALTERNATE CYLINDER ADDRESS @V56BDA8 00619300 BNLR R2 NOT IN PRIME DATA AREA @V56BDA8 00619400 TM 2(R1),MB35 PERHAPS 35MB MODULE? @V56BDA8 00619500 BZ NOT3340B NO, MUST BE A PRIMARY CYLINDER @V56BDA8 00619600 CH R0,=H'348' PAST PRIME CYLINDER AREA? @V56BDA8 00619700 BNLR R2 YES, SKIP SENSE UPDATE @V56BDA8 00619800 NOT3340B EQU * END OF ALTERNATE TRACK TEST @V56BDA8 00619900 SH R0,VDEVRELN SUBTRACT THE RELOCATION FACTOR 00620000 BCR 4,R2 IF MINUS EXIT - LEAVE DATA UNTOUCHED 00621000 STC R0,5(,R1) STORE THE LOW ORDER 8 BITS 00622000 NI 6(R1),X'9F' RESET 'CYLINDER HIGH' BITS IN SENSE BYTE 00623000 N R0,=A(256+512) ISOLATE CAR 256 & 512; CYL HIGH BITS 00624000 SRL R0,0(R3) SHIFT CYL HIGH BITS BACK DOWN @VA06155 00625100 LR R3,R0 MOVE THE CYLINDER HIGH BITS INTO R3 00626000 EX R3,OI AND REPLACE THEN IN SENSE BYTE 6 00627000 BR R2 EXIT TO MAIN ROUTINE. 00628000 SPACE 2 00629000 OI OI 6(R1),0 REPLACE THE CYL HIGH BITS IN THE SENSE 00632000 EJECT 00633000 CHNG2311 DS 0H ADJUST SENSE BYTES FOR SIMULATED 2311: 00634000 CL R0,F4 IS BYTE-COUNT (IN R0) AT LEAST 4 ? 00635000 BCR 4,R2 IF NOT, FORGET IT - EXIT TO CALLER. 00636000 CLI 3(R1),X'40' IS THE REAL 2314/2319 READY ? 00637000 BNE SNSBAD NOPE - SIMULATE NOT BUSY=READY 00638000 OI 3(R1),X'88' MAKE LIKE A 2311 00639000 BR R2 AND EXIT TO MAIN ROUTINE. 00640000 SNSBAD XI 3(R1),X'08' NOT BUSY=READY 00641000 TM 3(R1),X'40' IS THE 2314/2319 ON LINE ? 00642000 BCR 14,R2 NOPE - EXIT TO MAIN ROUTINE. 00643000 OI 3(R1),X'08' YES - MARK 2311 ON LINE. 00644000 BR R2 EXIT TO MAIN ROUTINE. 00645000 SPACE 00646000 DROP R8,R15 00647000 EJECT 00648000 *. 00649000 * SUBROUTINE NAME 00650000 * 00651000 * DMKUNTIS - UNDO ISAM PATCHES TO RCWTASKS 00652000 * 00653000 * FUNCTION - 00654000 * 00655000 * FIND THE RCWTASKS THAT HAVE BEEN PATCHED TO HANDLE 00656000 * OS ISAM SELF MODIFYING SEQUENCES AND PUT THEM 00657000 * BACK THE WAY DMKCCW HAD THEM SO THAT 00658000 * DMKUNTRN AND DMKUNTFR DONT GET UPSET 00659000 * 00660000 * ATTRIBUTES - 00661000 * 00662000 * RE-ENTRANT, RESIDENT, ENTERED FROM DMKDSPCH BY IO STACK 00663000 * 00664000 * ENTRY POINT - 00665000 * 00666000 * DMKUNTIS 00667000 * 00668000 * ENTRY CONDITIONS - 00669000 * 00670000 * R10 - IOBLOK ADDRESSING 00671000 * R12 - BASE (DMKUNTIS) ADDRESSING 00672000 * 00673000 * EXIT CONDITIONS - 00674000 * 00675000 * RCWTASKS RESTORED, VIRTUAL STORAGE RESTORED 00676000 * SAVE BLOCK FRETED, IOBLOK RE-STACKED FOR NORMAL IRA 00677000 * 00678000 * CALLS TO OTHER ROUTINES - 00679000 * 00680000 * DMKFRET - FRET SAVE BLOCK 00681000 * DMKSTKIO - STACK IOBLOK FOR NORMAL IRA 00682000 * DMKTRKFP - CHECK FOR ALTERNATE TRACK RESTART 00682100 * 00683000 * EXTERNAL REFERENCES - 00684000 * 00685000 * NONE 00686000 * 00687000 * TABLES WORK AREAS - 00688000 * 00689000 * RCWTASK - FIND ISAM WORD FOR RESTORE 00690000 * SAVE BLOCK - TO RESTORE DATA 00691000 * 00692000 * REGISTER USAGE 00693000 * 00694000 * R4 - RCWTASK 00695000 * R10 - IOBLOK 00696000 * R12 - BASE ADDRESSING ( DMKUNTIS ) 00697000 * 00698000 * OTHER REGISTERS ARE USED FOR WORK AND SCRATCH 00699000 EJECT 00700000 * NOTES - 00701000 * 00702000 * NONE 00703000 * 00704000 * OPERATION - 00705000 * 00706000 * 1. FIND FIRST RCWTASK FROM IOBLOK 00707000 * 2. LOCATE ISAM WORD AT END OF RCWTASK 00708000 * 3. IF ISAM WORD IS NON-ZERO IT POINTS TO A SAVE BLOCK 00709000 * 4. RESTORE THE RCWTASK DATA FROM SAVE BLOCK 00710000 * 5. RESTORE THE VIRTUAL STORAGE DATA FROM THE SAVE BLOCK 00711000 * 6. FRET THE SAVE BLOCK 00712000 * 7. ADJUST THE IOBCSW ADDRESS IF THE CSW ADDRESS IS 00713000 * IN VIRTUAL STORAGE INSTEAD OF RCWTASK 00714000 * 8. REPEAT STEPS 3-7 FOR ALL RCWTASKS 00715000 * 9. RESTORE IOBIRA TO NORMAL RETURN ( USUALLY DMKVIONT) 00716000 * 10. STACK IOBLOK FOR DMKDSPCH HANDLING 00717000 * 11. GOTO DMKDSPCH 00718000 * 00719000 *. 00720000 AIF (NOT &ISAM).ENDISAM 00721000 EXTRN DMKTRKFP @V56BDA8 00722100 USING DMKUNTIS,R12 00723000 USING IOBLOK,R10 00724000 ENTRY DMKUNTIS 00725000 SPACE 2 00726000 DMKUNTIS TM IOBSTAT,IOBALTSK ALTERNATE CYLINDER TASK? @V56BDA8 00727100 BZ NOALTCYL NO, SKIP CALL @V56BDA8 00727200 CALL DMKTRKFP CHECK FOR POSSIBLE RESTART @V56BDA8 00727300 NOALTCYL L R4,IOBCAW GET RCWTASK START FROM CCW START @V56BDA8 00727400 LA R4,0(,R4) CLEAR HI BYTE 00728000 SL R4,F16 R4 POINTS TO RCWTASK 00729000 * R4 NOW POINTS TO FIRST RCWTASK 00730000 FINDISM LR R3,R4 RCWTASK ADDRESS IN R3 00731000 LH R15,RCWCCNT GET RCWTASK SIZE 00732000 SLL R15,3 SIZE IN BYTES 00733000 ALR R3,R15 POINT TO END OF RCWTASK 00734000 SL R3,F4 POINT TO ISAM WORD 00735000 L R0,0(,R3) LOAD ISAM WORD 00736000 LTR R0,R0 TEST FOR ISAM WORD 00737000 BNZ UNTISAM FIX UP VIRTUAL STORAGE AND CCW'S 00738000 NXTASK L R4,RCWPNT GET NEXT RCWTASK 00739000 LTR R4,R4 TEST FOR END 00740000 BNZ FINDISM GO TEST NEXT RCWTASK 00741000 L R0,IOBMISC GET ORIGINAL IOBIRA 00742000 ST R0,IOBIRA RESTORE IOBIRA 00743000 OC IOBCSW(1),IOBMISC ADD USER'S CAW KEY TO CSW @VA02130 00744000 CALL DMKSTKIO STACK FOR PROCESSING 00745000 GOTO DMKDSPCH RETURN 00746000 EJECT 00747000 UNTISAM EQU * UNDO ISAM PATCHES IN CCW STRING @VA02130 00748000 L R9,0(0,R3) ADDRESS OF THE ISMBLOK @VA02130 00749000 USING ISMBLOK,R9 . . . @VA02130 00750000 LM R7,R8,ISMRDAD ADDR OF OLD READ AND TIC CCW'S @VA02130 00751000 MVC 0(8,R7),ISMREAD RESTORE TRANSLATED READ @VA02130 00752000 MVC 0(8,R8),ISMRTIC RESTORE TRANSLATED TIC @VA02130 00753000 L R6,0(0,R7) DATA ADDRESS FROM THE READ @VA02130 00754000 LA R6,0(0,R6) STRIP OFF THE OP-CODE @VA02130 00755000 TM 4(R7),IDA INDIRECT ADDRESSING USED ? @VA02130 00756000 BO ISMIDAL YES - A LITTLE TRICKIER @VA02130 00757000 MVC 0(10,R6),ISMRBUF MOVE DATA TO VIRTUAL STORAGE@VA02130 00758000 B FRETISM CLEAN UP FOR THE NEXT TASK @VA02130 00759000 SPACE 00760000 ISMIDAL EQU * DATA IS IN TWO PIECES @VA02130 00761000 L R5,0(0,R6) FIRST IDA WORD @VA02130 00762000 LA R1,4095(0,R5) ROUND UP TO PAGE BOUNDARY @VA02130 00763000 N R1,XPAGNUM . . . @VA02130 00764000 SR R1,R5 GR1 = LENGTH IN THE FIRST PAGE @VA02130 00765000 LR R0,R5 GR0 = DATA START IN THIS PAGE @VA02130 00766000 LA R14,ISMRBUF START OF DATA IN REAL STORAGE @VA02130 00767000 LA R15,10(0) LENGTH IS ALWAYS TEN @VA02130 00768000 MVCL R0,R14 MOVE THE FIRST PIECE OF DATA @VA02130 00769000 LR R1,R15 SET GR1 = RESIDUAL LENGTH @VA02130 00770000 L R0,4(0,R6) ADDRESS FROM SECOND IDA WORD @VA02130 00771000 MVCL R0,R14 MOVE THE REMAINING PIECE @VA02130 00772000 SPACE 00773000 FRETISM EQU * CHECK FOR CSW ADDR CONFUSION @VA02130 00774000 LA R5,ISMNTIC POINT TO PATCHED-IN TIC CCW @VA02130 00775000 CLM R5,7,IOBCSW+1 IS THAT WHERE WE STOPPED ? @VA02130 00776000 BNE EXITISM NO -- NO FIXUP REQUIRED @VA02130 00777000 L R5,ISMRTIC ADDRESS OF SEEK IN 2ND RCWTASK @VA02130 00778000 LA R5,8(0,R5) POINT PAST IT FOR CSW ADDRESS @VA02130 00779000 STCM R5,7,IOBCSW+1 PUT THE RIGHT ADDRESS HERE @VA02130 00780000 EXITISM EQU * RETURN ISMBLOK TO FREE STORAGE @VA02130 00781000 LA R0,ISMSIZE SIZE IN DOUBLE-WORDS @VA02130 00782000 LR R1,R9 STARTING ADDRESS @VA02130 00783000 CALL DMKFRET . . . @VA02130 00784000 DROP R9 @VA02130 00785000 SR R0,R0 CLEAR 00786000 ST R0,0(,R3) CLEAR ISAM WORD 00787000 B NXTASK LOOP FOR ALL RCWTASKS 00788000 EJECT 00789000 ISMBLOK DSECT , WORK AREA FOR ISAM CCW STRINGS @VA02130 00790000 SPACE 00791000 ISMRDAD DS 1F ADDRESS OF THE ISAM READ CCW @VA02130 00792000 ISMTCAD DS 1F ADDRESS OF TIC TO NEXT RCWTASK @VA02130 00793000 DS XL7 (PADDING) @VA02130 00794000 ISMRBUF DS 1X START OF 10-BYTE READ BUFFER @VA02130 00795000 ISMVARG DS XL8 SEEK ARGUMENTS FOR FOLLOWING CCW @VA02130 00796000 ISMODSK DS 1D CCW WHICH WILL BE MODIFIED @VA02130 00797000 ISMNTIC DS 1D TIC TO RE-JOIN ORIGINAL STRING @VA02130 00798000 ISMREAD DS 1D SAVE AREA FOR ORIGINAL READ CCW @VA02130 00799000 ISMRTIC DS 1D SAVE AREA FOR ORIGINAL TIC CCW @VA02130 00800000 SPACE 00801000 ISMSIZE EQU (*-ISMBLOK)/8 BLOCK SIZE IN DOUBLE-WORDS @VA02130 00802000 SPACE 00803000 DMKUNT CSECT , RE-ENTER PROGRAM CSECT @VA02130 00804000 SPACE 00805000 .ENDISAM ANOP 00806000 SPACE 00807000 LTORG 00808000 SPACE 00808100 * EQUATE(S) NOT DEFINED ELSEWHERE: 00808200 CRCTABLE EQU X'40' "CORRECTABLE" DATA-CHECK @VA04633 00808300 SPACE 1 00808400 MB35AD EQU 348 3340/44 35MB ALT CYLINDER ADD @V56BDA8 00808500 MB70AD EQU 696 3340/44 70MB ALT CYLINDER ADD @V56BDA8 00808600 MB35 EQU X'01' 3340/44 35MB @V56BDA8 00808700 EJECT 00809000 COPY SAVE 00810000 COPY VMBLOK 00811000 COPY IOBLOKS 00812000 COPY CORE @V304735 00813000 COPY VBLOKS 00814000 COPY IOER 00815000 COPY EQU 00816000 COPY DEVTYPES 00817000 PSA 00818000 COPY RBLOKS 00819000 END 00820000