Table of Contents

DMKPGS Source

References

Source Listing

DMKPGS.ASSEMBLE.txt
  1. PGS TITLE 'DMKPGS (CP) VM/370 - RELEASE 6' 00001000
  2. PUNCH 'SPB' START ON PAGE BOUNDARY @VM03171 00002000
  3. ISEQ 73,80 VALIDATE INPUT SERIALIZATION @V200820 00003000
  4. COPY OPTIONS 00004000
  5. COPY LOCAL OPTIONS 00005000
  6. EJECT 00006000
  7. DMKPGS CSECT 00007000
  8. SPACE 3 00008000
  9. EXTRN DMKPGTPR,DMKPGTSP @VA04554 00009000
  10. EXTRN DMKPTRFT 00010000
  11. EXTRN DMKCVTAB @V408246 00011000
  12. EXTRN DMKDSPNP 00012000
  13. EXTRN DMKPTRSC @VA03412 00013000
  14. EXTRN DMKPTRRC 00014000
  15. EXTRN DMKSTKCP @VA03145 00015000
  16. EXTRN DMKPTRUL UNLOCK 'LOCKED' PAGE @V408246 00016000
  17. EXTRN DMKBLDRT,DMKBLDRL @V304635 00017000
  18. EXTRN DMKDSPCH @VA03145 00018000
  19. EXTRN DMKVMASH @V60BC11 00019000
  20. EXTRN DMKPAGQ,DMKPTRFQ @V408246 00020000
  21. EXTRN DMKPTRRS @V408246 00021000
  22. EXTRN DMKSYSOW @VA04554 00022000
  23. EXTRN DMKDSPRQ @V400141 00023000
  24. EXTRN DMKPTRPW @VA08037 00023100
  25. AIF (NOT &VIRREAL).NOVR1 00024000
  26. EXTRN DMKSLC 00025000
  27. .NOVR1 ANOP 00026000
  28. SPACE 3 00027000
  29. USING PSA,R0 00028000
  30. USING VMBLOK,R11 00029000
  31. USING SAVEAREA,R13 00030000
  32. EJECT 00031000
  33. *. 00032000
  34. * MODULE NAME - 00033000
  35. * 00034000
  36. * DMKPGS 00035000
  37. * 00036000
  38. * FUNCTION - 00037000
  39. * 00038000
  40. * 1. TO RELEASE THE PAGES OF A USER'S VIRTUAL STORAGE SPACE 00039000
  41. * BOTH FROM REAL MAIN STORAGE AND FROM TEMPORARY SLOTS ON 00040000
  42. * THE DASD PAGE STORAGE AREA. 00041000
  43. * 2. TO LOCATE A NAMED SYSTEM WHICH RESIDES IN THE USER'S 00042000
  44. * VIRTUAL STORAGE. 00043000
  45. * 3. TO RELEASE A NAMED SYSTEM WHICH RESIDES IN THE USER'S 00044000
  46. * VIRTUAL STORAGE. 00045000
  47. * 00046000
  48. * ATTRIBUTES - 00047000
  49. * 00048000
  50. * REENTRANT,PAGEABLE, CALLED VIA SVC 00049000
  51. * 00050000
  52. * ENTRY POINTS - 00051000
  53. * 00052000
  54. * DMKPGSPO - RELEASE THE USER'S ENTIRE VIRTUAL SPACE 00053000
  55. * DMKPGSPP - RELEASE ONLY A SPECIFIED PART OF THE MEMORY 00054000
  56. * DMKPGSPR - RELEASE AND UNLOCK SPECIFIED USERS'S STORAGE 00055000
  57. * DMKPGSPS - RELEASE A NAMED SYSTEM FROM USER'S VIRTUAL STORAGE 00057000
  58. * DMKPGSSS - RELEASE VIRTUAL STORAGE BUT BYPASS ANY VIRTUAL 00058000
  59. * STORAGE WHICH CONTAINS A NAMED SYSTEM 00059000
  60. * 00061000
  61. * ENTRY CONDITIONS - 00062000
  62. * 00063000
  63. * 00066000
  64. * FOR DMKPGSPO - 00067000
  65. * GPR2 = PARM NOCLEAR IF STORAGE NOT TO BE RELEASED 00068000
  66. * GPR11 = ADDRESS OF VMBLOK OF VIRTUAL MEMORY'S OWNER 00069000
  67. * GPR12 = ADDRESS OF ENTRY POINT 00070000
  68. * GPR13 = ADDRESS OF SAVEAREA 00071000
  69. * 00072000
  70. * FOR DMKPGSPP, DMKPGSSS AND DMKPGSPR 00073000
  71. * GPR1 = ADDRESS OF 1'ST PAGE TO RELEASE 00074000
  72. * GPR2 = ADDRESS OF LAST PAGE TO RELEASE 00075000
  73. * 00076000
  74. * FOR DMKPGSPS - 00080000
  75. * GPR 1-2 = NAME OF THE NAMED SYSTEM TO RELEASE 00081000
  76. * (GPR 1 = 0 MEANS THAT NO SHRTABLE EXISTS) 00082000
  77. * 00083000
  78. * EXIT CONDITIONS - 00084000
  79. * 00085000
  80. * NONE 00086000
  81. * 00087000
  82. * CALLS TO OTHER ROUTINES - 00088000
  83. * 00089000
  84. * DMKPTRAN - TO ENQUEUE ON IN-TRANSIT PAGES 00090000
  85. * DMKPTRFT - TO RETURN PAGES TO THE FREE PAGE LIST 00091000
  86. * DMKPTRUL UNLOCK A PAGE 00092000
  87. * DMKVMASH CHECK FOR CHANGED SHARED PAGE 00093000
  88. * DMKVMAPS UNSHARE A CHANGED SHARED PAGE 00094000
  89. * DMKPTRRS CORE RESET FUNCTION 00095000
  90. * DMKPGTPR - TO RELEASE A DASD PAGE SLOT 00096000
  91. * DMKPGTSP - TO RELEASE A DASD PAGE ASSIGNED TO SYSTEM 00097000
  92. * DMKFREE - TO GET STORAGE FOR NON-SHARED PAGE AND SWAP TABLES 00098000
  93. * DMKFRET - TO RELEASE SHARED SYSTEM CONTROL TABLES WHEN USER 00099000
  94. * COUNT IS ZERO 00100000
  95. * DMKBLDRT - BUILD NEW SWAP/PAGE AND SEGMENT TABLES 00101000
  96. * DMKBLDRL - RELEASE OLD SWAP/PAGE AND SEGMENT TABLES 00102000
  97. * 00103000
  98. * DMKSTKCP - TO STACK DEFERRED REQUESTS FOR EXECUTION 00104000
  99. * DMKDSPCH - TO RETURN TO DISPATCHER 00105000
  100. * EXTERNAL REFERENCES - 00106000
  101. * 00107000
  102. * DMKDSPNP - NUMBER OF DYNAMICALLY ASSIGNABLE PAGE FRAMES 00108000
  103. * DMKPTRRC - NUMBER OF REIDENT, RESERVED PAGES 00109000
  104. * DMKVMAS1 - ANCHOR FOR SHARED SYSTEMS (SHRTABLE POINTER) 00110000
  105. * DMKVMAS2 - ANCHOR FOR NAMED SYSTEMS (SHRTABLE POINTER) 00111000
  106. * DMKPTRSC - NUMBER OF RESIDENT SHARED PAGES @VA03412 00112000
  107. * 00113000
  108. * 00114000
  109. * TABLES / WORKAREAS - 00115000
  110. * 00116000
  111. * CORTABLE, SWPTABLE, PAGTABLE, SEGTABLE, SHRTABLE 00117000
  112. * 00118000
  113. * REGISTER USAGE - 00119000
  114. * 00120000
  115. * GPR0 = SCRATCH 00121000
  116. * GPR1 = VIRTUAL ADDRESS OF PAGE TO RELEASE 00122000
  117. * GPR2 = REAL ADDRESS OF PAGE TO RELEASE 00123000
  118. * GPR3 = SEGMENT ENTRY BASE 00124000
  119. * GPR4 = PAGE TABLE ENTRY CLEARING REG 00125000
  120. * GPR5 = SWPTABLE ENTRY BASE 00126000
  121. * GPR6 = USED TO CLEAR CORSWPNT FIELD IN CORTABLE ENTRY 00127000
  122. * GPR7 = CORTABLE ENTRY BASE 00128000
  123. * GPR8 = NUMBER OF PAGES TO RELEASE 00129000
  124. * GPR9 = PAGTABLE ENTRY BASE 00130000
  125. * GPR10 - NOT USED 00131000
  126. * GPR11 = VMBLOK BASE 00132000
  127. * GPR12 = DMKPGS BASE 00133000
  128. * GPR13 = SAVEAREA BASE 00134000
  129. * GPR14 = EXTERNAL LINKAGE 00135000
  130. * GPR15 = EXTERNAL LINKAGE 00136000
  131. * 00137000
  132. * NOTES - 00138000
  133. * NONE 00139000
  134. * 00140000
  135. EJECT 00141000
  136. * THE NAMED SYSTEM WHICH IS CONTAINED IN GPR 1-2 IS RELEASED 00272000
  137. * FROM THE USER'S VIRTUAL STORAGE SPACE. RETURN IS THEN MADED 00273000
  138. * TO THE CALLER WITH CC = 0. 00274000
  139. * IF THE NAMED SYSTEM DOES NOT RESIDE IN THE USER'S VIRTUAL 00275000
  140. * STORAGE, RETURN IS MADE TO THE CALLER WITH CC = 1. 00276000
  141. SPACE 2 00277000
  142. DC CL8'DMKPGS ' MODULE NAME @VA12777 00277100
  143. DMKPGSPS RELOC @V304635 00278000
  144. USING SEGTABLE,R3 @VA11919 00278100
  145. USING SWPFLAG,R5 @VA11919 00278200
  146. USING CORTABLE,R7 @VA11919 00278300
  147. USING PAGCORE,R9 @VA11919 00278400
  148. USING SHRTABLE,R10 @VA11919 00278500
  149. XC SAVEWRK1,SAVEWRK1 CLEAR FLAG BYTE @V304635 00279000
  150. LTR R1,R1 IS SYSTEM NAME 0? @VA05638 00280000
  151. BZ PURCONT YES, NO SHRTABLE EXISTS @VA05638 00281000
  152. * BECAUSE PAGING ERROR ABORTED PROCESSING 00282000
  153. MVI SAVEWRK1,PURGE PURGE NAMED SYSTEM PASSES IN @V304635 00283000
  154. * R1-R2 00284000
  155. SLR R1,R1 START LOOKING FOR NAMED SYSTEM @V304635 00285000
  156. * HERE 00286000
  157. SLR R2,R2 CLEAR FOR LAST ADDRESS @V304635 00287000
  158. IC R2,VMSEG GET NUMBER OF SEGMENT TABLES @V304635 00288000
  159. LA R2,1(,R2) ORIGIN TO BASE OF 1 @V304635 00289000
  160. SLL R2,20 GET ADDR +1 PAGE OF LAST PAGE @V304635 00290000
  161. BCTR R2,0 ENDING ADDRESS TO PURGE @V304635 00291000
  162. B PGOUT1 JOIN COMMON CODE. @V407511 00292000
  163. PURFINSH TM SAVEWRK1,PURGE PURGING A NAMED SYSTEM ? @V304635 00293000
  164. BZ PURCONT NO - JUST RELEASING STORAGE @V304635 00294000
  165. TM SAVEWRK1,SYSFND WAS NAMED SYSTEM FOUND ? @V304635 00295000
  166. BZ SETCC1 NO - SET CONDITION CODE FOR @V304635 00296000
  167. * CALLER 00297000
  168. TM SAVEWRK1,SYSFRET SHOULD WE FRET THE SHRTABLE @V304635 00298000
  169. BZ PURCONT NO - IN USE BY OTHER USERS @V304635 00299000
  170. LM R0,R1,SAVEWRK7 GET LENGTH/ADDRESS OF SHRTABLE @V304635 00300000
  171. CALL DMKFRET NOW FRET IT. @V304635 00301000
  172. PURCONT L R3,VMSEG GET ADDRESS OF SEGTABLE @V304635 00302000
  173. LA R3,0(,R3) 24 BIT ADDRESSING @V304635 00303000
  174. ST R3,SAVEWRK2 SAVE BEGINING ADDRESS OF SEGTABLE@V304635 00304000
  175. XC SAVEWRK3,SAVEWRK3 CLEAR HIGH SEGTABLE ADDRESS @V304635 00305000
  176. SLR R4,R4 CLEAR FOR BCT LOOP @V304635 00306000
  177. IC R4,VMSEG GET NUMBER OF 1 MEG SEGMENTS @V304635 00307000
  178. LA R4,1(,R4) RAISE TO BASE OF 1 @V304635 00308000
  179. SLL R4,4 TIMES 16 FOR NUM. SEG ENTRIES @V304635 00309000
  180. * PER 1 MEG 00310000
  181. ST R4,SAVEWRK4 SAVE IT. @V304635 00311000
  182. L R3,SAVEWRK2 GET BEGINING OF SEGTABLE @V304635 00312000
  183. LR R1,R3 SAVE IT @V304635 00313000
  184. LR R2,R3 ALSO SAVE IT HERE @V304635 00314000
  185. L R4,SAVEWRK4 GET NUMBER OF ENTRIES IN TABLE @V304635 00315000
  186. HICORE DS 0H @V408246 00316000
  187. CLI SEGPAGE+3,SEGINV UNDEFINED SEGMENT? @V408246 00317000
  188. BNE B1 NO @V408246 00318000
  189. ICM R15,B'0110',SEGPAGE+1 VALID PNTR? @V408246 00319000
  190. BZ INVSEG YES, SKIP IT @V408246 00320000
  191. B1 EQU * @V408246 00321000
  192. ST R3,SAVEWRK3 SAVE THE ADDR. OF LAST VALID ONE @V304635 00322000
  193. INVSEG LA R3,4(,R3) POINT TO NEXT SEGTABLE ENTRY @V304635 00323000
  194. BCT R4,HICORE PROCESS ALL TABLE ENTRIES @V304635 00324000
  195. SPACE 1 00325000
  196. L R3,SAVEWRK3 GET ADDRESS OF HIGHEST VALID SEG.@V304635 00326000
  197. LR R1,R3 NEEDED FOR CALCULATION @V304635 00327000
  198. SLR R1,R2 R1 = NUMBER OF SEGMENTS @V304635 00328000
  199. SLL R1,2 TIMES 16 PAGES FOR EACH SEGMENT @V304635 00329000
  200. * ENTRY 00330000
  201. IC R2,0(,R3) GET NUMBER PAGES IN LAST @V304635 00331000
  202. * SEGMENT ENTRY 00332000
  203. SRL R2,4 NUMBER PAGES TO LOW ORDER @V304635 00333000
  204. N R2,F15 CLEAR OUT ALL BUT PAGE NUMBER @V304635 00334000
  205. OR R1,R2 ADD IT TO R1 FOR CALL TO 'DMKBLD'@V304635 00335000
  206. L R2,VMSTOR MINIMUM STORE SIZE @V408246 00336000
  207. SRL R2,12 NO. OF PAGES @V408246 00337000
  208. BCTR R2,0 NO. OF PAGES (BASE 0) @V408246 00338000
  209. CR R1,R2 NEW SIZE AT LEAST MINIMUM? @V408246 00339000
  210. BNL *+6 YES @V408246 00340000
  211. LR R1,R2 NO, RESET TO MINIMUM @V408246 00341000
  212. CALL DMKBLDRT,PARM=KEEPSEGS+OLDVMSEG COMPRESS @V304635 00342000
  213. * SEGTABLE 00343000
  214. SLL R1,12 ADD IN DISPLACEMENT @V304635 00344000
  215. AL R1,F4096 PLUS 1 MORE PAGE FOR 'VMSIZE' @V304635 00345000
  216. ST R1,VMSIZE NEW VIRTUAL MACHINE STORAGE SIZE @V304635 00346000
  217. B EXIT @V408246 00347000
  218. SETCC1 MVI SAVEWRK1+1,CC1 SET CC=1 FOR CALLER @V407511 00348000
  219. B EXIT RETURN TO CALLER @V304635 00349000
  220. EJECT 00350000
  221. *. 00351000
  222. * 00352000
  223. * C. OPERATION OF DMKPGSPP - 00353000
  224. * 00354000
  225. * 1. IF THE USER IS IN PAGE WAIT, STACK A CPEXBLOK AND EXIT. 00355000
  226. * OTHERWISE, BYPASS SHARED SEGMENT PROCESSING, JOINING 00356000
  227. * PAGE-CLEAR CODE AT LABEL PGOUT1 BELOW (STEP 7). 00357000
  228. * 00358000
  229. * D. OPERATION OF DMKPGSSS - 00359000
  230. * 00360000
  231. * 1. RELEASE THE ADDRESS RANGE CONTAINED IN THE CALLERS GPR 1-2 00361000
  232. * BUT BYPASS ANY NAMED SYSTEMS THAT MAY ALSO RESIDE IN 00362000
  233. * THE ADDRESS RANGE TO BE RELEASED. 00363000
  234. * THEN JOIN PAGE-CLEAR CODE AT LABEL (PGOUT1). 00364000
  235. * 00365000
  236. * E. OPERATION OF DMKPGSPR - 00366000
  237. * 00367000
  238. * 1. CALL DMKPTRPW TO INSURE THE USER IS NOT IN PAGE WAIT. 00368000
  239. * THEN RELEASE THE ADDRESS RANGE CONTAINED IN REG1 THUR REG2. 00369000
  240. * ALSO, UNLOCK ANY PAGES THAT MIGHT HAVE BEEN LOCKED. 00370000
  241. * 00371000
  242. * 00372000
  243. *. 00373000
  244. SPACE 00374000
  245. DMKPGSPP RELOC 00375000
  246. XC SAVEWRK1,SAVEWRK1 CLEAR FLAG BYTES @V304635 00376000
  247. B RELEASE JOIN COMMON CODE @V304635 00377000
  248. SPACE 2 00378000
  249. DMKPGSPR RELOC @VA04764 00379000
  250. XC SAVEWRK1,SAVEWRK1 CLEAR FLAG BYTES @VA04764 00380000
  251. CALL DMKPTRPW @VA08037 00381100
  252. OI SAVEWRK1,UNLOCK UNLOCK ANY LOCKED PAGES. @VA04764 00382000
  253. B RELEASE JOIN WITH COMMON CODE @VA04764 00383000
  254. SPACE 1 00384000
  255. DMKPGSSS RELOC @V304635 00385000
  256. XC SAVEWRK1,SAVEWRK1 CLEAR FLAG BYTES @V304635 00386000
  257. MVI SAVEWRK1,PARTIAL DON'T RELEASE NAMED SEGS @VA05039 00387000
  258. SPACE 2 00388000
  259. RELEASE SLR R3,R3 CLEAR @V304635 00389000
  260. L R1,SAVER1 RESTORE CALLERS REGISTER @V304635 00390000
  261. L R2,SAVER2 ALSO THIS ONE... @V304635 00391000
  262. IC R3,VMSEG GET NUMBER OF SEGMENT TABLES @V304635 00392000
  263. LA R3,1(,R3) CHANGE TO BASE 1. @V304635 00393000
  264. SLL R3,20 ADDR. RANGE OF SEGTABLE. @V304635 00394000
  265. BCTR R3,R0 ADDR. RANGE OF MEMORY @V304635 00395000
  266. CLR R1,R3 RELEASING ABOVE MEMORY RANGE ? @V304635 00396000
  267. BH EXIT YES - RETURN TO CALLER. @V304635 00397000
  268. CLR R2,R3 LAST ADDR. GREATER THAN MEMORY @V304635 00398000
  269. * SIZE ? 00399000
  270. BNH *+6 NO - ITS O.K. TO USE IT. @V304635 00400000
  271. LR R2,R3 LIMIT TO TOP OF MEMORY. @V304635 00401000
  272. TM SAVEWRK1,PARTIAL WAS ENTRY FOR DMKPGSSS @V304635 00402000
  273. BO PGOUT1 YES - RELEASE THE STORAGE RANGE @V407511 00403000
  274. LR R4,R2 GET ENDING ADDRESS @V304635 00404000
  275. SLR R4,R1 CALCULATE RANGE OF ADDRESSES @V304635 00405000
  276. SRL R4,12 DROP DISPLACEMENT @V304635 00406000
  277. SLR R5,R5 CLEAR @V304635 00407000
  278. SRDL R4,4 SHIFT OUT THE PAGE NUMBER @V304635 00408000
  279. LTR R5,R5 WAS IT PAGE 0 @V304635 00409000
  280. BZ *+8 IF YES - SEGMENT COUNT IS OK @V304635 00410000
  281. LA R4,1(,R4) ADD ONE TO SEGMENT COUNT @V304635 00411000
  282. LTR R4,R4 MUST BE MIN. OF 1 SEGMENT @V304635 00412000
  283. BNZ *+8 OK. IF ONE OR MORE @V304635 00413000
  284. LA R4,1 SET SEGMENT TABLE COUNT FOR 1 @V304635 00414000
  285. L R3,VMSEG GET ADDRESS OF SEGTABLE @V304635 00415000
  286. LR R5,R1 FIRST ADDRESS TO RELEASE @V304635 00416000
  287. SRL R5,16 LEAVE ONLY SEGMENT NUMBER @V304635 00417000
  288. SLL R5,2 TIMES 4 FOR 4 BYTE ENTRIES @V304635 00418000
  289. LA R3,0(R3,R5) POINT TO FIRST SEGTABLE ENTRY @V304635 00419000
  290. PROCSHR DS 0H @V408246 00420000
  291. ICM R10,B'0110',SEGPAGE+1 ANY PTE POINTER? @V408246 00421000
  292. BZ PROCNEXT NO, SKIP @V408246 00422000
  293. IC R10,SEGPAGE+3 GET REST OF PTE POINTER @V408246 00423000
  294. N R10,CLCNTINV CLEAR UNWANTED BITS @V408211 00424000
  295. SL R10,F8 POINT TO PAGE HEADER @V304635 00425000
  296. L R10,0(,R10) GET POINTER TO (SHRTABLE) @V304635 00426000
  297. LTR R10,R10 IS THERE ONE THERE ? @V304635 00427000
  298. BZ PROCNEXT IF NOT - GET THE SEGTABLE ENTRY @V304635 00428000
  299. CLC SHRSEGCT,F0 SHARED SEGMENT??? @V408246 00429000
  300. BE PROCNEXT NOPE,BYPASS @V408246 00430000
  301. LM R1,R2,SHRNAME GET NAME OF THIS SHRTABLE @V304635 00431000
  302. CALL DMKPGSPS PURGE THE NAMED SYSTEM @V304635 00432000
  303. B RELEASE CHECK OUT ALL SEGTABLE ENTRIES @V304635 00433000
  304. SPACE 1 00434000
  305. PROCNEXT LA R3,4(,R3) POINT TO NEXT SEGTABLE ENTRY @V304635 00435000
  306. BCT R4,PROCSHR CONTINUE UNTIL COUNT EXHAUSHED @V304635 00436000
  307. B PGOUT1 PROCESS MAINLINE ROUTINE @V407511 00437000
  308. SPACE 1 00438000
  309. EJECT 00439000
  310. *. 00440000
  311. * F. OPERATION OF DMKPGSPO 00441000
  312. * 00442000
  313. * 1. (SKIP PAGE WAIT CHECK..ENQUEUE INSTEAD) 00443000
  314. * IF THE USER IS NOT USING A SHARED SEGMENT SYSTEM, SKIP TO 00444000
  315. * STEP 6 BELOW; OTHERWISE, CONTINUE 00445000
  316. * 2. DECREMENT AND TEST THE USE COUNT FOR THE SHARED SYSTEM; IF 00446000
  317. * IT IS NOT ZERO, SKIP TO STEP 4 BELOW; OTHERWISE, CONTINUE 00447000
  318. * 3. IF THE USE COUNT IS ZERO, UNCHAIN THE SHRTABLE FROM THE 00448000
  319. * ACTIVE LIST AND FLAG THE SWPTABLE ENTRIES FOR ALL SHARED 00449000
  320. * SEGMENTS AS NON-SHARED PAGES; FRET THE SHRTABLE AND 00450000
  321. * SKIP TO STEP 5 00451000
  322. * 4. IF USE COUNT IS NON-ZERO, INITIALIZE THE SEGMENT 00452000
  323. * TABLE ENTRIES TO "NOT AVAILABLE" 00453000
  324. * 5. DECREMENT COUNT OF SHARED SYSTEMS IN VMBLOK 00454000
  325. * AND RETURN TO PGOUT2. 00455000
  326. * 00456000
  327. *. 00457000
  328. SPACE 3 00458000
  329. DMKPGSPO RELOC 00459000
  330. XC SAVEWRK1,SAVEWRK1 CLEAR FLAG BYTES @V304635 00460000
  331. MVI SAVEWRK1,CALLPO FLAG ENTRY TO DMKPGSPO @V304635 00461000
  332. TM SAVER2+3,NOCLEAR WAS NOCLEAR SPECIFIED ? @V304635 00462000
  333. BZ *+8 NO @V304635 00463000
  334. OI SAVEWRK1,NOCLEAR YES - SET FLAG BYTE @V304635 00464000
  335. TM SAVER2+3,UNLOCK DID CALLER SPECIFY 'UNLOCK' @V304735 00465000
  336. BZ *+8 NO @V304735 00466000
  337. OI SAVEWRK1,UNLOCK UNLOCK ANY LOCKED PAGES @V304735 00467000
  338. SPACE 1 00468000
  339. TM SAVEWRK1,NOCLEAR WAS 'NOCLEAR' SPECIFIED @VM03225 00469000
  340. BZ PGSPO1 IF NOT RELEASE ALL OF STORAGE @VM03225 00470000
  341. TM VMOSTAT,VMSHR ANY SHARED NAMED SEGMENTS @VM03225 00471000
  342. BO NEXTNAME IF YES - RELEASE THEM @VM03225 00472000
  343. TM VMPSTAT,VMNSHR ANY NON-SHARED NAMED SEGMENTS @VM03225 00473000
  344. BZ EXIT IF NOT, JUST RETURN TO CALLER @VM03225 00474000
  345. SPACE 1 00475000
  346. NEXTNAME SLR R2,R2 COUNT OF SEGTABLE ENTRIES @VM03225 00476000
  347. L R3,VMSEG GET ADDRESS OF SEGTABLE @VM03225 00477000
  348. SLDL R2,8 NUMBER OF SEGMENTS INTO R2 @VM03225 00478000
  349. SRL R3,8 ADJUST TO 24 BIT ADDRESSING @VM03225 00479000
  350. LA R2,1(,R2) CHANGE TO BASE OF 1 @VM03225 00480000
  351. SLL R2,4 TIMES 16 ENTRIES PER SEGTABLE @VM03225 00481000
  352. * LENGTH 00482000
  353. NEWADDR DS 0H @V408246 00483000
  354. ICM R9,B'0110',SEGPAGE+1 ANY PTE POINTER? @V408246 00484000
  355. BZ NEXTADDR+6 NO, SKIP @V408246 00485000
  356. IC R9,SEGPAGE+3 GET REST OF PTE POINTER @V408246 00486000
  357. N R9,CLCNTINV CLEAR UNWANTED BITS @V408211 00487000
  358. SL R9,F8 BACK-UP TO SHRTABLE POINTER @VM03225 00488000
  359. L R10,0(,R9) GET POINTER TO SHRTABLE IF ANY @VM03225 00489000
  360. LTR R10,R10 IS THIS A NAMED SEGMENT @VM03225 00490000
  361. BZ NEXTADDR IF NOT - KEEP LOOKING @VM03225 00491000
  362. CLC SHRSEGCT(L'SHRSEGCT),F0 SHARED SEGMENT ? @VA04403 00492000
  363. BE NEXTADDR NO - PROCESS NEXT SEGMENT @VA04403 00493000
  364. IC R2,VMSEG GET NUMBER OF SEGMENTS @VA07849 00493100
  365. LA R2,1(R2) ADD ONE TO GET END OF STOR @VA07849 00493200
  366. SLL R2,20 NOW MAKE IT AN ADDRESS @VA07849 00493300
  367. BCTR R2,0 SUBTRACT ONE FOR END OF STOR @VA07849 00493400
  368. BAL R14,GOTSHTBL RELEASE SHARED SYSTEM @VA04403 00494000
  369. B NEXTNAME CHECK FOR MORE SHARED SYSTEMS @VA04403 00495000
  370. SPACE 1 00496000
  371. NEXTADDR XC 0(4,R9),0(R9) CLEAR POINTER TO SHRTABLE(MAYBE) @VA04403 00497000
  372. LA R3,4(,R3) POINT TO NEXT SEGTABLE ENTRY @VA04403 00498000
  373. BCT R2,NEWADDR PROCESS ALL SEGTABLE ENTRIES @VM03225 00499000
  374. NI VMPSTAT,X'FF'-VMNSHR RESET NON-SHARE INDICATOR @VM03225 00500000
  375. B EXIT @V408246 00501000
  376. SPACE 2 00502000
  377. EJECT 00503000
  378. SPACE 00504000
  379. * FOR PREVIOUS SHARED SYSTEM IPL--MUST CLEAN UP 00505000
  380. SPACE 00506000
  381. USING SHRTABLE,R10 00507000
  382. GOTSHTBL DS 0H @VA08861 00508500
  383. STM R1,R4,SAVEWRK3 ... @V304635 00509000
  384. ST R14,SAVEWRK9 SAVE BRANCH RETURN REGISTER @V304635 00510000
  385. TM SAVEWRK1,PURGE PURGING A NAMED SHARED SYSTEM? @V408246 00511000
  386. BZ NOTPURGE NO @V408246 00512000
  387. CLC SHRNAME,SAVER1 DO THE NAMES MATCH? @V408246 00513000
  388. BNE GTRETURN NO, RETURN TO CALLER @V407511 00514000
  389. NOTPURGE DS 0H @V408246 00515000
  390. LR R14,R3 GET CURRENT SEGMENT TABLE ENTRY @V4M0191 00516000
  391. L R15,VMSEG LOAD SEGMENT TABLE ORIGIN @VA07241 00517100
  392. LA R15,0(,R15) CLEAR LENGTH BITS @VA07241 00517200
  393. SLR R14,R15 GET DISPLACEMENT OF ENTRY @VA07241 00517300
  394. SRL R14,2 GET CURRENT SEGMENT NUMBER @V4M0191 00518000
  395. CLM R14,B'0001',SHRSEGNM ALREADY PROCESSED THIS @V4M0191 00519000
  396. * NAMED SYSTEM @V4M0191 00520000
  397. BH GTRETURN YES, JUST RETURN TO MAINLINE @V4M0191 00521000
  398. NI SAVEWRK1+3,X'FF'-PGPROCIP-PGVMAFND-NPROTECT @V60B7AA 00522205
  399. * RESET INTERNAL SHARED CONTROL FLG@V60BC11 00522210
  400. C R11,LASTUSER ACTIVE? @V408246 00523000
  401. BNE NOTCHG NO NEED TO CHECK @V408246 00524000
  402. CALL DMKVMASH CHECK FOR CHANGED PAGE BEFORE @V408246 00525000
  403. * RELEASE 00526000
  404. BZ NOTCHG OK @V408246 00527000
  405. USING VMABLOK,R1 @VA08861 00529150
  406. ICM R1,B'1111',VMASSIST SEE IF THERE IS A VMABLOK? @VA08861 00529160
  407. BZ ANOTCHG1 NO, CONTINUE @VA08861 00529170
  408. ANOTCHG DS 0H @VA08861 00529180
  409. CLC VMANAME,SAVER1 IS THIS OURS? @VA08861 00529190
  410. BE NOTCHG YES,VMAPS DID NOT GET OURS 00529200
  411. L R1,VMAFPNT GET THE NEXT IF ANY @VA08861 00529210
  412. LTR R1,R1 IS THERE ANOTHER VMABLOK? @VA08861 00529220
  413. BNZ ANOTCHG YES,GO SEE IF WE CAN FIND OUR @VA08861 00529230
  414. * SHAREDNAME 00529240
  415. DROP R1 @VA08861 00529250
  416. ANOTCHG1 DS 0H @VA08861 00529260
  417. TM SAVEWRK1,PURGE IS THIS A PURGE REQUEST? @VA08861 00529270
  418. BNO GTRETURN NO,CONTINUE @VA08861 00529280
  419. LM R1,R4,SAVEWRK3 RESTORE REGS OVER CALL TO VMASH @VA08861 00529290
  420. NI SEGPAGE+3-SEGPAGE(R3),X'FF'-SEGINV RESET SEGINV @VA08555 00529600
  421. B TESTPUR VMA MUST OF GOT THE VMABLOK @VA08861 00529851
  422. NOTCHG DS 0H @V408246 00530000
  423. CALL DMKPTRPW @VA08037 00531100
  424. EJECT 00532000
  425. * 00533000
  426. * SEARCH FOR USER'S VMA BLOCK 00534000
  427. * 00535000
  428. GTVMABK DS 0H @V408246 00536000
  429. TM SHRFLAG,SHRNOPRT RUNNING UNPROTECTED @V60BC11 00536200
  430. BZ GTVMABK1 NO, SKIP SETTING INDICATOR @V60BC11 00536300
  431. OI SAVEWRK1+3,NPROTECT SET UNPROTECTED INDICATOR @V60BC11 00536400
  432. B NVMABK CONTINUE PROCESSING @V60BC11 00536500
  433. GTVMABK1 DS 0H @V60BC11 00536600
  434. LA R1,VMASSIST ANCHOR OF VMABLOKS @V408246 00537000
  435. USING VMABLOK,R1 @V408246 00538000
  436. CHKVMABK LR R15,R1 SAVE BACKWARD CHAIN POINTER @V408246 00539000
  437. ICM R1,B'1111',VMAFPNT GET NEXT VMABLOK ON CHAIN @V408246 00540000
  438. BZ GTRETURN NO MORE, DMKVMA MUST HAVE DONE IT@V407511 00541000
  439. CLC SHRNAME,VMANAME IS THIS THE NAMED SYSTEM @V408246 00542000
  440. BNE CHKVMABK IF NOT - GET THE NEXT ONE @V408246 00543000
  441. TM SAVEWRK1,PURGE+CALLPO PURGING NAMED SYSTEM OR @VA07849 00544100
  442. * ALL OF STORAGE 00544200
  443. BZ CHKVMAB1 NO @VA07849 00544300
  444. OI SAVEWRK1,SYSFND YES, INDICATE SYSTEM FOUND @V408246 00546000
  445. CHKVMAB1 DS 0H @VA07849 00546100
  446. L R14,VMAFPNT SAVE FORWARD CHAIN POINTER @V408246 00547000
  447. LH R6,VMSHRSYS IS THIS LAST VMABLOK @VA09427 00547100
  448. BCT R6,NOTLAST NO,WE ARE STILL SHARED SYSTEM @VA09427 00547300
  449. NI VMOSTAT,255-VMSHR TURN OFF VMSHR @VA09427 00547500
  450. NOTLAST DS 0H @VA09427 00547700
  451. ST R14,0(,R15) STORE IT IN BACKWARD CHAIN BLOK @V408246 00548000
  452. LA R0,VMASIZE GET SIZE OF ONE VMABLOK @V408246 00549000
  453. CALL DMKFRET RELEASE THIS VMABLOK @V408246 00550000
  454. NVMABK DS 0H @V60BC11 00550200
  455. TM SAVEWRK1,PURGE PURGING A NAMED SHARED SYSTEM? @V60BC11 00550400
  456. BZ *+8 NO @V60BC11 00550600
  457. OI SAVEWRK1,SYSFND YES, INDICATE SYSTEM FOUND @V60BC11 00550800
  458. DROP R1 @V408246 00551000
  459. TM APSTAT1,PROCIPL RUNNING ON MAIN (IPL) PROC? @V60B7AA 00552100
  460. BZ ATTPROC NO, LEAVE BIT TO INDICATE ATTACH @V407511 00553000
  461. OI SAVEWRK1+3,PGPROCIP INDICATE MAIN (IPL) PROC. @V60B7AA 00554100
  462. ATTPROC DS 0H @V407511 00555000
  463. OI SAVEWRK1+3,PGVMAFND INDICATE VMABLOK FOUND FOR @V407511 00556000
  464. * THIS NAMED SYSTEM @V407511 00557000
  465. EJECT 00558000
  466. * 00559000
  467. * SEARCH SEGMENT TABLE FOR MATCHING PAGE TABLE POINTERS 00560000
  468. * 00561000
  469. L R3,SHRSEGCT LOAD NUMBER OF SHARED SEGMENTS @V408246 00562000
  470. BCTR R3,0 -1 FOR ORIGIN 0 @V408246 00563000
  471. MVI SAVEWRK1+2,INITPASS INIT TO NO SEGMENTS FOUND @V408211 00564000
  472. SGFND DS 0H FIND SEGMENT BELONGING TO THIS @V408246 00565000
  473. * SHARED SYS 00566000
  474. SLR R9,R9 ZIP REG @V407511 00567000
  475. IC R9,SHRSEGNM(R3) INSERT SEGMENT NUMBER @V407511 00568000
  476. SLL R9,2 MULTIPLY BY 4 FOR INDEXING @V407511 00569000
  477. AL R9,VMSEG LOAD ADDR SEGTABLE ENTRY @V407511 00570000
  478. USING SEGTABLE,R9 @V407511 00571000
  479. L R5,SEGPAGE LOAD ADDRESS OF PTO @V407511 00572000
  480. N R5,CLINVBIT CLEAR INVALID BIT @V407511 00573000
  481. LA R5,0(,R5) CLEAR PTE COUNT @V407511 00574000
  482. EJECT 00575000
  483. * 00576000
  484. * FOUND STE WITH MATCHING PTO 00577000
  485. * 00578000
  486. SGFNDD DS 0H FOUND DESIRED SHARED SEGMENT @V408246 00579000
  487. CLI SAVEWRK1+2,NOTINUSE IS THIS THE 1ST ONE FOUND? @V407511 00580000
  488. BNH SGFNDE NO, AND SYSTEM NOT STILL IN USE @V408246 00581000
  489. OI VMESTAT,VMINVPAG RAISE PAGE RESET FLAG @V408246 00582000
  490. NI VMDSTAT,255-VMDSP ASSURE NO FAST REDSP @V408246 00583000
  491. LH R1,SHRUSECT FIRST ONE, CHECK SYSTEM USE COUNT@V408246 00584000
  492. BCT R1,GOTUSA STILL IN USE @V407511 00585000
  493. LM R1,R2,SHRFPNT COUNT IS ZERO, UNCHAIN THE SHR @V408246 00586000
  494. * TABLE 00587000
  495. STCM R1,B'0111',SHRFPNT+1-SHRTABLE(R2) FROM THE @V60BC11 00588000
  496. ST R2,SHRBPNT-SHRTABLE(,R1) ACTIVE LIST @V408246 00589000
  497. MVI SAVEWRK1+2,NOTINUSE FLAG SYSTEM NO LONGER IN USE@V407511 00590000
  498. SGFNDE DS 0H @V408246 00591000
  499. SL R5,F16 BACK-UP TO PAGE TABLE HEADER @V408246 00592000
  500. CLI SAVEWRK1+2,NOTINUSE SHARED SYSTEM STILL IN USE @V407511 00593000
  501. BL GOTUSAA YES @V407511 00594000
  502. L R4,PAGTSWP+SWPVM-SWPTABLE(,R5) SAVE OLD OWNER @V408211 00595000
  503. ST R11,PAGTSWP+SWPVM-SWPTABLE(,R5) PROUD NEW OWNER @V408211 00596000
  504. * OF THIS SEGMENT @V408211 00597000
  505. STCK PAGSTMP-PAGTABLE(R5) NEW TIME STAMP @V408246 00598000
  506. BC 12,CLOCKOK IS CLOCK FUNCTIONING? @V408246 00599000
  507. DOWNWEGO DS 0H CLOCK DAMAGED - ABEND CVT001 @V408246 00600000
  508. GOTO DMKCVTAB @V408246 00601000
  509. CLOCKOK DS 0H CONTINUE @V408246 00602000
  510. SR R0,R0 CLEAR @V408246 00603000
  511. ST R0,PAGACT-PAGTABLE(,R5) CLEAR COUNTS @V408246 00604000
  512. TM SAVEWRK1,PURGE+CALLPO PURGING NAMED SYSTEM OR @VA07849 00605100
  513. * ALL OF STORAGE 00605200
  514. BNZ SGFNDE1 YES, DON'T CLEAR SHRTABLE PTR @VA07849 00605300
  515. ST R0,PAGSHR-PAGTABLE(,R5) CLEAR NAMED PNTR. @V408246 00608000
  516. SGFNDE1 DS 0H @VA07849 00608100
  517. LA R8,PAGTSWP+SWPFLAG-SWPTABLE(,R5) 1ST SWAP TABLE @V408211 00609000
  518. * ENTRY @V408211 00610000
  519. B GOTUSAB JOIN CODE BELOW @V407511 00611000
  520. GOTUSA DS 0H SHARED SEGMENT STILL IN USE @V407511 00612000
  521. STH R1,SHRUSECT UPDATE COUNT OF TOTAL USERS @V408246 00613000
  522. MVI SAVEWRK1+2,INUSE FLAG SEGMENT FOUND AND SYSTEM @V407511 00614000
  523. * IN USE 00615000
  524. SL R5,F16 BACK-UP TO PAGE TABLE HEADER @V408246 00616000
  525. GOTUSAA DS 0H @V407511 00617000
  526. L R4,PAGTSWP+SWPVM-SWPTABLE(,R5) SAVE ORIG OWNER @V408211 00618000
  527. CR R11,R4 IS THIS THE OWNER OF THE SEGMENT?@V408246 00619000
  528. BNE *+10 NO @V408246 00620000
  529. MVC PAGTSWP+SWPVM-SWPTABLE(4,R5),ASYSVM YES, GIVE TO@V408211 00621000
  530. * SOMEONE ELSE @V408211 00622000
  531. GOTUSAB DS 0H @V407511 00623000
  532. SVC 20 GET ANOTHER SAVEAREA @VA07849 00623100
  533. SLR R0,R0 ZIP REG 0 @VA07849 00623200
  534. ST R0,SAVER12 ZERO BASE ADDR TO PREVENT SVC @VA07849 00623300
  535. * FROM UNLOCKING MODULE 00623400
  536. L R1,SAVER13 GET ADDR OF ORIGINAL SAVEAREA @VA07849 00623500
  537. MVC SAVEWRK1,SAVEWRK1-SAVEAREA(R1) COPY FLAGS @VA07849 00623600
  538. MVC SAVER1(8),SAVER1-SAVEAREA(R1) COPY SYSTEM NAME @VA07849 00623700
  539. * DETERMINE IF THERE ARE TWO SETS OF PAGE AND SWAP TABLES TO PROCESS. 00624000
  540. * THERE ARE TWO IF THE MP FEATURE IS INSTALLED AND THE SYSTEM IS 00624100
  541. TM SAVEWRK1+3,NPROTECT RUNNING UNPROTECTED @V60BC11 00624130
  542. BO GOTCOM1A YES, JOIN COMMON CODE @V60BC11 00624160
  543. * GENERATED FOR AP MODE. 00624200
  544. TM APSTAT1,MPFEAT IS THE MP FEATURE INSTALLED @V5BC0AB 00624300
  545. BNO GOTCOM1A NO, JOIN COMMON CODE @V5BC0AB 00624400
  546. L R14,PGSSYSAP EST. ADDRESSABILITY TO DMKSYSAP @V5BC0AB 00624500
  547. CLI 0(R14),YES IS SYSTEM GENED FOR AP? @V5BC0AB 00624600
  548. BNE GOTCOM1A NO, JOIN COMMON CODE @V5BC0AB 00624700
  549. LR R1,R5 LOAD ORIG PAGTABLE ADDR IN R1 @V407511 00628000
  550. TM SAVEWRK1+3,PGPROCIP START ON MAIN (IPL) PROC? @V60B7AA 00629100
  551. BZ GOTAPU NO, STARTED ON ATTACHED @V407511 00630000
  552. AL R1,DCPAGBMP YES, ADD TO GET ADDR OF ATTACHED @V407511 00631000
  553. * PAGTABLE @V407511 00632000
  554. B GOTCOM JOIN COMMON CODE @V407511 00633000
  555. GOTAPU DS 0H @V407511 00634000
  556. SL R1,DCPAGBMP SUBTRACT FOR ADDR. MAIN (IPL) PGT @V60B7AA 00635100
  557. GOTCOM DS 0H @V407511 00636000
  558. CLI SAVEWRK1+2,INUSE SYSTEM STILL IN USE @VA07849 00636200
  559. BE GOTCOMP YES, SKIP RESETING HEADER @VA07849 00636400
  560. USING PAGTABLE,R5 @V407511 00637000
  561. MVC PAGTSWP+SWPVM-SWPTABLE(4,R1),PAGTSWP+SWPVM-SWPTABLE(R5) 00638000
  562. * COPY THE VMBLOK ADDR OF OWNER @V4M0213 00639000
  563. MVC PAGSTMP-PAGTABLE(,R1),PAGSTMP COPY TIME STAMP @V407511 00640000
  564. MVC PAGACT-PAGTABLE(4,R1),PAGACT COPY COUNTER @V407511 00641000
  565. MVC PAGSHR-PAGTABLE(,R1),PAGSHR COPY SHRTABLE PTR @VA07849 00642100
  566. GOTCOMP DS 0H @V407511 00643000
  567. LR R5,R1 PROCESS OTHER SET FIRST @VA07849 00643200
  568. AL R1,F16 GET ADDRESS OF PTO @VA07849 00643400
  569. STCM R1,B'0111',1(R9) UPDATE STE @VA07849 00643600
  570. BAL R14,PROCPAGE GO PROCESS PAGTABLE @V407511 00644000
  571. STM R3,R10,SAVER3 SAVE REGS R3 - R10 @VA07849 00644200
  572. ST R2,SAVEWRK5 SAVE REG R2 @VA07849 00644400
  573. L R1,0(,R9) LOAD ADDR PTR JUST PROCESSED @V407511 00645000
  574. ST R1,SAVEWRK6 SAVE ORIGINAL STE @VA07849 00645200
  575. LA R1,0(,R1) CLEAR PTE COUNT @VA07282 00645500
  576. TM SAVEWRK1,NOCLEAR CALLER SPECIFY NOCLEAR OPT @VA07849 00645510
  577. BZ GOTCOMPA NO, RELEASE THE PAGTABLE @VA07849 00645520
  578. CLI SAVEWRK1+2,NOTINUSE LAST USER OF SYSTEM @VA07849 00645530
  579. BNE GOTCOMP1 NO, SKIP RESETING PAGTABLE @VA07849 00645540
  580. GOTCOMPA DS 0H @VA07849 00645550
  581. LR R3,R9 ADDR OF STE TO REG 3 @VA07849 00645560
  582. LR R9,R1 ADDR OF PTO TO REG 9 @VA07849 00645570
  583. LR R5,R1 GET ADDR OF PTO @VA07849 00645580
  584. SL R5,F16 BACKUP TO HEADER @VA07849 00645590
  585. LA R5,PAGTSWP(,R5) GET ADDR OF SWPTABLE @VA07849 00645600
  586. LA R5,SWPFLAG-SWPTABLE(,R5) ADDR FIRST SWPTABLE ENT@VA07849 00645610
  587. L R1,SAVER13 GET ADDR ORIGINAL SAVEAREA @VA07849 00645620
  588. L R2,SAVEWRK4-SAVEAREA(,R1) GET ENDING ADDRESS @VA07849 00645630
  589. LR R1,R3 GET ADDR CURRENT STE @VA07849 00645640
  590. LA R1,0(,R1) CLEAR PTE COUNT @VA07849 00645650
  591. L R14,VMSEG GET ADDR START OF SEGTABLE @VA07849 00645660
  592. LA R14,0(,R14) CLEAR SEGTABLE SIZE @VA07849 00645670
  593. SR R1,R14 GET SEGMENT NUMBER * 4 @VA07849 00645680
  594. SRL R1,2 GET SEGMENT NUMBER @VA07849 00645690
  595. SLL R1,16 FORM VIRTUAL STARTING ADDRESS @VA07849 00645700
  596. BAL R14,RELAPAGE RELEASE THE PAGTABLE @VA07849 00645710
  597. LM R3,R10,SAVER3 RESTORE REGS R3 - R10 @VA07849 00645720
  598. L R2,SAVEWRK5 RESTORE REG R2 @VA07849 00645730
  599. L R1,SAVEWRK6 GET ORIGINAL STE VALUE @VA07849 00645740
  600. ST R1,0(,R9) RESTORE STE @VA07849 00645750
  601. LA R1,0(,R1) CLEAR PTE COUNT @VA07849 00645760
  602. GOTCOMP1 DS 0H @VA07849 00645770
  603. TM SAVEWRK1+3,PGPROCIP START ON MAIN (IPL) PROC? @V60B7AA 00646100
  604. BZ GOTAPU1 NO, STARTED ON ATTACHED PROC @V407511 00647000
  605. SL R1,DCPAGBMP BACK UP TO IPL PROC (1ST) PAGTABLE @V60B7AA 00648300
  606. B GOTCOM1 CONTINUE PROCESSING @V407511 00649000
  607. GOTAPU1 DS 0H @V407511 00650000
  608. AL R1,DCPAGBMP BUMP TO ATTACHED PAGTABLE @VA07849 00651200
  609. GOTCOM1 DS 0H @V407511 00652000
  610. STCM R1,B'0111',SEGPAGE+1-SEGTABLE(R9) HOOK STE - PTO@VA07282 00653500
  611. LR R5,R1 PTO ADDR TO R5 @V407511 00654000
  612. LA R5,0(,R5) CLEAR COUNT @V407511 00655000
  613. SL R5,F16 BACKUP TO HEADER @V407511 00656000
  614. GOTCOM1A DS 0H @V407511 00657000
  615. BAL R14,PROCPAGE PROCESS A PAGTABLE @V407511 00658000
  616. TM SAVEWRK1,NOCLEAR CALLER SPECIFY NOCLEAR OPT @VA07849 00658010
  617. BO GOTCOM4 YES, SKIP RELEASING PAGTABLE @VA07849 00658020
  618. STM R3,R10,SAVER3 SAVE REGS R3 - R10 @VA07849 00658030
  619. ST R2,SAVEWRK5 SAVE REG R2 @VA07849 00658040
  620. L R1,0(,R9) GET ORIGIN STE VALUE @VA07849 00658050
  621. ST R1,SAVEWRK6 SAVE ORIGINAL STE @VA07849 00658060
  622. LR R3,R9 ADDR OF STE TO R3 @VA07849 00658070
  623. LR R9,R1 ADDR OF PTO TO R9 @VA07849 00658080
  624. LR R5,R1 GET ADDR OF PTO @VA07849 00658090
  625. SL R5,F16 BACKUP TO HEADER @VA07849 00658100
  626. LA R5,PAGTSWP(,R5) GET ADDR OF SWPTABLE @VA07849 00658110
  627. LA R5,SWPFLAG-SWPTABLE(,R5) ADDR FIRST SWPTABLE ENT@VA07849 00658120
  628. L R1,SAVER13 GET ADDR ORIGINAL SAVEAREA @VA07849 00658130
  629. L R2,SAVEWRK4-SAVEAREA(,R1) GET ENDING ADDRESS @VA07849 00658140
  630. LR R1,R3 GET ADDR CURRENT STE @VA07849 00658150
  631. LA R1,0(,R1) CLEAR PTE COUNT @VA07849 00658160
  632. L R14,VMSEG GET STARTING ADDR SEGTABLE @VA07849 00658170
  633. LA R14,0(,R14) CLEAR SEGTABLE SIZE @VA07849 00658180
  634. SR R1,R14 GET SEGMENT NUMBER * 4 @VA07849 00658190
  635. SRL R1,2 GET SEGMENT NUMBER @VA07849 00658200
  636. SLL R1,16 FORM VIRTUAL STARTING ADDRESS @VA07849 00658210
  637. BAL R14,RELAPAGE RELEASE THE PAGTABLE @VA07849 00658220
  638. LM R3,R10,SAVER3 RESTORE REGS R3 - R10 @VA07849 00658230
  639. L R2,SAVEWRK5 RESTORE REG R2 @VA07849 00658240
  640. CLC 0(4,R9),F1 WAS PAGTABLE RELEASED @VA07849 00658250
  641. BE GOTCOM4 YES, DON'T HAVE TO RESET STE @VA07849 00658260
  642. L R1,SAVEWRK6 GET STE ENTRY @VA07849 00658270
  643. ST R1,0(,R9) RESTORE STE VALUE @VA07849 00658280
  644. EJECT 00673000
  645. * 00674000
  646. * DONE PROCESSING PAGE ENTRIES FOR THIS SEGMENT 00675000
  647. * 00676000
  648. GOTCOM4 DS 0H @V407511 00677000
  649. SVC 16 RETURN ADDITIONAL SAVEAREA @VA07849 00677200
  650. CLI SAVEWRK1+2,NOTINUSE SHARED SEGMENT STILL IN USE?@V407511 00678000
  651. BNE GOTCOM4A YES, RESET HEADER @VA07849 00679100
  652. TM SAVEWRK1,NOCLEAR WAS NOCLEAR OPT SPECIFIED @VA07849 00679200
  653. BZ GOTUSE NO, ALL DONE WITH PAGTABLE @VA07849 00679300
  654. SLR R1,R1 YES, ZERO REG @VA07849 00679400
  655. ST R1,PAGSHR ZERO POINTER TO SHRTABLE @VA07849 00679500
  656. B GOTUSE CONTINUE PROCESSING NEXT PAGTABLE@VA07849 00679600
  657. GOTCOM4A DS 0H @VA07849 00679700
  658. LA R9,0(,R9) CLEAR COUNT FIELD @V408246 00680000
  659. TM 3(R9),SEGINV VALID STE? @V408246 00681000
  660. BO GOTUSD NO @V407511 00682000
  661. STCK TEMPR2 GET CURRENT TIME @V407511 00683000
  662. BC 3,DOWNWEGO ABEND CVT001 @V407511 00684000
  663. L R7,TEMPR2 LOAD NEW TIME STAMP @V407511 00685000
  664. ST R7,PAGSTMP TIME-STAMP SEGMENT @V407511 00686000
  665. L R1,PAGACT LOAD CURRENT ACTIVE COUNT @V407511 00687000
  666. TM APSTAT1,APUOPER RUNNING IN ATTACHED MODE @V407511 00688000
  667. BO CSLOOP1 YES, USE COMPARE & SWAP LOGIC @V407511 00689000
  668. S R1,UPDTACT NO, DECREMENT ACTIVE COUNT @V407511 00690000
  669. ST R1,PAGACT STORE UPDATED COUNTER @V407511 00691000
  670. B GOTUSD BRANCH AROUND ATTACHED CODE @V407511 00692000
  671. CSLOOP1 DS 0H @V407511 00693000
  672. LR R7,R1 LOAD FOR COMPARE & SWAP @V407511 00694000
  673. S R7,UPDTACT DECREMENT ACTIVE COUNT @V407511 00695000
  674. CS R1,R7,PAGACT UPDATE THE ACTIVE COUNTER @V407511 00696000
  675. BNZ CSLOOP1 SOMEBODY BEAT ME TO IT, TRY AGAIN@V407511 00697000
  676. GOTUSD DS 0H @V407511 00698000
  677. LH R7,PAGTOT DECREMENT @V407511 00699000
  678. BCTR R7,0 TOTAL SEGMENT USE COUNT @V408246 00700000
  679. STH R7,PAGTOT @V407511 00701000
  680. TM APSTAT1,APUOPER RUNNING IN ATTACHED MODE @V407511 00702000
  681. BZ GOTUSD1 NO, SKIP SECOND UPDATE @V407511 00703000
  682. TM SAVEWRK1+3,NPROTECT RUNNING UNPROTECTED @V60BC11 00703500
  683. BO GOTUSD1 YES, SKIP SECOND UPDATE @V60BC11 00703510
  684. TM SAVEWRK1+3,PGPROCIP START ON MAIN (IPL) PROC? @V60B7AA 00704100
  685. BO DECRATT YES- PROCESS AP COPY NOW @V4M0125 00705000
  686. SL R5,DCPAGBMP BACK TO HDR OF IPL PROC (1ST) PGT@V60B7AA 00706100
  687. STH R7,PAGTOT SAVE NEW TOTAL COUNT @V4M0125 00707000
  688. LA R5,PAGBMP(R5) RESTORE REGISTER @V4M0125 00708000
  689. B GOTUSD1 @V4M0125 00709000
  690. DECRATT DS 0H DECREMENT AP COUNT NOW @V4M0125 00710000
  691. STH R7,PAGBMP+PAGTOT-PAGTABLE(,R5) UPDATE ATTACHED @V407511 00711000
  692. * PROC TOTAL COUNTER (2ND SET OF TABLES) 00712100
  693. GOTUSD1 DS 0H @V407511 00713000
  694. LA R7,SEGINV INVALID FLAG @V408246 00714000
  695. ST R7,0(,R9) INVALIDATE STE @V408246 00715000
  696. EJECT 00716000
  697. * 00717000
  698. * CHECK FOR MORE PAGE TABLES IN SHARED, NAMED SYSTEM 00718000
  699. * 00719000
  700. GOTUSE DS 0H @V407511 00720000
  701. S R3,F1 DECREMENT SEGMENT NUMBER INDEX @V4M0179 00721000
  702. BNM SGFND IF MORE, KEEP LOOKING @V408246 00722000
  703. SPACE 3 00723000
  704. * 00724000
  705. * ALL PTO'S HANDLED 00725000
  706. * 00726000
  707. CLI SAVEWRK1+2,NOTINUSE SHARED SYSTEM RESET? @V407511 00727000
  708. BH GTRETURN NO SEGMENTS FOUND @V407511 00728000
  709. BL DECVMSHR YES, DONE PROCESSING @V408246 00729000
  710. LR R1,R10 GET ADDRESS @V408246 00730000
  711. LH R0,SHRTSIZE AND SIZE OF SHRTABLE @V408246 00731000
  712. TM SAVEWRK1,PURGE PURGING A NAMED SYSTEM ? @V408246 00732000
  713. BZ FRETSHR NO - RELEASE THE SHRTABLE @V408246 00733000
  714. STM R0,R1,SAVEWRK7 SAVE LENGTH/ADDRESS OF SHRTABLE @V408246 00734000
  715. OI SAVEWRK1,SYSFND+SYSFRET FOUND BUT NOT FRETTED @V408246 00735000
  716. B DECVMSHR DECREMENT USER SHARED COUNT @V408246 00736000
  717. FRETSHR CALL DMKFRET FRET THE SHRTABLE @V408246 00737000
  718. EJECT 00738000
  719. * 00739000
  720. * PROCESSESING FINISHED, DECREMENT COUNT 00740000
  721. * 00741000
  722. DECVMSHR LH R1,VMSHRSYS GET COUNT OF SHARED SYSTEMS @V408246 00742000
  723. BCT R1,STVMSHR DECREMENT AND TEST @V408246 00743000
  724. NI VMOSTAT,255-VMSHR IF ZERO, TURN OFF SHARED @V408246 00744000
  725. STVMSHR STH R1,VMSHRSYS STORE NEW COUNT @V408246 00745000
  726. GTRETURN DS 0H @V407511 00746000
  727. LM R1,R4,SAVEWRK3 RESTORE REGISTERS @V407511 00747000
  728. L R14,SAVEWRK9 RETURN ADDRESS FOR CALLER @V408246 00749000
  729. BR R14 RETURN TO CALLER @V408246 00750000
  730. DROP R10 @V408246 00751000
  731. EJECT 00752000
  732. PROCPAGE DS 0H @V407511 00753000
  733. ST R14,SAVEWRK2 SAVE RETURN ADDRESS @V407511 00754000
  734. PROUSAB1 DS 0H @V407511 00755000
  735. TM 3(R9),SEGINV SEGMENT VALID? @V408246 00756000
  736. BZ PROUSAC YES @V407511 00757000
  737. NI 3(R9),255-SEGINV NO, VALIDATE IT @V408246 00758000
  738. CLI SAVEWRK1+2,NOTINUSE LAST USER? @V407511 00759000
  739. BE PROUSAC YES, BYPASS ACTIVE COUNTER @VA07282 00760500
  740. L R0,PAGACT LOAD ACTIVE COUNTER @V407511 00761000
  741. TM APSTAT1,APUOPER RUNNING IN ATTACHED MODE @V407511 00762000
  742. BO CSLOOP2 YES, USE COMPARE & SWAP LOGIC @V407511 00763000
  743. AL R0,UPDTACT NO, INCREMENT ACTIVE COUNT @V407511 00764000
  744. ST R0,PAGACT STORE UPDATED COUNTER @V407511 00765000
  745. B PROUSAC BRANCH AROUND ATTACHED CODE @V407511 00766000
  746. CSLOOP2 DS 0H @V407511 00767000
  747. LR R1,R0 LOAD FOR COMPARE & SWAP @V407511 00768000
  748. AL R1,UPDTACT INCREMENT ACTIVE COUNT @V407511 00769000
  749. CS R0,R1,PAGACT UPDATE ACTIVE COUNTER @V407511 00770000
  750. BNZ CSLOOP2 SOMEBODY BEAT ME, TRY AGAIN @V407511 00771000
  751. PROUSAC DS 0H @V407511 00772000
  752. LR R1,R9 @V407511 00773000
  753. L R2,VMSEG ADDRESS OF 1ST STE @V408246 00774000
  754. LA R2,0(,R2) CLEAR COUNT FIELD @V408246 00775000
  755. SR R1,R2 @V407511 00776000
  756. SLL R1,14 ADDRESS OF 1ST PAGE IN SEGMENT @V407511 00777000
  757. SR R7,R7 CLEAR @V408246 00778000
  758. IC R7,0(,R9) (PTE COUNT * 16) - 16 @V408246 00779000
  759. LA R7,16(,R7) PTE COUNT * 16 @V408246 00780000
  760. SRL R7,4 PTE COUNT @V408246 00781000
  761. LA R8,PAGTSWP+SWPFLAG-SWPTABLE(,R5) POINT TO 1ST @V408211 00782000
  762. * SWPTABLE ENTRY @V408211 00783000
  763. USING SWPFLAG,R8 @V408246 00784000
  764. EJECT 00785000
  765. * 00786000
  766. * PROCESS INDIVIDUAL TABLE ENTRIES FOR EACH PAGE IN THIS 00787000
  767. * SEGMENT 00788000
  768. * 00789000
  769. PROUSB DS 0H @V407511 00790000
  770. C R4,PAGTSWP+SWPVM-SWPTABLE(,R5) WAS SEGMENT @V408211 00792000
  771. * OWNER SWITCHED? @V408211 00793000
  772. BE PROUSBA NO, BYPASS BACKING COUNT RESET @V407511 00794000
  773. CLI SAVEWRK1+2,NOTINUSE SHARED SEGMENT STILL IN USE?@V407511 00795000
  774. BNE *+8 YES @V408246 00796000
  775. NI SWPFLAG,X'FF'-SWPSHR NO, RESET SHARED FLAG @V408246 00797000
  776. TM SWPFLAG,SWPRECMP BACKING STORE ALLOCATED? @V408246 00798000
  777. BO PROUSBA @V407511 00799000
  778. SR R2,R2 CLEAR @V408246 00800000
  779. IC R2,SWPCODE GET VOLUME INDEX CODE @V408246 00801000
  780. SLL R2,3 GET VOLUME INDEX CODE @V408246 00802000
  781. AL R2,=A(DMKSYSOW) POINT TO OWNED LIST ENTRY @V408246 00803000
  782. LH R2,OWNDRDEV-OWNDLIST(,R2) GET RDEVBLOK INDEX @V408246 00804000
  783. SLL R2,3 CONVERT TO BYTE INDEX @V408246 00805000
  784. AL R2,ARIODV POINT TO RDEVBLOK @V408246 00806000
  785. USING RDEVBLOK,R2 @V408246 00807000
  786. LA R15,VMPDRUM-VMBLOK ASSUME DRUM @V408246 00808000
  787. CLI RDEVTYPE,TYP2305 CORRECT? @V408246 00809000
  788. BE *+8 YES @V408246 00810000
  789. LA R15,VMPDISK-VMBLOK NO, RESET TO DISK COUNTER @V408246 00811000
  790. LH R0,0(R15,R4) DECREMENT @V408246 00812000
  791. S R0,F1 ORIGINAL OWNER'S COUNT @V408246 00813000
  792. BM *+8 ERROR, BYPASS STORE @V408246 00814000
  793. STH R0,0(R15,R4) @V408246 00815000
  794. LH R0,0(R15,R11) INCREMENT @V408246 00816000
  795. A R0,F1 NEW OWNER'S COUNT @V408246 00817000
  796. STH R0,0(R15,R11) @V408246 00818000
  797. DROP R2 @V408246 00819000
  798. EJECT 00820000
  799. PROUSBA DS 0H PROCESS PAGE'S PAGE TABLE ENTRY @V407511 00821000
  800. TRANS 2,1,OPT=(DEFER) MAKE SURE PAGE ISNT INTRANSIT @VA12777 00822500
  801. BNZ PROUSC PAGE NOT AVAILABLE @V407511 00823000
  802. SRL R2,12 REAL PAGE NUMBER @V408246 00824000
  803. SLL R2,4 PAGE NUMBER * 16 @V408246 00825000
  804. A R2,ACORETBL CORE TABLE ENTRY FOR THIS PAGE @V408246 00826000
  805. DROP R7 @V408246 00827000
  806. USING CORTABLE,R2 @V408246 00828000
  807. CLI SAVEWRK1+2,NOTINUSE SHARED SEGMENT STILL IN USE?@V407511 00829000
  808. BNE PROUSBB YES @V407511 00830000
  809. NI CORFLAG,255-CORSHARE NO, UNSHARE PAGE @V408246 00831000
  810. L R14,=A(DMKPTRSC) POINTER TO SHARED PAGE COUNTER @V408246 00832000
  811. L R15,0(,R14) DECREMENT @V408246 00833000
  812. BCTR R15,0 COUNT OF SHARED PAGES @V408246 00834000
  813. ST R15,0(,R14) @V408246 00835000
  814. L R14,CORFPNT CURRENT OWNER OF PAGE @V408246 00836000
  815. TM CORFLAG,CORCFLCK FRAME LOCKED ?? @VA07798 00836200
  816. BO PROUSBA1 YES, SKIP UPDATE OF FRAME COUNT @VA07798 00836400
  817. LH R15,VMPAGES-VMBLOK(,R14) DECREMENT @V408246 00837000
  818. BCTR R15,0 OLD OWNER'S COUNT @V408246 00838000
  819. LTR R15,R15 VMPAGES TO GO NEGATIVE ? @VA07224 00838100
  820. BM PGS1 YES - TERMINATE CP @VA07224 00838200
  821. STH R15,VMPAGES-VMBLOK(,R14) @V408246 00839000
  822. PROUSBA1 DS 0H @VA07798 00839200
  823. LR R14,R11 NEW OWNER OF PAGE @V408246 00840000
  824. TM CORFLAG,CORCFLCK FRAME LOCKED? @VA09446 00840100
  825. BO PROUSBD YES, SKIP UPDATE OF FRAME COUNT @VA09446 00840200
  826. B PROUSBC @V407511 00841000
  827. PROUSBB DS 0H @V407511 00842000
  828. CL R11,CORFPNT THIS PAGE BELONG HERE? @V408246 00843000
  829. BNE PROUSC @V407511 00844000
  830. L R14,PAGTSWP+SWPVM-SWPTABLE(,R5) NEW OWNER @VA09446 00844100
  831. TM CORFLAG,CORCFLCK FRAME LOCKED ?? @VA07798 00844200
  832. BO PROUSBD YES, SKIP UPDATE OF FRAME COUNT @VA09446 00844450
  833. LH R15,VMPAGES DECREMENT @V408246 00845000
  834. S R15,F1 IN-CORE PAGE COUNT @V408246 00846000
  835. BM PGS1 VMPAGES NEGATIVE - TERMINATE CP @VA07224 00846100
  836. STH R15,VMPAGES @V408246 00847000
  837. PROUSBC DS 0H @V407511 00849000
  838. LA R15,1 INCREMENT @V408246 00850000
  839. AH R15,VMPAGES-VMBLOK(,R14) IN-CORE PAGE COUNT @V408246 00851000
  840. STH R15,VMPAGES-VMBLOK(,R14) @V408246 00852000
  841. PROUSBD DS 0H @VA09446 00852500
  842. ST R14,CORFPNT UPDATE FRAME OWNERSHIP @VA09446 00853100
  843. TM CORFLAG,CORRSV RESERVED PAGE? @V408246 00854000
  844. BZ PROUSC NO @V407511 00855000
  845. NI CORFLAG,255-CORRSV YES, RESET @V408246 00856000
  846. L R14,=A(DMKDSPNP) POINTER TO PAGE COUNT @V408246 00857000
  847. L R15,0(,R14) INCREMENT @V408246 00858000
  848. AL R15,F1 PAGEABLE PAGE COUNT @V408246 00859000
  849. ST R15,0(,R14) @V408246 00860000
  850. L R14,=A(DMKPTRRC) POINTER TO RESERVE COUNT @V408246 00861000
  851. L R15,0(,R14) DECREMENT @V408246 00862000
  852. SL R15,F1 RESERVED PAGE COUNT @V408246 00863000
  853. ST R15,0(,R14) @V408246 00864000
  854. PROUSC DS 0H @V407511 00865000
  855. LA R8,8(,R8) NEXT SWAPTABLE ENTRY @V408246 00866000
  856. A R1,F4096 NEXT VIRTUAL PAGE ADDRESS IN @V408246 00867000
  857. * THIS SEG. 00868000
  858. BCT R7,PROUSB PROCESS REST OF SEGMENT @V407511 00869000
  859. DROP R2,R8 @V408246 00870000
  860. USING CORTABLE,R7 @V408246 00871000
  861. L R14,SAVEWRK2 RESTORE RETURN ADDRESS @V407511 00872000
  862. BR R14 @V407511 00873000
  863. EJECT 00874000
  864. *. 00875000
  865. * 6. SET UP TO RELEASE SHARED SYSTEMS AND 00876000
  866. * TO RELEASE ALL (IF NOCLEAR NOT SPECIFIED) 00877000
  867. * PAGES OF THE USER'S VIRTUAL STORAGE SPACE 00878000
  868. * (ALSO RESET ANY INSTRUCTIONS MODIFIED BY TRACE OR ADSTOP). 00879000
  869. * 7. SAVE THE ADDR OF LAST PAGE TO RELEASE 00880000
  870. * IN R2. (PAGOUT CODE IS 00881000
  871. * JOINED BY PARTIAL PAGE-OUT HERE). 00882000
  872. * 8. LOCATE THE PAGTABLE AND SWPTABLE FOR THE SEGMENT TO BE 00883000
  873. * RELEASED; INDEX TO THE CORRECT ENTRY FOR THE 1ST PAGE 00884000
  874. * 8A IF ENTRY WAS DMKPGSPO, SKIP TO STEP 8C 00885000
  875. * 8B IF SHRTABLE POINTER NON-ZERO, GO TO STEP 2 00886000
  876. * 8C IF NOCLEAR SPECIFIED SKIP TO STEP 10 00887000
  877. * 9. ENQUEUE ON THE PAGE VIA A CALL TO DMKPTRAN; WHEN PAGING 00888000
  878. * ACTIVITY HAS STOPPED, CONTINUE 00889000
  879. * 10. IF THE PAGE IS NOT RESIDENT, SKIP TO STEP 11; OTHERWISE, 00890000
  880. * DECREMENT THE RESIDENT PAGE COUNT, UNCHAIN THE CORTABLE 00891000
  881. * ENTRY FROM THE USER PAGE LIST, AND CALL DMKPTRFT TO PLACE 00892000
  882. * THE PAGE ON THE FREE PAGE LIST 00893000
  883. * 11. IF THE DASD PAGE SLOT IS MARKED READ-ONLY, SKIP TO STEP 12; 00894000
  884. * OTHERWISE, CALL DMKPGTPR OR DMKPGTSP TO RELEASE THE SLOT 00895000
  885. * 12. LOOP THROUGH THE REQUESTED NUMBER OF PAGES, AND WHEN 00896000
  886. * FINISHED, EXIT TO THE CALLER 00897000
  887. *. 00898000
  888. PGSPO1 EQU * @V304635 00899000
  889. NI SAVEWRK1,X'FF'-NOCLEAR CLEAR ALL (CLEAN UP ) @V304735 00900000
  890. SPACE 2 00901000
  891. AIF (NOT &TRACE(6)).NOTRA1 00902000
  892. L R1,VMTREXT ANY TREXT BLOCK THERE ? 00903000
  893. LTR R1,R1 ... 00904000
  894. BZ PGOUTA NOPE, NO PROBLEM CHECK FOR ADSTOP@V407511 00905000
  895. USING TREXT,R1 00906000
  896. MVC TREXIN1(8),FFS YES, FF'S TO TREXIN1, TREXIN2, AND 00907000
  897. MVC TREXANSI(4),FFS TREXANSI TO "CLEAR" ANY MODIFIED INSTR. 00908000
  898. MVI TREXNSI,00 ALSO CLEAR 1ST BYTE OF "TREXNSI" 00909000
  899. DROP R1 00910000
  900. .NOTRA1 ANOP 00911000
  901. PGOUTA DS 0H @V407511 00912000
  902. L R1,VMADSTOP GET ADDR PREVIOUS ADSTOP BLOCK @V407511 00913000
  903. LTR R1,R1 DOES ONE EXIST ? 00914000
  904. BZ PGOUTB NOPE - GO LOAD R2 (NOTE R1=0). @V407511 00915000
  905. LA R0,2 R0 = SIZE OF ADSTOP DSECT 00916000
  906. CALL DMKFRET GIVE IT BACK TO FREE STORAGE 00917000
  907. SLR R1,R1 CLEAR VMADSTOP 00918000
  908. ST R1,VMADSTOP (AND LEAVE R1=0) 00919000
  909. PGOUTB DS 0H R1=0 FOR PAGE ZERO 1ST PAGE REL @V407511 00920000
  910. ST R1,VMTIMER ZERO OUT VIRTUAL INTERVAL TIMER 00921000
  911. AIF (NOT &VIRREAL).NOVR2 00922000
  912. C R11,AVMREAL DOES USER OWN VIRT=REAL AREA 00923000
  913. BNE PGOUTC NO, BRANCH @V407511 00924000
  914. L R2,F4096 START CLEARING STORAGE AT PAGE 1 00925000
  915. L R3,=A(DMKSLC-4096) TOTAL NUM. BYTES TO CLEAR 00926000
  916. SLR R4,R4 ZERO R4 00927000
  917. SLR R5,R5 ZERO R5 00928000
  918. MVCL R2,R4 CLEAR ENTIRE AREA 00929000
  919. B EXIT RETURN TO CALLER @V304635 00930000
  920. PGOUTC DS 0H CONNECTOR @V407511 00931000
  921. .NOVR2 ANOP 00932000
  922. SR R2,R2 CLEAR @V304635 00933000
  923. IC R2,VMSEG GET NUMBER OF SEGMENT TABLES @V304635 00934000
  924. LA R2,1(,R2) NOW TO ORIGIN 1 @V304635 00935000
  925. SLL R2,20 GET ADDR +1 PAGE OF LAST PAGE @V304635 00936000
  926. BCTR R2,0 ADDRESS OF LAST PAGE 00937000
  927. SPACE 3 00938000
  928. USING SWPFLAG,R5 00939000
  929. USING CORTABLE,R7 00940000
  930. USING PAGCORE,R9 00941000
  931. USING SEGTABLE,R3 @V304635 00942000
  932. SPACE 3 00943000
  933. PGOUT1 DS 0H @V407511 00944000
  934. CL R11,AVMREAL DOES USER OWN V=R AREA @V304635 00945000
  935. BE EXIT IF YES - JUST EXIT @V304635 00946000
  936. L R3,VMSEG GET SEGMENT TABLE ORIGIN 00947000
  937. LR R14,R1 GET 1ST PAGE TO RELEASE 00948000
  938. SRL R14,16 ISOLATE SEGMENT NUMBER @V408246 00949000
  939. SLL R14,2 GET SEGMENT NUMBER X4 00950000
  940. LA R3,0(R14,R3) GET SEGMENT TABLE ENTRY 00951000
  941. SPACE 2 00952000
  942. PGOUT2 DS 0H RLEASE A SEGMENT @V407511 00953000
  943. ICM R4,B'0110',SEGPAGE+1 VALID PNTR? @V408246 00954000
  944. BNZ B2 YES @V408246 00955000
  945. CLI SEGPAGE+3,SEGINV INVALID STE(NOT BUILT)? @V408246 00956000
  946. BE NEXTSEG YES, NOTHING TO RELEASE @V408246 00957000
  947. B2 TM SEGPAGE+3,SEGINV VALID ADDRESS WITH INVALID @V408246 00958000
  948. * FLAG? 00959000
  949. BZ PGOUT2A NO @V408246 00960000
  950. LR R4,R2 SAVE LAST ADDRESS @V408246 00961000
  951. TRANS 7,1,OPT=(DEFER) ENQUEUE ON SEGMENT @V408246 00962000
  952. * WILL CLEAR INVALID BIT 00963000
  953. * AND WAIT FOR ANY MIGRATION TO STOP 00964000
  954. LR R2,R4 RESTORE LAST ADDRESS @V408246 00965000
  955. BC 2,NEXTSEG ADDR EXCEP, NOTHING TO RELEASE @V408246 00966000
  956. TM SAVEWRK1,CALLPO FULL CORE RESET? @V408246 00967000
  957. BNO PGOUT2 NO, JUST NORMAL PRECAUTIONS @V407511 00968000
  958. OI SAVEWRK1+3,REPEAT RAISE REPEAT FLAG @V408211 00969000
  959. B PGOUT2 AND CONTINUE FOR NOW @V407511 00970000
  960. PGOUT2A DS 0H @V408246 00971000
  961. SR R10,R10 CLEAR @V304635 00972000
  962. TM SAVEWRK1,PARTIAL FLAG TO SKIP SHARED SYSTEMS @V304635 00973000
  963. BO FINSHTBL PROCESSING? YES, THEN SKIP IT @V304635 00974000
  964. * 00975000
  965. * CHECK IF THIS SEGMENT IS PART OF A SHARED SYSTEM 00976000
  966. * IF SO, GOTSHTBL WILL CLEAN UP 00977000
  967. * 00978000
  968. L R10,0(R3) GET PAGETABLE ORIGIN @V304635 00979000
  969. LA R10,0(R10) STRIP LENGTH @V304635 00980000
  970. S R10,F8 BACKUP TO SHRTABLE POINTER @V304635 00981000
  971. LR 4,R10 SAVE POINTER TO PAGE TABLE HEADER@V304635 00982000
  972. L R10,0(R10) GET SHRTABLE POINTER(IF ANY) @V304635 00983000
  973. LTR R10,R10 IS THIS A NAMED SYSTEM. @V304635 00984000
  974. BZ FINSHTBL NO - @V304635 00985000
  975. CLC SHRSEGCT-SHRTABLE(4,R10),F0 IS THIS A SHARED @V304635 00986000
  976. * NAMED SYSTEM ? 00987000
  977. BE TESTPUR NO - TEST FOR PURGESYS FUNCTION @V304635 00989000
  978. TM SAVEWRK1,PURGE RELEASING A NAMED SYSTEM ? @V304635 00990000
  979. LA R14,FINSHTBL RETURN ADDR FOR NAMED SYSTEM @VA07849 00990100
  980. BZ GOTSHTBL NO - RELEASING ALL STORAGE @V304635 00991000
  981. CLC SHRNAME-SHRTABLE(8,R10),SAVER1 DO NAMES MATCH ? @V304635 00992000
  982. BNE FINSHTBL IF NOT - CONTINUE @V304635 00993000
  983. TM SAVEWRK1+3,PGVMAFND ALREADY PURGED THIS SYSTEM @V4M0191 00994000
  984. BO FINSHTBL YES, CONTINUE SCAN @V4M0191 00995000
  985. B GOTSHTBL RELEASE THIS NAMED SYSTEM @VA07849 00996100
  986. TESTPUR DS 0H @V4M0214 00998000
  987. NI SAVEWRK1+3,X'FF'-PGPROCIP-PGVMAFND-NPROTECT @VA13580 00999050
  988. TM SAVEWRK1,PURGE PURGING A NAMED SYSTEM ? @VA13580 00999250
  989. BZ CLRSHARE NO, CLEAR SHARE TABLE POINTER @VA13580 00999450
  990. CLC SHRNAME-SHRTABLE(8,R10),SAVER1 DO NAMES MATCH @VA13580 00999650
  991. BNE NEXTSEG NO, GET NEXT SEGMENT @VA13580 00999850
  992. MVI SAVEWRK1+2,NOTINUSE PTE NO LONGER IN USE @VA13580 01000050
  993. B FINSHTBL CONTINUE RESET OF SHARE SYS IND. @VA13580 01000250
  994. CLRSHARE EQU * 01000450
  995. XC 0(4,R4),0(R4) CLEAR SHARE TABLE POINTER @VA13580 01000650
  996. FINSHTBL EQU * @V304635 01003000
  997. TM SEGPAGE+3,SEGINV VALID STE? @V408246 01004000
  998. BO NEXTSEG IF YES - PROCEED TO NEXT @V304635 01005000
  999. * SEGTABLE ENTRY 01006000
  1000. L R15,SEGPAGE GET PTO @V408246 01007000
  1001. LR R14,R1 GET VIRTUAL ADDRESS @V408246 01008000
  1002. SRL R14,12 . . VIRTUAL PAGE NO. @V408246 01009000
  1003. N R14,F15 (WITHOUT SEGMENT NO.) @V408246 01010000
  1004. ALR R14,R14 PAGE NO. * 2 -> PTE INDEX @V408246 01011000
  1005. LA R9,0(R14,R15) STARTING PTE @V408246 01012000
  1006. SLL R14,2 PAGE NO. * 8 -> SWAPTABLE ENTRY @V408246 01013000
  1007. * INDEX 01014000
  1008. LA R5,16*2+8(R14,R15) STARTING SWAPTABLE ENTRY @V408246 01015000
  1009. TM SAVEWRK1,PURGE RELEASING A NAMED SYSTEM @V304635 01016000
  1010. BZ PGOUT3 NO - RELEASE THIS PAGE (IF @V407511 01017000
  1011. * POSSIBLE) 01018000
  1012. LTR R10,R10 DOES PAGE TABLE BELONG TO NAMED @V304635 01019000
  1013. * SYSTEM ? 01020000
  1014. BZ NEXTSEG NO - PROCESS NEXT SEGTABLE ENTRY @V304635 01021000
  1015. CLC SHRNAME-SHRTABLE(8,R10),SAVER1 DO NAMES MATCH ? @V304635 01022000
  1016. BNE NEXTSEG IF NOT - GET NEXT SEGTABLE ENTRY @V304635 01023000
  1017. OI SAVEWRK1,SYSFND REMEMBER NAMED SYSTEM FOUND. @V304635 01024000
  1018. EJECT 01025000
  1019. PGOUT3 DS 0H RELEASE A PAGE @V407511 01026000
  1020. TM SAVEWRK1,NOCLEAR WAS NOCLEAR SPECIFIED @V304635 01027000
  1021. BO NEXTSEG IF SO, SKIP PAGE RELEASE @V304635 01028000
  1022. BAL R14,RELAPAGE RELEASE THE PAGTABLE IF POSSIBLE @V407511 01029000
  1023. * DETERMINE IF THERE ARE TWO SETS OF PAGE AND SWAP TABLES TO PROCESS. 01029100
  1024. * THERE ARE TWO IF THE MP FEATURE IS INSTALLED AND THE SYSTEM IS 01029200
  1025. * GENERATED FOR AP MODE. 01029300
  1026. TM APSTAT1,MPFEAT IS THE MP FEATURE INSTALLED? @V5BC0AB 01029400
  1027. BNO NEXTSEG NO, DON'T HAVE PGT OF PROCESSOR @V5BC0AB 01029500
  1028. TM SAVEWRK1+3,NPROTECT RUNNING UNPROTECTED @V60BC11 01029530
  1029. BO NEXTSEG YES, DON'T HAVE PAGTABLE TO PROC @V60BC11 01029560
  1030. L R14,PGSSYSAP EST. ADDRESSABILITY TO DMKSYSAP @V5BC0AB 01029600
  1031. CLI 0(R14),YES IS SYSTEM GENED FOR AP? @V5BC0AB 01029700
  1032. BNE NEXTSEG NO, DONT HAVE PGT OF PROCESSOR @V5BC0AB 01029800
  1033. TM SAVEWRK1,PURGE+CALLPO PURGING SYSTEM OR ALL STOR@VA07282 01030500
  1034. BZ NEXTSEG NO, GO PROCESS NEXT SEGMENT @V407511 01031000
  1035. TM SAVEWRK1+3,PGVMAFND RELEASING A SHARED SYSTEM @V407511 01032000
  1036. BZ NEXTSEG NO, GO PROCESS NEXT SEGMENT @V407511 01033000
  1037. STCM R4,B'1000',SEGPAGE RESET PAGTABLE LENGTH @VA07556 01034200
  1038. LA R4,0(,R4) STRIP OFF LENGTH @VA07556 01034400
  1039. TM SAVEWRK1+3,PGPROCIP OLD PGTABLE FOR IPL PROC? @V60B7AA 01038100
  1040. BZ PGOUT3A NO, SET UP FOR IPL PROC @V60B7AA 01039100
  1041. AL R4,DCPAGBMP ADD DISP TO ATTACHED PAGTABLE @V407511 01040000
  1042. B PGOUT3B CONTINUE PROCESSING @V407511 01041000
  1043. PGOUT3A DS 0H @V407511 01042000
  1044. SL R4,DCPAGBMP SUBTRACT DISP TO IPL PROC PGTABLE@V60B7AA 01043100
  1045. PGOUT3B DS 0H @V407511 01044000
  1046. STCM R4,B'0111',SEGPAGE+1 STORE ADDR OTHER PAGTABLE @VA07556 01045200
  1047. LR R5,R4 @V407511 01046000
  1048. SL R5,F16 @V407511 01047000
  1049. LA R5,PAGTSWP+SWPFLAG-SWPTABLE(,R5) @V407511 01048000
  1050. N R1,=X'00FF0000' RESET R1 TO START OF SEGMENT @V407511 01049000
  1051. LR R9,R4 RESET R9 FOR OTHER PAGTABLE @V4M0140 01050000
  1052. BAL R14,RELAPAGE PROCESS OTHER PAGTABLE @V407511 01051000
  1053. NEXTSEG DS 0H @V407511 01052000
  1054. NI SAVEWRK1+3,X'FF'-PGPROCIP-PGVMAFND RESET SHR FLG@V60B7AA 01052300
  1055. LA R3,SEGPAGE+4 POINT TO NEXT STE @V408611 01053000
  1056. N R1,=X'00FF0000' SAVE SEGMENT NUMBER @V304635 01054000
  1057. A R1,=X'00010000' BUMP SEGMENT BY 1 @V304635 01055000
  1058. CR R1,R2 ARE WE WITHIN RANGE OF PAGES @V304635 01056000
  1059. BNH PGOUT2 YES - RELEASE NEXT PAGE @V407511 01057000
  1060. TM SAVEWRK1,PURGE+CALLPO RELEASING SHR-SYSTEM ? @V304635 01058000
  1061. BZ EXIT NO - RETURN TO CALLER @V304635 01059000
  1062. B PURFINSH FINISH WITH PURGESYS FUNCTION @V304635 01060000
  1063. EJECT @V407511 01061000
  1064. RELAPAGE DS 0H @V407511 01062000
  1065. ST R14,SAVEWRK9 SAVE THE RETURN ADDRESS @V407511 01063000
  1066. RELLOOP DS 0H @V407511 01064000
  1067. TM SWPFLAG,SWPSHR IS THIS A SHARED PAGE 01065000
  1068. BO NEXTPAGE YES -- DO NOT RELEASE IT 01066000
  1069. LR R4,R2 SAVE R2 @V304635 01067000
  1070. LA R10,SWPTRANS+SWPALLOC ENQUEUING FLAGS @V408246 01068000
  1071. SLL R10,24 POSITION @V408246 01069000
  1072. N R10,SWPFLAG SAVE ENQUEUE FLAGS @V408246 01070000
  1073. TRANS 7,1,OPT=(DEFER) ENQUEUE ON PAGE @V304635 01071000
  1074. LR R2,R4 RESTORE REG @V304635 01072000
  1075. BC 4,CKRELSE IF PAGE IS NOT RESIDENT, TEST FOR RELEASE 01073000
  1076. BC 2,NEXTPAGE NON EXISTENT - TRY NEXT ONE @V304635 01074000
  1077. LTR R10,R10 WERE ANY ENQUEUING FLAGS PRESENT?@V408246 01075000
  1078. BZ PGRES NO, CONTINUE @V407511 01076000
  1079. CLI SAVEWRK1,CALLPO FULL CORE RESET? @V408246 01077000
  1080. BNE PGRES NO, NO NEED TO SYNCRONIZE @V407511 01078000
  1081. * CALL TO DMKPTR RESULTED IN A DEFER . . . NEED TO SYNCRONIZE 01079000
  1082. * VIRTUAL MEMORY REFERENCES, ESPECIALLY IF THIS CALL IS 01080000
  1083. * FROM LOGOUT 01081000
  1084. PGDFR DS 0H @V407511 01082000
  1085. NI SAVEWRK1+3,X'FF'-REPEAT CLEAR REPEAT FLAG @V408211 01083000
  1086. LA R0,CPEXSIZE GET CORE FOR CPREQUEST BLOCK @V408246 01084000
  1087. CALL DMKFREE @V408246 01085000
  1088. USING CPEXBLOK,R1 @V408246 01086000
  1089. STM R0,R15,CPEXR0 SAVE ALL REGS @V408246 01087000
  1090. LA R0,PGSPO1 RESTART ADDRESS @V408246 01088000
  1091. ST R0,CPEXADD RETURN ADDRESS @V408246 01089000
  1092. CALL DMKSTKCP STACK REQUEST @V408246 01090000
  1093. GOTO DMKDSPCH . . SYNCRONIZE @V408246 01091000
  1094. DROP R1 @V408246 01092000
  1095. EJECT 01093000
  1096. * PAGE IS RESIDENT 01094000
  1097. PGRES DS 0H @V407511 01095000
  1098. SRL R7,8 GET PAGE NUMBER X16 01096000
  1099. A R7,ACORETBL POINT TO CORTABLE ENTRY FOR REAL PAGE 01097000
  1100. TM CORFLAG,CORFREE IS PAGE ALREADY FREE? @VA07076 01097100
  1101. BO NEXTPAGE YES,GO TO NEXT PAGE. @VA07076 01097200
  1102. TM CORFLAG,CORCFLCK PAGE LOCKED BY 'LOCK' COMMAND? @V408246 01098000
  1103. BZ CKRSV NO, CHECK FOR RESERVED @V408246 01099000
  1104. TM SAVEWRK1,UNLOCK DID CALLER SPECIFY 'UNLOCK' @V408246 01100000
  1105. BO UNLCK YES, UNLOCK @V408246 01101000
  1106. TM VMRSTAT,VMLOGOFF IS THE USER LOGGING OFF ? @V408246 01102000
  1107. BO UNLCK YES, UNLOCK ANYWAY @V408246 01103000
  1108. CLI SAVEWRK1+2,NOTINUSE SHARED SEGMENT STILL IN USE?@VMI0075 01103100
  1109. BE UNLCK NO, UNLOCK PAGE SINCE IT'S NOW @VMI0075 01103300
  1110. * NON-SHARED 01103500
  1111. * NO, JUST ZERO PAGE AND LEAVE AS IS 01104000
  1112. * JUST ZERO PAGE AND LEAVE AS IS 01104100
  1113. LR R14,R7 GET ADDRESS OF CORTABLE ENTRY @V408246 01105000
  1114. SL R14,ACORETBL LEAVE ONLY INDEX PORTION @V408246 01106000
  1115. SLL R14,8 FORM FULL PAGE ADDRESS @V408246 01107000
  1116. L R15,F4096 BYTE LENGTH FOR 1 FULL PAGE @V408246 01108000
  1117. ST R1,TEMPR1 SAVE VIRTUAL ADDRESS @V408246 01109000
  1118. SLR R1,R1 COUNT NOT NEEDED FOR 2'ND ADDR. @V408246 01110000
  1119. MVCL R14,R0 BLANK PAGE TO BINARY ZEROES @V408246 01111000
  1120. L R1,TEMPR1 RESTORE VIRTUAL ADDRESS @V408246 01112000
  1121. B CKRELSE CHECK FOR DASD RELEASE @V408246 01113000
  1122. UNLCK DS 0H @V408246 01114000
  1123. LR R4,R2 SAVE R2 @V408246 01115000
  1124. LH R2,PAGCORE PTE @V408246 01116000
  1125. SLL R2,8 DEVELOP REAL PAGE ADDRESS @VA09280 01117100
  1126. N R2,XPAGNUM CLEAR UNWANTED BITS @VA09280 01117600
  1127. CALL DMKPTRUL @V408246 01120000
  1128. LR R2,R4 RESTORE R2 @V408246 01121000
  1129. NI CORFLAG,255-CORCFLCK REMOVE 'LOCK' COMMAND FLAG @V408246 01122000
  1130. C R11,ASYSVM SYSTEM? @V408246 01123000
  1131. BNE *+8 NO @V408246 01124000
  1132. ST R11,CORFPNT YES, MAKE SURE CORRECT @V408246 01125000
  1133. L R14,CORFPNT PAGE'S OWNER @V408246 01126000
  1134. LA R10,1 INCREMENT @V408246 01127000
  1135. AH R10,VMPAGES-VMBLOK(,R14) IN-CORE PAGE COUNT @V408246 01128000
  1136. STH R10,VMPAGES-VMBLOK(,R14) @V408246 01129000
  1137. TM CORFLAG,CORRSV IF RESERVED, ALREADY @V408246 01130000
  1138. * DECREMENTED ONCE 01131000
  1139. BZ UNLKPNP . . INCREMENT DYNAMIC PAGE COUNT @V408246 01132000
  1140. CKRSV DS 0H @V408246 01133000
  1141. TM CORFLAG,CORRSV RESERVED PAGE? @V408246 01134000
  1142. BZ PGOUT4 NO -- @V407511 01135000
  1143. L R14,=A(DMKPTRRC) @V408246 01136000
  1144. L R10,0(,R14) DECREMENT @V408246 01137000
  1145. BCTR R10,0 RESERVED PAGE COUNT @V408246 01138000
  1146. ST R10,0(,R14) @V408246 01139000
  1147. UNLKPNP DS 0H @V408246 01140000
  1148. L R14,=A(DMKDSPNP) @V408246 01141000
  1149. LA R10,1 INCREMENT @V408246 01142000
  1150. A R10,0(,R14) DYNAMIC PAGE COUNT (PAGEABLE @V408246 01143000
  1151. * PAGES) 01144000
  1152. ST R10,0(,R14) @V408246 01145000
  1153. PGOUT4 DS 0H @V407511 01146000
  1154. TM CORFLAG,CORSHARE IS THIS A SHARED PAGE? @V407511 01147000
  1155. BZ PGOUTU NO @V407511 01148000
  1156. L R15,=A(DMKPTRSC) POINTER TO SHARED PAGE COUNTER @V408246 01149000
  1157. L R10,0(,R15) DECREMENT @V408246 01150000
  1158. BCTR R10,0 RESIDENT SHARED PAGE COUNT @V408246 01151000
  1159. ST R10,0(,R15) @V408246 01152000
  1160. PGOUTU DS 0H @V407511 01153000
  1161. L R14,CORFPNT OWNER OF PAGE @V408246 01154000
  1162. TM CORFLAG,CORCFLCK FRAME LOCKED ?? @VA07798 01154200
  1163. BO PGOUTU1 YES, SKIP UPDATE OF FRAME COUNT @VA07798 01154400
  1164. LH R15,VMPAGES-VMBLOK(,R14) DECREMENT @V408246 01155000
  1165. S R15,F1 DECREMENT @V408246 01156000
  1166. BM PGS1 VMPAGES NEGATIVE - TERMINATE CP @VA07224 01156100
  1167. STH R15,VMPAGES-VMBLOK(,R14) @V408246 01157000
  1168. PGOUTU1 DS 0H @VA07798 01157200
  1169. OI VMESTAT-VMBLOK(R14),VMINVPAG FLAG DELAYED PTLB @V408246 01158000
  1170. OI APSTAT2,CPPTLBR INDICATE PTLB REQUIRED @V407511 01159000
  1171. L R10,PREFIXB LOAD PREFIX OF OTHER PROCESSOR @V407511 01160000
  1172. OI APSTAT2-PSA(R10),CPPTLBR PTLB NEED ON OTHER PROC@V407511 01161000
  1173. OI VMESTAT,VMINVPAG NO, INVALIDATE HIM ALSO @V408246 01162000
  1174. B3 XC CORPGPNT(4),CORPGPNT CLEAR POINTER TO PTE @V408246 01163000
  1175. MVC PAGCORE,F8+2 AND INVALIDATE PTE @V408246 01164000
  1176. TM CORFLAG,CORIOLCK PAGE LOCKED FOR I/O? @V408246 01165000
  1177. BZ PGFRET NO, PLACE ON FREE LIST @V407511 01166000
  1178. SR R0,R0 CLEAR @V408246 01167000
  1179. STCM R0,B'0111',CORSWPNT+1 ZERO SWAP TABLE PNTR @V408246 01168000
  1180. NI CORFLAG,255-CORSHARE-CORRSV MAKE SURE CLEAN @V408246 01169000
  1181. B CKRELSE CHECK FOR DASD RELEASE @V408246 01170000
  1182. SPACE 1 01170100
  1183. ABEND 1 VMPAGES TO GO NEGATIVE - TERM CP @VA07224 01170200
  1184. SPACE 1 01170300
  1185. PGFRET DS 0H @V407511 01171000
  1186. CALL DMKPTRFT AND RETURN PAGE TO FREE LIST 01172000
  1187. CKRELSE CL R11,ASYSVM RELEASING SYSTEM STORAGE ? @VM08746 01173000
  1188. BE NEXTPAGE YES - DON'T RELEASE THE DASD @VM08746 01174000
  1189. * SPACE 01175000
  1190. TM SAVEWRK1,PURGE PURGING A NAMED SYSTEM ? @V304635 01176000
  1191. BZ CALLPGS NO - RELEASE THE DASD PAGE @V304635 01177000
  1192. L R10,0(,R3) GET PAGE TABLE @V304635 01178000
  1193. LA R10,0(,R10) LEAVE ONLY 24 BITS FOR ADDRESSING@V304635 01179000
  1194. SL R10,F8 BACK UP TO SHRTABLE POINTER @V304635 01180000
  1195. L R10,0(,R10) GET POINTER TO SHRTABLE POINTER @V304635 01181000
  1196. LTR R10,R10 NAMED SYSTEM ? @V304635 01182000
  1197. BZ NEXTPAGE NO - DON'T RELEASE IT @V304635 01183000
  1198. CLC SHRNAME-SHRTABLE(8,R10),SAVER1 NAMES MATCH ? @V304635 01184000
  1199. BNE NEXTPAGE NO - DON'T RELEASE IT @V304635 01185000
  1200. CALLPGS TM SWPFLAG,SWPRECMP CAN DASD PAGE BE RELEASED ? @V304635 01186000
  1201. BO ZEROSWAP NO - CLEAR SWAPTABLE ENTRY @V304635 01187000
  1202. SPACE 01188000
  1203. L R15,=A(DMKPGTPR) ASSUME NOT FOR SYSTEM VMBLOK @VA04554 01189000
  1204. TM SAVEWRK1,PGTSP IS THE OWNER THE 'SYSTEM' ? @VA04554 01190000
  1205. BZ CALLPGT IF NOT - RELEASE USER PAGE @VA04554 01191000
  1206. L R15,=A(DMKPGTSP) OTHERWISE RELEASE SYSTEM PAGE @VA04554 01192000
  1207. CALLPGT BALR R14,R15 NOW - RELEASE THE DASD PAGE @VA04554 01193000
  1208. SPACE 01194000
  1209. ZEROSWAP EQU * SET CONTENTS AND STORAGE KEYS OF VIRTUAL PAGE = 0 01195000
  1210. TM SAVEWRK1,PARTIAL+PURGE PARTIAL PAGE OUT OR @V304635 01196000
  1211. * PURGE ? 01197000
  1212. BNZ *+10 IF YES - DON'T RESET THE KEYS @V304635 01198000
  1213. XC SWPKEY1(2),SWPKEY1 CLEAR KEYS @V304635 01199000
  1214. XC SWPCYL(4),SWPCYL AND DASD ADDRESS @V304635 01200000
  1215. OI SWPFLAG,SWPRECMP CCPD IS NO GOOD @VA09774 01200500
  1216. NI PAGCORE+1,255-PAGREF RESET REF FLAG @V408246 01201000
  1217. SPACE 01202000
  1218. NEXTPAGE CR R1,R2 ANY PAGES LEFT TO RELEASE @V304635 01203000
  1219. BL CKSEG YES, THEN CHECK FOR END OF SEG @V304635 01204000
  1220. B RELEXIT NO, RETURN TO MAINLINE @VA07849 01204200
  1221. EXIT DS 0H @V408246 01205000
  1222. TM SAVEWRK1+3,REPEAT REPEAT FLAG ON?? @V408211 01206000
  1223. BO PGDFR YES, START AGAIN @V407511 01207000
  1224. TM VMDSTAT,VMINQ IN-Q? @V408246 01208000
  1225. BO EXITA YES, BYPASS CORE RESET @V408246 01209000
  1226. CALL DMKPTRRS CORE RESET FUNCTION @VA07241 01210100
  1227. EXITA DS 0H @V408246 01212000
  1228. CLI SAVEWRK1+1,CC0 SET CC FOR CALLER @V408211 01213000
  1229. EXIT @V408246 01214000
  1230. EJECT 01215000
  1231. CKSEG EQU * HERE TO TEST FOR END OF SEGMENT 01216000
  1232. CLM R1,B'0010',SEGPAGE TEST FOR LAST PAGE @V408246 01217000
  1233. BNL CKNAMSEG YES - NOW TEST FOR NAMED SEGMENT @V304635 01218000
  1234. A R1,F4096 BUMP VIRTUAL PAGE ADDRESS @V304635 01219000
  1235. LA R9,2(,R9) POINT TO NEXT PTE 01220000
  1236. LA R5,8(,R5) POINT TO NEXT SWPTABLE ENTRY 01221000
  1237. B RELLOOP AND CONTINUE CLEARING THIS SEG @V407511 01222000
  1238. SPACE 2 01223000
  1239. CKNAMSEG DS 0H @VA07556 01224200
  1240. TM SAVEWRK1,SYSFND PURGING A SHARED SYSTEM @VA07556 01224400
  1241. BZ RELEXIT1 IF NOT - CONTINUE @V407511 01225000
  1242. CLI SAVEWRK1+2,NOTINUSE PAGTABLE STILL IN USE @VA07849 01225200
  1243. BNE RELEXIT1 YES, CANNOT RELEASE PAGTABLE @VA07849 01225400
  1244. L R14,SEGPAGE-SEGPAGE(,R3) GET PAGE TABLE @V304635 01226000
  1245. N R14,CLCNTINV CLEAR ANY UNWANTED BITS @V408211 01227000
  1246. SL R14,F8 POINT TO PAGE HEADER @V304635 01228000
  1247. L R10,0(,R14) GET POINTER TO SHRTABLE @V304635 01229000
  1248. LTR R10,R10 IS THERE ONE ? @V304635 01230000
  1249. BZ RELEXIT1 NO, RETURN @VA07849 01231100
  1250. XC 0(4,R14),0(R14) CLEAR SHRTBL PTR IN PAGE TABLE @VA13580 01231200
  1251. STM R1,R2,SAVEWRK3 SAVE FOR LATER @V408246 01235000
  1252. LA R14,SEGINV INVALID FLAG @V408246 01236000
  1253. L R1,SEGPAGE-SEGPAGE(,R3) GET STE @V408246 01237000
  1254. ST R14,SEGPAGE-SEGPAGE(,R3) INVALID STE @V408246 01238000
  1255. N R1,CLINVBIT CLEAR INVALID BIT @V408211 01239000
  1256. LR R4,R1 SAVE ORIGINAL PAGTABLE ADDR @V407511 01240000
  1257. CALL DMKBLDRL,PARM=PAGTONLY @V408246 01241000
  1258. LM R1,R2,SAVEWRK3 RESTORE @V408246 01242000
  1259. RELEXIT DS 0H @V407511 01243000
  1260. L R14,SAVEWRK9 RESTORE RETURN ADDRESS @V407511 01244000
  1261. BR R14 RETURN TO CALLER @V407511 01245000
  1262. RELEXIT1 DS 0H @V407511 01246000
  1263. SLR R4,R4 INDICATE TO SKIP TO NEXT SEGMENT @V407511 01247000
  1264. B RELEXIT RETURN TO CALLER @V407511 01248000
  1265. SPACE 2 01249000
  1266. SPACE 3 01250000
  1267. DS 0F 01251000
  1268. SPACE 1 01252000
  1269. * PARMS USED IN SAVEWRK1 01253000
  1270. PARTIAL EQU X'80' DO NOT RELEASE SHARED SEGMENTS @V304635 01254000
  1271. NOCLEAR EQU X'40' DO NOT CLEAR STORAGE @V304635 01255000
  1272. PURGE EQU X'20' PURGE THE NAMED SYSTEM PASS IN @V304635 01256000
  1273. * R1-R2 01257000
  1274. SYSFND EQU X'10' NAMED SYSTEM WAS FOUND @V304635 01258000
  1275. CALLPO EQU X'08' ENTERED BY CALL TO DMKPGSPO @V304635 01259000
  1276. SYSFRET EQU X'04' FRET THE SHRTABLE @V304635 01260000
  1277. UNLOCK EQU X'02' UNLOCK 'LOCKED' PAGES @V304735 01261000
  1278. PGTSP EQU X'01' OWNER = SYSTEM; CALL DMKPGTSP @VA04554 01262000
  1279. SPACE 1 @V407511 01263000
  1280. * CONDITION CODE SETTING FOR SAVEWRK1+1 @V407511 01264000
  1281. CC1 EQU X'01' CONDITION CODE ONE - ERROR @V407511 01265000
  1282. CC0 EQU X'00' CONDITION CODE ZERO - NORMAL @V407511 01266000
  1283. SPACE 1 @V407511 01267000
  1284. * FLAGS USED IN SAVEWRK1+2 01268000
  1285. INUSE EQU X'00' SHARED SYSTEM IS STILL IN USE @V407511 01269000
  1286. NOTINUSE EQU X'01' SHARED SYSTEM NO LONGER IN USE @V407511 01270000
  1287. INITPASS EQU X'02' INITIAL PASS VALUE @V407511 01271000
  1288. SPACE 1 @V407511 01272000
  1289. * FLAGS USED IN SAVEWRK1+3 @V407511 01273000
  1290. REPEAT EQU X'80' REPEAT PROCESSING @V407511 01274000
  1291. PGPROCIP EQU X'40' ENTERED ON THE IPL PROCESSOR @V60B7AA 01275100
  1292. PGVMAFND EQU X'20' VMABLOK FOUND FOR NAMED SYSTEM @V407511 01276000
  1293. NPROTECT EQU X'10' RUNNING UNPROTECTED SYSTEM @V60BC11 01276100
  1294. SPACE 1 @V407511 01277000
  1295. YES EQU C'Y' @V5BC0AB 01277100
  1296. * MODULE DECLARES @V407511 01278000
  1297. DCPAGBMP DC A(PAGBMP) DISPLACEMENT FOR SHARED PAGTABLES @V407511 01279000
  1298. * 01280000
  1299. UPDTACT DC X'00010000' MASK USED FOR INCREMENTING AND @V407511 01281000
  1300. * DECREMENTING PAGACT COUNTER @V407511 01282000
  1301. CLCNTINV DC X'00FFFFFE' CLEAR COUNT AND INVALID BITS @V407511 01283000
  1302. * IN SEGMENT TABLE ENTRIES @V407511 01284000
  1303. CLINVBIT DC X'FFFFFFFE' CLEAR INVALID BIT @V407511 01285000
  1304. DS 0F 01285010
  1305. PGSSYSAP DC V(DMKSYSAP) PTR TO AP= VALUE FROM SYSCOR @V5BC0AB 01285110
  1306. SPACE 01286000
  1307. LTORG 01287000
  1308. EJECT 01288000
  1309. COPY SHRTABLE 01289000
  1310. COPY IOBLOKS 01290000
  1311. COPY SYSTBL 01291000
  1312. COPY RBLOKS 01292000
  1313. COPY DEVTYPES @VA04554 01293000
  1314. COPY ALLOC @VA04554 01294000
  1315. COPY CORE 01295000
  1316. COPY VMBLOK 01296000
  1317. COPY MICBLOK @V3M5014 01297000
  1318. COPY TREXT 01298000
  1319. COPY SAVE 01299000
  1320. PSA 01300000
  1321. COPY EQU 01301000
  1322. END DMKPGS @V200820 01302000