Table of Contents

DMKEXT Source

References

Source Listing

DMKEXT.ASSEMBLE.txt
  1. EXT TITLE 'DMKEXT (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKEXT 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * DMKEXT PROVIDES A CENTRAL LOCATION FOR THE PROCESSING OF 00010000
  11. * SIGNALLING REQUESTS AND MULTI-PROCESSING TYPE INTERRUPTS. 00011000
  12. * ALL SIGNALLING (EXCEPT IN DMKCPI AND DMKAPI, INITIALIZATION 00012000
  13. * ROUTINES) IS DONE THROUGH THE SIGNAL MACRO, WHICH SENDS THE 00013000
  14. * REQUEST TO DMKEXTSP SO THAT ERROR ANALYSIS AND RECOVERY 00014000
  15. * ATTEMPTS CAN BE CENTRALIZED. SO THAT THE HANDLING OF MULTI- 00015000
  16. * PROCESSING TYPE INTERRUPTS CAN ALSO BE CENTRALIZED, THE 00016000
  17. * EXTERNAL INTERRUPT SLIH (DMKPSAEX) WILL GOTO DMKEXTSL FOR ANY 00017000
  18. * TOD SYNC CHECK, EMERGENCY SIGNAL, EXTERNAL CALL, OR 00018000
  19. * MALFUNCTION ALERT. 00019000
  20. * 00020000
  21. * ATTRIBUTES - 00021000
  22. * 00022000
  23. * REENTRANT, RESIDENT, ENTERED VIA BALR OR GOTO 00023000
  24. * 00024000
  25. * ENTRY POINTS - 00025000
  26. * 00026000
  27. * DMKEXTSP - SIGNAL PROCESSOR ROUTINE 00027000
  28. * 00028000
  29. * DMKEXTSL - EXTERNAL INTERRUPT SLIH 00029000
  30. * 00030000
  31. * ENTRY CONDITIONS - 00031000
  32. * 00032000
  33. * SEE ENTRY POINT PROLOGUES 00033000
  34. * 00034000
  35. * EXIT CONDITIONS - 00035000
  36. * 00036000
  37. * SEE ENTRY POINT PROLOGUES 00037000
  38. * 00038000
  39. * CALLS TO OTHER ROUTINES - 00039000
  40. * 00040000
  41. * DMKCLKAP - TO PROCESS SYNC EMERGENCY SIGNAL 00041000
  42. * DMKCLKCC - TO PROCESS CLKCHK EMERGENCY SIGNAL 00042000
  43. * DMKCLKSC - TO PROCESS TOD SYNC CHECK 00043000
  44. * DMKCVTAB - TO TERMINATE VM FOR A CLOCK ERROR 00044000
  45. * EMKDSPCH - TO PROCESS WAKEUP OR DISPATCH EXTERNAL CALL 00045000
  46. * DMKDSPRU - TO PROCESS QUIESCE OR EXTEND EMERGENCY SIGNAL, OR 00046000
  47. * RESUME, WAKEUP, OR DISPATCH EXTERNAL CALL 00047000
  48. * DMKMCTMA - TO PROCESS MALFUNCTION ALERT 00048000
  49. * DMKMCTFS - TO HANDLE NON-ZERO SIGP CONDITION CODES 00048500
  50. * DMKMCTPR - TO PROCESS AUTOMATIC PROCESSOR RECOVERY 00049000
  51. * DMKSTKMP - TO STACK A CPEXBLOK FOR THE CURRENT PROCESSOR 00050000
  52. * 00051000
  53. * EXTERNAL REFERENCES - 00052000
  54. * 00053000
  55. * DMKLOKSY - GLOBAL SYSTEM LOCK 00055000
  56. * DMKPSAER - EXTERNAL INTERRUPT REGS 00056000
  57. * 00057000
  58. * TABLES/WORKAREAS - 00058000
  59. * 00059000
  60. * PSA - DMKEXT WORK/SAVE AREA 00060000
  61. * 00061000
  62. * MACROS - 00062000
  63. * 00063000
  64. * CALL - TO LINK TO ANOTHER SYSTEM ROUTINE 00064000
  65. * GOTO - TO TRANSFER CONTROL UNCONDITIONALLY 00065000
  66. * LOCK - TO OBTAIN A SYSTEM LOCK 00066000
  67. * ABEND - TO TERMINATE THE SYSTEM 00066100
  68. * 00067000
  69. * COPY FILES - 00068000
  70. * 00069000
  71. * CPEXBLOK 00070000
  72. * PSA 00071000
  73. * VMBLOK 00072000
  74. * 00073000
  75. * REGISTER USAGE - 00074000
  76. * 00075000
  77. * GPR11 - VMBLOK ADDRESS 00076000
  78. * GPR12 - BASE REGISTER 00077000
  79. * GPR14 - LINKAGE REGISTER 00078000
  80. * GPR15 - LINKAGE REGISTER 00079000
  81. * 00080000
  82. * OPERATION - 00081000
  83. * 00082000
  84. * SEE ENTRY POINT PROLOGUES 00083000
  85. * 00084000
  86. * ERROR MESSAGES - 00085000
  87. * 00086000
  88. * NONE 00087000
  89. *. 00088000
  90. EJECT 00089000
  91. COPY OPTIONS 00090000
  92. COPY LOCAL OPTIONS 00091000
  93. SPACE 2 00092000
  94. DMKEXT CSECT 00093000
  95. SPACE 3 00094000
  96. ENTRY DMKEXTSP 00095000
  97. ENTRY DMKEXTSL 00096000
  98. ENTRY DMKEXTST @VA10010 00096100
  99. SPACE 00097000
  100. EXTRN DMKCLKAP 00098000
  101. EXTRN DMKCLKCC 00099000
  102. EXTRN DMKCLKSC 00100000
  103. EXTRN DMKCVTAB 00101000
  104. EXTRN DMKDSPRU 00102000
  105. EXTRN DMKLOKSY 00104000
  106. EXTRN DMKMCTMA 00105000
  107. EXTRN DMKMCTPR 00106000
  108. EXTRN DMKPSAER 00107000
  109. EXTRN DMKSTKMP 00108000
  110. EXTRN DMKMCTFS @VA12934 00108500
  111. SPACE 2 00109000
  112. USING PSA,R0 00110000
  113. USING VMBLOK,R11 00111000
  114. EJECT 00112000
  115. *. 00113000
  116. * SUBROUTINE NAME - 00114000
  117. * 00115000
  118. * DMKEXTSP 00116000
  119. * 00117000
  120. * FUNCTION - 00118000
  121. * 00119000
  122. * TO HANDLE ALL SIGNALLING REQUESTS SENT THROUGH THE SIGNAL 00120000
  123. * MACRO 00121000
  124. * 00122000
  125. * ENTRY CONDITIONS - 00123000
  126. * 00124000
  127. * GPR0 - PROCESSOR ADDRESS 00125000
  128. * GPR1 - ORDER CODE PLUS FUNCTION FOR XC AND EMS 00126000
  129. * GPR14 - RETURN ADDRESS 00127000
  130. * GPR15 - ENTRY POINT ADDRESS 00128000
  131. * 00129000
  132. * EXIT CONDITIONS - 00130000
  133. * 00131000
  134. * NORMAL - CONDITION CODE 0, SIGNAL SENT SUCCESSFULLY, OR 00132000
  135. * SYSTEM IN UNIPROCESSOR MODE 00133000
  136. * 00134000
  137. * ERROR - EXT001 ABEND, SERIAL SIGNAL REQUEST MADE WITHOUT 00135000
  138. * THE GLOBAL SYSTEM LOCK 00136000
  139. * 00137000
  140. * REGISTER USAGE - 00138000
  141. * 00139000
  142. * GPR0 - PROCESSOR ADDRESS 00140000
  143. * GPR1 - ORDER CODE 00141000
  144. * GPR5 - FUNCTION CODE FOR EMS 00142000
  145. * GPR6 - PREFIX VALUE OF SIGNALLED PROCESSOR FOR XC AND EMS 00143000
  146. * GPR7-11 - NOT USED, NOT SAVED 00144000
  147. * 00145000
  148. * OPERATION - 00146000
  149. * 00147000
  150. * A. PROCESSING FOR DIRECT SIGNALS 00148000
  151. * 1. CALL THE INTERNAL ROUTINE EXTDIREC TO ISSUE THE SIGP 00149000
  152. * INSTRUCTION. 00150000
  153. * 2. IF THE SIGNAL WAS A STOP OR STOP AND STORE STATUS, ISSUE 00151000
  154. * A SENSE SIGNAL UNTIL THE PROCESSOR IS IN THE STOPPED STATE. 00152000
  155. * 00153000
  156. * B. PROCESSING FOR EXTERNAL CALLS 00154000
  157. * 1. DETERMINE THE TYPE OF EXTERNAL CALL AND SET THE 00155000
  158. * CORRESPONDING BIT IN THE XCPEND FIELD OF THE SIGNALLED 00156000
  159. * PROCESSOR. 00157000
  160. * 2. CALL EXTDIREC TO ISSUE THE SIGP INSTRUCITON. 00158000
  161. * 3. ALL CURRENTLY DEFINED EXTERNAL CALLS ARE PARALLEL REQUESTS 00159000
  162. * SO NO FURTHER PROCESSING IS NEEDED. 00160000
  163. * 00161000
  164. * C. PROCESSING FOR EMERGENCY SIGNALS 00162000
  165. * 1. DETERMINE THE TYPE OF EMERGENCY SIGNAL AND SET THE 00163000
  166. * CORRESPONDING BIT IN THE EMSPEND FIELD OF THE SIGNALLED 00164000
  167. * PROCESSOR. 00165000
  168. * 2. CALL EXTDIREC TO ISSUE THE SIGP INSTRUCTION. 00166000
  169. * 3. ALL CURRENTLY DEFINED EMERGENCY SIGNALS ARE SERIAL 00167000
  170. * REQUESTS SO THE REMAINING STEPS ARE PERFORMED FOR ALL 00168000
  171. * EMERGENCY SIGNALS. 00169000
  172. * 4. TEST THE CORRESPONDING BIT IN THE EMSREC FIELD OF THE 00170000
  173. * SIGNALLED PROCESSOR TO DETERMINE IF THE SIGNAL HAS BEEN 00171000
  174. * RECEIVED. 00172000
  175. * 5. IF NOT, OPEN A WINDOW FOR MALFUNCTION ALERTS, CLOSE THE 00173000
  176. * WINDOW AND AGAIN TEST THE BIT IN EMSREC. REPEAT THIS STEP 00174000
  177. * UNTIL THE BIT IN EMSREC IS SET (OR A MALFUNCTION ALERT IS 00175000
  178. * ENCOUNTERED). 00176000
  179. * 6. TURN OFF THE CORRESPONDING BIT IN THE EMSREC FIELD OF THE 00177000
  180. * SIGNALLED PROCESSOR. 00178000
  181. *. 00179000
  182. SPACE 2 00180000
  183. DMKEXTSP DS 0H SIGNAL PROCESSOR ROUTINE 00181000
  184. USING *,R15 USE R15 FOR TEMPORARY ADDRESSABILITY 00182000
  185. STM R12,R6,SIGSAVE SAVE SUBSET OF CALLERS REGS 00183000
  186. L R12,EXTBASE LOAD UP BASE REG 00184000
  187. DROP R15 STOP USING R15 FOR ADDRESSABILITY 00185000
  188. USING DMKEXT,R12 USE R12 AS BASE REGISTER 00186000
  189. TM APSTAT4,CPAPRPND IS AUTO PROC RECOVERY PENDING? @VA07615 00187100
  190. BO CLEAR YES, CLEAR CC AND EXIT 00188000
  191. L R15,PREFIXA ACCESS ABSOLUTE ZERO @VA12934 00188020
  192. CLI CPAPRINP-PSA(R15),X'FF' IS AUTOMATIC PROCESSOR @VA12934 00188040
  193. * RECOVERY IN PROCESS? 00188060
  194. BE CLEAR YES, DO NOT SIGNAL @VA12934 00188080
  195. LH R15,DMKEXTST GET LOGICAL ADDR OF STOPPED @VA10010 00188100
  196. * PROCESSOR 00188200
  197. CH R15,ZEROES IS A PROCESSOR IN STOPPED STATE? @VA10010 00188300
  198. BNE CLEAR YES, CANCEL THIS SIGNAL REQUEST @VA10010 00188400
  199. LTR R1,R1 TEST ORDER CODE REG FOR EMS 00189000
  200. BM EMSCODE GO HANDLE EMERGENCY SIGNAL 00190000
  201. LA R2,15 SET UP R5 TO ISOLATE LAST 4 BITS 00191000
  202. NR R2,R1 ISOLATE EXACT ORDER CODE 00192000
  203. C R2,XC IS SIGNAL AN EXTERNAL CALL? 00193000
  204. BE XCCODE YES, GO HANDLE EXTERNAL CALL 00194000
  205. BAL R13,EXTDIREC FOR A DIRECT SIGNAL, ISSUE THE 00195000
  206. * SIGP IMMEDIATELY 00196000
  207. C R1,STOP WAS SIGNAL A STOP? 00197000
  208. BE SENSESGP YES, ISSUE SENSE SIGNAL ALSO 00198000
  209. C R1,SSS WAS SIGNAL A STOP AND STORE STATUS? 00199000
  210. BNE CLEAR NO, GO SET CC AND EXIT 00200000
  211. SENSESGP DS 0H ISSUE SENSE SIGNAL 00201000
  212. LA R1,SIGSENSE SET ORDER CODE FOR SENSE 00202000
  213. BAL R13,EXTDIREC GO ISSUE SIGP UNTIL THE OTHER PROCESSOR 00203000
  214. * IS STOPPED 00204000
  215. B EXIT EXIT - CC ALREADY SET 00205000
  216. * 00206000
  217. * PROCESSING FOR EXTERNAL CALL SIGNAL 00207000
  218. * 00208000
  219. XCCODE DS 0H 00209000
  220. SRA R1,4 ISOLATE FUNCTION CODE FOR XC 00210000
  221. LR R5,R1 SAVE FUNCTION CODE FOR TRACE 00211000
  222. SLL R1,24 SHIFT FUNCTION CODE TO HIGH ORDER BYTE 00212000
  223. SLR R6,R6 INITIALIZE PREFIX REG 00213000
  224. CH R0,IPUADDRX IS SIGNAL FOR OTHER PROCESSOR? 00214000
  225. BNE *+8 NO, SKIP SETTING PREFIX REG 00215000
  226. L R6,PREFIXB GET PREFIX OF OTHER PROCESSOR 00216000
  227. L R3,XCPEND-PSA(,R6) GET WORD OF XC PENDING FLAGS 00217000
  228. XCLP DS 0H RETRY POINT FOR C&S 00218000
  229. LR R4,R3 MOVE WORD OF FLAGS TO WORK REG 00219000
  230. OR R4,R1 TURN ON PENDING FLAG 00220000
  231. CS R3,R4,XCPEND-PSA(R6) STORE ALTERED WORD OF FLAGS 00221000
  232. BNE XCLP IF COMPARE FAILS, TRY AGAIN 00222000
  233. LA R1,SIGXC SET ORDER CODE FOR XC 00223000
  234. BAL R13,EXTDIREC ISSUE THE SIGP 00224000
  235. B EXIT EXIT - CC ALREADY SET 00225000
  236. * 00226000
  237. * PROCESSING FOR EMERGENCY SIGNAL 00227000
  238. * 00228000
  239. EMSCODE DS 0H 00229000
  240. LH R2,LPUADDR GET LOGICAL CPU ADDRESS 00230000
  241. L R3,=V(DMKLOKSY) GET ADDRESS OF SYSTEM LOCK 00231000
  242. C R2,0(,R3) IS LOCK HELD BY THIS PROCESSOR? 00232000
  243. BE EMSOK YES, PROCESS EMS REQUEST 00233000
  244. ABEND 1 SYSTEM LOCK NOT HELD 00234000
  245. EMSOK DS 0H 00235000
  246. LPR R1,R1 UNDO COMPLEMENT FOR SERIAL REQUEST 00236000
  247. SRA R1,4 ISOLATE FUNCTION CODE FOR EMS 00237000
  248. LR R5,R1 SAVE FUNCTION CODE FOR LATER 00238000
  249. SLL R1,24 SHIFT FUNCTION CODE TO HIGH ORDER BYTE 00239000
  250. * ALL EMS REQUESTS ARE FOR THE OTHER PROCESSOR 00240000
  251. L R6,PREFIXB GET PREFIX OF OTHER PROCESSOR 00241000
  252. L R3,EMSPEND-PSA(,R6) GET WORD OF EMS PENDING FLAG 00242000
  253. * 00243000
  254. * SETTING OF EMS PENDING FLAGS MUST BE DONE BY C&S EVEN THOUGH 00244000
  255. * ALL EMS REQUESTS ARE SERIAL BECAUSE EMSPQUI MUST BE TURNED 00245000
  256. * OFF WHEN RESUME REQUEST (XC) IS RECEIVED. 00246000
  257. * 00247000
  258. EMSLP1 DS 0H RETRY POINT FOR C&S 00248000
  259. LR R4,R3 MOVE WORD OF FLAGS TO WORK REG 00249000
  260. OR R4,R1 TURN ON NEW PENDING FLAG 00250000
  261. CS R3,R4,EMSPEND-PSA(R6) STORE ALTERED WORD OF FLAGS 00251000
  262. BNE EMSLP1 IF COMPARE FAILS, TRY AGAIN 00252000
  263. LA R1,SIGEMS SET ORDER CODE FOR EMS 00253000
  264. BAL R13,EXTDIREC ISSUE THE SIGP 00254000
  265. CL R15,F4 TEST IF THE PROCESSOR SIGNALLED @VA09324 00254020
  266. * IS TO BE VARIED OFFLINE, I.E., 00254030
  267. * DMKMCTMA WAS CALLED IN EXTDIRC AND 00254040
  268. * AUTOMATIC PROCESSOR RECOVERY (APR) 00254050
  269. * IS PENDING. 00254060
  270. BE RESET YES, BRANCH @VA09324 00254070
  271. EX R5,EMSRTST TEST IF REQUEST HAS BEEN RECEIVED 00255000
  272. BO RESET YES, GO RESET RECEIVED FLAG 00256000
  273. STCTL C0,C0,SIGCREG STORE CURRENT CR0 IN WORK AREA 00257000
  274. NC SIGCREG+2(2),NOMFA TURN OFF MULTIPROCESSING BITS 00258000
  275. OI SIGCREG+2,MFAMASK INSURE MFA BIT IS ON 00259000
  276. LCTL C0,C0,SIGCREG LOAD ALTERED CR0 00260000
  277. WINDOW DS 0H OPEN WINDOW FOR MALFUNCTION ALERT 00261000
  278. STOSM TIME1,EXTMASK ENABLE FOR EXTERNAL INTERRUPTS 00262000
  279. STNSM TIME1,X'FF'-EXTMASK TURN OFF EXTERNAL MASK 00263000
  280. EX R5,EMSRTST SEE IF REQUEST HAS BEEN RECEIVED 00264000
  281. BO EMSRCVD REQUEST RECEIVED OK @VA12934 00264200
  282. TM APSTAT4,CPAPRPND WHILE THE WINDOW WAS OPEN, @VA12934 00264400
  283. * DID WE RECEIVE A MFA? 00264600
  284. BZ WINDOW NO,OPEN WINDOW FOR MFA AGAIN 00265000
  285. EMSRCVD LCTL C0,C0,CPCREG0 RELOAD CONTROL REGISTER 0 @VA12934 00266000
  286. * 00267000
  287. RESET DS 0H RESET RECEIVED FLAG 00268000
  288. EX R5,EMSRSET TURN OFF RECEIVED FLAG 00269000
  289. CLEAR DS 0H 00270000
  290. SR R15,R15 SET CC TO 0 00271000
  291. EXIT DS 0H RETURN TO THE CALLER 00272000
  292. LM R12,R6,SIGSAVE RESTORE SAVED REGS 00273000
  293. BR R14 RETURN TO THE CALLER 00274000
  294. * 00275000
  295. * TM INSTRUCTION OBJECT OF EX TO DETERMINE IF EMS HAS BEEN 00276000
  296. * RECEIVED BY SIGNALLED PROCESSOR 00277000
  297. * 00278000
  298. EMSRTST TM EMSREC-PSA(R6),0 00279000
  299. * 00280000
  300. * XI INSTRUCTION OBJECT OF EX TO TURN OFF RECEIVED FLAG IN PSA 00281000
  301. * OF SIGNALLED PROCESSOR 00282000
  302. * 00283000
  303. EMSRSET XI EMSREC-PSA(R6),0 00284000
  304. EJECT 00285000
  305. *. 00286000
  306. * SUBROUTINE NAME - 00287000
  307. * 00288000
  308. * EXTDIREC 00289000
  309. * 00290000
  310. * FUNCTION - 00291000
  311. * 00292000
  312. * TO ISSUE THE SIGP INSTRUCTION AND ATTEMPT RECOVERY IN SOME 00293000
  313. * CASES 00294000
  314. * 00295000
  315. * ENTRY CONDITIONS - 00296000
  316. * 00297000
  317. * GPR0 - PROCESSOR ADDRESS 00298000
  318. * GPR1 - ORDER CODE 00299000
  319. * GPR13 - RETURN ADDRESS 00300000
  320. * 00301000
  321. * EXIT CONDITIONS - 00302000
  322. * 00303000
  323. * NORMAL - CONDITION CODE 0, SIGNAL SENT SUCCESSFULLY OR 00304000
  324. * SYSTEM IN UNIPROCESSOR MODE 00305000
  325. * 00306000
  326. * ERROR - TO DMKMCTMA TO TERMINATE THE SYSTEM 00307000
  327. * 00308000
  328. * REGISTER USAGE - 00309000
  329. * 00310000
  330. * GPR0 - PROCESSOR ADDRESS 00311000
  331. * GPR1 - ORDER CODE 00312000
  332. * GPR2 - TRACE TABLE ENTRY FOR SIGP 00313000
  333. * GPR3 - COUNT FOR RETRY OF EQUIPMENT CHECK OR RECEIVER CHECK 00314000
  334. * GPR4 - FLAG FOR RETRY OF BUSY CONDITION OR OPERATOR 00315000
  335. * INTERVENING. 00316000
  336. * GPR13 - RETURN ADDRESS 00317000
  337. * GPR14 - WORK REG 00318000
  338. * GPR15 - STATUS REG FOR SIGP 00319000
  339. * 00320000
  340. * OPERATION - 00321000
  341. * 00322000
  342. * BEFORE THE SIGP IS ISSUED, RECORD THE SIGP IN THE NEXT 00323000
  343. * AVAILABLE TRACE TABLE ENTRY. 00324000
  344. * 00325000
  345. * AFTER THE SIGP IS ISSUED, THE FOLLOWING STEPS ARE TAKEN - 00326000
  346. * 00327000
  347. * FOR A CONDITION CODE 0 - 00328000
  348. * 1. RETURN TO THE CALLER. 00329000
  349. * 00330000
  350. * FOR A CONDIITON CODE 1 - 00331000
  351. * 1. IF STATUS INDICATES AN EQUIPMENT CHECK (EXCEPT FOR A 00332000
  352. * RESTART ORDER) OR A RECEIVER CHECK, RETRY THE SIGP 256 00333000
  353. * TIMES BEFORE TREATING THE CONDITION AS A PERMANENT ERROR 00334000
  354. * AND PROCESSING AS FOR A CONDITION CODE 3. TREAT AN 00335000
  355. * EQUIPMENT CHECK FOR A RESTART SIGP AS A PERMANENT ERROR. 00336000
  356. * 2. IF STATUS INDICATES OPERATOR INTERVENING, PROCESS AS FOR 00337000
  357. * A CONDITION CODE 2. 00338000
  358. * 3. IF THE SIGNAL WAS A SENSE (ONLY DONE BY DMKEXTSP) AND 00339000
  359. * STATUS INDICATES STOPPED, RETURN TO THE CALLER. OTHERWISE, 00340000
  360. * TREAT AS A PERMANENT ERROR (THE CONDITION CODE SHOULD 00341000
  361. * INDICATE BUSY UNTIL THE SIGNALLED PROCESSOR IS STOPPED). 00342000
  362. * 4. TREAT ALL OTHER CONDITIONS AS A PERMANENT ERROR AND 00343000
  363. * PROCESS AS FOR A CONDITION CODE 3. 00344000
  364. * 00345000
  365. * FOR A CONDITION CODE 2 (BUSY) - 00346000
  366. * 1. RETRY THE SIGP FOR ONE MINUTE BEFORE TREATING AS A 00347000
  367. * PERMAMENT ERROR AND PROCESSING AS FOR A CONDITION CODE 3. 00348000
  368. * 00349000
  369. * FOR A CONDITION CODE 3 (NOT OPERATIONAL) - 00350000
  370. * 1. CALL DMKMCTMA - THE MALFUNCTION ALERT ROUTINE. IF CONTROL 00351000
  371. * IS RETURNED, THE SYSTEM WILL BE IN UNIPROCESSING MODE. 00352000
  372. * CONTROL WILL ONLY BE RETURNED IF THE CURRENT PROCESSOR IS 00353000
  373. * THE MAIN PROCESSOR. 00354000
  374. *. 00355000
  375. SPACE 2 00356000
  376. EXTDIREC DS 0H INTERNAL ROUTINE TO ISSUE SIGP 00357000
  377. AIF (NOT &TRACE(9)).TR1 00358000
  378. TM TRACFLG2,TRAC13 TRACING ACTIVE? 00359000
  379. BZ TRACDONE NO, SKIP TRACING 00360000
  380. TRACE CODE=TRCSIGP,R2,R3,R4 GET CURRENT TRACE ENTRY 00361000
  381. MVC 1(3,R2),SIGSVR14+1 PLACE RETURN ADDR IN TRACE ENTRY 00362000
  382. STM R0,R1,4(R2) SAVE PROC ADDR AND ORDER CODE 00363000
  383. C R1,XC IS SIGNAL AN EXTERNAL CALL? 00364000
  384. BE SETFC YES, GO FILL IN FUNCTION CODE 00365000
  385. C R1,EMS IS SIGNAL AN EMERGENCY SIGNAL? 00366000
  386. BNE TRACDONE NO, DONE WITH TRACE INITIALIZATION 00367000
  387. SETFC DS 0H 00368000
  388. STC R5,8(,R2) FILL IN FUNCTION CODE FOR XC & EMS 00369000
  389. TRACDONE DS 0H 00370000
  390. .TR1 ANOP 00371000
  391. SLR R4,R4 CLEAR BUSY LOOP CONTROL 00372000
  392. LA R3,F256 INIT LOOP CONTROL FOR EQUIPMENT 00373000
  393. * CHECK AND RECEIVER CHECK 00374000
  394. SIGPLOOP DS 0H 00375000
  395. SLR R15,R15 CLEAR STATUS REG BEFORE SIGP 00376000
  396. SIGP R15,R0,0(R1) SIGNAL PROCESSOR 00377000
  397. BC 8,CCODE0 GO PROCESS CONDITION CODE 0 00378000
  398. BC 2,CBUSY GO PROCESS CONDITION CODE 2 00379000
  399. BC 1,NOTOPER GO PROCESS CONDITION CODE 3 00380000
  400. * 00381000
  401. * PROCESSING FOR CONDITION CODE 1 00382000
  402. * 00383000
  403. AIF (NOT &TRACE(9)).TR2 **AIF** 00383100
  404. TM TRACFLG2,TRAC13 TRACING ACTIVE? @VA07650 00383200
  405. BZ NOTRACE1 SKIP TRACING @VA07650 00383300
  406. MVI 5(R2),CODE1 STORE CODE1 IN TRACE ENTRY 00384000
  407. ST R15,12(,R2) STORE STATUS IN TRACE ENTRY 00385000
  408. .TR2 ANOP 00385100
  409. NOTRACE1 LTR R15,R15 WAS EQUIPMENT CHECK BIT ON @VA07650 00386100
  410. BM EQPTCK YES, PROCESS EQUIPMENT CHECK 00387000
  411. EX R15,RECCKTST EX TM TO DETERMINE IF STATUS 00388000
  412. * INDICATES RECEIVER CHECK 00389000
  413. BO LOOP256 IF ON, GO RETRY 256 TIMES 00390000
  414. EX R15,OPINTTST EX TM TO DETERMINE IF STATUS 00391000
  415. * INDICATES OPERATOR INTERVENING 00392000
  416. BO CBUSY1 IF ON, GO RETRY FOR ONE MINUTE 00393000
  417. C R1,SENSE WAS THIS A SENSE REQUEST? 00394000
  418. BNE XCPNDTST NO, TEST FOR EXTERNAL CALL PENDING 00395000
  419. EX R15,STOPTST EX TM TO DETERMINE IF STATUS 00396000
  420. * INDICATES STOPPED STATE 00397000
  421. BO RETURN IF ON, RETURN TO CALLER 00398000
  422. B NOTOPER1 TREAT OTHER STATUS AS PERM ERROR 00399000
  423. XCPNDTST DS 0H 00400000
  424. EX R15,XCPTST EX TM TO DETERMINE IF STATUS 00401000
  425. * INDICATES EXTERNAL CALL PENDING 00402000
  426. BO RETURN IF ON, RETURN TO CALLER 00403000
  427. B CALLMA TREAT OTHER STATUS AS PERM ERROR @VA12934 00404000
  428. EQPTCK DS 0H 00405000
  429. C R1,RESTART WAS THIS A RESTART REQUEST? 00406000
  430. BE NOTOPER1 YES, TREAT EQPT CHECK AS PERM ERROR 00407000
  431. LOOP256 DS 0H 00408000
  432. BCT R3,SIGPLOOP RETRY 256 TIMES 00409000
  433. B NOTOPER1 AFTER 256 TIMES, TREAT AS PERM ERROR 00410000
  434. * 00411000
  435. * PROCESSING FOR CONDITION CODE 2 00412000
  436. * 00413000
  437. CBUSY DS 0H 00414000
  438. AIF (NOT &TRACE(9)).TR3 **AIF** 00414100
  439. TM TRACFLG2,TRAC13 TRACING ACTIVE? @VA07650 00414200
  440. BZ CBUSY1 NO SKIP TRACING @VA07650 00414300
  441. MVI 5(R2),CODE2 STORE CODE2 IN TRACE ENTRY 00415000
  442. XC 12(4,R2),12(R2) CLEAR STATUS WORD IN TRACE ENTRY 00416000
  443. CBUSY1 DS 0H 00417000
  444. .TR3 ANOP 00417100
  445. LTR R4,R4 WAS THIS THE FIRST BUSY COND? 00418000
  446. BZ FIRSTBSY YES, SET UP TO RETRY FOR 1 MIN 00419000
  447. STCK TIME2 STORE CURRENT CLOCK VALUE 00420000
  448. BC 3,TERMVM IF CLOCK ERROR, TERMINATE VM 00421000
  449. L R14,TIME1 GET ENDING CLOCK VALUE 00422000
  450. CL R14,TIME2 HAS ONE MINUTE ELAPSED? @VA13137 00423000
  451. BH SIGPLOOP NO, REPEAT SIGP 00424000
  452. B NOTOPER1 AFTER 1 MIN, TREAT AS PERM ERROR @VA13137 00425000
  453. FIRSTBSY DS 0H 00426000
  454. LA R4,1 SET CONTROL FOR FIRST BUSY 00427000
  455. STCK TIME1 STORE CURRENT CLOCK VALUE 00428000
  456. BC 3,TERMVM IF CLOCK ERROR, TERMINATE VM 00429000
  457. L R14,TIME1 GET INITIAL CLOCK VALUE 00430000
  458. AL R14,ONEMINUT ADD ONE MINUTE INCREMENT 00431000
  459. ST R14,TIME1 SAVE AS ENDING CLOCK VALUE 00432000
  460. B SIGPLOOP REPEAT SIGP FOR 1 MINUTE 00433000
  461. * 00434000
  462. * PROCESSING FOR CONDITION CODE 3 00435000
  463. * 00436000
  464. NOTOPER DS 0H 00437000
  465. AIF (NOT &TRACE(9)).TR4 **AIF** 00437100
  466. TM TRACFLG2,TRAC13 NO SKIP TRACING @VA07650 00437200
  467. BZ CALLMA @VA12934 00437300
  468. MVI 5(R2),CODE3 STORE CODE3 IN TRACE ENTRY 00438000
  469. XC 12(4,R2),12(R2) CLEAR STATUS WORD IN TRACE ENTRY 00439000
  470. CALLMA CALL DMKMCTMA PROCESS CC 3 LIKE MALFUNCTION @VA12934 00439200
  471. * ALERT 00439400
  472. L R15,F4 SET RETURN CODE TO 4 @VA12934 00439600
  473. BR R13 AND RETURN TO CALLER @VA12934 00439800
  474. NOTOPER1 DS 0H 00440000
  475. .TR4 ANOP 00440100
  476. CALL DMKMCTFS HANDLE FAILING SIGNAL @VA12934 00441000
  477. L R15,F4 SET RETURN CODE TO 4 @VA12934 00441500
  478. BR R13 AND RETURN TO CALLER @VA09324 00442040
  479. * 00443000
  480. * PROCESSING FOR CONDITION CODE 0 00444000
  481. * 00445000
  482. CCODE0 DS 0H 00446000
  483. AIF (NOT &TRACE(9)).TR5 **AIF** 00446100
  484. TM TRACFLG2,TRAC13 NO SKIP TRACING @VA07650 00446200
  485. BZ RETURN @VA07650 00446300
  486. MVI 5(R2),CODE0 STORE CODE0 IN TRACE ENTRY 00447000
  487. XC 12(4,R2),12(R2) CLEAR STATUS WORD IN TRACE ENTRY 00448000
  488. RETURN DS 0H RETURN TO CALLER 00449000
  489. .TR5 ANOP 00449100
  490. SR R15,R15 SET CONDITION CODE TO 0 00450000
  491. BR R13 RETURN TO CALLER 00451000
  492. TERMVM DS 0H TERMINATE VM ON CLOCK ERROR 00452000
  493. GOTO DMKCVTAB ABEND WITH CVT001 ABEND CODE 00453000
  494. * 00454000
  495. * TM INSTRUCTIONS THAT ARE OBJECTS OF EX TO DETERMINE THE 00455000
  496. * STATUS RETURNED ON A CONDITION CODE 1 00456000
  497. * 00457000
  498. RECCKTST TM RECCKON,0 TEST FOR RECEIVER CHECK 00458000
  499. OPINTTST TM OPINTON,0 TEST FOR OPERATOR INTERVENING 00459000
  500. STOPTST TM STOPON,0 TEST FOR STOPPED STATE 00460000
  501. XCPTST TM XCPNDON,0 TEST FOR EXTERNAL CALL PENDING 00461000
  502. * 00462000
  503. * CONSTANTS USED IN EXECUTED INSTRUCTIONS 00463000
  504. * 00464000
  505. RECCKON DC X'01' RECEIVER CHECK STATUS BIT 00465000
  506. OPINTON DC X'20' OPERATOR INTERVENING STATUS BIT 00466000
  507. STOPON DC X'40' STOPPED STATE STATUS BIT 00467000
  508. XCPNDON DC X'80' EXTERNAL CALL PENDING STATUS BIT 00468000
  509. EJECT 00469000
  510. *. 00470000
  511. * SUBROUTINE NAME - 00471000
  512. * 00472000
  513. * DMKEXTSL 00473000
  514. * 00474000
  515. * FUNCTION - 00475000
  516. * 00476000
  517. * UPON RECEIPT OF A MULTI-PROCESSING TYPE INTERRUPT, TO ROUTE 00477000
  518. * CONTROL TO THE APPROPRIATE RECEIVING ROUTINE OR TO TAKE THE 00478000
  519. * APPROPRIATE ACTION. 00479000
  520. * 00480000
  521. * ENTRY CONDITIONS - 00481000
  522. * 00482000
  523. * GPR12 - ENTRY POINT ADDRESS 00483000
  524. * 00484000
  525. * EXIT CONDITIONS - 00485000
  526. * 00486000
  527. * NORMAL - TO THE APPROPRIATE RECEIVING ROUTINE 00487000
  528. * 00488000
  529. * REGISTER USAGE - 00489000
  530. * 00490000
  531. * GPR0-1 - WORK REGISTERS 00491000
  532. * GPR2 - INTERRUPT CODE 00492000
  533. * 00493000
  534. * OPERATION - 00494000
  535. * 00495000
  536. * A. PROCESSING FOR MALFUNCTION ALERTS 00496000
  537. * 1. CALL DMKMCTMA. 00497000
  538. * 00498000
  539. * B. IF CPLOKFL SET, CLEAR CPLOKFL AND CPSYSLK 00499100
  540. * 00499200
  541. * C. PROCESSING FOR EMERGENCY SIGNALS 00499300
  542. * 1. IF THE EMS IS A SHUTDOWN, TURN OFF APUOPER IN EACH PSA, 00499400
  543. * TURN OFF EMSPSHD, TURN ON EMSRSHD, AND LOAD A DISABLED 00499500
  544. * 008 WAIT STATE. 00499600
  545. * 2. IF THE EMS IS FOR EXTEND, DISABLE CHANNEL 0 AND GOTO 00499700
  546. * DMKDSPRU. 00499800
  547. * 3. IF THE EMS IS A SYNC, GOTO DMKCLKAP. 00499900
  548. * 4. IF THE EMS IS A CLKCHK, GOTO DMKCLKCC. 00500000
  549. * 5. IF THE EMS IS QUIESCE, CLEAR RESUME PENDING AND 00500100
  550. * GOTO DMKDSPRU. 00500200
  551. * 00500300
  552. * D. PROCESSING FOR EXTERNAL CALLS 00500400
  553. * 1. IF THE XC IS AN APR, GOTO DMKMCTPR. 00500500
  554. * 2. IF THE XC IS A RESUME, TURN OFF EMSINQSC (IF ON) AND 00500600
  555. * XCRES. IF NO OTHER XC'S ARE PENDING, GOTO DMKDSPRU. 00500700
  556. * 3. IF THE XC IS A DISPATCH, TRY TO OBTAIN SYSTEM LOCK. 00500800
  557. * IF LOCK OBTAINED, TURN OFF XCDISP AND XCWAK AND GOTO 00500900
  558. * DMKDSPCH. IF THE LOCK IS NOT AVAILABLE, GOTO 00501000
  559. * DMKDSPRU. 00501100
  560. * 4. IF THE XC IS A WAKEUP, TURN OFF XCWAK. IF THE SYSTEM 00501200
  561. * WAS RUNNING A USER, RELOAD THE EXTERNAL OLD PSW. 00501300
  562. * OTHERWISE, TRY TO OBTAIN THE GLOBAL SYSTEM LOCK. IF 00501400
  563. * THE LOCK IS AVAILABLE, GOTO DMKDSPCH; IF THE LOCK IS NOT 00501500
  564. * AVAILABLE, GOTO DMKDSPRU. 00501600
  565. * 00501700
  566. * E. PROCESSING FOR TOD SYNC CHECKS 00501800
  567. * 1. CALL DMKCLKSC. 00501900
  568. * 2. ONCE CONTROL IS RETURNED, IF THE SYSTEM LOCK IS HELD 00502000
  569. * OR IS AVAILABLE, GOTO DMKDSPCH. OTHERWISE, GOTO 00502100
  570. * DMKDSPRU. 00502200
  571. * 00502300
  572. * IF NO INTERRUPTS ARE PENDING, RELOAD THE EXTERNAL OLD PSW. 00502400
  573. *. 00533000
  574. SPACE 2 00534000
  575. DMKEXTSL DS 0H EXTERNAL INTERRUPT SLIH 00535000
  576. USING *,R12 TEMPORARY ADDRESSABILITY 00536000
  577. L R12,EXTBASE LOAD UP DMKEXT BASE REG 00537000
  578. USING DMKEXT,R12 SET UP MODULE ADDRESSABILITY 00538000
  579. LH R2,INTEX PICK UP THE INTERRUPT CODE 00539000
  580. * 00540000
  581. * PROCESSING FOR MALFUNCTION ALERT 00541000
  582. * 00542000
  583. CH R2,MFACODE IS THIS A MALFUNCTION ALERT? 00543000
  584. BNE NOTMFA NO, GO ON TO NEXT TEST 00544000
  585. CALL DMKMCTMA PROCESS THE MALFUNCTION ALERT 00545000
  586. NOTMFA DS 0H 00546000
  587. * 00546100
  588. * DETERMINE IF INTERRUPT OCCURRED IN DMKLOK WINDOW IN 00546200
  589. * SPIN ROUTINE. IF SO, MUST CLEAR SPIN INDICATOR 00546300
  590. * 00546400
  591. TM APSTAT4,CPLOKFL IS LOCK MANAGER FLAG ON? @VA07615 00547100
  592. BNO EMSTST NO, TEST FOR EMERGENCY SIGNAL @VA08873 00548100
  593. NI APSTAT4,X'FF'-CPLOKFL TURN OFF LOCK MGR FLAG @VA07615 00549100
  594. L R14,PREFIXB GET OTHER PROC PREFIX ADDRESS @V4M0173 00550000
  595. NI APSTAT3-PSA(R14),X'FF'-CPSYSLK TURN OFF SYSTEM- @VA07615 00551100
  596. * LOCK-NEEDED FLAG IN OTHER PSA @V4M0173 00552000
  597. * 00553100
  598. * PROCESSING FOR EMERGENCY SIGNAL 00553125
  599. * 00553150
  600. EMSTST DS 0H @VA08873 00553175
  601. CH R2,EMSCODES IS THIS EMERGENCY SIGNAL @VA08873 00553200
  602. BNE XCTST NO, CHECK EXTERNAL CALL @VA08873 00553225
  603. TM EMSPEND,VALDEMS ARE ANY EMS FUNCTIONS PENDING? @VA08873 00553250
  604. BZ XCTST2 NO, CHECK EXTERNAL CALL PENDING @VA08873 00553275
  605. TM EMSPEND,EMSPSHD IS THIS A SHUTDOWN EMS? @VA08873 00553300
  606. BNO XTNDTST NO, GO TEST FOR EXTEND @VA08873 00553325
  607. SR R0,R0 CLEAR REGISTER @VA09941 00553330
  608. LA R3,VMTTIME-VMBLOK(,R0) GET CORRECT @VA09941 00553334
  609. * DISPLACEMENT INTO THE PSA 00553338
  610. ST R3,TIMEDISP USE VMTTIME NOW RUNNING UP @VA09941 00553342
  611. NI APSTAT1,X'FF'-APUOPER TURN OFF APUOPER IN THIS @VA08873 00553350
  612. * PSA 00553375
  613. L R1,PREFIXB GET PREFIX ADDR OF OTHER @VA08873 00553400
  614. * PROCESSOR 00553425
  615. ST R3,TIMEDISP-PSA(R1) USE VMTTIME NOW RUNNING UP @VA09941 00553430
  616. NI APSTAT1-PSA(R1),X'FF'-APUOPER TURN OFF APUOPER @VA08873 00553450
  617. * IN PSA OF OTHER PROCESSOR 00553475
  618. NI EMSPEND,X'FF'-EMSPSHD TURN OFF SHUTDOWN @VA08873 00553500
  619. * PENDING FLAG 00553525
  620. OI EMSREC,EMSRSHD TURN ON SHUTDOWN RECEIVED FLAG @VA08873 00553550
  621. LPSW WAIT08 LOAD DISABLED 008 WAIT STATE @VA08873 00553575
  622. XTNDTST DS 0H @VA08873 00553600
  623. TM EMSPEND,EMSPEXT IS THIS AN EXTEND EMS? @VA08873 00553625
  624. BNO SYNCTST NO, GO TEST FOR SYNC EMS @VA08873 00553650
  625. STCTL C2,C2,SIGCREG STORE CURRENT CR2 IN WORK AREA @VA08873 00553675
  626. NI SIGCREG,X'FF'-CHAN0 DISABLE CHANNEL 0 @VA08873 00553700
  627. LCTL C2,C2,SIGCREG LOAD ALTERED CR2 @VA08873 00553725
  628. B UNLKXT TAKE UNLOCKED EXIT @VA08873 00553750
  629. SYNCTST DS 0H @VA08873 00553775
  630. TM EMSPEND,EMSPSYNC+EMSPCLKC SYNC OR CLKCHK ?? @VA08873 00553800
  631. BZ QSC NO - MUST BE QUIESCE @VA08873 00553825
  632. SPACE 00553850
  633. * MUST NOW GET SYSTEM CREG1 FOR LATER ADDRESSABILITY 00553875
  634. SPACE 00553900
  635. L R3,ASYSVM GET SYSTEM VMBLOK @VA08873 00553925
  636. STCTL C1,C1,SIGCREG SAVE CONTROL REG 1 @VA08873 00553950
  637. LCTL C1,C1,VMSEG-VMBLOK(R3) SYSTEM CONTROL REG 1 @VA08873 00553975
  638. TM EMSPEND,EMSPSYNC IS THIS A SYNC EMS? @VA08873 00554000
  639. BNO CLKCHK NO, MUST BE CLKCHK EMS @VA08873 00554025
  640. SPACE 00554050
  641. * DMKCLK IS AT PRESENT SOMEWHERE IN STORAGE SO MUST FIND 00554075
  642. * THE PROPER REAL ADDRESS OF ROUTINE TO BRANCH TO. 00554100
  643. SPACE 00554125
  644. L R12,=A(DMKCLKAP) ADDR. OF CLOCK SYNC ROUTINE @VA08873 00554150
  645. LRA R12,0(0,R12) GET REAL ADDRESS OF ROUTINE @VA08873 00554175
  646. LCTL C1,C1,SIGCREG RESTORE CONTROL REG 1 @VA08873 00554200
  647. BR R12 GOTO CLOCK SYNC ROUTINE @VA08873 00554225
  648. CLKCHK DS 0H CLKCHK PROCESSING @VA08873 00554250
  649. SPACE 00554275
  650. * DMKCLK IS AT PRESENT SOMEWHERE IN STORAGE SO MUST FIND 00554300
  651. * THE PROPER REAL ADDRESS OF ROUTINE. 00554325
  652. SPACE 00554350
  653. L R12,=A(DMKCLKCC) ADDR OF HIGH ORDER SYNC ROUTINE@VA08873 00554375
  654. LRA R12,0(0,R12) GET REAL ADDRESS OF ROUTINE @VA08873 00554400
  655. LCTL C1,C1,SIGCREG RESTORE CONTROL REG 1 @VA08873 00554425
  656. BR R12 GOTO HIGH ORDER SYNC ROUTINE @VA08873 00554450
  657. QSC DS 0H QUIESCE PROCESSING @VA08873 00554475
  658. * 00554500
  659. * IF A RESUME IS PENDING WHEN A QUIESCE IS ISSUED, THE RESUME 00554525
  660. * MUST BE CLEARED BEFORE THE SYSTEM IS QUIESCED SO THAT 00554550
  661. * THE RESUME WILL NOT CANCEL THE WRONG QUIESCE 00554575
  662. * 00554600
  663. TM XCPEND,XCRES IS A RESUME PENDING? @VA08873 00554625
  664. BZ UNLKXT NO, GO TO DMKDSPRU @VA08873 00554650
  665. L R0,XCPEND GET WORD OF XC PENDING FLAGS @VA08873 00554675
  666. RESLP3 DS 0H RETRY POINT FOR C&S @VA08873 00554700
  667. LR R1,R0 MOVE WORD OF FLAGS TO WORK REG @VA08873 00554725
  668. N R1,RESOFF TURN OFF RESUME PENDING FLAG @VA08873 00554750
  669. CS R0,R1,XCPEND STORE ALTERED WORD OF FLAGS @VA08873 00554775
  670. BNE RESLP3 IF COMPARE FAILS, TRY AGAIN @VA08873 00554800
  671. B UNLKXT GO TO DMKDSPRU @VA08873 00554825
  672. * 00556000
  673. * PROCESSING FOR EXTERNAL CALLS 00557000
  674. * 00558000
  675. XCTST DS 0H 00559000
  676. CH R2,XCCODES EXTERNAL CALL INTERRUPT? @VA08873 00559100
  677. BNE TODTST NO, CHECK TOD SYNC CHECK @VA08873 00559200
  678. XCTST2 DS 0H @VA08873 00559300
  679. TM XCPEND,VALDXC ARE ANY XC FUNCTIONS PENDING? 00560000
  680. BZ TODTST NO, CHECK TOD SYNC CHECK @VA08873 00561100
  681. TM XCPEND,XCAPR IS THIS AN APR XC? 00562000
  682. BNO RESTST NO, GO TEST FOR RESUME 00563000
  683. GOTO DMKMCTPR GO DO AUTO PROCESSOR RECOVERY 00564000
  684. RESTST DS 0H 00565000
  685. TM XCPEND,XCRES IS THIS A RESUME XC? 00566000
  686. BNO DISPTST NO, GO TEST FOR DISPATCH @V4M0210 00567000
  687. L R0,EMSPEND GET WORD OF EMS PENDING FLAGS 00568000
  688. RESLP1 DS 0H RETRY POINT FOR C&S 00569000
  689. LR R1,R0 MOVE WORD OF FLAGS TO WORK REG 00570000
  690. N R1,QSCOFF TURN OFF IN-QUIESCE FLAG @V4M0210 00571000
  691. CS R0,R1,EMSPEND STORE ALTERED WORD OF FLAGS 00572000
  692. BNE RESLP1 IF COMPARE FAILS, TRY AGAIN 00573000
  693. * IS OFF 00574000
  694. L R0,XCPEND GET WORD OF XC PENDING FLAGS 00575000
  695. RESLP2 DS 0H RETRY POINT FOR C&S 00576000
  696. LR R1,R0 MOVE WORD OF FLAGS TO WORK REG 00577000
  697. N R1,RESOFF TURN OFF RESUME PENDING FLAG 00578000
  698. CS R0,R1,XCPEND STORE ALTERED WORD OF FLAGS 00579000
  699. BNE RESLP2 IF COMPARE FAILS, TRY AGAIN 00580000
  700. TM XCPEND,VALDXC ARE ANY OTHER XC'S PENDING? @V4M0210 00581000
  701. BZ UNLKXT NO, GO TAKE UNLOCKED EXIT @V4M0210 00582000
  702. DISPTST DS 0H @V4M0210 00583000
  703. TM XCPEND,XCDISP IS THIS A DISPATCH XC? @V4M0210 00584000
  704. BNO WAKXC NO, MUST BE A WAKEUP XC 00585000
  705. BAL R3,GETLOCK TRY FOR SUPERVISOR LOCK @VA08311 00585400
  706. BNZ UNLKXT NO LOCK, GO TO DMKDSPRU @VA08873 00585600
  707. L R0,XCPEND GET WORD OF XC PENDING FLAGS 00586000
  708. DISPLP DS 0H RETRY POINT FOR C&S 00587000
  709. LR R1,R0 MOVE WORD OF FLAGS TO WORK REG 00588000
  710. * 00589100
  711. * WHEN DISPATCH SIGNAL IS TURNED OFF, TURN OFF WAKEUP. 00589200
  712. * THIS WILL PREVENT CONDITIONS PENDING WITH NO SIGNAL 00589300
  713. * PENDING. THIS CAN OCCUR WHEN AN EXTERNAL CALL IS 00589400
  714. * ALREADY PENDING WHEN THE SIGNAL IS ISSUED. 00589500
  715. * 00589600
  716. N R1,DISPOFF TURN OFF DISPATCH & WAKEUP @VA08873 00589700
  717. CS R0,R1,XCPEND STORE ALTERED WORD OF FLAGS 00590000
  718. BNE DISPLP IF COMPARE FAILS, TRY AGAIN 00591000
  719. B LOCKXT EXIT TO DMKDSPCH @VA08311 00592600
  720. WAKXC DS 0H @V4M0210 00599000
  721. L R0,XCPEND GET WORD OF XC PENDING FLAGS 00600000
  722. WAKLP DS 0H RETRY POINT FOR C&S 00601000
  723. LR R1,R0 MOVE WORD OF FLAGS TO WORK REG 00602000
  724. N R1,WAKOFF TURN OFF WAKEUP PENDING FLAG 00603000
  725. CS R0,R1,XCPEND STORE ALTERED WORD OF FLAGS 00604000
  726. BNE WAKLP IF COMPARE FAILS, TRY AGAIN 00605000
  727. TM CPSTATUS,CPRUN WAS SYSTEM RUNNING A USER? 00606000
  728. BO RERUN YES, RERUN OLD USER 00607000
  729. LOCKSYS DS 0H @VA12934 00607500
  730. BAL R3,GETLOCK NO, GO TRY FOR SYSTEM LOCK 00608000
  731. BZ LOCKXT IF AVAILABLE, TAKE LOCKED EXIT 00609000
  732. B UNLKXT ELSE, TAKE UNLOCKED EXIT 00610000
  733. * 00644000
  734. * PROCESSING FOR TOD SYNC CHECKS 00645000
  735. * 00646000
  736. TODTST DS 0H 00647000
  737. CH R2,TODCODE IS THIS A TOD SYNC CHECK? 00648000
  738. BNE NOCODE NO, NOTHING PENDING 00649000
  739. STCTL C0,C0,SIGCREG STORE CURRENT CR0 IN WORK AREA 00650000
  740. NI SIGCREG+2,X'FF'-SYNCMASK DISABLE FURTHER TOD SYNC CHECKS 00651000
  741. LCTL C0,C0,SIGCREG LOAD ALTERED CR0 00652000
  742. STCTL C0,C0,CPCREG0 STORE ALTERED CR0 IN PSA 00653000
  743. BAL R3,GETLOCK GO TRY FOR SYSTEM LOCK 00654000
  744. BNZ STACK NOT OBTAINED, STACK CALL TO DMKCLK 00655000
  745. CHARGE SWITCH,ASYSVM SWITCH TO SYSTEM VMBLOK 00656000
  746. CLKCALL DS 0H 00657000
  747. CALL DMKCLKSC CALL SYNC CHECK ROUTINE 00658000
  748. B LOCKXT GO TAKE LOCKED EXIT 00659000
  749. STACK DS 0H 00660000
  750. LA R0,CPEXSIZE GET SIZE OF CPEXBLOK 00661000
  751. CALL DMKFREE GET STORAGE FOR CPEXBLOK 00662000
  752. USING CPEXBLOK,R1 USE R1 AS BASE FOR CPEXBLOK 00663000
  753. STM R0,R15,CPEXREGS SAVE CURRENT REGS 00664000
  754. LA R2,CLKCALL GET ADDR FOR CALLING DMKCLK 00665000
  755. ST R2,CPEXADD SAVE IN CPEXBLOK 00666000
  756. MVC CPEXR11,ASYSVM STACK CPEXBLOK FOR SYSTEM 00667000
  757. CALL DMKSTKMP STACK CPEXBLOK TO CALL DMKCLK 00668000
  758. DROP R1 STOP USING R1 AS CPEXBLOK BASE 00669000
  759. L R2,=A(DMKLOKSY+2) GET ADDRESS OF SYSTEM LOCK 00670000
  760. CLC LPUADDR,0(R2) IS SYSTEM LOCK NOW HELD? 00671000
  761. BNE UNLKXT NO, TAKE UNLOCKED EXIT 00672000
  762. LOCKXT DS 0H EXIT TO LOCKED ENTRY OF DMKDSP 00673000
  763. GOTO DMKDSPCH 00674000
  764. UNLKXT DS 0H EXIT TO UNLOCKED ENTRY OF DMKDSP 00675000
  765. GOTO DMKDSPRU 00676000
  766. * 00677000
  767. GETLOCK DS 0H 00678000
  768. LOCK OBTAIN,TYPE=SYS,SPIN=NO TRY TO GET SYSTEM LOCK 00679000
  769. BR R3 RETURN TO CALLER 00680000
  770. * 00681000
  771. * PROCESSING TO RELOAD EXTERNAL OLD PSW 00682000
  772. * 00683000
  773. NOCODE DS 0H 00684000
  774. TM CPSTATUS,CPRUN WAS SYSTEM RUNNING A USER? 00685000
  775. BNO TSTWAIT NO, GO TEST FOR A WAIT 00686000
  776. RERUN DS 0H PREPARE TO RERUN OLD USER 00687000
  777. TM VMPSTAT,VMV370R ARE EC-REGS PRESENT? 00688000
  778. BZ LOADC0 NO, SKIP RELOAD OF C8 00689000
  779. L R1,VMECEXT GET ADDRESS OF ECBLOK 00690000
  780. LCTL C8,C8,EXTCR8-ECBLOK(R1) RELOAD CONTROL REG 8 00691000
  781. LOADC0 DS 0H 00692000
  782. MVI CPSTATUS,CPRUN SET RUNNING USER FLAG 00694000
  783. CHARGE STOP STORE SUPERVISOR TIME FOR USER 00695000
  784. SPT VMTMOUTQ GIVE USER REMAINING TIME LEFT 00696000
  785. L R14,QUANTUMR CHECKPOINT TIME @V4M0218 00697000
  786. S R14,TIMER - (CURRENT TIME) -> SUPERVISOR @V4M0218 00698000
  787. L R15,QUANTUM ORIGINAL TIME @V4M0218 00699000
  788. SR R15,R14 - SUPERVISOR @V4M0218 00700000
  789. ST R15,QUANTUM . . WILL EVENTUALLY GIVE PROBLEM @V4M0218 00701000
  790. LCTL C0,C0,RUNCR0 RELOAD CONTROL REGISTER 0 @VA08854 00701500
  791. LM R0,R15,VMGPRS RELOAD USERS REGS 00702000
  792. LPSW EXOPSW RELOAD EXTERNAL OLD PSW 00703000
  793. TSTWAIT DS 0H 00704000
  794. TM CPSTATUS,CPWAIT WAS SYSTEM IN A WAIT? 00705000
  795. BNO RELOAD NO, JUST RELOAD EXT OLD PSW 00706000
  796. TM APSTAT1,CPINITD IS INITIALIZATION FINISHED? @VA12934 00706200
  797. BO LOCKSYS YES, SYSTEM WAS INITIALIZED AND @VA12934 00706400
  798. * TOOK AN EXTERNAL INTERRUPTION IN 00706600
  799. * A WAIT. EXIT TO THE DISPATCHER. 00706800
  800. MVI CPSTATUS,CPWAIT FLAG SYSTEM AS IN A WAIT 00707000
  801. CHARGE STOP STOP CHARGING SUPERVISOR TIME 00708000
  802. SPT WAITEND RESET THE TIMER 00709000
  803. LPSW EXOPSW RELOAD EXTERNAL OLD PSW 00710000
  804. RELOAD DS 0H 00711000
  805. L R1,=A(DMKPSAER) GET ADDR OF EXT INTERRUPT REGS 00712000
  806. LM R0,R15,0(R1) RELOAD EXT INTERRUPT REGS 00713000
  807. LPSW EXOPSW RELOAD EXTERNAL OLD PSW 00714000
  808. EJECT 00715000
  809. * CONSTANTS 00716000
  810. EXTBASE DC A(DMKEXT) BASE REG 00717000
  811. RESTART DC F'6' RESTART ORDER CODE 00718000
  812. SENSE DC F'1' SENSE ORDER CODE 00719000
  813. XC DC F'2' EXTERNAL CALL ORDER CODE 00720000
  814. EMS DC F'3' EMERGENCY SIGNAL ORDER CODE 00721000
  815. STOP DC F'5' STOP ORDER CODE 00722000
  816. SSS DC F'9' STOP AND STORE STATUS ORDER CODE 00723000
  817. ONEMINUT DC F'64' APPROXIMATELY ONE MINUTE 00724000
  818. MFACODE DC X'1200' MFA INTERRUPT CODE 00725000
  819. TODCODE DC X'1003' TOD SYNC CHECK INT CODE 00726000
  820. EMSCODES DC X'1201' EMS INTERRUPT CODE @VA08873 00727100
  821. XCCODES DC X'1202' EXTERNAL CALL INTERRUPT CODE @VA08873 00727200
  822. QSCOFF DC X'FEFFFFFF' IN-QUIESCE FLAG OFF @VA08873 00727300
  823. RESOFF DC X'BFFFFFFF' RESUME FLAG OFF @VA08873 00727400
  824. WAKOFF DC X'DFFFFFFF' WAKEUP FLAG OFF @VA08873 00727500
  825. DISPOFF DC X'CFFFFFFF' TURN OFF DISPATCH & WAKEUP @VA08873 00727600
  826. DS 0D 00731000
  827. WAIT08 DC X'000A0000' DISABLED WAIT PSW @V4M0220 00732000
  828. DC X'00000008' WAIT CODE 8 @V4M0220 00733000
  829. NOMFA DC X'831F' ALL EXTERNAL BITS BUT MFA 00734000
  830. DMKEXTST DS 0F @VA10010 00734100
  831. DC H'0' LOGICAL ADDR OF STOPPED PROCESSOR@VA10010 00734200
  832. SPACE 2 00735000
  833. CHAN0 EQU X'80' MASK TO DISABLE CHANNEL 0 00736000
  834. CODE0 EQU X'00' 00737000
  835. CODE1 EQU X'01' 00738000
  836. CODE2 EQU X'02' 00739000
  837. CODE3 EQU X'03' 00740000
  838. EJECT 00741000
  839. LTORG 00742000
  840. EJECT 00743000
  841. PSA 00744000
  842. VALDEMS EQU EMSPQUI+EMSPEXT+EMSPSYNC+EMSPSHD+EMSPCLKC VALID 00745000
  843. * EMERGENCY SIGNAL BITS 00746000
  844. VALDXC EQU XCAPR+XCRES+XCWAK+XCDISP VALID EXTERNAL CALL BITS 00747000
  845. SPACE 2 00748000
  846. * REDEFINITION OF SIGSAVE 00749000
  847. SIGSVR14 EQU SIGSAVE+8 00750000
  848. SIGCREG EQU SIGSAVE+44 00751000
  849. TIME1 EQU SIGSAVE+48 00752000
  850. TIME2 EQU SIGSAVE+56 00753000
  851. EJECT 00754000
  852. COPY EQU 00755000
  853. COPY SAVE 00756000
  854. COPY VMBLOK 00757000
  855. END DMKEXT 00758000