Table of Contents

DMKTRK Source

References

Source Listing

DMKTRK.ASSEMBLE.txt
  1. TRK TITLE 'DMKTRK (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE INPUT SERIALIZATION @V56BDA8 00002000
  3. *. 00003000
  4. * 00004000
  5. * MODULE NAME : 00005000
  6. * 00006000
  7. * DMKTRK 00007000
  8. * 00008000
  9. * CONTENTS : 00009000
  10. * 00010000
  11. * DMKTRKIN - TREAT INTERRUPTS CAUSED BY ALTERNATE TRACKS 00011000
  12. * DMKTRKFP - EXAMINE COMMAND REJECTS FOR VIRTUAL SIO IO 00012000
  13. * DMKTRKVA - VERIFY ALTERNATE TRACK ADDRESS FOR DMKCCW 00013000
  14. * 00014000
  15. * OPERATION : 00015000
  16. * 00016000
  17. * SEE INDIVIDUAL SECTIONS 00017000
  18. * 00018000
  19. * ERROR MESSAGES: 00019000
  20. * 00020000
  21. * NONE 00021000
  22. *. 00022000
  23. COPY OPTIONS @V56BDA8 00023000
  24. DMKTRK CSECT @V56BDA8 00024000
  25. SPACE 00025000
  26. EXTRN DMKIOSQR,DMKIOSQV @V56BDA8 00026000
  27. EXTRN DMKCCWSB TO COPY CONTROL INFORMATION @V56BDA8 00027000
  28. EXTRN DMKUNTRN @V56BDA8 00028000
  29. USING SAVEAREA,R13 @V56BDA8 00029000
  30. USING PSA,R0 @V56BDA8 00030000
  31. USING IOERBLOK,R7 ADDRESSABILITY FOR IOERBLOK @V56BDA8 00031000
  32. USING RDEVBLOK,R8 @V56BDA8 00032000
  33. USING IOBLOK,R10 @V56BDA8 00033000
  34. USING VMBLOK,R11 @V56BDA8 00034000
  35. USING DMKTRK,R12 COMMON ADDRESSABILITY @V56BDA8 00035000
  36. EJECT 00036000
  37. *. 00037000
  38. * 00038000
  39. * ENTRY POINT : DMKTRKIN 00039000
  40. * 00040000
  41. * 00041000
  42. * 00042000
  43. * FUNCTION : TO HANDLE TRACK CONDITION CHECKS FOR CP AND DIAGNOSE 00043000
  44. * INITIATED IO. 00044000
  45. * 00045000
  46. * 00046000
  47. * ATTRIBUTES : REENTRANT,RESIDENT,CALLED VIA SVC. 00047000
  48. * 00048000
  49. * 00049000
  50. * ENTRY CONDITIONS : GPR3=ADDRESS OF SECOND IOERBLOK (OR 0) 00050000
  51. * GPR7=ADDRESS OF PRIMARY IOERBLOK 00051000
  52. * GPR8=ADDRESS OF RDEVBLOK 00052000
  53. * GPR10=ADDRESS OF IOBLOK 00053000
  54. * GPR12=BASE ADDRESS 00054000
  55. * GPR13=ADDRESS OF SAVE AREA 00055000
  56. * 00056000
  57. * 00057000
  58. * EXIT CONDITIONS : 00058000
  59. * 00059000
  60. * R1 SPECIFIES RETURN VECTOR FOR DMKDASER (SEE BELOW) 00060000
  61. * 00061000
  62. * 00062000
  63. * CALLS TO OTHER ROUTINES : 00063000
  64. * 1. DMKFREE - TO OBTAIN STORAGE FOR RECOVERY 00064000
  65. * WORKAREAS. 00065000
  66. * 2. DMKFRET - TO RETURN STORAGE OBTAINED BY 00066000
  67. * DMKFRET. 00067000
  68. * 3. DMKCCWSB - TO COPY CONTROL INFORMATION 00068000
  69. * 4. DMKUNTRN - TO LOCATE ADDRESS OF FAILING CCW 00069000
  70. * 00070000
  71. * 00071000
  72. * EXTERNAL REFERENCES : NONE 00072000
  73. * 00073000
  74. * 00074000
  75. * TABLES AND WORKAREAS : 00075000
  76. * IOBLOK 00076000
  77. * IOERBLOK 00077000
  78. * RCWTASK 00078000
  79. * 00079000
  80. * REGISTER USAGE : 00080000
  81. * GPR 3=USED FOR TESTING RE-OCCURRING ERROR'S 00081000
  82. * GPR 4=SCRATCH 00082000
  83. * GPR 5=GENERAL USAGE IS FOR BAL REGISTER 00083000
  84. * GPR 6=SCRATCH 00084000
  85. * GPR 7=IOERBLOK ADDRESS 00085000
  86. * GPR 8=RDEVBLOK ADDRESS. 00086000
  87. * GPR 9=RECOVERY WORKAREA 00087000
  88. * GPR 10=IOBLOK ADDRESS. 00088000
  89. * GPR 11=VMBLOK ADDRESS. 00089000
  90. * GPR 12=BASE ADDRESS. 00090000
  91. * GPR 13=SAVE AREA ADDRESS. 00091000
  92. * GPR 14=EXTERNAL LINKAGE REGISTER. 00092000
  93. * GPR 15=EXTERNAL LINKAGE REGISTER. 00093000
  94. * 00094000
  95. * 00095000
  96. * NOTES : NONE. 00096000
  97. * 00097000
  98. * 00098000
  99. * 00099000
  100. * OPERATION : A. IF FIRST TIME IN, GET FILE MASK AND CHANGE SEEK 00100000
  101. * HEADS TO X'FF'S, THEN GOTO STEP C. 00101000
  102. * B. IF GOOD COMPLETION, CLEAN UP AND EXIT. 00102000
  103. * C. IF ERROR OCCURRED (POSSIBLY DURING RETRY): 00103000
  104. * 1. IF IN OUR CCWS, EXIT WITH RECOVERY ERROR. 00104000
  105. * 2. IF NOT TRACK CONDITION CHECK OR COMMAND REJECT 00105000
  106. * ON A MODIFIED SEEK HEAD, EXIT TO DMKDASER. 00106000
  107. * D. TEST FOR THE SPECIFIC TYPE OF ERROR. 00107000
  108. * 1. COMMAND REJECT ON MODIFIED SEEK HEAD: 00108000
  109. * I) IF USER FILEMASK WILL NOT ALLOW A HEAD SWITCH 00109000
  110. * REFLECT A FILE PROTECT EXCEPTION. 00110000
  111. * II) READ HOME ADDRESS AND RECORD 0 00111000
  112. * III) IF USER CCW WILL NOT BE THE LAST, DO A FULL 00112000
  113. * SEEK, SFM, AND TIC TO THE NEXT USER CCW. 00113000
  114. * IV) IF USER CCW WILL TERMINATE THE CHAIN, RESTORE 00114000
  115. * THE SEEK HEAD OPCODE,THEN DO A FULL SEEK, 00115000
  116. * SFM , AND TIC TO THE USER CCW. 00116000
  117. * 2. TRACK CONDITION CHECK: 00117000
  118. * I) READ HOME ADDRESS AND RECORD 0. 00118000
  119. * II) IF CURRENT TRACK IS PRIMARY, SET SEEK TO 00119000
  120. * ALTERNATE TRACK (FROM R0). GO TO STEP V. 00120000
  121. * III) IF USER FILEMASK WILL NOT ALLOW A HEAD SWITCH 00121000
  122. * REFLECT A FILE PROTECT EXCEPTION. 00122000
  123. * IV) IF CURRENT TRACK IS ALTERNATE, SET SEEK TO 00123000
  124. * DEFECTIVE TRACK + 1 (FROM R0). IF NEW TRACK 00124000
  125. * WOULD BE ON NEXT CYLINDER, SIMULATE AN END 00125000
  126. * OF CYLINDER CONDITION AND EXIT. IF USER FILE 00126000
  127. * MASK DOES NOT ALLOW HEAD SWITCHING, SIMULATE 00127000
  128. * FILE PROTECT CONDITION AND EXIT. 00128000
  129. * V) FINISH SETTING UP RETRY CCWS: 00129000
  130. * SEEK 00130000
  131. * SFM USER MASK 00131000
  132. * SET SECTOR 0 00132000
  133. * READ HOME ADDRESS (SKIP DATA TRANSER) 00133000
  134. * TIC (CSW-8) 00134000
  135. * VI) RETURN TO DMKDASER WITH RETRY CODE. 00135000
  136. * 00136000
  137. *. 00137000
  138. SPACE 1 00138000
  139. ENTRY DMKTRKIN @V56BDA8 00139000
  140. DMKTRKIN ENTER , HANDLE ALTERNATE TRACK INTERRUPTS@V56BDA8 00140000
  141. SPACE 1 00141000
  142. L R11,IOBUSER ENSURE VMBLOK POINTER @V56BDA8 00142000
  143. TM IOERFLG3,IOERALTR+IOERRDR0 ALREADY GOING? @V56BDA8 00143000
  144. BZ VERFMSK NO, MUST BE FRESH TRACK CONDITION@V56BDA8 00144000
  145. TM IOERFLG3,IOERRDR0 READ R0 IN PROGRESS? @V56BDA8 00145000
  146. BO ALTHAR0 YES, CHECK OUT ENDING STATUS @V56BDA8 00146000
  147. NI IOERFLG3,255-IOERALTR UNFLAG ALT RETRY @V56BDA8 00147000
  148. LTR R3,R3 DO WE HAVE A SECOND ERROR? @V56BDA8 00148000
  149. BNZ ALT2ERRS YES, MAKE SURE NOT IN OUR CCWS @V56BDA8 00149000
  150. * ****** BAL R5,FRETWORK FREE RETRY CCWS (NO, LET DMKDAS). 00150000
  151. FINIS OI IOERFLG2,IOERCEMD SUPPRESS ERROR RECORDING. @V56BDA8 00151000
  152. LA R2,FINISALT SET RETURN VECTOR @V56BDA8 00152000
  153. RETDASER MVI IOBMISC2,0 RESET IOBMISC2 FOR USER @V56BDA8 00153000
  154. ALTREXIT ST R2,SAVER1 PUT IN CALLER'S GPR1 @V56BDA8 00154000
  155. EXIT AND EXIT GRACEFULLY @V56BDA8 00155000
  156. SPACE 1 00156000
  157. ALT2ERRS LH R0,IOERDW DBLEWRDS IN CCW AREA @V56BDA8 00157000
  158. SLL R0,3 NUMBER OF BYTES @V56BDA8 00158000
  159. L R1,IOERLOC START OF AREA @V56BDA8 00159000
  160. AR R0,R1 JUST PAST END @V56BDA8 00160000
  161. CLM R1,7,IOERCSW+1-IOERBLOK(R3) BELOW AREA? @V56BDA8 00161000
  162. BNL NOALTERR YES, NOT OUR CCW. @V56BDA8 00162000
  163. CLM R0,7,IOERCSW+1-IOERBLOK(R3) ABOVE IT? @V56BDA8 00163000
  164. BL NOALTERR YES, NOT OUR CCW . @V56BDA8 00164000
  165. RCVRYERR LA R2,RECFAIL SET RETURN VECTOR @V56BDA8 00165000
  166. B RETDASER TREAT AS RECOVERY FAILURE @V56BDA8 00166000
  167. SPACE 1 00167000
  168. NOALTERR BAL R5,FRETWORK FREE WORK AREA @V56BDA8 00168000
  169. LR R1,R7 ADDRESS FOR FRETIOER @V56BDA8 00169000
  170. LR R7,R3 POINT TO CURRENT IOERBLOK @V56BDA8 00170000
  171. SWITCH , USE I/O CPU TO MODIFY RDEVBLOK. @V56BDA8 00171000
  172. ST R7,RDEVIOER NEW BECOMES THE ORIGINAL @V56BDA8 00172000
  173. ST R7,SAVER7 FOR DMKDASER ALSO @V56BDA8 00173000
  174. MVC IOERPNT-IOERBLOK(L4,R7),IOERPNT-IOERBLOK(R1) @V56BDA8 00174000
  175. * KEEPS PTR TO POSSIBLE CHAIN OF SDR BLOCKS 00175000
  176. BAL R5,FRETIOEZ FRET IT. @V56BDA8 00176000
  177. NI IOBFLAG,255-IOBRSTRT JUST IN CASE @V56BDA8 00177000
  178. LH R0,IOBRCNT ERROR COUNT @V56BDA8 00178000
  179. BCTR R0,0 SUCCESSFUL RECOVERY MEANS @V56BDA8 00179000
  180. STH R0,IOBRCNT ONE LESS ERROR @V56BDA8 00180000
  181. TM IOERCSW+5,255-PCI-IL ANY BADDIES? @V56BDA8 00181000
  182. BNZ RECURERR YES, DONT PROCESS IT @V56BDA8 00182000
  183. TM IOERCSW+4,UC UNIT CHECK CONDITION? @V56BDA8 00183000
  184. BZ FINIS ALL DONE (MAYBE UNIT EXCEPTION) @V56BDA8 00184000
  185. CHECKIT TM IOERDATA,X'02' TRACK CONDITION CHECK? @V56BDA8 00185000
  186. BO TRKCHK YES, GO DO IT @V56BDA8 00186000
  187. TM IOERDATA,X'80' COMMAND REJECT? @V56BDA8 00187000
  188. BO MAYBSKHD YES, MAYBE A MODIFIED SEEK HEAD. @V56BDA8 00188000
  189. B RECURERR ELSE, LET DMKDASER HANDLE IT @V56BDA8 00189000
  190. SPACE 2 00190000
  191. TRKCHK BAL R5,ISITALT IS IT PRIMARY OR ALTERNATE? @V56BDA8 00191000
  192. NOP 0 NO RETURN HERE FROM ISITALT @V56BDA8 00192000
  193. B TRKCHKA ALTERNATE @V56BDA8 00193000
  194. B TRKCHKP PRIMARY @V56BDA8 00194000
  195. TRKCHKA TM IOBMISC2,X'18' DOES USER ALLOW HEAD SWITCHING? @V56BDA8 00195000
  196. BO VFILPROT NO, FILE PROTECT CONDITION @V56BDA8 00196000
  197. TRKCHKP TM IOERDATA+1,X'01' WEED OUT OPERATION INCOMPLETE. @V56BDA8 00197000
  198. BO BDTRK KEEP OUT OF TROUBLE @V56BDA8 00198000
  199. SPACE 1 00199000
  200. GETHAR0 LA R0,ALT1SIZE SIZE OF CCW WORKAREA. @V56BDA8 00200000
  201. BAL R5,GETWORK GET A RECOVERY WORKAREA @V56BDA8 00201000
  202. MVC 0(READHARZ-READHAR0,R1),READHAR0 CCWS READ HA,R0@V56BDA8 00202000
  203. BAL R5,SETUPSK SET UP THE SEEK ADDRESS @V56BDA8 00203000
  204. USING ALT1SECT,R1 @VMG0005 00204000
  205. LA R0,ALT1HA PUT FCCHH THERE @VMG0005 00205000
  206. STCM R0,7,READHA+1-READHAR0(R1) ADDR IN READ HA CCW @VMG0005 00206000
  207. LA R0,ALT1R0 PUT CCHH (R0) THERE @VMG0005 00207000
  208. STCM R0,7,READR0+1-READHAR0(R1) ADDR IN READ RO CCW @VMG0005 00208000
  209. NI ALT1FLAG,255-ALT1PASS READING HA & R0 1ST TIME.@VMG0005 00209000
  210. DROP R1 @V56BDA8 00210000
  211. ST R1,IOBRCAW RESTART CAW TO BE USED @V56BDA8 00211000
  212. GOREADR0 OI IOERFLG3,IOERRDR0 FLAG RO READ IN PROGRESS. @VMG0005 00212000
  213. RETRY LA R2,RETRYALT RETRY RETURN VECTOR @V56BDA8 00213000
  214. B ALTREXIT GO DO IT @V56BDA8 00214000
  215. SPACE 2 00215000
  216. ALTHAR0 NI IOERFLG3,255-IOERRDR0 CLEAR OUR FLAG @V56BDA8 00216000
  217. LTR R3,R3 ERROR IN OUR CCWS? @V56BDA8 00217000
  218. BNZ RCVRYERR YES, ABANDON RECOVERY EFFORTS @V56BDA8 00218000
  219. L R9,IOERLOC POINT TO OUR WORKAREA @V56BDA8 00219000
  220. USING ALT1SECT,R9 @V56BDA8 00220000
  221. TM ALT1FLAG,ALT1PASS 1ST READ OF HA & R0 OR 2ND? @VMG0005 00221000
  222. BNZ ALTHAR02 BRANCH IF JUST NOW DID 2ND READ. @VMG0005 00222000
  223. MVC IOERWRK(L'IOERWRK+L'IOERADR),ALT1HA SAVE HA & R0@VMG0005 00223000
  224. DC 0S(ALT1R0) XREFS HIDDEN REFERENCE TO ALT1R0 @VMG0005 00224000
  225. * IN THE ABOVE MVC. 00225000
  226. TM IOERDATA,X'80' WAS THIS COMMAND REJECT? @V56BDA8 00226000
  227. BO RESEEKHD YES, MUST BE SEEK HEAD PATH @V56BDA8 00227000
  228. * AND WE MUST BE ON AN ALTERNATE, 00228000
  229. * OTHERWISE FOR SEEK HEAD WE WOULD 00229000
  230. * NOT BE READING R0. NO NEED TO 00230000
  231. * CHECK R0 POINTERS NOW, THAT WOULD 00231000
  232. * HAVE BEEN DONE EARLIER WHEN WE 00232000
  233. * GOT ONTO THE ALTERNATE. 00233000
  234. TM ALT1HA,DEFTRK+ALTTRK CHECK FLAGS IN HA FLAG BYTE@VMG0005 00234000
  235. BNM RCVRYERR ONE OR THE OTHER OF THE FLAGS @VMG0005 00235000
  236. * SHOULD BE ON. ERROR IF NOT. 00236000
  237. CLC ALT1R0(L4),ALT1SKAD+2 R0 SHOULD NOT POINT SELF.@VMG0005 00237000
  238. BE RCVRYERR BRANCH IF R0 POINTS TO ITSELF. @VMG0005 00238000
  239. TM IOBFLAG,IOBCP CP CHANNEL PROGRAM? @VMG0005 00239000
  240. BO ENDR0CHK DON'T BOTHER CHECKING R0 POINTERS@VMG0005 00240000
  241. * BOTH WAYS, DISK WAS CHECKED WHEN 00241000
  242. * IT WAS FORMATTED. 00242000
  243. TM ALT1HA,ALTTRK ALREADY POSITIONED ON THE ALT? @VMG0005 00243000
  244. BO ENDR0CHK NO NEED TO CHECK POINTERS AGAIN, @VMG0005 00244000
  245. * IT WAS DONE BEFORE COMING TO ALT. 00245000
  246. * USE CHANNEL PROGRAM STILL IN WORK AREA TO READ HA & R0 FROM 00246000
  247. * OPPOSITE TRACK OF THE PAIR. HAVE TO CHANGE SEEK ADDR THOUGH. 00247000
  248. MVC ALT1SKSV(L4),ALT1SKAD+2 SAVE CCHH OF PRESENT TRK@VMG0005 00248000
  249. MVC ALT1SKAD+2(L4),ALT1R0 NEW SEEK ADDR IS FROM @VMG0005 00249000
  250. * R0 OF PRESENT TRACK. 00250000
  251. OI ALT1FLAG,ALT1PASS FLAG MEANS STARTING 2ND READ.@VMG0005 00251000
  252. B GOREADR0 GO READ HA & R0 OF OPPOSITE TRK. @VMG0005 00252000
  253. SPACE 00253000
  254. ALTHAR02 DS 0H CHECK RESULT OF 2ND READ OF HA,R0@VMG0005 00254000
  255. XC ALT1HA(L1),IOERWRK COMBINE 1ST TRK HA FLAGS @VMG0005 00255000
  256. * WITH 2ND TRK HA FLAGS. 00256000
  257. TM ALT1HA,DEFTRK+ALTTRK NOW BOTH BITS SHOULD BE 1.@VMG0005 00257000
  258. BNO RCVRYERR BRANCH IF IMPROPER FLAGS IN HA. @VMG0005 00258000
  259. CLC ALT1R0(L4),ALT1SKSV R0 POINTS BACK TO 1ST TRK? @VMG0005 00259000
  260. BNE RCVRYERR TRKS DO NOT POINT TO EACH OTHER. @VMG0005 00260000
  261. ENDR0CHK DS 0H @VMG0005 00261000
  262. BAL R5,SETUPALT SET UP CCWS @V56BDA8 00262000
  263. L R1,IOERADR+4 LOGICAL CCHH (FROM R0) @V56BDA8 00263000
  264. TM IOERWRK,ALTTRK ON ALTERNATE TRACK? @V56BDA8 00264000
  265. BZ SETSEEK NO, MUST BE A DEFECTIVE PRIMARY @V56BDA8 00265000
  266. A R1,F1 SKIP TO NEXT HEAD @V56BDA8 00266000
  267. CLM R1,3,=H'11' PAST LAST HEAD? @V56BDA8 00267000
  268. BNH SETSEEK NO, RESTART USER @V56BDA8 00268000
  269. OI IOERDATA+1,X'20' FAKE END OF CYLINDER @V56BDA8 00269000
  270. LA R2,EOCERR SET RETURN VECTOR @V56BDA8 00270000
  271. SIMULERR NI IOERDATA,255-X'02' TURN OFF TRACK CONDITION @V56BDA8 00271000
  272. * CHECK 00272000
  273. BAL R5,UPALTSNS RELOCATE CCHH IN SENSE @V56BDA8 00273000
  274. B RETDASER TREAT AS EOC OR AS FILE PROTECT. @V56BDA8 00274000
  275. SPACE 1 00275000
  276. VFILPROT OI IOERDATA+1,X'04' SET FILE PROTECT @V56BDA8 00276000
  277. LA R2,FILPROT SET RETURN VECTOR @V56BDA8 00277000
  278. B SIMULERR SIMULATE THE ERROR @V56BDA8 00278000
  279. SPACE 1 00279000
  280. SETSEEK STCM R1,15,ALT1SKAD+2 SET SEEK ADDRESS @V56BDA8 00280000
  281. LA R1,ALT1SEEK ->START OF CHANNEL PROGRAM @V56BDA8 00281000
  282. ST R1,IOBRCAW PUT IN RESTART CAW @V56BDA8 00282000
  283. MVC IOBRCAW(L1),IOBCAW SET PROTECT KEY. @V56BDA8 00283000
  284. ALTRSTRT OI IOERFLG3,IOERALTR FLAG ALTERNATE RETRY @V56BDA8 00284000
  285. B RETRY RETRY THE OPERATION @V56BDA8 00285000
  286. DROP R9 @V56BDA8 00286000
  287. SPACE 2 00287000
  288. MAYBSKHD BAL R5,CHKSKHD SEE IF USERS FAULT @V56BDA8 00288000
  289. B CRJCT COMMAND REJECT - USER ERROR @V56BDA8 00289000
  290. B SKHDALT SEEK HD OCCURRED WHILE ON ALT TRK@V56BDA8 00290000
  291. LA R0,ALT2SIZE GET A SHORT RESTART AREA @V56BDA8 00291000
  292. BAL R5,GETWORK GET A RECOVERY WORKAREA @V56BDA8 00292000
  293. JOINSKHD BAL R5,SETUSKHD SET IT UP @V56BDA8 00293000
  294. B ALTRSTRT RESTART HIS IO @V56BDA8 00294000
  295. SPACE 1 00295000
  296. RESEEKHD LH R6,IOERADR+4 POSITION TO PRIMARY CYLINDER @V56BDA8 00296000
  297. MVN IOERDATA+6(L1),IOERADR+7 SET PRIMARY HEAD (OLD) @V56BDA8 00297000
  298. B JOINSKHD JOIN NORMAL RESTART CASE @V56BDA8 00298000
  299. SPACE 1 00299000
  300. * A SEEK HEAD OCCURRED WHILE WE WERE POSITIONED ON AN ALTERNATE. 00300000
  301. * THE QUESTION NOW IS WHETHER OR NOT THE USER KNOWS HE IS ON 00301000
  302. * AN ALTERNATE. HE KNOWS HE IS THERE IF HE SEEKED DIRECTLY 00302000
  303. * TO IT. HE DOESN'T KNOW ABOUT IT IF WE TOOK HIM HERE AS 00303000
  304. * PART OF ERROR RECOVERY. IF HE IS UNAWARE OF IT, THEN HE 00304000
  305. * INTENDS THE SEEK HEAD TO OPERATE IN THE ASSOCIATED PRIMARY 00305000
  306. * CYLINDER. BUT IF HE IS AWARE OF BEING IN THE ALTERNATE 00306000
  307. * CYLINDER, THEN THE INTENT OF HIS SEEK HEAD IS UNCLEAR, BUT 00307000
  308. * COULD BE INTENDED TO GET TO SOMEONE ELSES ALTERNATE TRACK; 00308000
  309. * SO WE GIVE HIM COMMAND REJECT. NOTE THAT WE ARE STILL NOT 00309000
  310. * CERTAIN THAT IT WAS HIS SEEK AND NOT OUR ERROR RECOVERY THAT 00310000
  311. * GOT US TO THIS PARTICULAR ALTERNATE TRACK, BUT THE IOBALTSK 00311000
  312. * FLAG SAYS THERE WAS A POSSIBILITY THAT IT WAS HIM; FURTHER 00312000
  313. * CHECKING MIGHT SHOW WHO WAS RESPONSIBLE IN SOME CASES, BUT 00313000
  314. * NOT IN EVERY CASE SINCE THE ORDER OF EXECUTION OF CHANNEL 00314000
  315. * COMMANDS CANNOT IN GENERAL BE DETERMINED. HOWEVER, WE WILL 00315000
  316. * ASSERT THAT HIS MIXING OF SEEK HEADS WITH A DIRECT SEEK TO 00316000
  317. * AN ALTERNATE IS A SUFFICIENT REASON FOR KICKING HIM OUT. BUT 00317000
  318. * SOMETIMES WE LET HIM GET AWAY WITH SUCH CHANNEL PROGRAMS: WHEN 00318000
  319. * THE SEEK HEADS ALL HAPPEN TO OCCUR IN PRIMARY CYLINDERS. 00319000
  320. SKHDALT TM IOBSTAT,IOBALTSK HIS CHNL PRG HAS SEEK TO ALT? @V56BDA8 00320000
  321. BZ GETHAR0 NO. ERROR RECOVERY PUT HIM ON @V56BDA8 00321000
  322. * ALT TRK, SO NOW ERROR RECOVERY MUST 00322000
  323. * TAKE HIM BACK TO HIS PRIMARY CYLINDER. 00323000
  324. CRJCT LA R2,COMRJCT COMMAND REJECT VECTOR @V56BDA8 00324000
  325. B RETDASER RETURN TO DMKDASER @V56BDA8 00325000
  326. SPACE 1 00326000
  327. BDTRK LA R2,BADTRACK TRACK CONDITION CHECK @V56BDA8 00327000
  328. B RETDASER @V56BDA8 00328000
  329. SPACE 1 00329000
  330. RECURERR LA R2,RECURALT RECURSIVE ERROR VECTOR @V56BDA8 00330000
  331. B RETDASER RETURN TO DMKDASER @V56BDA8 00331000
  332. SPACE 2 00332000
  333. VERFMSK MVI IOBMISC2,0 CLEAR FILE MASK @V56BDA8 00333000
  334. TM IOBFLAG,IOBCP CP OPERATION? @V56BDA8 00334000
  335. BO TRKCHK YES, MASK IS ZERO AND NO SEEK @V56BDA8 00335000
  336. * HEADS 00336000
  337. BAL R5,FINDMASK FIND FILEMASK AND FIX SEEK HEADS @V56BDA8 00337000
  338. B CHECKIT GO PROCESS THE ERROR @V56BDA8 00338000
  339. SPACE 2 00339000
  340. FINDMASK SR R14,R14 CLEAR R14 @V56BDA8 00340000
  341. ICM R14,7,IOBCAW+1 -->RCWCCW @V56BDA8 00341000
  342. LA R15,RCWCCW-RCWTASK LENGTH OF RCWTASK HEADER. @V56BDA8 00342000
  343. SR R14,R15 BACK UP OVER HEADER TO BEGINNING.@V56BDA8 00343000
  344. USING RCWTASK,R14 @V56BDA8 00344000
  345. MASKLOOP LH R0,RCWRCNT NUMBER OF REAL CCWS IN TASK @V56BDA8 00345000
  346. LA R15,RCWCCW POINT TO FIRST CCW @V56BDA8 00346000
  347. USING RCWCCW,R15 @V56BDA8 00347000
  348. MASKCHK CLI RCWCOMND,X'1F' SFM? @V56BDA8 00348000
  349. BE GOTASFM YES, FOUND ONE @V56BDA8 00349000
  350. CLI RCWCOMND,X'1B' SEEK HEAD? @V56BDA8 00350000
  351. BNE MASKCONT NO, LOOK AT NEXT CCW @V56BDA8 00351000
  352. MVI RCWCOMND,X'FF' FORCE COMMAND REJECT @V56BDA8 00352000
  353. MASKCONT LA R15,8(,R15) NEXT CCW @V56BDA8 00353000
  354. BCT R0,MASKCHK CHECK IT OUT @V56BDA8 00354000
  355. ICM R14,7,RCWPNT+1 GET NEXT RCWTASK @V56BDA8 00355000
  356. BNZ MASKLOOP SCAN CCWS @V56BDA8 00356000
  357. BR R5 SFM COPIED IF FOUND, SEEKS ZAPPED@V56BDA8 00357000
  358. SPACE 1 00358000
  359. GOTASFM ST R15,SAVEWRK1 PRESERVE R15 FOR A MOMENT. @V56BDA8 00359000
  360. L R15,RCWADDR GET FILE MASK POINTER. @V56BDA8 00360000
  361. MVC IOBMISC2(L1),0(R15) COPY INTO IOBLOK. @V56BDA8 00361000
  362. L R15,SAVEWRK1 RESTORE R15. @V56BDA8 00362000
  363. B MASKCONT CONTINUE SCAN @V56BDA8 00363000
  364. DROP R14,R15 @V56BDA8 00364000
  365. SPACE 2 00365000
  366. USING ALT1SECT,R9 @V56BDA8 00366000
  367. SETUPSK MVC ALT1SKAD,ZEROES CLEAR OUT SEEK ADDRESS @V56BDA8 00367000
  368. IC R0,IOERDATA+6 GET HIGH CYLINDER BYTE @V56BDA8 00368000
  369. SRL R0,5 SHIFT RIGHT 5 @V56BDA8 00369000
  370. STC R0,ALT1SKAD+2 STORE HIGH CYL SEEK DATA @V56BDA8 00370000
  371. NI ALT1SKAD+2,X'03' CLEAR BITS 0 - 5 @V56BDA8 00371000
  372. MVC ALT1SKAD+3(1),IOERDATA+5 MOVE LOW CYL SEEK DATA @V56BDA8 00372000
  373. MVN ALT1SKAD+5(1),IOERDATA+6 MOVE HEAD ADDRESS @V56BDA8 00373000
  374. LA R0,ALT1SKAD ->SEEK ARGUMENT @V56BDA8 00374000
  375. STCM R0,7,ALT1SEEK+1 STORE INTO CCW @V56BDA8 00375000
  376. BR R5 RETURN TO CALLER @V56BDA8 00376000
  377. SPACE 2 00377000
  378. SETUPALT MVC ALT1SECT(ALT1CLEN),ALT1CCWS INITIALIZE @V56BDA8 00378000
  379. MVC ALT1SKAD,ZEROES CLEAR SEEK ADDRESS @V56BDA8 00379000
  380. LA R1,ALT1SKAD ->SEEK ADDRESS @V56BDA8 00380000
  381. STCM R1,7,ALT1SEEK+1 STORE IN SEEK CCW @V56BDA8 00381000
  382. LA R1,ALT1FMSK ->FILEMASK @V56BDA8 00382000
  383. STCM R1,7,ALT1SFM+1 STORE IN CCW @V56BDA8 00383000
  384. MVC ALT1FMSK,IOBMISC2 SET USERS FILE MASK @V56BDA8 00384000
  385. L R1,IOERCSW FAILING CCW + 8 @V56BDA8 00385000
  386. S R1,F8 BACK UP TO FAILING CCW @V56BDA8 00386000
  387. STCM R1,7,ALT1TICA+1 PROBABLE RESTART ADDRESS @V56BDA8 00387000
  388. BR R5 RETURN TO CALLER @V56BDA8 00388000
  389. DROP R9 @V56BDA8 00389000
  390. SPACE 2 00390000
  391. UPALTSNS MVC IOERDATA+5(1),IOERADR+5 LOW ORDER CC @V56BDA8 00391000
  392. IC R1,IOERADR+4 HIGH ORDER CC @V56BDA8 00392000
  393. N R1,F3 LEAVE C512 AND C256 BITS @V56BDA8 00393000
  394. SLL R1,5 GET 0CC00000 BIT PATTERN @V56BDA8 00394000
  395. STC R1,IOERDATA+6 STORE INTO 0CCXHHHH BYTE IN SENSE@V56BDA8 00395000
  396. MVN IOERDATA+6(1),IOERADR+7 COPY LOW ORDER HEAD @V56BDA8 00396000
  397. * DIGIT 00397000
  398. BR R5 RETURN @V56BDA8 00398000
  399. SPACE 2 00399000
  400. GETWORK STH R0,IOERDW SAVE IN IOERBLOK @V56BDA8 00400000
  401. CALL DMKFREE GET A WORKAREA @V56BDA8 00401000
  402. ST R1,IOERLOC SAVE IN IOERBLOK @V56BDA8 00402000
  403. LR R9,R1 WORKAREA ADDRESSING @V56BDA8 00403000
  404. BR R5 RETURN TO CALLER @V56BDA8 00404000
  405. SPACE 1 00405000
  406. FRETWORK LH R0,IOERDW LOAD REG.0 WITH CT OF DW'S @V56BDA8 00406000
  407. L R1,IOERLOC LOAD REG.1 OF ADDR. OF STORAGE @V56BDA8 00407000
  408. * OBTAINED 00408000
  409. MVC IOERDW,ZEROES CLEAR OLD DATA. @V56BDA8 00409000
  410. MVC IOERLOC,ZEROES CLEAR OLD DATA. @V56BDA8 00410000
  411. CALL DMKFRET FREE CORE @V56BDA8 00411000
  412. BR R5 RETURN TO CALLER @V56BDA8 00412000
  413. SPACE 1 00413000
  414. FRETIOER L R1,IOBIOER GET ADDRESS OF IOERBLOK @V56BDA8 00414000
  415. FRETIOEZ MVC IOBIOER,ZEROES CLEAN OUT POINTER. @V56BDA8 00415000
  416. LA R0,IOERSIZE LOAD IOERBLOK SIZE. @V56BDA8 00416000
  417. AH R0,IOEREXT-IOERBLOK(,R1) INCLUDE EXTRA SIZE @V56BDA8 00417000
  418. * (IF ANY) 00418000
  419. CALL DMKFRET @V56BDA8 00419000
  420. BR R5 RETURN TO CALLER. @V56BDA8 00420000
  421. SPACE 2 00421000
  422. USING ALT2SECT,R9 @V56BDA8 00422000
  423. SETUSKHD MVC ALT2SEEK(LEN2CCW),ALT1CCWS SEEK, SFM @V56BDA8 00423000
  424. XC ALT2TICA(ALT2SIZE*8-LEN2CCW),ALT2TICA ZERO THE @V56BDA8 00424000
  425. * REST. 00425000
  426. MVI ALT2SEEK+5,RCWGEN+RCWREL GOOD FLAGS @V56BDA8 00426000
  427. MVI ALT2SFM+5,RCWGEN+RCWREL FLAG SFM CP GENERATED @V56BDA8 00427000
  428. MVI ALT2TICA+5,RCWGEN TIC TOO @V56BDA8 00428000
  429. LA R1,ALT2SKAD -->BBCCHH AREA @V56BDA8 00429000
  430. STCM R1,7,ALT2SEEK+1 STORE ADDRESS IN SEEK @V56BDA8 00430000
  431. STH R6,ALT2SKAD+2 SET UP CC @V56BDA8 00431000
  432. MVN ALT2SKAD+5(L1),IOERDATA+6 COPY HEAD ADDRESS @V56BDA8 00432000
  433. LA R1,ALT2FMSK PUT FILEMASK IN SAME WORD @V56BDA8 00433000
  434. STCM R1,7,ALT2SFM+1 POINT CCW TO IT @V56BDA8 00434000
  435. MVC ALT2FMSK,IOBMISC2 SET UP FILE MASK @V56BDA8 00435000
  436. L R4,IOERCSW GET POINTER TO CCW @V56BDA8 00436000
  437. S R4,F8 BACKUP TO FAILING CCW @V56BDA8 00437000
  438. STCM R4,7,ALT2TICA+1 TO RESTART ON HIS CCW @V56BDA8 00438000
  439. USING RCWCCW,R4 @V56BDA8 00439000
  440. MVI ALT2TICA,8 MAKE IT A TIC @V56BDA8 00440000
  441. LH R15,RCWCNT GET COUNT @V56BDA8 00441000
  442. CHKDATCH TM RCWFLAG,CD CHAIN DATA? @V56BDA8 00442000
  443. BZ CHKCMDCH NO, CHECK FOR COMMAND CHAINING @V56BDA8 00443000
  444. BAL R14,NEXTCCW GET NEXT CCW @V56BDA8 00444000
  445. AH R15,RCWCNT ACCUMULATE COUNT @V56BDA8 00445000
  446. B CHKDATCH SEE IF END OF DATA CHAINING @V56BDA8 00446000
  447. CHKCMDCH TM RCWFLAG,CC COMMAND CHAINING? @V56BDA8 00447000
  448. BZ USEHIS NO, USE HIS CCW @V56BDA8 00448000
  449. N R15,XRIGHT16 CLEAR MEANINGLESS BITS @V56BDA8 00449000
  450. C R15,F6 CHECK OUT THE COUNT @V56BDA8 00450000
  451. BL USEHIS HE WILL GET COMMAND REJECT @V56BDA8 00451000
  452. BE FINDNXT JUST RIGHT @V56BDA8 00452000
  453. TM RCWFLAG,SILI SUPPRESS LENGTH ERROR? @V56BDA8 00453000
  454. BZ USEHIS WILL GET ILI @V56BDA8 00454000
  455. FINDNXT BAL R14,NEXTCCW GET ADDRESS OF NEXT (NON-TIC) CCW@V56BDA8 00455000
  456. L R1,ALT2TICA MODIFIED SEEK HEAD @V56BDA8 00456000
  457. TM IOBFLAG,IOBCP CP CHANNEL PROGRAM? @V56BDA8 00457000
  458. BO CPSKHD YES, NICE SIMPLE (REAL) CASE @V56BDA8 00458000
  459. LA R8,SAVEWRK4-(VDEVCSW-VDEVBLOK) FAKE A VDEVBLOK @V56BDA8 00459000
  460. ST R1,SAVEWRK4 STORE ADDRESS FOR CCWSB @V56BDA8 00460000
  461. CALL DMKUNTRN FIND VIRTUAL CCW ADDRESS @V56BDA8 00461000
  462. L R8,SAVER8 RESTORE REG8 @V56BDA8 00462000
  463. L R1,SAVEWRK4 POINT TO VIRTUAL CCW @V56BDA8 00463000
  464. LA R1,0(,R1) CLEAN IT UP @V56BDA8 00464000
  465. TRANS 2,1,OPT=(BRING,DEFER) GET USERS CCW @V56BDA8 00465000
  466. MVC SAVEWRK4(L8),0(R2) @V56BDA8 00466000
  467. DC 0AL4(SAVEWRK5) PUT SYMB IN XREF FOR ABOVE INSTR @V56BDA8 00467000
  468. LA R1,SAVEWRK4 POINT TO USER CCW @V56BDA8 00468000
  469. LA R0,6-1 LENGTH OF BBCCHH SEEK ADDR @V56BDA8 00469000
  470. LA R2,SAVEWRK2 COPY BBCCHH HERE. @V56BDA8 00470000
  471. DC 0AL4(SAVEWRK3) PUT SYMB IN XREF FOR ABOVE INSTR @V56BDA8 00471000
  472. CALL DMKCCWSB COPY CONTROL INFORMATION @V56BDA8 00472000
  473. BNZ USEHIS @V56BDA8 00473000
  474. CHKHDADD CLC =H'11',SAVEWRK2+4 IS HEAD ADDRESS OK? @V56BDA8 00474000
  475. BL USEHIS NO, END WITH HIS CCW @V56BDA8 00475000
  476. MVC ALT2SKAD+4(L2),SAVEWRK2+4 COPY HEAD ADDRESS @V56BDA8 00476000
  477. STCM R4,7,ALT2TICA+1 PUT ADDRESS IN OUR TIC @V56BDA8 00477000
  478. B USERSTRT RESTART USER @V56BDA8 00478000
  479. USEHIS L R4,ALT2TICA POINT TO USER CCW @V56BDA8 00479000
  480. MVI 0(R4),X'1B' RECONVERT TO A SEEK @V56BDA8 00480000
  481. USERSTRT TM IOBFLAG,IOBCP+IOBHVC CP OR DIAGNOSE I/O? @VMG0006 00481000
  482. BZ USERSIO NO, RESTART FOR USER SIO @VMG0006 00482000
  483. ST R9,IOBRCAW STORE RESTART ADDRESS @VMG0006 00483000
  484. MVC IOBRCAW(L1),IOBCAW COPY PROTECT KEY @V56BDA8 00484000
  485. OI IOBFLAG,IOBRSTRT INDICATE RESTART @V56BDA8 00485000
  486. BR R5 RETURN TO CALLER @V56BDA8 00486000
  487. USERSIO L R1,FFS STORE IOBRCAW = X'FFFFFFFF' @VMG0006 00487000
  488. ST R1,IOBRCAW ... @VMG0006 00488000
  489. STCM R9,7,IOBCAW+1 RESTRT CAW BECOMES IOBCAW FOR SIO@VMG0006 00489000
  490. BR R5 RETURN TO CALLER @VMG0006 00490000
  491. SPACE 1 00491000
  492. CPSKHD L R1,0(,R1) GET SEEK ARGUMENT ADDRESS @V56BDA8 00492000
  493. MVC SAVEWRK2+4(L2),4(R1) COPY HEAD ADDRESS. @V56BDA8 00493000
  494. B CHKHDADD REJOIN VIRTUAL CASE @V56BDA8 00494000
  495. DROP R9 @V56BDA8 00495000
  496. SPACE 2 00496000
  497. NEXTCCW LA R0,2 BCT COUNTER @V56BDA8 00497000
  498. LA R4,RCWCCW+8 ADVANCE TO NEXT CCW @V56BDA8 00498000
  499. NEXTCCW1 TM IOBFLAG,IOBCP RCWTASK? @V56BDA8 00499000
  500. BO NEXTCCW2 NO RCWFLAG @V56BDA8 00500000
  501. TM RCWCTL,RCWINVL BAD CCW? @V56BDA8 00501000
  502. BO USEHIS YES, USE HIS @V56BDA8 00502000
  503. NEXTCCW2 TM RCWCOMND,X'07' IS IT A TIC? @V56BDA8 00503000
  504. BNZR R14 NO, RETURN NOW @V56BDA8 00504000
  505. TM RCWADDR+3,X'07' IS IT ON A DBLEWORD? @V56BDA8 00505000
  506. BNZ USEHIS NO, ERROR @V56BDA8 00506000
  507. L R4,RCWADDR FOLLOW TIC @V56BDA8 00507000
  508. BCT R0,NEXTCCW1 VERIFY RCWINVL IF APPROPRIATE @V56BDA8 00508000
  509. B USEHIS TIC TO TIC ERROR @V56BDA8 00509000
  510. SPACE 1 00510000
  511. CHKSKHD TM IOERDATA,X'80' COMMAND REJECT? @V56BDA8 00511000
  512. BZR R5 NO, NOT OUR ERROR @V56BDA8 00512000
  513. L R4,IOERCSW GET FAILING CCW ADDRESS @V56BDA8 00513000
  514. S R4,F8 -->FAILING CCW @V56BDA8 00514000
  515. CLI RCWCOMND,X'FF' OUR OP CODE? @V56BDA8 00515000
  516. BNER R5 NO, USER ERROR @V56BDA8 00516000
  517. TM IOBFLAG,IOBCP IS A CP PRODUCTION? @V56BDA8 00517000
  518. BO ISITALT YES, NO RCWTASK AND 0 FILEMASK @V56BDA8 00518000
  519. TM RCWCTL,RCWINVL REAL INVALID OP-CODE? @V56BDA8 00519000
  520. BOR R5 YES, USER ERROR @V56BDA8 00520000
  521. TM IOBMISC2,X'18' HEAD SWITCHING PERMITTED? @V56BDA8 00521000
  522. BNO ISITALT YES, CAN BE RESTARTED @V56BDA8 00522000
  523. NI IOERDATA,255-X'80' TURN OFF COMMAND REJECT @V56BDA8 00523000
  524. OI IOERDATA+1,X'04' TURN ON FILE PROTECT @V56BDA8 00524000
  525. BR R5 TREAT AS USER ERROR @V56BDA8 00525000
  526. ISITALT IC R6,IOERDATA+6 HIGH ORDER CC + H @V56BDA8 00526000
  527. N R6,=A(B'01100000') CLEAR UNUSED BITS @V56BDA8 00527000
  528. SLL R6,3 PUT HIGH ORDER BITS IN HIGH BYTE @V56BDA8 00528000
  529. IC R6,IOERDATA+5 INSERT LOW C @V56BDA8 00529000
  530. LA R15,696 FIRST 70MB ALTERNATE @V56BDA8 00530000
  531. TM IOERDATA+2,X'01' 70MB MODULE? @V56BDA8 00531000
  532. BZ CYLTYP NO, MUST BE 35MB @V56BDA8 00532000
  533. LA R15,348 35MB ALTERNATE CYLINDER @V56BDA8 00533000
  534. CYLTYP CR R6,R15 ALTERNATE CYLINDER? @V56BDA8 00534000
  535. BNL 4(,R5) YES, GET OUT @V56BDA8 00535000
  536. B 8(,R5) NO, IT IS A PRIMARY @V56BDA8 00536000
  537. DROP R4 @V56BDA8 00537000
  538. EJECT 00538000
  539. *. 00539000
  540. * 00540000
  541. * ENTRY POINT : DMKTRKFP 00541000
  542. * 00542000
  543. * 00543000
  544. * 00544000
  545. * FUNCTION : TO HANDLE COMMAND REJECTS FOR CHANNEL PROGRAMS 00545000
  546. * INITIATED BY VIRTUAL MACHINE SIO WHICH INCLUDE 00546000
  547. * SEEKS TO ALTERNATE TRACKS WHICH LIE BEYOND THE 00547000
  548. * NORMAL EXTENTS OF THE MINI-DISK. THIS IS NEEDED 00548000
  549. * AS IN THAT CASE ALL SEEK HEAD OP-CODES HAVE BEEN 00549000
  550. * CHANGED TO INVALID OPERATION CODES. 00550000
  551. * 00551000
  552. * 00552000
  553. * ATTRIBUTES : REENTRANT,RESIDENT,CALLED VIA SVC. 00553000
  554. * 00554000
  555. * 00555000
  556. * ENTRY CONDITIONS : GPR8=ADDRESS OF VDEVBLOK 00556000
  557. * GPR10=ADDRESS OF IOBLOK 00557000
  558. * GPR11=ADDRESS OF VMBLOK 00558000
  559. * GPR12=BASE ADDRESS 00559000
  560. * GPR13=ADDRESS OF SAVE AREA 00560000
  561. * 00561000
  562. * 00562000
  563. * EXIT CONDITIONS : 00563000
  564. * 00564000
  565. * ON COMPLETION, EXIT TO CALLER WITH IOBALTSK REMOVED. 00565000
  566. * FOR RETRY, CALL DMKIOSQV AND FREE CALLER SAVEAREA, THEN 00566000
  567. * EXIT TO DISPATCHER. 00567000
  568. * 00568000
  569. * 00569000
  570. * CALLS TO OTHER ROUTINES : 00570000
  571. * 1. DMKIOSQV - TO RESTART USER CHANNEL PROGRAM. 00571000
  572. * 2. SAME AS FOR DMKTRKIN. 00572000
  573. * 00573000
  574. * 00574000
  575. * EXTERNAL REFERENCES : NONE 00575000
  576. * 00576000
  577. * 00577000
  578. * TABLES AND WORKAREAS : 00578000
  579. * IOBLOK 00579000
  580. * IOERBLOK 00580000
  581. * RCWTASK 00581000
  582. * 00582000
  583. * REGISTER USAGE : 00583000
  584. * GPR 4=SCRATCH 00584000
  585. * GPR 5=GENERAL USAGE IS FOR BAL REGISTER 00585000
  586. * GPR 6=SCRATCH 00586000
  587. * GPR 7=IOERBLOK ADDRESS 00587000
  588. * GPR 8=RDEVBLOK ADDRESS. 00588000
  589. * GPR 9=RECOVERY WORKAREA (IN RCWTASK) 00589000
  590. * GPR 10=IOBLOK ADDRESS. 00590000
  591. * GPR 11=VMBLOK ADDRESS. 00591000
  592. * GPR 12=BASE ADDRESS. 00592000
  593. * GPR 13=SAVE AREA ADDRESS. 00593000
  594. * GPR 14=EXTERNAL LINKAGE REGISTER. 00594000
  595. * GPR 15=EXTERNAL LINKAGE REGISTER. 00595000
  596. * 00596000
  597. * 00597000
  598. * NOTES : NONE. 00598000
  599. * 00599000
  600. * 00600000
  601. * 00601000
  602. * OPERATION : E. AS IN DMKTRKIN.D.1 ABOVE, EXCEPT: 00602000
  603. * 1. AN RCWTASK IS USED TO HOLD RESTART CCWS. 00603000
  604. * 2. TO RESTART, IOBSIOF IS SET TO AVOID MODIFICATION 00604000
  605. * OF SIOWAIT CONDITIONS, AND DMKIOSQV IS USED. 00605000
  606. * 3. IOBALTSK IS REMOVED BEFORE RETURNING TO CALLER. 00606000
  607. * 4. RESTART IS NOT PERFORMED IF ARM IS POSITIONED AT 00607000
  608. * AN ALTERNATE TRACK (OUR RAISON D'ETRE) 00608000
  609. * 00609000
  610. *. 00610000
  611. DMKTRKFP RELOC , ANALYSE FILE PROTECT ERRORS. @V56BDA8 00611000
  612. ICM R7,15,IOBIOER IOERBLOK? @V56BDA8 00612000
  613. BZ FPEXIT NO, ALL OK @V56BDA8 00613000
  614. L R9,FFS IOBRCAW = X'FFFFFFFF' IF WE @VMG0006 00614000
  615. CL R9,IOBRCAW HAVE RESTARTED BEFORE @VMG0006 00615000
  616. BNE FPFIRST NO, FIRST ENTRY @VMG0006 00616000
  617. TM IOBFLAG,IOBCC3 BAD START FOR RETRY? @V56BDA8 00617000
  618. BNZ FPERROR YES, HIDE OUR ERROR @V56BDA8 00618000
  619. L R9,IOBCAW POINT TO OUR CCWS @VMG0006 00619000
  620. USING ALT2SECT,R9 @V56BDA8 00620000
  621. CLM R9,7,IOERCSW+1 OUR CCWS ARE ABOVE THE ERROR? @VMG0006 00621000
  622. BNL FPCHECK YES, ERROR NOT IN OUR CCWS. @VMG0006 00622000
  623. LA R15,ALT2NCCW*8(,R9) POINT BEYOND LAST CCW @V56BDA8 00623000
  624. CLM R15,7,IOERCSW+1 OUR CCWS ARE BELOW THE ERROR? @VMG0006 00624000
  625. BL FPCHECK YES, OUR CCWS ARE BELOW ERROR @VMG0006 00625000
  626. FPERROR NI IOBFLAG,255-IOBCC3 TREAT AS INTERRUPT @V56BDA8 00626000
  627. MVC IOBCSW+1(L3),ALT2TICA+1 RESTORE ORIGINAL ADDRESS@V56BDA8 00627000
  628. B FPEXIT AND EXIT QUICKLY @V56BDA8 00628000
  629. DROP R9 @V56BDA8 00629000
  630. SPACE 1 00630000
  631. FPFIRST TM IOBFLAG,IOBCC3 INTERRUPT ENTRY? @V56BDA8 00631000
  632. BNZ FPEXIT NO, NOT OUR PROBLEM @V56BDA8 00632000
  633. BAL R5,FINDMASK FIND USER FILEMASK @V56BDA8 00633000
  634. FPCHECK TM IOERCSW+5,255-IL-PCI BAD ERROR? @V56BDA8 00634000
  635. BNZ FPEXIT YES, NOT OUR PROBLEM @V56BDA8 00635000
  636. TM IOERCSW+4,UC IS THERE A UNIT CHECK? @V56BDA8 00636000
  637. BZ FPEXIT NO, NOT OUR ERROR @V56BDA8 00637000
  638. BAL R5,CHKSKHD SEE IF A GOOD FUDGED SEEK HEAD @V56BDA8 00638000
  639. B FPEXIT USER ERROR, GET OUT @V56BDA8 00639000
  640. B FPEXIT ALTERNATE, TREAT AS COMMAND @V56BDA8 00640000
  641. * REJECT 00641000
  642. SPACE 2 00642000
  643. BAL R5,GETRCTSK CHAIN IN A DUMMY RCWTASK @V56BDA8 00643000
  644. BAL R5,SETUSKHD SET UP SEEK HEAD RESTART @V56BDA8 00644000
  645. SPACE 1 00645000
  646. BAL R5,FRETIOER FRET IT @V56BDA8 00646000
  647. SPACE 1 00647000
  648. OI IOBSPEC,IOBSIOF PREVENT REMOVAL OF SIOWAIT @V56BDA8 00648000
  649. CALL DMKIOSQV REQUEUE THE IO @V56BDA8 00649000
  650. SVC 16 RETURN DMKVIOIN SAVEAREA @V56BDA8 00650000
  651. GOTO DMKDSPCH EXIT GRACEFULLY @V56BDA8 00651000
  652. SPACE 2 00652000
  653. FPEXIT NI IOBSTAT,255-IOBALTSK PREVENT RECURSION @V56BDA8 00653000
  654. MVI IOBMISC2,0 JUST TO BE SURE @V56BDA8 00654000
  655. EXIT RETURN TO DMKVIOIN OR DMKUNTIS @V56BDA8 00655000
  656. SPACE 6 00656000
  657. GETRCTSK L R1,FFS HAVE WE ALREADY ACQUIRED RCWTASK @VMG0006 00657000
  658. CL R1,IOBRCAW RCWTASK?? @VMG0006 00658000
  659. BER R5 YES, LEAVE QUICKLY @VMG0006 00659000
  660. LA R0,(RCWCCW-RCWTASK)/8+ALT2SIZE SIZE @V56BDA8 00660000
  661. CALL DMKFREE GET AN RCWTASK @V56BDA8 00661000
  662. USING RCWTASK,R1 @V56BDA8 00662000
  663. LA R9,RCWCCW LET US USE ALT1SECT @V56BDA8 00663000
  664. MVC RCWTASK(RCWCCW-RCWTASK),ZEROES CLEAR OUT RCWTASK@V56BDA8 00664000
  665. MVI RCWRCNT+1,ALT2NCCW NUMBER OF REAL CCWS @V56BDA8 00665000
  666. MVC RCWHEAD,FFS RCW BACKSTOP FIELD @V56BDA8 00666000
  667. MVI RCWCCNT+1,(RCWCCW-RCWTASK)/8+ALT2SIZE # DBLWDS. @V56BDA8 00667000
  668. SR R14,R14 CLEAR R14 @V56BDA8 00668000
  669. ICM R14,7,IOBCAW+1 -->FIRST RCWCCW @V56BDA8 00669000
  670. LA R15,RCWCCW-RCWTASK LENGTH OF RCWTASK HEADER. @V56BDA8 00670000
  671. SR R14,R15 BACK UP OVER HEADER TO BEGINNING.@V56BDA8 00671000
  672. STCM R14,7,RCWPNT+1-RCWTASK(R1) MAKE OUR RCWTASK FST @VMG0006 00672000
  673. BR R5 RETURN TO CALLER @V56BDA8 00673000
  674. DROP R1 @V56BDA8 00674000
  675. EJECT 00675000
  676. *. 00676000
  677. * 00677000
  678. * ENTRY POINT : DMKTRKVA 00678000
  679. * 00679000
  680. * 00680000
  681. * 00681000
  682. * FUNCTION: TO RETURN ADDRESS OF DEFECTIVE TRACK FOR WHICH A GIVEN 00682000
  683. * ALTERNATE TRACK IS ASSIGNED. 00683000
  684. * 00684000
  685. * 00685000
  686. * ATTRIBUTES : REENTRANT,RESIDENT,CALLED VIA SVC. 00686000
  687. * 00687000
  688. * 00688000
  689. * ENTRY CONDITIONS : GPR7=ADDRESS BBCCHH IN USER SEEK 00689000
  690. * GPR8=ADDRESS OF VDEVBLOK 00690000
  691. * GPR11=ADDRESS OF VMBLOK 00691000
  692. * GPR12=BASE ADDRESS 00692000
  693. * GPR13=ADDRESS OF SAVE AREA 00693000
  694. * 00694000
  695. * 00695000
  696. * EXIT CONDITIONS : 00696000
  697. * 00697000
  698. * R1 = CYLINDER ADDRESS OR -1 IF ERROR CONDITION 00698000
  699. * 00699000
  700. * 00700000
  701. * CALLS TO OTHER ROUTINES : 00701000
  702. * 1. DMKFREE - TO OBTAIN IOBLOK. 00702000
  703. * 2. DMKFRET - TO RETURN IOBLOK. 00703000
  704. * 3. DMKIOSQR - INITIATE IO OPERATIONS. 00704000
  705. * 00705000
  706. * 00706000
  707. * EXTERNAL REFERENCES : 00707000
  708. * DMKIOSQR 00708000
  709. * 00709000
  710. * 00710000
  711. * TABLES AND WORKAREAS : IOBLOK 00711000
  712. * 00712000
  713. * 00713000
  714. * REGISTER USAGE : 00714000
  715. * GPR 0-2 SCRATCH 00715000
  716. * GPR 10=IOBLOK ADDRESS. 00716000
  717. * GPR 11=VMBLOK ADDRESS. 00717000
  718. * GPR 12=BASE ADDRESS. 00718000
  719. * GPR 13=SAVE AREA ADDRESS. 00719000
  720. * GPR 14=EXTERNAL LINKAGE REGISTER. 00720000
  721. * GPR 15=EXTERNAL LINKAGE REGISTER. 00721000
  722. * 00722000
  723. * 00723000
  724. * NOTES : NONE. 00724000
  725. * 00725000
  726. * 00726000
  727. * 00727000
  728. * OPERATION : F. IF GIVEN ADDRESS IS NOT AN ALTERNATE, EXIT. 00728000
  729. * G. BUILD IOBLOK AND CALL DMKIOSQR TO READ R0. 00729000
  730. * H. RETURN CYLINDER FROM R0 TO CALLER. 00730000
  731. * 00731000
  732. *. 00732000
  733. USING VDEVBLOK,R8 @V56BDA8 00733000
  734. SPACE 1 00734000
  735. DMKTRKVA RELOC , GIVEN ALT TRK, FINDS DEF CYL ADDR@V56BDA8 00735000
  736. L R8,VDEVREAL GET RDEVBLOK ADDRESS @V56BDA8 00736000
  737. L R2,FFS IN CASE OF ERROR @V56BDA8 00737000
  738. LA R0,IOBSIZE SIZE OF AN IOBLOK @V56BDA8 00738000
  739. CALL DMKFREE GET ONE @V56BDA8 00739000
  740. XC 0(IOBSIZE*8,R1),0(R1) CLEAR IT OUT @V56BDA8 00740000
  741. LR R10,R1 PUT IN STANDARD REGISTER @V56BDA8 00741000
  742. ST R13,IOBMISC2 SAVE SAVEAREA POINTER @V56BDA8 00742000
  743. ST R11,IOBUSER PUT VMBLOK IN IOBLOK @V56BDA8 00743000
  744. MVC SAVEWRK2(READHARZ-READHAR0),READHAR0 MOVE CCWS. @V56BDA8 00744000
  745. DC 0AL4(SAVEWRK3,SAVEWRK4,SAVEWRK5,SAVEWRK6,SAVEWRK7,SAVEWR*00745000
  746. K8,SAVEWRK9) THIS XREFS SYMBOLS MVC'D TO ABOVE 00746000
  747. STCM R7,7,SAVEWRK2+1 MAKE SEEK POINT TO BBCCHH. @V56BDA8 00747000
  748. LA R1,SAVEWRK1 PUT AS MUCH OF HA HERE AS FITS. @V56BDA8 00748000
  749. STCM R1,7,SAVEWRK6+1 MAKE 'READ HA' POINT THERE. @V56BDA8 00749000
  750. MVI SAVEWRK7+3,4 REDUCE HA COUNT; SAVEWRK1 = FCCH.@V56BDA8 00750000
  751. LA R1,SAVER1 PUT R0 HERE (CCHH). @V56BDA8 00751000
  752. STCM R1,7,SAVEWRK8+1 PUT ADDRESS IN CCW @V56BDA8 00752000
  753. LA R1,SAVEWRK2 ->CHANNEL PROGRAM @V56BDA8 00753000
  754. ST R1,IOBCAW SET CAW ADDRESS IN IOBLOK @V56BDA8 00754000
  755. LA R1,HAR0RTN GET INTERRUPT RETURN ADDRESS AND @V56BDA8 00755000
  756. ST R1,IOBIRA STORE IT IN THE IOBLOK @V56BDA8 00756000
  757. CALL DMKIOSQR CALL IOS TO SCHEDULE READ @V56BDA8 00757000
  758. GOTO DMKDSPCH WAIT FOR I/O TO COMPLETE @V56BDA8 00758000
  759. SPACE 00759000
  760. HAR0RTN DS 0H CONNECTOR @V56BDA8 00760000
  761. USING *,R12 @V56BDA8 00761000
  762. S R12,=A(HAR0RTN-DMKTRK) RELOCATE R12. @V56BDA8 00762000
  763. USING DMKTRK,R12 @V56BDA8 00763000
  764. L R13,IOBMISC2 RESTORE ADDRESS OF SAVEAREA @V56BDA8 00764000
  765. L R2,FFS POSSIBLE IO ERROR CODE @V56BDA8 00765000
  766. TM IOBSTAT,IOBFATAL+IOBCC3 WAS THERE AN ERROR @V56BDA8 00766000
  767. * CONDITION 00767000
  768. BNZ EXITVA2 IF YES, EXIT WITH ERROR CODE @V56BDA8 00768000
  769. NI SAVEWRK1,X'03' CLEAR UNWANTED BITS FROM HA FLAG.@V56BDA8 00769000
  770. CLI SAVEWRK1,1 POSSIBLE BIT VALUES: 00,01,10,11.@V56BDA8 00770000
  771. BNE EXITVA2 ALL BUT 01 INDICATE INVALID ALT. @V56BDA8 00771000
  772. LH R2,SAVER1 GET CC OF DEF TRK POINTED TO. @V56BDA8 00772000
  773. EXITVA2 LA R0,IOBSIZE @V56BDA8 00773000
  774. LR R1,R10 PUT ADDRESS OF IOB IN R1 @V56BDA8 00774000
  775. CALL DMKFRET FREE IOB @V56BDA8 00775000
  776. EXITVA ST R2,SAVER1 RETURN CC IN CALLERS GPR1 @V56BDA8 00776000
  777. EXIT RETURN TO CALLER @V56BDA8 00777000
  778. DROP R8 @V56BDA8 00778000
  779. EJECT 00779000
  780. *** 00780000
  781. * RETURN VECTORS FOR DMKDASER 00781000
  782. *** 00782000
  783. FINISALT EQU 0 ALL FINISHED @V56BDA8 00783000
  784. RETRYALT EQU 4 RETRY FROM IOBRSTRT @V56BDA8 00784000
  785. EOCERR EQU 8 END OF CYLINDER CONDITION @V56BDA8 00785000
  786. RECURALT EQU 12 SECOND ERROR - ANALYSE IT @V56BDA8 00786000
  787. RECFAIL EQU 16 RECOVERY FAILURE @V56BDA8 00787000
  788. FILPROT EQU 20 FILE PROTECTION EXCEPTION @V56BDA8 00788000
  789. BADTRACK EQU 24 VERY DEFECTIVE TRACK @V56BDA8 00789000
  790. COMRJCT EQU 28 COMMAND REJECT @V56BDA8 00790000
  791. *** 00791000
  792. SPACE 2 00792000
  793. LEN2CCW EQU 2*8 REPRESENTS LENGTH OF 2 CCWS. @V56BDA8 00793000
  794. L1 EQU 1 FOR USE AS SYMBOLIC LENGTH @V56BDA8 00794000
  795. L2 EQU 2 FOR USE AS SYMBOLIC LENGTH @V56BDA8 00795000
  796. L3 EQU 3 FOR USE AS SYMBOLIC LENGTH @V56BDA8 00796000
  797. L4 EQU 4 FOR USE AS SYMBOLIC LENGTH. @V56BDA8 00797000
  798. L8 EQU 8 FOR USE AS SYMBOLIC LENGTH @V56BDA8 00798000
  799. SPACE 3 00799000
  800. READHAR0 CCW 7,*-*,CC,6 SEEK @V56BDA8 00800000
  801. CCW 35,ZEROES-PSA,CC+SILI,1 SET SECTOR 0 @V56BDA8 00801000
  802. READHA CCW 26,*-*,CC+SILI,5 READ HA (FCCHH) @V56BDA8 00802000
  803. READR0 CCW 22,*-*,SILI,4 READ R0 (CCHH) @V56BDA8 00803000
  804. READHARZ EQU * MARKS END OF READHAR0 CHNL PROG. @V56BDA8 00804000
  805. SPACE 1 00805000
  806. ALT1CCWS CCW 7,*-*,CC,6 SEEK @V56BDA8 00806000
  807. CCW 31,*-*,CC+SILI,1 SET FILE MASK @V56BDA8 00807000
  808. CCW 35,ZEROES-PSA,CC+SILI,1 SET SECTOR 0 @V56BDA8 00808000
  809. CCW 26,0,CC+SKIP+SILI,5 READ HA (NO DATA TRANSFER) @V56BDA8 00809000
  810. CCW 8,*-*,0,0 TIC @V56BDA8 00810000
  811. SPACE 2 00811000
  812. LTORG @V56BDA8 00812000
  813. SPACE 3 00813000
  814. ALT1SECT DSECT , RECOVERY WORKAREA @V56BDA8 00814000
  815. ALT1SEEK CCW 7,ALT1SKAD,CC,6 SEEK @V56BDA8 00815000
  816. ALT1SFM CCW 31,ALT1FMSK,CC+SILI,1 SET FILE MASK @VMG0005 00816000
  817. ALT1SCT0 CCW 35,ZEROES,CC+SILI,1 SET SECTOR 0 OR SRCHEQ R1 @V56BDA8 00817000
  818. ALT1RHA CCW 26,0,SKIP+SILI+CC,5 DUMMY RHA OR TIC *-8 @V56BDA8 00818000
  819. ALT1TICA CCW 8,*-*,0,0 TIC TO USER CCW OR TO SEARCH @V56BDA8 00819000
  820. ALT1CLEN EQU *-ALT1SECT LENGTH OF USUAL CCWS @V56BDA8 00820000
  821. ALT1SKAD DS XL6 SEEK ADDRESS @VMG0005 00821000
  822. ALT1FMSK DS XL1 FILE MASK FOR RESTART @VMG0005 00822000
  823. ALT1HA DS XL5 'READHA' READS HA INTO HERE. @VMG0005 00823000
  824. ALT1R0 DS XL4 'READR0' READS R0 COUNT INTO HERE@VMG0005 00824000
  825. ALT1SKSV DS XL4 SAVES 1ST SEEK ADDR (CCHH) DURING@VMG0005 00825000
  826. * 2ND READ HA & R0. 00826000
  827. ALT1FLAG DS XL1 FLAG BITS. EQUATE(S) FOLLOW. @VMG0005 00827000
  828. ALT1PASS EQU X'01' BIT INDICATES 1ST OR 2ND READ OF @VMG0005 00828000
  829. * HA & R0 WHEN CHECKING R0 POINTERS BOTH 00829000
  830. * WAYS. 0 = 1ST TIME, 1 = 2ND TIME. 00830000
  831. ALT1SIZE EQU (*-ALT1SECT+7)/8 NUMBER OF DBLEWRDS @V56BDA8 00831000
  832. SPACE 1 00832000
  833. ALT2SECT DSECT , RECOVERY WORKAREA @V56BDA8 00833000
  834. ALT2SEEK CCW 7,ALT2SKAD,CC,6 SEEK @V56BDA8 00834000
  835. ALT2SFM CCW 31,ALT2FMSK,CC+SILI,1 SET FILE MASK @V56BDA8 00835000
  836. ALT2TICA CCW 8,*-*,0,0 TIC TO USER PROGRAM @V56BDA8 00836000
  837. ALT2NCCW EQU (*-ALT2SEEK)/8 NUMBER OF CCWS. @V56BDA8 00837000
  838. ALT2SKAD DC XL6'0' SEEK ADDRESS @V56BDA8 00838000
  839. ALT2RECN DC XL1'0' RECORD NUMBER FOR SEARCH @V56BDA8 00839000
  840. ALT2FMSK DC XL1'0' FILE MASK FOR RESTART @V56BDA8 00840000
  841. ALT2SIZE EQU (*-ALT2SECT+7)/8 NUMBER OF DBLEWRDS @V56BDA8 00841000
  842. SPACE 00842000
  843. ALTSZCHK EQU ALT1SIZE-ALT2SIZE WHEN GOING THRU THE PATH FROM @VMG0005 00843000
  844. * 'ALTHAR0' TO 'RESEEKHD' TO 'SETUSKHD', 00844000
  845. * ALT1SECT AND ALT2SECT BOTH USE SAME 00845000
  846. * WORK AREA (AT DIFFERENT TIMES). THIS 00846000
  847. * EQU SIMPLY CHECKS TO SEE THAT ALT2 00847000
  848. * WILL FIT IN WORK AREA ALLOCATED FOR 00848000
  849. * ALT1 AND GIVES ASSEMBLY ERROR IF IT 00849000
  850. * DOES NOT FIT. 00850000
  851. SPACE 3 00851000
  852. ALTTRK EQU X'01' ALTERNATE TRACK @V56BDA8 00852000
  853. DEFTRK EQU X'02' DEFECTIVE TRACK @V56BDA8 00853000
  854. EJECT 00854000
  855. COPY RBLOKS @V56BDA8 00855000
  856. COPY VBLOKS @V56BDA8 00856000
  857. COPY IOBLOKS @V56BDA8 00857000
  858. COPY DEVTYPES @V56BDA8 00858000
  859. COPY EQU @V56BDA8 00859000
  860. COPY SAVE @V56BDA8 00860000
  861. COPY IOER @V56BDA8 00861000
  862. COPY VMBLOK @V56BDA8 00862000
  863. PSA @V56BDA8 00863000
  864. END DMKTRK 00864000