Table of Contents

DMKVAT Source

References

Source Listing

DMKVAT.ASSEMBLE.txt
  1. VAT TITLE 'DMKVAT (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF SYSIN 00002000
  3. COPY OPTIONS 00003000
  4. COPY LOCAL 00004000
  5. *. 00005000
  6. * MODULE NAME - 00006000
  7. * 00007000
  8. * DMKVAT 00008000
  9. * 00009000
  10. * CONTENTS - 00010000
  11. * 00011000
  12. * DMKVATAB 00012000
  13. * DMKVATRN 00013000
  14. * DMKVATEX 00014000
  15. *. 00015000
  16. DMKVAT START 00016000
  17. USING PSA,0 00017000
  18. USING VMBLOK,R11 00018000
  19. USING ECBLOK,R10 00019000
  20. USING SAVEAREA,R13 00020000
  21. SPACE 2 00021000
  22. ENTRY DMKVATAB,DMKVATMD,DMKVATBC 00022000
  23. ENTRY DMKVATRN,DMKVATLA 00023000
  24. ENTRY DMKVATPX,DMKVATSX,DMKVATEX 00024000
  25. ENTRY DMKVATAT,DMKVATZP,DMKVATZS 00024500
  26. ENTRY DMKVATPF @V2A3135 00025000
  27. EXTRN DMKERMSG HRC068DK 00025100
  28. EXTRN DMKSLC HRC068DK 00025200
  29. EXTRN DMKPRGSM PER001 00026000
  30. EXTRN DMKPTRPW @VA08037 00026505
  31. EXTRN DMKSTKDE @V407593 00026510
  32. AIF (NOT &AP).DSPRU4 00026515
  33. EXTRN DMKDSPRU @V407593 00026520
  34. EXTRN DMKLOKSY @V4M0178 00026525
  35. .DSPRU4 ANOP 00026530
  36. EXTRN DMKATSCF @V60BC11 00026540
  37. EJECT 00027000
  38. *. 00028000
  39. * SUBROUTINE NAME - 00029000
  40. * 00030000
  41. * DMKVATAB 00031000
  42. * 00032000
  43. * FUNCTION - 00033000
  44. * 00034000
  45. * TO ALLOCATE, INITIALIZE, AND MAINTAIN SHADOW SEGMENT 00035000
  46. * AND PAGE TABLES FOR VIRTUAL RELOCATING MACHINES. 00036000
  47. * 00037000
  48. * ATTRIBUTES - 00038000
  49. * 00039000
  50. * REENTRANT, RESIDENT, DISABLED, CALLED VIA BALR 00040000
  51. * 00041000
  52. * ENTRY POINTS - 00042000
  53. * 00043000
  54. * DMKVATAB - MAINTAIN VIRTUAL ADDRESS TRANSLATION TABLES 00044000
  55. * DMKVATMD - ALLOCATE AND INITIALIZE SHADOW TABLES 00045000
  56. * DMKVATBC - RETURN SHADOW TABLES TO FREE STORAGE 00046000
  57. * 00047000
  58. * ENTRY CONDITIONS - 00048000
  59. * 00049000
  60. * GPR 15 = ENTRY POINT ADDRESS 00050000
  61. * GPR 14 = RETURN ADDRESS 00051000
  62. * GPR 11 = VMBLOK ADDRESS 00052000
  63. * 00053000
  64. * EXIT CONDITIONS - 00054000
  65. * 00055000
  66. * ECBLOK, VMBLOK UPDATED 00056000
  67. * GPRS 0-15 UNCHANGED 00057000
  68. * 00058000
  69. * CALLS TO OTHER ROUTINES - 00059000
  70. * 00060000
  71. * DMKFREE - TO OBTAIN FREE STORAGE FOR SHADOW TABLES 00061000
  72. * DMKFRET - TO RETURN SHADOW TABLES TO FREE STORAGE 00062000
  73. * DMKPTRAN- TO BRING IN VIRTUAL STORAGE PAGES 00063000
  74. * DMKPTRPW 00063550
  75. * DMKATSCF - TO FORCE USER TO NONSHARED MODE 00063600
  76. * 00064000
  77. * EXTERNAL REFERENCES - 00065000
  78. * 00066000
  79. * NONE 00067000
  80. * 00068000
  81. * TABLES / WORK AREAS - 00069000
  82. * 00070000
  83. * VMBLOK, ECBLOK, BALRSAVE 00071000
  84. * 00072000
  85. EJECT 00073000
  86. * REGISTER USAGE - 00074000
  87. * 00075000
  88. * GPR 12 = BASE REGISTER 00076000
  89. * GPR 11 = VMBLOK ADDRESSABILITY 00077000
  90. * GPR 10 = ECBLOK ADDRESSABILITY 00078000
  91. * GPR 9 = ARCHITECTURE CONTROL INDEX 00079000
  92. * GPR 0-8 ARE WORK REGISTERS 00080000
  93. * GPRS 13-15 ARE EXTERNAL LINK REGISTERS 00081000
  94. * 00082000
  95. * OPERATION - 00083000
  96. * 00084000
  97. * DMKVATAB IS ENTERED VIA BALR WHENEVER AN EXTENDED- 00085000
  98. * CONTROL VIRTUAL MACHINE REQUIRES UPDATING OF THE 00086000
  99. * SHADOW TABLES FOR ONE OF THE FOLLOWING REASONS: 00087000
  100. * 00088000
  101. * A. FIRST ENTRANCE INTO TRANSLATE MODE - 00089000
  102. * SHADOW SEGMENT AND PAGE TABLES ARE OBTAINED VIA DMKFREE, 00090000
  103. * ALL ENTRIES OF SHADOW TABLES ARE SET UNAVAILABLE. 00091000
  104. * 00092000
  105. * B. RELOADING CONTROL REGISTER 1 (SEGMENT TABLE ORIGIN) - 00093000
  106. * SHADOW SEGMENT TABLE EXAMINED TO DETERMINE IF IT IS STILL 00094000
  107. * LARGE ENOUGH TO MAP THE VIRTUAL SEGMENT TABLE. IF NOT, 00095000
  108. * A NEW SHADOW SEGTABLE IS ALLOCATED FROM FREE STORAGE, 00096000
  109. * THE DATA FROM THE OLD SEGTABLE IS MOVED TO THE NEW ONE, 00097000
  110. * AND THE OLD SHADOW SEGTABLE IS RETURNED TO FREE STORAGE. 00098000
  111. * ALL SHADOW TABLE ENTRIES ARE MARKED UNAVAILABLE. 00099000
  112. * 00100000
  113. * C. RELOADING CONTROL REGISTER 0 (ARCHITECTURE CONTROLS) - 00101000
  114. * A CHECK IS MADE TO DETERMINE IF THE VIRTUAL MACHINE 00102000
  115. * HAS ALTERED ITS PAGE OR SEGMENT SIZE. IF THERE IS NO 00103000
  116. * CHANGE, THE CALL IS A NO-OP. IF THE PAGE AND/OR SEGMENT 00104000
  117. * SIZE HAS CHANGED, ALL SHADOW TABLES ARE RETURNED TO 00105000
  118. * FREE STORAGE VIA DMKFRET AND THE VMBLOK IS FLAGGED FOR 00106000
  119. * RE-ALLOCATION OF NEW TABLES WHEN REQUIRED. 00107000
  120. * 00108000
  121. * D. USER'S PAGE HAS BEEN SWAPPED IN OR OUT - 00109000
  122. * SHADOW SEGMENT TABLE IS INVALIDATED. 00110000
  123. * 00111000
  124. * E. VIRTUAL MACHINE EXECUTED 'PTLB' - PURGE TRANSLATION 00112000
  125. * LOOK-ASIDE BUFFER - PERFORMS STEP B. 00113000
  126. * 00114000
  127. EJECT 00115000
  128. * DMKVATMD IS ENTERED VIA BALR WHEN AN EXTENDED-CONTROL 00116000
  129. * VIRTUAL MACHINE ENTERS TRANSLATE MODE FOR THE FIRST TIME, 00117000
  130. * OR WHENEVER THE VIRTUAL MACHINE CHANGES THE PAGE OR 00118000
  131. * SEGMENT SIZE (AS SPECIFIED IN VIRTUAL CONTROL REGISTER 0). 00119000
  132. * SHADOW SEGMENT AND PAGE TABLES ARE ALLOCATED FROM FREE 00120000
  133. * STORAGE VIA CALLS TO DMKFREE. THE SIZE OF THE 00121000
  134. * SHADOW TABLES ALLOCATED IS DETERMINED BY THE PARTICULAR 00122000
  135. * COMBINATION OF PAGE AND SEGMENT SIZE USED BY THE VIRTUAL 00123000
  136. * MACHINE, AND IS ESSENTIALLY A TRADE-OFF BETWEEN SPEED 00124000
  137. * DEGRADATION OF THE VIRTUAL EXTENDED-CONTROL MACHINE AND 00125000
  138. * THE REAL STORAGE SPACE CONSUMED BY THE TABLES. 00126000
  139. * 00127000
  140. * DMKVATBC IS ENTERED WHEN THE VIRTUAL MACHINE EITHER LEAVES 00128000
  141. * EXTENDED-CONTROL MODE OR CHANGES THE PAGE OR SEGMENT SIZE 00129000
  142. * AS SPECIFIED IN VIRTUAL CONTROL REGISTER ZERO. 00130000
  143. * IF THE USER IS IN PAGE WAIT WHEN DMKVATBC IS ENTERED, 00130200
  144. * A CALL IS MADE TO DMKPGSPW TO QUEUE A CPEXBLOK OFF ANY 00130400
  145. * ACTIVE PAGE I/O REQUEST BLOCK FOR THIS VMBLOK. RETURN 00130600
  146. * IS MADE WHEN ALL PAGING AHS QUIESED. ALL THE 00130800
  147. * SHADOW PAGE, SEGMENT, AND COPY SEGMENT TABLES ARE RETURNED 00131000
  148. * TO FREE STORAGE VIA CALLS TO DMKFRET AND THE VMBLOK IS 00132000
  149. * MARKED TO INDICATE THAT SHADOW TABLES ARE NOT PRESENT. 00133000
  150. *. 00134000
  151. EJECT 00135000
  152. *---------------------------------------------------------------------* 00136000
  153. * DMKVATAB - MAINTAIN SHADOW TABLES AND CONTROL REGISTERS * 00137000
  154. *---------------------------------------------------------------------* 00138000
  155. DMKVATAB EQU * %V3M5012 00139000
  156. USING *,R15 %V3M5012 00140000
  157. STM R0,R15,BALRSAVE %V3M5012 00141000
  158. L R12,=A(DMKVAT) MODULE BASE ADDRESS %V3M5012 00142000
  159. DROP R15 %V3M5012 00143000
  160. USING DMKVAT,R12 %V3M5012 00144000
  161. L R10,VMECEXT EXTENSION BLOCK ADDRESS %V3M5012 00145000
  162. TM VMCXSTAT,VMSTBYPS STBYPASS VR enabled? HRC068DK 00145100
  163. BO VAVR Y, no shadow table maintHRC068DK 00145200
  164. SPACE 2 00146000
  165. AIF (NOT &AP).APCHK4 00146080
  166. TM APSTAT1,APUOPER RUNNING AS AP %V4M0178 00146100
  167. BZ VATABCA NO %V4M0178 00146120
  168. L R2,=A(DMKLOKSY+2) ADDRESS SUPERVISOR LOCK @V4M0178 00146140
  169. CLC LPUADDR,0(R2) DO WE HOLD SUPERVISOR LOCK @V4M0178 00146160
  170. BNE VATABC1 NO- PROCESS CALL FROM DISPATCHER @V4M0178 00146180
  171. VATABCA DS 0H HERE WITH SUPERVISOR LOCK %V4M0178 00146200
  172. .APCHK4 ANOP 00146220
  173. BAL R6,CHKFORM CHECK VALIDITY OF C-REG 0 VALUE %V3M5012 00147000
  174. BNZ TORNADO NO GOOD -- TREAT AS ARCH. CHANGE %V3M5012 00148000
  175. TM VMESTAT,VMNEWCR0 NEW VIRTUAL C-REG 0 ? %V3M5012 00149000
  176. BZ VATABC1 NO - CHECK C-REG 1 %V3M5012 00150000
  177. SLR R9,R9 00151000
  178. IC R9,EXTCR0+1 ARCHITECTURE CONTRL BYTE 00152000
  179. SH R9,=AL2(X'40') BASE AT ZERO 00153000
  180. ALR R9,R9 DOUBLE IT FOR TABLE INDEX 00154000
  181. TM VMESTAT,VMSHADT IF SHADOW TABLES ARE NOT PRESENT... 00155000
  182. BO VATARCH ...WE WILL SET THE INDEX ANYWAY 00156000
  183. STH R9,EXTARCH SET ARCHITECTURE CONTROL INDEX 00157000
  184. VATARCH EQU * CHECK FOR CHANGE IN TRANSLATE ARCHITECTURE 00158000
  185. CH R9,EXTARCH DOES IT MATCH CURRENT ARCHITECTURE? 00159000
  186. BNE TORNADO NO -- GO THRASH ABOUT MADLY 00160000
  187. L R1,CPCREG0 BYTES 0,2,3 STANDARD @VA06374 00161100
  188. ICM R1,B'0100',EXTCR0+1 VIRTUAL BYTE 1 @VA06374 00162100
  189. ST R1,EXTSHCR0 RUN VALUE OF CR0 @VA06374 00163100
  190. NI EXTSHCR0+1,X'F8' SET UNASSIGNED BITS TO ZERO @VA06374 00164100
  191. B VATCKC1 @VA01719 00166000
  192. VATABC1 EQU * CHECK FOR NEW SEG. TABLE ORIGIN %V3M5012 00167000
  193. LH R9,EXTARCH MAKE SURE WE HAVE CORRECT INDEX %V3M5012 00168000
  194. TM VMESTAT,VMINVSEG NEW C-REG 1? %V3M5012 00169000
  195. BZ VATABPG NO, CHECK FOR INVALID PAGE TABLE %V3M5012 00170000
  196. VATCKC1 EQU * @VA01719 00171000
  197. L R1,EXTCR1 PICK UP CURRENT C-REG 1 VALUE 00172000
  198. CL R1,EXTSTOLD HAS THE VALUE CHANGED AT ALL ? 00173000
  199. BE VATABPG NO -- NOTHING TO BE DONE 00174000
  200. ST R1,EXTSTOLD RESET OUR MEMORY OF PREVIOUS VALUE 00175000
  201. BAL R8,SHADOWS RESET SHADOW SEGMENT TABLE 00176000
  202. B VACLEAN GO CLEAN UP AND EXIT 00177000
  203. VAVR EQU * HRC068DK 00177100
  204. TM EXTCR0+1,X'40' Is page size 2k? HRC068DK 00177110
  205. BO STBOFF Yes, not elig for STBYPSHRC068DK 00177120
  206. ICM R1,15,EXTCR1 Get user's STO in CR1 HRC068DK 00177130
  207. BZ VAVRCR1 Zero is ok HRC068DK 00177140
  208. CLM R1,7,F4096+1 New STO in guest page 0?HRC068DK 00177150
  209. BNL VAVRCR1 N, CR1 check is ok HRC068DK 00177160
  210. * 00177170
  211. STBOFF EQU * HRC068DK 00177180
  212. NI VMCXSTAT,255-VMSTBYPS Else turn off STBYPASS HRC068DK 00177190
  213. CLC VMMADDR,ZEROES Is ECPS:VM active? HRC068DK 00177200
  214. BE VACLEAN Zeros...so no HRC068DK 00177210
  215. ICM R1,7,VMMADDR -> MICBLOK HRC068DK 00177220
  216. USING MICBLOK,R1 HRC068DK 00177230
  217. MVI MICEVMA2,0 Set off all STB assists HRC068DK 00177240
  218. DROP R1 HRC068DK 00177250
  219. B VACLEAN And exit w/o shadow tblsHRC068DK 00177260
  220. * (they will be built latrHRC068DK 00177270
  221. VAVRCR1 EQU * HRC068DK 00177280
  222. ST R1,EXTSHCR1 Use user's actual STO HRC068DK 00177290
  223. SR R5,R5 Clear for IC HRC068DK 00177300
  224. IC R5,EXTCR1 Get segment table len HRC068DK 00177310
  225. LA R5,1(0,R5) Make relative to 1 HRC068DK 00177320
  226. SLL R5,6(0) Compute length in bytes HRC068DK 00177330
  227. STH R5,EXTVSEGS Save user's seg tbl len HRC068DK 00177340
  228. TM 3(R1),X'01' Segment invalid? HRC068DK 00177350
  229. BO VACLEAN Yes HRC068DK 00177360
  230. L R1,0(,R1) -> PTE for page 0 HRC068DK 00177370
  231. TM 1(R1),X'08' Page invalid? HRC068DK 00177380
  232. BO VACLEAN Yes HRC068DK 00177390
  233. ICM R0,3,0(R1) Load the page 0 PTE HRC068DK 00177400
  234. N R0,=X'0000FFF0' Keep only page addr bitsHRC068DK 00177410
  235. BNZ VACLEAN Br if PTE .NE. frame 0 HRC068DK 00177420
  236. L R15,=A(DMKSLC-4096) Real addr of V=R page 0 HRC068DK 00177430
  237. SRL R15,8 Adjust for PTE use HRC068DK 00177440
  238. ICM R0,3,0(R1) Load the page 0 PTE HRC068DK 00177450
  239. N R0,=X'0000000F' Keep guest bit settings HRC068DK 00177460
  240. OR R0,R15 Adjust PTE to V=R pag 0 HRC068DK 00177470
  241. STCM R0,3,0(R1) Store updated guest PTE HRC068DK 00177480
  242. OI APSTAT2,CPPTLBR Set PTLB required HRC068DK 00177490
  243. L R15,PREFIXB -> Other processor pfx HRC068DK 00177500
  244. OI APSTAT2-PSA(R15),CPPTLBR (If there is another) HRC068DK 00177510
  245. B VACLEAN HRC068DK 00177520
  246. SPACE 00178000
  247. VATABPG EQU * %V3M5012 00179000
  248. TM VMESTAT,VMSHADT ARE SHADOW TABLES PRESENT %V3M5012 00180000
  249. BZ VACLEAN NO - CLEAR BIT AND EXIT %V3M5012 00181000
  250. TM VMESTAT,VMINVPAG+VMINVSEG NEED TO INVALIDATE? %V3M5012 00182000
  251. BZ VACLEAN NO , EXIT TO USER. %V3M5012 00183000
  252. BAL R8,ZAPSEGS SET SHADOW SEGTABLE INVALID %V3M5012 00184000
  253. SPACE 00185000
  254. VACLEAN EQU * CLEAR INDICATOR BITS + EXIT %V3M5012 00186000
  255. NI VMESTAT,255-(VMNEWCR0+VMINVSEG+VMINVPAG) %V3M5012 00187000
  256. LM R0,R15,BALRSAVE RESTORE REGISTERS AT ENTRY %V3M5012 00188000
  257. BR R14 %V3M5012 00189000
  258. EJECT 00190000
  259. *---------------------------------------------------------------------* 00191000
  260. * TORNADO - RELEASE ALL ACTIVE SHADOW TABLES, RE-ALLOCATE * 00192000
  261. * ACCORDING TO A NEW TABLE FORMAT * 00193000
  262. *---------------------------------------------------------------------* 00194000
  263. TORNADO EQU * ARRGH - HIS ARCHITECTURE CHANGED 00195000
  264. TM VMESTAT,VMSHADT DO SHADOW TABLES EXIST ALREADY ? 00196000
  265. BZ VACLEAN NO -- DON'T BOTHER TO CREATE ANY 00197000
  266. NI VMESTAT,X'FF'-(VMNEWCR0+VMINVSEG+VMINVPAG) 00198000
  267. SVC 20 GET A SAVE AREA 00199000
  268. MVC SAVEREGS(R12*4),BALRSAVE SAVE REGS 0-11 00200000
  269. L R1,BALR12 CALLER'S BASE 00201000
  270. ST R1,SAVER12 INTO NEW SAVE-AREA 00202000
  271. L R1,BALR13 00203000
  272. ST R1,SAVER13 00204000
  273. L R1,BALR14 RETURN ADDRESS 00205000
  274. LA R1,0(,R1) SANS ILC/CC 00206000
  275. ST R1,SAVERETN NOW EVERYTHING IS SET FOR AN 'EXIT' 00207000
  276. CALL DMKVATBC RELEASE ALL CURRENT SHADOW TABLES 00208000
  277. CALL DMKVATMD ...AND GET ANOTHER SET 00209000
  278. EXIT , RETURN TO CALLER 00210000
  279. SPACE 2 00211000
  280. *---------------------------------------------------------------------* 00212000
  281. * CHKFORM - EXAMINE VIRTUAL C-REG 0 FOR VALIDITY * 00213000
  282. *---------------------------------------------------------------------* 00214000
  283. CHKFORM EQU * %V3M5012 00214700
  284. NI VMESTAT,255-VMBADCR0 REMOVE ERROR BIT %V3M5012 00215400
  285. TM EXTCR0+1,X'C0' PAGE-SIZE CONTROL BITS %V3M5012 00216100
  286. BNM BADARCH NOT '10' OR '01' - ERROR %V3M5012 00216800
  287. TM EXTCR0+1,X'20' CHECK BIT 10 - MUST BE ZERO %V3M5012 00217500
  288. BO BADARCH ERROR IF SET TO ONE %V3M5012 00218200
  289. TM EXTCR0+1,X'0F' SEGMENT SIZE, UNUSED BITS %V3M5012 00218900
  290. BCR 8,R6 ALL ZERO - O.K. %V3M5012 00219600
  291. BADARCH EQU * 00221000
  292. OI VMESTAT,VMBADCR0 INVALID C-REG 0 00222000
  293. TM *-1,255 SET NON-ZERO COND. CODE @VA02142 00223000
  294. BR R6 RETURN 00224000
  295. EJECT 00225000
  296. *---------------------------------------------------------------------* 00226000
  297. * DMKVATMD - ALLOCATE SHADOW TABLES, SET UP SHADOW C-REGS * 00227000
  298. *---------------------------------------------------------------------* 00228000
  299. DMKVATMD EQU * 00229000
  300. USING *,R15 00230000
  301. TM VMESTAT,VMSHADT ARE TABLES ALREADY PRESENT? 00231000
  302. BCR 1,R14 YES - EXIT IMMEDIATELY 00232000
  303. STM R0,R15,BALRSAVE SAVE CALLER'S REGISTERS @V4M0233 00232010
  304. L R12,=A(DMKVAT) ESTABLISH ADDRESSIBILITY @V4M0233 00232020
  305. DROP R15 @V4M0233 00232030
  306. USING DMKVAT,R12 @V4M0233 00232040
  307. TM VMOSTAT,VMSHR IS USER RUNNING SHR SEG? @VA06156 00232100
  308. BZ NONSHR NO, PROCESS NORMALLY @VA07684 00232102
  309. TM VMPSW+1,EXTMODE IN EXTERNAL MODE ? @VA07684 00232104
  310. BZ NONSHR NO, CAN'T BE IN XLATE MODE. @VA07684 00232106
  311. TM VMPSW,TRANMODE IN TRANSLATE MODE ? @VA07684 00232108
  312. BZ NONSHR NO, DON'T HAVE TO UNSHARE USER. @VA07684 00232110
  313. SVC 20 OBTAIN A SAVEAREA @V4M0233 00232122
  314. MVC SAVEREGS(R12*4),BALRSAVE COPY CALLERS REGS 0-11 @V4M0233 00232124
  315. L R1,BALR12 GET CALLER'S R12 @V4M0233 00232126
  316. ST R1,SAVER12 SAVE R12 IN SAVEAREA @V4M0233 00232128
  317. L R1,BALR13 GET CALLER'S R13 @V4M0233 00232130
  318. ST R1,SAVER13 SAVE R13 IN SAVEAREA @V4M0233 00232132
  319. L R1,BALR14 GET RETURN ADDRESS @V4M0233 00232134
  320. LA R1,0(,R1) STRIP CC & ILC @V4M0233 00232136
  321. ST R1,SAVERETN SAVE RETURN ADDRESS IN SAVEAREA @V4M0233 00232138
  322. RECHECK DS 0H @V60BC11 00232139
  323. SLR R4,R4 CLEAR WORK REG @V4M0233 00232140
  324. SR R1,R1 CLEAR R1 FOR PAGE ZERO @VA06156 00232160
  325. IC R4,VMSEG GET SIZE OF SEGMENT TABLE @VA06156 00232180
  326. SLL R4,4 TIMES 16 @VA06156 00232200
  327. LA R4,16(R4) PLUS 16 - MAX SEGTABLE ENTRIES @VA06156 00232220
  328. L R5,VMSEG GET SEGMENT TABLE @VA06156 00232240
  329. LOOPSEG EQU * @VA06156 00232260
  330. L R6,0(R5) GET PAGTABLE @VA06156 00232280
  331. CLM R6,B'0110',ZEROES IS SEQ INVALID OR MIGRATED @VA12195 00232300
  332. BE SKPCHG NO SEGMENT - LOOK AT NEXT SEGMENT@VA06156 00232320
  333. N R6,CLRBITS CLEAR FLAG BITS @V4M0233 00232340
  334. SL R6,F16 BACKUP TO HEADER @V60BC11 00232360
  335. USING PAGTABLE,R6 @V60BC11 00232370
  336. USING SWPTABLE,R3 @VA06156 00232380
  337. L R3,PAGSWP GET ADDRESS OF SWPTABLE @V60BC11 00232400
  338. SL R3,F8 BACK UP TO SWPTABLE PREFIX FOR @VA06156 00232420
  339. * ADDRESSABILITY 00232440
  340. TM SWPFLAG,SWPSHR IS SEGMENT SHARED? @VA06156 00232460
  341. BZ SKPCHG NO, CONTINUE LOOKING @VA06156 00232480
  342. LR R1,R5 GET ADDRESS OF CURRENT STE @V60BC11 00232510
  343. L R2,VMSEG GET STE ORIGIN ADDRESS @V60BC11 00232512
  344. N R2,CLRBITS CLEAR UNWANTED BITS @V60BC11 00232514
  345. SR R1,R2 GET SEGMENT NUMBER TIMES FOUR @V60BC11 00232516
  346. SRL R1,2 GET SEGMENT NUMBER @VMI0065 00232519
  347. SLL R1,16 FORM VIRTUAL ADDRESS @V60BC11 00232520
  348. LR R2,R1 GET VITURAL ADDRESS @VA12533 00232523
  349. CALL DMKATSCF FORCE USER TO NONSHARED MODE @V60BC11 00232524
  350. TM VMOSTAT,VMSHR STILL RUNNING SHARED SYSTEM @V60BC11 00232526
  351. BZ NORMPROC NO, CONTINUE NORMAL PROCESSING @V60BC11 00232528
  352. B RECHECK YES, CONTINUE FORCING NONSHARED @V60BC11 00232530
  353. DROP R6 @V60BC11 00232532
  354. SKPCHG EQU * @VA06156 00232540
  355. LA R5,4(R5) POINT TO NEXT SEGMENT @VA06156 00232560
  356. A R1,SEGSIZE NEED A PAGE ADDRESS FOR TRANS @VA06156 00232580
  357. BCT R4,LOOPSEG GO, DO IT AGAIN @VA06156 00232600
  358. DROP R3 @VA06156 00232620
  359. B NORMPROC CONTINUE WITH NORMAL PROCESSING @V4M0233 00232625
  360. NONSHR EQU * @VA06156 00232640
  361. SLR R13,R13 INDICATE NO SAVEAREA @V4M0233 00235500
  362. NORMPROC DS 0H @V4M0233 00235600
  363. L R10,VMECEXT EXTENSION BLOCK ADDRESS 00237000
  364. SPACE 2 00238000
  365. BAL R6,CHKFORM CHECK VALIDITY OF VIRTUAL C-REGS 00239000
  366. BNZ MINIMUM NO GOOD -- SETUP MINIMUM SHADOW SEGTABLE 00240000
  367. SLR R9,R9 COMPUTE ARCHITECTURE CONTROL INDEX 00241000
  368. STH R9,EXTSHLEN (SET SHADOW SEGTABLE LENGTH ZERO) 00242000
  369. IC R9,EXTCR0+1 ARCHITECTURE CONTROL BYTE 00243000
  370. SH R9,=AL2(X'40') BASED AT ZERO 00244000
  371. ALR R9,R9 DOUBLE IT FOR TABLE INDEX 00245000
  372. STH R9,EXTARCH SAVE IN ECBLOK FOR VAT ROUTINES 00246000
  373. L R1,CPCREG0 BYTES 0,2,3 STANDARD @VA06374 00247100
  374. ICM R1,B'0100',EXTCR0+1 VIRTUAL BYTE 1 @VA06374 00248100
  375. ST R1,EXTSHCR0 RUN VALUE OF CR0 @VA06374 00249100
  376. NI EXTSHCR0+1,X'F8' SET UNASSIGNED BITS TO ZERO @VA06374 00250100
  377. BAL R8,SHADOWS SETUP SHADOW SEGTABLE, SHADOW C-REG 1 00252000
  378. LTR R13,R13 DO WE HAVE A SAVEAREA @V4M0233 00253500
  379. BZ BALREXT NO, EXIT VIA BALRSAVE @V4M0233 00253600
  380. B MDEXIT YES, EXIT VIA SVC @V4M0233 00253700
  381. SPACE 2 00254000
  382. *---------------------------------------------------------------------* 00255000
  383. * VIRTUAL C-REGS CONTAIN INVALID DATA - GET MINIMUM TABLES * 00256000
  384. *---------------------------------------------------------------------* 00257000
  385. MINIMUM EQU * 00258000
  386. LA R5,64(0) MINIMUM SEGTABLE = 16 ENTRIES 00259000
  387. STH R5,EXTSHLEN ... 00260000
  388. BAL R3,GETSHAD GET SHADOW SEGTABLE @V4M0233 00261100
  389. ST R1,EXTSHSEG REAL START ADDRESS 00262000
  390. ST R4,EXTSHCR1 SHADOW SEGTABLE ORIGIN, LENGTH CODE ZERO 00264000
  391. L R1,CPCREG0 STANDARD C-REG 0 00265000
  392. ST R1,EXTSHCR0 ... 00266000
  393. BAL R8,ZAPSEGS SET ENTIRE TABLE UNAVAILABLE 00267000
  394. LA R1,CODE80-ARCHTECT SET STANDARD VM/370 FORMAT 00268000
  395. STH R1,EXTARCH ...FOR CHANGE DETECTION LATER 00269000
  396. LTR R13,R13 DO WE HAVE A SAVEAREA @V4M0233 00270100
  397. BZ BALREXT NO, EXIT VIA BALRSAVE @V4M0233 00270200
  398. MDEXIT DS 0H @V4M0233 00270300
  399. EXIT YES, EXIT VIA SVC @V4M0233 00270400
  400. EJECT 00271000
  401. *---------------------------------------------------------------------* 00272000
  402. * SHADOWS - ALLOCATE OR INVALIDATE SHADOW SEGMENT TABLE * 00273000
  403. *---------------------------------------------------------------------* 00274000
  404. SHADOWS EQU * 00275000
  405. SLR R5,R5 00276000
  406. IC R5,EXTCR1 GET VIRTUAL SEGTABLE LENGTH CODE 00277000
  407. CH R5,MAXSEGS(R9) IS HIS VALUE REASONABLE ? 00278000
  408. BNH SEGLNOK YES - USE IT AS IS 00279000
  409. LH R5,MAXSEGS(R9) USE ONLY AS MUCH AS HE CAN REFERENCE 00280000
  410. SEGLNOK EQU * SET SHADOW SEGTABLE LENGTH CODE 00281000
  411. STC R5,EXTSHCR1 ... 00282000
  412. LA R5,1(0,R5) COMPUTE SEGTABLE LENGTH IN BYTES 00283000
  413. SLL R5,6(0) ... 00284000
  414. STH R5,EXTVSEGS SAVE IN ECBLOK BECAUSE IT'S CONVENIENT 00285000
  415. CH R5,EXTSHLEN DO WE HAVE ENOUGH ROOM FOR HIS TABLE ? 00286000
  416. BNH ZAPSEGS YES - JUST SET SHADOW SEGTABLE INVALID 00287000
  417. BAL R3,GETSHAD GET NEW, LARGER SHADOW SEGTABLE @V4M0233 00288100
  418. L R6,EXTSHCR1 OLD SEGTABLE ORIGIN 00289000
  419. LH R7,EXTSHLEN ...AND IT'S LENGTH 00290000
  420. ST R4,EXTSHCR1 SET NEW SHADOW SEGTABLE ORIGIN 00291000
  421. STH R5,EXTSHLEN ...AND ITS LENGTH 00292000
  422. STCM R6,B'1000',EXTSHCR1 SAVE SHADOW SEGTABLE LENGTH 00293000
  423. LR R2,R1 ACTUAL START ADDRESS TO GR2 00294000
  424. N R7,XRIGHT16 FORCE POSITIVE, ZERO PAD, TEST VALUE 00295000
  425. BZ SHADNEW SHADOW SEGTABLE DOES NOT YET EXIST 00296000
  426. MVCL R4,R6 MOVE OLD TABLE TO NEW + CLEAR OVERFLOW 00297000
  427. * R0 WAS LOADED WITH OLD LENGTH OF @V4M0247 00298100
  428. * SEGMENT TABLE IN GETSHAD @V4M0247 00298110
  429. L R1,EXTSHSEG OLD ACTUAL START ADDRESS 00299000
  430. CALL DMKFRET RELEASE OLD SHADOW SEGTABLE 00300000
  431. SHADNEW EQU * SET NEW POINTERS TO LARGER SEGTABLE 00301000
  432. ST R2,EXTSHSEG ACTUAL START ADDRESS FOR LATER 'FRET' 00302000
  433. B ZAPSEGS GO INVALIDATE ENTIRE SHADOW TABLES 00304000
  434. EJECT 00305000
  435. *---------------------------------------------------------------------* 00306000
  436. * GETSHAD - ALLOCATE NEW SHADOW SEGMENT TABLE * 00307000
  437. *---------------------------------------------------------------------* 00308000
  438. GETSHAD EQU * 00309000
  439. LR R1,R5 LENGTH OF SEGTABLE TO BE ALLOCATED@V4M0233 00310100
  440. SRL R1,3(0) CONVERT TO DBL-WD COUNT @V4M0233 00310200
  441. LA R1,8(,R1) ALLOW FOR 64-BYTE BOUNDARY @V4M0233 00310300
  442. LR R0,R1 LOAD SIZE FOR FREE @V4M0233 00310400
  443. LR R7,R1 SAVE LENGTH @V4M0233 00310500
  444. CALL DMKFREE GET SOME STORAGE 00314000
  445. LA R4,63(0,R1) ROUND UP... 00315000
  446. N R4,=X'00FFFFC0' ...TO 64-BYTE BOUNDARY 00316000
  447. LR R6,R1 REAL START ADDRESS 00317000
  448. LH R0,EXTSEGLN SAVE LENGTH OF OLD SHADOW SEGTAB @V4M0247 00317100
  449. STH R7,EXTSEGLN FULL BLOCK LENGTH IN DOUBLE-WORDS@V4M0233 00318100
  450. SLL R7,3(0) FULL LENGTH IN BYTES 00319000
  451. SLR R15,R15 ZERO-LEN SOURCE, ZERO PAD 00320000
  452. MVCL R6,R14 CLEAR ENTIRE FIELD TO ZEROES 00321000
  453. OI VMESTAT,VMSHADT SHADOW TABLES NOW EXIST 00322000
  454. BR R3 RETURN TO CALLER @V4M0233 00323100
  455. SPACE 2 00324000
  456. *---------------------------------------------------------------------* 00325000
  457. * GETPAGT - ALLOCATE ONE SEGMENT OF SHADOW PAGE TABLES * 00326000
  458. *---------------------------------------------------------------------* 00327000
  459. GETPAGT EQU * ALLOCATE A SHADOW PAGE TABLE 00328000
  460. LH R0,PAGTLEN(R9) PAGE TABLE LENGTH IN BYTES 00329000
  461. SRL R0,3(0) CVT TO DBL-WDS 00330000
  462. CALL DMKFREE GET STORAGE FOR SHADOW TABLE 00331000
  463. ICM R1,B'1000',EXTCOPY USE VIRTUAL PAGE-TABLE LENGTH CODE 00332000
  464. ST R1,0(0,R6) SET PAGE TABLE ADDR IN SHADOW SEGTABLE 00333000
  465. BR R3 ...AND RETURN 00334000
  466. EJECT 00335000
  467. *---------------------------------------------------------------------* 00336000
  468. * DMKVATBC - RETURN TO FREE STORAGE ALL ACTIVE SHADOW TABLES * 00337000
  469. *---------------------------------------------------------------------* 00338000
  470. DMKVATBC EQU * 00339000
  471. USING *,R15 00340000
  472. *-- If we are in DMKVATBC with VMSTBVR set, then the PSW has HRC068DK 00340100
  473. *-- transitioned into BC-mode. STBYPASS must be turned off. HRC068DK 00340110
  474. TM VMCXSTAT,VMSTBYPS STBYPASS VR enabled? HRC068DK 00340120
  475. BZ NOSTB No HRC068DK 00340130
  476. NI VMCXSTAT,255-VMSTBYPS Turn off STBYPASS HRC068DK 00340140
  477. CLC VMMADDR,ZEROES Is ECPS:VM active? HRC068DK 00340150
  478. BE NOSTB Zeros...so no HRC068DK 00340160
  479. ST R1,BALR1 Need a register HRC068DK 00340170
  480. ICM R1,7,VMMADDR -> MICBLOK HRC068DK 00340180
  481. USING MICBLOK,R1 HRC068DK 00340190
  482. MVI MICEVMA2,0 Set off all STB assists HRC068DK 00340200
  483. DROP R1 HRC068DK 00340210
  484. L R1,BALR1 Restore register HRC068DK 00340220
  485. * HRC068DK 00340230
  486. NOSTB EQU * HRC068DK 00340240
  487. TM VMESTAT,VMSHADT ARE SHADOW TABLES PRESENT? 00341000
  488. BCR 8,R14 NO - EXIT IMMEDIATELY 00342000
  489. STM R0,R15,BALRSAVE SAVE REGISTERS IN PSA 00343000
  490. L R12,=A(DMKVAT) MODULE BASE ADDRESS 00344000
  491. DROP R15 00345000
  492. USING DMKVAT,R12 00346000
  493. TM VMRSTAT,VMPGWAIT IS USER IN PAGE WAIT? @VA04369 00346500
  494. BZ PAGCOMP NO - OK TO CONTINUE @VA04369 00346600
  495. CL R11,ASYSVM IS IT SYSTEM VMBLOK? @VA04369 00346700
  496. BE PAGCOMP YES - CONTINUE PROCESSING @VA04369 00346800
  497. LA R0,8 GET AREA TO PRESERVE @VA04369 00346900
  498. CALL DMKFREE BALRSAVE OVER PTRPW CALL @VA04369 00347000
  499. MVC 0(64,R1),BALRSAVE SAVE IT @VA04369 00347100
  500. CALL DMKPTRPW @VA08037 00347210
  501. MVC BALRSAVE(64),0(R1) RESTORE BALRSAVE @VA04369 00347300
  502. CALL DMKFRET RELEASE TEMP SAVE AREA @VA04369 00347400
  503. PAGCOMP L R10,VMECEXT EXTENSION BLOCK POINTER @VA04369 00347500
  504. SPACE 2 00348000
  505. LH R7,EXTARCH PICK UP ARCHITECTURE CONTROL INDEX 00349000
  506. L R9,EXTSHCR1 SHADOW SEGMENT TABLE ORIGIN 00350000
  507. LH R8,EXTSHLEN ...LENGTH IN BYTES 00351000
  508. SRL R8,2(0) CONVERT TO COUNT OF ENTRIES 00352000
  509. PAGFRET EQU * RELEASE SHADOW PAGE TABLES 00353000
  510. L R1,0(0,R9) PICK UP SEGTABLE ENTRY 00354000
  511. N R1,=X'00FFFFF8' STRIP EAC, INVALID, LEN, KEY DATA 00355000
  512. BZ NXTFRET INACTIVE ENTRY - GET NEXT 00356000
  513. LH R0,PAGTLEN(R7) PICK UP PAGE TABLE LENGTH IN BYTES 00357000
  514. SRL R0,3(0) CONVERT TO DOUBLE-WORDS FOR DMKFRET 00358000
  515. CALL DMKFRET RELEASE ONE PAGE TABLE 00359000
  516. NXTFRET EQU * ADVANCE TO NEXT ENTRY 00360000
  517. LA R9,4(0,R9) NEXT SLOT IN SEGMENT TABLE 00361000
  518. BCT R8,PAGFRET RELEASE ALL THE TABLES 00362000
  519. SPACE 00363000
  520. L R1,EXTSHSEG REAL START OF SHADOW SEGTABLE BLOCK 00364000
  521. LH R0,EXTSEGLN ...AND ITS LENGTH IN DBL-WDS 00365000
  522. CALL DMKFRET RELEASE SHADOW SEGTABLE 00366000
  523. SLR R1,R1 ZERO OUT TABLE POINTERS 00367000
  524. ST R1,EXTSHCR1 ... 00368000
  525. ST R1,EXTSHSEG ... 00369000
  526. STH R1,EXTSHLEN ... 00370000
  527. STH R1,EXTVSEGS ... 00371000
  528. ST R1,EXTSTOLD 00372000
  529. STH R1,EXTSEGLN ... 00373000
  530. NI VMESTAT,X'FF'-VMSHADT SHADOW TABLES ARE GONE 00374000
  531. B BALREXT RETURN TO CALLER 00375000
  532. EJECT 00376000
  533. *---------------------------------------------------------------------* 00377000
  534. * ZAPPAGE - INVALIDATE ONE SHADOW PAGE TABLE * 00378000
  535. * ------------------------------- * 00379000
  536. * GPR 9 = ARCHITECTURE CONTROL INDEX * 00379300
  537. * GPR 6 = ADDRESS OF SEGMENT TABLE ENTRY FOR PAGE TABLE * 00379600
  538. *---------------------------------------------------------------------* 00379900
  539. *. 00380200
  540. *********************************************************************** 00380500
  541. * 00380800
  542. * 00381100
  543. * CP ASSIST INSTRUCTION "ZAPPAGE" - INVALIDATE SHADOW PAGE TABLE 00381400
  544. * 00381700
  545. * 00382000
  546. * OPERANDS: 00382300
  547. * 1 = ADDRESS OF 'ARCHTECT' (ARCHITECTURE CONTROLS TABLE) 00382600
  548. * 2 = VALUE OF 'EXTARCH' FROM ECBLOK (ARCHITECTURE INDEX) 00382900
  549. * 00383200
  550. * REGISTER INPUT: 00383500
  551. * GPR 6 = ADDRESS OF SEGMENT TABLE ENTRY FOR THE PAGE TABLE 00383800
  552. * GPR 14 = EXIT ADDRESS 00384100
  553. * 00384400
  554. * SYSTEM DATA AREAS REFERENCED (BY MODULE WHERE APPLICABLE): 00384700
  555. * DMKVAT - 'ARCHTECT' TABLE 00385000
  556. * SHADOW PAGE TABLE 00385300
  557. * 00385600
  558. * 00385900
  559. * EXITS: 00386200
  560. * 00386500
  561. * 1. ADDRESS IN GPR 14 (NORMAL COMPLETION) 00386800
  562. * 00387100
  563. * REGISTER OUTPUT: NONE CHANGED BY THIS INSTRUCTION 00387400
  564. * NOTE: THE CONDITION CODE IS SET TO ZERO 00387700
  565. * 00388000
  566. * 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL COMPLETION) 00388300
  567. * 00388600
  568. * NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT TO A NO-OP. 00388900
  569. * 00389200
  570. *********************************************************************** 00389500
  571. *. 00389800
  572. ZAPPAGE EQU * %V3M4038 00390100
  573. SPACE 00390400
  574. DS 0H EXECUTE CP ASSIST "ZAPPAGE" %V3M4038 00390700
  575. DMKVATZP DC X'E60B',S(ARCHTECT,0(R9)) ***%V3M4038 00391000
  576. SPACE 00391300
  577. L R0,0(,R6) GET PAGE TABLE ADDRESS %V3M4038 00391600
  578. N R0,=X'00FFFFF8' STRIP EAC, INVALID, LEN, KEY %V3M4038 00391900
  579. BCR 8,R14 INACTIVE ENTRY - RETURN %V3M4038 00392200
  580. NI 3(R6),X'FE' MAKE SEGMENT TABLE ENTRY VALID %V3M4038 00392500
  581. SLR R15,R15 ZERO LENGTH FOR 2ND OPR. OF MVCL %V3M4038 00392800
  582. LA R1,PINVBIT(R9) INVALID BIT FOR THIS FORMAT %V3M4038 00393100
  583. ICM R15,B'1000',0(R1) GET PADDING CHAR = INV. BIT %V3M4038 00393400
  584. LH R1,PAGTLEN(R9) PAGE TABLE LENGTH IN BYTES %V3M4038 00393700
  585. MVCL R0,R14 SET ALL PAGE TABLE ENTRIES INV. %V3M4038 00394000
  586. BR R14 ...AND RETURN TO CALLER %V3M4038 00394300
  587. EJECT 00394600
  588. *---------------------------------------------------------------------* 00395000
  589. * ZAPSEGS - INVALID ALL ENTRIES IN A SEGMENT TABLE * 00396000
  590. * ------------------------------- * 00397000
  591. * GPR 6 = SEGMENT TABLE ORIGIN ADDRESS * 00397300
  592. * GPR 5 = SEGMENT TABLE LENGTH IN BYTES * 00397600
  593. *---------------------------------------------------------------------* 00397900
  594. *. 00398200
  595. *********************************************************************** 00398500
  596. * 00398800
  597. * 00399100
  598. * CP ASSIST INSTRUCTION "ZAPSEGS" - INVALIDATE SHADOW SEG. TABLE 00399400
  599. * 00399700
  600. * 00400000
  601. * OPERANDS: 00400300
  602. * 1 = ADDRESS OF 'ARCHTECT' (ARCHITECTURE CONTROLS TABLE) 00400600
  603. * 2 = ADDRESS OF 'EXTSHCR1' (SHADOW SEGMENT TABLE ORIGIN) 00400900
  604. * 00401200
  605. * REGISTER INPUT: 00401500
  606. * GPR 8 = EXIT ADDRESS 00401800
  607. * GPR 9 = VALUE OF 'EXTARCH' FROM ECBLOK (ARCHITECTURE INDEX) 00402100
  608. * 00402400
  609. * SYSTEM DATA AREAS REFERENCED (BY MODULE WHERE APPLICABLE): 00402700
  610. * DMKPSA - 'APSTAT2' 00402800
  611. * DMKVAT - 'ARCHTECT' TABLE 00403000
  612. * ECBLOK, SHADOW PAGE TABLE, SHADOW SEGMENT TABLE 00403300
  613. * 00403600
  614. * 00403900
  615. * EXITS: 00404200
  616. * 00404500
  617. * 1. ADDRESS IN GPR 8 (NORMAL COMPLETION) 00404800
  618. * 00405100
  619. * REGISTER OUTPUT: NONE CHANGED BY THIS INSTRUCTION 00405400
  620. * 00405700
  621. * 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL COMPLETION) 00406000
  622. * 00406300
  623. * NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT TO A NO-OP. 00406600
  624. * 00406900
  625. *********************************************************************** 00407200
  626. *. 00407500
  627. ZAPSEGS EQU * %V3M4038 00407800
  628. SPACE 00408100
  629. DS 0H EXECUTE CP ASSIST "ZAPSEGS" %V3M4038 00408400
  630. DMKVATZS DC X'E60A',S(ARCHTECT,EXTSHCR1) ***%V3M4038 00408700
  631. SPACE 00409000
  632. L R6,EXTSHCR1 SHADOW SEGTABLE ORIGIN %V3M4038 00409300
  633. LH R5,EXTSHLEN ...LENGTH IN BYTES %V3M4038 00409600
  634. LA R6,0(0,R6) 24 BITS ONLY, PLEASE %V3M4038 00409900
  635. BCTR R5,0 DECREMENT COUNT... %V3M4038 00410200
  636. ALR R5,R6 ...TO MAKE IT A LIMIT %V3M4038 00410500
  637. LA R4,4(0,0) INCREMENT %V3M4038 00410800
  638. ZAPSEG1 EQU * INVALIDATE ONE ENTRY %V3M4038 00411100
  639. OI 3(R6),X'01' SET SEGMENT INVALID %V3M4038 00411400
  640. BAL R14,ZAPPAGE INVALIDATE PAGE TABLE IF THERE %V3M4038 00411700
  641. BXLE R6,R4,ZAPSEG1 DO 'EM ALL %V3M4038 00412000
  642. OI APSTAT2,CPPTLBR SET PTLB REQUIRED FOR THIS %V407594 00412300
  643. L R15,PREFIXB AND OTHER PROCESSOR %V407594 00412320
  644. OI APSTAT2-PSA(R15),CPPTLBR (IF THERE IS ANOTHER) %V407594 00412340
  645. BR R8 AND RETURN %V3M4038 00412600
  646. SPACE 3 00412900
  647. *---------------------------------------------------------------------* 00415000
  648. * BALREXT - EXIT FROM ALL 'BALR' ENTRY POINTS * 00416000
  649. *---------------------------------------------------------------------* 00417000
  650. BALREXT EQU * 00418000
  651. LM R0,R15,BALRSAVE 00419000
  652. BR R14 RETURN TO CALLER 00420000
  653. EJECT 00421000
  654. *. 00422000
  655. * SUBROUTINE NAME - 00423000
  656. * 00424000
  657. * DMKVATRN 00425000
  658. * 00426000
  659. * FUNCTION - 00427000
  660. * 00428000
  661. * TO PROVIDE VIRTUAL-VIRTUAL TO REAL ADDRESS TRANSLATION. 00429000
  662. * 00430000
  663. * ATTRIBUTES - 00431000
  664. * 00432000
  665. * REENTRANT, RESIDENT, CALLED VIA SVC 00433000
  666. * 00434000
  667. * ENTRY POINTS - 00435000
  668. * 00436000
  669. * DMKVATRN - VIRTUAL-VIRTUAL TO REAL ADDRESS 00437000
  670. * DMKVATLA - VIRTUAL-VIRTUAL TO VIRTUAL ADDRESS 00438000
  671. * 00439000
  672. * ENTRY CONDITIONS - 00440000
  673. * 00441000
  674. * GPR 15 = ENTRY POINT ADDRESS 00442000
  675. * GPR 14 = RETURN ADDRESS 00443000
  676. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00444000
  677. * GPR 11 = VMBLOK ADDRESS 00445000
  678. * GPR 3 = VIRTUAL-VIRTUAL ADDRESS REFERENCED 00446000
  679. * 00447000
  680. * EXIT CONDITIONS - 00448000
  681. * 00449000
  682. * GPR 0 = 0 - TRANSLATION SUCCESSFUL 00450000
  683. * GPR 2 = REAL ADDRESS CORRESPONDING TO VIRT-VIRT ADDR 00451000
  684. * OR GPR 0 < 0 - REFLECT PAGING EXCEPTION TO USER 00452000
  685. * AND GPR 1 = INTERRUPT CODE OF EXCEPTION 00453000
  686. * GPRS 3-15 UNCHANGED 00454000
  687. * 00455000
  688. * CALLS TO OTHER ROUTINES - 00456000
  689. * 00457000
  690. * NONE 00458000
  691. * 00459000
  692. * EXTERNAL REFERENCES - 00460000
  693. * 00461000
  694. * NONE 00462000
  695. * 00463000
  696. * TABLES / WORK AREAS - 00464000
  697. * 00465000
  698. * VMBLOK, ECBLOK 00466000
  699. * 00467000
  700. EJECT 00468000
  701. * REGISTER USAGE - 00469000
  702. * 00470000
  703. * GPR 12 = BASE REGISTER 00471000
  704. * GPR 11 = VMBLOK ADDRESSABILITY 00472000
  705. * GPR 10 = ECBLOK ADDRESSABILITY 00473000
  706. * GPR 9 = ARCHITECTURE CONTROL VARIABLE INDEX 00474000
  707. * GPR 7 = VIRTUAL-VIRTUAL ADDRESS REFERENCED 00475000
  708. * GPRS 0-6 = WORK REGISTERS 00476000
  709. * GPRS 13-15 = LINK AND SAVE AREA REGISTERS 00477000
  710. * 00478000
  711. * OPERATION - 00479000
  712. * 00480000
  713. * THE VIRTUAL SEGMENT AND PAGE TABLES ARE REFERENCED TO 00481000
  714. * DETERMINE IF A VIRTUAL PAGING OR TRANSLATION EXCEPTION 00482000
  715. * SHOULD BE REFLECTED TO THE VIRTUAL MACHINE. 00483000
  716. * THE VIRTUAL SEGMENT TABLE IS REFERENCED TO DETERMINE IF THE 00484000
  717. * VIRTUAL SEGMENT IS AVAILABLE. IF IT IS, THE VIRTUAL PAGE 00485000
  718. * TABLES ARE REFERENCED VIA DMKPTRAN AND THE TRANSLATION 00486000
  719. * IS PERFORMED. 00487000
  720. * IF ANY ERROR IN TRANSLATION TABLE FORMAT IS DETECTED 00488000
  721. * DURING THE TRANSLATION PROCESS, STEPS ARE TAKEN TO FORCE 00489000
  722. * A TRANSLATION SPECIFICATION EXCEPTION (PROGRAM INTERRUPT 00490000
  723. * CODE X'12'), OR AN ADDRESSING EXCEPTION - CODE X'05'. 00491000
  724. *. 00492000
  725. SPACE 2 00493000
  726. USING DMKVATLA,R12 00494000
  727. DMKVATLA DS 0D TRANSLATE THIRD-LEVEL TO SECOND-LEVEL 00495000
  728. SLR R0,R0 SET RETURN CODE ZERO RIGHT AWAY 00496000
  729. ENTER 00497000
  730. L R12,=A(DMKVAT) MODULE BASE ADDRESS 00498000
  731. USING DMKVAT,R12 00499000
  732. SPACE 00500000
  733. BAL R6,SETUPAT SETUP FOR TRANSLATE PROCESSING 00501000
  734. BAL R6,CHKFORM VALIDATE C-REG 0 VALUES 00502000
  735. BNZ LRAEXCP NO GOOD -- FORCE TRANS SPEC INTRPT 00503000
  736. LR R7,R3 THIRD-LEVEL ADDRESS TO GR7 00504000
  737. SPACE 00505000
  738. L R1,SEGMASK(R9) SEGMENT MASK FROM TABLE 00506000
  739. LH R2,SEGSHFT(R9) SHIFT COUNT FOR JUSTIFY 00507000
  740. NR R1,R7 EXTRACT SEGMENT NUMBER FROM ADDRESS 00508000
  741. SRL R1,0(R2) SHIFT TO INDEX FORM 00509000
  742. LH R4,EXTVSEGS GET POSSIBLE VIRTUAL SEGTABLE LEN@VA09149 00509100
  743. LTR R4,R4 IS THE SEGTABLE VALID? @VA09149 00509150
  744. BNZ NOTZERO YES,CONTINUE @VA09149 00509200
  745. IC R4,EXTCR1 GET VIRTUAL SEGTABLE LEN CODE @VA09149 00509250
  746. CH R4,MAXSEGS(R9) IS THIS VALUE REASONABLE @VA09149 00509300
  747. BNH COMPSEG YES,USE IT @VA09149 00509350
  748. LH R4,MAXSEGS(R9) NO,USE POSSIBLE MAX @VA09149 00509400
  749. COMPSEG DS 0H @VA09149 00509450
  750. LA R4,1(0,R4) COMPUTE SEGTABLE LENGTH @VA09149 00509500
  751. SLL R4,6(0) IN BYTES............. @VA09149 00509550
  752. CR R1,R4 INDEX WITHIN TABLE LENGTH? @VA09149 00509600
  753. B SHTABLES @VA09149 00509650
  754. NOTZERO DS 0H @VA09149 00509700
  755. CH R1,EXTVSEGS INDEX WITHIN TABLE LENGTH ? 00510000
  756. SHTABLES DS 0H @VA09149 00510500
  757. LA R1,0(R1,R8) POINT TO ACTUAL ENTRY (VIRTUAL) 00511000
  758. BNL LRALNTH OOPS...TABLE LENGTH VIOLATION 00512000
  759. BAL R3,TRANS21 ACCESS THE VIRTUAL SEGTABLE ENTRY 00513000
  760. BC 2,LRADREX OOPS...GENERATED AN INVALID ADDRESS 00514000
  761. L R3,=X'0F000006' "MUST-BE-ZERO" BITS IN SEGTABLE 00515000
  762. L R4,0(0,R2) PICK UP VIRTUAL SEGTABLE ENTRY VALUE 00516000
  763. TM 3(R2),X'01' IS THE SEGMENT AVAILABLE ? @VA03696 00517000
  764. BNZ LRASEGM NO..CC = 1 FOR LRA @VA03696 00518000
  765. NR R3,R4 TEST FOR VALID ENTRY FORMAT 00519000
  766. BNZ LRAEXCP NOPE -- FORCE TRANS SPEC INTRPT 00520000
  767. N R4,=X'00FFFFF8' STRIP ASSORTED BITS FROM ADDRESS 00521000
  768. L R1,PAGEMSK(R9) PAGE NUMBER MASK FROM TABLE 00522000
  769. LH R3,PAGSHFT(R9) SHIFT COUNT FOR JUSTIFY 00523000
  770. NR R1,R7 EXTRACT PAGE NUMBER FROM ADDRESS 00524000
  771. SRL R1,0(R3) CONVERT TO INDEX FORM 00525000
  772. SLR R3,R3 SET TO CHECK LENGTH OF TABLE 00526000
  773. IC R3,0(0,R2) PAGE-TABLE-LENGTH-CODE FROM SEGTABLE 00527000
  774. SRL R3,4(0) ADJUST FROM MACHINE FORMAT 00528000
  775. LA R3,1(0,R3) ...TO INDEX LIMIT IN BYTES 00529000
  776. MH R3,PAGINCR(R9) ... 00530000
  777. CR R1,R3 ENTRY WITHIN THE DEFINED TABLE ? 00531000
  778. LA R1,0(R1,R4) POINT TO ACTUAL ENTRY 00532000
  779. BNL LRALNTH NOPE - LENGTH VIOLATION 00533000
  780. BAL R3,TRANS21 ACCESS THE PAGE-TABLE ENTRY ITSELF 00534000
  781. BC 2,LRADREX OOPS...GENERATED AN INVALID ADDRESS 00535000
  782. LR R3,R1 SAVE THE VIRTUAL ENTRY ADDRESS 00536000
  783. LA R15,LRAEXCP ERROR RETURN FOR INVALID FORMAT 00537000
  784. BAL R14,CHEKPTE VALIDATE AND EXTRACT ADDRESS FROM PTE 00538000
  785. BNZ LRAPAGE PAGE NOT AVAILABLE - CC = 2 00539000
  786. L R1,SEGMASK(R9) SETUP TO PROVIDE THE TRANSLATION 00540000
  787. O R1,PAGEMSK(R9) ... 00541000
  788. NR R1,R7 GR1 = ADDRESS MINUS PAGE-DISPLACEMENT 00542000
  789. XR R7,R1 GR7 = PAGE-DISPLACEMENT ONLY 00543000
  790. ALR R7,R6 ADD PAGE BASE ADDRESS TO DISPLACEMENT 00544000
  791. ST R7,SAVER2 PASS RESULT BACK TO DMKPRVLG 00545000
  792. EXIT , 00546000
  793. EJECT 00547000
  794. USING DMKVATRN,R12 00548000
  795. DMKVATRN DS 0D TRANSLATE THIRD-LEVEL TO FIRST-LEVEL 00549000
  796. SLR R0,R0 SET RETURN CODE ZERO RIGHT AWAY 00550000
  797. ENTER 00551000
  798. L R12,=A(DMKVAT) MODULE BASE ADDRESS 00552000
  799. USING DMKVAT,R12 00553000
  800. SPACE 00554000
  801. BAL R6,SETUPAT SETUP FOR TRANSLATE PROCESSING 00555000
  802. TM VMESTAT,VMBADCR0 IS THE C-REG 0 VALUE VALID ? 00556000
  803. BO GIVE012 NO -- GIVE TRANS SPEC INTERRUPT 00557000
  804. LR R7,R3 THIRD-LEVEL ADDRESS TO GR7 00558000
  805. SPACE 00559000
  806. L R5,SEGMASK(R9) SEGMENT NUMBER MASK 00560000
  807. LH R2,SEGSHFT(R9) SHIFT COUNT FOR JUSTIFY 00561000
  808. NR R5,R7 EXTRACT SEGMENT NUMBER FROM ADDRESS 00562000
  809. SRL R5,0(R2) JUSTIFY FOR USE AS TABLE INDEX 00563000
  810. CH R5,EXTVSEGS IS THE ENTRY WITHIN THE TABLE ? 00564000
  811. BNL GIVE010 NO -- SEGMENT EXCEPTION 00565000
  812. LA R1,0(R5,R8) ADD INDEX TO TABLE BASE ADDRESS (VIRT) 00566000
  813. BAL R3,TRANS21 ACCESS THE VIRTUAL SEGTABLE ENTRY 00567000
  814. BC 2,GIVE005 OOPS...GENERATED AN INVALID ADDRESS 00568000
  815. L R3,=X'0F000006' "MUST-BE-ZERO" BITS IN SEGTABLE 00569000
  816. L R4,0(0,R2) PICK UP VIRTUAL SEGTABLE ENTRY DATA 00570000
  817. STCM R4,B'1000',EXTCOPY SAVE PAGE-TABLE LENGTH CODE 00571000
  818. TM 3(R2),X'01' SEGMENT AVAILABLE ? @VA03696 00572000
  819. BNZ GIVE010 NO..REFLECT SEGMENT EXCEPTION... @VA03696 00573000
  820. NR R3,R4 TEST FOR VALID ENTRY FORMAT 00574000
  821. BNZ GIVE012 NO GOOD -- FORCE TRANS SPEC INTRPT 00575000
  822. N R4,=X'00FFFFF8' STRIP ASSORTED BITS FROM ADDRESS 00576000
  823. L R6,PAGEMSK(R9) PAGE NUMBER MASK FROM TABLE 00577000
  824. LH R3,PAGSHFT(R9) SHIFT COUNT FOR JUSTIFY 00578000
  825. NR R6,R7 EXTRACT PAGE NUMBER FROM ADDRESS 00579000
  826. SRL R6,0(R3) SHIFT FOR USE AS TABLE INDEX 00580000
  827. SLR R3,R3 SETUP TO CHECK FOR LENGTH VIOLATION 00581000
  828. IC R3,0(0,R2) PAGE TABLE LENGTH CODE FROM SEGTABLE 00582000
  829. SRL R3,4(0) ADJUST FROM MACHINE FORMAT 00583000
  830. LA R3,1(0,R3) ...TO INDEX LIMIT IN BYTES 00584000
  831. MH R3,PAGINCR(R9) ... 00585000
  832. CR R6,R3 IS THE ENTRY WITHIN THE DEFINED TABLE ? 00586000
  833. BNL GIVE011 NO -- PAGE EXCEPTION 00587000
  834. LA R1,0(R6,R4) ADD INDEX TO PAGE TABLE BASE ADDRESS 00588000
  835. BAL R3,TRANS21 ACCESS THE PAGE TABLE ENTRY 00589000
  836. BC 2,GIVE005 OOPS...GENERATED AN INVALID ADDRESS 00590000
  837. LR R4,R6 SAVE PAGE TABLE INDEX VALUE 00591000
  838. LA R15,GIVE012 ERROR RETURN FOR INVALID FORMAT 00592000
  839. BAL R14,CHEKPTE VALIDATE AND EXTRACT ADDRESS FROM PTE 00593000
  840. BNZ GIVE011 PAGE EXCEPTION 00594000
  841. L R1,SEGMASK(R9) SETUP FOR ACTUAL TRANSLATION 00595000
  842. O R1,PAGEMSK(R9) ... 00596000
  843. NR R1,R7 GR1 = ADDRESS MINUS PAGE DISPLACEMENT 00597000
  844. XR R7,R1 GR7 = PAGE DISPLACEMENT ALONE 00598000
  845. LR R1,R6 USE PAGE BASE ADDRESS FOR 'TRANS' 00599000
  846. BAL R3,TRANS21 GET VIRTUAL PAGE IN REAL STORAGE 00600000
  847. BC 2,GIVE005 OOPS...GENERATED AN INVALID ADDRESS 00601000
  848. ALR R7,R2 ADD REAL PAGE BASE TO DISPLACEMENT 00602000
  849. ST R7,SAVER2 PASS RESULT BACK TO CALLER 00603000
  850. BAL R8,SHADSET GO FILL IN SHADOW PAGE TABLE ENTRY 00604000
  851. SPACE 00605000
  852. TRNEXIT EQU * RETURN TO CALLER 00606000
  853. EXIT 00607000
  854. SPACE 2 00608000
  855. GIVE005 EQU * RETURN INTERRUPT INDICATOR X'005' 00609000
  856. LA R1,X'05' ADDRESSING EXCEPTION 00610000
  857. B GIVEINT 00611000
  858. GIVE010 EQU * RETURN INTERRUPT INDICATOR X'010' 00612000
  859. LA R1,X'10' SEGMENT-LEVEL EXCEPTION 00613000
  860. B GIVEINT 00614000
  861. GIVE011 EQU * RETURN INTERRUPT INDICATOR X'011' 00615000
  862. LA R1,X'11' PAGE-LEVEL EXCEPTION 00616000
  863. B GIVEINT 00617000
  864. GIVE012 EQU * RETURN INTERRUPT INDICATOR X'012' 00618000
  865. LA R1,X'12' TRANSLATION TABLES INVALID FORMAT 00619000
  866. GIVEINT EQU * INDICATE EXCEPTION RETURN 00620000
  867. LA R0,1(0) FORCE R0 POSITIVE 00621000
  868. ST R0,SAVER0 PASS BACK TO CALLER 00622000
  869. ST R1,SAVER1 ...AS WELL AS R1 VALUE 00623000
  870. B TRNEXIT RETURN STUFF ALREADY IN R1 00624000
  871. SPACE 2 00625000
  872. LRAEXCP LA R6,X'12' TRANSLATION SPECIFICATION EXCEPTION 00626000
  873. B FORCING GO FORCE A VIRTUAL INTERRUPT 00627000
  874. LRADREX LA R6,X'05' ADDRESSING EXCEPTION DURING TRANSLATION 00628000
  875. SPACE 00629000
  876. FORCING L R7,SAVER3 THIRD-LEVEL ADDRESS TO GR7 00630000
  877. SVC 16 RELEASE CALLER'S SAVE AREA 00631000
  878. B VATEXCP ...FORCE INTERRUPT THRU DMKPRGSM 00632000
  879. SPACE 00633000
  880. LRALNTH ST R1,SAVER2 PASS BACK ENTRY ADDRESS 00634000
  881. B GIVE012 ...AND SHOW TABLE LENGTH VIOLATION 00635000
  882. LRASEGM ST R1,SAVER2 PASS BACK SEGTABLE ENTRY ADDRESS 00636000
  883. B GIVE010 ...AND SHOW SEGMENT UNAVAILABLE 00637000
  884. LRAPAGE ST R3,SAVER2 PASS BACK PAGE TABLE ENTRY ADDRESS 00638000
  885. B GIVE011 ...AND SHOW PAGE UNAVAILABLE 00639000
  886. EJECT 00640000
  887. *---------------------------------------------------------------------* 00641000
  888. * SHADSET - FILL IN SHADOW TABLE ENTRY FOR NEW PAGE * 00642000
  889. *---------------------------------------------------------------------* 00643000
  890. SHADSET EQU * 00644000
  891. L R7,EXTSHCR1 SHADOW SEGTABLE ORIGIN REGISTER 00645000
  892. N R7,=X'00FFFFC0' REDUCE TO ACTUAL ADDRESS 00646000
  893. LA R6,0(R5,R7) POINT TO REFERENCED SEGTABLE ENTRY 00647000
  894. TM 3(R6),X'01' IS THE SEGMENT MARKED AVAILABLE ? 00648000
  895. BO SHADCHK NO -- GO SEE IF WE NEED A PAGE TABLE 00649000
  896. SHADPAG EQU * SET PAGE ADDRESS IN PAGE TABLE 00650000
  897. L R7,0(0,R6) PICK UP ACTUAL ENTRY DATA 00651000
  898. LA R7,0(R4,R7) ADD PAGE TABLE INDEX TO PAGE TABLE BASE 00652000
  899. SRL R2,8(0) ADJUST PAGE ADDRESS FOR PTE UPDATE 00653000
  900. LH R3,PTEINCR(R9) SIZE OF PAGE TABLE ENTRY 00654000
  901. N R3,F4 CONVERT TO INDEX 00655000
  902. EX 0,STORPTE(R3) STORE REAL ADDRESS INTO SHADOW PTE 00656000
  903. IC R1,EXTCOPY GET THE LENGTH 00657000
  904. STC R1,0(R6) STORE IN SHADOW SEG TABLE 00658000
  905. BR R8 RETURN TO CALLER 00659000
  906. SPACE 00660000
  907. STORPTE STH R2,0(0,R7) SHORT ENTRIES 00661000
  908. ST R2,0(0,R7) LONG ENTRIES 00662000
  909. SPACE 00663000
  910. SHADCHK EQU * TEST FOR INACTIVE SEGTABLE ENTRY 00664000
  911. BAL R14,ZAPPAGE INVALIDATE PAGE TABLE, IF ANY 00665000
  912. BNZ SHADPAG THERE IS ONE - FILL IT IN 00666000
  913. BAL R3,GETPAGT GET NEW SHADOW PAGE TABLE 00667000
  914. BAL R14,ZAPPAGE ...INVALIDATE IT 00668000
  915. B SHADPAG ...AND FILL IN ONE ENTRY 00669000
  916. EJECT 00670000
  917. *. 00671000
  918. * SUBROUTINE NAME - 00672000
  919. * 00673000
  920. * DMKVATEX 00674000
  921. * 00675000
  922. * FUNCTION - 00676000
  923. * 00677000
  924. * TO SERVICE PAGE OR SEGMENT EXCEPTIONS FOR VIRTUAL EXTENDED- 00678000
  925. * CONTROL MACHINES. 00679000
  926. * 00680000
  927. * ATTRIBUTES - 00681000
  928. * 00682000
  929. * REENTRANT, RESIDENT, INVOKED FROM DMKPRGIN OR DMKPRVLG 00683000
  930. * 00684000
  931. * ENTRY POINTS - 00685000
  932. * 00686000
  933. * DMKVATPX - SERVICE PAGING EXCEPTION FOR V370R 00687000
  934. * DMKVATSX - SERVICE SEGMENT EXCEPTION FOR V370R 00688000
  935. * DMKVATEX - SIMULATE PAGE OR SEGMENT EXCEPTION 00689000
  936. * DMKVATPF - SIMULATE A PSEUDO PAGE FAULT 00690000
  937. * 00691000
  938. * ENTRY CONDITIONS - 00692000
  939. * 00693000
  940. * GPR 12 = ADDRESS OF ENTRY POINT 00694000
  941. * GPR 11 = VMBLOK ADDRESS 00695000
  942. * VIRTUAL MACHINE IS KNOWN TO BE IN EXTENDED-CONTROL MODE 00696000
  943. * AND ADDRESS-TRANSLATION MODE. 00697000
  944. * 00698000
  945. * EXIT CONDITIONS - 00699000
  946. * 00700000
  947. * A PAGE HAS BEEN BROUGHT IN FOR THE VIRTUAL MACHINE, OR 00701000
  948. * A TRANSLATION INTERRUPT HAS BEEN REFLECTED. SHADOW TABLES 00702000
  949. * AND ECBLOK HAVE BEEN UPDATED. 00703000
  950. * 00704000
  951. * CALLS TO OTHER ROUTINES - 00705000
  952. * 00706000
  953. * DMKPTRAN - TO BRING IN A USER PAGE 00707000
  954. * DMKDSPCH - TO RE-DISPATCH VIRTUAL MACHINE 00708000
  955. * DMKPRGSM - TO SIMULATE A PROGRAM INTERRUPT FOR VM 00709000
  956. * 00710000
  957. * EXTERNAL REFERENCES - 00711000
  958. * 00712000
  959. * NONE 00713000
  960. * 00714000
  961. * TABLES / WORK AREAS - 00715000
  962. * 00716000
  963. * ECBLOK, VMBLOK, SHADOW TABLES 00717000
  964. * 00718000
  965. * REGISTER USAGE - 00719000
  966. * 00720000
  967. * GPR 12 = BASE REGISTER 00721000
  968. * GPR 11 = VMBLOK ADDRESSABILITY 00722000
  969. * GPR 10 = ECBLOK ADDRESSABILITY 00723000
  970. * GPR 9 = ARCHITECTURE CONTROL VARIABLE INDEX 00724000
  971. * GPR 7 = VIRTUAL-VIRTUAL ADDRESS REFERENCED 00725000
  972. * GPRS 0-6 = WORK REGISTERS 00726000
  973. * GPRS 13-15 = EXTERNAL LINKAGE REGISTERS 00727000
  974. * 00728000
  975. * OPERATION - 00729000
  976. * 00730000
  977. * THE VIRTUAL SEGMENT AND PAGE TABLES ARE EXAMINED TO 00731000
  978. * DETERMINE IF THE VIRTUAL MACHINE EXPECTS THE PAGE 00732000
  979. * AND/OR SEGMENT TO BE AVAILABLE. IF NOT, THE PAGING 00733000
  980. * INTERRUPT IS REFLECTED TO THE VIRTUAL MACHINE. 00734000
  981. * IF ANY TRANSLATION TABLE OR CONTROL REGISTER FORMAT 00735000
  982. * ERRORS ARE DETECTED, A TRANSLATION SPECIFICATION EXCEPTION 00736000
  983. * (PROGRAM INTERRUPT X'12') IS SIMULATED FOR THE VIRTUAL 00737000
  984. * MACHINE. 00738000
  985. * WHEN THE VIRTUAL MACHINE EXPECTS THE PAGE TO BE IN 00739000
  986. * CORE AND THERE ARE NO ERRORS IN THE TABLES, DMKPTRAN IS 00740000
  987. * CALLED TO BRING THE PAGE INTO REAL MEMORY. SHADOW PAGE 00741000
  988. * TABLES ARE UPDATED AND THE MACHINE IS RE-DISPATCHED VIA 00742000
  989. * GOTO DMKDSPCH. 00743000
  990. * IF PSEUDO PAGE FAULT HANDLING HAS BEEN REQUESTED AND THE 00744000
  991. * 2ND LEVEL MEMORY PAGE IS NOT AVAILABLE, A PSEUDO PAGE FAULT 00745000
  992. * IS REFLECTED TO THE VIRTUAL MACHINE VIA DMKPRGSM. WHEN THE 00746000
  993. * PAGE IS FINALLY AVAILABLE, A PAGE AVAILABLE INTERRUPT WILL 00747000
  994. * BE STACKED FOR DISPATCH, WHICH WILL PRESENT IT AT THE PROPER 00748000
  995. * TIME VIA A GOTO TO DMKVATEX. 00749000
  996. *. 00750000
  997. SPACE 2 00751000
  998. *---------------------------------------------------------------------* 00752000
  999. * SETUPEX - INITIAL SETUP FOR EXCEPTION HANDLING * 00753000
  1000. * SETUPAT - INITIAL SETUP FOR TRANSLATION ROUTINES * 00754000
  1001. *---------------------------------------------------------------------* 00755000
  1002. SETUPEX EQU * SETUP FOR EXCEPTION ROUTINES 00756000
  1003. SLR R13,R13 INDICATE ENTRY VIA 'GOTO' 00757000
  1004. L R7,TREXADD EXCEPTION ADDRESS FROM PSA 00758000
  1005. LOCK OBTAIN,TYPE=SYS,SPIN=NO TRY FOR SYS-LOCK @V407593 00758200
  1006. BZ SETUPAT GOTIT, KEEP GOING @V407593 00758400
  1007. BAL R14,STKDEFER DIDNT GET IT...STACK A DEFER REQ @V407593 00758600
  1008. SETUPAT EQU * SETUP FOR TRANSLATE ROUTINES 00759000
  1009. L R10,VMECEXT EXTENSION BLOCK ADDRESS 00760000
  1010. L R8,EXTCR1 BASE ADDRESS OF VIRTUAL SEGTABLE 00761000
  1011. N R8,=X'00FFFFC0' REDUCE TO ACTUAL ADDRESS 00762000
  1012. LH R9,EXTARCH PICK UP ARCHITECTURE-CONTROL INDEX 00763000
  1013. LTR R13,R13 WHERE DID WE COME FROM ? 00764000
  1014. BCR 7,R6 TRANSLATE ENTRY - RETURN TO ENTRY POINT 00765000
  1015. B SEGMENT EXCEPTION ENTRY - GET VIRTUAL SEGTABLE 00766000
  1016. SPACE 00767000
  1017. TRANS21 EQU * COMMON 'TRANS' FOR SPACE-SAVING 00768000
  1018. TRANS 2,1,OPT=(BRING,DEFER) 00769000
  1019. BR R3 00770000
  1020. EJECT 00771000
  1021. *---------------------------------------------------------------------* 00772000
  1022. * DMKVATSX - INVOKED FROM DMKPRGIN WHEN A SEGMENT EXCEPTION * 00773000
  1023. * IS RECEIVED FOR A VIRTUAL RELOCATE MACHINE. THE VM IS KNOWN * 00774000
  1024. * TO BE IN EXTENDED-CONTROL MODE, TRANSLATE ON. * 00775000
  1025. *---------------------------------------------------------------------* 00776000
  1026. DMKVATSX EQU * 00777000
  1027. USING *,R12 00778000
  1028. L R12,=A(DMKVAT) MODULE BASE ADDRESS 00779000
  1029. USING DMKVAT,R12 00780000
  1030. SPACE 2 00781000
  1031. BAL R6,SETUPEX SET UP FOR EXCEPTION PROCESSING 00782000
  1032. TM VMCXSTAT,VMSTBYPS STBYPASS VR enabled? HRC068DK 00782100
  1033. BO VATEXIT VATSX Reflect seg trans excp HRC068DK 00782200
  1034. SPACE 00783000
  1035. L R2,0(0,R2) ENTRY DATA FROM VIRTUAL SEGTABLE ENTRY 00784000
  1036. STCM R2,B'1000',EXTCOPY SAVE PAGE-TABLE LENGTH CODE 00785000
  1037. L R6,EXTSHCR1 SHADOW SEGTABLE ORIGIN 00786000
  1038. LA R6,0(R5,R6) ADDRESSED SLOT IN SHADOW SEGTABLE 00787000
  1039. BAL R14,ZAPPAGE INVALIDATE PAGE TABLE, IF ANY 00788000
  1040. BNZ VATEXIT THERE IS ONE - ALL DONE 00789000
  1041. BAL R3,GETPAGT ALLOCATE NEW SHADOW PAGE TABLE 00790000
  1042. BAL R14,ZAPPAGE SET PAGE TABLE INVALID 00791000
  1043. B VATEXIT ...AND RETURN VIA DMKDSPCH 00792000
  1044. SPACE 2 00793000
  1045. SEGMENT EQU * LOCATE VIRTUAL SEGTABLE ENTRY 00794000
  1046. TM VMESTAT,VMBADCR0 VALID C-REG 0 VALUE ? 00795000
  1047. BO TRNEXCP NO -- FORCE TRANSLATION EXCEPTION 00796000
  1048. L R5,SEGMASK(R9) SEGMENT NUMBER MASK 00797000
  1049. NR R5,R7 SEG.NO. OF EXCEPTION ADDR. 00798000
  1050. LH R1,SEGSHFT(R9) SHIFT COUNT FOR JUSTIFY 00799000
  1051. SRL R5,0(R1) JUSTIFY SEGMENT NUMBER FOR INDEXING 00800000
  1052. CH R5,EXTVSEGS WITHIN SEGMENT TABLE? 00801000
  1053. BNL SEGEXCP NO - SIMULATE EXCEPTION 00802000
  1054. LA R1,0(R5,R8) ADDRESSED SLOT IN VIRTUAL SEGTABLE 00803000
  1055. BAL R3,TRANS21 GET HIS VIRTUAL SEGTABLE IN CORE 00804000
  1056. BC 2,ADREXCP OOPS... GENERATED AN INVALID ADDRESS 00805000
  1057. TM 3(R2),X'01' SEGMENT AVAILABLE ? @VA03696 00806000
  1058. BNZ SEGEXCP NO..REFLECT SEGMENT EXCEPTION @VA03696 00807000
  1059. TM 0(R2),X'0F' TEST 'MUST-BE-ZERO' BITS IN SEGTABLE 00808000
  1060. BNZ TRNEXCP TRANSLATION SPECIFICATION EXCEPTION 00809000
  1061. TM 3(R2),X'06' ...DITTO 00810000
  1062. BNZ TRNEXCP ...DITTO 00811000
  1063. BR R6 RETURN - EVERYTHING LOOKS O.K. 00812000
  1064. STKDEFER DC 0H'0' HERE TO FILL IN AND STACK @V407593 00812050
  1065. AIF (NOT &AP).APCHK5 00812060
  1066. L R15,VMDFTPNT DEFER BLOCK FOR SYNC. EVENTS @V407593 00812100
  1067. USING CPEXBLOK,R15 WHICH LOOKS LIKE A CPEXBLOCK @V407593 00812150
  1068. STM R0,R15,CPEXREGS SAVE CALLERS REGS. @V407593 00812200
  1069. LA R0,DEFEREND GET RETURN POINT @V407593 00812250
  1070. ST R0,CPEXADD FOR UNSTACK OF DEFER-BLOK @V407593 00812300
  1071. DROP R15 @V407593 00812350
  1072. LR R1,R15 R1 HAS DEFER-BLOK ADDR... @V407593 00812400
  1073. CALL DMKSTKDE AND STACK IT @V407593 00812450
  1074. GOTO DMKDSPRU GO RUN ANOTHER USER V4M0005 00812500
  1075. * HERE ON UNSTACK OF DEFER BLOCK 00812550
  1076. .APCHK5 ANOP 00812560
  1077. DEFEREND BR R14 RETURN TO ORIGINAL CALLER @V407593 00812600
  1078. EJECT 00813000
  1079. *---------------------------------------------------------------------* 00814000
  1080. * DMKVATPX - INVOKED FROM DMKPRGIN WHEN A PAGING EXCEPTION IS * 00815000
  1081. * RECEIVED FOR A VIRTUAL RELOCATE MACHINE. THE VM IS KNOWN * 00816000
  1082. * IS KNOWN TO BE IN EXTENDED-CONTROL MODE, TRANSLATE ON. * 00817000
  1083. *---------------------------------------------------------------------* 00818000
  1084. DMKVATPX EQU * PAGING EXCEPTION ON V370R 00819000
  1085. USING *,R12 00820000
  1086. L R12,=A(DMKVAT) MODULE BASE ADDRESS 00821000
  1087. USING DMKVAT,R12 00822000
  1088. SPACE 2 00823000
  1089. BAL R6,SETUPEX DO VARIOUS SETUP OPERATIONS 00824000
  1090. SPACE 00825000
  1091. SLR R3,R3 00826000
  1092. IC R3,0(0,R2) GET SEGMENT PAGE-TABLE LENGTH CODE 00827000
  1093. SRL R3,4(0) ...RIGHT-JUSTIFIED 00828000
  1094. LA R3,1(0,R3) BUMP ONE FOR ZERO BASE 00829000
  1095. MH R3,PAGINCR(R9) COMPUTE LENGTH IN BYTES 00830000
  1096. L R4,PAGEMSK(R9) PAGE-NUMBER MASK 00831000
  1097. NR R4,R7 EXTRACT PAGE NUMBER FROM VIRTUAL ADDRESS 00832000
  1098. LH R6,PAGSHFT(R9) SHIFT COUNT FOR JUSTIFY 00833000
  1099. SRL R4,0(R6) CONVERT INTO PAGE-TABLE INDEX 00834000
  1100. CR R4,R3 WITHIN VIRTUAL PAGE TABLE LENGTH ? 00835000
  1101. BNL PAGEXCP NO -- SIMULATE PAGE EXCEPTION 00836000
  1102. L R1,0(0,R2) PICK UP PAGE TABLE ADDRESS 00837000
  1103. STCM R1,B'1000',EXTCOPY SAVE PAGE-TABLE LENGTH CODE 00838000
  1104. N R1,=X'00FFFFF8' STRIP RANDOM GARBAGE FROM ENTRY 00839000
  1105. LA R1,0(R4,R1) ACTUAL PAGE TABLE ENTRY ADDRESS 00840000
  1106. BAL R3,TRANS21 GET PAGE TABLE DATA 00841000
  1107. BC 2,ADREXCP OOPS.. GENERATED AN INVALID ADDRESS 00842000
  1108. LA R15,TRNEXCP RETURN FOR TRANSLATION EXCEPTION 00843000
  1109. BAL R14,CHEKPTE IS THE ENTRY VALID? 00844000
  1110. BO PAGEXCP NO - REFLECT INTERRUPT 00845000
  1111. LCTL C1,C1,VMSEG GET SECOND-LEVEL SEGTABLE ORIGIN @V2A3120 00846000
  1112. LRA R2,0(0,R6) TRY FOR PAGE AVAILABLE @V2A3120 00847000
  1113. BNZ CHEKSPF NOPE - MAYBE PSEUDO PAGE FAULT @V2A3120 00848000
  1114. TM VMCXSTAT,VMSTBYPS STBYPASS VR enabled? HRC068DK 00848100
  1115. BO VATEXIT VATPX Just reflect page faultHRC068DK 00848200
  1116. BAL R8,SHADSET GO FILL IN SHADOW PAGE TABLE 00849000
  1117. SPACE 2 00850000
  1118. VATEXIT EQU * FAST DISPATCH EXIT 00851000
  1119. NI VMPEND,X'FF'-VMPERPND 'PER' WILL COME IN AGAIN 00852000
  1120. NI VMRSTAT,X'FF'-VMEXWAIT OUT OF EXECUTION WAIT 00853000
  1121. GOTO DMKDSPCH RETURN TO DISPATCHER 00854000
  1122. EJECT 00855000
  1123. CHEKSPF EQU * TEST FOR 'PAGEX ON', I/O ENABLED @V2A3120 00856000
  1124. LR R1,R6 SECOND-LEVEL ADDRESS TO GR1 @V2A3120 00857000
  1125. LA R2,BRING+DEFER NORMAL PARMS FOR DMKPTRAN @V2A3120 00858000
  1126. TM VMPSTAT,VMPAGEX PSEUDO PAGE FAULTS WANTED ? @V2A3120 00859000
  1127. BZ GETPAGE NO -- JUST GET THE PAGE @V2A3120 00860000
  1128. TM VMPSW,VMIOPND ENABLED FOR I/O INTERRUPTS ?@V2A3120 00861000
  1129. BZ GETPAGE NO -- JUST GET THE PAGE @V2A3120 00862000
  1130. LA R2,BRING DON'T WAIT FOR THE PAGE @V2A3120 00863000
  1131. LA R3,PAGERES RETURN WHEN PAGE IS RESIDENT @V2A3120 00864000
  1132. GETPAGE EQU * START THE PAGE MOVING @V2A3120 00865000
  1133. CALL DMKPTRAN PARMS ARE SET IN GR2 @V2A3120 00866000
  1134. BC 2,ADREXCP VIRTUAL ADDRESSING EXCEPTION @V2A3120 00867000
  1135. BC 4,PSEUDOF PSEUDO PAGE FAULT REQUIRED @V2A3120 00868000
  1136. BAL R8,SHADSET FILL IN THE SHADOW TABLES @V2A3120 00869000
  1137. B VATEXIT RETURN TO THE DISPATCHER @V2A3120 00870000
  1138. SPACE 2 00871000
  1139. PSEUDOF EQU * REFLECT FIRST PSEUDO PAGE FAULT @V2A3120 00872000
  1140. LR R7,R1 EXCEPTION ADDRESS TO GR7 @V2A3120 00873000
  1141. LA R6,X'0014' PROGRAM INTERRUPT CODE X'0014' @V2A3120 00874000
  1142. B VATEXCP SIMULATE VIRTUAL PROGRAM INTRPT @V2A3120 00875000
  1143. EJECT 00876000
  1144. *---------------------------------------------------------------------* 00877000
  1145. * DMKVATPF - PSEUDO PAGE FAULT SUPPORT FOR ECMODE, NON- * 00878000
  1146. * TRANSLATE VIRTUAL MACHINE OPERATION. * 00879000
  1147. *---------------------------------------------------------------------* 00880000
  1148. DMKVATPF DS 0D ENTRY VIA GOTO FROM DMKPRGIN @V2A3120 00881000
  1149. USING DMKVATPF,R12 TEMPORARY ADDRESSABILITY @V2A3120 00882000
  1150. L R12,=A(DMKVAT) MODULE BASE ADDRESSABILITY @V2A3120 00883000
  1151. USING DMKVAT,R12 . . . @V2A3120 00884000
  1152. SPACE 00885000
  1153. L R3,TREXADD SAVE EXCEPTION ADDRESS @VA09054 00886020
  1154. LOCK OBTAIN,TYPE=SYS,SPIN=NO TRY FOR SYS-LOCK @V407593 00886200
  1155. BZ GOTLOCK GOT THE LOCK...KEEP GOING @V407593 00886400
  1156. BAL R14,STKDEFER DIDNT GET IT...STACK A DEFER REQ.@V407593 00886600
  1157. GOTLOCK DS 0H @V407593 00886800
  1158. LR R1,R3 GET BACK ADDRESS OF PAGE @VA09054 00886820
  1159. * EXCEPTION 00886840
  1160. LA R3,PAGERES RETURN WHEN PAGE IS RESIDENT @V2A3120 00887000
  1161. CALL DMKPTRAN,PARM=BRING @VA03696 00888000
  1162. BC 2,ADREXCP VIRTUAL ADDRESSING EXCEPTION @V2A3120 00889000
  1163. BC 4,PSEUDOF PSEUDO PAGE FAULT REQUIRED @V2A3120 00890000
  1164. B VATEXIT PAGE WAS RECLAIMED - JUST EXIT @V2A3120 00891000
  1165. SPACE 2 00892000
  1166. PAGERES DS 0H ENTRY VIA CPEXBLOK FROM DMKPTRAN @V2A3120 00893000
  1167. LR R7,R1 VIRTUAL ADDRESS NOW AVAILABLE @V2A3120 00894000
  1168. ICM R7,8,=X'80' FLAG FOR PAGE NOW AVAILABLE @V2A3120 00895000
  1169. LA R0,PGBSIZE GET STORAGE FOR A PAGE FAULT @V2A3135 00896000
  1170. CALL DMKFREE STACK BLOCK @V2A3135 00897000
  1171. USING PGBLOK,R1 ADDRESSABILITY @V2A3135 00898000
  1172. ST R7,PGADDR SAVE EXCEPTION ADDRESS @V2A3135 00899000
  1173. L R13,VMPGPNT AND STACK PAGE AVAILABLE @V2A3135 00900000
  1174. ST R1,VMPGPNT INTERRUPTS @V2A3135 00901000
  1175. ST R13,PGPNT LIFO @V2A3135 00902000
  1176. OI VMPEND,VMPGPND FLAG PSEUDO PAGE FAULT PENDING @V2A3135 00903000
  1177. GOTO DMKDSPCH ALLOW DISPATCH TO UNSTACK @V2A3135 00904000
  1178. EJECT 00905000
  1179. PAGEXCP EQU * REFLECT PAGING EXCEPTION TO VM 00906000
  1180. LA R6,X'11' PROGRAM INTERRUPT CODE 00907000
  1181. B VATEXCP REFLECT INTERRUPT 00908000
  1182. SEGEXCP EQU * REFLECT SEGMENT EXCEPTION TO VM 00909000
  1183. LA R6,X'10' PROGRAM INTERRUPT CODE 00910000
  1184. B VATEXCP REFLECT INTERRUPT 00911000
  1185. TRNEXCP EQU * TRANSLATION EXCEPTION 00912000
  1186. L R1,VMPSW+4 GET FAILING INSTRUCTION @VA09815 00912100
  1187. LH R2,VMPRGIL ILC IN BYTES @VA09815 00912200
  1188. ALR R1,R2 @VA09815 00912300
  1189. ST R1,VMPSW+4 UPDATE .... @VA09815 00912400
  1190. LA R6,X'12' INTERRUPT CODE 00913000
  1191. B VATEXCP REFLECT INTERRUPT 00914000
  1192. ADREXCP EQU * REFLECT ADDRESSING EXCEPTION TO VM 00915000
  1193. L R1,VMPSW+4 GET FAILING INSTRUCTION @VA08017 00916100
  1194. LH R2,VMPRGIL ILC IN BYTES @VA08017 00916300
  1195. ALR R1,R2 (PSW ADDRESS MAY BE NEG - ILC) @VA08017 00916500
  1196. ST R1,VMPSW+4 UPDATE.... @VA08017 00916700
  1197. LA R6,X'05' ADDRESSING EXCEPTION CODE @VA08017 00916900
  1198. STH R6,INTPR RESET INTERRUPT CODE @VA08017 00917100
  1199. B VATPRGI REFLECT INTERRUPT @VA08017 00917300
  1200. SPACE 2 00918000
  1201. DMKVATEX EQU * ENTRY TO SIMULATE EXCEPTION 00919000
  1202. USING *,R12 00920000
  1203. L R12,=A(DMKVAT) MODULE BASE ADDRESS 00921000
  1204. USING DMKVAT,R12 00922000
  1205. LR R6,R1 INTERRUPT CODE IN R1 00923000
  1206. LR R7,R3 EXCEPTION ADDRESS IN R3 00924000
  1207. SPACE 2 00925000
  1208. VATEXCP EQU * TRANSLATION EXCEPTION OF SOME VARIETY 00926000
  1209. SLR R1,R1 GET USER'S PAGE ZERO 00927000
  1210. BAL R3,TRANS21 GET USER'S PAGE ZERO 00928000
  1211. ST R7,TREXADD-PSA(,R2) EXCEPTION ADDRESS 00929000
  1212. VATPRGI EQU * SIMULATE ADDRESSING EXCEPTION @V2A3120 00930000
  1213. LR R0,R6 INTERRUPT CODE INTO R0 00937000
  1214. GOTO DMKPRGSM GO SIMULATE PROGRAM INTERRUPT 00938000
  1215. EJECT 00939000
  1216. *---------------------------------------------------------------------* 00940000
  1217. * CHEKPTE - DETERMINE IF PAGE TABLE ENTRY IS VALID * 00941000
  1218. * ------------------------------- * 00942000
  1219. * GPR 15= ERROR RETURN IF TABLE FORMAT ERROR * 00943000
  1220. * GPR 9 = INDEX TO ARCHITECTURE TABLES * 00944000
  1221. * GPR 2 = REAL ADDRESS OF PAGE TABLE ENTRY * 00945000
  1222. * ON EXIT: * 00946000
  1223. * GPR 6 = VIRTUAL PAGE ADDRESS FROM PAGE TABLE ENTRY * 00947000
  1224. * CONDITION CODE SET BY 'TM' FOR VALID/INVALID * 00948000
  1225. *---------------------------------------------------------------------* 00949000
  1226. CHEKPTE EQU * CHECK FOR VALID PAGE ENTRY 00950000
  1227. LH R1,PTEINCR(R9) TABLE INCREMENT 00951000
  1228. N R1,F4 CONVERT TO INDEX 00952000
  1229. EX 0,LOADPTE(R1) GET ENTRY INTO R1 00953000
  1230. L R6,=F'-8' CONVENIENT MASK 00954000
  1231. NR R6,R1 STRIP LOW-ORDER BITS FROM VALUE 00955000
  1232. SLL R6,8(0) JUSTIFY FOR ACTUAL ADDRESS 00956000
  1233. LA R6,0(,R6) ENSURE HI-ORDER BYTE IS ZERO @VA04371 00956500
  1234. AH R2,PTEINCR(R9) COMPUTE ADDRESS FOR TEST OF BIT 00957000
  1235. BCTR R2,0 ... 00958000
  1236. IC R1,PINVBIT(R9) PAGE INVALID BIT.. @VA03696 00959000
  1237. EX R1,TESTPTE PAGE AVAILABLE ? @VA03696 00960000
  1238. BNZR R14 NO..RETURN WITH CC SET @VA03696 00961000
  1239. IC R1,ZEROBIT(R9) MUST-BE-ZERO BITS.. @VA03696 00962000
  1240. EX R1,TESTPTE PTE FORMAT ERROR ? @VA03696 00963000
  1241. BNZR R15 REFLECT EXCEPTION.. @VA03696 00964000
  1242. BR R14 PTE OK..CC SET @VA03696 00965000
  1243. LOADPTE LH R1,0(0,R2) SHORT PAGE TABLE ENTRIES 00966000
  1244. L R1,0(0,R2) LONG PAGE TABLE ENTRIES 00967000
  1245. TESTPTE TM 0(R2),*-* CHECK INVALID BIT 00968000
  1246. EJECT 00969000
  1247. ARCHTECT DS 0F ARCHITECTURE VARIABLES TABLE @V3M4038 00969600
  1248. DMKVATAT EQU * EXTERNAL REFERENCE TO TABLES @V3M4038 00970200
  1249. *---------------------------------------------------------------------* 00971000
  1250. * ARCHTECT IS INDEXED WITH C-REG 0, BYTE 1 VALUE AS FOLLOWS: * 00972000
  1251. * * 00973000
  1252. * INDEX X'40' - SMALL PAGE, SMALL SEG, HALFWORD ENTRIES * 00974000
  1253. * X'50' - SMALL PAGE, LARGE SEG, HALFWORD ENTRIES * 00975000
  1254. * X'60' - SMALL PAGE, SMALL SEG, FULLWORD ENTRIES * 00976000
  1255. * X'70' - SMALL PAGE, LARGE SEG, FULLWORD ENTRIES * 00977000
  1256. * X'80' - LARGE PAGE, SMALL SEG, HALFWORD ENTRIES * 00978000
  1257. * X'90' - LARGE PAGE, LARGE SEG, HALFWORD ENTRIES * 00979000
  1258. * X'A0' - LARGE PAGE, SMALL SEG, FULLWORD ENTRIES * 00980000
  1259. * X'B0' - LARGE PAGE, LARGE SEG, FULLWORD ENTRIES * 00981000
  1260. * INDEXES ARE ADJUSTED TO A BASE OF X'40' = X'00' * 00982000
  1261. *---------------------------------------------------------------------* 00983000
  1262. PAGEMSK DC X'0000F800' PAGE NUMBER MASK 00984000
  1263. SEGMASK DC X'01FF0000' SEGMENT NUMBER MASK @VA10408 00985500
  1264. PINVBIT DC X'04' PAGE-INVALID BIT IN PTE 00986000
  1265. ZEROBIT DC X'02' "MUST BE ZERO" BITS IN PTE 00987000
  1266. PAGSHFT DC H'10' SHIFT COUNT FOR PAGE-NO. JUSTIFY 00988000
  1267. SEGSHFT DC H'14' SHIFT COUNT FOR SEG-NO. JUSTIFY 00989000
  1268. PTEINCR DC H'2' HALFWORD PAGE TABLE ENTRIES 00990000
  1269. MAXSEGS DC H'15' MAXIMUM SEGMENT-TABLE LENGTH CODE 00991000
  1270. PAGTLEN DC H'64' MAXIMUM PAGE-TABLE LENGTH (BYTES) 00992000
  1271. PAGINCR DC H'4' INCREMENT OF LENGTH FOR SEGTABLE CODE 00993000
  1272. DS 5H RESERVED FOR FUTURE USE 00994000
  1273. SPACE 00995000
  1274. CODE50 DC X'000FF800' 00996000
  1275. DC X'00F00000' 00997000
  1276. DC X'04',X'02' 00998000
  1277. DC H'10',H'18',H'2' 00999000
  1278. DC H'0',H'1024',H'64' 01000000
  1279. DS 5H 01001000
  1280. SPACE 01002000
  1281. CODE60 DC X'0000F800' 01003000
  1282. DC X'0FFF0000' 01004000
  1283. DC X'04',X'02' 01005000
  1284. DC H'09',H'14',H'4' 01006000
  1285. DC H'255',H'128',H'8' 01007000
  1286. DS 5H 01008000
  1287. SPACE 01009000
  1288. CODE70 DC X'000FF800' 01010000
  1289. DC X'7FF00000' 01011000
  1290. DC X'04',X'02' 01012000
  1291. DC H'09',H'18',H'4' 01013000
  1292. DC H'127',H'2048',H'128' 01014000
  1293. DS 5H 01015000
  1294. SPACE 01016000
  1295. CODE80 DC X'0000F000' 01017000
  1296. DC X'00FF0000' 01018000
  1297. DC X'08',X'06' 01019000
  1298. DC H'11',H'14',H'2' 01020000
  1299. DC H'15',H'32',H'2' 01021000
  1300. DS 5H 01022000
  1301. EJECT 01023000
  1302. CODE90 DC X'000FF000' 01024000
  1303. DC X'00F00000' 01025000
  1304. DC X'08',X'06' 01026000
  1305. DC H'11',H'18',H'2' 01027000
  1306. DC H'0',H'512',H'32' 01028000
  1307. DS 5H 01029000
  1308. SPACE 01030000
  1309. CODEA0 DC X'0000F000' 01031000
  1310. DC X'0FFF0000' 01032000
  1311. DC X'08',X'06' 01033000
  1312. DC H'10',H'14',H'4' 01034000
  1313. DC H'255',H'64',H'4' 01035000
  1314. DS 5H 01036000
  1315. SPACE 01037000
  1316. CODEB0 DC X'000FF000' 01038000
  1317. DC X'7FF00000' 01039000
  1318. DC X'08',X'06' 01040000
  1319. DC H'10',H'18',H'4' 01041000
  1320. DC H'127',H'1024',H'64' 01042000
  1321. DS 5H 01043000
  1322. SPACE 3 01044000
  1323. SEGSIZE DC X'00010000' @VA06156 01044100
  1324. CLRBITS DC X'00FFFFF8' MASK TO CLEAR FLAG BITS - STE @V4M0233 01044200
  1325. LTORG 01045000
  1326. EJECT 01046000
  1327. COPY EQU 01047000
  1328. COPY VMBLOK 01048000
  1329. COPY MICBLOK HRC068DK 01048050
  1330. COPY CORE @VA06156 01048100
  1331. COPY PGBLOK @V2A3135 01049000
  1332. EJECT 01050000
  1333. PSA 01051000
  1334. COPY SAVE 01052000
  1335. END DMKVAT 01053000