User Tools

Site Tools


ibm:vm370-lib:cp:dmkbld.assemble_src

DMKBLD Source

References

Source Listing

DMKBLD.ASSEMBLE.txt
  1. BLD TITLE 'DMKBLD (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF SYSIN 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKBLD 00006000
  7. * 00007000
  8. * CONTENTS - 00008000
  9. * 00009000
  10. * DMKBLDRT - BUILD REAL SEGMENT, PAGE, AND SWAP TABLES 00010000
  11. * DMKBLDRL - RELEASE REAL SEGMENT, PAGE, AND SWAP TABLES 00011000
  12. * DMKBLDVM - BUILD A NEW VMBLOK 00012000
  13. * DMKBLDEC - BUILD AND INITIALIZE AN ECBLOK 00013000
  14. *. 00014000
  15. EJECT 00015000
  16. COPY OPTIONS 00016000
  17. COPY LOCAL 00017000
  18. SPACE 2 00018000
  19. DMKBLD CSECT 00019000
  20. SPACE 00020000
  21. USING PSA,R0 00021000
  22. USING VMBLOK,R11 00022000
  23. USING SAVEAREA,R13 00023000
  24. SPACE 00024000
  25. EXTRN DMKSCNRD 00025000
  26. EXTRN DMKCVTBH 00026000
  27. EXTRN DMKCVTAB @V408246 00026500
  28. EXTRN DMKSCHCP,DMKTMRCK @V2B4320 00027000
  29. EXTRN DMKRIORN LIST OF 3705 DEVICES IN DMKRIO @V200820 00028000
  30. AIF (NOT &VIRREAL).VIRT0 00029000
  31. EXTRN DMKSLC,DMKQCNWT 00030000
  32. EXTRN DMKERMSG 00031000
  33. .VIRT0 ANOP 00032000
  34. EJECT 00033000
  35. *. 00034000
  36. * SUBROUTINE NAME - 00035000
  37. * 00036000
  38. * DMKBLDRT - BUILD REAL SEGMENT, PAGE, AND SWAP TABLES 00037000
  39. * 00038000
  40. * FUNCTION - 00039000
  41. * 00040000
  42. * TO CREATE AND INITIALIZE SEGMENT, PAGE, AND SWAP TABLES, 00041000
  43. * AS A FUNCTION OF VIRTUAL CORE SIZE, AS PART OF THE 00042000
  44. * PROCESS OF CREATING A USER'S VIRTUAL MACHINE. 00043000
  45. * 00044000
  46. * ATTRIBUTES - 00045000
  47. * 00046000
  48. * REENTRANT, PAGEABLE, CALLED VIA SVC 00047000
  49. * 00048000
  50. * ENTRY POINT - 00049000
  51. * 00050000
  52. * DMKBLDRT 00051000
  53. * 00052000
  54. * ENTRY CONDITIONS - 00053000
  55. * 00054000
  56. * GPR 1 = BEGINING AND ENDING ADDRESS TO BUILD TABLES. 00055000
  57. * BYTES 0-1 = BEGINING ADDRESS 00056000
  58. * FIRST 4 BITS = 0,NEXT 8 BITS = SEGMENT, NEXT 4 = PAGE 00057000
  59. * BYTES 2-3 = ENDING ADDRESS 00058000
  60. * FIRST 4 BITS = 0,NEXT 8 BITS = SEGMENT, NEXT 4 = PAGE 00059000
  61. * 00060000
  62. * PARMS ARE PASSED IN R2+3: 00061000
  63. * 00062000
  64. * PAGTONLY = BUILD ONE PAGE/SWAP TABLE & RETURN IN R1 00062100
  65. * NEWPAGES = BUILD A NEW PAGE/SWAP TABLE 00063000
  66. * NEWSEGS = BUILD SET OF NEW SEGMENT TABLES 00064000
  67. * KEEPSEGS = RETAIN THE INFORMATION IN THE OLD SEGMENT TABLE 00065000
  68. * OLDVMSEG = VMSEG POINTER IN VMBLOK IS VALID 00066000
  69. * 00067000
  70. * 00068000
  71. * GPR 11 = ADDRESS OF USER'S VMBLOK 00069000
  72. * GPR 12 = ADDRESS OF DMKBLDRT 00070000
  73. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00071000
  74. * 00072000
  75. * EXIT CONDITIONS - 00073000
  76. * 00074000
  77. * SEGMENT, PAGE, AND SWAP TABLES HAVE BEEN CREATED AND FILLED IN 00075000
  78. * 00076000
  79. * CALLS TO OTHER ROUTINES - 00077000
  80. * 00078000
  81. * DMKFREE - TO OBTAIN FREE STORAGE FOR TABLES TO BE CREATED 00079000
  82. * DMKERMSG - TO OUTPUT ERROR MESSAGES 00080000
  83. * DMKBLDRL - TO RELEASE THE OLD SEGMENT TABLE 00081000
  84. * 00082000
  85. * EXTERNAL REFERENCES - 00083000
  86. * 00084000
  87. * AVMREAL - POINTER TO VMBLOK OF VIRT=REAL USER 00085000
  88. * DMKSLC - ADDRESS OF UPPER BOUNDARY OF VIRT=REAL AREA 00086000
  89. * 00087000
  90. * TABLES / WORK AREAS - 00088000
  91. * 00089000
  92. * SEGMENT TABLE 00090000
  93. * PAGE TABLE 00091000
  94. * SWAP TABLE 00092000
  95. EJECT 00093000
  96. * REGISTER USAGE - 00094000
  97. * 00095000
  98. * GPR 6 = ADDRESS OF SEGMENT TABLE 00096000
  99. * GPR 7 = ADDRESS OF PAGE TABLE 00097000
  100. * GPR 8 = ADDRESS OF SWAP TABLE 00098000
  101. * GPR 11 = ADDRESS OF USER'S VMBLOK 00099000
  102. * GPR 12 = BASE REGISTER 00100000
  103. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00101000
  104. * 00102000
  105. * GPRS 0-5, 9-10, AND 14-15 ARE WORK REGISTERS. 00103000
  106. * 00104000
  107. * NOTES - 00105000
  108. * 00106000
  109. * OPERATION - 00107000
  110. * A) IF PAGE-SWAP SKIP SPECIFIED, GO TO STEP C 00108000
  111. * B) ADJUST R5 WITH NEW TOTAL NUMBER OF PAGES TO BUILD 00109000
  112. * PAGE AND SWAP TABLES FOR 00110000
  113. * C) IF SKIP SEGTABLE PROCESS SPECIFIED, GO TO 1.7 00111000
  114. * D) IF THERE IS AN OLD VMSEG POINTER, TEST IF NUMBER OF 00112000
  115. * ENTRIES IS THE SAME AS DESIRED IN THE NEW SEGTABLE. 00113000
  116. * IF NOT THE SAME, OR IF NO OLD VMSEG, GO TO STEP 1 00114000
  117. * E) IF OLD SEGTABLE ENTRIES ARE TO BE SAVED, GO TO STEP 1.7 00115000
  118. * F) CALL BLDRL TO RELEASE ALL PAG-SWAP TABLES, BUT NOT 00116000
  119. * OLD SEGTABLE, AND GO TO STEP 1.7 00117000
  120. * 00118000
  121. * 00119000
  122. * 1. DMKFREE IS CALLED FOR 15 DOUBLE WORDS OF FREE STORAGE FOR 00120000
  123. * THE SEGMENT TABLE. THE ADDRESS OBTAINED FROM DMKFREE IS 00121000
  124. * ROUNDED (AS NEEDED) TO ALIGN THE SEGMENT TABLE ON A 64-BYTE 00122000
  125. * 1.10 IF DATA IN OLD SEGTABLE IS NOT TO BE SAVED, GO TO 1.14 00123000
  126. * 1.11 MOVE DATA FROM OLD SEGTABLE TO NEW 00124000
  127. * 1.12 IF NEW SEGTABLE > OLD, GO TO STEP 1.15 00125000
  128. * 1.13 SET R1,R2 FOR FRETS OF OLD PAG-SWP TABLES NOT MOVED 00126000
  129. * AND FRET OLD SEGTABLE. GO TO STEP 1.2 00127000
  130. * 1.14 SET R1,R2 FOR FRET OF ALL PAGE,SWAP,SEG TABLES. GO TO 1.2 00128000
  131. * 1.15 SET R1,R2 FOR FRET OF OLD SEGTABLE ONLY 00129000
  132. * 00130000
  133. * 1.2 CALL BLDRL TO DO FRETS 00131000
  134. * 00132000
  135. * 1.3 STORE NEW VMSEG, VMSEGDSP 00133000
  136. * 00134000
  137. * 00135000
  138. * 1.60 IF OLD SEGTABLE ENTRIES NOT SAVED, GO TO 1.62 00136000
  139. * 1.61 COMPUTE START OF INVALID STE'S 00137000
  140. * 1.62 INVALIDATE STE'S 00138000
  141. * 00139000
  142. * 1.70 IF VIRT=REAL GO TO STEP 2 00140000
  143. * 1.71 IF SKIP PAG-SWP BUILD SPECIFIED, RETURN TO CALLER 00141000
  144. * 1.72 ADJUST R6 FOR START OF SEGMENTS TO BUILD 00142000
  145. * PAGE AND SWAP TABLES FOR 00143000
  146. * 00144000
  147. * 1.5 IF VM ASSIST IS AVAILABLE, ADDRESS OF SEGMENT TABLE 00145000
  148. * IS PUT INTO MICBLOK. 00146000
  149. * 00147000
  150. * 2. THEN, DEPENDING UPON THE CORE SIZE, THE APPROPRIATE SIZE 00148000
  151. * OF PAGE TABLE AND SWAP TABLE FOR A SEGMENT ARE COMPUTED AND 00149000
  152. * OBTAINED FROM FREE STORAGE, AND THEN INITIALIZED TO THEIR 00150000
  153. * DEFAULT VALUES. 00151000
  154. * 00152000
  155. * 2.1 IF PAGETONLY IS SPECIFIED, RETURN TO CALLER. 00152100
  156. * 3. STEP 2 IS THEN REPEATED, AS NECESSARY, UNTIL SUFFICIENT 00153000
  157. * PAGE TABLES AND SWAP TABLES HAVE BEEN OBTAINED AND SET UP 00154000
  158. * TO HANDLE THE VIRTUAL MACHINE SIZE SPECIFIED. 00155000
  159. * 00156000
  160. * 4. BEFORE RETURNING TO THE CALLER; THE VMPSTAT FIELD IS 00157000
  161. * CHECKED FOR VIRT=REAL OPTION. IF THIS USER DOES NOT HAVE 00158000
  162. * VIRT=REAL PRIVILEGE, EXIT TO THE CALLER. OTHERWISE 00159000
  163. * DETERMINE IF THE VIRT=REAL AREA CAN BE GIVEN TO THIS USER, 00160000
  164. * 00161000
  165. * A. CALCULATE THE SIZE OF VIRT=REAL AREA; A(DMKSLC-4096), 00162000
  166. * IS THE SIZE IN BYTES OF THE AREA. 00163000
  167. * 00164000
  168. * B. VIRTUAL MACHINE SIZE MUST BE LESS THAN VIRT=REAL SIZE 00165000
  169. * 00166000
  170. * C. THE POINTER IN PSA WORD <AVMREAL> MUST BE ZERO (0) 00167000
  171. * INDICATING THE VIRT=REAL AREA IS FREE AND NOT IN USE 00168000
  172. * 00169000
  173. * IF THE ABOVE CONDITIONS ARE MET, THE PAGE AND SEGMENT 00170000
  174. * TABLE ENTRIES ARE CHANGED TO REFLECT THAT THE PAGES ARE IN 00171000
  175. * REAL STORAGE. THE AVMREAL WORD IN PSA IS ALTERED TO POINT 00172000
  176. * TO THIS USER'S VMBLOK. EXIT IS NOW MADE TO THE CALLER. 00173000
  177. * 00174000
  178. * 00175000
  179. * 00176000
  180. * RESPONSES - 00177000
  181. * 00178000
  182. * STORAGE IS VIRTUAL=REAL 00179000
  183. * 00180000
  184. * 00181000
  185. * ERROR MESSAGES - 00182000
  186. * 00183000
  187. * DMKBLD200E VIRT=REAL AREA NOT AVAILABLE; IN USE BY <SYSTEM> 00184000
  188. * <USERID> 00185000
  189. * 00186000
  190. * DMKBLD201E VIRT=REAL AREA NOT AVAILABLE; DAMAGED PAGES 00187000
  191. * 00188000
  192. * DMKBLD202E VIRT=REAL AREA NOT AVAILABLE; INSUFFICIENT STORAGE 00189000
  193. * 00190000
  194. *. 00191000
  195. EJECT 00192000
  196. DC CL8'DMKBLD' MODULE IDENTIFIER. 00193000
  197. SPACE 00194000
  198. DMKBLDRT RELOC BUILD REAL SEGMENT, PAGE, AND SWAP TABLES 00195000
  199. LR R5,R1 SAVE THE CORE SIZE 00196000
  200. N R5,F4095 CLEAR OUT FIRST ADDRESS @V304635 00197000
  201. LA R5,1(,R5) INCREASE IT BY 1 FULL PAGE. @V304635 00198000
  202. LR R0,R5 SAVE TOTAL NUMBER OF PAGES @V304635 00199000
  203. TM SAVER2+3,NEWPAGES NEW PAGE TABLES REQUESTED @V304635 00200000
  204. BZ BLDRT01 NO, THEN NO NEED TO ADJ R5 @V304635 00201000
  205. SRL R1,16 ADDRESS OF FIRST SEG. TO BUILD. @V304635 00202000
  206. SR R5,R1 GET NEW TOTAL NUMBER OF PAGES @V304635 00203000
  207. * TO BUILD PAG-SWP TABLES FOR 00204000
  208. BLDRT01 EQU * @V304635 00205000
  209. TM SAVER2+3,PAGTONLY JUST WANT TABLE? @V408246 00205100
  210. BO SEGSKIP YES, SKIP SEGMENT TABLE @V408246 00205300
  211. * PROCESSING 00205500
  212. SR R1,R1 CLEAR R1 00206000
  213. SRDL R0,8 SHIFT TO OBTAIN NUMBER OF SEGMENT TABLES 00207000
  214. LTR R1,R1 DID IT COME OUT EVEN ? 00208000
  215. BZ BLDR01 YES, THIS TIME. 00209000
  216. AL R0,F1 ADD 1 TO R0 IF NOT. 00210000
  217. BLDR01 LR R3,R0 REMEMBER NUMBER OF SEGMENT TABLES IN R3 00211000
  218. SR R4,R4 ZIP REG @V304635 00212000
  219. TM SAVER2+3,OLDVMSEG IS THERE AN OLD SEGTABLE @V304635 00213000
  220. BZ NOSEG01 NO, THEN LEAVE R4=0 @V304635 00214000
  221. IC R4,VMSEG SET R4=NUMBER SEGTABLES IN @V304635 00215000
  222. LA R4,1(,R4) OLD VMSEG(ORIGIN 1) @V304635 00216000
  223. NOSEG01 EQU * @VA06171 00216600
  224. CR R4,R3 IS OLD HIGHER THAN NEW @VA06171 00217200
  225. BL BLDRT02 NO WE NEED FREE STORAGE @VA06171 00217800
  226. * FOR THE NEW SEGTABLE 00219000
  227. TM SAVER2+3,KEEPSEGS KEEP OLD SEG. TABLE DATA ? @V304635 00220000
  228. BO SEGSKIP YES, THE OLD SEGTABLE WILL DO @V304635 00221000
  229. SR R1,R1 CLEAR @V408246 00222100
  230. IC R1,VMSEG SEGMENT COUNT/16 -1 @V408246 00222300
  231. LA R1,1(,R1) SEGMENT COUNT/16 @V408246 00222500
  232. SLL R1,4+4 SEGMENT COUNT * 16 @V408246 00222700
  233. BCTR R1,0 -1 @V408246 00222900
  234. CALL DMKBLDRL,PARM=DELPAGES RELEASE PAGE/SWAP TABLES @V304635 00224000
  235. B SEGSKIP FINISHED WITH SEGTABLE PROCESSING@V304635 00225000
  236. EJECT 00226000
  237. BLDRT02 EQU * HERE TO GET FREE STORAGE FOR @V304635 00227000
  238. CLI SAVER2+3,KEEPSEGS+OLDVMSEG COMPRESS SEGTABLE? @V408246 00228100
  239. BE COMPPAGE YES, GET STORAGE FOR NEW SEG @V408246 00228200
  240. CLI SAVER2+3,NEWPAGES+KEEPSEGS+OLDVMSEG+DELPAGES @V408246 00228300
  241. BE COMPPAGE COMPRESS SEGMENT TABLE @V408246 00228400
  242. CR R4,R3 WILL NEW PAGES FIT INTO OLD? @V408246 00228500
  243. BNL SEGSKIP YES, LEAVE OLD AS IS @V408246 00228600
  244. COMPPAGE DS 0H BUILD NEW TABLES @V408246 00228700
  245. SLL R0,3 8 DBL-WORDS NEEDED FOR EACH 64-BYTE SEG. 00240000
  246. AL R0,F7 PLUS 7 TO ENSURE 64-BYTE ALIGNMENT 00241000
  247. CALL DMKFREE GET SPACE FOR REAL SEGMENT TABLES 00242000
  248. LA R6,63(,R1) ROUND UP TO NEXT 64-BYTE BOUNDARY 00243000
  249. N R6,=A(X'FFFFC0') (IN R6) 00244000
  250. ST R1,SAVEWRK1 SAVE REAL BEGINING OF NEW @V304635 00245000
  251. TM SAVER2+3,OLDVMSEG OLD TABLES? @V408246 00246010
  252. BZ NOSOLD NOPE, BYPASS QUIESE @V408246 00246030
  253. BLDRQ DS 0H MAKE SURE OLD TABLE IS QUITE @V408246 00246050
  254. L R8,VMSEG START OF OLD SEG TABLE @V408246 00246070
  255. LA R8,0(,R8) @V408246 00246090
  256. LR R9,R4 LENGTH OF OLD / 64 @V408246 00246110
  257. SLL R9,6 LENGTH OF OLD TABLE @V408246 00246130
  258. LA R9,0(R9,R8) END OF OLD TABLE @V408246 00246150
  259. SR R1,R1 VIRTUAL ADDRESS OF SEGMENT @V408246 00246170
  260. USING SEGTABLE,R8 @V408246 00246190
  261. SEGQCHK DS 0H @V408246 00246210
  262. TM SEGPAGE+3,SEGENQ+SEGINV SEGMENT AVAILABLE? @V408246 00246230
  263. BNO SEGCHKL YES, CHECK NEXT @V408246 00246250
  264. ICM R0,B'0110',SEGPAGE+1 (ONLY IF POINTER = 0) @V408246 00246270
  265. BNZ SEGCHKL NOT ZERO @V408246 00246290
  266. TRANS 2,1,OPT=(DEFER) WAIT FOR AWHILE @V408246 00246310
  267. B BLDRQ START ALL OVER AGAIN @V408246 00246330
  268. SEGCHKL DS 0H @V408246 00246350
  269. A R1,=A(X'10000') NEXT VIRTUAL SEGMENT ADDRESS @V408246 00246370
  270. LA R8,4(,R8) NEXT STE ADDRESS @V408246 00246390
  271. CR R8,R9 LAST ENTRY PROCESSESED? @V408246 00246410
  272. BL SEGQCHK NO @VA08670 00246430
  273. DROP R8 @V408246 00246450
  274. NOSOLD DS 0H @V408246 00246470
  275. TM SAVER2+3,KEEPSEGS KEEP OLD SEG. TABLE DATA ? @V304635 00247000
  276. BZ NOMOVE NO, THEN SKIP THE MVCL @V304635 00248000
  277. LR R7,R3 GET NUM SEGTABLES IN NEW VMSEG @V304635 00249000
  278. SLL R7,6 TIMES 64 BYTES PER TABLE @V304635 00250000
  279. LR R9,R4 GET NUM SEGTABLES IN OLD VMSEG @V304635 00251000
  280. SLL R9,6 TIMES 64 @V304635 00252000
  281. L R8,VMSEG GET OLD VMSEG ORIGIN @V304635 00253000
  282. LA R8,0(,R8) WITHOUT LENGTH @V304635 00254000
  283. LR R2,R6 SAVE STARTING ADDRESS OF VMSEG @V304635 00255000
  284. MVCL R6,R8 MOVE OLD SEGTABLE DATA TO NEW @V304635 00256000
  285. LR R6,R2 RESTORE STARTING ADDRESS OF VMSEG@V304635 00257000
  286. EJECT 00257100
  287. NOMOVE TM SAVER2+3,OLDVMSEG IS THERE AN OLD SEGTABLE. @V304635 00258000
  288. BZ SKIPFRET NO, THEN DON'T FRET ABOUT IT @V304635 00259000
  289. CALBLDRL CALL DMKBLDRL,PARM=DELSEGS FRET OLD SEGMENT TABLE @V304635 00260000
  290. EJECT 00260100
  291. SKIPFRET ST R6,VMSEG STORE NEW SEGTABLE POINTER @V304635 00261000
  292. LR R15,R3 GET NUMBER OF SEGMENT TABLES LESS 1 00262000
  293. BCTR R15,0 ... 00263000
  294. STC R15,VMSEG AND STORE IN LEFTMOST BYTE OF VMSEG. 00264000
  295. LR R15,R6 GET SEGTABLE POINTER @V304635 00265000
  296. S R15,SAVEWRK1 SUB REAL BEG OF SEGTABLE @V304635 00266000
  297. STH R15,VMSEGDSP SAVE IN VMBLOK @V304635 00267000
  298. L R15,VMMICRO GET ADDRESS OF MICBLOK @V201537 00268000
  299. LA R15,0(R15) CLEAR ANY FLAG BITS @V201537 00269000
  300. LTR R15,R15 IS THERE A MICBLOK? @V201537 00270000
  301. BE NOMIC1 BRANCH IF NOT @V201537 00271000
  302. USING MICBLOK,R15 @V201537 00272000
  303. MVC MICRSEG,VMSEG SAVE SEG TABLE PTR FOR MICRO ASST@V201537 00273000
  304. DROP R15 @V201537 00274000
  305. NOMIC1 EQU * @V201537 00275000
  306. TM SAVER2+3,KEEPSEGS IF WE DIDN'T SAVE OLD SEG @V304635 00276000
  307. BZ ALLNG TABLE ENTRIES, THEN ALL OF NEW @V304635 00277000
  308. * SEGTABLE ENTRIES ARE INVALID 00278000
  309. SR R3,R4 SUB NUM OLD SEGTABLES FROM NEW @V304635 00279000
  310. BNP SEGSKIP IF NEG, THEN THERE ARE NO @V304635 00280000
  311. * INVALID STE, SINCE WE DECREASED 00281000
  312. * THE SEGTABLE AND SAVED DATA 00282000
  313. SLL R4,6 GET DSP FROM TOP OF SEGTABLE TO @V304635 00283000
  314. * START INVALIDATING 00284000
  315. AR R6,R4 BY MUL NUM SEGTABLES BY 64. AND @V304635 00285000
  316. * ADD TO SEGTABLE ORIGIN IN R6 00286000
  317. ALLNG LA R15,1 INVALID STE INDICATOR @V304635 00287000
  318. BLDRSEG ST R15,0(R6) STORE INVALID STE @V304635 00288000
  319. MVC 4(60,R6),0(R6) DO ALL SEGTABLE @V304635 00289000
  320. LA R6,64(,R6) POINT TO NXT SEGTABLE @V304635 00290000
  321. BCT R3,BLDRSEG DO NXT SEGTABLE(IF ANY) @V304635 00291000
  322. EJECT 00292000
  323. SEGSKIP EQU * FINISHED WITH SEGTABLE PROCESSING@V304635 00293000
  324. TM SAVER2+3,NEWPAGES REQUESTING PAGE TABLES ? @VM03017 00294000
  325. BZ RETBLDRT IF NOT - RETURN TO CALLER @VM03017 00295000
  326. SLR R3,R3 CLEAR @VM03017 00296000
  327. L R6,VMSEG GET SEGTABLE ORIGIN @VM03017 00297000
  328. LH R3,SAVER1 GET SEG TO BEG BUILD @V304635 00298000
  329. SRL R3,4 DROP THE PAGE NUMBER @V304635 00299000
  330. SLL R3,2 GET DSP INTO VMSEG TO START @V304635 00300000
  331. DOPAGSWP LA R6,0(R3,R6) POINT TO 1ST STE TO BUILD FOR @V304635 00301000
  332. L R3,=XL4'00010000' TO ADD 1 TO PAGE NUMBER IN SWPTABLE 00302000
  333. LA R10,8 TO ADD 8 TO A REGISTER LATER 00304000
  334. TM SAVER2+3,PAGTONLY RETURN IN R2 REQUESTED? @V408246 00305100
  335. BZ BLDRPAGE NO, THEN CONTINUE @V408246 00305200
  336. LA R6,SAVEWRK9 YES, POINT TO DUMMY STE @V408246 00305300
  337. LA R4,16 LOAD R4 WITH CONSTANT 16 @V408246 00305400
  338. CR R5,R4 INSURE BUILD IS FOR 1 SEG @V408246 00305500
  339. BNH ISINVAL ELSE QUIT @V408246 00305600
  340. ABEND 3 @V408246 00305700
  341. USING SEGTABLE,R6 00306000
  342. * INITIALIZE PAGE & SWAP TABLES FOR ONE SEGMENT OF 16 PAGES (OR LESS) 00307000
  343. BLDRPAGE LA R4,16 LOAD THE CONSTANT 16 00308000
  344. ICM R15,B'0011',SEGPAGE+1 IS THERE A PAGTABLE PTR @V408246 00309100
  345. BNZ NOTINVAL YES THERE IS ONE @V408246 00309200
  346. TM SEGPAGE+3,SEGINV IF NOT, MAKE SURE IT'S @VA08431 00309305
  347. BO ISINVAL NOT ON DASD BUT INVALID @VA08431 00309405
  348. CLI SAVER2+3,OLDVMSEG+KEEPSEGS+NEWPAGES+NEWSEGS ?? @V408246 00309500
  349. BNE BLD4 NO, DIE @V408246 00309600
  350. TM SEGPAGE+3,SEGENQ IS SEGMENT ENQUEUED? @V408246 00309700
  351. BZ SKIPBLD NO, BYPASS @V408246 00309800
  352. ABEND 4 @V408246 00309900
  353. NOTINVAL DS 0H @V408246 00310000
  354. CLI SAVER2+3,OLDVMSEG+KEEPSEGS+NEWPAGES+NEWSEGS @V304635 00311000
  355. BE SKIPBLD ONLY BUILD THOSE INVALID STE @V304635 00312000
  356. TM SAVER2+3,OLDVMSEG+KEEPSEGS+NEWPAGES BUILD ALL ? @V304635 00313000
  357. BNO BLDTHEM YES @V304635 00314000
  358. LH R1,SAVER1+2 GET ENDING ADDRESS TO BUILD FOR @V304635 00315000
  359. SLL R1,12 ADD TO IT THE DISPLACEMENT @V304635 00316000
  360. CL R1,VMSTOR ADDRESS < VM STORAGE SIZE @V304635 00317000
  361. BH BLDTHEM NO - BUILD PAGE TABLES @V304635 00318000
  362. CLR R5,R4 IS THERE 16 PAGES IN SEGMENT @V304635 00319000
  363. BL FORCE16 NO - FORCE IT TO 16 @V304635 00320000
  364. CLI SEGPLEN,X'F0' ARE THERE PRESENTLY 16 PAGES IN @V304635 00321000
  365. * SEG 00322000
  366. BE SKIPBLD YES - THEN NO NEED TO BUILD @V304635 00323000
  367. * ANYTHING 00324000
  368. FORCE16 LA R5,16 BUILD 16 PAGE TABLE ENTRIES @V304635 00325000
  369. BLDTHEM L R2,VMSEG GET SEGTABLE ORIGIN @V304635 00326000
  370. LA R2,0(,R2) STRIP LENGTH @V304635 00327000
  371. LR R1,R6 GET CURRENT STE ADDRESS @V304635 00328000
  372. SR R1,R2 DSP INTO SEGTABLE @V304635 00329000
  373. SRL R1,2 DIVIDED BY 4=SEGMENT NUMBER @V304635 00330000
  374. LR R2,R1 SAVE SEG NUM IN LOW BYTE R2 @V304635 00331000
  375. SLL R1,20 MOVE BEG SEG NUM TO FRET. @V304635 00332000
  376. SLL R2,4 ENDING SEGMENT NUMBER @V304635 00333000
  377. OR R1,R2 FORM BEGINING/ENDING ADDRESSES @V304635 00334000
  378. CALL DMKBLDRL,PARM=DELPAGES RELEASE OLD PAGE TABLES @V304635 00335000
  379. * THEN BUILD NEW DUMMY TABLE 00336000
  380. ISINVAL EQU * @V304635 00337000
  381. CR R5,R4 AT LEAST 16 PAGES ? 00338000
  382. BNL BLDRP16 BRANCH IF YES 00339000
  383. LR R4,R5 NUMBER OF PAGES LEFT INTO R4 IF < 16 00340000
  384. BLDRP16 BCTR R4,0 SUBTRACT 1 00341000
  385. LA R0,PAGBMP LOAD SIZE OF PAGE AND SWPTABLES @V407511 00342100
  386. SRL R0,3 OBTAIN NUMBER OF DOUBLEWORDS @V407511 00342200
  387. * PAGTABLE+SWAPTABLE 00342600
  388. CALL DMKFREE PAGE AND SWAP TABLE @V408246 00343100
  389. LR R7,R1 PAGETABLE HEADER @V408246 00343600
  390. USING PAGTABLE,R7 @V408246 00344100
  391. STCK PAGSTMP TIME-STAMP PAGE TABLE @V408246 00344600
  392. BC 8+4,*+10 IGNORE ANY TIMER ERROR HERE @V408246 00345100
  393. XC PAGSTMP,PAGSTMP ZERO IN CASE OF ERROR @V408246 00345600
  394. XC PAGACT(12),PAGACT CLEAR HEADER @V408246 00346100
  395. MVC PAGCORE,F8+2 INVALIDATE 1ST ENTRY @V408246 00346600
  396. MVC PAGCORE+2(15*2),PAGCORE INVALIDATE REST OF THE @V408246 00347100
  397. * ENTRIES 00347600
  398. LA R2,PAGCORE LOAD ADR OF PTE @V408246 00348100
  399. ST R2,SEGPAGE STORE IN SEGTABLE @V408246 00348600
  400. LR R15,R4 GET NUMBER OF PAGES @V408246 00349100
  401. SLL R15,4 SHIFT FOR HARDWARE @V408246 00349600
  402. STC R15,SEGPLEN AND SAVE IN SEGTABLE @V408246 00350100
  403. OI SEGPAGE+3,SEGINV @V408246 00350600
  404. * SIGNALS NO PAGES IN CORE 00351100
  405. LA R8,PAGCORE+16*2 START OF SWAP TABLE HEADER @V408246 00351600
  406. USING SWPTABLE,R8 00356000
  407. ST R11,SWPVM STORE VMBLOK ADDRESS IN SWPTABLE HEADER 00357000
  408. ST R2,SWPPAG STORE PAGTABLE ADDRESS IN SWPTABLE HEADER 00358000
  409. LA R2,SWPFLAG LOAD 1ST SWPTABLE ENTRY ADDRESS 00359000
  410. ST R2,PAGSWP STORE SWPTABLE ADDRESS IN PAGTABLE HEADER 00360000
  411. LA R4,1(,R4) RELOAD NUMBER OF PAGES 00361000
  412. LA R1,SWPRECMP LOAD RECOMPUTE FLAG 00363000
  413. SLL R1,24 SHIFT TO HIGH ORDER BYTE 00364000
  414. SR R2,R2 LOAD ZERO FOR 2ND WORD OF SWPTABLE ENTRY 00365000
  415. BLDRINIT DS 0H @V408246 00366100
  416. STM R1,R2,SWPFLAG INITIALIZE SWPTABLE - ZEROES PAGE 00367000
  417. AR R1,R3 ADD 00010000 TO PAGE NUMBER IN SWPTABLE 00368000
  418. AR R8,R10 R8+8 - POINT TO NEXT SWPTABLE ENTRY 00370000
  419. BCT R4,BLDRINIT BRANCH IF MORE ENTRIES 00371000
  420. LA R4,1 INCREMENT @V408246 00371100
  421. L R14,PREFIXA GET PREFIX VALUE TO ADDRESS PSA @V4M0132 00371300
  422. * AT ABSOLUTE 0 @V4M0132 00371400
  423. AL R4,TTSEGCNT(R14) ADD INCR TO TOTAL SEGMENT CNT @V4M0132 00371500
  424. ST R4,TTSEGCNT(R14) STORE UPDATED SEGMENT COUNT @V4M0132 00371600
  425. SKIPBLD LA R6,SEGPAGE+4 POINT TO NXT STE @V304635 00372000
  426. S R5,F16 SUBTRACT 16 FROM NUMBER OF PAGES 00373000
  427. BP BLDRPAGE ITERATE THE PROCESS IF SOME PAGES LEFT. 00374000
  428. AIF (NOT &VIRREAL).VIRT1 00375000
  429. TM SAVER2+3,VRALOC ATTEMPT TO GIVE OUT V=R AREA @VM03144 00376000
  430. BZ RETBLDRT NOPE, DONE; BR. @VM03144 00377000
  431. TM VMPSTAT,VMREAL IS USER A VIRT=REAL USER 00378000
  432. BO VIRTREAL IF YES, TRY TO GIVE HIM THE AREA 00379000
  433. .VIRT1 ANOP 00380000
  434. RETBLDRT DS 0H @V408246 00380100
  435. TM SAVER2+3,PAGTONLY RETURN IN R2 REQUESTED? @V408246 00380300
  436. BZ RETBLD2 NOPE @V408246 00380500
  437. MVC SAVER2,SAVEWRK9 PASS BACK 'STE' IN REGISTER @V408246 00380700
  438. RETBLD2 DS 0H @V408246 00380900
  439. EXIT @V408246 00381100
  440. * 00382000
  441. DROP R6,R7,R8 00383000
  442. DOWNWEGO DS 0H @V408246 00383100
  443. GOTO DMKCVTAB @V408246 00383200
  444. EJECT 00383300
  445. AIF (NOT &VIRREAL).VIRT2 00384000
  446. VIRTREAL ICM R1,15,AVMREAL LOAD V=R VMBLOK POINTER @VM08649 00385000
  447. BM BLD201 BRANCH, IF AREA HAS DAMAGED PAGES 00386000
  448. BP BLD200 BRANCH, IF AREA ALREADY IN USE 00387000
  449. L R1,=A(DMKSLC-4096) GET SIZE OF VIRT=REAL AREA 00388000
  450. LTR R1,R1 CHECK IF V=R SYSGENED @VM08649 00389000
  451. BM BLD202 BRANCH, IF AREA NOT DEFINED FROM SYSGEN 00390000
  452. L R0,VMSIZE LOAD SIZE OF THIS VIRTUAL MACHINE 00391000
  453. CR R0,R1 IS VIRTUAL MACHINE > THEN VIRT=REAL AREA 00392000
  454. BH BLD202 IF YES, USER CAN'T HAVE IT 00393000
  455. SPACE 00394000
  456. USING SEGTABLE,R7 00395000
  457. USING PAGCORE,R8 @V408246 00396100
  458. USING SWPTABLE,R9 00397000
  459. USING CORTABLE,R10 00398000
  460. SPACE 00399000
  461. LA R4,16 PAGE NUMBERING TO START WITH 1 00400000
  462. LR R6,R0 SIZE OF THIS VIRTUAL MACHINE @VA01062 00401000
  463. SRL R6,12 TOTAL NO. OF PAGES REQUIRED @VA01062 00402000
  464. S R6,F1 LESS ONE FOR HIPAGE @VA01377 00403000
  465. L R7,VMSEG GET SEGMENT TABLE ADDRESS 00404000
  466. NI SEGPAGE+3,255-SEGINV CLEAR INVALID BIT @V408246 00404100
  467. L R8,SEGPAGE LOAD ADDRESS OF PAGE TABLE 00405000
  468. LA R8,0(,R8) CLEAR OUT NUMBER OF PAGES 00406000
  469. LA R9,PAGCORE+16*2+8 ADDRESS OF 1ST SWAPTABLE @V408246 00407100
  470. SR R5,R5 CLEAR REG 00410000
  471. IC R5,SEGPLEN NUMBER OF PAGES IN THIS SEGMENT 00411000
  472. SRL R5,4 SHIFT OUT UNWANTED BITS 00412000
  473. L R10,ACORETBL LOAD ADDRESS OF CORE TABLE 00413000
  474. LA R8,PAGCORE+2 SKIP ENTRY FOR PAGE 0 @V408246 00414100
  475. LA R9,SWPTABLE+8 SKIP SWAP ENTRY FOR PAGE 0 00415000
  476. LA R10,CORTABLE+16 SKIP CORE ENTRY FOR PAGE 0 00416000
  477. NXTENTRY DS 0H @V408246 00417100
  478. ST R11,CORFPNT STORE USER'S VMBLOK ADDRESS. @V408246 00417600
  479. L R0,F1 LOCK COUNT OF 1 TO 00419000
  480. ST R0,CORLCNT STORE IN CORE TABLE ENTRY 00420000
  481. ST R9,CORSWPNT STORE ADDRESS OF SWAP TABLE ENTRY 00421000
  482. ST R8,CORPGPNT STORE ADDRESS OF PAGE TABLE ENTRY 00422000
  483. MVI CORFLAG,CORCFLCK+CORIOLCK LOCK PAGE IN CORE @V408246 00423100
  484. STH R4,PAGCORE SOTRE REAL PAGE NUMBER @V408246 00423200
  485. BCTR R6,R0 KEEP COUNT OF PAGES ALLOCATED @VA01062 00425000
  486. LTR R6,R6 GOT 'EM ALL? @VA01062 00426000
  487. BZ HIPAGE ALL EXCEPT PAGE 0 @VA01062 00427000
  488. LA R8,PAGCORE+2 GET NEXT PAGE TABLE ENTRY ADDRESS@V408246 00428100
  489. LA R9,SWPTABLE+8 GET NEXT SWAP TABLE ENTRY 00429000
  490. LA R10,CORTABLE+16 GET NEXT CORE TABLE ENTRY 00430000
  491. LA R4,16(,R4) INCREMENT THE PAGE NUMBER 00431000
  492. BCT R5,NXTENTRY PROCESS ALL CORE TABLE ENTRIES FOR SEG. 00432000
  493. LA R7,SEGTABLE+4 POINT TO NEXT SEG. TABLE ADDR. 00433000
  494. NI SEGPAGE+3,255-SEGINV CLEAR INVALID BIT @V408246 00433100
  495. IC R5,SEGPLEN PICK UP NUM, PAGES IN THIS SEGMENT 00434000
  496. SRL R5,4 CLEAR OUT UNWANTED BITS 00435000
  497. A R5,F1 CORRECTION FOR BCT LOOP 00436000
  498. L R8,SEGPAGE LOAD ADDRESS OF THIS PAGE TABLE 00437000
  499. LA R8,0(,R8) CLEAR OUT PAGE NUMBER 00438000
  500. LR R9,R8 BACK UP THE ADDRESS OF THE PAGE 00439000
  501. S R9,F4 TABLE SO THAT THE SWAP TABLE 00440000
  502. L R9,0(,R9) ADDRESS CAN BE FOUND 00441000
  503. B NXTENTRY CONTINUE PROCESSING ALL ENTRIES 00442000
  504. SPACE 00443000
  505. HIPAGE L R1,=A(DMKSLC-4096) FIND PAGE 0 ADDRESS 00444000
  506. SRL R1,8 INDEX FOR PROPER CORE TABLE ENTRY 00445000
  507. L R7,VMSEG LOAD ADDRESS OF SEG. FOR PAGE 0 00446000
  508. L R8,SEGPAGE LOAD ADDRESS OF PAGE 0 00447000
  509. LA R8,0(,R8) CLEAR HIGH BYTE 00448000
  510. LR R9,R8 GET ADDRESS OF SWAP ENTRY FOR 00449000
  511. S R9,F4 PAGE 0. 00450000
  512. L R9,0(,R9) 00451000
  513. L R10,ACORETBL LOAD ADDRESS OF CORE TABLE AND 00452000
  514. LA R10,CORTABLE(R1) LOCATE TOP OF VIRT=REAL - 4096 00453000
  515. STH R1,PAGCORE STORE ADDRESS OF REAL PAGE 0 @V408246 00454100
  516. ST R11,CORFPNT STORE USER'S VMBLOK ADDRESS. @V408246 00454200
  517. L R0,F1 CONSTANT FOR LOCK COUNT 00457000
  518. ST R0,CORLCNT SET LOCK COUNT 00458000
  519. ST R9,CORSWPNT STORE SWAP ADDRESS OF PAGE 0 00459000
  520. ST R8,CORPGPNT STORE PAGE ADDRESS OF PAGE 0 00460000
  521. MVI CORFLAG,CORCFLCK+CORIOLCK LOCK PAGE IN CORE @V408246 00461100
  522. ST R11,AVMREAL THIS USER NOW OWNS THE VIRT=REAL AREA 00462000
  523. L R15,PREFIXB GET PREFIX ADDR OF OTHER PROC @V4M0132 00462100
  524. ST R11,AVMREAL(R15) MAINTAIN AVMREAL IN BOTH PSA'S @V4M0132 00462200
  525. SLR R0,R0 ZERO R-0 00463000
  526. STH R0,VMPAGES CLEAR NUMBER PAGES RESIDENT (PAGEABLE) 00464000
  527. STH R0,VMWSPROJ ZERO PROJECTED WORKING SET SIZE 00465000
  528. OI VMQLEVEL,VMAEX GIVE THIS USER ASSURED EXECUTION @VA08851 00465500
  529. MSG 'STORAGE IS VIRTUAL=REAL' 00467000
  530. CALL DMKQCNWT,PARM=NORET 00468000
  531. EXIT 00469000
  532. BLD200 LA R2,200 MESSAGE DMKBLD200 00470000
  533. DROP R11 00471000
  534. CL R1,F1 IS V=R AREA UNLOCKED? @V4M0167 00471100
  535. BNE *+8 NO, O.K. @V4M0167 00471200
  536. L R1,ASYSVM YES, SHOW SYSTEM AS V=R OWNER @V4M0167 00471300
  537. USING VMBLOK,R1 00472000
  538. MVC SAVEWRK2(8),VMUSER USERID 00473000
  539. DROP R1 00474000
  540. USING VMBLOK,R11 00475000
  541. LA R1,SAVEWRK2 ADDRESS OF THE DATA 00476000
  542. LA R0,8 LENGTH OF DATA 00477000
  543. B VARDATA SEND THE MESSAGE 00478000
  544. SPACE 00479000
  545. BLD201 LA R2,201 MESSAGE DMKBLD201 00480000
  546. B CALLERM SEND THE MESSAGE 00481000
  547. SPACE 00482000
  548. BLD202 LA R2,202 MESSAGE DMKBLD202 00483000
  549. CALLERM SLR R0,R0 00484000
  550. SLR R1,R1 00485000
  551. VARDATA ICM R0,B'1110',=C'BLD' MODULE IDENTIFIER 00486000
  552. CALL DMKERMSG WRITE THE MESSAGE 00487000
  553. * 00488000
  554. * RETURN WILL BE DIRECTLY TO THE CALLER FROM DMKERM 00489000
  555. * 00490000
  556. SPACE 00491000
  557. SPACE 00492000
  558. BLDMSG CALL DMKQCNWT,PARM=NORET 00493000
  559. EXIT 00494000
  560. SPACE 00495000
  561. DROP R7,R8,R9,R10 00496000
  562. .VIRT2 ANOP 00497000
  563. EJECT 00498000
  564. *. 00499000
  565. * SUBROUTINE NAME - 00500000
  566. * 00501000
  567. * DMKBLDRL - RELEASE REAL SEGMENT, PAGE, AND SWAP TABLES 00502000
  568. * 00503000
  569. * FUNCTION - 00504000
  570. * 00505000
  571. * TO RELEASE SEGMENT, PAGE, AND SWAP TABLES 00506000
  572. * WHEN THEY ARE NO LONGER NEEDED. 00507000
  573. * 00508000
  574. * ATTRIBUTES - 00509000
  575. * 00510000
  576. * REENTRANT, PAGEABLE, CALLED VIA SVC 00511000
  577. * 00512000
  578. * ENTRY POINT - 00513000
  579. * 00514000
  580. * DMKBLDRL 00515000
  581. * 00516000
  582. * ENTRY CONDITIONS - 00517000
  583. * GPR 2 - PARM REGISTER 00518000
  584. * DELSEGS = RELEASE SEGMENT TABLE 00519000
  585. * DELPAGES = RELEASE PAGE/SWAP TABLES 00520000
  586. * 00521000
  587. * PAGTONLY RELEASE TABLE POINTED TO BE R1 00521100
  588. * 00522000
  589. * GPR 1 = BEGINING AND ENDING ADDRESS TO RELEASE 00523000
  590. * BYTE 0-1 = FIRST ADDRESS TO RELEASE 00524000
  591. * FIRST 4 BITS = 0, NEXT 8 BITS = SEGMENT, NEXT 4 = PAGE 00525000
  592. * BYTE 2-3 = LAST ADDRESS TO RELEASE 00526000
  593. * FIRST 4 BITS = 0, NEXT 8 BITS = SEGMENT, NEXT 4 = PAGE 00527000
  594. * 00528000
  595. * GPR 11 = ADDRESS OF USER'S VMBLOK 00529000
  596. * GPR 12 = ADDRESS OF DMKBLDRL 00530000
  597. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00531000
  598. * 00532000
  599. * EXIT CONDITIONS - 00533000
  600. * 00534000
  601. * SWAP, PAGE, AND SEGMENT TABLES HAVE 00535000
  602. * BEEN RETURNED TO FREE STORAGE. 00536000
  603. * 00537000
  604. * CALLS TO OTHER ROUTINES - 00538000
  605. * 00539000
  606. * DMKFRET - TO RETURN TABLES TO FREE STORAGE 00540000
  607. * 00541000
  608. * EXTERNAL REFERENCES - 00542000
  609. * 00543000
  610. * NONE 00544000
  611. * 00545000
  612. * TABLES / WORK AREAS - 00546000
  613. * 00547000
  614. * SWAP TABLE 00548000
  615. * PAGE TABLE 00549000
  616. * SEGMENT TABLE 00550000
  617. EJECT 00551000
  618. * REGISTER USAGE - 00552000
  619. * 00553000
  620. * GPR 6 = ADDRESS OF SEGMENT TABLE 00554000
  621. * GPR 7 = ADDRESS OF PAGE TABLE 00555000
  622. * GPR 11 = ADDRESS OF USER'S VMBLOK 00556000
  623. * GPR 12 = BASE REGISTER 00557000
  624. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00558000
  625. * 00559000
  626. * GPRS 0-2, 4-5, 14-15 ARE WORK REGISTERS. 00560000
  627. * 00561000
  628. * GPRS 3, 8-10 ARE NOT USED. 00562000
  629. * 00563000
  630. * NOTES - 00564000
  631. * 00565000
  632. * NONE 00566000
  633. * 00567000
  634. * OPERATION - 00568000
  635. * A) IF JUST A SEGTABLE FRET, GO TO 1.5 00569000
  636. * B) IF ALL PAG-SWP TABLES TO BE FRETTED, 00570000
  637. * GO TO STEP D 00571000
  638. * C) USE R1 TO ADJ FOR PARTIAL FRET, GO TO STEP 1 00572000
  639. * D) SET FOR FRET OF ALL PAGE-SWP TABLES. GO TO STEP 1 00573000
  640. * 00574000
  641. * 00575000
  642. * 1. EACH ENTRY IN THE 16 WORD SEGMENT TABLE IS EXAMINED TO SEE 00576000
  643. * IF IT HAS A VALID ENTRY. IF YES, THE SIZES OF THE 00577000
  644. * SWAP TABLE AND PAGE TABLE ARE COMPUTED, AND THEY ARE 00578000
  645. * RETURNED TO FREE STORAGE VIA DMKFRET. THIS 00579000
  646. * PROCESS IF REPEATED FOR ALL OF THE POSSIBLE 16 00580000
  647. * SEGMENT TABLE ENTRIES. 00581000
  648. * 1.5 IF A FRET OF PAG-SWP TABLES ONLY, RETURN TO CALLER 00582000
  649. * 00583000
  650. * 00584000
  651. * 2. FINALLY, THE BEGINNING ADDRESS OF THE SEGMENT TABLE 00585000
  652. * IS COMPUTED FROM ITS ALIGNED ADDRESS AND DISPLACEMENT, 00586000
  653. * AND IT ALSO IS RETURNED TO FREE STORAGE VIA DMKFRET. 00587000
  654. * 00588000
  655. * 3. DETERMINE IF USER IS USING THE VIRT=REAL AREA; 00589000
  656. * IF HE IS ZERO (AVMREAL) FIELD IN PSA BEFORE RETURNING 00590000
  657. * TO THE CALLER. 00591000
  658. * 00592000
  659. *. 00593000
  660. EJECT 00594000
  661. DMKBLDRL RELOC RELEASE REAL SEGMENT, PAGE, & SWAP TABLES 00595000
  662. CLI SAVER2+3,DELSEGS SEGS TABLE RELEASE ONLY ? @V304635 00596000
  663. BE JUSSEG YES, THEN DO IT @V304635 00597000
  664. L R6,VMSEG LOAD SEGMENT TABLE ADDRESS @V304635 00598000
  665. LA R6,0(,R6) STRIP LENGTH @V408246 00598100
  666. USING SEGTABLE,R6 00599000
  667. LA R4,1 LOAD UNUSED SEGMENT INDICATOR 00601000
  668. TM SAVER2+3,PAGTONLY PAGE TABLE FROM REG? @V408246 00602100
  669. BNO CHKSEG NO @V408246 00602300
  670. LA R6,SAVER1 R6 POINTS TO THE STE (R1) @V408246 00602500
  671. LA R5,1 DO ONLY ONE TABLE @V408246 00602700
  672. B BLDRL01 ALL SET UP @V408246 00602900
  673. * 00603100
  674. CHKSEG DS 0H CALCULATE STARTING STE AND @V408246 00603300
  675. * COUNT OF STES 00603500
  676. L R8,SAVER1 GET ADDRESSES OF SEGMENTS @V304635 00604000
  677. LR R9,R8 SAVE STARTING/ENDING ADDRESSES @V408246 00605100
  678. SRL R8,20 GET STARTING STE NUMBER @V408246 00605300
  679. LR R15,R9 SAVE THE REMAINING ADDRESS @V304635 00606000
  680. N R15,=A(X'F0000') PAGE NUMBER WITHING SEG. = 0? @V408246 00607100
  681. BZ COMPSEG YES - SEGMENT ADDRESS IS OK @VM03135 00608000
  682. LA R8,1(,R8) SKIP PARTIAL SEGMENT @VM03135 00609000
  683. COMPSEG DS 0H @V408246 00610100
  684. SRL R9,4 ENDING SEG. NUMBER TO LOW R9 @V408246 00610600
  685. N R9,F255 CLEAR ALL BUT SEGMENT NUMBER @V408246 00611100
  686. SR R9,R8 R9=NUM STE-1 TO FRET @V304635 00612000
  687. BM RETBLDRL RETURN IF PARTIAL SEGMENT @V304635 00613000
  688. LA R5,1(,R9) R5 = NUMBER OF SEGMENTS TO FRET @VM03171 00614000
  689. SLL R8,2 DSP OF 1ST STE TO FRET @V304635 00615000
  690. LA R6,0(R8,R6) R6 POINTS TO 1ST STE TO FRET @V304635 00616000
  691. BLDRL01 EQU * @V304635 00617000
  692. RELRLOOP L R7,SEGPAGE LOAD PAGE TABLE ADDRESS 00618000
  693. N R7,=A(X'FFFFFE') CLEAR POSSIBLE INVALID BIT @V408246 00619100
  694. BZ RELRNEXT NOTHING THERE BUT INVALID BIT @V408246 00619200
  695. ICM R15,B'0011',SEGPAGE+1 IS THERE A PAGETABLE PTR @V408246 00619300
  696. BNZ DOFRET YES, THEN FRET IT @V408246 00619400
  697. TM SEGPAGE+3,SEGINV IF NOT, MAKE SURE IT'S @VA08431 00619505
  698. BO RELRNEXT NOT ON DASD BUT INVALID @VA08431 00619605
  699. * ATTEMPTING TO RELEASE A SEGMENT THAT HAS ITS TABLE 00619700
  700. * MIGRATED TO BACKING STORE 00619800
  701. ABEND 5 @V408246 00619900
  702. EJECT 00620000
  703. * 00620100
  704. * PROCESS INDIVIDUAL STES, RETURN PAGE/SWAP TABLE TO 00620200
  705. * AVAILABLE FREE STORAGE 00620300
  706. * 00620400
  707. DOFRET DS 0H HERE TO FRET TABLES @V408246 00620500
  708. SR R2,R2 CLEAR REG @V408246 00620600
  709. IC R2,SEGPLEN PAGE TABLE LENTH (NO PAGES -1) @V304635 00621000
  710. SRL R2,4 NUM. PAGES TO LOW ORDER REG. @V304635 00622000
  711. CL R11,AVMREAL V=R? @VA04952 00622400
  712. BE FRETPGTB YES - GO FRET PAGE TABLE @VA04952 00622800
  713. LA R14,1(,R2) NUM. PAGES+1 FOR BCT LOOP @V304635 00623000
  714. USING PAGCORE,R7 @V408246 00624100
  715. CHKPAGE DS 0H @V408246 00624600
  716. LH R0,PAGCORE PTE @V408246 00625100
  717. N R0,=A(X'FFF0') CHECK FOR REAL PAGE ALLOCATED @V408246 00625600
  718. BZ NXTPAGE NO @V408246 00626100
  719. ABEND 2 ERROR - PAGE NOT RELEASED @V408246 00626600
  720. NXTPAGE DS 0H @V408246 00627100
  721. LA R7,PAGCORE+2 NEXT PAGE TABLE ENTRY @V408246 00627600
  722. BCT R14,CHKPAGE PROCESS AL PAGE TABLE ENTIRES @V408246 00628100
  723. FRETPGTB DS 0H @V408246 00628600
  724. L R15,PREFIXA GET PREFIX VALUE TO ADDRESS PSA @V4M0132 00629100
  725. * AT ABSOLUTE 0 @V4M0132 00629200
  726. L R0,TTSEGCNT(R15) GET CURRENT TOTAL SEGMENT CNT @V4M0132 00629300
  727. BCTR R0,0 DECREMENT THIS SYSTEM COUNT @V4M0132 00629400
  728. ST R0,TTSEGCNT(R15) REPLACE UPDATED SEGMENT COUNT @V4M0132 00629500
  729. L R1,SEGPAGE GET PAGETABLE POINTER @V408246 00630600
  730. ST R4,SEGPAGE CLEAR STE ENTRY @V408246 00631100
  731. OI VMESTAT,VMINVPAG REMEMBER TO RESET TLB @V408246 00631600
  732. OI APSTAT2,CPPTLBR SET PTLB REQUIRED FOR THIS PROCR@V407594 00631700
  733. L R15,PREFIXB AND OTHER PROCESSOR @V407594 00631720
  734. OI APSTAT2-PSA(R15),CPPTLBR (IF THERE IS ANOTHER) @V407594 00631740
  735. N R1,=A(X'FFFFFE') CLEAR POSSIBLE INVALID BIT @V408246 00632100
  736. S R1,F16 BACK-UP TO START OF CORE FOR @V408246 00632600
  737. * TABLES 00633100
  738. LA R0,PAGBMP LOAD SIZE OF PAGE AND SWPTABLES @V407511 00633600
  739. SRL R0,3 OBTAIN NUMBER OF DOUBLEWORDS @V407511 00634100
  740. CALL DMKFRET @V408246 00634600
  741. ST R4,0(,R6) STORE INVALID STE @V408246 00635100
  742. RELRNEXT LA R6,SEGPAGE+4 POINT TO NEXT SEGMENT TABLE ENTRY 00643000
  743. BCT R5,RELRLOOP LOOP IF MORE SEGMENT TABLE ENTRIES 00644000
  744. EJECT 00644100
  745. * 00644200
  746. * FINISHED RESETING INDIVIDUAL STES, NOT PROCESS SEGMENT 00644300
  747. * TABLE 00644400
  748. * 00644500
  749. JUSSEG TM SAVER2+3,DELSEGS REQUEST ALSO TO FRET SEGS. @V304635 00645000
  750. BZ RETBLDRL NO, THEN RETURN TO CALLER @V304635 00646000
  751. L R1,VMSEG GET ADDRESS OF SEGMENT TABLE BLOCK 00647000
  752. LR R0,R1 REMEMBER IN R0 00648000
  753. LA R1,0(,R1) STRIP OFF HIGH-ORDER BYTE, 00649000
  754. SH R1,VMSEGDSP GET THE REAL BEGINNING OF IT 00650000
  755. SRL R0,24 OBTAIN NO. OF SEGMENT TABLES (LESS 1) 00651000
  756. SLL R0,3 TIMES 8, FOR 8 DBL- WORDS EACH 00652000
  757. AL R0,F15 PLUS 8, PLUS 7 FOR ALIGNMENT 00653000
  758. CALL DMKFRET NOW RETURN IT TO FREE STORAGE 00654000
  759. SR R15,R15 CLEAR 00655000
  760. ST R15,VMSEG THE SLOT IN THE VMBLOK. 00656000
  761. AIF (NOT &VIRREAL).VIRT3 00657000
  762. C R11,AVMREAL DOES USER OCCUPY VIRT=REAL AREA 00658000
  763. BNE RETBLDRL NO - EXIT TO CALLER @V4M0237 00659100
  764. NI VMQLEVEL,X'FF'-VMAEX NOLONGER FAVORED. @VM08649 00660000
  765. ST R15,AVMREAL YES, REMOVE THE AREA FROM HIM 00661000
  766. L R14,PREFIXB GET PREFIX ADDR OF OTHER PROC @V4M0132 00661100
  767. ST R15,AVMREAL(R14) MAINTAIN AVMREAL IN BOTH PSA'S @V4M0132 00661200
  768. .VIRT3 ANOP 00662000
  769. RETBLDRL EXIT @V304635 00663000
  770. * 00664000
  771. DROP R6,R7 00665000
  772. EJECT 00666000
  773. *. 00667000
  774. * SUBROUTINE NAME - 00668000
  775. * 00669000
  776. * DMKBLDVM - BUILD A NEW VMBLOK 00670000
  777. * 00671000
  778. * FUNCTION - 00672000
  779. * 00673000
  780. * TO CREATE AND PARTIALLY INITIALIZE A VMBLOK FOR A 00674000
  781. * USER IDENTIFIED BY HIS TERMINAL REAL DEVICE BLOCK. 00675000
  782. * 00676000
  783. * ATTRIBUTES - 00677000
  784. * 00678000
  785. * REENTRANT, PAGEABLE, CALLED VIA SVC 00679000
  786. * 00680000
  787. * ENTRY POINT - 00681000
  788. * 00682000
  789. * DMKBLDVM 00683000
  790. * 00684000
  791. * ENTRY CONDITIONS - 00685000
  792. * 00686000
  793. * GPR 8 = ADDRESS OF TERMINAL REAL DEVICE BLOCK 00687000
  794. * GPR 9 = ADDRESS OF NICBLOK ( IF DEVTYPE = TYP3705 ) 00688000
  795. * GPR 12 = ADDRESS OF DMKBLDVM 00689000
  796. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00690000
  797. * 00691000
  798. * EXIT CONDITIONS - 00692000
  799. * 00693000
  800. * VMBLOK HAS BEEN CREATED, CLEARED, PARTIALLY FILLED IN, 00694000
  801. * AND CHAINED TO THE OTHER VMBLOKS. 00695000
  802. * 00696000
  803. * GPR 11 = ADDRESS OF VMBLOK JUST CREATED. 00697000
  804. * 00698000
  805. * CALLS TO OTHER ROUTINES - 00699000
  806. * 00700000
  807. * DMKFREE - TO OBTAIN FREE STORAGE FOR VMBLOK TO BE CREATED 00701000
  808. * DMKSCNRD - TO CONVERT TERMINAL DEVICE ADDRESS TO CCU FORM 00702000
  809. * DMKCVTBH - CONVERT TERMINAL REAL DEVICE ADDRESS TO HEX 00703000
  810. * 00704000
  811. * EXTERNAL REFERENCES - 00705000
  812. * 00706000
  813. * DMKRIORN 00707000
  814. * 00708000
  815. * TABLES / WORK AREAS - 00709000
  816. * 00710000
  817. * NONE 00711000
  818. EJECT 00712000
  819. * REGISTER USAGE - 00713000
  820. * 00714000
  821. * GPR 8 = ADDRESS OF RDEVBLOK FOR TERMINAL 00715000
  822. * GPR 11 = ADDRESS OF NEWLY CREATED VMBLOK 00716000
  823. * GPR 12 = BASE REGISTER 00717000
  824. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00718000
  825. * 00719000
  826. * GPRS 0-1 AND 14-15 ARE WORK REGISTERS 00720000
  827. * 00721000
  828. * GPRS 2-7 AND 9-10 ARE NOT USED. 00722000
  829. * 00723000
  830. * NOTES - 00724000
  831. * 00725000
  832. * NONE 00726000
  833. * 00727000
  834. * OPERATION - 00728000
  835. * 00729000
  836. * 1. FREE STORAGE IS OBTAINED VIA DMKFREE FOR A VMBLOK, 00730000
  837. * WHICH IS THEN CLEARED. THE VM CHANNEL TABLE IS SET 00731000
  838. * TO ALL FFFF'S, INDICATING THAT NO VIRTUAL CHANNELS 00732000
  839. * HAVE BEEN BUILT YET. THE ADDRESS OF THE TERMINAL 00733000
  840. * RDEVBLOK (IN R8 AT ENTRY) IS STORED IN VMTERM. 00734000
  841. * 00735000
  842. * 2. A USERID CONSISTING OF 'LOGON' + THE THREE-BYTE HEX 00736000
  843. * TERMINAL REAL DEVICE ADDRESS IS STORED AS THE USERID 00737000
  844. * (FOR EXAMPLE 'LOGON063' OR 'LOGON8B5'). 00738000
  845. * 00739000
  846. * 3. THE USER IS SIGNALED IN CONSOLE-FUNCTION-WAIT, AND 00740000
  847. * THE USER IS PUT INTO DISABLED WAIT STATE. ALSO, THE 00741000
  848. * TERMINAL REAL DEVICE BLOCK IS SET TO THE DEFAULT VALUES FOR 00742000
  849. * THE BLIP, LINE-END, CHARACTER-DELETE, AND LINE-DELETE SYMBOLS. 00743000
  850. * 00744000
  851. * 4. FINALLY, THE NEWLY CREATED VMBLOK IS PATCHED INTO 00745000
  852. * THE CHAIN OF ACTIVE VMBLOKS, AND RETURN IS MADE TO THE 00746000
  853. * CALLER. 00747000
  854. *. 00748000
  855. EJECT 00749000
  856. DMKBLDVM RELOC BUILD NEW VMBLOK 00750000
  857. CLC SAVER8,=C'AUTO' AUTOLOG CMD. @V305535 00751000
  858. BE AUTOLOG1 YES - THEN NO RDEVBLOK @V305535 00752000
  859. LTR R8,R8 R8 MUST BE GREATER THAN 0 00753000
  860. BNP BLD1 CATCH CALLER BUG IF BAD GR8 @V200820 00754000
  861. AUTOLOG1 EQU * HERE FOR AUTOLOG USER @V305535 00755000
  862. LA R0,VMBSIZE GET STORAGE FOR A VMBLOK 00756000
  863. CALL DMKFREE ... 00757000
  864. CHARGE STOP STOP CHARGING CALLER FOR LOGON @V407594 00758000
  865. CL R11,ASYSVM IS THIS SYSTEM @V407594 00758010
  866. BE NOUNLK YES, BYPASS UNLOCK @V407594 00758020
  867. CL R11,LASTUSER LAST USER @V407594 00758030
  868. BE NOUNLK YES, BYPASS UNLOCK @V407594 00758040
  869. LR R14,R1 SAVE NEW VMBLOK @V407594 00758050
  870. LR R1,R11 VMBLOK TO UNLOCK @V407594 00758060
  871. LOCK RELEASE,TYPE=VMBLOK,SAVE UNLOCK R11 VMBLOK @V407594 00758070
  872. LR R1,R14 RESTORE NEW VMBLOK TO R1 @V407594 00758080
  873. NOUNLK DS 0H @V407594 00758090
  874. LR R11,R1 REFERENCE VIA R11 AS USUAL 00759000
  875. USING VMBLOK,R11 ... 00760000
  876. MVC VMBLOK(8),ZEROES CLEAR ENTIRE VMBLOK 00761000
  877. MVC VMBLOK+8(256),VMBLOK ... 00762000
  878. MVC VMBLOK+264(VMBSIZE*8-264),VMBLOK ... 00763000
  879. MVC VMCHTBL(8),FFS FFFF-FILL THE VM CHANNEL TABLE 00764000
  880. MVC VMCHTBL+8(24),VMCHTBL (INDICATING NO CHANNELS THERE YET) 00765000
  881. MVC VMVTERM(2),FFS INDICATE NO VIRTUAL CONSOLE @V200820 00766000
  882. OI VMRSTAT,VMLOGON+VMCFWAIT 'NOT YET LOGGED ON' & IN CFWAIT 00767000
  883. OI VMMLEVEL,VMMSGON+VMWNGON+VMMCODE+VMMTEXT+VMMLINED 00768100
  884. MVI VMPSW+1,WAIT PUT USER INTO DISABLED WAIT STATE. 00769000
  885. MVC VMTMOUTQ,=X'7FFFFFFFFFFFF000' INITIALIZE VMTMOUTQ 00770000
  886. MVC VMTTIME(16),VMTMOUTQ VMTTIME AND VMTMINQ 00771000
  887. TM APSTAT1,APUOPER RUNNING AS AP @V407594 00772010
  888. BZ NOAP NO @V407594 00772020
  889. MVC VMCPTIME,HALFTIME INITIALIZE TIMER @VA09438 00772021
  890. MVC VMAPTIME,HALFTIME INITIALIZE TIMER @VA09438 00772023
  891. MVC VMMORETM,=XL2'320A' DEFAULT 50/10 SECONDS HRC101DK 00772026
  892. LR R1,R11 VMBLOK PTR @V407594 00772030
  893. LOCK OBTAIN,TYPE=VMBLOK,OPTION=NOUPDT,SPIN=NO @V407594 00772040
  894. * IT IS NOT NECESSARY TO UNLOCK R11 AT ENTRY (ASYSVM) @V407594 00772050
  895. LA R0,CPEXSIZE SIZE OF DEFERRED EXECUTION BLOCK @V407594 00772060
  896. CALL DMKFREE OBTAIN DEFERRED EXECUTION BLOCK @V407594 00772070
  897. ST R1,VMDFTPNT & SAVE ITS ADDRESS IN VMBLOK @V407594 00772080
  898. NOAP DS 0H @V407594 00772090
  899. CHARGE START START CHARGING NEW USER @V4M0203 00772092
  900. STCK VMTODINQ CURRENT TOD @V408246 00772100
  901. BC 3,DOWNWEGO ABEND CVT001 @V408246 00772300
  902. LM R2,R3,VMTODINQ CONVERT TO PRIORITY UNITS @V408246 00772500
  903. SL R2,STARTIME . . @V408246 00772700
  904. SLDL R2,5 . . @V408246 00772900
  905. ST R2,VMEPRIOR INITIAL PRIORITY @V408246 00773100
  906. LA R2,5 INITIAL PROJECTED WORKING SET @V408246 00773300
  907. * VALUE 00773500
  908. ST R2,VMWSPROJ . . @V408246 00773700
  909. L R15,ASYSLC REFERENCE SYSLOCS INFORMATION 00775000
  910. USING SYSLOCS,R15 ... 00776000
  911. MVC VMTLEND(4),DMKSYSLE DEFAULT EDITING CHARACTERS @V200820 00777000
  912. MVI VMGRFTAB,X'6A' SET LOGICAL TAB CHAR TO DEFAULT @V60A6B6 00777100
  913. CLC SAVER8,=C'AUTO' IS THIS AN AUTOLOG USER? @VA04867 00777200
  914. BE AUTOLOG2 IF SO, BRANCH @VA04867 00777400
  915. ST R8,VMTERM SET REAL TERM RDEVBLOK PTR @V200820 00778000
  916. USING RDEVBLOK,R8 @V200820 00779000
  917. TM RDEVTMCD,RDEVUSC8 IS IT AN ASCII TYPE? @VA08845 00779100
  918. BZ NOTASC NO, BRANCH @VA08845 00779200
  919. MVI VMTLDEL,X'AD' DEFAULT LINEDEL TO LEFT BRACKET @VA08845 00779300
  920. NOTASC EQU * @VA08845 00779400
  921. LA R1,CLASSPEC*256+TYP3705 IS THIS A 3705 RDEVBLOK@V200820 00780000
  922. CH R1,RDEVTYPC ... @V200820 00781000
  923. BE BLDNIC YES, BYPASS TEST FOR TERMINAL @VM01043 00782000
  924. * CLASS 00783000
  925. CLI RDEVTYPC,CLASTERM IS THIS A TERMINAL CLASS @VM01043 00784000
  926. BNE BLDRTERM NO,CONTINUE @VM01043 00785000
  927. TM RDEVTYPE,TYPBSC IS THIS A BISYNC LINE @VM01043 00786000
  928. BZ BLDRTERM NO, CONTINUE @VM01043 00787000
  929. BLDNIC EQU * @VM01043 00788000
  930. USING NICBLOK,R9 GR9 STILL O.K. FROM ENTRY @V200820 00789000
  931. ST R11,NICUSER SET VMBLOK POINTER IN NICBLOK @V200820 00790000
  932. L R1,DMKSYSLL SYSTEM DEFAULT LINE LENGTHS @V200820 00793000
  933. STCM R1,B'0100',NICLLEN SET LINE LEN FOR 2741-TYPE D@V200820 00794000
  934. TM NICTYPE,NICTERM+NICCIBM 2741-TYPE TERMINAL ? @V200820 00795000
  935. BO BYPAS YES...O.K. AS IS @VA04807 00796000
  936. TM NICTYPE,NICGRAF REMOTE GRAPHICS? @VA04807 00796165
  937. BNO BYPAS1 NO...TTY TYPE @VA04807 00796330
  938. STCM R1,B'0001',NICLLEN USE GRAPHICS LINE LENGTH @VA04807 00796495
  939. B BYPAS @VA04807 00796660
  940. BYPAS1 STCM R1,B'0010',NICLLEN USE TTY LINE LENGTH @VA04807 00796825
  941. BYPAS EQU * @VM01043 00798000
  942. CALL DMKSCNRD GET RADDR FROM RDEVBLOK @V200820 00799000
  943. L R3,=A(DMKRIORN) LIST OF 3705 RDEVBLOK PTRS @V200820 00800000
  944. L R2,0(0,R3) COUNT OF 3705'S IN THE LIST @V200820 00801000
  945. BLDNFND EQU * FIND DEVICE CODE FOR THIS 3705 @V200820 00802000
  946. CH R1,6(0,R3) COMPARE AGAINST DEVICE ADDRESS @V200820 00803000
  947. BE BLDNFRN O.K. -- FOUND IT @V200820 00804000
  948. LA R3,4(0,R3) NEXT LIST ENTRY @V200820 00805000
  949. BCT R2,BLDNFND SEARCH THE LIST @V200820 00806000
  950. B BLD1 OOPS -- LOGIN ON A NON-EXISTENT DEVICE@V200820 00807000
  951. BLDNFRN EQU * ADD DEVICE CODE TO VMTRMID @V200820 00808000
  952. SL R3,=A(DMKRIORN) GET DISP TO LIST ENTRY @V200820 00809000
  953. SRL R3,2(0) ...IN NUMBER OF ENTRIES @V200820 00810000
  954. MVC VMUSER(4),=C'LOGN' USERID IS "LOGN103C", ETC. @V200820 00811000
  955. LR R1,R3 GET DEVICE CODE VALUE @VM01043 00812000
  956. CALL DMKCVTBH CONVERT TO HEXADECIMAL @VM01043 00813000
  957. STC R1,VMUSER+4 SAVE DEVICE CODE VALUE @VM01043 00814000
  958. SLL R3,12(0) MOVE DEVICE CODE TO HIGH-ORDER @V200820 00815000
  959. LH R2,NICNAME BASIC RESOURCE ID FROM NICBLOK @V200820 00816000
  960. OR R3,R2 ADD DEVICE CODE FOR MESSAGES @V200820 00817000
  961. STH R3,VMTRMID ...SAVE IN THE VMBLOK @V200820 00818000
  962. LR R1,R2 RESOURCE ID TO GR1 FOR USERID @V200820 00819000
  963. B BLDNAME GO FINISH USERID CONSTRUCTION @V200820 00820000
  964. DROP R9 @V200820 00821000
  965. BLDRTERM EQU * RDEVBLOK IS A SINGLE TERMINAL @V200820 00822000
  966. SR R1,R1 CLEAR FOR IC 00823000
  967. IC R1,RDEVTYPE GET TERMINAL DEVICE TYPE 00824000
  968. SRL R1,4 ISOLATE ADAPTER TYPE 00825000
  969. IC R1,DMKSYSLL(R1) GET DEFAULT LINE LENGTH 00826000
  970. STC R1,RDEVLLEN STORE IT 00827000
  971. TM RDEVTYPC,CLASGRAF GRAPHICS CONSOLE? @VA04807 00827150
  972. BNO PSUP NO...SET PRINT SUPPRESS @VA04807 00827300
  973. L R1,DMKSYSLL GET DEFAULT LINE LENGTHS @VA04807 00827450
  974. CLI RDEVMDL,X'05' 3270-5? HRC073DK 00827500
  975. BNE *+8 No HRC073DK 00827520
  976. LA R1,132 Y, default size is 132 HRC073DK 00827540
  977. STCM R1,B'0001',RDEVLLEN STORE GRAPHICS LINE LENGTH @VA04807 00827600
  978. PSUP EQU * @VA04807 00827750
  979. OI RDEVFLAG,RDEVPSUP ASSUME TERMINAL HAS PRINT-SUPPRESS 00828000
  980. ST R11,RDEVUSER SET VMBLOK POINTER IN RDEVBLOK @V200820 00829000
  981. TM RDEVADD,RDEVLDEV Is this an LDEV? HRC065DK 00829100
  982. BO LOGOLDEV Yes HRC065DK 00829200
  983. MVC VMUSER(5),=C'LOGON' USERID IS "LOGON03C", ETC. @V200820 00830000
  984. CALL DMKSCNRD GET REAL DEVICE ADDRESS IN BINARY@V200820 00831000
  985. BLDNAME EQU * CONVERT TO HEXADECIMAL FOR USERID@V200820 00832000
  986. CALL DMKCVTBH ... @V200820 00833000
  987. STCM R1,B'0111',VMUSER+5 SETUP LAST PART OF USERID @V200820 00834000
  988. AUTOLOG2 EQU * AUTOLOG ON USER @V305535 00835000
  989. L R1,ASYSVM START WITH SYSTEM VMBLOK, 00836000
  990. L R14,VMPNT-VMBLOK(,R1) POINT TO 1ST USER IN CHAIN 00837000
  991. LTR R14,R14 ANYBODY THERE AT ALL ? 00838000
  992. BZ BLDVM1ST NOPE - PUT IN THE VERY 1ST GUY. 00839000
  993. MVC VMPNT(4),VMPNT-VMBLOK(R14) ... 00840000
  994. ST R11,VMPNT-VMBLOK(,R14) ... 00841000
  995. BLDSTR11 ST R11,SAVER11 STORE R11 FOR RETURNING TO CALLER 00842000
  996. EXIT RETURN TO CALLER. 00843000
  997. EJECT 00844000
  998. BLDVM1ST ST R11,VMPNT LET THE ONE USER POINT TO HIMSELF, AND 00845000
  999. ST R11,VMPNT-VMBLOK(,R1) STORE HIS ADDR AT ANCHOR IN SYSVM 00846000
  1000. B BLDSTR11 AND GO RETURN R11 TO OUR CALLER. 00847000
  1001. LOGOLDEV EQU * HRC065DK 00847100
  1002. LH R1,RDEVADD Get the LDEV address HRC065DK 00847200
  1003. N R1,F4095 Keep only the dev num HRC065DK 00847300
  1004. CALL DMKCVTBH Make it displayable HRC065DK 00847400
  1005. STCM R1,7,VMUSER+5 Put dev addr in userid HRC065DK 00847500
  1006. MVC VMUSER(5),=C'LOGNL' Logon name for LDEVs HRC065DK 00847600
  1007. B AUTOLOG2 Go log user on HRC065DK 00847700
  1008. * 00848000
  1009. ABEND 1 ENTRY WITH INVALID RDEVBLOK PTR @V200820 00849000
  1010. * 00850000
  1011. DROP R8,R15 00851000
  1012. EJECT 00852000
  1013. *. 00853000
  1014. * SUBROUTINE NAME - 00854000
  1015. * 00855000
  1016. * DMKBLDEC - BUILD AN EXTENDED CONTROL MODE BLOCK 00856000
  1017. * 00857000
  1018. * FUNCTION - 00858000
  1019. * 00859000
  1020. * TO ALLOCATE STORAGE FOR A VIRTUAL ECBLOK AND THE TWO 00860000
  1021. * TRQBLOK'S REQUIRED FOR A VIRTUAL MACHINE WITH THE 00861000
  1022. * ECMODE OPTION, AND TO INITIALIZE THESE BLOCKS. 00862000
  1023. * 00863000
  1024. * ATTRIBUTES - 00864000
  1025. * 00865000
  1026. * RE-ENTRANT, PAGEABLE, CALLED VIA SVC 00866000
  1027. * 00867000
  1028. * ENTRY CONDITIONS - 00868000
  1029. * 00869000
  1030. * GR13 = ADDRESS OF A STANDARD SAVEAREA 00870000
  1031. * GR12 = ADDRESS OF DMKBLDEC 00871000
  1032. * GR11 = ADDRESS OF THE USER'S VMBLOK 00872000
  1033. * 00873000
  1034. * EXIT CONDITIONS - 00874000
  1035. * 00875000
  1036. * GPRS 0-13 UNCHANGED, VMECEXT POINTS TO THE NEW ECBLOK 00876000
  1037. * VMBLOK HAS BEEN MARKED FOR ECMODE OPERATION ALLOWED 00877000
  1038. * 00878000
  1039. * CALLS TO OTHER ROUTINES - 00879000
  1040. * 00880000
  1041. * DMKFREE - TO ALLOCATE STORAGE FOR THE BLOCKS 00881000
  1042. * 00882000
  1043. * EXTERNAL REFERENCES - 00883000
  1044. * 00884000
  1045. * DMKSCHCP - INTERRUPT RETURN FOR CPU TIMER TRQBLOK 00885000
  1046. * DMKTMRCK - INTERRUPT RETURN FOR CLOCK COMPARATOR TRQBLOK 00886000
  1047. * 00887000
  1048. * TABLES / WORK AREAS - NONE 00888000
  1049. * 00889000
  1050. * REGISTER USAGE - 00890000
  1051. * 00891000
  1052. * GR14,15 EXTERNAL LINKAGE REGISTERS 00892000
  1053. * GR13 = SAVEAREA ADDRESSABILITY 00893000
  1054. * GR12 = MODULE BASE ADDRESSABILITY 00894000
  1055. * GR11 = VMBLOK ADDRESSABILITY 00895000
  1056. * GR10 = ECBLOK ADDRESSABILITY 00896000
  1057. * GR0-9 ARE WORK REGISTERS 00897000
  1058. * 00898000
  1059. * OPERATION - 00899000
  1060. * 00900000
  1061. * 1. STORAGE IS ALLOCATED FOR THE ECBLOK ITSELF, AND THE 00901000
  1062. * ADDRESS OF THE ECBLOK IS PLACED IN VMECEXT IN THE VMBLOK. 00902000
  1063. * 2. STORAGE IS ALLOCATED FOR TWO TRQBLOK'S, ONE FOR THE 00903000
  1064. * VIRTUAL CPU TIMER (IRA = DMKSCHCP), AND ONE FOR THE 00904000
  1065. * VIRTUAL TOD CLOCK COMPARATOR (IRA = DMKTMRCK). 00905000
  1066. * 3. RESET VALUES FOR THE CONTROL REGISTERS ARE MOVED INTO 00906000
  1067. * THE ECBLOK FIELDS, AND THE TRQBLOK'S ARE CONNECTED 00907000
  1068. * TO THE ECBLOK ANCHORS. 00908000
  1069. * 4. THE VMPSTAT FLAGS IN THE VMBLOK ARE UPDATED TO SHOW 00909000
  1070. * THAT AN ECBLOK NOW EXISTS. 00910000
  1071. *. 00911000
  1072. EJECT 00912000
  1073. DMKBLDEC RELOC , BUILD AND INITIALIZE AN ECBLOK @V2B4320 00913000
  1074. SPACE 00914000
  1075. LA R0,EXTSIZE SIZE OF EXTENDED CONTROL BLOCK @V2B4320 00915000
  1076. CALL DMKFREE SET ASIDE SOME FREE STORAGE @V2B4320 00916000
  1077. LR R10,R1 ADDRESS IT VIA GR10 @V2B4320 00917000
  1078. USING ECBLOK,R10 @V2B4320 00918000
  1079. XC 0(EXTSIZE*8,R1),0(R1) @V2B4320 00919000
  1080. ST R10,VMECEXT CONNECT ECBLOK TO THE VMBLOK @V2B4320 00920000
  1081. MVC EXTCR2(8),FFS SET C-REG 2,3 TO X'FFFFFFFF' @V2B4320 00921000
  1082. MVI EXTCR0+3,X'E0' RESET VALUES FOR C-REG 0 @V2B4320 00922000
  1083. MVI EXTCR14,X'C4' . . .C-REG 14 @V2B4320 00923000
  1084. MVI EXTCR15+2,X'02' . . .C-REG 15 @V2B4320 00924000
  1085. LA R0,TRQBSIZE GET TWO TRQBLOK'S @V2B4320 00925000
  1086. CALL DMKFREE ONE FOR THE VIRTUAL CPU TIMER @V2B4320 00926000
  1087. ST R1,EXTCPTRQ HANG IT OFF OF THE ECBLOK @V2B4320 00927000
  1088. USING TRQBLOK,R1 @V2B4320 00928000
  1089. XC 0(TRQBSIZE*8,R1),0(R1) @V2B4320 00929000
  1090. ST R11,TRQBUSER SET VMBLOK POINTER @V2B4320 00930000
  1091. L R2,=A(DMKSCHCP) INTERRUPT RETURN ADDRESS @V2B4320 00931000
  1092. ST R2,TRQBIRA . . . @V2B4320 00932000
  1093. SPACE 00933000
  1094. CALL DMKFREE GR0 IS STILL SET FROM BEFORE @V2B4320 00934000
  1095. ST R1,EXTCCTRQ ONE FOR THE TOD CLOCK COMPARATOR @V2B4320 00935000
  1096. XC 0(TRQBSIZE*8,R1),0(R1) @V2B4320 00936000
  1097. ST R11,TRQBUSER SET THE VMBLOK POINTER @V2B4320 00937000
  1098. L R2,=A(DMKTMRCK) INTERRUPT RETURN ADDRESS @V2B4320 00938000
  1099. ST R2,TRQBIRA . . . @V2B4320 00939000
  1100. OI VMPSTAT,VMV370R ECMODE IS NOW ALLOWED @V2B4320 00940000
  1101. EXIT , RETURN TO THE CALLER @V2B4320 00941000
  1102. DROP R1,R10 @V2B4320 00942000
  1103. EJECT 00943000
  1104. HALFTIME DC X'3FFFFFFFFFFFF000' HALF OF VMTTIME @V4M0203 00943100
  1105. LTORG 00944000
  1106. EJECT 00945000
  1107. PSA , @V306638 00946000
  1108. COPY CORE @V306638 00947000
  1109. COPY DEVTYPES @V306638 00948000
  1110. COPY EQU @V306638 00949000
  1111. COPY MICBLOK @V306638 00950000
  1112. COPY NETWORK @V306638 00951000
  1113. COPY RBLOKS @V306638 00952000
  1114. COPY SAVE @V306638 00953000
  1115. SYSLOCS , @V306638 00954000
  1116. COPY VMBLOK @V306638 00955000
  1117. EJECT 00956000
  1118. COPY TIMER @V2B4320 00957000
  1119. SPACE 2 00958000
  1120. END 00959000
ibm/vm370-lib/cp/dmkbld.assemble_src.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator