User Tools

Site Tools


ibm:vm370-lib:cp:dmkprv.assemble_src

DMKPRV Source

References

Source Listing

DMKPRV.ASSEMBLE.txt
  1. PRV TITLE 'DMKPRV (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 00002000
  3. COPY OPTIONS 00003000
  4. COPY LOCAL 00004000
  5. *. 00005000
  6. * MODULE NAME - 00006000
  7. * 00007000
  8. * DMKPRV 00008000
  9. * 00009000
  10. * CONTENTS - 00010000
  11. * 00011000
  12. * DMKPRVLG - 00012000
  13. *. 00013000
  14. SPACE 4 00014000
  15. DMKPRV START 00015000
  16. ENTRY DMKPRVLG @V202232 00016000
  17. SPACE 00017000
  18. ENTRY DMKPRVNC NO. OF CALLS TO DMKPRVLG @V2B2638 00018000
  19. ENTRY DMKPRVEK INST COUNT FOR X'08' SSK @V2B2638 00019000
  20. ENTRY DMKPRVIK INST COUNT FOR X'09' ISK @V2B2638 00020000
  21. ENTRY DMKPRVMS INST COUNT FOR X'80' SSM @V2B2638 00021000
  22. ENTRY DMKPRVLP INST COUNT FOR X'82' LPSW @V2B2638 00022000
  23. ENTRY DMKPRVDI INST COUNT FOR X'83' DIAG @V2B2638 00023000
  24. ENTRY DMKPRVMN INST COUNT FOR X'AC' STNSM @V2B2638 00024000
  25. ENTRY DMKPRVMO INST COUNT FOR X'AD' STOSM @V2B2638 00025000
  26. ENTRY DMKPRVLR INST COUNT FOR X'B1' LRA @V2B2638 00026000
  27. ENTRY DMKPRVCP INST COUNT FOR X'B202' STIDP @V2B2638 00027000
  28. ENTRY DMKPRVCH INST COUNT FOR X'B203' STIDC @V2B2638 00028000
  29. ENTRY DMKPRVTE INST COUNT FOR X'B204' SCK @V2B2638 00029000
  30. ENTRY DMKPRVCE INST COUNT FOR X'B206' SCKC @V2B2638 00030000
  31. ENTRY DMKPRVCT INST COUNT FOR X'B207' STCKC @V2B2638 00031000
  32. ENTRY DMKPRVPE INST COUNT FOR X'B208' SPT @V2B2638 00032000
  33. ENTRY DMKPRVPT INST COUNT FOR X'B209' STPT @V2B2638 00033000
  34. ENTRY DMKPRVEP INST COUNT FOR X'B20A' SPKA @V2B2638 00034000
  35. ENTRY DMKPRVIP INST COUNT FOR X'B20B' IPK @V2B2638 00035000
  36. ENTRY DMKPRVPB INST COUNT FOR X'B20D' PTLB @V2B2638 00036000
  37. ENTRY DMKPRVRR INST COUNT FOR X'B213' RRB @V2B2638 00037000
  38. ENTRY DMKPRVTC INST COUNT FOR X'B6' STCTL @V2B2638 00038000
  39. ENTRY DMKPRVLC INST COUNT FOR X'B7' LCTL @V2B2638 00039000
  40. ENTRY DMKPRVCS INST COUNT FOR X'BA' CS @V2B2638 00040000
  41. ENTRY DMKPRVCD INST COUNT FOR X'BB' CDS @V2B2638 00041000
  42. ENTRY DMKPRVMA ADDRESS OF EXPANDED VMA LIST @V3M4026 00042000
  43. ENTRY DMKPRVVP COUNT FOR SPT'S BY EVMA @V3M4026 00043000
  44. ENTRY DMKPRVVC COUNT FOR SCKC'S BY EVMA @V3M4026 00044000
  45. ENTRY DMKPRVVL COUNT FOR LPSW'S BY EVMA @V3M4026 00045000
  46. ENTRY DMKPRVVS COUNT FOR SIO/SIOF'S BY EVMA @V3M4026 00046000
  47. ENTRY DMKPRVVM COUNT FOR SSM/STXSM'S BY EVMA @V3M4026 00047000
  48. EXTRN DMKDSPA,DMKDSPB 00048000
  49. EXTRN DMKVSIEX,DMKPRGSM @VA05037 00049000
  50. EXTRN DMKHVCAL,DMKTMRTN 00050000
  51. EXTRN DMKPERIL 00051000
  52. AIF (NOT &TRACE(6)).NTR1 **AIF** 00052000
  53. EXTRN DMKTRCPV,DMKTRCPB 00053000
  54. .NTR1 ANOP 00054000
  55. EXTRN DMKPSAFP CHECK FOR FETCH PROTECTION @V202232 00055000
  56. EXTRN DMKPSASP CHECK FOR STORAGE PROTECTION @V202232 00056000
  57. EXTRN DMKSCNVU RETURNS VCHBLOK,VCUBLOK,VDEVBLOK.@VMD0103 00057000
  58. EXTRN DMKVATAB 00058000
  59. EXTRN DMKVATRN,DMKVATLA 00059000
  60. EXTRN DMKVATEX 00060000
  61. EJECT 00061000
  62. EXTRN DMKSTKDE TO STACK/DEFER @V407593 00062000
  63. AIF (NOT &AP).DSPRU4 00063000
  64. EXTRN DMKDSPRU DISP ON OTHER PROCESSOR @V407593 00064000
  65. EXTRN DMKLOKSY GLOBAL SYSTEM LOCK @V407508 00065000
  66. .DSPRU4 ANOP 00066000
  67. *. 00067000
  68. * SUBROUTINE NAME - 00068000
  69. * 00069000
  70. * DMKPRVLG - 00070000
  71. * 00071000
  72. * FUNCTION - 00072000
  73. * 00073000
  74. * TO PERFORM THE SIMULATION OF A PRIVILEGED OPERATION. 00074000
  75. * 00075000
  76. * ATTRIBUTES - 00076000
  77. * 00077000
  78. * REENTRANT, RESIDENT, ENTERED VIA GOTO FROM DMKPRGIN 00078000
  79. * 00079000
  80. * ENTRY POINTS - 00080000
  81. * 00081000
  82. * DMKPRVLG 00082000
  83. * 00083000
  84. * ENTRY CONDITIONS - 00084000
  85. * 00085000
  86. * GPR 12 = ADDRESS OF DMKPRVLG 00086000
  87. * 00087000
  88. * EXIT CONDITIONS - 00088000
  89. * 00089000
  90. * THE PRIVILEGED INSTRUCTION HAS BEEN SIMULATED; 00090000
  91. * CONTROL RETURNS TO THE USER VIA DMKDSPCH OR DMKDSPA. 00091000
  92. * 00092000
  93. * CALLS TO OTHER ROUTINES - 00093000
  94. * 00094000
  95. * DMKPTRAN - TO HANDLE PAGING EXCEPTIONS 00095000
  96. * DMKDSPCH - TO RE-DISPATCH VIRTUAL MACHINE WHEN POSSIBLE 00096000
  97. * DMKDSPA - FOR IMMEDIATE RE-DISPATCH OF VIRTUAL MACHINE 00097000
  98. * DMKDSPB - FOR VALIDATION OF A NEW VIRTUAL PSW AND 00098000
  99. * SUBSEQUENT RE-DISPATCH OF THE VIRTUAL MACHINE 00099000
  100. * DMKVSIEX - TO PROCESS VIRTUAL I/O INSTRUCTIONS 00100000
  101. * DMKHVCAL - TO PROCESS HYPERVISOR CALL INSTRUCTION 00101000
  102. * DMKTMRTN - TO PROCESS CLOCK AND TIMER INSTRUCTIONS 00102000
  103. * DMKPRGSM - TO REFLECT A PROG. INT. TO VIRT-MACH 00103000
  104. * DMKTRCPV - TO TRACE VIRTUAL PRIVILEGED INSTRUCTIONS 00104000
  105. * DMKVATAB - TO INVALIDATE SHADOW PAGE TABLES 00105000
  106. * DMKVATRN - TO TRANSLATE VIRTUAL-VIRTUAL ADDRESSES TO REAL 00106000
  107. * DMKVATLA - TO TRANSLATE VIRTUAL-VIRTUAL ADDRESS TO VIRTUAL 00107000
  108. * DMKVATEX - TO SIMULATE A RELOCATION INTERRUPT 00108000
  109. * DMKPSAFP - TO CHECK FOR FETCH PROTECTION 00109000
  110. * DMKPSASP - TO CHECK FOR STORAGE PROTECTION 00110000
  111. * DMKSCNVU - FROM UNIT ADDR IT RETURNS VCHBLOK,VCUBLOK,VDEVBLOK. 00111000
  112. * 00112000
  113. * EXTERNAL REFERENCES - 00113000
  114. * 00114000
  115. * NONE 00115000
  116. * 00116000
  117. * TABLES / WORK AREAS - 00117000
  118. * 00118000
  119. * NONE 00119000
  120. * 00120000
  121. EJECT 00121000
  122. * REGISTER USAGE - 00122000
  123. * 00123000
  124. * GPR 12 = BASE REGISTER 00124000
  125. * GPR 13 = SECOND BASE REGISTER @VMD0133 00125000
  126. * GPR 11 = VMBLOK ADDRESSABILITY 00126000
  127. * GPR 10 = ECBLOK ADDRESSABILITY 00127000
  128. * GPRS 8,9 INTERNAL LINK REGISTERS 00128000
  129. * GPRS 0-7, 14-15 ARE WORK REGISTERS @VMD0133 00129000
  130. * 00130000
  131. * NOTES - 00131000
  132. * 00132000
  133. * FOR CERTAIN PRIVILEGED INSTRUCTIONS, THE VIRTUAL MACHINE MUST 00133000
  134. * HAVE THE EC-MODE OPTION (THAT IS, VMV370R FLAGBIT IN VMPSTAT 00134000
  135. * MUST = 1) - OTHERWISE AN OPERATION EXCEPTION IS REFLECTED. 00135000
  136. * THESE INCLUDE: LRA, PTLB, RRB, STNSM, AND STOSM. 00136000
  137. * 00137000
  138. * 'RDD' AND 'WRD' ARE HANDLED AS INVALID OPERATIONS AND 00138000
  139. * AN OPERATION EXCEPTION PROGRAM INTERRUPT IS SIMULATED. 00139000
  140. * 00140000
  141. * ALL SIMULATED PROGRAM INTERRUPTS ARE REFLECTED TO THE 00141000
  142. * VIRTUAL MACHINE VIA GOTO TO DMKPRGSM, EXCEPT AS EXPLICITLY 00142000
  143. * STATED IN THE SECTION BELOW. 00143000
  144. * 00144000
  145. * OPERATION - 00145000
  146. * 00146000
  147. * FOR ALL INSTRUCTIONS WHICH ARE SIMULATED, ISSUE A MONITOR 00147000
  148. * CALL CLASS 5 CODE 0 TO COLLECT SIMULATION DATA (IF ACTIVELY 00148000
  149. * ENABLED). 00149000
  150. * 00150000
  151. * IF THE INTERRUPTING INSTRUCTION IS A DIAGNOSE (X'83'), 00151000
  152. * DMKHVCAL IS INVOKED TO PERFORM THE SIMULATION. 00152000
  153. * 00153000
  154. * IF THE INTERRUPT IS AN INVALID OPERATION CODE, THE 00154000
  155. * PROGRAM INTERRUPT IS REFLECTED TO THE VIRTUAL MACHINE. 00155000
  156. * 00156000
  157. * IF THE PRIVILEGED OPERATION IS AN INPUT-OUTPUT REQUEST, 00157000
  158. * DMKPRVLG INVOKES THE VIRTUAL MACHINE I/O EXECUTIVE 00158000
  159. * PROGRAM, DMKVSIEX. 00159000
  160. * 00160000
  161. * IF THE VIRTUAL MACHINE HAS REQUESTED TRACING OF NON-I/O 00161000
  162. * PRIVILEGED INSTRUCTIONS, DMKTRCPV IS CALLED TO PERFORM 00162000
  163. * THE TRACING FUNCTION. 00163000
  164. * 00164000
  165. * IF THE PRIVILEGED INSTRUCTION IS ANY OF THE CLOCK 00165000
  166. * OR TIMER INSTRUCTIONS (I.E. SCK, SCKC, STCKC, SPT, STPT), 00166000
  167. * DMKTMRTN IS INVOKED TO PERFORM THE INSTRUCTION SIMULATION 00167000
  168. * AND CLOCK-QUEUE MAINTENANCE. 00168000
  169. * 00169000
  170. * FOR UNRECOGNIZABLE PRIVILEGED OPERATIONS, DMKPRVLG WILL 00170000
  171. * SIMULATE AN OPERATION EXCEPTION PROGRAM INTERRUPT. 00171000
  172. * 00172000
  173. EJECT 00173000
  174. * IF THE PRIVILEGED OPERATION IS NONE OF THE ABOVE, SIMULATION 00174000
  175. * PROCEEDS WITHIN DMKPRVLG, AS FOLLOWS: 00175000
  176. * 00176000
  177. * SSM - A CHECK IS MADE TO DETERMINE IF BIT 1 OF VIRTUAL 00177000
  178. * CONTROL REGISTER ZERO (SSM SUPPRESSION FEATURE) IS SET 00178000
  179. * TO ONE, AND IF SO A PROGRAM INTERRUPT CODE X'13' IS 00179000
  180. * SIMULATED FOR THE VIRTUAL MACHINE. OTHERWISE, THE NEW 00180000
  181. * SYSTEM MASK IS INSERTED IN THE VIRTUAL PSW. 00181000
  182. * 00182000
  183. * STNSM, STOSM - THE CURRENT VIRTUAL SYSTEM MASK IS STORED 00183000
  184. * IN THE SPECIFIED VIRTUAL STORAGE LOCATION AND THEN ALTERED 00184000
  185. * WITH THE IMMEDIATE BYTE OF THE INSTRUCTION. 00185000
  186. * 00186000
  187. * LPSW - THE ADDRESS SPECIFIED IS CHECKED FOR BOUNDARY ALIGNMENT 00187000
  188. * AND A SPECIFICATION EXCEPTION IS REFLECTED IF INCORRECT. 00188000
  189. * THE NEW PSW IS MOVED INTO THE VIRTUAL PSW. 00189000
  190. * 00190000
  191. * EXECUTE - THE INSTRUCTION POINTED TO BY THE INTERRUPTING 00191000
  192. * INSTRUCTION IS SUBSTITUTED FOR THE EXECUTE INSTRUCTION, 00192000
  193. * WITH THE SECOND BYTE OF THE NEW INSTRUCTION MODIFIED BY THE 00193000
  194. * LOW-ORDER BYTE OF THE REGISTER SPECIFIED IN THE EXECUTE, 00194000
  195. * UNLESS THE REGISTER SPECIFIED IS REGISTER ZERO. THE 00195000
  196. * NEW INSTRUCTION IS DECODED FOR SIMULATION. 00196000
  197. * 00197000
  198. * STIDP - THE ADDRESS SPECIFIED IS CHECKED FOR BOUNDARY 00198000
  199. * ALIGNMENT AND A SPECIFICATION EXCEPTION IS SIMULATED IF 00199000
  200. * IT IS INCORRECT. A REAL 'STIDP' IS PERFORMED INTO THE 00200000
  201. * SPECIFIED VIRTUAL STORAGE LOCATION AND THE CPU MODEL 00201000
  202. * NUMBER FIELD IS MODIFIED BY X'F000' TO INDICATE THAT 00202000
  203. * IT IS A VIRTUAL CPU. 00203000
  204. * 00204000
  205. * LCTL, STCTL OPERATE NORMALLY ON VIRTUAL CONTROL REGISTER 0 00205000
  206. * AND ON BIT 2 (I/O EXTENDED LOGOUT MASK) OF CONTROL REGISTER 14 00206000
  207. * FOR ALL VIRTUAL MACHINES. ANY REFERENCE TO THE OTHER 00207000
  208. * CONTROL REGISTERS IS IGNORED UNLESS THE VIRTUAL MACHINE 00208000
  209. * IS ALLOWED THE EXTENDED-CONTROL FEATURE. A FULL SET 00209000
  210. * OF SIXTEEN CONTROL REGISTERS IS MAINTAINED FOR VIRTUAL 00210000
  211. * EXTENDED-CONTROL MACHINES, SUCH THAT ANY OF THEM MAY BE 00211000
  212. * LOADED AND STORED BY THE VIRTUAL MACHINE. CURRENTLY ONLY 00212000
  213. * CONTROL REGISTERS 0, 1, 2, 3 ARE EXAMINED BY THE 00213000
  214. * CONTROL PROGRAM. (BIT 2 OF C-REG 14 IS EXAMINED, BUT A 00214000
  215. * SEPARATE COPY OF THAT BIT IS KEPT IN THE VMBLOK AND ONLY THAT 00215000
  216. * COPY IS EXAMINED.) FLAGS ARE SET IN THE VMBLOK IF EITHER 00216000
  217. * CONTROL REGISTER 0 OR 1 IS LOADED, TO PERMIT VIRTUAL 00217000
  218. * ADDRESS TRANSLATION TABLE MAINTENANCE BY DMKVATAB. 00218000
  219. * 00219000
  220. * ISK - IF THE VIRTUAL PAGE REFERENCED IS IN REAL CORE, 00220000
  221. * AN 'ISK' IS PERFORMED ON THE REAL STORAGE BLOCK, THE 00221000
  222. * REAL KEY IS OR'ED WITH THE VIRTUAL KEY IN THE SWAP- 00222000
  223. * TABLE ENTRY AND IS PLACED IN THE SPECIFIED REGISTER. 00223000
  224. * IF THE VIRTUAL PAGE IS NOT IN CORE, THE KEY IS EXTRACTED 00224000
  225. * FROM THE SWAP-TABLE ENTRY FOR THE PAGE AND RETURNED TO THE 00225000
  226. * VIRTUAL MACHINE IN THE REGISTER SPECIFIED. 00226000
  227. * FOR EXTENDED-CONTROL VIRTUAL MACHINES, A FULL SEVEN-BIT KEY 00227000
  228. * IS RETURNED, OTHERWISE ONLY 5 BITS ARE RETURNED. 00228000
  229. * 00229000
  230. EJECT 00230000
  231. * SSK - IF THE VIRTUAL PAGE IS IN REAL CORE, AN ISK IS 00231000
  232. * PERFORMED ON THE REAL STORAGE BLOCK REFERENCED, THE REAL 00232000
  233. * REFERENCE AND CHANGE BITS ARE STORED IN THE BACKUP BITS 00233000
  234. * IN THE SWAP-TABLE ENTRY FOR THE VIRTUAL PAGE REFERENCED, 00234000
  235. * THE NEW STORAGE KEY IS STORED IN THE SWAP-TABLE ENTRY 00235000
  236. * WITH THE REFERENCE AND CHANGE BITS ZERO IF THE VIRTUAL 00236000
  237. * MACHINE IS NOT ALLOWED THE EXTENDED-CONTROL FEATURE, OR 00237000
  238. * UNCHANGED IF THE FEATURE IS ALLOWED, AND THE REAL STORAGE 00238000
  239. * KEY IS SET WITH THE HIGH-ORDER FOUR BITS OF THE NEW KEY 00239000
  240. * AND THE FETCH-PROTECT, REFERENCE, AND CHANGE BITS ZERO. 00240000
  241. * IF THE VIRTUAL PAGE IS NOT IN REAL CORE, THE NEW KEY IS 00241000
  242. * STORED IN THE SWAP-TABLE ENTRY FOR THAT PAGE. 00242000
  243. * 00243000
  244. * THE FOLLOWING INSTRUCTIONS ARE EXTENDED-CONTROL-MODE INSTRUCTIONS 00244000
  245. * AND WILL CAUSE AN OPERATION EXCEPTION TO BE REFLECTED TO THE 00245000
  246. * VIRTUAL MACHINE UNLESS THE MACHINE IS ALLOWED THE EXTENDED- 00246000
  247. * CONTROL FEATURE. OPERATION OF THE INSTRUCTIONS IN BC-MODE 00247000
  248. * MAY OR MAY NOT BE THE SAME AS IN EC-MODE, DEPENDING ON THE 00248000
  249. * PARTICULAR INSTRUCTION. 00249000
  250. * 00250000
  251. * LRA - A CALL IS MADE TO DMKVATLA TO TRANSLATE THE THIRD- 00251000
  252. * LEVEL ADDRESS INTO A SECOND-LEVEL ADDRESS, AND THE 00252000
  253. * CONDITION CODE AND REGISTER VALUES ARE SET ACCORDING TO 00253000
  254. * RETURN CODES FROM DMKVATLA. 00254000
  255. * 00255000
  256. * PTLB - THE VIRTUAL ADDRESS TRANSLATION SHADOW TABLES ARE 00256000
  257. * MARKED INVALID VIA A CALL TO DMKVATAB. 00257000
  258. * 00258000
  259. * RRB - IF THE VIRTUAL PAGE IS NOT IN REAL CORE, THE VIRTUAL 00259000
  260. * REFERENCE BIT IN THE SWAP-TABLE ENTRY IS SET ZERO AND THE 00260000
  261. * CONDITION CODE SET TO INDICATE THE INITIAL STATUS OF THE 00261000
  262. * VIRTUAL REFERENCE AND CHANGE BITS. IF THE VIRTUAL PAGE IS 00262000
  263. * IN REAL CORE, AN ISK IS PERFORMED ON THE REAL STORAGE BLOCK, 00263000
  264. * THE REAL REFERENCE AND CHANGE BITS ARE STORED IN THE BACKUP 00264000
  265. * BITS OF THE SWAP-TABLE ENTRY AND THE CONDITION CODE 00265000
  266. * IS SET TO INDICATE THE STATUS OF THE REAL REFERENCE AND 00266000
  267. * CHANGE BITS OR'ED WITH THE VIRTUAL REFERENCE AND CHANGE 00267000
  268. * BITS. THE REAL REFERENCE AND CHANGE BITS ARE RESET TO ZERO 00268000
  269. * VIA AN SSK, AND THE VIRTUAL REFERENCE BIT IS RESET TO ZERO. 00269000
  270. * 00270000
  271. * THE FOLLOWING INSTRUCTIONS ARE SIMULATED. IPK AND SPKA ARE 00271000
  272. * PRIVILEDGED INSTRUCTIONS WHILE CS AND CDS ARE 00272000
  273. * NON-PRIVLEDGED INSTRUCTIONS. THE CS AND CDS 00273000
  274. * INSTRUCTION SIMULATION TAKES PLACE ONLY ON THOSE 00274000
  275. * CPU'S NOT EQUIPED WITH THE HARDWARE CONDITIONAL- 00275000
  276. * SWAPPING FEATURE. 00276000
  277. * 00277000
  278. * SPKA - A BRANCH IS MADE TO ROUTINE 'INSTADR' TO OBTAIN BASE 00278000
  279. * PLUS DISPLACEMENT. UPON RETURN THE NEW STORAGE KEY IS STORED 00279000
  280. * IN THE VIRTUAL PSW AND EXIT IS MADE VIA "FASTER" FOR FAST 00280000
  281. * REFLECT BACK TO THE DISPATCHER. 00281000
  282. * 00282000
  283. * IPK - THE STORAGE KEY IS EXTRACTED FROM THE VIRTUAL PSW AND 00283000
  284. * STORED AS PER SPECIFICATIONS IN GENERAL PURPOSE REGISTER 2. 00284000
  285. * 00285000
  286. * CS AND CDS - THE FIRST AND THIRD OPERANDS ARE CHECK FOR PROPER 00286000
  287. * REGISTER SPECIFICATION AND THE SECOND OPERAND IS CHECKED 00287000
  288. * FOR PROPER BOUNDARY ALIGNMENT. A SPECIFICATION EXCEPTION IS 00288000
  289. * REFLECTED IF INCORRECT. DEPENDING ON THE RESULTS OF THE 00289000
  290. * COMPARE, EITHER FETCH PROTECTION OR STORAGE PROTECTION IS 00290000
  291. * CHECKED FOR THE SECOND OPERAND. IF IT IS INCORRECT, A 00291000
  292. * STORAGE PROTECTION CHECK IS REFLECTED TO THE VIRTUAL 00292000
  293. * MACHINE. IF NO ERRORS ARE FOUND, THE SWAP TAKES PLACE 00293000
  294. * BETWEEN THE OPERANDS, DEPENDING UPON THE COMPARE. 00294000
  295. * 00295000
  296. * THE NORMAL OPERATION OF THE INSTRUCTIONS SIMULATED, WHILE 00296000
  297. * INCLUDED IN THE ABOVE INFORMATION, SHOULD BE VERIFIED 00297000
  298. * BY REFERENCE TO THE SYSTEM/360 AND SYSTEM/370 PRINCIPLES 00298000
  299. * OF OPERATION, FORMS GA22-6821 AND GA22-7000, RESPECTIVELY. 00299000
  300. * 00300000
  301. EJECT 00301000
  302. * FOR ALL INSTRUCTIONS WHICH REFERENCE DATA AREAS IN VIRTUAL 00302000
  303. * STORAGE (I.E. SSM, STNSM, STOSM, LPSW, EX, STIDP, STIDC, 00303000
  304. * LCTL, STCTL, CS, CDS), THE ADDRESS GENERATED FROM THE 00304000
  305. * INSTRUCTION IS EXAMINED FOR VALIDITY AND AN ADDRESSING 00305000
  306. * EXCEPTION IS SIMULATED IF THE ADDRESS IS OUTSIDE OF VIRTUAL 00306000
  307. * STORAGE. IF THE INSTRUCTION WAS EXECUTED BY AN ECMODE MACHINE 00307000
  308. * RUNNING IN VIRTUAL TRANSLATE MODE, DMKVATRN IS CALLED TO 00308000
  309. * TRANSLATE THE THIRD-LEVEL ADDRESS TO A FIRST-LEVEL ADDRESS. 00309000
  310. * PAGE, SEGMENT, OR TRANSLATION EXCEPTIONS ARE REFLECTED 00310000
  311. * TO THE VIRTUAL MACHINE IF THERE IS AN ERROR RETURN FROM 00311000
  312. * DMKVATRN. IN THE SPECIFIC CASES OF 'ISK', 'SSK', AND 'RRB', 00312000
  313. * SECOND-LEVEL ADDRESSES ARE REQUIRED EVEN IF THE INSTR- 00313000
  314. * UCTION IS EXECUTED FROM THIRD-LEVEL STORAGE, SUCH THAT NO 00314000
  315. * CALL TO DMKVATRN IS REQUIRED. 00315000
  316. * 00316000
  317. * VIRTUAL STORAGE PROTECTION KEYS ARE EXAMINED BY DMKPSASP 00317000
  318. * FOR ANY INSTRUCTIONS WHICH MODIFY VIRTUAL STORAGE (I.E. 00318000
  319. * STNSM, STOSM, STIDP, STIDC, STCTL, CS, CDS). A PROTECTION 00319000
  320. * EXCEPTION IS SIMULATED FOR THE FIRTUAL MACHINE IF THE KEYS 00320000
  321. * DISAGREE. 00321000
  322. * 00322000
  323. * SIMILARLY, FOR PRIV OPS FOR WHICH FETCH PROTECTION APPLIES, 00323000
  324. * (VIZ. SSM, LCTL, CS, & CDS), DMKPSAFP IS CALLED TO CHECK 00324000
  325. * THE VIRTUAL STORAGE KEY (INCLUDING THE FETCH PROTECT BIT); IF 00325000
  326. * THE FETCH PROTECT BIT IS SET AND THE KEYS DISAGREE, A 00326000
  327. * PROTECTION EXCEPTION IS SIMULATED. 00327000
  328. * 00328000
  329. * RE-DISPATCH OF THE VIRTUAL MACHINE WHEN INSTRUCTION SIMULATION 00329000
  330. * IS COMPLETE IS PERFORMED VIA GOTO TO EITHER DMKDSPCH OR 00330000
  331. * DMKDSPA ('FAST REFLECT'). ALL PRIVILEGED INSTRUCTIONS ARE 00331000
  332. * 'ELIGIBLE' FOR FAST REFLECT UNDER THE FOLLOWING CONDITIONS: 00332000
  333. * (1) DMKPTRAN HAS NOT BEEN CALLED DURING SIMULATION. 00333000
  334. * (2) VIRTUAL C-REGS 0,1,2,3 HAVE NOT CHANGED (ECMODE ONLY) 00334000
  335. * (3) PSW SYSTEM MASK, EC-MODE BIT, WAIT-STATE BIT HAVE 00335000
  336. * NOT CHANGED. 00336000
  337. * 00337000
  338. *. 00338000
  339. EJECT 00339000
  340. *---------------------------------------------------------------------* 00340000
  341. * * 00341000
  342. * SIMULATE PRIVILEGED OPERATIONS FOR VIRTUAL MACHINES * 00342000
  343. * * 00343000
  344. *---------------------------------------------------------------------* 00344000
  345. *. 00345000
  346. *********************************************************************** 00346000
  347. * 00347000
  348. * 00348000
  349. * EXPANDED VMA PARTIAL INSTRUCTION EMULATION FUNCTION: 00349000
  350. * 00350000
  351. * INVOKED BY THESE INSTRUCTIONS WHEN EXECUTED IN PROBLEM STATE 00351000
  352. * WITH CONTROL REGISTER 6 BYTE 0 SET TO THE SPECIFIED VALUE: 00352000
  353. * LPSW, SIO, SIOF, SSM - B'10XXXX1X' (X = 0 OR 1) 00353000
  354. * SCKC, SPT, STNSM, STOSM - B'10X0XX1X' (X = 0 OR 1) 00354000
  355. * AND THE APPROPRIATE INDIVIDUAL CONTROLS IN THE ASSIST 00355000
  356. * CONTROL WORD (OFFSET X'14' INTO MICBLOK) SET TO 1: 00356000
  357. * BIT 0 LPSW BIT 2 SCKC/SPT 00357000
  358. * BIT 3 SIO/SIOF BIT 4 SSM/STNSM/STOSM 00358000
  359. * 00359000
  360. * REGISTER INPUT: 00360000
  361. * CR 6 = BITS 0-7 ARE THE ASSIST FLAGS; BITS 8-28 ADDRESS 00361000
  362. * THE MICBLOK (THE VIRTUAL MACHINE POINTER LIST) 00362000
  363. * 00363000
  364. * SYSTEM DATA AREAS REFERENCED (BY MODULE WHERE APPLICABLE): 00364000
  365. * DMKPRV - 'DMKPRVMA' (EQUALS 'VMALIST') 00365000
  366. * DMKPSA - 'AVMALIST', 'PRNPSW', CPCREGS, TIMER FIELDS, 00366000
  367. * TRACING INFORMATION, 'CPSTATUS', 'PROPSW' 00367000
  368. * MICBLOK, VCHBLOK, VCUBLOK, VDEVBLOK, VMBLOK 00368000
  369. * 00369000
  370. * 00370000
  371. * EXIT TO 'DMKDSPB' OR 'DMKDSPCH' (IF LPSW, SSM, STNSM, STOSM) 00371000
  372. * NOTE: THE CONTENT OF ANY UNSPECIFIED GPR IS UNPREDICTABLE 00372000
  373. * REGISTER OUTPUT: 00373000
  374. * CR 0 = VALUE FROM 'CPCREG0' 00374000
  375. * CR 8 = VALUE FROM 'CPCREG8' 00375000
  376. * GPR 11 = X'A8' LESS THAN 'MICVPSW' (ADDRESS OF VMBLOK) 00376000
  377. * GPR 12 = ADDRESS OF 'DMKDSPB' OR 'DMKDSPCH' 00377000
  378. * 00378000
  379. * SEE DMKTMR FOR MORE INFORMATION ON THE EMULATION DONE FOR 00379000
  380. * INSTRUCTIONS SCKC AND SPT, SEE DMKVSI FOR SIO AND SIOF... 00380000
  381. * 00381000
  382. *********************************************************************** 00382000
  383. *. 00383000
  384. SPACE 00384000
  385. DMKPRVLG EQU * ENTRY FROM 'DMKPRGIN' %V3M4038 00385000
  386. USING PSA,R0 %V3M4038 00386000
  387. USING VMBLOK,R11 %V3M4038 00387000
  388. USING *,R12,R13 %VMD0133 00388000
  389. LA R13,4095(R12) ESTABLISH SECOND BASE REGISTER %VMD0133 00389000
  390. LA R13,1(R13) %VMD0133 00390000
  391. LCTL C0,C1,RUNCR0 RELOAD C-REGS 0 AND 1 FOR 'LRA' %V3M4038 00391000
  392. COUNT DMKPRVNC MP-SAFE INCR. TO COUNTER %V407593 00392000
  393. LA R6,1 INCREMENT VALUE FOR LATER %V3M4038 00393000
  394. L R1,PROPSW+4 INSTERRUPTION ADDRESS %V3M4038 00394000
  395. LA R1,0(R1) CLEAR HIGH ORDER BYTE %VA08621 00395100
  396. LH R3,INTPR INTUPT CODE %VA08621 00395200
  397. LH R4,INTPRL INSTRUCTIO LENGTH %VA08621 00395300
  398. SR R1,R4 GET START OF INST %VA08621 00395400
  399. LRA R2,0(0,R1) GET REAL ADDR OF INST %VA08621 00395500
  400. LA R7,VMINST ADDR OF VMBLOK %VA08621 00395600
  401. LR R5,R1 COPY ADDR %VA08621 00395700
  402. N R5,F4095 GET PAGE DISPLACEMENT %VA08621 00395800
  403. AR R5,R4 ADD INST LENGTH %VA08621 00395900
  404. S R5,F4096 LESS ONE PAGE %VA08621 00396000
  405. BP PRVSLO WHOOPS CROSSED A PAGE %VA08621 00396100
  406. SR R4,R6 DECREMENT FOR EXEC %VA08621 00396200
  407. EX R4,PRVMOV MOVE IN DATA %VA08621 00396300
  408. B LOADCNTL DONE %VA08621 00396400
  409. PRVMOV MVC 0(*-*,R7),0(R2) *EXECUTED* %VA08621 00396500
  410. SPACE 1 00396600
  411. PRVSLO EQU * %VA08621 00396700
  412. SR R5,R4 FIND OUT HOW MUCH OF THIS %VA08621 00396800
  413. LCR R5,R5 PAGE TO MOVE IN %VA08621 00396900
  414. SR R5,R6 DECREMENTFOR MOVE %VA08621 00397000
  415. EX R5,PRVMOV MOVE IN PART WAY %VA08621 00397100
  416. AR R5,R6 BUMP LENGTH %VA08621 00397200
  417. LR R8,R1 R1 TO R8 %VA08621 00397300
  418. AR R1,R5 BUMP SOURCE POINTER %VA08621 00397400
  419. AR R7,R5 BUMP SINK POINTER %VA08621 00397500
  420. SR R5,R4 FIND OUT HOW MUCH %VA08621 00397600
  421. LCR R5,R5 IS LEFT TO MOVE %VA08621 00397700
  422. LRA R2,0(0,R1) IS 2ND PART IN STORAGE %VA08621 00397800
  423. BZ PRVRCHK NO NEED FOR PTRAN %VA08621 00397900
  424. LA R2,BRING+DEFER SET PARMS FOR PTR %VA08621 00398000
  425. LCTL C0,C0,CPCREG0 GET CP CR0 %VA08621 00398100
  426. BAL R14,LOCKET GET SYSTEM LOCK %VA08621 00398200
  427. CALL DMKPTRAN %VA08621 00398300
  428. BC 2,ADDREXCP NOT IN OUR BOX %VA08621 00398400
  429. PRVRCHK SR R5,R6 DECR FOR EXEC %VA08621 00398500
  430. LR R1,R8 R8 BACK TO R1 %VA08621 00398600
  431. EX R5,PRVMOV MOVE IN DATA %VA08621 00398700
  432. LOADCNTL EQU * %VA08621 00398800
  433. LH R2,VMPRGIL GET FOR LATER TEST OF INST SIZE %VA08621 00398900
  434. LCTL C0,C0,CPCREG0 SET NORMAL VM/370 ARCH. CONTROLS %V3M4038 00410000
  435. LCTL C1,C1,VMSEG ...AND USE THE STANDARD SEGTABLE %V3M4038 00411000
  436. TM VMTRCTL,X'FF' ANY TRACE REQUESTED? %V407593 00413000
  437. BNZ TRACTIVE YES...LOCK IT OR STACKIT.. %V407593 00414000
  438. TM VMESTAT,VMPERCM PER ACTIVE??? %V407593 00415000
  439. BZ NOTRPER NO, SKIP THE LOCK/STACK %V407593 00416000
  440. TRACTIVE BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 00417000
  441. * RETURN HERE WITH LOCK HELD 00418000
  442. NOTRPER BCT R3,GETINST NO BR. IF INTPR = 1 (OP. EXCPT.) %V4M0108 00419000
  443. B OPSIM ELSE GOTO SIMULATE OP. EXCEPTION @V407593 00420000
  444. SPACE 2 00421000
  445. GETINST EQU * %V3M4038 00422000
  446. CLI VMINST,X'9C' CHECK FOR I/O INSTRUCTION %V3M4038 00423000
  447. BL INSTLOW NOPE %V3M4038 00424000
  448. CLI VMINST,X'9F' ... %V3M4038 00425000
  449. BH INSTHIH NOPE %V3M4038 00426000
  450. MC MNCOSIM,MNCLINST CLASS INST, CODE SIMULATION %VA08858 00427000
  451. GOTO DMKVSIEX OFF TO V-I/O EXECUTIVE %V3M4038 00428000
  452. SPACE 3 00429000
  453. * 00430000
  454. * COMMON ROUTINE TO OBTAIN SYS-LOCK. ENTERED BY 00431000
  455. * BAL R14,LOCKET 00432000
  456. * 00433000
  457. LOCKET EQU * TEST IF LOCK ALREADY HELD @V407593 00434000
  458. AIF (NOT &AP).APCHK4 00435000
  459. TM APSTAT1,APUOPER IS THIS AN AP SYSTEM? @V407508 00436000
  460. BNOR R14 NO, RETURN TO CALLER @V407508 00437000
  461. L R15,=A(DMKLOKSY+2) GET ADDRESS OF SYSTEM LOCK @V407508 00438000
  462. CLC LPUADDR,0(R15) IS THE SYSTEM LOCK HELD? @V407508 00439000
  463. BCR 8,R14 YES, LOCK HELD @V407593 00440000
  464. LOCK OBTAIN,TYPE=SYS,SPIN=NO,SAVE @V407593 00441000
  465. BCR 8,R14 GOT THE LOCK, RETURN TO CALLER @V407593 00442000
  466. L R15,VMDFTPNT LOCK NOT OBTAINABLE,... @V407593 00443000
  467. USING CPEXBLOK,R15 GET DEFERRED EXECUTION-BLOCK, @V407593 00444000
  468. STM R0,R14,CPEXREGS SAVE CALLERS REGS @V407593 00445000
  469. LA R14,LOCKRTN GET ADDR OF EXECUTION RETURN PT @V4M0130 00446000
  470. ST R14,CPEXADD AND EXECUTION RETURN POINT @V407593 00447000
  471. DROP R15 IS IN REG 14 @V407593 00448000
  472. LR R1,R15 AND DEFER EXECUTION OF @V407593 00449000
  473. CALL DMKSTKDE @V407593 00450000
  474. GOTO DMKDSPRU @V407508 00451000
  475. LOCKRTN DS 0H DEFERRED EXECUTION RETURN POINT @V4M0130 00452000
  476. LCTL C1,C1,VMSEG RELOAD CONTROL REG 1 AFTER DEFER @V4M0130 00453000
  477. .APCHK4 ANOP 00454000
  478. BR R14 RETURN TO CALLER @V4M0130 00455000
  479. SPACE 2 00456000
  480. EJECT 00457000
  481. *---------------------------------------------------------------------* 00458000
  482. * 'FASTER' - FAST REFLECT VIA 'DMKDSPA' * 00459000
  483. * 'PRIVRET' - NORMAL RETURN VIA 'DMKDSPCH' * 00460000
  484. *---------------------------------------------------------------------* 00461000
  485. FASTER EQU * 00462000
  486. NI VMRSTAT,255-VMEXWAIT OUT OF INSTR WAIT. PER001 00462500
  487. TM VMPEND,VMPERPND IS THERE A PENDING "PER" EVENT ? 00463000
  488. BNZ PRIVRET DMKDSP WILL CHECK FOR PER PENDING. PER001 00464000
  489. GOTO DMKDSPA FAST REFLECT 00472000
  490. SPACE 00473000
  491. PRIVRET EQU * 00474000
  492. NI VMRSTAT,255-VMEXWAIT RESET INSTRUCTION WAIT %V408246 00475000
  493. GOTO DMKDSPCH GO TO GROUND ZERO %V4M0156 00476000
  494. EJECT 00477000
  495. SPECEXCP EQU * SPECIFICATION EXCEPTION 00478000
  496. LA R0,X'06' INTERRUPT CODE 00479000
  497. B ERREFLCT 00480000
  498. SPACE 00481000
  499. OPEREXCP EQU * OPERATION EXCEPTION 00482000
  500. LA R0,X'01' INTERRUPT CODE 00483000
  501. B ERREFLCT 00484000
  502. SPACE 00485000
  503. PROTEXCP EQU * PROTECTION EXCEPTION 00486000
  504. LA R0,X'04' INTERRUPT CODE 00487000
  505. B ERREFLCT 00488000
  506. SPACE 00489000
  507. ADDREXCP EQU * REFLECT ADDRESSING EXCEPTION 00490000
  508. LA R0,X'05' INTERRUPT CODE 00491000
  509. SPACE 2 00492000
  510. ERREFLCT EQU * REFLECT PROGRAM INTERRUPT 00493000
  511. GOTO DMKPRGSM SIMULATE PROGRAM INTERRUPT 00504000
  512. EJECT 00505000
  513. *---------------------------------------------------------------------* 00506000
  514. * DECODE PRIVILEGED INSTRUCTION FOR SIMULATION * 00507000
  515. *---------------------------------------------------------------------* 00508000
  516. SPACE 1 00509000
  517. OPSIM CLI VMINST,X'BA' IS IT COMPARE AND SWAP ? @VA03148 00510000
  518. BE PRCS YES, SIMULATE IT @VA03148 00511000
  519. CLI VMINST,X'BB' IS IT COMPARE DOUBLE AND SWAP? @VA03148 00512000
  520. BE PRCDS YES, SIMULATE IT @VA03148 00513000
  521. CLI VMINST,X'44' IS IT EXECUTE MAYBE ? @V200198 00514000
  522. BNE CHEKPROB GO CHECK PROBLEM STATE @VA03148 00515000
  523. COUNT DMKPRVEX MP-SAFE INCR. TO COUNTER @V407593 00516000
  524. LA R6,1 SET INCREMENT FOR INST COUNT @V2B2638 00518000
  525. LA R1,1 INDEXING IS ALLOWED @VM08556 00519000
  526. BAL R9,GETADDR GET INSTRUCTION ADDRESS @VM08556 00520000
  527. LH R4,0(0,R2) GET FIRST HALFWORD @VM08556 00521000
  528. IC R5,VMINST+1 CHECK MODIFIER @VM08556 00522000
  529. SRL R5,2(0) REG. NUM. * 4 @VM08556 00523000
  530. N R5,F60 CHECK FOR MODIFIER @VM08556 00524000
  531. BZ SKMODIF ZERO - NO MODIFIER @VM08556 00525000
  532. IC R5,VMGPRS+3(R5) EXTRACT THE MODIFIER BYTE @VA01985 00526000
  533. OR R4,R5 MODIFY INSTRUCTION @VM08556 00527000
  534. SKMODIF STH R4,VMINST STORE NEW INSTRUCTION @VM08556 00528000
  535. CLI VMINST,X'BA' IS IT COMPARE AND SWAP? @VA08990 00528100
  536. BE CONTOPCK YES, CONTINUE WITH CHECK @VA08990 00528200
  537. CLI VMINST,X'BB' IS IT COMPARE DOUBLE AND SWAP? @VA08990 00528300
  538. BE CONTOPCK YES, CONTINUE WITH CHECK @VA08990 00528400
  539. CLI VMINST,X'B2' IS IT SPKA OR IPK? @VA08990 00528500
  540. BNE OPEREXCP NONE OF THE ABOVE---OP CHECK @VA08990 00528600
  541. CONTOPCK EQU * @VA08990 00528700
  542. LA R3,2(0,R3) INDEX TO 2'ND HALF OF INST. @VM08556 00529000
  543. BAL R8,ADTRANS GET ITS REAL ADDRESS @VM08556 00530000
  544. LH R4,0(,R2) GET 2'ND HALF OF INST. @VM08556 00531000
  545. STH R4,VMINST+2 SAVE IN VMBLOK @VM08556 00532000
  546. SLR R2,R2 DON'T ALLOW TRACE OF INST. @VM08556 00533000
  547. B OPSIM PROCESS NEW INST. @VM08556 00534000
  548. CHEKPROB TM VMPSW+1,PROBMODE VIRTUAL PROBLEM STATE ? @VA03148 00535000
  549. BO OPEREXCP YES, REFLECT OPERATION EXECPTION @VA03148 00536000
  550. CLC =X'B20A',VMINST IS IT SPKA ? @VA03148 00537000
  551. BE INSTHIH YES, HANDLE AS IF PRIV OP. @VA03148 00538000
  552. CLC =X'B20B',VMINST IS IT IPK ? @VA03148 00539000
  553. BE INSTHIH YES, SIMULATE AS IF PRIV OP. @VA03148 00540000
  554. B OPEREXCP REFLECT OPERATION EXCEPTION @VA03148 00541000
  555. SPACE 1 00542000
  556. INSTLOW EQU * OPCODE LT X'9C' %V3M4038 00543000
  557. AIF (NOT &TRACE(6)).NTR2 **AIF** 00544000
  558. TM VMTRCTL,VMTRPRV+VMTRBRIN TRACING EITHER TYPE? %V3M4038 00545000
  559. BZ OFFTRAKL NO %V3M4038 00546000
  560. BAL R4,CHKTRA1 CALL TRACING SUPERVISOR (MAYBE) 00547000
  561. OFFTRAKL EQU * COMPLETE DECODING %V3M4038 00548000
  562. .NTR2 ANOP 00549000
  563. CLI VMINST,X'44' IS IT EXECUTE? %V3M4038 00550000
  564. BL PRSKEY NO - "ISK", "SSK" %V3M4038 00551000
  565. BE PREXEC YES - "EX" %V3M4038 00552000
  566. * R2 IS STILL CLEAN FOR 'IC' 00553000
  567. * 00554000
  568. * VERIFY THAT THE OP-CODE IS WITHIN THE RANGE OF THE INDEX TABLE 00555000
  569. * 00556000
  570. CLI VMINST,X'80' LOWER LIMIT OF TABLE %V3M4038 00557000
  571. BL OPEREXCP IF LOWER, REFLECT OPER EXCEPTION %V3M4038 00558000
  572. CLI VMINST,X'85' UPPER LIMIT %V3M4038 00559000
  573. BH OPEREXCP IF HIGHER, OPERATION EXCEPTION %V3M4038 00560000
  574. SPACE 00561000
  575. MC 0,5 CLASS 5, CODE 0 INST. SIMULATION %V3M4038 00562000
  576. IC R2,VMINST GET OP-CODE %V3M4038 00563000
  577. IC R2,INDTAB-X'80'(R2) LOCATE PROPER COUNTER INDEX %V3M4038 00564000
  578. LA R2,CNTTAB1(R2) ADDR, OF CNTR TO R2 %V407593 00565000
  579. COUNT 0(R2) MP-SAFE INCR. TO COUNTER %V407593 00566000
  580. SLR R2,R2 INSURE R2 IS STILL CLEAN %V407508 00567000
  581. IC R2,VMINST RE-OBTAIN OP CODE %V3M4038 00568000
  582. IC R2,DECODEL-X'80'(R2) DECODE '80'-GROUP %V3M4038 00569000
  583. B BRACHLO(R2) GO TO SIMULATE ROUTINE %V3M4038 00570000
  584. BRACHLO EQU * 00571000
  585. B OPEREXCP 00572000
  586. SSM B PRSSM "SSM" - X'80' %V3M4038 00573000
  587. LPSW B PRLPSW "LPSW" - X'82' %V3M4038 00574000
  588. WRD B OPEREXCP "WRD" - X'84' (NOT SUPPORTED) 00575000
  589. RDD B OPEREXCP "RDD" - X'85' (NOT SUPPORTED) 00576000
  590. DIAG BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @VA07545 00577000
  591. * RETURN HERE WITH LOCK HELD. 00578000
  592. * THIS SUBROUTINE IS A NO-OP IN UP 00579000
  593. * MODE. 00580000
  594. GOTO DMKHVCAL @VA07223 00581000
  595. EJECT 00582000
  596. INSTHIH EQU * OPCODE GT X'9F' %V3M4038 00583000
  597. AIF (NOT &TRACE(6)).NTR3 **AIF** 00584000
  598. TM VMTRCTL,VMTRPRV TRACING PRIVILEGED OPS. ? %V3M4038 00585000
  599. BZ OFFTRAKH NO %V3M4038 00586000
  600. BAL R4,CHKTRA2 CALL TRACING SUPERVISOR (PROBABLY) 00587000
  601. OFFTRAKH EQU * COMPLETE DECODING %V3M4038 00588000
  602. .NTR3 ANOP 00589000
  603. * R2 STILL CLEAN FOR 'IC' 00590000
  604. * 00591000
  605. * VERIFY THAT THE OP-CODE IS WITHIN THE RANGE OF THE INDEX TABLE 00592000
  606. * 00593000
  607. CLI VMINST,X'AC' LOWER LIMIT OF TABLE %V3M4038 00594000
  608. BL OPEREXCP IF LOWER, GIVE OPER EXCEPTION %V3M4038 00595000
  609. CLI VMINST,X'B7' UPPER LIMIT %V3M4038 00596000
  610. BH OPEREXCP IF HIGHER, OPERATION EXCEPTION %V3M4038 00597000
  611. SPACE 00598000
  612. PRVMCB MC MNCOSIM,MNCLINST CLASS INST, CODE SIMULATION %V3M4038 00599000
  613. IC R2,VMINST PICK UP OP-CODE %V3M4038 00600000
  614. IC R2,INDTAB-X'AC'(R2) LOCATE PROPER COUNTER INDEX %V3M4038 00601000
  615. LA R2,CNTTAB2(R2) ADDR OF CNTR TO R2 %V407593 00602000
  616. COUNT 0(R2) MP-SAFE INCR. TO COUNTER. %V407593 00603000
  617. SLR R2,R2 INSURE R2 IS STILL CLEAN %V407508 00604000
  618. IC R2,VMINST RE-OBTAIN THE OP CODE %V3M4038 00605000
  619. IC R2,DECODEH-X'AC'(R2) %V3M4038 00606000
  620. B BRANCHI(R2) GO TO SIMULATE ROUTINE %V3M4038 00607000
  621. BRANCHI EQU * 00608000
  622. B OPEREXCP 00609000
  623. STNSM B PSTSSM "STNSM", "STOSM" %V3M4038 00610000
  624. STCTL B PSTCTL "STCTL" - X'B6' 00611000
  625. LCTL B PRLCTL "LCTL" - X'B7' 00612000
  626. LRA B PRLRA "LRA" - X'B1' 00613000
  627. SPACE 00614000
  628. AIF (NOT &TRACE(6)).NTR4 **AIF** 00615000
  629. EJECT 00616000
  630. CHKTRA1 DS 0H DETERMINE WHETHER TO CALL DMKTRCPV: 00617000
  631. * (R4 = RETURN-REGISTER) 00618000
  632. TM VMTRCTL,VMTRPRV SPECIFICALLY "PRIV" TRACING WANTED ? 00619000
  633. BO CHKTRA2 YES - GO TO IT. 00620000
  634. CLI VMINST,X'82' JUST VMTRBRIN - IS THIS AN LPSW ? 00621000
  635. BCR 7,R4 <BNE> NOPE - FORGET IT. 00622000
  636. L R15,VMTREXT YES - REFERENCE TRACE CONTROL BLOCK 00623000
  637. USING TREXT,R15 ... 00624000
  638. CLC TREXIN1(8),FFS INSTRUCTION TRACING ALREADY SET UP ? 00625000
  639. BCR 7,R4 <BNE> YES - NOT NECESSARY TO CALL TRACER. 00626000
  640. CLI TREXNSI,00 LPSW OR EX-LPSW ALREADY HANDLED BY DMKTRC 00627000
  641. BCR 7,R4 <BNE> YES - NOT NECESSARY TO CALL TRACER. 00628000
  642. DROP R15 00629000
  643. CHKTRA2 DS 0H CALL TRACER (UNLESS ALREADY CALLED) ... 00630000
  644. LTR R2,R2 IF R2=0, THIS WAS AN EXECUTED INSTRUCTION 00631000
  645. BCR 8,R4 <BZ> IF YES, DON'T CALL THE TRACER AGAIN. 00632000
  646. CALL DMKTRCPV CALL TRACING SUPERVISOR 00633000
  647. LCTL C1,C1,VMSEG RESTORE CR1 @VA03185 00634000
  648. BR R4 AND RETURN TO OFFTRAKL OR OFFTRAKH. 00635000
  649. .NTR4 ANOP 00636000
  650. EJECT 00637000
  651. BEETWOS EQU * 'B2XX' DECODING %V3M4038 00638000
  652. CLI VMINST+1,X'13' DO WE HAVE A VALID MODIFIER? %V3M4038 00639000
  653. BH OPEREXCP NO, BRANCH %V3M4038 00640000
  654. IC R2,VMINST+1 PICK UP MODIFIER BYTE %V3M4038 00641000
  655. IC R2,INDTAB(R2) PICK UP PROPER COUNTER INDEX %V3M4038 00642000
  656. LA R2,DMKPRVB2(R2) ADDR OF CNTR TO R2 %V407593 00643000
  657. COUNT 0(R2) MP-SAFE INCR. TO COUNTER %V407593 00644000
  658. SLR R2,R2 INSURE R2 IS STILL CLEAN %V407508 00645000
  659. IC R2,VMINST+1 RE-OBTAIN THE MODIFIER BYTE %V3M4038 00646000
  660. IC R2,DECODB2(R2) %V3M4038 00647000
  661. B BRACHB2(R2) GO TO PROCESS %V3M4038 00648000
  662. BRACHB2 EQU * 00649000
  663. B OPEREXCP 00650000
  664. STIDP B PSTIDP STORE CPU ID 00651000
  665. STIDC B PSTIDC STORE CHANNEL ID 00652000
  666. PTLB B PRPTLB PURGE TLB 00653000
  667. RRB B PRVRRB RESET REF. BIT 00654000
  668. SPKA B PRSPKA SET PSW KEY FROM ADDRESS @V200198 00655000
  669. IPK B PRVIPK INSERT PSW KEY INTO REG 2 @V200198 00656000
  670. GOTOTMR GOTO DMKTMRTN %V3M4038 00657000
  671. SPACE 3 00658000
  672. DECODEL EQU * DECODE OPS X'80'-X'85' 00659000
  673. DC AL1(SSM-BRACHLO) X'80' 00660000
  674. DC AL1(0) X'81' 00661000
  675. DC AL1(LPSW-BRACHLO) X'82' 00662000
  676. DC AL1(DIAG-BRACHLO) X'83' 00663000
  677. DC AL1(WRD-BRACHLO) X'84' 00664000
  678. DC AL1(RDD-BRACHLO) X'85' 00665000
  679. SPACE 2 00666000
  680. DECODEH EQU * DECODE OPS X'AC'-X'B7' 00667000
  681. DC 2AL1(STNSM-BRANCHI) X'AC',X'AD' 00668000
  682. DC 3AL1(0) X'AE','AF','B0' 00669000
  683. DC AL1(LRA-BRANCHI) X'B1' 00670000
  684. DC AL1(BEETWOS-BRANCHI) X'B2XX' 00671000
  685. DC 3AL1(0) X'B3','B4','B5' 00672000
  686. DC AL1(STCTL-BRANCHI) X'B6' 00673000
  687. DC AL1(LCTL-BRANCHI) X'B7' 00674000
  688. SPACE 2 00675000
  689. DECODB2 EQU * DECODE 'B2XX' INSTRUCTIONS 00676000
  690. DC 2AL1(0) 'B200','B201' 00677000
  691. DC AL1(STIDP-BRACHB2) 'B202' 00678000
  692. DC AL1(STIDC-BRACHB2) 'B203' 00679000
  693. DC AL1(GOTOTMR-BRACHB2) 'B204' @V2B2638 00680000
  694. DC AL1(0) 'B205' (NON PRIVLEDGED) @V2B2638 00681000
  695. DC 4AL1(GOTOTMR-BRACHB2) 'B206' - 'B209' @V2B2638 00682000
  696. DC AL1(SPKA-BRACHB2) 'B20A' @V200198 00683000
  697. DC AL1(IPK-BRACHB2) 'B20B' @V200198 00684000
  698. DC AL1(0) NOT SUPPORTED @V200198 00685000
  699. DC AL1(PTLB-BRACHB2) 'B20D' 00686000
  700. DC 5AL1(0) 'B20E' THRU 'B212' 00687000
  701. DC AL1(RRB-BRACHB2) 'B213' 00688000
  702. DS 0H 00689000
  703. EJECT 00690000
  704. PREXEC EQU * EXECUTE INSTRUCTION 00691000
  705. COUNT DMKPRVEX MP-SAFE INCR. TO COUNTER @V407593 00692000
  706. LA R1,1 INDEXING ALLOWED 00693000
  707. BAL R9,GETADDR GET INSTRUCTION ADDRESS 00694000
  708. LH R4,0(0,R2) FIRST HALFWORD 00695000
  709. IC R5,VMINST+1 CHECK MODIFIER 00696000
  710. SRL R5,2(0) REG. NO. * 4 00697000
  711. N R5,F60 00698000
  712. BZ NOMODIF ZERO - NO MODIFIER 00699000
  713. IC R5,VMGPRS+3(R5) MODIFIER BYTE 00700000
  714. OR R4,R5 MODIFY INSTRUCTION 00701000
  715. NOMODIF EQU * @VA13186 00702100
  716. STH R4,VMINST SET IN VMBLOK @VA13186 00702200
  717. LA R3,2(0,R3) INDEX TO 2ND HALF OF VIRT INST @VA13186 00702300
  718. BAL R8,ADTRANS NOW GET ITS REAL ADDRESS @VA13186 00702400
  719. LH R4,0(,R2) GET THE REAL STUFF.... @VA13186 00702500
  720. STH R4,VMINST+2 AND STUFF IT AWAY @VA13186 00702600
  721. * BEGINNING OF LOGIC TO SUPPORT 6 BYTE 'EXECUTED' INSTRUCTIONS 00702700
  722. * THAT ARE PRIV OPS 00702800
  723. TM VMINST,X'C0' * IS THIS A SIX BYTE INST? @VA13186 00702900
  724. BNO SKIP3RD * NO...BRANCH @VA13186 00703000
  725. LA R3,2(0,R3) INDEX TO 3'RD HALFWORD OF INST. @VA13186 00703100
  726. BAL R8,ADTRANS GET ITS REAL ADDRESS @VA13186 00703200
  727. LH R4,0(,R2) PICK UP 3RD HALFWORD OF INST. @VA13186 00703300
  728. STH R4,VMINST+4 SAVE IN VMBLOK @VA13186 00703400
  729. SKIP3RD DS 0H @VA13186 00703500
  730. * END OF 6 BYTE INSTRUCTION SUPPORT 00703600
  731. SLR R2,R2 TELL TRACE TO FORGET IT @VA13186 00703700
  732. B GETINST NOW PROCESS THE STUFF @VA13186 00703800
  733. SPACE 2 00710000
  734. PRLPSW EQU * LOAD PSW INSTRUCTION %V3M4038 00711000
  735. TM VMTRCTL,VMTRBRIN INSTRUCTION TRACING SET? %VA05533 00712000
  736. BNO PRLPSW1 NO, SKIP FOLLOWING TEST %VA05533 00713000
  737. L R15,VMTREXT GET ADDRESS OF TRACE BLOCK @VA05533 00714000
  738. USING TREXT,R15 @VA05533 00715000
  739. NI TREXFLAG,255-TREXNDSP RESET DISPATCH TRACE CALL @VA05533 00716000
  740. DROP R15 @VA05533 00717000
  741. PRLPSW1 SLR R1,R1 NO INDEXING %VA05533 00718000
  742. BAL R8,INSTADR COMPUTE VIRTUAL ADDRESS %V3M4038 00719000
  743. LA R4,7 MASK TO CHECK BOUNDARY ALIGNMENT %V3M4038 00720000
  744. NR R4,R3 ON DBL-WD BOUNDARY? %V3M4038 00721000
  745. BNZ SPECEXCP NOPE - INTERRUPT %V3M4038 00722000
  746. BAL R8,ADTRANS GET REAL ADDRESS %V3M4038 00723000
  747. CALL DMKPSAFP CHECK FOR FETCH PROTECTION %V3M4038 00724000
  748. BNZ PROTEXCP OOPS - GENERATE PROTECTION CHECK %V3M4038 00725000
  749. L R4,4(0,R2) ... %V3M4038 00726000
  750. ST R4,VMPSW+4 ... %V3M4038 00727000
  751. L R5,0(0,R2) FIRST HALF OF NEW PSW %V3M4038 00728000
  752. LR R1,R5 SAVE 1ST WORD OF NEW PSW %V408246 00729000
  753. X R1,VMPSW DIFF. BETWEEN NEW AND OLD PSW %V408246 00730000
  754. ST R5,VMPSW STORE NEW PSW %V408246 00731000
  755. TM VMPSW+1,EXTMODE EXTENDED MODE NEW PSW? %V408246 00732000
  756. BO PRLPSWEC YES %V408246 00733000
  757. N R1,=X'FF0A0000' NO (BC), ANY STATUS DIFFERANCES?%V408246 00734000
  758. BZ PRLPSWA NONE, FAST DISPATCH %V408246 00735000
  759. N R1,=X'000A0000' SERIOUS STATUS DIFFERANCES? %V408246 00736000
  760. BZ PRLCKPND NO, CHECK ENABLED FOR PENDING %V408246 00737000
  761. B VPSWCHK YES, -> DMKDSP FOR FURTHER CHECKS%V408246 00738000
  762. * 00739000
  763. PRLPSWEC DS 0H CHECK OUT EC-MODE PSW %V408246 00740000
  764. CLI VMPSW+4,0 BITS 32-39 = 0? %V408246 00741000
  765. BNE VPSWCHK NO, -> DMKDSP %V408246 00742000
  766. N R1,=X'FF0AC0FF' ANY STATUS DIFFERENCES? %V408246 00743000
  767. BZ PRLPSWA NONE, FAST DISPATCH %V408246 00744000
  768. N R1,=X'FC0AC0FF' SERIOUS STATUS DIFFERANCES? %V408246 00745000
  769. BNZ VPSWCHK SOME, -> DMKDSP %V408246 00746000
  770. TM VMPSW,VMIOPND ENABLED FOR I/O? %V408246 00747000
  771. BZ PRLEXT NO, CHECK FOR EXTERNAL %V408246 00748000
  772. TM VMPEND,VMPGPND YES, PAGE FAULT PENDING? %V408246 00749000
  773. BO VPSWCHK YES %V408246 00750000
  774. L R5,FFS ASSUME ENABLED FOR ALL %V408246 00751000
  775. PRLCKPND DS 0H CHECK PENDING %V408246 00752000
  776. SR R2,R2 CLEAR %V408246 00753000
  777. ICM R2,12,VMIOINT ANY PENDING I/O?? %V408246 00754000
  778. BZ PRLEXT NO, NOTHING %V408246 00755000
  779. NR R2,R5 ENABLED FOR PENDING? %V408246 00756000
  780. BNZ VPSWCHK YES, -> DMKDSP (REFLECT) %V408246 00757000
  781. PRLEXT DS 0H CHECK-OUT EXTERNAL PENDING %V408246 00758000
  782. TM VMPSW,VMEXTPND ENABLED FOR EXTERNAL? %V408246 00759000
  783. BZ PRLPSWA NO %V408246 00760000
  784. ICM R2,B'1111',VMPXINT ANY PENDING? %V408246 00761000
  785. BNZ VPSWCHK YES, REFLECT EXTERNAL INTERRUPT %V408246 00762000
  786. PRLPSWA DS 0H %V3M4038 00763000
  787. TM VMDSTAT,VMDSP+VMRUN+VMINQ PROPSW STILL VALID ? %V3M4038 00764000
  788. BNO VPSWCHK NO - NO FAST REFLECT %V3M4038 00765000
  789. TM PROPSW+1,PROBMODE IS MONITOR CODE ACTIVE %V3M4038 00766000
  790. BZ VPSWCHK IF YES - BYPASS FAST DISPATCH %V3M4038 00767000
  791. TM VMTRCTL,VMTRPRV+VMTRBRIN TRACING ACTIVE? %V408246 00768000
  792. BNZ VPSWCHK YES, WILL HAVE TO WAIT FOR DSP %V408246 00769000
  793. STCM R4,B'0111',PROPSW+5 VIRT. ADDR. IN NEW PSW %V408246 00770000
  794. NI PROPSW+1,X'0F' RESET CURRENT PROTECT KEY %V4M0201 00771000
  795. OC PROPSW+1(1),VMPSW+1 PUT IN NEW KEY %V4M0201 00772000
  796. TM VMPSW+1,PROBMODE ENTERING PROBLEM STATE? %V408246 00773000
  797. BZ FASTER NO %V408246 00774000
  798. TM CPSTAT2,CPMICON ASSIST ENABLED? %V408246 00775000
  799. BZ FASTER NO %V408246 00776000
  800. ICM R2,B'0111',VMMADDR ASSIST ENABLED? %V408246 00777000
  801. BZ FASTER NO %V408246 00778000
  802. OI VMMCR6,VMMPROB TURN ON PROBLEM MODE %V408246 00779000
  803. LCTL C6,C6,VMMICRO AND RELOAD ASSIST CREG %V408246 00780000
  804. B FASTER %V3M4038 00781000
  805. SPACE 2 00782000
  806. VPSWCHK EQU * EXAMINE VIRTUAL PSW SETTINGS %V3M4038 00783000
  807. * 00785000
  808. * LOCKET IS A NOOP IN UP SYSTEM @VA07223 00786000
  809. * 00787000
  810. BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND %V407593 00788000
  811. * RETURN HERE WITH LOCK HELD %V407593 00789000
  812. NI VMRSTAT,X'FF'-VMEXWAIT OUT OF INSTRUCTION WAIT @VA09498 00789500
  813. GOTO DMKDSPB 'NEW PSW' ENTRY TO DISPATCH %V3M4038 00790000
  814. EJECT 00791000
  815. PRSSM EQU * SET SYSTEM MASK %V3M4038 00792000
  816. TM VMPSTAT,VMV370R EC-MODE MACHINE? %V3M4038 00793000
  817. BO CHKVCR0 YES %V3M4038 00794000
  818. TM VMVCR0,X'40' IS BIT 1, CR0 = 1 ? %V3M4038 00795000
  819. BZ SSMJOIN NO - NORMAL SSM %V3M4038 00796000
  820. B SPECIAL1 SPECIAL INTERRUPT %V3M4038 00797000
  821. CHKVCR0 EQU * %V3M4038 00798000
  822. L R10,VMECEXT EXTENSION BLOCK %V3M4038 00799000
  823. USING ECBLOK,R10 %V3M4038 00800000
  824. TM EXTCR0,X'40' IS BIT 1, CR0 = 1? %V3M4038 00801000
  825. BZ SSMJOIN NO - NORMAL SSM %V3M4038 00802000
  826. DROP R10 00803000
  827. SPECIAL1 EQU * GIVE SPECIAL PROGRAM INTERRUPT 00804000
  828. LA R0,X'13' INTERRUPT FOR 'SSM' SUPPRESSION 00805000
  829. B ERREFLCT ...BACK TO VM 00806000
  830. PSTSSM EQU * STORE+AND, STORE+OR SYS MASK %V3M4038 00807000
  831. TM VMPSTAT,VMV370R IS THIS AN EC-MODE MACHINE ? %V3M4038 00808000
  832. BZ OPEREXCP NO - REFLECT OPERATION EXCEPTION %V3M4038 00809000
  833. * (CF 370 PRINCIPLES OF OPERATION) 00810000
  834. SSMJOIN EQU * STNSM | STOSM | SSM: %V3M4038 00811000
  835. TM VMTRCTL,VMTRBRIN INSTRUCTION TRACING SET %VA05533 00812000
  836. BNO SSMJOIN1 NO, SKIP FOLLOWING TEST %VA05533 00813000
  837. L R15,VMTREXT GET ADDRESS OF TRACE BLOCK @VA05533 00814000
  838. USING TREXT,R15 @VA05533 00815000
  839. NI TREXFLAG,255-TREXNDSP RESET DISPATCH TRACE CALL @VA05533 00816000
  840. DROP R15 @VA05533 00817000
  841. SSMJOIN1 SLR R1,R1 NO INDEXING %VA05533 00818000
  842. BAL R9,GETADDR GET REAL, VIRTUAL ADDRESS %V3M4038 00819000
  843. IC R4,0(0,R2) GET DATA BYTE %V3M4038 00820000
  844. CLI VMINST,X'80' SIMPLE SSM? %V3M4038 00821000
  845. BE CHEKSSM YES, CHECK FOR FETCH PROTECTION %V3M4038 00822000
  846. * NO - MUST BE STNSM OR STOSM: 00823000
  847. CALL DMKPSASP CHECK STORAGE PROTECTION KEYS %V3M4038 00824000
  848. BNZ PROTEXCP NO GOOD - ERROR %V3M4038 00825000
  849. IC R4,VMPSW GET OLD SYSTEM MASK %V3M4038 00826000
  850. IC R5,VMINST+1 IMMEDIATE BYTE FROM INST. %V3M4038 00827000
  851. STC R4,0(0,R2) STORE SYSTEM MASK %V3M4038 00828000
  852. TM VMESTAT,VMPERCM VIRTUAL OR CP PER ACTIVE ? %V3M4038 00829000
  853. BZ PSTNPER NO - SKIP PER EVENT CHECKING %V3M4038 00830000
  854. LA R1,PERSALT STORAGE ALTERATION EVENT 00831000
  855. LA R2,1(0) FIELD LENGTH STORED 00832000
  856. BAL R9,PERCHEK SEE IF RECORDABLE EVENT 00833000
  857. PSTNPER EQU * MODIFY CURRENT SYSTEM MASK %V3M4038 00834000
  858. CLI VMINST,X'AC' STORE + AND ? %V3M4038 00835000
  859. BE PSTANDSM YES %V3M4038 00836000
  860. OR R4,R5 STORE + OR SYS MASK %V3M4038 00837000
  861. B SETMASK %V3M4038 00838000
  862. PSTANDSM EQU * STORE + AND SYS MASK %V3M4038 00839000
  863. NR R4,R5 ... %V3M4038 00840000
  864. SETMASK EQU * SET SYSTEM MASK %V3M4038 00841000
  865. EX R4,CLVMSK CHECK NEW WITH THE OLD %V3M4038 00842000
  866. STC R4,VMPSW SAVE NEW MASK %V3M4038 00843000
  867. BE FASTER EQUAL - FAST DISPATCH %V3M4038 00844000
  868. TM VMPSTAT,VMV370R VIRTUAL EC MODE MACHINE ? %V3M4038 00845000
  869. BNZ VPSWCHK YES - CHECK FULLY %V3M4038 00846000
  870. CLI VMPSW,0 NEW MASK ENABLED FOR INTERRUPTS? %V3M4038 00847000
  871. BE FASTER NO - UNABLE TO RELFECT ANYTHING %V3M4038 00848000
  872. TM VMPSW,VMEXTPND ENABLED FOR EXT INTERRUPTS ? %V3M4038 00849000
  873. BZ STSMIO NO..CONTINUE... %V3M4038 00850000
  874. TM VMVCR0+3,X'E0' ENABLED IN CR0 ? %V3M4038 00851000
  875. BZ STSMIO NO..CONTINUE... %V3M4038 00852000
  876. L R1,VMPXINT CHECK FOR PENDING %V3M4038 00853000
  877. LTR R1,R1 EXT INTERRUPTS... %V3M4038 00854000
  878. BNZ VPSWCHK DISPATCH WILL DO THE REST.. %V3M4038 00855000
  879. STSMIO EQU * %V3M4038 00856000
  880. SLR R1,R1 CLEAR R1 %V3M4038 00857000
  881. IC R1,VMIOINT INTERRUPT PENDING MASK %V3M4038 00858000
  882. NR R1,R4 ENABLE FOR PENDING INTERRUPTS %V3M4038 00859000
  883. BZ FASTER NOTHING - FAST RE-DISPATCH %V3M4038 00860000
  884. B VPSWCHK EXAMINE NEW PSW %V3M4038 00861000
  885. SPACE 00862000
  886. CHEKSSM CALL DMKPSAFP SSM - CHECK FOR FETCH PROTECTION %V3M4038 00863000
  887. BZ SETMASK OK - GO TO IT. %V3M4038 00864000
  888. B PROTEXCP OOPS - GENERATE PROTECTION CHECK @V202232 00865000
  889. CLVMSK CLI VMPSW,0 COMPARE OLD AND NEW PSW MASKS %V3M4038 00866000
  890. EJECT 00867000
  891. PRSKEY EQU * 'ISK' OR 'SSK' 00868000
  892. *---------------------------------------------------------------------* 00869000
  893. * REGISTER USAGE IN 'PRSKEY': * 00870000
  894. * R1 = SEGMENT TABLE ADDRESS * 00871000
  895. * R2 = REAL ADDRESS OF BLOCK (IF PAGE IN CORE) * 00872000
  896. * R3 = ADDRESS IN VMBLOK OF R2 VALUE * 00873000
  897. * R4 = REAL STORAGE KEY * 00874000
  898. * R5 = R1 REGISTER NO. * 4 * 00875000
  899. * R6 = VIRTUAL ADDRESS OF BLOCK * 00876000
  900. * R7 = SWAP TABLE ENTRY ADDRESS * 00877000
  901. * R8 = MASK FOR STORAGE KEY TO USER * 00878000
  902. *---------------------------------------------------------------------* 00879000
  903. PRVMCC MC MNCOSIM,MNCLINST CLASS INST, CODE SIMULATION @VM01017 00880000
  904. LA R8,X'FE' DEFAULT "MASK" FOR ALL 7 BITS @VA01071 00881000
  905. * OF THE KEY 00882000
  906. CLI VMINST,X'09' IS IT ISK INSTR. 00883000
  907. BNE NOTISK NO, MUST BE SSK 00884000
  908. COUNT DMKPRVIK MP-SAFE INCR. TO COUNTER @V407593 00885000
  909. TM VMESTAT,VMEXTCM IN EXTENDED CONTROL NOW ? @VA01071 00886000
  910. BO R8MASKOK YES - R8 "MASK" OF X'FE' IS OK. @VA01071 00887000
  911. B R8MASKF8 NO - GO SET "MASK" TO X'F8'. @VA01071 00888000
  912. NOTISK COUNT DMKPRVEK MP-SAFE INCR. TO COUNTER @V407593 00889000
  913. TM VMPSTAT,VMV370R DOES THIS GUY HAVE AN EC-MODE @VA01071 00890000
  914. * MACHINE ? 00891000
  915. BO R8MASKOK YES - R8 "MASK" OF X'FE' IS OK. @VA01071 00892000
  916. R8MASKF8 LA R8,X'F8' SET FOR 5 BITS ONLY, FOR BC @VA01071 00893000
  917. * MODE/MACHINE 00894000
  918. R8MASKOK EQU * R8 "MASK" CORRECTLY SET; @VA01071 00895000
  919. * CONTINUE: 00896000
  920. BAL R9,REGSPEC GET REGISTER SPECIFICATIONS 00897000
  921. LA R3,VMGPRS(R6) ADDR IN VMBLOK OF R2 FIELD 00898000
  922. TM 3(R3),X'0F' CHECK ALIGNMENT 00899000
  923. BNZ SPECEXCP NO GOOD 00900000
  924. GETKEYAD L R6,0(,R3) GET VIRTUAL BLOCK ADDRESS @VA01071 00901000
  925. LA R10,FASTER BRANCH VECTOR FOR BCR'S 00902000
  926. LA R6,0(0,R6) 24-BITS ONLY, PLEASE 00903000
  927. LRA R2,0(,R6) GET REAL PAGE ADDR. @V408246 00904000
  928. BC 8+2,SEGOK PAGE AVAILABLE AND/OR PTE @V408246 00905000
  929. BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 00906000
  930. * RETURN HERE WITH LOCK HELD 00907000
  931. LR R1,R6 GET ADDRESS @V408246 00908000
  932. TRANS 2,1,OPT=(DEFER) @V408246 00909000
  933. BC 2,ADDREXCP ADDR. EXCEPTION @V408246 00910000
  934. CLI VMINST,X'B2' VIRT. RRB? @V408246 00911000
  935. BNE *+8 NO @V408246 00912000
  936. ST R6,0(,R3) YES, RESTORE TEMPSAVE @V408246 00913000
  937. SEGOK DS 0H @V408246 00914000
  938. SLR R7,R7 CLEAR @V408246 00915000
  939. IC R7,1(,R3) VIRTUAL SEGMENT INDEX @V408246 00916000
  940. SLL R7,2 SEGMENT TABLE ENTRY INDEX @V408246 00917000
  941. AL R7,VMSEG ADD STO, GET STE @V408246 00918000
  942. L R7,0(R7) GET PTE @V408246 00919000
  943. LA R7,0(0,R7) 00920000
  944. N R7,=X'00FFFFFE' TURN OFF INVALID BIT @V407566 00921000
  945. S R7,F4 BACK UP... 00922000
  946. L R7,0(0,R7) ...FOR SWAPTABLE POINTER 00923000
  947. IC R4,2(0,R3) PAGE NUMBER * 16 00924000
  948. N R4,F240 CLEAR JUNK 00925000
  949. SRL R4,1(0) INDEX IN SWAPTABLE 00926000
  950. LA R7,0(R4,R7) SWPTABLE ENTRY 00927000
  951. USING SWPFLAG,R7 REFERENCE SWAP TABLE INFO. IN R7 @VA01071 00928000
  952. SLR R4,R4 REAL KEY ASSUMED ZERO 00929000
  953. SLR R1,R1 INDEX TO SWPKEYS 00930000
  954. TM 2(R3),X'08' EVEN OR ODD HALF-PAGE? 00931000
  955. BZ HALFONE EVEN 00932000
  956. LA R1,1(0,0) ODD 00933000
  957. HALFONE EQU * 00934000
  958. LRA R2,0(0,R6) GET REAL ADDRESS 00935000
  959. BNZ PGNOTRES PAGE NOT IN CORE 00936000
  960. ISK R4,R2 GET REAL KEY 00937000
  961. EJECT 00938000
  962. PGNOTRES EQU * 00939000
  963. CLI VMINST,9 ISK? 00940000
  964. BNE PSETKEY NO 00941000
  965. IC R9,SWPKEY1(R1) GET KEY FROM SWPTABLE @VA01071 00942000
  966. OR R9,R4 ...PLUS REAL KEY 00943000
  967. STC R9,SWPKEY1(R1) RESET IN SWPTABLE @VA01071 00944000
  968. NR R9,R8 MASK FOR USER 00945000
  969. STC R9,VMGPRS+3(R5) RETURN RESULT TO USER 00946000
  970. TM VMESTAT,VMPERCM VIRTUAL OR CP PER ACTIVE ? 00947000
  971. BCR 8,R10 NO -- FAST REFLECT 00948000
  972. LR R4,R5 REGISTER INDEX IN R4 00949000
  973. LA R1,PERGPRS GENERAL REGISTER ALTERATION EVENT 00950000
  974. BAL R9,PERCHEK SEE IF RECORDABLE EVENT 00951000
  975. B FASTER FAST DISPATCH 00952000
  976. PSETKEY EQU * HANDLE 'SSK' OR 'RRB' ... @VA01071 00953000
  977. N R4,F6 GET REAL REF, CHG BITS 00954000
  978. LR R2,R4 INTO R2 FOR BACKUP-BIT SETTING 00955000
  979. ALR R2,R2 @V213235 00956000
  980. IC R9,SWPFLAG GET SWPFLAG BYTE @VA01071 00957000
  981. OR R9,R2 ADD BACKUP BITS 00958000
  982. STC R9,SWPFLAG ...RESET FLAG BYTE @VA01071 00959000
  983. CLI VMINST,X'B2' IS IT AN RRB? 00960000
  984. BE RESREFB YES - GO SET COND. CODE 00961000
  985. TM SWPFLAG,SWPSHR SHARED PAGE @VA07028 00962000
  986. BOR R10 YES, SSK = NO-OP ON SHARED PAGE @VA07028 00963000
  987. IC R9,VMGPRS+3(R5) GET NEW KEY 00964000
  988. NR R9,R8 MASK FOR USER 00965000
  989. STC R9,SWPKEY1(R1) SET IN SWPTABLE ENTRY @VA01071 00966000
  990. SETREAL EQU * SET REAL STORAGE KEY 00967000
  991. TM VMPSTAT,VMREAL V=R USER ? @VA01071 00968000
  992. BO *+8 YES - LEAVE ALL OF KEY "AS IS" @VA01071 00969000
  993. N R9,=A(X'F8') MASK FOR REAL KEY (WITH @VA01071 00970000
  994. * FETCH-PROT. BIT) 00971000
  995. LRA R2,0(0,R6) SEE IF PAGE IN CORE 00972000
  996. BCR 7,R10 PAGE NOT IN CORE 00973000
  997. SSK R9,R2 SET REAL KEY 00974000
  998. BR R10 FAST DISPATCH 00975000
  999. EJECT 00976000
  1000. PRVRRB EQU * RESET REFERENCE BIT 00977000
  1001. SLR R1,R1 NO INDEXING 00978000
  1002. BAL R8,INSTADR GET VIRTUAL ADDRESS 00979000
  1003. ST R3,TEMPSAVE SAVE IT IN PSA 00980000
  1004. NI TEMPSAVE+3,X'F0' FORCE VALID ALIGNMENT FOR 'ISK' 00981000
  1005. LA R3,TEMPSAVE POINT TO IT FOR 'PRSKEY' 00982000
  1006. TM VMPSTAT,VMV370R IS THIS AN EC-MODE MACHINE ? @VA00780 00983000
  1007. BO GETKEYAD YES (WHEW) GET VIRTUAL BLOCK @VA01071 00984000
  1008. * ADDRESS ETC. 00985000
  1009. B OPEREXCP NO - REFLECT OPERATION EXCEPTION @VA00780 00986000
  1010. * (CF 370 PRINCIPLES OF OPERATION) @VA00780 00987000
  1011. SPACE 00988000
  1012. RESREFB EQU * BACK FROM MIDDLE OF 'SSK' 00989000
  1013. IC R9,SWPKEY1(R1) GET KEY FROM SWAP-TABLE @VA01071 00990000
  1014. OR R9,R4 ADD TO REAL REF, CHG BITS 00991000
  1015. STC R9,SWPKEY1(R1) UPDATE KEY IN SWAP-TABLE @VA01071 00992000
  1016. LA R4,6(0,0) MASK FOR REF, CHG BITS ONLY 00993000
  1017. NR R4,R9 GET VIRTUAL REF, CHG IN GR4 00994000
  1018. SLL R4,3(0) POSITION FOR CC SETTING IN PSW 00995000
  1019. LA R2,SWPKEY1(R1) ADDRESS OF VIRTUAL KEY IN @VA01071 00996000
  1020. * SWPTABLE 00997000
  1021. NI 0(R2),X'FF'-X'04' RESET REFERENCE BIT 00998000
  1022. NI VMPSW+2,X'CF' SET EC-MODE COND. CODE = 0, AND @VA00780 00999000
  1023. NI VMPSW+4,X'CF' SET BC-MODE COND. CODE = 0 01000000
  1024. LA R10,SETPSWCC CHANGE VECTOR TO SET COND. CODE 01001000
  1025. N R9,=A(X'FA') RETAIN ALL OF KEY EXCEPT @VA01071 01002000
  1026. * REFERENCE BIT 01003000
  1027. DROP R7 AND ... @VA01071 01004000
  1028. B SETREAL GO SET REAL STORAGE KEY 01005000
  1029. PRVIPK IC R0,VMPSW+1 GET KEY AND EMWP @V200198 01006000
  1030. N R0,F240 SET EMWP PORTION TO ZERO @V200198 01007000
  1031. STC R0,VMGPRS+R2*4+3 BITS 24-31 OF GPR2 @V200198 01008000
  1032. TM VMESTAT,VMPERCM IS PER ACTIVE? @V200198 01009000
  1033. BZ FASTER NOPE, REDISPATCH @V200198 01010000
  1034. LA R1,PERGPRS SET FOR GPR CHANGED @V200198 01011000
  1035. LA R4,R2*4 INDICATE REG2 WAS HIT @V200198 01012000
  1036. BAL R9,PERCHEK AND SO INDICATE TO VM @V200198 01013000
  1037. B FASTER NOW REDISPATCH @V200198 01014000
  1038. PRSPKA SR R1,R1 DON'T WANT INDEXING @V200198 01015000
  1039. BAL R8,INSTADR GET BASE PLUS DISPLACEMENT @V200198 01016000
  1040. IC R0,VMPSW+1 LOAD IN PSW PROTECT KEY & EMWP @V200198 01017000
  1041. N R0,F15 ZERO OUT PROTECTION KEY @V200198 01018000
  1042. N R3,F240 ZERO OUT ALL BUT BITS 24-27 @V200198 01019000
  1043. OR R0,R3 OR IN NEW KEY @V200198 01020000
  1044. STC R0,VMPSW+1 STORE NEW KEY & EMWP BACK @V200198 01021000
  1045. NI PROPSW+1,X'0F' RESET CURRENT STORAGE KEY @VM01081 01022000
  1046. OC PROPSW+1(1),VMPSW+1 SET USERS NEW STORAGE KEY @VM01081 01023000
  1047. B FASTER REDISPATCH VIRTUAL MACHINE @V200198 01024000
  1048. SPACE 2 01025000
  1049. REGSPEC EQU * COMPUTE REGISTER INDICES FOR R1,R3 01026000
  1050. L R4,F60 LOAD NECESSARY MASK INTO GR4 01027000
  1051. IC R5,VMINST+1 REGISTER SPECIFICATION BYTE 01028000
  1052. LR R6,R5 01029000
  1053. SRL R5,2(0) 'R1' 01030000
  1054. SLL R6,2(0) 'R2' 01031000
  1055. NR R5,R4 REDUCE REGISTER NUMBERS TO INDICES 01032000
  1056. NR R6,R4 ...INTO 'VMGPRS' FIELD IN VMBLOK 01033000
  1057. BR R9 01034000
  1058. EJECT 01035000
  1059. PRLCTL EQU * LCTL - LOAD CONTROL - X'B7' 01036000
  1060. SLR R1,R1 NO INDEXING 01037000
  1061. BAL R8,INSTADR COMPUTE VIRTUAL ADDRESS @VA03696 01038000
  1062. LA R1,3(0,0) TEST ADDRESS FOR ALIGNMENT 01039000
  1063. NR R1,R3 ...MUST BE A FULL-WORD BOUNDARY 01040000
  1064. BNZ SPECEXCP NOPE - GENERATE A PROGRAM INTERRUPT 01041000
  1065. BAL R8,ADTRANS GET REAL ADDRESS @VA03696 01042000
  1066. CALL DMKPSAFP CHECK FOR FETCH PROTECTION @V202232 01043000
  1067. BNZ PROTEXCP OOPS - GENERATE PROTECTION CHECK @V202232 01044000
  1068. BAL R9,REGSPEC GET REGISTER SPECIFICATIONS 01045000
  1069. * 'REGSPEC' WILL LEAVE THE MASK 'F60' IN GR4 01046000
  1070. SPACE 01047000
  1071. LOADECR EQU * LCTL FOR EC-MODE ALLOWED VIRTUAL MACH. 01048000
  1072. TM VMPSTAT,VMV370R ECMODE MACHINE ? @VM01024 01049000
  1073. BZ *+8 NO..ECBLOK DOES NOT EXIST... @VM01024 01050000
  1074. L R10,VMECEXT EXTENSION BLOCK 01051000
  1075. USING ECBLOK,R10 01052000
  1076. LA R9,FASTER AND SET R9 "SWITCH" 01053000
  1077. CLR R5,R6 SHOULD WE PRE-CHECK ADDRESSES ? 01054000
  1078. BE LOADCHK NOPE - JUST LOADING ONE CONTROL REGISTER 01055000
  1079. LOADCRS EQU * PRE-CHECK ADDRESS AVAILABILITY 01056000
  1080. LA R7,4(0,0) INCREMENT VALUE + INDEX TEST VALU@VMD0133 01057000
  1081. LOADMLT EQU * LOAD MULTIPLE CONTROL REGISTERS 01058000
  1082. BAL R8,ADTRANS TRANSLATE THE VIRTUAL ADDRESS 01059000
  1083. CALL DMKPSAFP CHECK FOR FETCH PROTECTION @V202232 01060000
  1084. BZ LOADCHK KEYS MATCH @VA02233 01061000
  1085. * ERROR FORCES US OUT OF LOOP. BUT FIRST DO STUFF WE'D 01062000
  1086. * NORMALLY DO AT END OF LOOP. 01063000
  1087. TM VMESTAT,VMINVSEG+VMNEWCR0 @VA02233 01064000
  1088. BZ PROTEXCP REFLECT PROTECTION EXC... @VA02233 01065000
  1089. BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01066000
  1090. * RETURN HERE WITH LOCK HELD 01067000
  1091. CALL DMKVATAB @VA02233 01068000
  1092. B PROTEXCP REFLECT IT @VA02233 01069000
  1093. EJECT 01070000
  1094. LOADCHK EQU * TEST FOR C-REGS 0,1,2,14. @VMD0103 01071000
  1095. NR R5,R4 R4=F60, CHANGES CREG 16 TO CREG0.@VMD0103 01072000
  1096. LA R0,C14*L4 THIS IS WHAT INDEX WOULD BE FOR @VMD0103 01073000
  1097. * C-REG 14. 01074000
  1098. CR R5,R0 CURRENTLY WORKING ON C-REG 14? @VMD0103 01075000
  1099. BNE ENDC14 NO. @VMD0103 01076000
  1100. OI VMVCR14,VMIOLOG ASSUME IOLOG BIT WILL BE 1, @VMD0103 01077000
  1101. * AND TURN ON IN VMBLOK. 01078000
  1102. TM 0(R2),VMIOLOG TEST IOLOG BIT HE IS LOADING @VMD0103 01079000
  1103. * INTO C-REG 14. 01080000
  1104. BO ENDC14 BRANCH IF ASSUMPTION OF 1 BIT @VMD0103 01081000
  1105. * WAS CORRECT. 01082000
  1106. NI VMVCR14,X'FF'-VMIOLOG HES'S SETTING IOLOG BIT @VMD0103 01083000
  1107. * OFF. DO SAME IN VMBLOK. 01084000
  1108. ENDC14 EQU * @VMD0103 01085000
  1109. L R1,0(0,R2) LOAD THE C-REG... 01086000
  1110. LTR R5,R5 CREG0 ?? @VA12971 01086100
  1111. BNZ *+8 NO, BYPASS CREG0 RESET @VA12971 01086200
  1112. N R1,=XL4'FFF8FFFF' RESET BITS 13-15 IN BYTE 1 @VA12971 01086300
  1113. TM VMPSTAT,VMV370R ECMODE MACHINE ? @VM01024 01087000
  1114. BNZ LOADCHK0 YES..CONTINUE... @VM01024 01088000
  1115. LTR R5,R5 LOADING CREG0 ? @VM01024 01089000
  1116. BNZ LOADEND2 NO..NOTHING TO DO.. @VM01024 01090000
  1117. ST R1,VMVCR0 UPDATE CR0 @VM01024 01091000
  1118. B LOADEND2 AND CONTINUE... @VM01024 01092000
  1119. LOADCHK0 EQU * @VM01024 01093000
  1120. * 01094000
  1121. * 01095000
  1122. LA R15,8 TO TEST FOR CONTROL REG 0,1, OR 2@VMD0133 01096000
  1123. CLR R5,R15 CONTROL REGISTER 0 OR 1? @VMD0133 01097000
  1124. BNL LOADATA NOPE - AT LEAST CONTROL REG 2. 01098000
  1125. CL R1,EXTCR0(R5) DOES IT MATCH THE "OLD" CONTROL REG VALUE 01099000
  1126. BE LOADEND2 YES - GOOD SHOW - KEEP COOL. 01100000
  1127. AIF (NOT &TRACE(6)).NTR5 **AIF** 01101000
  1128. TM VMTRCTL,VMTRBRIN TRACING BRANCHES OR INSTRUCTIONS ? 01102000
  1129. BZ LOADCHK1 NOPE - NO PROBLEM. 01103000
  1130. CALL DMKTRCPB YES - PUT BACK OLD USER INSTRUCTIONS NOW 01104000
  1131. .NTR5 ANOP 01105000
  1132. LOADCHK1 LA R9,LCTLVAT SET R9 SWITCH TO CALL DMKVATAB 01106000
  1133. LTR R5,R5 NOW WAS THAT CONTROL REGISTER 0 OR 1 ? 01107000
  1134. BZ LOADCHKZ IT WAS 0. 01108000
  1135. OI VMESTAT,VMINVSEG SET FLAGBIT IF CONTROL REG 1 CHANGED 01109000
  1136. B LOADEND AND GO STORE NEW VALUE. 01110000
  1137. LOADCHKZ OI VMESTAT,VMNEWCR0 SET FLAGBIT IF CONTROL REG 0 CHANGED 01111000
  1138. B LOADEND AND GO STORE NEW VALUE. 01112000
  1139. * 01113000
  1140. LOADATA EQU * LOAD C-REG OTHER THAN ZERO OR ONE: 01114000
  1141. BH LOADEND TRF IF > CONTROL REG 2 (CC IS STILL SET) 01115000
  1142. * LOADING C-REG 2 (I/O MASKS) ... 01116000
  1143. TM VMPSW,X'02' IS USER PSW ENABLED FOR I/O ? 01117000
  1144. BZ LOADEND NO - NO PROBLEM INCURRED 01118000
  1145. LA R15,LCTLVAT SEE WHAT R9 SWITCH IS 01119000
  1146. CLR R9,R15 PERCHANCE = A(LCTLVAT) ? 01120000
  1147. BE LOADEND YES - LEAVE IT AT THAT. 01121000
  1148. LA R9,VPSWCHK NO - THEN SET IT TO A(VPSWCHK). 01122000
  1149. LOADEND ST R1,EXTCR0(R5) STORE NEW VALUE OF THE CONTROL REGISTER 01123000
  1150. LOADEND2 EQU * SEE IF WE'RE FINISHED YET: 01124000
  1151. CLR R5,R6 HAVE WE LOADED THE LAST REGISTER ? 01125000
  1152. BCR 8,R9 <BE> YES - GO TO FASTER / VPSWCHK / LCTLVAT 01126000
  1153. LOADNXT EQU * ADVANCE TO THE NEAREST RAILROAD... 01127000
  1154. ALR R3,R7 ...IF YOU PASS 'GO', @VMD0133 01128000
  1155. ALR R5,R7 ...COLLECT $200 @VMD0133 01129000
  1156. B LOADMLT ...AND CONTINUE ON AROUND 01130000
  1157. LCTLVAT EQU * PERFORM SHADOW-TABLE CLEAN-UP 01131000
  1158. BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01132000
  1159. * RETURN HERE WITH LOCK HELD 01133000
  1160. CALL DMKVATAB MAINTENANCE ROUTINE 01134000
  1161. B VPSWCHK ENABLED STATUS HAS CHANGED 01135000
  1162. DROP R10 01136000
  1163. EJECT 01137000
  1164. PSTCTL EQU * STCTL - STORE CONTROL - X'B6' 01138000
  1165. BAL R9,REGSPEC GET REGISTER SPECIFICATIONS 01139000
  1166. SLR R1,R1 01140000
  1167. BAL R8,INSTADR COMPUTE VIRTUAL ADDRESS @VA03696 01141000
  1168. LA R1,3(0,0) MASK TO TEST FULL-WORD ALIGNMENT 01142000
  1169. NR R1,R3 ... 01143000
  1170. BNZ SPECEXCP OOPS - GENERATE A PROGRAM INTERRUPT 01144000
  1171. TM VMPSTAT,VMV370R ECMODE MACHINE? @VMD0103 01145000
  1172. BNZ STRECMOD YES - DIFFERENT ENTIRELY. @VMD0103 01146000
  1173. SR R0,R0 @VMD0103 01147000
  1174. BCTR R0,0 FLAG -1 ASSUMES C-REG 0 NOT TO @VMD0103 01148000
  1175. * BE STORED. 01149000
  1176. LR R1,R0 FLAG -1 ASSUMES C-REG 14 NOT TO @VMD0103 01150000
  1177. * BE STORED. 01151000
  1178. SR R3,R5 COMPUTE BASE OF DATA AREA, NEEDED@VMD0103 01152000
  1179. * BY STRNG ROUTINE. (BASE IS PLACE 01153000
  1180. * WHERE C-REG 0 WOULD GO IF RANGE 01154000
  1181. * OF REGISTERS WAS EXTENDED DOWN- 01155000
  1182. * WARD TO INCLUDE C-REG 0.) 01156000
  1183. CR R5,R6 COMPARE END POINTS OF REG RANGE. @VMD0103 01157000
  1184. BNH STRNOWRP DON'T HAVE WRAP FROM C-REG 15-0. @VMD0103 01158000
  1185. * THE C-REGS DO WRAP OVER THE 15-0 BOUNDARY. WE WILL 01159000
  1186. * TREAT IT AS TWO SUB-RANGES, ONE ON EACH SIDE OF THE 01160000
  1187. * BOUNDARY. 01161000
  1188. LR R4,R6 SAVE R6 (UPPER LIMIT OF RANGE)...@VMD0103 01162000
  1189. LA R6,C15*L4 AND SET DUMMIED UPPER LIMIT OF @VMD0103 01163000
  1190. * C-REG 15. 01164000
  1191. BAL R9,STRNG ALTERS FLAGS (R0,R1) IF C-REGS @VMD0103 01165000
  1192. * 0, 14 ARE IN THIS RANGE. 01166000
  1193. LR R6,R4 RE-ESTABLISH R6 (TRUE UPPER LIMT)@VMD0103 01167000
  1194. SR R5,R5 AND ESTABLISH DUMMIED LOWER LIMIT@VMD0103 01168000
  1195. * OF C-REG 0. 01169000
  1196. LA R3,16*L4(0,R3) RELOCATE THE DATA AREA BASE @VMD0103 01170000
  1197. * UPWARD TO THE C-REG 0 POSITION 01171000
  1198. * OF THE UPPER SUB-RANGE. (SEE 01172000
  1199. * STRNG ROUTINE'S INPUT DESCRIPT.) 01173000
  1200. STRNOWRP BAL R9,STRNG ALTERS FLAGS (R0,R1) IF CREGS 0, @VMD0103 01174000
  1201. * 14 ARE IN THIS RANGE. 01175000
  1202. * WE NOW ACT ON R0, R1 FLAGS AND STORE INDICATED C-REGS. 01176000
  1203. LR R6,R1 SAVE FLAG OF -1 OR ADDR FOR C14. @VMD0103 01177000
  1204. LTR R3,R0 PREPARE TO PROCESS C-REG 0. @VMD0103 01178000
  1205. BM STRNOT0 FORGET IT, C-REG 0 NOT IN RANGE. @VMD0103 01179000
  1206. BAL R9,STRVCHK GET REAL ADDR (OF R3) INTO R2, @VMD0103 01180000
  1207. * ALSO CHECK STORAGE PROTECTION. 01181000
  1208. L R1,VMVCR0 GET C-REG 0 FROM VMBLOK. @VMD0103 01182000
  1209. ST R1,0(0,R2) STORE INTO STCTL'S DATA AREA. @VMD0103 01183000
  1210. BAL R9,STRPERAA SEE IF VIRT. OR CP PER IS ACTIVE.@VMD0103 01184000
  1211. STRNOT0 EQU * @VMD0103 01185000
  1212. LTR R3,R6 PREPARE TO PROCESS C-REG 14. @VMD0103 01186000
  1213. BM FASTER FORGET IT, C-REG 14 NOT IN RANGE.@VMD0103 01187000
  1214. BAL R9,STRVCHK GET REAL ADDR (OF R3) INTO R2, @VMD0103 01188000
  1215. * ALSO CHECK STORAGE PROTECTION. 01189000
  1216. OI 0(R2),VMIOLOG ASSUME BIT TO BE STORE WILL BE 1.@VMD0103 01190000
  1217. TM VMVCR14,VMIOLOG SEE IF C14 IN VMBLOK HAS A 1. @VMD0103 01191000
  1218. BO STR14B OKAY, WE ASSUMED 1 CORRECTLY. @VMD0103 01192000
  1219. NI 0(R2),X'FF'-VMIOLOG GUESSED WRONG. CHANGE TO 0.@VMD0103 01193000
  1220. STR14B BAL R9,STRPERAA SEE IF VIRT. OR CP PER IS ACTIVE.@VMD0103 01194000
  1221. B FASTER ALL DONE. RE-DISPATCH. @VMD0103 01195000
  1222. SPACE 2 01196000
  1223. *********************************************************************** 01197000
  1224. * STRNG: A ROUTINE TO EXAMINE A NON-WRAPPING RANGE OF REGISTERS AND 01198000
  1225. * DECIDE WHETHER REGISTER 0 AND REGISTER 14 ARE IN THE RANGE. 01199000
  1226. *********************************************************************** 01200000
  1227. * INPUTS: R5, R6 CONTAIN STARTING AND ENDING REG NUMBERS TIMES 4. 01201000
  1228. * R0, R1 ARE FLAGS, INITIALIZED TO -1 OR TO AN ADDRESS. 01202000
  1229. * R3 SET TO ADDRESS OF BASE OF DATA AREA (BASE IS WHERE REG 0 01203000
  1230. * WOULD GET STORED, COMPUTED BY EXTENDING DATA AREA 01204000
  1231. * DOWNWARD IF REG 0 IS NOT IN THE RANGE). 01205000
  1232. * R9 HAS RETURN ADDRESS. 01206000
  1233. * OUTPUTS: R0 IS SET TO ADDRESS FOR STORING REG 0 IN DATA AREA IF 01207000
  1234. * REG 0 IS IN THE RANGE; OTHERWISE R0 IS UNCHANGED. 01208000
  1235. * R1 IS SET TO ADDRESS FOR STORING REG 14 IN DATA AREA 01209000
  1236. * IF REG 14 IS IN THE RANGE; OTHERWISE R1 IS UNCHANGED. 01210000
  1237. *********************************************************************** 01211000
  1238. STRNG LTR R5,R5 STARTING REG IS C-REG 0? @VMD0103 01212000
  1239. BNZ STRNG0Z NO, SO (WITHOUT WRAP) C-REG 0 @VMD0103 01213000
  1240. * CANNOT BE IN THE RANGE. 01214000
  1241. LR R0,R3 ADDR. FOR C-REG 0 IN DATA AREA. @VMD0103 01215000
  1242. STRNG0Z EQU * @VMD0103 01216000
  1243. CH R6,=Y(C14*L4) IS THE END REG EITHER 14 OR 15? @VMD0103 01217000
  1244. BLR R9 C-REG 14 IS NOT IN THE RANGE. @VMD0103 01218000
  1245. BE STRNG14 C-REG 14 IS IN THE RANGE. @VMD0103 01219000
  1246. * C-REG 14 MIGHT BE IN RANGE. POSSIBILITIES ARE X-15 AND 15-15. 01220000
  1247. CR R5,R6 RANGE IS X-15 OR 15-15. WHICH? @VMD0103 01221000
  1248. BER R9 RANGE IS 15-15. EXIT. @VMD0103 01222000
  1249. STRNG14 EQU * C-REG 14 IS IN THE RANGE. @VMD0103 01223000
  1250. LA R1,C14*L4(0,R3) ADDR FOR C-REG 14 IN DATA AREA. @VMD0103 01224000
  1251. BR R9 @VMD0103 01225000
  1252. SPACE 2 01226000
  1253. *********************************************************************** 01227000
  1254. * STRVCHK: GET REAL ADDR (0F R3) INTO R2, ALSO CHECK STORAGE PROTECTN. 01228000
  1255. *********************************************************************** 01229000
  1256. STRVCHK BAL R8,ADTRANS GET REAL ADDR (OF R3) INTO R2. @VMD0103 01230000
  1257. CALL DMKPSASP CHECK STORAGE PROTECTION KEY. @VMD0103 01231000
  1258. BZR R9 RETURN, NO PROTECTION PROBLEMS. @VMD0103 01232000
  1259. B PROTEXCP EXIT TO PROTECTION INTERRUPT. @VMD0103 01233000
  1260. SPACE 2 01234000
  1261. *********************************************************************** 01235000
  1262. * STRPERAA: PERFORM 'PERCHEK' CHECKING AFTER SOME INITIALIZATION. 01236000
  1263. *********************************************************************** 01237000
  1264. STRPERAA TM VMESTAT,VMPERCM VIRTUAL OR CP PER ACTIVE? @VMD0103 01238000
  1265. BZR R9 NO, RETURN. SKIP PER EVENT CHECK@VMD0103 01239000
  1266. LA R1,PERSALT STORAGE ALTERATION EVENT. @VMD0103 01240000
  1267. LA R2,L4 FIELD LENGTH STORED. @VMD0103 01241000
  1268. B PERCHEK GO TO PERCHEK ROUTINE TO SEE IF @VMD0103 01242000
  1269. * EVENT NEEDS RECORDING. RETURN IS 01243000
  1270. * TO ADDRESS ALREADY IN R9. 01244000
  1271. SPACE 2 01245000
  1272. STRECMOD L R10,VMECEXT EXTENSION BLOCK CONTAINS C-REGS. @VMD0103 01246000
  1273. USING ECBLOK,R10 @VMD0103 01247000
  1274. STRLOOPE BAL R8,ADTRANS GET REAL ADDR (OF R3) INTO R2. @VMD0103 01248000
  1275. CALL DMKPSASP CHECK STORAGE PROTECTION KEYS. @VMD0103 01249000
  1276. BNZ PROTEXCP NO MATCH - INTERRUPT. @VMD0103 01250000
  1277. L R1,EXTCR0(R5) PICK UP A C-REG. @VMD0103 01251000
  1278. ST R1,0(0,R2) STORE INTO VIRTUAL MEMORY. @VMD0103 01252000
  1279. BAL R9,STRPERAA SEE IF VIRT. OR CP PER IS ACTIVE.@VMD0103 01253000
  1280. STRNPERE EQU * @VMD0103 01254000
  1281. CR R5,R6 IS CURRENT C-REG THE LAST ONE? @VMD0103 01255000
  1282. BE FASTER YES - JUST RE-DISPATCH. @VMD0103 01256000
  1283. LA R5,L4(0,R5) NEXT C-REG. @VMD0103 01257000
  1284. NR R5,R4 R4=F60, WRAPS C-REG 16 TO C-REG 0@VMD0103 01258000
  1285. LA R3,L4(0,R3) NEXT VIRTUAL LOCATION. @VMD0103 01259000
  1286. B STRLOOPE @VMD0103 01260000
  1287. DROP R10 @VMD0103 01261000
  1288. EJECT 01262000
  1289. PRPTLB EQU * PURGE TABLE LOOK-ASIDE BUFFER 01263000
  1290. TM VMPSTAT,VMV370R IS THIS AN EC-MODE MACHINE ? @VA00780 01264000
  1291. BZ OPEREXCP NO - REFLECT OPERATION EXCEPTION @VA00780 01265000
  1292. * (CF 370 PRINCIPLES OF OPERATION) @VA00780 01266000
  1293. OI VMESTAT,VMINVPAG FLAG BAD SHADOW PAGE TABLES @V3M4026 01267000
  1294. BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01268000
  1295. * RETURN HERE WITH LOCK HELD 01269000
  1296. CALL DMKVATAB INVALIDATE ALL SHADOW PAGE TABLES 01270000
  1297. NI APSTAT2,X'FF'-CPPTLBR & CLEAR PENDING FLAG @V4M0103 01271000
  1298. PTLB PURGE TLB @VA07615 01272000
  1299. B FASTER ...AND RE-DISPATCH VIRTUAL MACHINE 01273000
  1300. SPACE 2 01274000
  1301. PRLRA EQU * LOAD 'REAL' ADDRESS 01275000
  1302. LA R1,1(0) INDEXING IS ALLOWED 01276000
  1303. BAL R8,INSTADR GET VIRTUAL-VIRTUAL ADDRESS 01277000
  1304. TM VMPSTAT,VMV370R ALLOW TO USE 'LRA' INSTRUCTION 01278000
  1305. BZ OPEREXCP IF NOT - REFLECT OPERATION EXCEPTION 01279000
  1306. LR R5,R11 LOAD ADDRESS OF USER'S VMBLOK 01280000
  1307. BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01281000
  1308. * RETURN HERE WITH LOCK HELD 01282000
  1309. TM VMESTAT,VMEXTCM IS VM IN EXTENDED MODE 01283000
  1310. BO VATLRAS YES - GET VIRTUAL-VIRTUAL ADDRESS 01284000
  1311. LA R5,2(,R5) NO - COND. CODE IS IN OTHER LOCATION 01285000
  1312. VATLRAS CALL DMKVATLA VIRTUAL-VIRTUAL TO VIRTUAL ADDRESS 01286000
  1313. NI VMPSW+2-VMBLOK(R5),X'CF' RESET CONDITION CODE = 0 01287000
  1314. IC R4,VMINST+1 GET REGISTER SPECIFICATION 01288000
  1315. SRL R4,2(0) 01289000
  1316. N R4,F60 REG. NO. * 4 01290000
  1317. ST R2,VMGPRS(R4) PASS BACK TRANSLATED ADDRESS 01291000
  1318. LTR R0,R0 WAS THE TRANSLATION O.K.? 01292000
  1319. BZ PRLRAPE YES - CHECK FOR PER EVENT 01293000
  1320. S R1,F15 CONVERT CODE FROM 16,17,18 TO 1,2,3 01294000
  1321. SLL R1,4(0) POSITION FOR SETTING COND. CODE BITS 01295000
  1322. IC R3,VMPSW+2-VMBLOK(,R5) CC, PROG MASK FROM PSW 01296000
  1323. OR R3,R1 'OR' IN NEW CONDITION CODE 01297000
  1324. STC R3,VMPSW+2-VMBLOK(,R5) AND SET IN VIRTUAL PSW 01298000
  1325. PRLRAPE EQU * CHECK FOR PER EVENT 01299000
  1326. TM VMESTAT,VMPERCM VIRTUAL OR CP PER ACTIVE ? 01300000
  1327. BZ FASTER NO - JUST RETURN 01301000
  1328. LA R1,PERGPRS GENERAL REGISTER ALTERATION 01302000
  1329. BAL R9,PERCHEK RECORD DATA IF NEEDED 01303000
  1330. B FASTER RETURN 01304000
  1331. EJECT 01305000
  1332. PSTIDP EQU * STORE CPU ID 01306000
  1333. SLR R1,R1 NO INDEXING 01307000
  1334. BAL R8,INSTADR COMPUTE VIRTUAL ADDRESS @VA03696 01308000
  1335. L R6,F7 CHECK ALGINMENT 01309000
  1336. NR R6,R3 MUST BE DBL-WD ALIGNED 01310000
  1337. BNZ SPECEXCP NO GOOD - INTERRUPT 01311000
  1338. BAL R8,ADTRANS GET REAL ADDRESS @VA03696 01312000
  1339. CALL DMKPSASP CHECK STORAGE PROTECTION KEYS @V202232 01313000
  1340. BNZ PROTEXCP NO GOOD - INTERRUPT 01314000
  1341. *------------------- 01316000
  1342. * ZAP CPU ID SO HE WON'T RECOGNIZE THE MODEL NUMBER 01317000
  1343. *------------------- 01318000
  1344. USING CPUID,R2 01319000
  1345. OI CPUVERSN,X'FF' SET VERSION CODE FOR VIRTUAL MACHINE 01320000
  1346. STH R6,CPUMCELL SET MCEL TO 0 - NO DATA WILL BE @V213135 01321000
  1347. * OVERRIDE CPU SERIAL IN CASE CPUID SET BY MEANS OF 01322000
  1348. * 'SET CPUID' COMMAND OR DIRECTORY 'OPTION' CONTROL STATEMENT 01323000
  1349. MVC CPUSER(3),VMCPUID OVERRIDE FROM VMBLOK @V407466 01324000
  1350. * STORED 01325000
  1351. DROP R2 @VA08195 01325100
  1352. TM APSTAT1,PROCIO IS THIS THE MAIN PROCESSOR @VA08195 01325200
  1353. BO MAINMODL YES-WE ARE ON THE MAIN PROCESSOR @VA08195 01325300
  1354. L R6,PREFIXB OTHER PROCESSOR ADDRESS @VA08195 01325400
  1355. MAINMODL EQU * @VA08195 01325500
  1356. USING CPUID,R2 @VA08195 01325600
  1357. MVC CPUMODEL,CPUMODEL-PSA(R6) MOVE IN CPU MODEL NUM.@VA08195 01325700
  1358. DROP R2 01326000
  1359. TM VMESTAT,VMPERCM VIRTUAL OR CP PER ACTIVE ? 01327000
  1360. BZ FASTER NO - JUST RETURN 01328000
  1361. LA R1,PERSALT STORAGE ALTERATION 01329000
  1362. LA R2,8(0) FIELD LENGTH STORED 01330000
  1363. BAL R9,PERCHEK SET PER PENDING IF REQUIRED 01331000
  1364. B FASTER ...AND RETURN 01332000
  1365. SPACE 2 01333000
  1366. PSTIDC EQU * STORE CHANNEL ID 01334000
  1367. SLR R1,R1 NO INDEXING 01335000
  1368. BAL R8,INSTADR GET CHANNEL ADDRESS 01336000
  1369. NI VMPSW+2,X'CF' SET COND. CODE ZERO - EC MODE 01337000
  1370. NI VMPSW+4,X'CF' SET CONDITION CODE ZERO - BC 01338000
  1371. LR R1,R3 UNIT ADDR INTO R1 FOR DMKSCNVU. @VMD0103 01339000
  1372. * NOTE: STIDC LOOKS ONLY AT THE CHANNEL ADDR., BUT WE 01340000
  1373. * WILL BEGIN WITH THE PARTICULAR SPECIFIED UNIT ANYWAY. 01341000
  1374. * IF SPECIFIED UNIT PORTION IS GARBAGE, WE FAIL AND WILL RESORT 01342000
  1375. * TO LOOKING FOR ANY UNIT ON THE CHANNEL. BY STARTING WITH 01343000
  1376. * THE PARTICULAR UNIT WE HAVE A BETTER CHANCE OF GIVING THE 01344000
  1377. * USER ACCURATE STIDC DATA IF HE HAS VIOLATED THE RULE ABOUT 01345000
  1378. * MAPPING ALL DEVICES ON A VIRTUAL CHANNEL TO REAL DEVICES ON 01346000
  1379. * A SINGLE TYPE OF REAL CHANNEL. 01347000
  1380. CALL DMKSCNVU IF CC=0, THEN R6=VCHBLOK, @VMD0103X01348000
  1381. R7=VCUBLOK, AND R8=VDEVBLOK. @VMD0103 01349000
  1382. * IF R6=-1, VCHBLOK WAS NOT FOUND. 01350000
  1383. BNZ STICHNL NO VIRT. DEVICE FOR THIS UNIT ADR@VMD0103 01351000
  1384. BAL R9,DVTYPCHK CHECK OUT THE VIRTUAL DEVICE. @VMD0103 01352000
  1385. * IF IT IS A TYPE THAT MAPS TO A REAL 01353000
  1386. * DEVICE, THEN DON'T RETURN HERE, BUT GO TO 01354000
  1387. * DEVFND INSTEAD. OTHERWISE, RETURN HERE. 01355000
  1388. STICHNL EQU * INITIAL UNIT ADDR DOES NOT MAP @VMD0103 01356000
  1389. * TO A REAL DEVICE. 01357000
  1390. LTR R6,R6 R6 (FROM DMKSCNVU) POINTS TO @VMD0103 01358000
  1391. * VCHBLOK? 01359000
  1392. BM PRIVCC3 CHANNEL NOT ACTIVE. SET CC=3. @VMD0103 01360000
  1393. USING VCHBLOK,R6 @VMD0103 01361000
  1394. LA R4,2 LOAD INCREMENT FOR LOOP. @VMD0103 01362000
  1395. LA R5,30 LOAD LOOP LIMIT. @VMD0103 01363000
  1396. SR R1,R1 CLEAR INDEX. @VMD0103 01364000
  1397. NXTCU LH R7,VCHCUTBL(R1) LOAD HFWD OFFSET TO VCUBLOK. @VMD0103 01365000
  1398. LTR R7,R7 IS THIS CONTROL UNIT ACTIVE? @VMD0103 01366000
  1399. BM CULOOP NO, INCREMENT INDEX, LOOP AGAIN. @VMD0103 01367000
  1400. A R7,VMCUSTRT OFFSET + START = CU ADDRESS. @VMD0103 01368000
  1401. USING VCUBLOK,R7 @VMD0103 01369000
  1402. SR R2,R2 CLEAR INDEX FOR TABLE OF DEVICE @VMD0103 01370000
  1403. * OFFSETS. 01371000
  1404. NXTDEV LH R8,VCUDVTBL(R2) LOAD HFWD OFFSET TO VDEVBLOK. @VMD0103 01372000
  1405. LTR R8,R8 IS CORRESPONDING DEVICE ACTIVE? @VMD0103 01373000
  1406. BM DEVLOOP NO, INCREMENT INDEX, LOOP AGAIN. @VMD0103 01374000
  1407. A R8,VMDVSTRT OFFSET + START = VDEVBLOK ADDR. @VMD0103 01375000
  1408. USING VDEVBLOK,R8 @VMD0103 01376000
  1409. BAL R9,DVTYPCHK CHECK OUT THE VIRTUAL DEVICE. IF @VMD0103 01377000
  1410. * IT IS A TYPE THAT MAPS TO A REAL DEVICE, 01378000
  1411. * THEN DON'T RETURN HERE, BUT GO TO DEVFND 01379000
  1412. * INSTEAD. OTHERWISE, RETURN HERE. 01380000
  1413. DROP R7,R8 @VMD0103 01381000
  1414. DEVLOOP BXLE R2,R4,NXTDEV TRY THE NEXT DEVICE. @VMD0103 01382000
  1415. CULOOP BXLE R1,R4,NXTCU TRY THE NEXT CTRL UNIT. @VMD0103 01383000
  1416. * FALLING THRU MEANS NO VIRTUAL DEVICE ON THE VIRTUAL CHANNEL 01384000
  1417. * MAPS TO A REAL DEVICE. SO SIMULATE STIDC USING DATA FROM 01385000
  1418. * THE VIRTUAL CHANNEL BLOCK RATHER THAN FROM A REAL CHANNEL 01386000
  1419. * BLOCK. 01387000
  1420. USEVIRT EQU * @V508690 01388000
  1421. SLR R5,R5 START TO SET UP CHANNEL ID WORD 01389000
  1422. TM VCHTYPE,VCHSEL SELECTOR CHANNEL ? 01390000
  1423. BO PSETIDC YES - ALL ZEROES WILL DO 01391000
  1424. ICM R5,B'1000',F16+3 TYPE '00010000' = BYTE MULTIPLEX 01392000
  1425. TM VCHTYPE,VCHBMX IS THIS A VIRTUAL BLOCK MULTIPLEXOR ? 01393000
  1426. BZ PSETIDC NO - AS EXPECTED 01394000
  1427. SLL R5,1(0) TYPE '00100000' = BLOCK MULTIPLEXOR 01395000
  1428. EJECT 01396000
  1429. PSETIDC EQU * GET USER'S PAGE ZERO, DO THE STORE 01397000
  1430. SLR R1,R1 01398000
  1431. BAL R8,TRANS21 "TRANS 2,1,OPT=(BRING,DEFER)" 01399000
  1432. ST R5,CHANID-PSA(0,R2) STORE CHANNEL ID 01400000
  1433. B FASTER ...AND RE-DISPATCH MACHINE 01401000
  1434. PRIVCC3 EQU * SET CONDITION CODE THREE 01402000
  1435. LA R4,X'30' CONDITION CODE THREE TO BE SET 01403000
  1436. SETPSWCC EQU * SET PSW CONDITION CODE 01404000
  1437. LA R1,VMPSW+2 POSITION IF IN EC MODE 01405000
  1438. TM VMESTAT,VMEXTCM IS HE ? 01406000
  1439. BO *+8 YES 01407000
  1440. LA R1,VMPSW+4 POSITION IF IN BC MODE 01408000
  1441. EX R4,SETPECC SET CONDITION CODE 01409000
  1442. B FASTER ...AND RE-DISPATCH 01410000
  1443. SETPECC OI 0(R1),*-* 01411000
  1444. SPACE 2 01412000
  1445. *********************************************************************** 01413000
  1446. * DVTYPCHK: SUBROUTINE CHECKS IF VIRTUAL DEVICE MAPS TO A REAL 01414000
  1447. * DEVICE AND IF NOT IT RETURNS. BUT IF IT DOES MAP, 01415000
  1448. * THEN IT NEVER RETURNS TO WHERE IT WAS CALLED FROM, BUT 01416000
  1449. * FALLS THRU TO DEVFND INSTEAD. 01417000
  1450. *********************************************************************** 01418000
  1451. USING VDEVBLOK,R8 @VMD0103 01419000
  1452. DVTYPCHK CLI VDEVTYPC,CLASDASD PERHAPS A DASD DEVICE? @VMD0103 01420000
  1453. BE DVTYPOKY YES. SEE IF IT MAPS. @VMD0103 01421000
  1454. TM VDEVSTAT,VDEVDED DEDICATED DEVICE? @VMD0103 01422000
  1455. BZR R9 NO. RETURN. @VMD0103 01423000
  1456. DVTYPOKY EQU * IT IS A TYPE THAT SHOULD MAP. @VMD0103 01424000
  1457. ICM R8,15,VDEVREAL GET RDEVBLOK ADDRESS. @VMD0103 01425000
  1458. DROP R8 @VMD0103 01426000
  1459. BZR R9 NO ADDRESS. STRANGE. RETURN. @VMD0103 01427000
  1460. SPACE 2 01428000
  1461. USING RDEVBLOK,R8 @VMD0103 01429000
  1462. DEVFND L R8,RDEVCUA GET ADDR OF CONTROL UNIT BLOK. @VMD0103 01430000
  1463. USING RCUBLOK,R8 @VMD0103 01431000
  1464. TM RCUTYPE,RCUSUB IS THIS A SUB-CONTROL UNIT? @VMD0103 01432000
  1465. BZ GETCH NO, MAIN CONTROL. NEXT LEVEL IS @VMD0103 01433000
  1466. * THE CHANNEL BLOK. 01434000
  1467. * IT IS A SUB-CONTROL UNIT. NEXT LEVEL IS MAIN CONTROL UNIT. 01435000
  1468. L R8,RCUPRIME GET MAIN CONTROL UNIT BLOK. @VMD0103 01436000
  1469. GETCH L R4,RCUCHA PICK UP THE CHANNEL BLOK. @VMD0103 01437000
  1470. DROP R8 @VMD0103 01438000
  1471. USING RCHBLOK,R4 @VMD0103 01439000
  1472. L R5,RCHSTIDC DATA FROM STIDC INSTR. ON THE @VMD0103 01440000
  1473. * REAL CHANNEL. 01441000
  1474. LTR R5,R5 FLAG -1 MEANS REAL STIDC GAVE @VMD0103 01442000
  1475. * CC=3. 01443000
  1476. BM PRIVCC3 REAL CHAN GAVE CC=3, SO GIVE THE @VMD0103 01444000
  1477. * SAME THING NOW. 01445000
  1478. * DATA IN R5 FROM REAL STIDC IS ALL SET EXCEPT FOR ONE THING. 01446000
  1479. * THE REAL CHANNEL MIGHT HAVE BEEN A BLOCK MPX, BUT THE VIRTUAL 01447000
  1480. * CHANNEL MIGHT BE SUPPOSED TO LOOK LIKE A SELECTOR (BECAUSE 01448000
  1481. * OF DEFINE COMMAND). CHECK, AND IF SO RESET R5 TO BE SELECTOR. 01449000
  1482. TM VCHTYPE,VCHSEL VIRTUAL CHANNEL IS SELECTOR? @VMD0103 01450000
  1483. BNO PSETIDC NO. VALUE IN R5 IS OKAY, USE IT.@VMD0103 01451000
  1484. N R5,=X'DFFFFFFF' TURN OFF BLOCK MPX BIT (IF ON). @VMD0103 01452000
  1485. B PSETIDC USE STIDC DATA FROM R5. @VMD0103 01453000
  1486. DROP R4,R6 @VMD0103 01454000
  1487. SPACE 01455000
  1488. EJECT 01456000
  1489. *--------------------------------------------------------------------* 01457000
  1490. * COMPARE AND SWAP - CS 01458000
  1491. *--------------------------------------------------------------------* 01459000
  1492. PRCS COUNT DMKPRVCS MP-SAFE INCR. TO COUNTER @V407593 01460000
  1493. LA R6,3 SET FOR WD BDY CHECK @V2B2638 01461000
  1494. B PRCDS1 AND CONTINUE... @V200198 01462000
  1495. SPACE 1 01463000
  1496. *--------------------------------------------------------------------* 01464000
  1497. * COMPARE DOUBLE AND SWAP - CDS 01465000
  1498. *--------------------------------------------------------------------* 01466000
  1499. PRCDS COUNT DMKPRVCD MP-SAFE INCR. TO COUNTER @V407593 01467000
  1500. TM VMINST+1,X'11' R1 AND R3 MUST SPECIFY EVEN REGS @V2B2638 01468000
  1501. BNZ SPECEXCP OR WE HAVE INVALID FORMAT. @V200198 01469000
  1502. LA R6,7 SET FOR DBL WD CHECK @V200198 01470000
  1503. PRCDS1 MC MNCOSIM,MNCLINST CLASS INST, CODE SIMULATION @VM01017 01471000
  1504. SLR R1,R1 SET FOR NO INDEXING. @V2B2638 01472000
  1505. BAL R8,INSTADR COMPUTE VIRTUAL ADDRESS @VA03696 01473000
  1506. LR R7,R3 SET UP FOR BOUNDARY CHECK... @V200198 01474000
  1507. NR R7,R6 CHECK IT (PRESERVE R3 FOR PER) @V200198 01475000
  1508. BNZ SPECEXCP NOPE, SPECIFICATION EXCEPTION @V200198 01476000
  1509. BAL R8,ADTRANS GET REAL ADDRESS @VA03696 01477000
  1510. NI VMPSW+4,X'CF' SET CC0 FOR BC @V200198 01478000
  1511. NI VMPSW+2,X'CF' SET CC0 FOR EC @V200198 01479000
  1512. IC R5,VMINST+1 GET R1/R3 DESIGNATIONS @V200198 01480000
  1513. LR R1,R5 AND REMEMBER FOR LATER. @V200198 01481000
  1514. SRL R5,2 INDEX TO R1... @V200198 01482000
  1515. N R5,F60 IN THE.... @V200198 01483000
  1516. LR R4,R5 ...(SAVE FOR POSSABLE PER)... @V200198 01484000
  1517. ALR R5,R11 USERS VMBLOK. @V200198 01485000
  1518. EX R6,PRCDS3 COMPARE THE PROPER ARGUMENTS @V200198 01486000
  1519. BE PRCDS2 EQUAL, OPER3 REPLACES OPER2. @V200198 01487000
  1520. CALL DMKPSAFP NOW CHK FETCH (FASTER THIS WAY) @V200198 01488000
  1521. BNZ PROTEXCP OOPS... @V200198 01489000
  1522. EX R6,PRCDS4 UNEQUAL, OPER2 REPLACES OPER1 @V200198 01490000
  1523. LA R1,PERGPRS JUST IN CASE WE HAVE A PER @V200198 01491000
  1524. TM VMESTAT,VMEXTCM IN EXTENDED MODE? @V200198 01492000
  1525. BO *+12 YES, SKIP THE BC SET... @V200198 01493000
  1526. OI VMPSW+4,X'10' SET CC1 IN BC MODE PSW @V200198 01494000
  1527. B DOPER GO CHECK FOR PER @V200198 01495000
  1528. OI VMPSW+2,X'10' SET CC1 IN EC MODE PSW @V200198 01496000
  1529. B DOPER GO CHECK FOR PER @V200198 01497000
  1530. PRCDS2 SLL R1,2 INDEX TO R3... @V200198 01498000
  1531. N R1,F60 IN THE... @V200198 01499000
  1532. ALR R1,R11 USERS VMBLOK. @V200198 01500000
  1533. CALL DMKPSASP CHECK OPER2 FOR STORAGE PROT @V200198 01501000
  1534. BNZ PROTEXCP OOPS @V200198 01502000
  1535. EX R6,PRCDS5 EQUAL, OPER3 REPLACES OPER2 @V200198 01503000
  1536. LA R1,PERSALT PER STORAGE ALTERATION @V200198 01504000
  1537. LR R2,R6 FIELD LENGTH @V200198 01505000
  1538. DOPER TM VMESTAT,VMPERCM IS PER ACTIVE? @V200198 01506000
  1539. BZ FASTER NOPE. @V200198 01507000
  1540. BAL R9,PERCHEK GO CHECK IT OUT @V200198 01508000
  1541. B FASTER DONE @V200198 01509000
  1542. EJECT 01510000
  1543. PRCDS3 CLC VMGPRS-VMBLOK(0,R5),0(R2) R1 : S2 @V200198 01511000
  1544. PRCDS4 MVC VMGPRS-VMBLOK(0,R5),0(R2) R1 <-- S2 (R1 NE S2) @V200198 01512000
  1545. PRCDS5 MVC 0(0,R2),VMGPRS-VMBLOK(R1) S2 <-- R3 (R1 EQ S2) @V200198 01513000
  1546. EJECT 01514000
  1547. *------------------------------------------------ 01515000
  1548. * CALLING SEQUENCE FOR PERCHEK: 01516000
  1549. * 01517000
  1550. * VMESTAT MUST BE CHECKED FOR VMPERCM BEFORE CALLING PERCHEK 01518000
  1551. * R1 CONTAINS TYPE OF PER EVENT, PERGPRS OR PERSALT 01519000
  1552. * 01520000
  1553. * FOR PERGPRS: 01521000
  1554. * R4 CONTAINS THE GPR NO. * 4 01522000
  1555. * 01523000
  1556. * FOR PERSALT: 01524000
  1557. * R2 CONTAINS THE FIELD LENGTH 01525000
  1558. * R3 CONTAINS THE VIRTUAL ADDRESS WHICH IS CHANGING 01526000
  1559. *------------------------------------------------ 01527000
  1560. PERCHEK EQU * CHECK FOR PER EVENT SIMULATED 01528000
  1561. TM VMESTAT,VMPERCM DOES ANYONE WANT THIS? PER001 01529000
  1562. BZR R9 NO PER, RETURN PER001 01530000
  1563. TM VMTRCTL,VMTRPER CP PER? PER001 01531000
  1564. BZ OWNPER USER PER, GO HANDLE PER001 01532000
  1565. L R10,VMPERCTL OTHERWISE IT'S OURS. PER001 01533000
  1566. LA R15,PERCR9-PERBLOK(,R10) LOAD START OF CR'S. PER001 01534000
  1567. LA R14,PERADDR-PERBLOK(,R10) LOAD EVENT ADDR LOC. PER001 01535000
  1568. B TRAPPER AND LOOK AT THE INTERRUPT. PER001 01536000
  1569. OWNPER L R10,VMECEXT EXTENTION BLOCK ADDRESS. PER001 01537000
  1570. LA R15,EXTCR9-ECBLOK(,R10) START OF CR'S. PER001 01538000
  1571. LA R14,EXTPERAD-ECBLOK(,R10) START OF PERADDR, PEPER001 01539000
  1572. TRAPPER EQU * GPR 15 = ADDRESS OF CR9,10,11 VALUES 01540000
  1573. IC R0,0(,R15) GET CONTROL BYTE FROM C-REG 9 01541000
  1574. NR R0,R1 MASKED ON FOR THIS TYPE? 01542000
  1575. BCR 8,R9 NO - RETURN 01543000
  1576. CH R1,=AL2(PERGPRS) REGISTER ALTERATION? 01544000
  1577. BNE PERCH01 NO - CHECK STORAGE 01545000
  1578. SRL R4,2(0) GET REGISTER NUMBER 01546000
  1579. N R4,F15 INSURE WITHIN RANGE 01547000
  1580. L R0,=A(X'8000') GET A ONE BIT FOR REGISTER CHECKING 01548000
  1581. SRL R0,0(R4) SHIFT BIT INTO POSITION 01549000
  1582. N R0,0(,R15) MONITORING THIS REGISTER? 01550000
  1583. BCR 8,R9 NO - RETURN 01551000
  1584. PERDONE EQU * PER EVENT NEEDS RECORDING 01552000
  1585. TM VMPEND,VMPERPND PER ALREADY PENDING? 01553000
  1586. BZ PERDON1 NO - SET UP EVERYTHING 01554000
  1587. IC R0,4(0,R14) PER CODE BITS 01555000
  1588. OR R0,R1 ADD NEW EVENT TYPE CODE 01556000
  1589. STC R0,4(0,R14) ...AND RESET 01557000
  1590. BR R9 RETURN TO CALLER 01558000
  1591. PERDON1 EQU * SET ALL INFO IN EXTENSION BLOCK 01559000
  1592. SLL R1,8(0) SHIFT CODE BITS 01560000
  1593. STH R1,4(0,R14) ...TO SET VALUE IN EXTENSION BLOCK 01561000
  1594. L R1,VMPSW+4 INSTRUCTION ADDRESS 01562000
  1595. LH R0,VMPRGIL INSTR. LENGTH CODE FROM INTRPT 01563000
  1596. SLR R1,R0 (PSW ADDR MAY APPEAR NEGATIVE) 01564000
  1597. ST R1,0(0,R14) ...GOES IN ALSO 01565000
  1598. MVI 0(R14),X'00' MAKE SURE HIGH-ORDER IS ZERO 01566000
  1599. OI VMPEND,VMPERPND SET PER DATA AVAILABLE 01567000
  1600. BR R9 RETURN TO CALLER 01568000
  1601. EJECT 01569000
  1602. PERCH01 EQU * CHECK FOR STORAGE ALTERATION PER 01570000
  1603. CH R1,=AL2(PERSALT) IF NOT THIS... 01571000
  1604. BCR 7,R9 ...DON'T KNOW WHAT IT IS 01572000
  1605. L R0,4(,R15) STARTING ADDRESS (VIRTUAL) 01573000
  1606. CL R0,8(,R15) DOES IT INVOLVE WRAP-AROUND? 01574000
  1607. BH PERCH03 YES - BLOODY 01575000
  1608. CLR R0,R3 VIRTUAL ADDRESS IS IN R3 01576000
  1609. BL PERCH02 R3 ABOVE LOW BOUND 01577000
  1610. BE PERDONE HIT IT ON THE NOSE 01578000
  1611. LA R2,0(R2,R3) ADD FIELD LENGTH... 01579000
  1612. CLR R2,R0 ...TO CHECK END OF FIELD 01580000
  1613. BH PERDONE HIT IT THIS TIME 01581000
  1614. BR R9 NO RECORDABLE EVENT 01582000
  1615. PERCH02 EQU * R3 ABOVE LOW BOUND 01583000
  1616. CL R3,8(,R15) IS IT BELOW TOP END? 01584000
  1617. BNH PERDONE HIT IT 01585000
  1618. BR R9 OUT OF THE RANGE 01586000
  1619. PERCH03 EQU * STORAGE WRAP-AROUND CASE 01587000
  1620. CLR R0,R3 BELOW FIRST VALUE? 01588000
  1621. BNH PERDONE VIRT ADDR < 1ST OF RANGE @V200198 01589000
  1622. CL R3,8(,R15) OR ABOVE LAST VALUE? 01590000
  1623. BNH PERDONE NO - EVENT @V200198 01591000
  1624. LA R2,0(R2,R3) CHECK END OF FIELD 01592000
  1625. CR R2,R0 ... @V200198 01593000
  1626. BNL PERDONE HIT IT HERE @V200198 01594000
  1627. BR R9 NO RECORDABLE EVENT 01595000
  1628. EJECT 01596000
  1629. *---------------------------------------------------------------------* 01597000
  1630. * 'GETADDR' - COMPUTE VIRTUAL AND REAL ADDRESSES FROM BASE, * 01598000
  1631. * DISPLACEMENT FORM. FOR VIRTUAL 370R, A CHECK IS MADE * 01599000
  1632. * FOR VIRTUAL PAGE OR SEGMENT EXCEPTION, OR FOR FILLING * 01600000
  1633. * IN THE VM SHADOW TABLES. * 01601000
  1634. * * 01602000
  1635. * ON ENTRY: R9 = RETURN ADDRESS * 01603000
  1636. * INSTRUCTION IS IN VMBLOK(VMINST) * 01604000
  1637. * R1 = 0 => NO INDEX REGISTER * 01605000
  1638. * R1 ยฌ= 0 => COMPUTE INDEXING * 01606000
  1639. * * 01607000
  1640. * ON EXIT: REQUIRED PAGE IS IN CORE * 01608000
  1641. * R2 = REAL ADDRESS REFERENCED * 01609000
  1642. * R3 = VIRTUAL ADDRESS * 01610000
  1643. *---------------------------------------------------------------------* 01611000
  1644. GETADDR EQU * 01612000
  1645. BAL R8,INSTADR GET ADDRESS FROM INSTRUCTION 01613000
  1646. BAL R8,ADTRANS TRANSLATE TO REAL ADDRESS 01614000
  1647. BR R9 ...AND RETURN TO CALLER 01615000
  1648. SPACE 01616000
  1649. * INPUTS TO INSTADR: INSTR. IN VMBLOK; R1 = FLAG (SEE ABOVE); 01617000
  1650. * R8 = RETURN ADDRESS. 01618000
  1651. * OUTPUTS: R3 = VIRTUAL ADDR.; R1, R2 ARE DESTROYED. 01619000
  1652. INSTADR EQU * COMPUTE VIRTUAL ADDRESS FROM INSTRUCTION 01620000
  1653. LA R3,X'FFF' MASK FOR INSTRUCTION DISPLACEMENT@V213235 01621000
  1654. N R3,VMINST GET DISPLACEMENT FIELD ONLY @V213235 01622000
  1655. IC R2,VMINST+2 01623000
  1656. SRL 2,2(0) BASE REG. NO. * 4 01624000
  1657. N R2,F60 01625000
  1658. BZ NOBASER ZERO BASE 01626000
  1659. L R2,VMGPRS(R2) BASE REGISTER VALUE 01627000
  1660. NOBASER EQU * 01628000
  1661. LA R3,0(R3,R2) VIRTUAL ADDRESS 01629000
  1662. LTR R1,R1 COMPUTE INDEX? 01630000
  1663. BCR 8,R8 NO - JUST RETURN 01631000
  1664. IC R1,VMINST+1 01632000
  1665. SLL R1,2(0) INDEX REG. NO. * 4 01633000
  1666. N R1,F60 01634000
  1667. BCR 8,R8 NO INDEX - RETURN 01635000
  1668. L R1,VMGPRS(R1) INDEX REGISTER VALUE 01636000
  1669. LA R3,0(R1,R3) INDEXED VIRTUAL ADDRESS 01637000
  1670. BR R8 RETURN 01638000
  1671. SPACE 2 01639000
  1672. * INPUTS TO ADTRANS: R3 = VIRTUAL ADDR.; R8 = RETURN ADDR. 01640000
  1673. * OUTPUTS: R2 = REAL ADDR (OF R3 INPUT); 01641000
  1674. * R0, R1, R14, R15 ARE DESTROYED. 01642000
  1675. ADTRANS EQU * TRANSLATE VIRTUAL ADDRESS TO REAL 01643000
  1676. TM VMESTAT,VMEXTCM IN EC-MODE NOW? 01644000
  1677. BZ SIMPTRN NO - THAT'S TOO EASY 01645000
  1678. TM VMPSW,TRANMODE IN TRANSLATE MODE ALSO? 01646000
  1679. BO CALLVAT YES - A WORTHY CHALLENGE 01647000
  1680. SIMPTRN EQU * 01648000
  1681. LR R1,R3 VIRTUAL ADDRESS TO R1 01649000
  1682. TRANS21 LCTL C1,C1,VMSEG GET SEG-TABLE ORIGIN @V407593 01650000
  1683. LRA R2,0(0,R1) TRY FOR REAL ADDRESS @V407593 01651000
  1684. BC 8,TR21END GOTIT, LOCK NOT NEEDED. @V407593 01652000
  1685. BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01653000
  1686. * RETURN HERE WITH LOCK HELD 01654000
  1687. TRANS 2,1,OPT=(BRING,DEFER),ADEX=ADDREXCP @V407593 01655000
  1688. TR21END BR R8 RETURN TO CALLER @V407593 01656000
  1689. EJECT 01657000
  1690. CALLVAT EQU * TRANS. VIRT-VIRT TO REAL 01658000
  1691. TM VMESTAT,VMINVPAG SHADOW TABLES VALID? @VM01060 01659000
  1692. BNZ CALLVAT1 NOPE, CALL DMKVAT FOR THIS @VM01060 01660000
  1693. L R1,VMECEXT GET THE USER'S C-REGS 01661000
  1694. LCTL C0,C1,EXTSHCR0-ECBLOK(R1) POINT TO SHADOW TABLES 01662000
  1695. LRA R2,0(0,R3) MAKE THE ATTEMPT FIRST 01663000
  1696. LCTL C0,C0,CPCREG0 RESTORE STANDARD C-REGS 01664000
  1697. LCTL C1,C1,VMSEG ...BEFORE WE GO ANYWHERE 01665000
  1698. BCR 8,R8 ALL O.K. - LET HIM GO 01666000
  1699. CALLVAT1 BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01667000
  1700. * RETURN HERE WITH LOCK HELD 01668000
  1701. CALL DMKVATRN VIRTUAL ADDRESS IS IN R3 01669000
  1702. LTR R0,R0 CHECK RETURN CODE 01670000
  1703. BCR 8,R8 SUCCESSFUL TRANSLATION 01671000
  1704. CL R1,F5 RELOCATION INTERRUPT ? @VA03696 01672000
  1705. BE ADDREXCP NO..NORMAL PATH.. @VA03696 01673000
  1706. * INTERRUPT CODE IS IN R1, EXCEPTION ADDRESS IN R3 01674000
  1707. L R4,VMPSW+4 SET TO BACK UP PSW ADDRESS 01675000
  1708. SH R4,VMPRGIL ILC DATA SAVED IN VMBLOK 01676000
  1709. ST R4,VMPSW+4 ... 01677000
  1710. GOTO DMKVATEX SIMULATE RELOCATION INTERRUPT 01678000
  1711. DS 0F 01679000
  1712. DMKPRVNC DC F'0' NO. OF CALLS TO DMKPRVLG @V2B2638 01680000
  1713. DMKPRVEK DC F'0' INST COUNT FOR X'08' SSK @V2B2638 01681000
  1714. DMKPRVIK DC F'0' INST COUNT FOR X'09' ISK @V2B2638 01682000
  1715. DMKPRVEX DC F'0' INST COUNT FOR X'44' EX ON @V2B2638 01683000
  1716. * SIM INST 01684000
  1717. SPACE 2 01685000
  1718. * THE FOLLOWING TABLES MUST BE KEPT INTACT FOR CORRECT COUNTER MAINT 01686000
  1719. SPACE 01687000
  1720. CNTTAB1 EQU * X'80'-X'85' = 6 ENTRIES @V2B2638 01688000
  1721. DMKPRVMS DC F'0' (X'80') INST COUNT FOR SSM @V2B2638 01689000
  1722. DC F'0' (X'81') RESERVED @V2B2638 01690000
  1723. DMKPRVLP DC F'0' (X'82') INST COUNT FOR LPSW @V2B2638 01691000
  1724. DMKPRVDI DC F'0' (X'83') INST COUNT FOR DIAG @V2B2638 01692000
  1725. DC F'0' (X'84') RESERVED @V2B2638 01693000
  1726. DC F'0' (X'85') RESERVED @V2B2638 01694000
  1727. SPACE 01695000
  1728. CNTTAB2 EQU * X'AC'-X'B7' = 12 ENTRIES @V2B2638 01696000
  1729. DMKPRVMN DC F'0' (X'AC') INST COUNT FOR STNSM @V2B2638 01697000
  1730. DMKPRVMO DC F'0' (X'AD') INST COUNT FOR STOSM @V2B2638 01698000
  1731. DC F'0' (X'AE') RESERVED @V2B2638 01699000
  1732. DC F'0' (X'AF') RESERVED @V2B2638 01700000
  1733. DC F'0' (X'B0') RESERVED @V2B2638 01701000
  1734. DMKPRVLR DC F'0' (X'B1') INST COUNT FOR LRA @V2B2638 01702000
  1735. DC F'0' B2 INSTS COUNTED SEPARATELY @V2B2638 01703000
  1736. DC F'0' (X'B3') RESERVED @V2B2638 01704000
  1737. DC F'0' (X'B4') RESERVED @V2B2638 01705000
  1738. DC F'0' (X'B5') RESERVED @V2B2638 01706000
  1739. DMKPRVTC DC F'0' (X'B6') INST COUNT FOR STCLT @V2B2638 01707000
  1740. DMKPRVLC DC F'0' (X'B7') INST COUNT FOR LCTL @V2B2638 01708000
  1741. SPACE 01709000
  1742. DMKPRVB2 EQU * X'B200'-X'B213' = 20 ENTRIES @V2B2638 01710000
  1743. DC F'0' (X'B200') RESERVED @V2B2638 01711000
  1744. DC F'0' (X'B201') RESERVED @V2B2638 01712000
  1745. DMKPRVCP DC F'0' (X'B202') INST COUNT FOR STIDP @V2B2638 01713000
  1746. DMKPRVCH DC F'0' (X'B203') INST COUNT FOR STIDC @V2B2638 01714000
  1747. DMKPRVTE DC F'0' (X'B204') INST COUNT FOR SCK @V2B2638 01715000
  1748. DC F'0' (X'B205') RESERVED @V2B2638 01716000
  1749. DMKPRVCE DC F'0' (X'B206') INST COUNT FOR SCKC @V2B2638 01717000
  1750. DMKPRVCT DC F'0' (X'B207') INST COUNT FOR STCKC @V2B2638 01718000
  1751. DMKPRVPE DC F'0' (X'B208') INST COUNT FOR SPT @V2B2638 01719000
  1752. DMKPRVPT DC F'0' (X'B209') INST COUNT FOR STPT @V2B2638 01720000
  1753. DMKPRVEP DC F'0' (X'B20A') INST COUNT FOR SPKA @V2B2638 01721000
  1754. DMKPRVIP DC F'0' (X'B20B') INST COUNT FOR IPK @V2B2638 01722000
  1755. DC F'0' (X'B20C') RESERVED @V2B2638 01723000
  1756. DMKPRVPB DC F'0' (X'B20D') INST COUNT FOR PTLB @V2B2638 01724000
  1757. DC 5F'0' (X'B20E'-'B212') RESERVED @V2B2638 01725000
  1758. DMKPRVRR DC F'0' (X'B213') INST COUNT FOR RRB @V2B2638 01726000
  1759. INDTAB DC 28AL1((*-INDTAB)*4) 28 ENTRIES @V2B2638 01727000
  1760. SPACE 01728000
  1761. DMKPRVCS DC F'0' (X'BA') INST COUNT FOR CS @V2B2638 01729000
  1762. DMKPRVCD DC F'0' (X'BB') INST COUNT FOR CDS @V2B2638 01730000
  1763. SPACE 3 01731000
  1764. * THE FOLLOWING 56-BYTE DATA LIST MUST BE KEPT CONTIGUOUS AND IN ORDER 01732000
  1765. * BECAUSE IT IS USED BY THE EXPANDED VIRTUAL MACHINE ASSIST TO PROCESS 01733000
  1766. * THE FOLLOWING PRIVILEGED OPS: LPSW, PTLB, SCKC, SIO, SIOF, SPT, SSM, 01734000
  1767. * STNSM, AND STOSM. 01735000
  1768. SPACE 01736000
  1769. DMKPRVMA DS 0F POINTER LIST FOR EXPANDED VMA @V3M4026 01737000
  1770. DC V(DMKVSIVS) +0 ENTRY POINT FOR 'SIO' ASSIST @V3M4026 01738000
  1771. DC V(DMKVSIEX) +4 BASE ADDR/ENTRY PT FOR 'SIO' @V3M4026 01739000
  1772. DC V(DMKDSPCH) +8 NO NEED TO CHECK NEW PSW @V3M4026 01740000
  1773. DC V(DMKTMRCC) +12 ENTRY POINT USED BY 'SCKC' @V3M4026 01741000
  1774. DC V(DMKTMR) +16 BASE ADDR FOR 'SCKC', 'SPT' @V3M4026 01742000
  1775. DC V(DMKTMRSP) +20 ENTRY POINT USED BY 'SPT' @V3M4026 01743000
  1776. DC V(DMKVATAT) +24 ADDR OF 'ARCHTECT' IN DMKVAT @V3M4026 01744000
  1777. DC V(DMKDSPB) +28 MUST CHECK OUT NEW PSW @V3M4026 01745000
  1778. DMKPRVVS DC F'0' +32 NO. OF EVMA SIO/SIOF'S @V3M4026 01746000
  1779. DMKPRVVL DC F'0' +36 NO. OF EVMA LPSW'S @V3M4026 01747000
  1780. DMKPRVVM DC F'0' +40 NO. OF EVMA SSM/STXSM'S @V3M4026 01748000
  1781. DMKPRVVC DC F'0' +44 NO. OF EVMA SCKC'S @V3M4026 01749000
  1782. DC F'0' +48 RESERVED @V3M4026 01750000
  1783. DMKPRVVP DC F'0' +52 NO. OF EVMA SPT'S @V3M4026 01751000
  1784. EJECT 01752000
  1785. LTORG 01753000
  1786. L4 EQU 4 GENERAL USE AS SYMBOLIC LENGTH. @VMD0103 01754000
  1787. EJECT 01755000
  1788. COPY EQU 01756000
  1789. COPY VMBLOK 01757000
  1790. COPY TREXT 01758000
  1791. COPY PERBLOKS PER001 01758100
  1792. COPY RBLOKS @V508690 01759000
  1793. COPY DEVTYPES @V508690 01760000
  1794. COPY VBLOKS 01761000
  1795. PSA 01762000
  1796. COPY CORE 01763000
  1797. COPY SAVE @V407593 01764000
  1798. END DMKPRVLG 01765000
ibm/vm370-lib/cp/dmkprv.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator