User Tools

Site Tools


ibm:vm370-lib:cp:dmkpsa.assemble_src

DMKPSA Source

References

Source Listing

DMKPSA.ASSEMBLE.txt
  1. PSA TITLE 'DMKPSA (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF SYSIN 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKPSA 00006000
  7. * 00007000
  8. * CONTENTS - 00008000
  9. * 00009000
  10. * DMKPSAEX - EXTERNAL INTERRUPT HANDLER 00010000
  11. * DMKPSADU - PSW RESTART ENTRY 00011000
  12. * 00012000
  13. * FUNCTION - 00013000
  14. * 00014000
  15. * TO PERFORM THE APPROPRIATE ACTIONS FOR VARIOUS 00015000
  16. * TYPES OF EXTERNAL INTERRUPT CODES. 00016000
  17. * 00017000
  18. * ATTRIBUTES - 00018000
  19. * 00019000
  20. * SERIALLY REUSABLE, RESIDENT 00020000
  21. * 00021000
  22. * ENTRY POINTS - 00022000
  23. * 00023000
  24. * DMKPSAEX - EXTERNAL INTERRUPT HANDLER 00024000
  25. * DMKPSADU - ENTRY POINT FOR FORCING AN "SVC 0" TYPE DUMP. 00025000
  26. * DMKPSARX - ENTRY TO GET VIRTUAL ADDR FOR AN RX INSTRUCTION 00026000
  27. * DMKPSARS - ENTRY TO GET VIRTUAL ADDR FOR RS,SI,SS INSTRUCTIONS 00027000
  28. * DMKPSARR - ENTRY TO GET VIRTUAL ADDR FOR AN RR INSTRUCTION 00028000
  29. * DMKPSAID - ENTRY TO GET VIRTUAL ADDR FOR ANY INSTRUCTION 00029000
  30. * DMKPSAFP - ENTRY TO CHECK FETCH PROTECT PER PSW KEY 00030000
  31. * DMKPSASP - ENTRY TO CHECK STORAGE PROTECT PER PSW KEY 00031000
  32. * DMKPSAFC - ENTRY TO CHECK FETCH PROTECT PER CAW KEY 00032000
  33. * DMKPSASC - ENTRY TO CHECK STORAGE PROTECT PER CAW KEY 00033000
  34. * DMKPSACC - ENTRY TO CHECK A SHARED PAGE FOR CHANGE 00034000
  35. * 00035000
  36. * ENTRY POINTS - NON-EXECUTABLE 00036000
  37. * 00037000
  38. * DMKFEIBM - FE SERVICE NUMBER CHARACTER STRING 00038000
  39. * DMKPSANX - NUMBER OF EXTERNAL INTERRUPTS (BY PROC.) 00039000
  40. * DMKPSAER - REGISTERS AT TIME OF EXTERNAL INTERRUPT 00040000
  41. * 00041000
  42. * ENTRY CONDITIONS - 00042000
  43. * 00043000
  44. * FOR EXTERNAL INTERRUPT HANDLER: 00044000
  45. * NONE, OTHER THAN THE INFORMATION IN THE 00045000
  46. * OLD PSW AND INTERRUPT CODE. 00046000
  47. * 00047000
  48. * FOR VIRTUAL ADDRESS SUBROUTINES, SEE SUBROUTINE PROLOGS 00048000
  49. * EXIT CONDITIONS - 00049000
  50. * 00050000
  51. * DEPENDS UPON ENTRY USED & FUNCTION REQUIRED 00051000
  52. * (SEE "OPERATION"). 00052000
  53. * 00053000
  54. * SYSTEM ABEND CODES - 00054000
  55. * 00055000
  56. * PSA02 - PSW RESTART KEY ACTIVATED 00056000
  57. EJECT 00057000
  58. * CALLS TO OTHER ROUTINES - 00058000
  59. * 00059000
  60. * DMKDSPCH - TO DISPATCH A VIRTUAL MACHINE 00060000
  61. * DMKDSPE - TO REFLECT VIRTUAL TIMER INTERRUPT 00061000
  62. * DMKDMPDK - TO DUMP THE MACHINE IN CASE OF A FATAL ERROR 00062000
  63. * DMKTMRVT - TO PROCESS VIRTUAL CPU TIMER INTERRUPTS 00063000
  64. * DMKSTKIO - TO STACK EXPIRED TRQ 00064000
  65. * DMKFREE - TO OBTAIN CPEXBLOK FOR OPERATOR DISCONNECT 00065000
  66. * DMKSCNRD - TO OBTAIN OPERATOR'S TERMINAL REAL DEVICE ADDRESS 00066000
  67. * DMKQCNCL - TO CLEAR OUTSTANDING CONSOLE REQUESTS 00067000
  68. * DMKRNHND - TO RELEASE NETWORK BTUS OF DISC. OPERATOR 00068000
  69. * DMKSTKMP - TO STACK A CPEXBLOK FOR THE MAIN PROCESSOR 00069000
  70. * DMKEXTSL - TO HANDLE MP-TYPE INTERRUPTS 00070000
  71. * DMKLOKDF - TO ATTEMPT TO ACQUIRE THE SYSTEM LOCK 00071000
  72. * DMKLOKSP - TO OBTAIN SPIN LOCKS 00072000
  73. * DMKDSPRU - TO RUN USERS WITHOUT THE SYSTEM LOCK 00073000
  74. SPACE 00074000
  75. * EXTERNAL REFERENCES - 00075000
  76. * 00076000
  77. * DMKSCHTQ - TIMER REQUEST QUEUE ANCHOR 00077000
  78. * DMKCNSOF - INTERRUPT RETURN ADDRESS FOR CONSOLE I/O 00078000
  79. * DMKLOKTR - TIMER REQUEST QUEUE LOCK 00079000
  80. * DMKLOKSY - THE GLOBAL SYSTEM LOCK 00080000
  81. * 00081000
  82. * TABLES / WORK AREAS - 00082000
  83. * 00083000
  84. * DMKSYSVM - VMBLOK OF CP370 SYSTEM 00084000
  85. * DMKSYSOP - SYSTEM OPERATOR'S VMBLOK 00085000
  86. * REGISTER USAGE - 00086000
  87. * 00087000
  88. * GPR 12 = BASE REGISTER 00088000
  89. * 00089000
  90. * NOTES - 00090000
  91. * 00091000
  92. * THIS MODULE INCLUDES THE "PSA" MACRO AS LIVE CODE, 00092000
  93. * AND RESIDES IN PAGE 0 FOLLOWING THE INFORMATION 00093000
  94. * IN THE "PSA" MACRO. 00094000
  95. EJECT 00095000
  96. * OPERATION - 00096000
  97. * 00097000
  98. * EXTERNAL INTERRUPTIONS ARE HANDLED AS FOLLOWS: 00098000
  99. * 00099000
  100. * 1. IF THE EXTERNAL INTERRUPT WAS FROM THE RED "INTERRUPT" 00100000
  101. * KEY ON THE 370 SYSTEM CONTROL PANEL, THE NECESSARY STEPS 00101000
  102. * (INCLUDING A CALL TO DMKQCNCL) ARE TAKEN TO CLEAR AND 00102000
  103. * DISCONNECT THE SYSTEM OPERATOR'S TERMINAL (IF HE IS LOGGED 00103000
  104. * ON, AND NOT ALREADY DISCONNECTED). THE SYSTEM OPERATOR IS 00104000
  105. * THEN ABLE TO LOG ON OR BE RECONNECTED AT ANY OTHER TERMINAL, 00105000
  106. * VIA THE 'LOGON' COMMAND. THE BUTTON INTERRUPT IS IGNORED FOR 00106000
  107. * ANY PROCESSOR OTHER THAN THE MAIN PROCESSOR IN AP SYSTEMS. 00107000
  108. * 00108000
  109. * 2. IF THE EXTERNAL INTERRUPT WAS DUE TO A TIMER INTERRUPT, 00109000
  110. * THE MACHINE MODE IS DETERMINED, AND ACTION TAKEN AS FOLLOWS: 00110000
  111. * 00111000
  112. * A. IF THE MACHINE WAS IN PROBLEM MODE, THE ADDRESS OF 00112000
  113. * CURRENT USER'S VMBLOK IS OBTAINED FROM RUNUSER. THE 00113000
  114. * USER'S VIRTUAL PSW (VMPSW) IS UPDATED FROM THE EXTERNAL 00114000
  115. * INTERRUPT OLD PSW AND THE ADDRESS OF THE CURRENT VMBLOK 00115000
  116. * IS LOADED INTO GPR-11. 00116000
  117. * 00117000
  118. * B. IF THE EXTERNAL INTERRUPT IS FROM THE CPU TIMER 00118000
  119. * AND THE VIRTUAL CPU TIMER IS CONTAINED IN THE REAL CPU 00119000
  120. * TIMER, A CALL IS MADE TO DMKTMRVT TO PROCESS THE 00120000
  121. * INTERRUPT. IF THE REAL CPU TIMER DOES NOT CONTAIN THE 00121000
  122. * VIRTUAL CPU TIMER, A FLAG IS SET IN THE VMBLOK INDICATING 00122000
  123. * THAT THIS USER'S TIME SLICE HAS BEEN EXCEEDED. CONTROL IS 00123000
  124. * THEN PASSED TO THE DISPATCHER. 00124000
  125. * 00125000
  126. * 3. IF THE EXTERNAL INTERRUPT WAS DUE TO THE TIME OF DAY 00126000
  127. * CLOCK COMPARATOR, THE ACTIVE TIMER REQUEST QUEUE BLOCK 00127000
  128. * (TRQBLOK) IS STACKED FOR EXECUTION VIA DMKSTKIO. FOR A 00128000
  129. * UNIPROCESSOR SYSTEM THE CLOCK COMPARATOR IS RESET FROM THE 00129000
  130. * FIRST TRQBLOK ON THE QUEUE. FOR AN ATTACHED PROCESSOR SYSTEM 00130000
  131. * THE COMPARATOR IS RESET FROM THE FIRST TRQBLOK NOT ALREADY 00131000
  132. * ACTIVE ON THE OTHER PROCESSOR. CONTROL THEN TRANSFERS TO 00132000
  133. * THE DISPATCHER. 00133000
  134. * 00134000
  135. * 4. FOR EXTERNAL INTERRUPTS DUE TO EXTERNAL CALL, EMERGENCY 00135000
  136. * SIGNAL, TOD SYNC CHECK AND MALFUNCTION ALERT, CONTROL IS 00136000
  137. * TRANSFERRED TO DMKEXTSL. 00137000
  138. * 00138000
  139. * THE DMKPSARX, DMKPSARS, DMKPSARR, AND DMKPSAID 00139000
  140. * ENTRY POINTS ARE DESCRIBED IN A FOLLOWING SECTION. 00140000
  141. *. 00141000
  142. EJECT 00142000
  143. COPY OPTIONS 00143000
  144. COPY LOCAL 00144000
  145. DMKPSA START 0 -LOADER CONTROL- 00145000
  146. SPACE 00146000
  147. ENTRY DMKPSACC @V304735 00147000
  148. ENTRY DMKPSADU FOR PSW RESTART 00148000
  149. ENTRY DMKPSAER @V407577 00149000
  150. ENTRY DMKPSAEX FOR EXTERNAL INTERRUPTS @V200820 00150000
  151. ENTRY DMKPSANX @V2B2638 00151000
  152. SPACE 00152000
  153. EXTRN DMKDMPDK @V407579 00153000
  154. EXTRN DMKSCHTQ @V200820 00154000
  155. EXTRN DMKSTKIO @V200820 00155000
  156. EXTRN DMKRNHND @V200820 00156000
  157. EXTRN DMKTMRVT @V200820 00157000
  158. EXTRN DMKSCNRD 00158000
  159. EXTRN DMKQCNCL 00159000
  160. EXTRN DMKDSPE @V386198 00160000
  161. SPACE 2 00161000
  162. EXTRN DMKSTKMP @V407577 00162000
  163. AIF (NOT &AP).EXTSL4 00162900
  164. EXTRN DMKEXTSL @V407577 00163000
  165. EXTRN DMKDSPRU @V407577 00164000
  166. .EXTSL4 ANOP 00164100
  167. USING DMKPSA,R0 REFERENCE PSA MACRO & LIVE CODE THRUOUT 00165000
  168. EJECT 00166000
  169. PSA 00167000
  170. SPACE 2 00168000
  171. SPACE 00169000
  172. ORG PSAEND RESET ORIGIN FOR LIVE CODE: 00170000
  173. DC (X'800'-(*-DMKPSA))X'0' CLEAR STG TO X'800' @V407579 00171000
  174. SPACE 00172000
  175. * 00173000
  176. *** FE SERVICE NUMBER *********** 00174000
  177. SPACE 00175000
  178. ENTRY DMKFEIBM 00176000
  179. DMKFEIBM DC CL12'FEIBM154042 ' CP NUMBER = 154042 00177000
  180. SPACE 00178000
  181. *** FE SERVICE NUMBER *********** 00179000
  182. * 00180000
  183. EJECT 00181000
  184. *. 00182000
  185. * 00183000
  186. * PSW RESTSRT ENTRY (DMKPSADU) 00184000
  187. * 00185000
  188. * 1. SAVE REGISTERS 00186000
  189. * 2. GO TO DMKDMP VIA R12 (DUMP PROGRAM) 00187000
  190. * 00188000
  191. *. 00189000
  192. * 00190000
  193. DMKPSADU DS 0H 00191000
  194. STM R0,R15,DUMPSAVE SAVE REGS ON PSW-RESTART @V407579 00192000
  195. MVC CPABEND(4),PSA2 MOVE IN THE ABEND CODE 00193000
  196. GOTO DMKDMPDK EXIT TO DUMP ROUTINE @V407579 00194000
  197. PSA2 DC CL3'PSA',AL1(2) PSW RESTART ABEND CODE 00195000
  198. EJECT 00196000
  199. *. 00197000
  200. * SUBROUTINE TO COMPUTE AN EFFECTIVE VIRTUAL ADDRESS FOR AN RX 00198000
  201. * (DOUBLE-INDEXED) INSTRUCTION, OR A SINGLE-INDEXED INSTRUCTION: 00199000
  202. * 00200000
  203. * ENTER AT DMKPSARX TO COMPUTE THE ADDRESS 00201000
  204. * FOR A DOUBLE-INDEXED (RX) INSTRUCTION 00202000
  205. * 00203000
  206. * ENTER AT DMKPSARS TO COMPUTE ADDRESS FOR A 00204000
  207. * SINGLE-INDEXED INSTRUCTION (E.G. BXH, BXLE, LPSW, ETC.) 00205000
  208. * 00206000
  209. * ENTER AT DMKPSAID TO COMPUTE THE ADDRESS FOR ANY INSTRUCTION 00207000
  210. * 00208000
  211. * AT ENTRY: 00209000
  212. * GPR 2 = REAL ADDRESS OF VIRTUAL INSTRUCTION 00210000
  213. * (AVAILABLE IN VMINST OR A SAVE-AREA) 00211000
  214. * GPR 14 = RETURN REGISTER 00212000
  215. * 00213000
  216. * AT EXIT: 00214000
  217. * GPR 1 = EFFECTIVE VIRTUAL ADDRESS 00215000
  218. *. 00216000
  219. ENTRY DMKPSARX ENTRY POINT FOR RX INSTRUCTIONS: 00217000
  220. USING VMBLOK,R11 RESTORE ADDRESSABILITY @V4M0203 00218000
  221. DMKPSARX IC R15,1(,R2) PICK UP SECOND BYTE OF INSTRUCTION 00219000
  222. N R15,F15 ISOLATE THE INDEX REGISTER NUMBER 00220000
  223. BZ TRANDX1 IF = 0 DON'T COMPUTE REAL INDEX REG. 00221000
  224. ALR R15,R15 TIMES 4 00222000
  225. ALR R15,R15 ... 00223000
  226. L R15,VMGPRS(R15) PICK UP USER'S INDEX REG. FROM VMBLOK 00224000
  227. TRANDX1 IC R1,2(,R2) PICK UP LEFT BYTE OF BASE.DISP FIELD 00225000
  228. SRL R1,2 SHIFTED RIGHT 2 GIVES US BASE NO. TIMES 4 00226000
  229. N R1,F60 ISOLATE THE BASE NO. BITS ONLY 00227000
  230. BZ TRANDX2 IF = 0 DON'T COMPUTE REAL BASE REG. 00228000
  231. AL R15,VMGPRS(R1) ADD USER'S BASE REGISTER TO HIS INDEX REG 00229000
  232. TRANDX2 LA R1,4095 SET FOR LOW/ORDER 12 BITS, 00230000
  233. N R1,0(,R2) ISOLATE THE DISPLACEMENT BITS, 00231000
  234. LA R1,0(R1,R15) ADD IN THE BASE/INDEX REGISTERS 00232000
  235. BR R14 AND EXIT TO CALLER (ANSWER IN R1) 00233000
  236. SPACE 00234000
  237. ENTRY DMKPSAID ENTRY POINT FOR "ANY" INSTRUCTION 00235000
  238. DMKPSAID CLI 0(R2),X'40' RR INSTRUCTION ? 00236000
  239. BL DMKPSARR YES. 00237000
  240. CLI 0(R2),X'80' RX INSTRUCTION ? 00238000
  241. BL DMKPSARX YES. 00239000
  242. * RS, SI, OR SS - CONTINUE: 00240000
  243. SPACE 00241000
  244. ENTRY DMKPSARS ENTRY POINT FOR RS, SI, SS INSTRUCTIONS: 00242000
  245. DMKPSARS SLR R15,R15 CLEAR R15 (NO INDEX REGISTER APPLICABLE) 00243000
  246. B TRANDX1 AND JOIN RX LOGIC. 00244000
  247. EJECT 00245000
  248. *. 00246000
  249. * DMKPSARR = SIMILAR SUBROUTINE FOR GETTING VIRTUAL ADDRESS FOR 00247000
  250. * A 2-BYTE ("RR") INSTRUCTION: 00248000
  251. * AT ENTRY: 00249000
  252. * GPR 2 = REAL ADDRESS OF VIRTUAL INSTRUCTION 00250000
  253. * GPR 14 = RETURN REGISTER 00251000
  254. * 00252000
  255. * AT EXIT: 00253000
  256. * CC = 0 IF THE "R2" REGISTER DOES NOT EXIST (=0) 00254000
  257. * AND 00255000
  258. * GPR 1 = 0 00256000
  259. * 00257000
  260. * CC = 2 IF THE "R2" REGISTER DOES EXIST (NOT = 0) 00258000
  261. * AND 00259000
  262. * GPR 1 = VIRTUAL ADDRESS GIVEN BY THE "R2" REGISTER 00260000
  263. *. 00261000
  264. ENTRY DMKPSARR ENTRY POINT FOR RR INSTRUCTIONS: 00262000
  265. DMKPSARR IC R1,1(,R2) PICK UP SECOND BYTE OF INSTRUCTION 00263000
  266. CLI 0(R2),X'0E' IS THIS 'MVCL' WIERDO ? 00264000
  267. BE PSAMVCL YES - SPECIAL HANDLING 00265000
  268. N R1,F15 ISOLATE THE INDEX REGISTER NUMBER 00266000
  269. BCR 8,R14 <BZ> IF = 0 THERE'S NOTHING THERE. 00267000
  270. * NOTE - CC = 0 (FOR 'BZ' USE) 00268000
  271. AR R1,R1 TIMES 4 00269000
  272. AR R1,R1 (NOTE - CC NOW 2 FOR 'BP' USE) 00270000
  273. L R1,VMGPRS(R1) PICK UP USER'S "R2" REGISTER FROM VMBLOK 00271000
  274. LA R1,0(,R1) STRIP OFF POSSIBLE HIGH-ORDER BYTE 00272000
  275. BR R14 EXIT (CC SET FOR 'BP' FROM AR ABOVE) 00273000
  276. SPACE 00274000
  277. PSAMVCL EQU * SPECIAL HANDLING FOR 'MVCL' 00275000
  278. SRL R1,2(0) SHIFT TO USE 'R1' FIELD 00276000
  279. N R1,F60 REDUCE TO *4 INDEX 00277000
  280. L R1,VMGPRS(R1) GET REGISTER VALUE 00278000
  281. LA R1,0(0,R1) ...ADDRESS ONLY, PLEASE 00279000
  282. CLI *,X'00' SET CC = 2 00280000
  283. BR R14 RETURN TO CALLER 00281000
  284. EJECT 00282000
  285. *. 00283000
  286. * SUBROUTINE NAME - 00284000
  287. * 00285000
  288. * DMKPSAFP - 00286000
  289. * 00287000
  290. * FUNCTION - 00288000
  291. * 00289000
  292. * TO EXAMINE REAL AND VIRTUAL STORAGE KEYS AND TO DETERMINE 00290000
  293. * IF A FETCH- OR STORAGE- PROTECTION CHECK SHOULD BE SIMULATED 00291000
  294. * 00292000
  295. * ATTRIBUTES - 00293000
  296. * 00294000
  297. * REENTRANT, RESIDENT, CALLED VIA BALR 00295000
  298. * 00296000
  299. * ENTRY POINTS - 00297000
  300. * 00298000
  301. * DMKPSAFP - CHECK FOR FETCH PROTECT VIOLATION PER PSW KEY 00299000
  302. * DMKPSASP - CHECK FOR STORAGE PROTECT VIOLATION PER PSW KEY 00300000
  303. * DMKPSAFC - CHECK FOR FETCH PROTECT VIOLATION PER CAW KEY 00301000
  304. * DMKPSASC - CHECK FOR STORAGE PROTECT VIOLATION PER CAW KEY 00302000
  305. * DMKPSACC - CHECK IF SHARED PAGE FRAME HAS BEEN CHANGED 00303000
  306. * 00304000
  307. * ENTRY CONDITIONS - 00305000
  308. * 00306000
  309. * FOR ALL ENTRY POINTS: 00307000
  310. * GPR 2 = REAL ADDRESS REFERENCED 00308000
  311. * GPR 11 = VMBLOK ADDRESSABILITY 00309000
  312. * GPR 14 = RETURN ADDRESS 00310000
  313. * GPR 15 = ADDRESS OF ENTRY POINT 00311000
  314. * 00312000
  315. * FOR DMKPSAFC & DMKPSASC (CAW-KEY) ENTRIES ONLY: 00313000
  316. * GPR 0 MUST HOLD USER'S "CAW KEY" (IN RIGHTMOST BYTE) 00314000
  317. * 00315000
  318. * EXIT CONDITIONS - 00316000
  319. * 00317000
  320. * FOR ALL ENTRY POINTS: 00318000
  321. * CONDITION CODE 0: NO PROTECTION VIOLATION 00319000
  322. * COND. CODE NONZERO: PROTECTION VIOLATION SHOULD BE SIMULATED 00320000
  323. * 00321000
  324. * GPR 1-14 ARE PRESERVED 00322000
  325. * GPR 0 IS DESTROYED 00323000
  326. * 00324000
  327. * FOR DMKPSAFP & DMKPSAFC (FETCH-PROTECT) ENTRY POINTS: 00325000
  328. * GPR 15 = 00 IF FETCH-PROTECT BIT IN REAL KEY = 0 00326000
  329. * OR REAL KEY (IN BITS 24-27) IF FETCH-PROTECT BIT WAS ON 00327000
  330. * 00328000
  331. * FOR DMKPSASP & DMKPSASC (STORAGE PROTECT) ENTRY POINTS: 00329000
  332. * GPR 15 = REAL KEY (IN BITS 24-27) 00330000
  333. * 00331000
  334. * TABLES / WORK AREAS - 00332000
  335. * 00333000
  336. * NONE 00334000
  337. EJECT 00335000
  338. * REGISTER USAGE - 00336000
  339. * 00337000
  340. * GPR 0 = SCRATCH (TO OBTAIN PSW KEY FROM VMPSW+1) 00338000
  341. * GPR 2 = REAL ADDRESS REFERENCED 00339000
  342. * GPR 14 = RETURN ADDRESS 00340000
  343. * GPR 15 = SCRATCH (TO OBTAIN FETCH-PROTECT BIT & REAL KEY) 00341000
  344. * 00342000
  345. * NOTES - 00343000
  346. * 00344000
  347. * DMKPSASP REPLACES OLD "DMKPRVKY" ENTRY (IN DMKPRV) 00345000
  348. * 00346000
  349. * OPERATION - 00347000
  350. * 00348000
  351. * 1. FETCH-PROTECT CHECKING: 00349000
  352. * FOR THE FETCH-PROTECT ENTRY POINTS (DMKPSAFP & DMKPSAFC), THE 00350000
  353. * REAL STORAGE KEY IS OBTAINED, AND THE FETCH-PROTECT BIT IS 00351000
  354. * EXAMINED. IF 0, EXITS IMMEDIATELY (WITH CONDITION CODE AND 00352000
  355. * GPR 15 = 0). IF THE FETCH-PROTECT BIT = 1, CONTINUES TO THE 00353000
  356. * STORAGE PROTECT LOGIC, AS FOLLOWS: 00354000
  357. * 00355000
  358. * 2. STORAGE-PROTECT CHECKING: 00356000
  359. * THE STORAGE KEY IN THE VIRTUAL PSW (OR CAW) IS COMPARED TO THE 00357000
  360. * REAL STORAGE KEY OF THE PAGE INVOLVED IN THE STORE OPERATION; 00358000
  361. * IF THE VIRTUAL PSW (OR CAW) KEY = 0, OR MATCHES THE REAL KEY, 00359000
  362. * THE CONDITION CODE IS SET TO ZERO. IF THE PSW (OR CAW) KEY IS 00360000
  363. * NONZERO AND DOES NOT MATCH THE REAL STORAGE KEY, A NONZERO 00361000
  364. * CONDITION CODE IS SET. IN EITHER CASE, R15 (BITS 24-27) 00362000
  365. * HOLDS THE REAL STORAGE KEY). 00363000
  366. * 00364000
  367. * 3. SHARED PAGE PROTECTION CHECKING: 00365000
  368. * IF THE VIRTUAL MACHINE IS NOT RUNNING A SHARED SYSTEM, RETURN 00366000
  369. * IS MADE DIRECTLY BACK TO THE CALLER WITH THE CC = 0. 00367000
  370. * OTHERWISE, THE STORAGE KEY AT THE ADDRESS SUPPLIED IN REG. 2 00368000
  371. * IS CHECKED FOR THE HARDWARE CHANGE BIT ON. THE RESULTING 00369000
  372. * CONDITION CODE IS RETURNED TO THE CALLER. 00370000
  373. *. 00371000
  374. SPACE 00372000
  375. ENTRY DMKPSAFP CHECK FETCH PROTECT PER PSW KEY @V202232 00373000
  376. ENTRY DMKPSASP CHECK STORAGE PROTECT PER PSW KEY@V202232 00374000
  377. ENTRY DMKPSAFC CHECK FETCH PROTECT PER CAW KEY @V202232 00375000
  378. ENTRY DMKPSASC CHECK STORAGE PROTECT PER CAW KEY@V202232 00376000
  379. SPACE 00377000
  380. USING VMBLOK,R11 IN EFFECT FOR ALL ENTRIES @V202232 00378000
  381. SPACE 00379000
  382. * DMKPSAFP & DMKPSASP - CHECK FOR FETCH/STORAGE PROTECTION PER PSW KEY: 00380000
  383. DMKPSAFP DS 0D CHECK FOR FETCH PROTECTION PER PSW KEY: 00381000
  384. ST R14,FETCHR14 ENTERED FOR FETCH PROTECTION @V304735 00382000
  385. L R15,X2048BND GET MASK FOR BITS 8-20 @V202232 00383000
  386. NR R15,R2 R15 = REAL ADDR OF STORAGE KEY @V202232 00384000
  387. * BLOCK 00385000
  388. ISK R15,R15 GET THE REAL STORAGE KEY @V202232 00386000
  389. N R15,F8 ISOLATE AND CHECK THE @V202232 00387000
  390. * FETCH-PROTECT BIT 00388000
  391. BCR 8,R14 <BZ> NOT SET: JUST EXIT (WITH CC=0) @V202232 00389000
  392. * FETCH-PROTECT BIT SET: CONTINUE... 00390000
  393. DMKPSASP EQU * CHECK FOR STORAGE PROTECTION PER PSW KEY: 00391000
  394. IC R0,VMPSW+1 GET USER'S PSW KEY. @V304735 00392000
  395. B DMKPSASC CHECK OUT PSW KEY @V304735 00393000
  396. SPACE 00394000
  397. * DMKPSAFC & DMKPSASC - CHECK FOR FETCH/STORAGE PROTECTION PER CAW KEY: 00395000
  398. DMKPSAFC EQU * CHECK FOR FETCH PROTECTION PER CAW KEY: 00396000
  399. ST R14,FETCHR14 ENTERED FOR FETCH PROTECTION @V304735 00397000
  400. L R15,X2048BND GET MASK FOR BITS 8-20 @V202232 00398000
  401. NR R15,R2 R15 = REAL ADDR OF STORAGE KEY @V202232 00399000
  402. * BLOCK 00400000
  403. ISK R15,R15 GET THE REAL STORAGE KEY @V202232 00401000
  404. N R15,F8 ISOLATE AND CHECK THE @V202232 00402000
  405. * FETCH-PROTECT BIT 00403000
  406. BCR 8,R14 <BZ> NOT SET: JUST EXIT (WITH CC=0) @V202232 00404000
  407. * FETCH-PROTECT BIT SET: CONTINUE... 00405000
  408. DMKPSASC EQU * CHECK FOR STORAGE PROTECTION PER CAW KEY: 00406000
  409. L R15,X2048BND GET MASK FOR BITS 8-20 @V202232 00407000
  410. NR R15,R2 R15 = REAL ADDR OF STORAGE KEY @V202232 00408000
  411. * BLOCK 00409000
  412. ISK R15,R15 GET THE REAL STORAGE KEY <AGAIN> @V202232 00410000
  413. N R15,F240 ONLY KEEP KEY. @V304735 00411000
  414. N R0,F240 CHECK USER'S CAW/PSW KEY (IN R0) @V304735 00412000
  415. BZ CHKCAWKY IF = 00, CHECK FOR SHARED PAGE @V304735 00413000
  416. CLR R0,R15 DOES REAL MATCH VIRTUAL ? @V304735 00414000
  417. BNER R14 MISMATCH KEYS - RETURN TO CALLER @V304735 00415000
  418. CHKCAWKY LR R0,R15 SAVE REAL KEY FROM STORAGE @V304735 00416000
  419. TM VMOSTAT,VMSHR USER RUNNING A SHARED SYSTEM ? @V304735 00417000
  420. BZR R14 NO - THEN FETCH/STORE IS OK. @V304735 00418000
  421. LR R15,R2 LOAD REAL STORAGE ADDRESS @V304735 00419000
  422. N R15,XPAGNUM CLEAR OUT DISPLACEMENT @V304735 00420000
  423. SRL R15,8 INDEX INTO CORE TABLE @V304735 00421000
  424. AL R15,ACORETBL FIND ACTUAL CORE TABLE ENTRY @V304735 00422000
  425. TM CORFLAG-CORTABLE(R15),CORSHARE SET COND. CODE @V304735 00423000
  426. LR R15,R0 SAVE REAL KEY FOR CALLER @V304735 00424000
  427. BZR R14 RETURN IF NOT A SHARED PAGE @V304735 00425000
  428. CL R14,FETCHR14 SET CC BASED ON FETCH/STORE ENTRY@V304735 00426000
  429. BR R14 RETURN TO CALLER WITH CC SET @V304735 00427000
  430. DMKPSACC TM VMOSTAT,VMSHR USER RUNNING A SHARED SYSTEM ? @V304735 00428000
  431. BZR R14 IF NOT - RETURN TO CALLER @V304735 00429000
  432. LR R15,R2 GET THE REAL ADDRESS @V304735 00430000
  433. N R15,XPAGNUM DROP OFF THE DISPLACEMENT @V304735 00431000
  434. SRL R15,8 LEAVE INDEX INTO CORTABLE @V304735 00432000
  435. AL R15,ACORETBL GET THE CORRECT CORTABLE ENTRY @V304735 00433000
  436. TM CORFLAG-CORTABLE(R15),CORSHARE IS PAGE SHARED? @V304735 00434000
  437. BZR R14 IF NOT - RETURN TO CALLER @V304735 00435000
  438. LR R15,R2 REAL ADDRESS FOR 'ISK' @V304735 00436000
  439. N R15,XPAGNUM CLEAN UP THE ADDRESS @V304735 00437000
  440. ISK R15,R15 GET THE REAL STORAGE KEY @V304735 00438000
  441. N R15,F2 WAS IT CHANGED ? @V304735 00439000
  442. BNZR R14 IF YES - CC= NON-ZERO @V304735 00440000
  443. LR R15,R2 GET THE REAL ADDRESS AGAIN @V304735 00441000
  444. N R15,XPAGNUM DROP OFF THE DISPLACEMENT @V304735 00442000
  445. LA R15,2048(,R15) SET ADDRESS FOR LAST HALF PAGE @V304735 00443000
  446. ISK R15,R15 NOW GET THE REAL HARDWARE KEY @V304735 00444000
  447. N R15,F2 SET CC; BASED ON CHANGE BIT @V304735 00445000
  448. BR R14 RETURN TO CALL @V304735 00446000
  449. SPACE 1 00447000
  450. FETCHR14 DC F'0' ENTERED FOR FETCH PROTECTION @V304735 00448000
  451. DROP R11 @V202232 00449000
  452. EJECT 00450000
  453. *********************************************************************** 00451000
  454. * * 00452000
  455. * EXTERNAL INTERRUPT HANDLER * 00453000
  456. * * 00454000
  457. *********************************************************************** 00455000
  458. * 00456000
  459. DMKPSAEX DS 0D 00457000
  460. STM R0,R15,DMKPSAER @V407577 00458000
  461. OI CPSTATUS,CPSUPER INDICATE SUPERVISOR STATE @V407577 00459000
  462. TM CPSTATUS,CPRUN RUNNING USER? @V407577 00460000
  463. BNO EXTRSYS NO, WAIT STATE OR DISPATCH WINDOW@V407577 00461000
  464. L R11,RUNUSER GET VMBLOK FOR INTERRUPTED USER @V407577 00462000
  465. USING VMBLOK,R11 ADDRESSABILITY @V407577 00463000
  466. STPT VMTMOUTQ STOP CHARGING WAIT/PROBLEM TIME @V407577 00464000
  467. CHARGE START START CHARGING SUP OVERHEAD @V407577 00465000
  468. MVC QUANTUMR,TIMER SAVE INTERVAL TIMER @V408246 00466000
  469. LCTL C0,C0,CPCREG0 @V408246 00467000
  470. LCTL C8,C8,CPCREG8 @V408246 00468000
  471. STM R0,R15,VMGPRS SAVE MACHINE STATUS... @V407577 00469000
  472. MVC VMGPRS+R11*4(4),DMKPSAER+R11*4 ...AND FIX R11 @V407577 00470000
  473. MVC VMGPRS+R15*4(4),DMKPSAER+R15*4 ..AND R15 @V4M0203 00471000
  474. AIF (NOT &FLOATPT).NOFP4 00472000
  475. STD Y0,VMFPRS 00473000
  476. STD Y2,VMFPRS+8 00474000
  477. STD Y4,VMFPRS+16 00475000
  478. STD Y6,VMFPRS+24 00476000
  479. .NOFP4 ANOP 00477000
  480. L R14,EXOPSW+4 GET ADDRESS FROM OLD PSW @V407577 00478000
  481. ST R14,VMPSW+4 ...UPDATE PSW IN USER'S VMBLOK @V407577 00479000
  482. IC R14,EXOPSW+2 PICK UP COND. CODE, PGM MASK @V407577 00480000
  483. TM VMESTAT,VMEXTCM EXTENDED CONTROL MODE ? 00481000
  484. BZ PSA02 NOPE - IT'S "PLAIN". 00482000
  485. STC R14,VMPSW+2 IF YES, STORE IN SAME POSITION @V407577 00483000
  486. B EXTNOUSR AND CONTINUE 00484000
  487. PSA02 STC R14,VMPSW+4 SET CC, PGM MASK BC-MODE FORMAT @V407577 00485000
  488. B EXTNOUSR @V408246 00486000
  489. SPACE 3 00487000
  490. EJECT 00488000
  491. EXTRSYS DS 0H @V408246 00489000
  492. TM CPSTATUS,CPWAIT COMING OUT OF WAIT? @V407577 00490000
  493. BNO EXTNOWT NO, ENABLE WINDOW @VM40173 00491000
  494. STPT WAITEND STORE THE PROCESSOR WAIT TIME @V407577 00492000
  495. B CHARGSYS GO START CHARGING THE SYSTEM @VA08853 00492100
  496. EXTNOWT DS 0H @VM40173 00493000
  497. STPT TEMPSAVE STORE THE TIME VALUE @VA08853 00493100
  498. CHARGSYS DS 0H @VA08853 00493200
  499. L R11,ASYSVM GET POINTER TO SYSTEM VMBLOK @VM40173 00494000
  500. CHARGE START AND START CHARGING THE SYSTEM @V407577 00495000
  501. EXTNOUSR EQU * 00496000
  502. AIF (NOT &TRACE(9)).TR2 @V408246 00497000
  503. TM TRACFLG1,TRAC01 TRACING ACTIVE? @V408246 00498000
  504. BZ NOTRAC2 BRANCH IF NOT @V408246 00499000
  505. TRACE CODE=TRCEXT,R15,R2,R3 TRACE EXTERNAL INTERRUPT @V407577 00500000
  506. MVC 1(3,R15),ZEROES CLEAR @V408246 00501000
  507. MVC 4(4,R15),INTEXF SAVE INTERRUPT ILC AND CODE @V408246 00502000
  508. MVC 8(8,R15),EXOPSW SAVE EXTERNAL OLD PSW @V408246 00503000
  509. NOTRAC2 EQU * @V408246 00504000
  510. .TR2 ANOP 00505000
  511. LA R15,1 INCREMENT @V408246 00506000
  512. AL R15,DMKPSANX COUNT OF REAL EXTERNAL INTERRUPTS@V408246 00507000
  513. ST R15,DMKPSANX . . @V408246 00508000
  514. SPACE 00509000
  515. CLI INTEX,X'10' IS THIS A CLASS 1 INTERRUPT ? @V386198 00510000
  516. BE EXTTIMER YES, EITHER CPU TIMER ,CKC, OR @V407577 00511000
  517. * TOD SYNC CHECK 00512000
  518. SPACE 00513000
  519. TM INTEX+1,X'40' WAS IT RED BUTTON ? @V386198 00514000
  520. BZ EXTVTMR NO, CHECK IF VIRT. TIMER @V386198 00515000
  521. TM APSTAT1,PROCIO IS THIS THE MAIN PROCESSOR @V407577 00516000
  522. BNO EXTVTMR NO, THEN IGNORE THE BUTTON @V407577 00517000
  523. LH R7,INTEX SAVE INT CODE THROUGH POSSIBLE @V407577 00518000
  524. * MALFUNCTION ALERT 00519000
  525. SPACE 00520000
  526. LA R0,CPEXSIZE INPUT FOR FREE SPACE REQUEST @V386198 00521000
  527. CALL DMKFREE GET STORAGE FOR A CPEXBLOK @V386198 00522000
  528. USING CPEXBLOK,R1 @V386198 00523000
  529. LA R15,EXTBUTTN RETURN ADDRESS FOR UNSTACK @V386198 00524000
  530. ST R15,CPEXADD INTO BLOK @V386198 00525000
  531. STM R0,R15,CPEXREGS SAVE ALL REGISTERS @V386198 00526000
  532. L R15,ASYSOP OPERATOR SHOULD BE R11 USER @V407577 00527000
  533. ST R15,CPEXR11 SAVE IN CPEXBLOK FOR UNSTACK @V407577 00528000
  534. CALL DMKSTKMP STACK FOR THE MAIN PROCESSOR @V407577 00529000
  535. STH R7,INTEX RESTORE INT CODE IN CASE OF MFA @V407577 00530000
  536. SPACE 00531000
  537. EXTVTMR TM INTEX,X'01' VIRT. TIMER INTERRUPT PRESENT ? @V386198 00532000
  538. BZ EXTMP GO CHECK FOR MP-TYPE INTERRUPTS @V407577 00533000
  539. GOTO DMKDSPE GO REFLECT VIRT. TIMER INT. @V386198 00534000
  540. EXTMP DS 0H @V407577 00534800
  541. AIF (NOT &AP).EXTMP4 00534900
  542. LH R0,INTEX PICK UP THE INTERRUPT CODE @V407577 00535000
  543. CH R0,=AL2(X'1200') IS THIS AN MP-TYPE INTERRUPT @V407577 00536000
  544. BNL EXITSL YES, EXIT TO THE EXTERNAL SLIH @V407577 00537000
  545. .EXTMP4 ANOP 00537100
  546. LOCKSYS LOCK OBTAIN,TYPE=SYS,SPIN=NO TRY FOR THE SYS LOCK @V407577 00538000
  547. AIF (NOT &AP).SYLOK4 00538900
  548. BZ EXTEXIT GOT IT...GO TO MAIN DISPATCH @V407577 00539000
  549. LH R0,INTEX PICK UP INTERRRUPT CODE @V407577 00540000
  550. CH R0,=AL2(X'1005') IS THIS A CPU TIMER INTERRUPT @V407577 00541000
  551. BNE EXITRU NO, EXIT TO RUN USERS @V407577 00542000
  552. NI VMDSTAT,X'FF'-VMDSP MARK THIS USER FOR DEFER @V407577 00543000
  553. .SYLOK4 ANOP 00543100
  554. EXITRU EQU * @V407577 00544000
  555. AIF (NOT &AP).DSPRU4 00544900
  556. GOTO DMKDSPRU GO RUN USERS @V407577 00545000
  557. .DSPRU4 ANOP 00545100
  558. EXITSL EQU * @V407577 00546000
  559. AIF (NOT &AP).EXTSL5 00546900
  560. GOTO DMKEXTSL GO HANDLE MP-TYPE INTERRUPTS @V407577 00547000
  561. .EXTSL5 ANOP 00547100
  562. SPACE 00548000
  563. EXTEXIT EQU * @V200820 00549000
  564. GOTO DMKDSPCH @V200820 00550000
  565. SPACE 3 00551000
  566. EXTTIMER LH R0,INTEX PICK UP INTERRUPT CODE 00552000
  567. CH R0,=AL2(X'1004') IS INTERRUPT FROM CPU COMPARATOR 00553000
  568. BE EXTCKC YES - 00554000
  569. CH R0,=AL2(X'1003') TOD SYNC CHECK? @V407577 00555000
  570. BE EXITSL YES, EXIT TO DMKEXTSL @V407577 00556000
  571. TM CPSTATUS,CPRUN WAS SYSTEM RUNNING A USER? THIS @VA07611 00556100
  572. * IS THE ONLY TIME SYSTEM SHOULD GET 00556200
  573. * A CPU TIMER INTERRUPT. 00556300
  574. BO INTOK YES, INTERRUPT IS GOOD @VA07611 00556400
  575. ABEND 4 TERMINATE VM/370 @VA07611 00556700
  576. INTOK DS 0H @VA07611 00556800
  577. OI VMTLEVEL,VMTMRINT FLAG CPU TIMER INT. FOR DISPATCH 00557000
  578. OI VMDSTAT,VMQSEND FLAG PROBABLE TIME SLICE END ... 00558000
  579. TM VMTLEVEL,VMCPUTMR IS VIRTUAL CPU TIMER IN REAL TIMER 00559000
  580. BZ LOCKSYS TRY FOR THE SYSTEM LOCK @V407577 00560000
  581. NI VMDSTAT,X'FF'-VMQSEND OOPS ... 00561000
  582. GOTO DMKTMRVT GIVE THE INTERRUPT TO DMKTMR @V200820 00562000
  583. SPACE 1 00563000
  584. EXTCKC EQU * HERE TO HANDLE TOD CLOCK COMPARATOR INT. 00564000
  585. AIF (NOT &AP).APCHK5 00564900
  586. TM APSTAT1,APUOPER ARE WE RUNNING AP @V407577 00565000
  587. BO MPCKC YES, USE MP LOGIC FOR TRQBLOKS @V407577 00566000
  588. .APCHK5 ANOP 00566100
  589. L R15,=A(DMKSCHTQ) POINT TO QUEUE OF TIMER REQUESTS 00567000
  590. L R10,TRQBFPNT-TRQBLOK(,R15) GET ACTIVE BLOK 00568000
  591. USING TRQBLOK,R10 ADDRESSABILITY 00569000
  592. LM R1,R2,TRQBFPNT UNCHAIN 1ST (ACTIVE) BLOK 00570000
  593. CLR R15,R1 IS THIS THE DUMMY ELEMENT? @VA05893 00571000
  594. BE EXTSCKC IF SO THIS INTERUPT IS @VA05893 00572000
  595. * UNSOLLICIATED, 00573000
  596. * RESET CLOCK COMPARATOR TO HIGH VALUE. 00574000
  597. ST R1,TRQBFPNT-TRQBLOK(,R2) ... 00575000
  598. ST R2,TRQBBPNT-TRQBLOK(,R1) ... 00576000
  599. CALL DMKSTKIO STACK THE BLOK FOR DISPATCH 00577000
  600. EXTSCKC EQU * @VA05893 00578000
  601. SCKC TRQBVAL-TRQBLOK(R1) 00579000
  602. ST R1,ACTIVTRQ INDICATE THE ACTIVE REQUEST @V407577 00580000
  603. B EXTEXIT AND LEAVE 00581000
  604. AIF (NOT &AP).APCHK6 00581900
  605. MPCKC LOCK OBTAIN,TYPE=TR,SPIN=YES @V407577 00582000
  606. L R10,ACTIVTRQ POINTER TO ACTIVE TRQ @V407577 00583000
  607. L R5,PREFIXB POINT TO OTHER PSA @V407577 00584000
  608. L R4,ACTIVTRQ-PSA(,R5) AND OTHER ACTIVE TRQ @V407577 00585000
  609. LTR R10,R10 IS IT ZERO @V407577 00586000
  610. BZ SCANTRQ YES, INTERRRUPT ON OTHER PROC. @V407577 00587000
  611. CR R10,R4 IS IT THE SAME AS THIS PROC'S @V407577 00588000
  612. BNE UNCHAIN NO, SKIP CLEARING @V407577 00589000
  613. SLR R4,R4 CLEAR FOR THE STORE @V407577 00590000
  614. ST R4,ACTIVTRQ-PSA(,R5) @V407577 00591000
  615. UNCHAIN LM R1,R2,TRQBFPNT UNCHAIN 1ST (ACTIVE) BLOK @V407577 00592000
  616. ST R1,TRQBFPNT-TRQBLOK(,R2) ... @V407577 00593000
  617. ST R2,TRQBBPNT-TRQBLOK(,R1) ... @V407577 00594000
  618. CALL DMKSTKIO STACK THE BLOK FOR DISPATCH @V407577 00595000
  619. SCANTRQ L R15,=A(DMKSCHTQ) POINT TO QUEUE OF TIMER REQ'S @V407577 00596000
  620. LR R10,R15 @V407577 00597000
  621. NEXTTRQ L R10,TRQBFPNT-TRQBLOK(,R10) @V407577 00598000
  622. CR R10,R15 HAVE WE LOOPED @V407577 00599000
  623. BE SETCKC YES, SET THE DISTANT FUTURE @V407577 00600000
  624. CR R10,R4 IS THIS TRQ ALREADY ACTIVE @V407577 00601000
  625. BE NEXTTRQ YES, TRY THE NEXT ONE @V407577 00602000
  626. SETCKC ST R10,ACTIVTRQ NO, INDICATE ACTIVE THIS PROC. @V407577 00603000
  627. SCKC TRQBVAL AND SET THE CLOCK COMPARATOR @V407577 00604000
  628. LOCK RELEASE,TYPE=TR @V407577 00605000
  629. B LOCKSYS TRY FOR THE MAIN ENTRY TO DSP @V407577 00606000
  630. .APCHK6 ANOP 00606100
  631. EJECT 00607000
  632. EXTBUTTN EQU * HERE TO HANDLE THE BUTTON 00608000
  633. TM VMOSTAT,VMSYSOP IS OPERATOR LOGGED @V407577 00609000
  634. BZ EXTEXIT NO...DO NOTHING @V407577 00610000
  635. TM VMOSTAT,VMDISC ALREADY DISCONNECTED @V407577 00611000
  636. BO EXTEXIT YES...DO NOTHING @V407577 00612000
  637. L R8,VMTERM POINTER TO TERMINAL RDEVBLOK @V407577 00613000
  638. LTR R8,R8 IS THERE AN ACTIVE TERMINAL @V407577 00614000
  639. BNP EXTEXIT NO...MUST NOT BE LOGGED ON @V407577 00615000
  640. SPACE 00616000
  641. OI VMOSTAT,VMDISC DISCONNECT SYSTEM OPERATOR @V200820 00617000
  642. SLR R1,R1 @V200820 00618000
  643. ST R1,VMTERM ... @V200820 00619000
  644. USING RDEVBLOK,R8 @V200820 00620000
  645. CALL DMKQCNCL CLEAR ANY OUTSTANDING CONTASK REQ@V200820 00621000
  646. MVC RDEVUSER(4),ASYSVM SET RDEVUSER = A(DMKSYSVM) @V200820 00622000
  647. CLI RDEVTYPC,CLASTERM IS THIS A TERM-CLASS DEVICE @V200820 00623000
  648. BE HALTERM YES - HALT ANY ACTIVE I/O @V200820 00624000
  649. CLI RDEVTYPC,CLASGRAF IS THIS A GRAPHICS-CLASS DEV@V200820 00625000
  650. BE HALTGRF YES - DO WHATEVER IS BEST @V200820 00626000
  651. * MUST BE SPECIAL-CLASS = 3704/5 00627000
  652. LH R1,VMTRMID RESOURCE IDENTIFIER FOR NCP TERM @V200820 00628000
  653. N R1,F4095 STRIP OFF THE DEVICE CODE @V200820 00629000
  654. MH R1,=AL2(NICSIZE*8) CONVERT TO NICLIST INDEX @V200820 00630000
  655. AL R1,RDEVNICL GR1 = NICBLOK ADDRESS @V200820 00631000
  656. USING NICBLOK,R1 @V200820 00632000
  657. L R2,ASYSVM PICK UP POINTER TO SYSTEM VMBLOK @VA09721 00633010
  658. ST R2,NICUSER RESET NICUSER A(DMKSYSVM) @VA09721 00633020
  659. LA R0,CRESIMD RESET IMMEDIATE BTU COMMAND @V200820 00635000
  660. LH R1,NICNAME RESOURCE I.D. FOR THIS DEVICE @V200820 00636000
  661. CALL DMKRNHND,PARM=NORET RESET ANY ACTIVE BTU'S @V200820 00637000
  662. B EXTEXIT GOTO DMKDSPCH @V200820 00638000
  663. SPACE 00639000
  664. HALTGRF EQU * FORCE A DISCONNECT FROM GRAPHIC TERM @V200820 00640000
  665. SPACE 00641000
  666. HALTERM EQU * FIND REAL DEVICE ADDRESS, ETC @V200820 00642000
  667. OI RDEVFLAG,RDEVHIO NEXT INTERRUPT FROM HALT I/O@V200820 00643000
  668. CALL DMKSCNRD GET 'CCU' ADDRESS IN GR1 @V200820 00644000
  669. LA R15,256 SET RETRY COUNTER @VA09912 00644010
  670. HALTCON EQU * FORCE DISCONNECT FROM START-STOP TERM @V200820 00645000
  671. HIO 0(R1) HALT ACTIVE I/O @V200820 00646000
  672. BC 2,*-4 CC = 2 => BURST OPERATION HALTE@V200820 00647000
  673. BC 8+1,EXTEXIT CC = 0, OR CC = 3 => ALL DONE @V200820 00648000
  674. CLI CSW+4,SM+BUSY SHORT CONTROL UNIT BUSY ? @V200820 00649000
  675. BNE HALTCON2 NO @VA04028 00650000
  676. TIO 0(R1) CLEAR CONTROL UNIT BUSY @VA04028 00651000
  677. BCT R15,HALTCON RETRY 256 TIMES @VA09912 00652050
  678. B EXTEXIT THEN GO TO DMKDSPCH @VA09912 00652100
  679. HALTCON2 EQU * @VA04028 00653000
  680. CLI CSW+4,CUE+SM+BUSY 370X-STYLE SHORT BUSY ? @V200820 00654000
  681. BNE EXTEXIT NO -- ASSUME IT WAS HALTED @V200820 00655000
  682. LH R2,RDEVBASE CHECK FOR 370X FAILURE @V200820 00656000
  683. LTR R2,R2 EMULATOR LINE BASED ON 370X ? @V200820 00657000
  684. BNZ EXTEXIT NO, GO TO DMKDSPCH @VA09912 00658100
  685. BCT R15,HALTCON RETRY 256 TIMES @VA09912 00658200
  686. B EXTEXIT THEN GO TO DMKDSPCH @VA09912 00658300
  687. DROP R8 @V200820 00660000
  688. EJECT 00661000
  689. DMKPSAER DS 8D REGS SAVED HERE FOR EXT INTS @V407577 00662000
  690. PSA EQU DMKPSA @V407577 00663000
  691. SPACE 00664000
  692. DMKPSANX DC F'0' NUMBER OF EXTERNAL INTERRUPTS @V2B2638 00665000
  693. SPACE 3 00666000
  694. LTORG 00667000
  695. EJECT 00668000
  696. COPY EQU 00669000
  697. COPY SAVE 00670000
  698. COPY CORE @V304735 00671000
  699. COPY RBLOKS 00672000
  700. COPY DEVTYPES 00673000
  701. COPY VMBLOK 00674000
  702. COPY TIMER 00675000
  703. COPY NETWORK @V200820 00676000
  704. COPY BTUCMD @V200820 00677000
  705. END DMKPSA @V200820 00678000
ibm/vm370-lib/cp/dmkpsa.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator