User Tools

Site Tools


ibm:vm370-lib:cp:dmkvma.assemble_src

DMKVMA Source

References

Source Listing

DMKVMA.ASSEMBLE.txt
  1. VMA TITLE 'DMKVMA (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKVMA 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * 00010000
  11. * ATTRIBUTES - 00011000
  12. * REENTRANT, RESIDENT, CALLED VIA BALR 00012000
  13. * 00013000
  14. * ENTRY POINTS - 00014000
  15. * DMKVMASH - CALLED VIA BALR WHEN 'LASTUSER' 00015500
  16. * WAS RUNNING A SHARED SYSTEM. 00016000
  17. * DMKVMASW - CALL VIA A BALR FROM DMKLOK TO SWITCH A 00017000
  18. * VIRTUAL MACHINES SHARED PAGE TABLE POINTERS 00018000
  19. * TO THE CURRENT PROCESSOR'S PAGE TABLES. 00019000
  20. * 00020000
  21. * DMKVMAS1 - ANCHOR FOR SHARED SYSTEMS (SHRTABLE POINTER) 00021000
  22. * DMKVMAS2 - ANCHOR FOR NAMED SYSTEMS (SHRTABLE POINTER) 00022000
  23. * 00023000
  24. * ENTRY CONDITIONS - 00024000
  25. * DMKVMASH 00025000
  26. * GPR 11 = ADDRESS OF USER'S VMBLOK 00026000
  27. * GPR 14 = BALR RETURN ADDRESS 00027000
  28. * GPR 15 = ENTRY POINT 00028000
  29. * 00029000
  30. * DMKVMASW 00030000
  31. * GPR 11 = ADDRESS OF USER'S VMBLOK 00031000
  32. * GPR 14 = BALR RETURN ADDRESS 00032000
  33. * GPR 15 = ENTRY POINT ADDRESS 00033000
  34. * 00034000
  35. * EXIT CONDITIONS - 00035000
  36. * NORMAL - 00036000
  37. * CONDITION CODE IT SET TO ZERO 00037000
  38. * ERROR - 00038000
  39. * CONDITION CODE IS SET TO NON-ZERO. 00039000
  40. * 00040000
  41. * FOR DMKVMASH, WHEN CONTROL IS RETURNED TO THE 00041000
  42. * CALLER, GPR-2 WILL CONTAIN THE REAL ADDRESS OF THE LAST 00042000
  43. * SHARED PAGE THAT WAS CHANGED. 00043000
  44. * 00044000
  45. * CALLS TO OTHER ROUTINES - 00045000
  46. * DMKERMSG - TO SEND ERROR MESSAGES TO THE TERMINAL. 00046000
  47. * DMKFREE - TO OBTAIN FREE STORAGE 00047000
  48. * DMKFRET - TO RETURN STORAGE GOTTEN BY CALL TO DMKFREE 00048000
  49. * DMKSTKCP - STACK A CPEXBLOK 00049000
  50. * DMKCVTBH - CONVERT BINARY TO HEX 00050000
  51. * DMKCFMBK - TO PUT USER IN CONSOLE FUNCTION MODE 00051000
  52. * DMKDSPCH - DISPATCHER 00052000
  53. * DMKPTRUL - TO UNLOCK A PAGE IN STORAGE 00053000
  54. * DMKPTRFT - RELEASE A REAL STORAGE FRAME 00054000
  55. * 00055000
  56. * TABLES/WORKAREAS - 00056000
  57. * ECBLOK 00057000
  58. * BALRSAVE 00058000
  59. * VMABLOK 00059000
  60. * SHRTABLE 00060000
  61. * VMBLOK 00061000
  62. * PAGTABLE 00062000
  63. * SEGTABLE 00063000
  64. * SWPTABLE 00064000
  65. * SWTHSAVE 00065000
  66. * TEMPSAVE 00066000
  67. * DMKSNTBL 00067000
  68. * DMKPTRSC 00068000
  69. * DMKPTRRC 00069000
  70. * DMKDSPNP 00070000
  71. * 00071000
  72. * REGISTER USAGE - 00072000
  73. * GPR0 - PREFIX STORAGE AREA 00073000
  74. * GPR5 - ADDRESS OF SWPTABLE 00074000
  75. * GPR6 - ADDRESS OF PAGCORE 00075000
  76. * GPR7 - ADDRESS OF CORTABLE 00076000
  77. * GPR8 - ADDRESS OF SEGTABLE 00077000
  78. * GPR9 - ADDRESS OF VMABLOK 00078000
  79. * GPR10- ADDRESS OF SHRTABLE 00079000
  80. * GPR11- ADDRESS OF VMBLOK 00080000
  81. * GPR12- BASE REGISTER FOR THIS MODULE 00081000
  82. * GPR13- ADDRESS OF STANDARD SAVE AREA 00082000
  83. * GPR14- LINKAGE REGISTER 00083000
  84. * GPR15- LINKAGE REGISTER 00084000
  85. * 00085000
  86. * NOTES - 00086000
  87. * NONE 00087000
  88. * 00088000
  89. * ABEND CODES - 00089000
  90. * VMA008 - VMPAGES TO GO NEGATIVE 00090000
  91. * 00091000
  92. * OPERATION - 00092000
  93. * DMKVMASH CHECKS ALL SHARED PAGES ASSOCIATED WITH SHARED NAMED 00093000
  94. * SYSTEMS AND DETERMINES IF THEY HAVE BEEN CHANGED. IF NONE 00094000
  95. * WERE CHANGED RETURN IS MADE BACK TO THE CALLER WITH THE 00095000
  96. * CONDITION CODE = 0. OTHERWISE THE CONDITION CODE IS MADE 00096000
  97. * NON-ZERO AND GPR-2 CONTAINS THE REAL ADDRESS OF THE LAST 00097000
  98. * SHARED PAGE TAHT WAS CHANGED. 00098000
  99. * 00099000
  100. * 00100000
  101. * 00101000
  102. * DMKVMASW IS CALLED BY THE LOCK MANAGER WHENEVER A VIRTUAL 00102000
  103. * MACHINE BLOCK LOCK IS OBTAINED FOR A VIRTUAL MACHINE WHO 00103000
  104. * IS RUNNING ONE OR MORE SHARED NAMED SYSTEMS AND WAS LAST 00104000
  105. * SERVICED ON THE OPPOSITE PROCESSOR. ALL SHARED PAGE TABLE 00105000
  106. * POINTERS WILL BE SWITCHED TO THE CURRENT PROCESSOR AND THE 00106000
  107. * VMBLOK WILL BE UPDATED TO REFLECT SERVICING WAS LAST 00107000
  108. * PERFORMED ON THIS PROCESSOR. 00108000
  109. *. 00109000
  110. EJECT 00110000
  111. COPY OPTIONS @V304735 00111000
  112. COPY LOCAL @V304735 00112000
  113. DMKVMA CSECT @V304735 00113000
  114. ENTRY DMKVMACT @V304735 00114000
  115. ENTRY DMKVMAS1,DMKVMAS2 @VM03171 00115000
  116. ENTRY DMKVMASH @V304735 00116000
  117. ENTRY DMKVMASW @V407511 00117000
  118. EXTRN DMKPTRSC @V304735 00118000
  119. EXTRN DMKPTRRC @V408246 00119000
  120. EXTRN DMKDSPNP @V304735 00120000
  121. EXTRN DMKCVTBH @V304735 00121000
  122. EXTRN DMKCFMBK @V304735 00122000
  123. EXTRN DMKSTKCP @V304735 00123000
  124. EXTRN DMKERMSG @V304735 00124000
  125. EXTRN DMKSNTBL,DMKPTRUL,DMKPTRFT @V60BC11 00125000
  126. EXTRN DMKPTRPW @VA08037 00126000
  127. AIF (NOT &AP).LOKSY4 00127000
  128. EXTRN DMKSTKMP,DMKLOKSY @V60BC11 00128000
  129. .LOKSY4 ANOP 00129000
  130. SPACE 00130000
  131. USING PSA,R0 @V304735 00131000
  132. USING SWPTABLE,R5 @V304735 00132000
  133. USING PAGCORE,R6 @V304735 00133000
  134. USING CORTABLE,R7 @V304735 00134000
  135. USING SEGTABLE,R8 @V304735 00135000
  136. USING VMABLOK,R9 @V304735 00136000
  137. USING SHRTABLE,R10 @V304735 00137000
  138. USING VMBLOK,R11 @V304735 00138000
  139. USING DMKVMA,R12 @V304735 00139000
  140. USING SAVEAREA,R13 @V304735 00140000
  141. SPACE 2 00141000
  142. EJECT 00142000
  143. EJECT 00143000
  144. *. 00144000
  145. ********************************************************************** 00145000
  146. * 00146000
  147. * CP ASSIST INSTRUCTION SHAREDPAGE - SCAN FOR A 00147000
  148. * CHANGED SHARED PAGE. 00148000
  149. * 00149000
  150. * OPERANDS: 00150000
  151. * 1 = ADDRESS OF VMBLOK 00151000
  152. * 2 = NOT USED 00152000
  153. * 00153000
  154. * REGISTER INPUT: 00154000
  155. * R14 = EXIT ADDRESS 00155000
  156. * 00156000
  157. * SYSTEM DATA AREAS REFERENCED: 00157000
  158. * SHRTABLE, VMABLOK, VMBLOK, PAGE TABLE(S) 00158000
  159. * 00159000
  160. * EXITS: 00160000
  161. * 1. ADDRESS IN R14 (NORMAL COMPLETION) 00161000
  162. * REGISTER OUTPUT: NONE CHANGED BY THIS 00162000
  163. * INSTRUCTION. 00163000
  164. * 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL) 00164000
  165. * NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT 00165000
  166. * TO A NOOP. 00166000
  167. * 00167000
  168. ********************************************************************** 00168000
  169. *. 00169000
  170. SPACE 1 00170000
  171. DMKVMASH DS 0H %VA07223 00171000
  172. DC X'E613',S(0(R11),0(0)) %VA07223 00172000
  173. STM R0,R15,BALRSAVE SAVE ALL CALLER'S REGISTERS %VA07223 00173000
  174. USING DMKVMASH,R15 TEMPORARY ADDRESSABILITY %V3M4038 00174000
  175. L R12,=A(DMKVMA) BACK TO STANDARD ADDRESSABILITY %V3M4038 00175000
  176. DROP R15 ... %V3M4038 00176000
  177. USING DMKVMA,R12 ... %V3M4038 00177000
  178. * NOTE - ECPS:VM/370 DOES NOT 00178000
  179. * MAINTAIN TEMPR0 00179000
  180. SLR R0,R0 ZIP REG0 %V60BC11 00180000
  181. ST R0,TEMPR0 ZERO FLAG WORD %V60BC11 00181000
  182. L R9,VMASSIST GET POINTER TO VMABLOK %V3M4038 00182000
  183. LTR R9,R9 THERE SHOULD BE ONE THERE %V3M4038 00183000
  184. BZ TSTCC1 NO, ONLY RUNNING UNPROTECTED SEGS%V60BC11 00184000
  185. LA R1,1 INCREMENT %V60BC11 00185000
  186. AL R1,DMKVMACT ENTRY COUNT %V60BC11 00186000
  187. ST R1,DMKVMACT SAVE UPDATED COUNTER %V60BC11 00187000
  188. PROCSHR L R10,VMASHRBK GET ADDRESS OF (SHRTABLE) %V3M4038 00188000
  189. L R3,SHRSEGCT NO OF SHARED SEGMENTS TO PROCESS %V3M4038 00189000
  190. BCTR R3,0 DECREMENT FOR INDEXING %V407511 00190000
  191. NXTSEG DS 0H %V408246 00191000
  192. SLR R8,R8 ZIP REG %V407511 00192000
  193. IC R8,SHRSEGNM(R3) GET SEGMENT NUMBER %V407511 00193000
  194. SLL R8,2 MULTIPLY BY 4 FOR INDEXING %V407511 00194000
  195. AL R8,VMSEG OBTAIN PROPER STE ADDR %V407511 00195000
  196. TM SEGPAGE+3,SEGINV SEGMENT INVALID %V4M0172 00196000
  197. BO NXTSEG1 YES, SKIP SCANNING %V4M0172 00197000
  198. SLR R4,R4 CLEAR REGISTER FOR PAGE COUNT %VMI0028 00198000
  199. IC R4,SEGPLEN NO. OF PAGES IN THIS SEGMENT %VMI0028 00199000
  200. SRL R4,4 DROP UNWANTED BITS %VMI0028 00200000
  201. LA R4,ONE(,R4) PLUS ONE FOR BCT LOOP %VMI0028 00201000
  202. L R6,SEGPAGE GET PTO ADDRESS %V407511 00202000
  203. CNOP 0,8 ALIGN %V408246 00203000
  204. PAGEISK TM PAGCORE+1,PAGINVAL IS PAGE IN STORAGE %V3M4038 00204000
  205. BO INVAL NO - GET NEXT PAGE ENTRY %V3M4038 00205000
  206. LH R2,PAGCORE PICK UP REAL PAGE NUMBER %V3M4038 00206000
  207. SLL R2,8 FORM A FULL PAGE ADDRESS %V3M4038 00207000
  208. N R2,XPAGNUM NOW DROP THE DISPLACEMENT %V3M4038 00208000
  209. ISK R0,R2 TAKE A LOOK AT THE KEY %V3M4038 00209000
  210. SLL R0,8 POSITION KEY %V408246 00210000
  211. LA R2,HALFPAGE(,R2) GET ADDR. OF 2ND PART OF PAGE %V3M4038 00211000
  212. ISK R0,R2 TAKE A LOOK AT THIS HALF %V3M4038 00212000
  213. N R0,CHGBITS CLEAR ALL BUT CHANGE BITS %V408211 00213000
  214. BNZ PROTVIOL IF SO - USER BECOMES NON-SHARED %V3M4038 00214000
  215. INVAL LA R6,PAGCORE+2 GET NEXT PAGE TABLE ENTRY ADDR. %V3M4038 00215000
  216. BCT R4,PAGEISK IF MORE PAGES, PROCESS ALL %VMI0028 00216000
  217. NXTSEG1 DS 0H %V4M0172 00217000
  218. S R3,F1 DECREMENT SEGMENT COUNT %V407511 00218000
  219. BC 8+2,NXTSEG CONTINUE UNTIL ALL PROCESSED %V4M0243 00219000
  220. MVI TEMPR0+1,HEX00 RESET ERROR FLAG %V407511 00220000
  221. NXTVMA DS 0H %V407511 00221000
  222. L R9,VMAFPNT RUNNING WITH MORE SHARED SEGS. %V3M4038 00222000
  223. LTR R9,R9 IF NON-ZERO HE IS. %V3M4038 00223000
  224. BNZ PROCSHR CHECK OUT ALL SHARED PAGES %V3M4038 00224000
  225. TM TEMPR0,HEXFF ANY CHANGED PAGES FOUND %V407511 00225000
  226. BZ TSTCC NO, EXIT %V407511 00226000
  227. OI APSTAT2,CPPTLBR INDICATE PTLB NEEDED @V407511 00227000
  228. SENDMSG DS 0H @V60BC11 00228000
  229. TM VMRSTAT,VMLOGOFF IS USER LOGGING OFF? @VMI0015 00229000
  230. BO TSTCC YES - DON'T SEND ERROR MSG IF SO @VMI0015 00230000
  231. L R2,BALR2 GET ADDRESS OF CHANGED PAGE @V60BC11 00231000
  232. L R3,TEMPR0 SAVE FLAG WORD @V60BC11 00232000
  233. L R6,TEMPR6 RETRIEVE ADDRESS OF PG TBL ENTRY @VMI0022 00233000
  234. SLR R5,R5 ZERO REGISTER FOR INSERT @VMI0037 00234000
  235. IC R5,TEMPR5+3 RESTORE SWPVPAGE VALUE FOR @VMI0037 00235000
  236. * ERR451 ROUTINE 00236000
  237. LA R0,CPEXSIZE GET SIZE OF A CPEXBLOK @V60BC11 00237000
  238. CALL DMKFREE GET A CPEXBLOK @V60BC11 00238000
  239. USING CPEXBLOK,R1 @V60BC11 00239000
  240. SPACE 1 00239010
  241. ST R2,TEMPR2 SAVE REAL STORAGE ADDRESS @VA09775 00239020
  242. LR R15,R5 GET VIRTUAL PAGE NUMBER @VA09775 00239030
  243. SLL R15,1 ADJUSTED FOR 2 BYTE ENTRIES @VA09775 00239040
  244. SLR R6,R15 FIND BEGNG ADDRESS OF PAGE TABLE @VA09775 00239050
  245. SRL R15,1 BACK TO VIRTUAL PAGE NUMBER @VA09775 00239060
  246. L R8,VMSEG ADDRESS OF BEGINING OF SEGTABLE @VA09775 00239070
  247. SLR R14,R14 USED FOR VIRTUAL SEGMENT NUMBER @VA09775 00239080
  248. BUMPSEG DS 0H @VA09775 00239090
  249. CLM R6,B'0110',SEGTABLE+1 PARTIAL MATCH? @VA09775 00239100
  250. BNE BMPSEGA NO @VA09775 00239110
  251. MVC TEMPR0(1),SEGTABLE+3 1ST BYTE @VA09775 00239120
  252. NI TEMPR0,X'FF'-SEGINV REMOVE POSSIBLE INVALID @VA09775 00239130
  253. CLM R6,B'0001',TEMPR0 FULL MATCH? @VA09775 00239140
  254. BE FNDSEG YES @VA09775 00239150
  255. BMPSEGA DS 0H @VA09775 00239160
  256. LA R8,SEGTABLE+4 NEXT SEGMENT TABLE ENTRY @VA09775 00239170
  257. LA R14,ONE(,R14) ADD ONE TO VIRTUAL SEGMENT NUMBER@VA09775 00239180
  258. B BUMPSEG LOOK AT NEXT SEGMENT @VA09775 00239190
  259. FNDSEG SLL R14,4 MAKE ROOM FOR PAGE NUMBER @VA09775 00239200
  260. OR R14,R15 OR'D IN VIRTUAL PAGE NUMBER @VA09775 00239210
  261. SLL R14,12 ADD IN PROPER DISPLACEMENT @VA09775 00239220
  262. NC TEMPR2,F4095 REMOVE REAL PAGE ADDRESS @VA09775 00239230
  263. O R14,TEMPR2 OR'D IN SECOND HALF OF REAL PAGE @VA09775 00239240
  264. LR R2,R14 VIRTUAL ADDRESS TO REG 2 @VA09775 00239250
  265. SL R6,F8 BACK-UP TO PAGE TABLE HEADER @VA09775 00239260
  266. L R6,0(,R6) GET POINTER TO SHRTABLE @VA09775 00239270
  267. LM R7,R8,SHRNAME-SHRTABLE(R6) NAME OF SHRD SYS @VA09775 00239280
  268. STM R0,R15,CPEXREGS STORE REGISTERS @V60BC11 00240000
  269. LA R15,ERR456 GET ADDR OF MESSAGE ROUTINE @VA09775 00241000
  270. ST R15,CPEXADD SETUP RETURN ADDRESS @V60BC11 00242000
  271. CALL DMKSTKCP STACK THE CPEXBLOK @V60BC11 00243000
  272. DROP R1 @V60BC11 00244000
  273. ST R3,TEMPR0 RESTORE FLAG BYTES @V60BC11 00245000
  274. TSTCC DS 0H %V407511 00246000
  275. TM TEMPR0+2,HEXFF DID WE OBTAIN SYSTEM LOCK %V60BC11 00247000
  276. BZ TSTCC1 NO, DON'T HAVE TO RELEASE IT %V60BC11 00248000
  277. LOCK RELEASE,TYPE=SYS YES, RELEASE SYSTEM LOCK @V60BC11 00249000
  278. TSTCC1 DS 0H @V60BC11 00250000
  279. CLI TEMPR0,HEX00 SET CONDITION CODE %V407511 00251000
  280. LM R0,R15,BALRSAVE RESTORE CALLER'S REGISTERS %V3M4038 00252000
  281. BR R14 RETURN TO CALLER %V3M4038 00253000
  282. SPACE 2 00254000
  283. PROTVIOL DS 0H @V408246 00255000
  284. C R0,F256 WAS 1ST 2K CHANGED? @V408246 00256000
  285. BL *+8 NO, LEAVE R2 AS IS @V408246 00257000
  286. S R2,H2048 YES, BACK-UP R2 TO FULL PAGE ADDR@V60BC11 00258000
  287. ST R2,BALR2 PASS ADDRESS BACK TO CALLER @V408246 00259000
  288. ST R6,TEMPR6 SAVE ASSOCIATED PG TBL ENTRY @. @VMI0022 00260000
  289. AIF (NOT &AP).APCHK5 00261000
  290. TM APSTAT1,APUOPER RUNNING IN ATTACHED MODE @V60BC11 00262000
  291. BZ PROTVIO2 NO, GO RETURN FRAME @V60BC11 00263000
  292. L R15,=A(DMKLOKSY+2) GET ADDR OF SYSTEM LOCK @V60BC11 00264000
  293. CLC LPUADDR,0(R15) DO WE HOLD THE SYSTEM LOCK @V60BC11 00265000
  294. BE PROTVIO2 YES, GO RETURN FRAME @V60BC11 00266000
  295. LOCK OBTAIN,TYPE=SYS,SPIN=NO,SAVE TRY FOR LOCK @V60BC11 00267000
  296. BNZ PROTVIOA COULDN'T GET IT, TIE FRAME OFF @V60BC11 00268000
  297. MVI TEMPR0+2,HEXFF INDICATE WE GOT SYSTEM LOCK @V60BC11 00269000
  298. B PROTVIO2 GO RELEASE THE FRAME @V60BC11 00270000
  299. PROTVIOA DS 0H @V60BC11 00271000
  300. LH R2,PAGCORE LOAD PAGTABLE ENTRY @V407511 00272000
  301. N R2,RESMASK CLEAR UNWANTED BITS @V407511 00273000
  302. AL R2,ACORETBL GET ADDRESS OF CORTABLE ENTRY @V407511 00274000
  303. OI CORFLAG-CORTABLE(R2),CORFLUSH+CORFREE FLAG @V407511 00275000
  304. * CORTABLE ENTRY AS BEING ON THE @V407511 00276000
  305. * FLUSH AND FREE LISTS @V407511 00277000
  306. OI PAGCORE+1,PAGINVAL FLAG PTE AS INVALID @V407511 00278000
  307. NI CORFLAG-CORTABLE(R2),X'FF'-(CORIOLCK+CORCFLCK) @VA08903 00279000
  308. * CLEAR LOCK BITS 00280000
  309. L R2,CORSWPNT-CORTABLE(,R2) LOAD SWAP TABLE PTR @VMV0006 00280100
  310. OI SWPFLAG-SWPFLAG(R2),SWPTRANS SET IN-TRANSIT BIT @V4M0013 00285000
  311. MVC TEMPR5+3(1),SWPVPAGE-SWPFLAG(R2) SAVE THE @VA09776 00285100
  312. * VIRTUAL PAGE NUMBER FOR USE BY ERR451 ERROR MSG ROUTINE 00285200
  313. LA R0,CPEXSIZE GET SIZE OF A CPEXBLOK @V60BC11 00286000
  314. CALL DMKFREE GET A CPEXBLOK @V60BC11 00287000
  315. USING CPEXBLOK,R1 @V60BC11 00288000
  316. STM R0,R15,CPEXREGS SAVE REGISTERS @V60BC11 00289000
  317. LA R15,RETFRAME GET ADDR OF RETURN FRAME RTN @V60BC11 00290000
  318. ST R15,CPEXADD SETUP TO RETURN @V60BC11 00291000
  319. CALL DMKSTKMP STACK THE CPEXBLOK @V60BC11 00292000
  320. DROP R1 @V60BC11 00293000
  321. AGO .APCHK6 00294000
  322. .APCHK5 ANOP 00295000
  323. B PROTVIO2 GO RETURN FRAME @V60BC11 00296000
  324. .APCHK6 ANOP 00297000
  325. PROTVIO1 DS 0H @V60BC11 00298000
  326. MVI TEMPR0+1,HEXFF INDICATE CHANGED PAGES THIS SYS @V407511 00299000
  327. MVI TEMPR0,HEXFF INDICATE CHANGED PAGE FOUND @V407511 00300000
  328. * DURING SCAN OF ALL SHARED PAGEES @V407511 00301000
  329. B INVAL GO CHECK NEXT PAGE @V407511 00302000
  330. PROTVIO2 DS 0H @V60BC11 00303000
  331. BAL R13,RETFRAM1 GO RETURN THE FRAME @V60BC11 00304000
  332. B PROTVIO1 CONTINUE SCANNING @V60BC11 00305000
  333. EJECT 00306000
  334. * 00307000
  335. * THIS ROUTINE IS ONLY CALLED WHEN WE ARE RUNNING IN ATTACHED 00308000
  336. * PROCESSOR MODE. IT IS CALLED BY THE LOCK MANAGER WHENEVER A 00309000
  337. * VMBLOK IS LOCKED AND IT WAS LAST SERVICED ON THE OPPOSITE 00310000
  338. * PROCESSOR. ITS FUNCTION IS TO SWITCH THE USERS SHARED PAGE 00311000
  339. * TABLE POINTERS. THIS IS ACCOMPLISHED BY DETERMINING WHICH 00312000
  340. * PROCESSOR WE ARE CURRENTLY EXECUTING ON AND THE ADDING OR 00313000
  341. * SUBTRACTING OF PAGBMP (X'C0') TO THE USERS CURRENT PAGE TABLE 00314000
  342. * POINTER (STE). IF WE ARE SWITCHING FROM THE MAIN PROCESSOR 00315000
  343. * TO THE ATTACHED PROCESSOR, WE ADD PAGBMP TO THE CURRENT POINTER. 00316000
  344. * IF WE ARE SWITCHING FROM THE ATTACHED PROCESSOR TO THE MAIN 00317000
  345. * PROCESSOR, WE SUBTRACT PAGBMP FROM THE CURRENT POINTER. 00318000
  346. * 00319000
  347. DMKVMASW DS 0H @V407511 00320000
  348. USING DMKVMASW,R15 ESTABLISH ADDRESSABILITY @V407511 00321000
  349. STM R0,R15,SWTHSAVE SAVE CALLERS REGS @V407511 00322000
  350. L R12,=A(DMKVMA) MODULE BASE FOR ADDRESSABILITY @VMI0015 00323000
  351. DROP R15 @VMI0015 00324000
  352. USING DMKVMA,R12 @VMI0015 00325000
  353. L R9,VMASSIST GET START OF VMABLOK QUEUE @V407511 00326000
  354. LTR R9,R9 ANY VMABLOK'S @V407511 00327000
  355. BZ SWEXIT NO, RUNNING UNPROTECTED, EXIT @V60BC11 00328000
  356. SWLOOP DS 0H @V407511 00329000
  357. L R10,VMASHRBK GET ADDR OF SHRTABLE @V407511 00330000
  358. L R2,SHRSEGCT GET NUMBER OF SHARED SEGS @V407511 00331000
  359. BCTR R2,0 MINUS 1 FOR INDEXING @V407511 00332000
  360. SWSEG DS 0H @V407511 00333000
  361. SLR R8,R8 ZERO WORK REG @V407511 00334000
  362. IC R8,SHRSEGNM(R2) GET SHARED SEG NUMBER @V407511 00335000
  363. SLL R8,2 TIMES 4 FOR INDEXING @V407511 00336000
  364. A R8,VMSEG GET ADDR OF SEGTABLE ENTRY @V407511 00337000
  365. L R5,SEGPAGE GET ADDR OF PAGE TABLE @V407511 00338000
  366. N R5,CLCNTINV CLEAR INVALID BIT @V407511 00339000
  367. TM SEGPAGE+3,SEGINV IS SEG INVALID FOR VM @V407511 00340000
  368. BO SWCPU YES, DON'T DECREMENT @V407511 00341000
  369. S R5,F16 BACKUP TO PAGTABLE HEADER @V407511 00342000
  370. L R6,PAGACT-PAGTABLE(,R5) GET ACTIVE COUNT @V407511 00343000
  371. SWCSLP1 DS 0H @V407511 00344000
  372. LR R0,R6 LOAD REG FOR UPDATE @V407511 00345000
  373. S R0,BUMPLOW DECREMENT PAGACT COUNT @V407511 00346000
  374. CS R6,R0,PAGACT-PAGTABLE(R5) UPDATE PAGE TABLE @V407511 00347000
  375. BNE SWCSLP1 UPDATE FAILED, TRY AGAIN @V407511 00348000
  376. A R5,F16 RESTORE PAGTABLE ORIGIN @V407511 00349000
  377. SWCPU DS 0H @V407511 00350000
  378. TM APSTAT1,PROCIPL SWITCHING TO MAIN (IPL) PROC? @V60B7AA 00351100
  379. BZ SWAPU NO, SWITCHING TO ATTACHED @V407511 00352000
  380. S R5,SWLENGTH SUBTRACT FOR MAIN PROCESSOR @V407511 00353000
  381. * PAGE TABLE @V407511 00354000
  382. B SWSTORE CONTINUE PROCESSING @V407511 00355000
  383. SWAPU DS 0H SWITCH TO ATTACHED PROC @V407511 00356000
  384. A R5,SWLENGTH ADD FOR ATTACHED @V407511 00357000
  385. * PROCESSOR PAGE TABLE @V407511 00358000
  386. SWSTORE DS 0H 00359000
  387. STCM R5,7,SEGPAGE+1 STORE NEW PAGE TABLE @V407511 00360000
  388. * ADDR & SAVE SEGPLEN @V405711 00361000
  389. S R5,F16 BACKUP TO PAGE HEADER @V407511 00362000
  390. L R6,PAGACT-PAGTABLE(,R5) GET ACTIVE COUNT @V407511 00363000
  391. SWCSLP2 DS 0H @V407511 00364000
  392. LR R0,R6 LOAD REG FOR UPDATE @V407511 00365000
  393. A R0,BUMPLOW INCREMENT PAGACT COUNT @V407511 00366000
  394. CS R6,R0,PAGACT-PAGTABLE(R5) UPDATE ACTIVE COUNT @V407511 00367000
  395. BNE SWCSLP2 FAILED, TRY AGAIN @V407511 00368000
  396. S R2,F1 DECREMENT SHRSEGCT @V407511 00369000
  397. BNM SWSEG NO, CONTINUE PROCESSING @V407511 00370000
  398. SWBUMP DS 0H 00371000
  399. ICM R9,15,VMAFPNT GET ADDR NEXT VMABLOK @V407511 00372000
  400. BNZ SWLOOP BRANCH - MORE VMABLOKS @V407511 00373000
  401. SWEXIT DS 0H @V60BC11 00374000
  402. MVC VMSHRPRC(1),LPUADDR+1 SET NEW PROCESSOR ID @V407511 00375000
  403. LM R0,R15,SWTHSAVE RESTORE CALLERS REGS @V407511 00376000
  404. BR R14 RETURN TO CALLER @V407511 00377000
  405. EJECT 00378000
  406. * 00379000
  407. * THIS SUBROUTINE WILL RECEIVE CONTROL VIA THE 00380000
  408. * UNSTACKING OF A CPEXBLOK. ITS FUNCTION IS TO 00381000
  409. * BUILD AN EMSGBLOK. IT WILL THEN CALL DMKERMSG 00382000
  410. * TO SEND ERROR MESSAGE (DMKVMA456W CP ENTERED; 00383000
  411. * 'NAME' - SHARED PAGE 'HEXLOC' ALTERED) TO THE 00384000
  412. * VIOLATOR. IT WILL THEN CALL DMKCFMBK TO PLACE 00385000
  413. * THE VIOLATOR IN CONSOLE FUNCTION MODE. (THIS 00386000
  414. * ROUTINE WAS FORMERLY LABELED ERR451.) 00387000
  415. * 00388000
  416. SPACE 3 00389000
  417. ERR456 EQU * @VA09775 00390000
  418. USING EMSGBLOK,R5 @VM03107 00418000
  419. LA R0,EMSGSIZE GET AREA @VM03107 00419000
  420. CALL DMKFREE FROM FREE STORAGE @VM03107 00420000
  421. LR R5,R1 SAVE ADDRESS OF BUFFER IN REG5 @VM03107 00421000
  422. XC EMSGAREA,EMSGAREA CLEAR MESSAGE AREA @VM03107 00422000
  423. STM R7,R8,EMSGNAME MOVE IN SHARED SYS NAME @VA09775 00423000
  424. LR R1,R2 SET UP TARGET ADDRESS @VM03107 00424000
  425. CALL DMKCVTBH MAKE IT PRINTABLE @VM03107 00425000
  426. STH R0,EMSGADD1 SAVE FIRST PART @VA04402 00426000
  427. ST R1,EMSGADD2 SAVE LAST HALF @VM03107 00427000
  428. LA R0,EMSGLEN LENGTH OF DATA @VM03107 00428000
  429. DROP R5 @VM03107 00429000
  430. USING SWPTABLE,R5 @VM03107 00430000
  431. ICM R0,B'1110',=C'VMA' MODULE IDENT. @V304735 00431000
  432. LR R1,R5 ADDRESS OF MESSAGE @V304735 00432000
  433. LA R2,EMSG456 LOAD ERROR CODE @VM03107 00433000
  434. ICM R2,B'1100',=X'80E6' FILL IN REST OF INFORMATION @V304735 00434000
  435. CALL DMKERMSG CALL THE MESSAGE WRITTER @V304735 00435000
  436. LA R0,EMSGSIZE SIZE OF EMSGBLOK IN DW'S @VM03107 00436000
  437. CALL DMKFRET @V304735 00437000
  438. CALL DMKCFMBK PUT USER IN CONSOLE FUNCTION MODE@V304735 00438000
  439. GOTO DMKDSPCH GOTO DISPATCHER @V304735 00439000
  440. EJECT 00440000
  441. * 00441000
  442. * THIS SUBROUTINE WILL RECEIVE CONTROL VIA THE UNSTACKING 00442000
  443. * OF A CPEXBLOK AT LABEL RETFRAME, OR VIA BAL LOGIC FROM 00443000
  444. * DMKVMASH AT THE LABEL RETFRAM1. ITS FUNCTION IS TO 00444000
  445. * RETURN A CHANGED SHARED PAGE FRAME TO FREE STORAGE. 00445000
  446. * 00446000
  447. SPACE 1 00447000
  448. RETFRAME DS 0H @V60BC11 00448000
  449. SLR R13,R13 INDICATE ENTERED VIA CPEXBLOK @V60BC11 00449000
  450. RETFRAM1 DS 0H @V60BC11 00450000
  451. LH R7,PAGCORE LOAD PAGTABLE ENTRY @V60BC11 00451000
  452. N R7,RESMASK CLEAR UNWANTED BITS @V60BC11 00452000
  453. LR R2,R7 PTE TO R2 @V60BC11 00453000
  454. AL R7,ACORETBL GET ADDR OF CORTABLE ENTRY @V60BC11 00454000
  455. SLL R2,8 FORM REAL ADDRESS @V60BC11 00455000
  456. LTR R13,R13 ENTERED VIA CPEXBLOK @V60BC11 00456000
  457. L R14,CORSWPNT GET ADDRESS OF SWPTABLE ENTRY @VMI0037 00457000
  458. BNZ RETFRAM2 NO, SKIP RESETTING BITS @V60BC11 00458000
  459. NI CORFLAG,X'FF'-CORFREE-CORFLUSH RESET FLAG BITS @V60BC11 00459000
  460. NI SWPFLAG-SWPFLAG(R14),X'FF'-SWPTRANS RESET FLAG @V60BC11 00460000
  461. RETFRAM2 DS 0H @V60BC11 00461000
  462. MVC TEMPR5+3(1),SWPVPAGE-SWPFLAG(R14) SAVE THE @VMI0037 00462000
  463. * VIRTUAL PAGE NUMBER FOR USE BY 00463000
  464. * ERR451 ERROR MSG. ROUTINE 00464000
  465. TM CORFLAG,CORCFLCK FRAME BEEN LOCKED @V60BC11 00465000
  466. BZ RETFRAM3 NO, CHECK FOR RESERVED @V60BC11 00466000
  467. L R0,BALR4 SAVE SINCE DMKPTR CLOBBERS @VA13543 00466300
  468. * BALR4. @VA13543 00466600
  469. CALL DMKPTRUL UNLOCK THE FRAME @V60BC11 00467000
  470. ST R0,BALR4 RESTORE FOR USE BY DMKDSP @VA13543 00467500
  471. NI CORFLAG,X'FF'-CORCFLCK RESET LOCK BIT @V60BC11 00468000
  472. TM CORFLAG,CORRSV FRAME BEEN RESERVED @V60BC11 00469000
  473. BZ RETFRAM4 NO, GO UPDATE AVAILABLE COUNT @V60BC11 00470000
  474. RETFRAM3 DS 0H @V60BC11 00471000
  475. TM CORFLAG,CORRSV FRAME BEEN RESERVED @V60BC11 00472000
  476. BZ RETFRAM5 NO, GO RETURN FRAME @V60BC11 00473000
  477. L R14,=A(DMKPTRRC) GET ADDR RESERVED COUNTER @V60BC11 00474000
  478. L R15,0(,R14) LOAD RESERVED COUNTER @V60BC11 00475000
  479. BCTR R15,0 DECREMENT COUNTER @V60BC11 00476000
  480. ST R15,0(,R14) STORE UPDATED COUNTER @V60BC11 00477000
  481. RETFRAM4 DS 0H @V60BC11 00478000
  482. L R14,=A(DMKDSPNP) GET ADDR AVAILABLE FRAME CNTR @V60BC11 00479000
  483. LA R15,1 LOAD INCREMENT VALUE @V60BC11 00480000
  484. A R15,0(,R14) INCREMENT AVAILABLE COUNTER @V60BC11 00481000
  485. ST R15,0(,R14) STORE UPDATED COUNTER @V60BC11 00482000
  486. RETFRAM5 DS 0H @V60BC11 00483000
  487. L R14,=A(DMKPTRSC) GET ADDR SHARED PAGE COUNTER @V60BC11 00484000
  488. L R15,0(,R14) LOAD SHARED PAGE COUNTER @V60BC11 00485000
  489. BCTR R15,0 DECREMENT SHARED PAGE COUNTER @V60BC11 00486000
  490. ST R15,0(,R14) STORE UPDATED COUNTER @V60BC11 00487000
  491. MVC PAGCORE,F8+2 INVALIDATE THE PTE @V60BC11 00488000
  492. SLR R15,R15 ZIP REG @V60BC11 00489000
  493. ST R15,CORPGPNT ZERO POINTER TO PTE @V60BC11 00490000
  494. L R15,CORVM GET FRAME OWNER'S VMBLOK PTR @VMI0037 00491000
  495. LH R14,VMPAGES-VMBLOK(,R15) GET COUNT OF PAGES @VMI0037 00492000
  496. BCTR R14,0 DECREMENT PAGE COUNT BY ONE @VMI0037 00493000
  497. BM ERROR8 ABEND IF VMPAGES TO GO NEGATIVE @VMI0037 00494000
  498. STH R14,VMPAGES-VMBLOK(,R15) SAVE UPDATED PAGE COUNT@VMI0037 00495000
  499. LM R0,R2,BALR0 SAVE DMKVMASH'S CALLER'S REGS @VMI0037 00496000
  500. * (DMKPTRFT USES BALR0-BALR2) 00497000
  501. CALL DMKPTRFT RETURN FRAME TO FREE STORAGE @V60BC11 00498000
  502. STM R0,R2,BALR0 RESTORE DMKVMASH'S CALLER'S REGS @VMI0037 00499000
  503. LTR R13,R13 CPEXBLOK ENTRY @V60BC11 00500000
  504. BNZR R13 NO, CONTINUE SCANNING @V60BC11 00501000
  505. GOTO DMKDSPCH YES, EXIT TO THE DISPATCHER @V60BC11 00502000
  506. EJECT 00503000
  507. DMKVMACT DC F'0' NUMBER TIMES DMKVMASH ENTERED @V304735 00504000
  508. DMKVMAS1 DC 2A(DMKVMAS1) ANCHOR FOR SHARED SYSTEMS @VM03171 00505000
  509. * (SHRTABLE) 00506000
  510. DMKVMAS2 DC 2A(DMKVMAS2) ANCHOR FOR NAMED SYSTEMS @VM03171 00507000
  511. * (SHRTABLE) 00508000
  512. ERROR8 ABEND 8 VMPAGES TO GO NEGATIVE @VA07224 00509000
  513. SPACE 1 00510000
  514. SPACE 2 00511000
  515. EJECT 00512000
  516. RESMASK DC A(X'FFF0') MASK FOR PAGE RESIDENT @VM03107 00513000
  517. CLCNTINV DC X'00FFFFFC' CLEAR COUNT & UNWANTED BITS @V60BC11 00514000
  518. BUMPLOW DC X'00010000' INCREMENT/DECREMENT FOR PAGACT @V407511 00515000
  519. CHGBITS DC X'00000202' CHANGE BIT MASK @V407511 00516000
  520. H2048 DC F'2048' 2K @V60BC11 00517000
  521. SWLENGTH DC F'192' LENGTH OF SHARED PAGE & @V407511 00518000
  522. * SWAP TABLES @V407511 00519000
  523. HALFPAGE EQU 2048 VALUE FOR ONE HALF PAGE @VM03107 00520000
  524. * 00521000
  525. ONE EQU 1 VALUE OF 1 @VM03107 00522000
  526. THREE EQU 3 VALUE OF 3 @VM03107 00523000
  527. * 00524000
  528. INDEX1 EQU 1 VALUE OF 1 USED FOR INDEXING @VM03107 00525000
  529. * 00526000
  530. ROUND8 EQU 8 VALUE USED FOR ROUNDING TO DW @VM03107 00527000
  531. * 00528000
  532. MAXSEG EQU 16 NUMBER OF PAGE PER SEGMENT @VM03107 00529000
  533. * 00530000
  534. HEX00 EQU X'00' VALUE OF X'00' @VM03107 00531000
  535. HEXFF EQU X'FF' VALUE OF X'FF' @VM03107 00532000
  536. * 00533000
  537. EMSG181 EQU 181 ERROR MESSAGE NUMBER 181 @VM03107 00534000
  538. EMSG456 EQU 456 ERROR MESSAGE NUMBER 456 @VM03107 00535000
  539. SPACE 1 00536000
  540. * BITS DEFINED FOR SAVEWRK1 FLAG BYTE @V407511 00537000
  541. * 00538000
  542. INVLSEG EQU X'80' STE ENTRY WAS ORIGINALLY INVALID @V407511 00539000
  543. PTOBTAIN EQU X'40' PAGE & SWAP TABLES OBTAINED @V407511 00540000
  544. PREVCHNG EQU X'20' PREVIOUSLY FOUND A CHANGED PAGE @V407511 00541000
  545. CALLCF EQU X'10' ENTER AT DMKVMACF @V407511 00542000
  546. PASSONE EQU X'08' LOOP CONTROLLER IN FRETSHR @V407511 00543000
  547. * 00544000
  548. FULLPAGE EQU X'C0'/8 NUMBER OF DOUBLEWORDS IN 16 ENTRY@V407511 00545000
  549. * PAGE AND SWAP TABLE SET @V407511 00546000
  550. PAGE2314 EQU 32 NUMBER OF PAGES PER CYLINDER @V407511 00547000
  551. * (2314/2319) @V407511 00548000
  552. PAGE3330 EQU 57 NUMBER OF PAGE PER CYLINDER @V407511 00549000
  553. * (3330) @V407511 00550000
  554. PAGE3350 EQU 120 NUMBER OF PAGES PER CYLINDER @V407511 00551000
  555. * (3350) @V407511 00552000
  556. PAGE2305 EQU 24 NUMBER OF PAGES PER CYLINDER @V407511 00553000
  557. * (2305/3340) @V407511 00554000
  558. SPACE 3 00555000
  559. LTORG * @VM03107 00556000
  560. SPACE 3 00557000
  561. EMSGBLOK DSECT @VM03107 00558000
  562. * DSECT FOR ERROR MESSAGE PARMS 00559000
  563. EMSGAREA DS 0CL16 MESSAGE AREA @VM03107 00560000
  564. EMSGNAME DS CL8 AREA FOR NAME OF SHARED SYSTEM @VM03107 00561000
  565. DS 2X FILLER @VM03107 00562000
  566. EMSGADD1 DS CL2 FIRST PART OF ADDRESS @VM03107 00563000
  567. EMSGADD2 DS CL4 LAST PART OF ADDRESS @VM03107 00564000
  568. EMSGLEN EQU *-EMSGBLOK LENGTH OF BLOK IN BYTES @VM03107 00565000
  569. EMSGSIZE EQU (*-EMSGBLOK)/8 SIZE OF EMSGBLOK IN DW'S @VM03107 00566000
  570. SPACE 2 00567000
  571. COPY EQU @V304735 00568000
  572. COPY SAVE @V304735 00569000
  573. COPY VMBLOK @V304735 00570000
  574. COPY RBLOKS @VA04554 00571000
  575. COPY DEVTYPES @VA04554 00572000
  576. COPY ALLOC @VA04554 00573000
  577. COPY CORE @V304735 00574000
  578. COPY SHRTABLE @V304735 00575000
  579. COPY SYSTBL @V407511 00576000
  580. PSA @V304735 00577000
  581. END 00578000
ibm/vm370-lib/cp/dmkvma.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator