EXT TITLE 'DMKEXT (CP) VM/370 - RELEASE 6' 00001000 ISEQ 73,80 00002000 *. 00003000 * MODULE NAME - 00004000 * 00005000 * DMKEXT 00006000 * 00007000 * FUNCTION - 00008000 * 00009000 * DMKEXT PROVIDES A CENTRAL LOCATION FOR THE PROCESSING OF 00010000 * SIGNALLING REQUESTS AND MULTI-PROCESSING TYPE INTERRUPTS. 00011000 * ALL SIGNALLING (EXCEPT IN DMKCPI AND DMKAPI, INITIALIZATION 00012000 * ROUTINES) IS DONE THROUGH THE SIGNAL MACRO, WHICH SENDS THE 00013000 * REQUEST TO DMKEXTSP SO THAT ERROR ANALYSIS AND RECOVERY 00014000 * ATTEMPTS CAN BE CENTRALIZED. SO THAT THE HANDLING OF MULTI- 00015000 * PROCESSING TYPE INTERRUPTS CAN ALSO BE CENTRALIZED, THE 00016000 * EXTERNAL INTERRUPT SLIH (DMKPSAEX) WILL GOTO DMKEXTSL FOR ANY 00017000 * TOD SYNC CHECK, EMERGENCY SIGNAL, EXTERNAL CALL, OR 00018000 * MALFUNCTION ALERT. 00019000 * 00020000 * ATTRIBUTES - 00021000 * 00022000 * REENTRANT, RESIDENT, ENTERED VIA BALR OR GOTO 00023000 * 00024000 * ENTRY POINTS - 00025000 * 00026000 * DMKEXTSP - SIGNAL PROCESSOR ROUTINE 00027000 * 00028000 * DMKEXTSL - EXTERNAL INTERRUPT SLIH 00029000 * 00030000 * ENTRY CONDITIONS - 00031000 * 00032000 * SEE ENTRY POINT PROLOGUES 00033000 * 00034000 * EXIT CONDITIONS - 00035000 * 00036000 * SEE ENTRY POINT PROLOGUES 00037000 * 00038000 * CALLS TO OTHER ROUTINES - 00039000 * 00040000 * DMKCLKAP - TO PROCESS SYNC EMERGENCY SIGNAL 00041000 * DMKCLKCC - TO PROCESS CLKCHK EMERGENCY SIGNAL 00042000 * DMKCLKSC - TO PROCESS TOD SYNC CHECK 00043000 * DMKCVTAB - TO TERMINATE VM FOR A CLOCK ERROR 00044000 * EMKDSPCH - TO PROCESS WAKEUP OR DISPATCH EXTERNAL CALL 00045000 * DMKDSPRU - TO PROCESS QUIESCE OR EXTEND EMERGENCY SIGNAL, OR 00046000 * RESUME, WAKEUP, OR DISPATCH EXTERNAL CALL 00047000 * DMKMCTMA - TO PROCESS MALFUNCTION ALERT 00048000 * DMKMCTFS - TO HANDLE NON-ZERO SIGP CONDITION CODES 00048500 * DMKMCTPR - TO PROCESS AUTOMATIC PROCESSOR RECOVERY 00049000 * DMKSTKMP - TO STACK A CPEXBLOK FOR THE CURRENT PROCESSOR 00050000 * 00051000 * EXTERNAL REFERENCES - 00052000 * 00053000 * DMKLOKSY - GLOBAL SYSTEM LOCK 00055000 * DMKPSAER - EXTERNAL INTERRUPT REGS 00056000 * 00057000 * TABLES/WORKAREAS - 00058000 * 00059000 * PSA - DMKEXT WORK/SAVE AREA 00060000 * 00061000 * MACROS - 00062000 * 00063000 * CALL - TO LINK TO ANOTHER SYSTEM ROUTINE 00064000 * GOTO - TO TRANSFER CONTROL UNCONDITIONALLY 00065000 * LOCK - TO OBTAIN A SYSTEM LOCK 00066000 * ABEND - TO TERMINATE THE SYSTEM 00066100 * 00067000 * COPY FILES - 00068000 * 00069000 * CPEXBLOK 00070000 * PSA 00071000 * VMBLOK 00072000 * 00073000 * REGISTER USAGE - 00074000 * 00075000 * GPR11 - VMBLOK ADDRESS 00076000 * GPR12 - BASE REGISTER 00077000 * GPR14 - LINKAGE REGISTER 00078000 * GPR15 - LINKAGE REGISTER 00079000 * 00080000 * OPERATION - 00081000 * 00082000 * SEE ENTRY POINT PROLOGUES 00083000 * 00084000 * ERROR MESSAGES - 00085000 * 00086000 * NONE 00087000 *. 00088000 EJECT 00089000 COPY OPTIONS 00090000 COPY LOCAL OPTIONS 00091000 SPACE 2 00092000 DMKEXT CSECT 00093000 SPACE 3 00094000 ENTRY DMKEXTSP 00095000 ENTRY DMKEXTSL 00096000 ENTRY DMKEXTST @VA10010 00096100 SPACE 00097000 EXTRN DMKCLKAP 00098000 EXTRN DMKCLKCC 00099000 EXTRN DMKCLKSC 00100000 EXTRN DMKCVTAB 00101000 EXTRN DMKDSPRU 00102000 EXTRN DMKLOKSY 00104000 EXTRN DMKMCTMA 00105000 EXTRN DMKMCTPR 00106000 EXTRN DMKPSAER 00107000 EXTRN DMKSTKMP 00108000 EXTRN DMKMCTFS @VA12934 00108500 SPACE 2 00109000 USING PSA,R0 00110000 USING VMBLOK,R11 00111000 EJECT 00112000 *. 00113000 * SUBROUTINE NAME - 00114000 * 00115000 * DMKEXTSP 00116000 * 00117000 * FUNCTION - 00118000 * 00119000 * TO HANDLE ALL SIGNALLING REQUESTS SENT THROUGH THE SIGNAL 00120000 * MACRO 00121000 * 00122000 * ENTRY CONDITIONS - 00123000 * 00124000 * GPR0 - PROCESSOR ADDRESS 00125000 * GPR1 - ORDER CODE PLUS FUNCTION FOR XC AND EMS 00126000 * GPR14 - RETURN ADDRESS 00127000 * GPR15 - ENTRY POINT ADDRESS 00128000 * 00129000 * EXIT CONDITIONS - 00130000 * 00131000 * NORMAL - CONDITION CODE 0, SIGNAL SENT SUCCESSFULLY, OR 00132000 * SYSTEM IN UNIPROCESSOR MODE 00133000 * 00134000 * ERROR - EXT001 ABEND, SERIAL SIGNAL REQUEST MADE WITHOUT 00135000 * THE GLOBAL SYSTEM LOCK 00136000 * 00137000 * REGISTER USAGE - 00138000 * 00139000 * GPR0 - PROCESSOR ADDRESS 00140000 * GPR1 - ORDER CODE 00141000 * GPR5 - FUNCTION CODE FOR EMS 00142000 * GPR6 - PREFIX VALUE OF SIGNALLED PROCESSOR FOR XC AND EMS 00143000 * GPR7-11 - NOT USED, NOT SAVED 00144000 * 00145000 * OPERATION - 00146000 * 00147000 * A. PROCESSING FOR DIRECT SIGNALS 00148000 * 1. CALL THE INTERNAL ROUTINE EXTDIREC TO ISSUE THE SIGP 00149000 * INSTRUCTION. 00150000 * 2. IF THE SIGNAL WAS A STOP OR STOP AND STORE STATUS, ISSUE 00151000 * A SENSE SIGNAL UNTIL THE PROCESSOR IS IN THE STOPPED STATE. 00152000 * 00153000 * B. PROCESSING FOR EXTERNAL CALLS 00154000 * 1. DETERMINE THE TYPE OF EXTERNAL CALL AND SET THE 00155000 * CORRESPONDING BIT IN THE XCPEND FIELD OF THE SIGNALLED 00156000 * PROCESSOR. 00157000 * 2. CALL EXTDIREC TO ISSUE THE SIGP INSTRUCITON. 00158000 * 3. ALL CURRENTLY DEFINED EXTERNAL CALLS ARE PARALLEL REQUESTS 00159000 * SO NO FURTHER PROCESSING IS NEEDED. 00160000 * 00161000 * C. PROCESSING FOR EMERGENCY SIGNALS 00162000 * 1. DETERMINE THE TYPE OF EMERGENCY SIGNAL AND SET THE 00163000 * CORRESPONDING BIT IN THE EMSPEND FIELD OF THE SIGNALLED 00164000 * PROCESSOR. 00165000 * 2. CALL EXTDIREC TO ISSUE THE SIGP INSTRUCTION. 00166000 * 3. ALL CURRENTLY DEFINED EMERGENCY SIGNALS ARE SERIAL 00167000 * REQUESTS SO THE REMAINING STEPS ARE PERFORMED FOR ALL 00168000 * EMERGENCY SIGNALS. 00169000 * 4. TEST THE CORRESPONDING BIT IN THE EMSREC FIELD OF THE 00170000 * SIGNALLED PROCESSOR TO DETERMINE IF THE SIGNAL HAS BEEN 00171000 * RECEIVED. 00172000 * 5. IF NOT, OPEN A WINDOW FOR MALFUNCTION ALERTS, CLOSE THE 00173000 * WINDOW AND AGAIN TEST THE BIT IN EMSREC. REPEAT THIS STEP 00174000 * UNTIL THE BIT IN EMSREC IS SET (OR A MALFUNCTION ALERT IS 00175000 * ENCOUNTERED). 00176000 * 6. TURN OFF THE CORRESPONDING BIT IN THE EMSREC FIELD OF THE 00177000 * SIGNALLED PROCESSOR. 00178000 *. 00179000 SPACE 2 00180000 DMKEXTSP DS 0H SIGNAL PROCESSOR ROUTINE 00181000 USING *,R15 USE R15 FOR TEMPORARY ADDRESSABILITY 00182000 STM R12,R6,SIGSAVE SAVE SUBSET OF CALLERS REGS 00183000 L R12,EXTBASE LOAD UP BASE REG 00184000 DROP R15 STOP USING R15 FOR ADDRESSABILITY 00185000 USING DMKEXT,R12 USE R12 AS BASE REGISTER 00186000 TM APSTAT4,CPAPRPND IS AUTO PROC RECOVERY PENDING? @VA07615 00187100 BO CLEAR YES, CLEAR CC AND EXIT 00188000 L R15,PREFIXA ACCESS ABSOLUTE ZERO @VA12934 00188020 CLI CPAPRINP-PSA(R15),X'FF' IS AUTOMATIC PROCESSOR @VA12934 00188040 * RECOVERY IN PROCESS? 00188060 BE CLEAR YES, DO NOT SIGNAL @VA12934 00188080 LH R15,DMKEXTST GET LOGICAL ADDR OF STOPPED @VA10010 00188100 * PROCESSOR 00188200 CH R15,ZEROES IS A PROCESSOR IN STOPPED STATE? @VA10010 00188300 BNE CLEAR YES, CANCEL THIS SIGNAL REQUEST @VA10010 00188400 LTR R1,R1 TEST ORDER CODE REG FOR EMS 00189000 BM EMSCODE GO HANDLE EMERGENCY SIGNAL 00190000 LA R2,15 SET UP R5 TO ISOLATE LAST 4 BITS 00191000 NR R2,R1 ISOLATE EXACT ORDER CODE 00192000 C R2,XC IS SIGNAL AN EXTERNAL CALL? 00193000 BE XCCODE YES, GO HANDLE EXTERNAL CALL 00194000 BAL R13,EXTDIREC FOR A DIRECT SIGNAL, ISSUE THE 00195000 * SIGP IMMEDIATELY 00196000 C R1,STOP WAS SIGNAL A STOP? 00197000 BE SENSESGP YES, ISSUE SENSE SIGNAL ALSO 00198000 C R1,SSS WAS SIGNAL A STOP AND STORE STATUS? 00199000 BNE CLEAR NO, GO SET CC AND EXIT 00200000 SENSESGP DS 0H ISSUE SENSE SIGNAL 00201000 LA R1,SIGSENSE SET ORDER CODE FOR SENSE 00202000 BAL R13,EXTDIREC GO ISSUE SIGP UNTIL THE OTHER PROCESSOR 00203000 * IS STOPPED 00204000 B EXIT EXIT - CC ALREADY SET 00205000 * 00206000 * PROCESSING FOR EXTERNAL CALL SIGNAL 00207000 * 00208000 XCCODE DS 0H 00209000 SRA R1,4 ISOLATE FUNCTION CODE FOR XC 00210000 LR R5,R1 SAVE FUNCTION CODE FOR TRACE 00211000 SLL R1,24 SHIFT FUNCTION CODE TO HIGH ORDER BYTE 00212000 SLR R6,R6 INITIALIZE PREFIX REG 00213000 CH R0,IPUADDRX IS SIGNAL FOR OTHER PROCESSOR? 00214000 BNE *+8 NO, SKIP SETTING PREFIX REG 00215000 L R6,PREFIXB GET PREFIX OF OTHER PROCESSOR 00216000 L R3,XCPEND-PSA(,R6) GET WORD OF XC PENDING FLAGS 00217000 XCLP DS 0H RETRY POINT FOR C&S 00218000 LR R4,R3 MOVE WORD OF FLAGS TO WORK REG 00219000 OR R4,R1 TURN ON PENDING FLAG 00220000 CS R3,R4,XCPEND-PSA(R6) STORE ALTERED WORD OF FLAGS 00221000 BNE XCLP IF COMPARE FAILS, TRY AGAIN 00222000 LA R1,SIGXC SET ORDER CODE FOR XC 00223000 BAL R13,EXTDIREC ISSUE THE SIGP 00224000 B EXIT EXIT - CC ALREADY SET 00225000 * 00226000 * PROCESSING FOR EMERGENCY SIGNAL 00227000 * 00228000 EMSCODE DS 0H 00229000 LH R2,LPUADDR GET LOGICAL CPU ADDRESS 00230000 L R3,=V(DMKLOKSY) GET ADDRESS OF SYSTEM LOCK 00231000 C R2,0(,R3) IS LOCK HELD BY THIS PROCESSOR? 00232000 BE EMSOK YES, PROCESS EMS REQUEST 00233000 ABEND 1 SYSTEM LOCK NOT HELD 00234000 EMSOK DS 0H 00235000 LPR R1,R1 UNDO COMPLEMENT FOR SERIAL REQUEST 00236000 SRA R1,4 ISOLATE FUNCTION CODE FOR EMS 00237000 LR R5,R1 SAVE FUNCTION CODE FOR LATER 00238000 SLL R1,24 SHIFT FUNCTION CODE TO HIGH ORDER BYTE 00239000 * ALL EMS REQUESTS ARE FOR THE OTHER PROCESSOR 00240000 L R6,PREFIXB GET PREFIX OF OTHER PROCESSOR 00241000 L R3,EMSPEND-PSA(,R6) GET WORD OF EMS PENDING FLAG 00242000 * 00243000 * SETTING OF EMS PENDING FLAGS MUST BE DONE BY C&S EVEN THOUGH 00244000 * ALL EMS REQUESTS ARE SERIAL BECAUSE EMSPQUI MUST BE TURNED 00245000 * OFF WHEN RESUME REQUEST (XC) IS RECEIVED. 00246000 * 00247000 EMSLP1 DS 0H RETRY POINT FOR C&S 00248000 LR R4,R3 MOVE WORD OF FLAGS TO WORK REG 00249000 OR R4,R1 TURN ON NEW PENDING FLAG 00250000 CS R3,R4,EMSPEND-PSA(R6) STORE ALTERED WORD OF FLAGS 00251000 BNE EMSLP1 IF COMPARE FAILS, TRY AGAIN 00252000 LA R1,SIGEMS SET ORDER CODE FOR EMS 00253000 BAL R13,EXTDIREC ISSUE THE SIGP 00254000 CL R15,F4 TEST IF THE PROCESSOR SIGNALLED @VA09324 00254020 * IS TO BE VARIED OFFLINE, I.E., 00254030 * DMKMCTMA WAS CALLED IN EXTDIRC AND 00254040 * AUTOMATIC PROCESSOR RECOVERY (APR) 00254050 * IS PENDING. 00254060 BE RESET YES, BRANCH @VA09324 00254070 EX R5,EMSRTST TEST IF REQUEST HAS BEEN RECEIVED 00255000 BO RESET YES, GO RESET RECEIVED FLAG 00256000 STCTL C0,C0,SIGCREG STORE CURRENT CR0 IN WORK AREA 00257000 NC SIGCREG+2(2),NOMFA TURN OFF MULTIPROCESSING BITS 00258000 OI SIGCREG+2,MFAMASK INSURE MFA BIT IS ON 00259000 LCTL C0,C0,SIGCREG LOAD ALTERED CR0 00260000 WINDOW DS 0H OPEN WINDOW FOR MALFUNCTION ALERT 00261000 STOSM TIME1,EXTMASK ENABLE FOR EXTERNAL INTERRUPTS 00262000 STNSM TIME1,X'FF'-EXTMASK TURN OFF EXTERNAL MASK 00263000 EX R5,EMSRTST SEE IF REQUEST HAS BEEN RECEIVED 00264000 BO EMSRCVD REQUEST RECEIVED OK @VA12934 00264200 TM APSTAT4,CPAPRPND WHILE THE WINDOW WAS OPEN, @VA12934 00264400 * DID WE RECEIVE A MFA? 00264600 BZ WINDOW NO,OPEN WINDOW FOR MFA AGAIN 00265000 EMSRCVD LCTL C0,C0,CPCREG0 RELOAD CONTROL REGISTER 0 @VA12934 00266000 * 00267000 RESET DS 0H RESET RECEIVED FLAG 00268000 EX R5,EMSRSET TURN OFF RECEIVED FLAG 00269000 CLEAR DS 0H 00270000 SR R15,R15 SET CC TO 0 00271000 EXIT DS 0H RETURN TO THE CALLER 00272000 LM R12,R6,SIGSAVE RESTORE SAVED REGS 00273000 BR R14 RETURN TO THE CALLER 00274000 * 00275000 * TM INSTRUCTION OBJECT OF EX TO DETERMINE IF EMS HAS BEEN 00276000 * RECEIVED BY SIGNALLED PROCESSOR 00277000 * 00278000 EMSRTST TM EMSREC-PSA(R6),0 00279000 * 00280000 * XI INSTRUCTION OBJECT OF EX TO TURN OFF RECEIVED FLAG IN PSA 00281000 * OF SIGNALLED PROCESSOR 00282000 * 00283000 EMSRSET XI EMSREC-PSA(R6),0 00284000 EJECT 00285000 *. 00286000 * SUBROUTINE NAME - 00287000 * 00288000 * EXTDIREC 00289000 * 00290000 * FUNCTION - 00291000 * 00292000 * TO ISSUE THE SIGP INSTRUCTION AND ATTEMPT RECOVERY IN SOME 00293000 * CASES 00294000 * 00295000 * ENTRY CONDITIONS - 00296000 * 00297000 * GPR0 - PROCESSOR ADDRESS 00298000 * GPR1 - ORDER CODE 00299000 * GPR13 - RETURN ADDRESS 00300000 * 00301000 * EXIT CONDITIONS - 00302000 * 00303000 * NORMAL - CONDITION CODE 0, SIGNAL SENT SUCCESSFULLY OR 00304000 * SYSTEM IN UNIPROCESSOR MODE 00305000 * 00306000 * ERROR - TO DMKMCTMA TO TERMINATE THE SYSTEM 00307000 * 00308000 * REGISTER USAGE - 00309000 * 00310000 * GPR0 - PROCESSOR ADDRESS 00311000 * GPR1 - ORDER CODE 00312000 * GPR2 - TRACE TABLE ENTRY FOR SIGP 00313000 * GPR3 - COUNT FOR RETRY OF EQUIPMENT CHECK OR RECEIVER CHECK 00314000 * GPR4 - FLAG FOR RETRY OF BUSY CONDITION OR OPERATOR 00315000 * INTERVENING. 00316000 * GPR13 - RETURN ADDRESS 00317000 * GPR14 - WORK REG 00318000 * GPR15 - STATUS REG FOR SIGP 00319000 * 00320000 * OPERATION - 00321000 * 00322000 * BEFORE THE SIGP IS ISSUED, RECORD THE SIGP IN THE NEXT 00323000 * AVAILABLE TRACE TABLE ENTRY. 00324000 * 00325000 * AFTER THE SIGP IS ISSUED, THE FOLLOWING STEPS ARE TAKEN - 00326000 * 00327000 * FOR A CONDITION CODE 0 - 00328000 * 1. RETURN TO THE CALLER. 00329000 * 00330000 * FOR A CONDIITON CODE 1 - 00331000 * 1. IF STATUS INDICATES AN EQUIPMENT CHECK (EXCEPT FOR A 00332000 * RESTART ORDER) OR A RECEIVER CHECK, RETRY THE SIGP 256 00333000 * TIMES BEFORE TREATING THE CONDITION AS A PERMANENT ERROR 00334000 * AND PROCESSING AS FOR A CONDITION CODE 3. TREAT AN 00335000 * EQUIPMENT CHECK FOR A RESTART SIGP AS A PERMANENT ERROR. 00336000 * 2. IF STATUS INDICATES OPERATOR INTERVENING, PROCESS AS FOR 00337000 * A CONDITION CODE 2. 00338000 * 3. IF THE SIGNAL WAS A SENSE (ONLY DONE BY DMKEXTSP) AND 00339000 * STATUS INDICATES STOPPED, RETURN TO THE CALLER. OTHERWISE, 00340000 * TREAT AS A PERMANENT ERROR (THE CONDITION CODE SHOULD 00341000 * INDICATE BUSY UNTIL THE SIGNALLED PROCESSOR IS STOPPED). 00342000 * 4. TREAT ALL OTHER CONDITIONS AS A PERMANENT ERROR AND 00343000 * PROCESS AS FOR A CONDITION CODE 3. 00344000 * 00345000 * FOR A CONDITION CODE 2 (BUSY) - 00346000 * 1. RETRY THE SIGP FOR ONE MINUTE BEFORE TREATING AS A 00347000 * PERMAMENT ERROR AND PROCESSING AS FOR A CONDITION CODE 3. 00348000 * 00349000 * FOR A CONDITION CODE 3 (NOT OPERATIONAL) - 00350000 * 1. CALL DMKMCTMA - THE MALFUNCTION ALERT ROUTINE. IF CONTROL 00351000 * IS RETURNED, THE SYSTEM WILL BE IN UNIPROCESSING MODE. 00352000 * CONTROL WILL ONLY BE RETURNED IF THE CURRENT PROCESSOR IS 00353000 * THE MAIN PROCESSOR. 00354000 *. 00355000 SPACE 2 00356000 EXTDIREC DS 0H INTERNAL ROUTINE TO ISSUE SIGP 00357000 AIF (NOT &TRACE(9)).TR1 00358000 TM TRACFLG2,TRAC13 TRACING ACTIVE? 00359000 BZ TRACDONE NO, SKIP TRACING 00360000 TRACE CODE=TRCSIGP,R2,R3,R4 GET CURRENT TRACE ENTRY 00361000 MVC 1(3,R2),SIGSVR14+1 PLACE RETURN ADDR IN TRACE ENTRY 00362000 STM R0,R1,4(R2) SAVE PROC ADDR AND ORDER CODE 00363000 C R1,XC IS SIGNAL AN EXTERNAL CALL? 00364000 BE SETFC YES, GO FILL IN FUNCTION CODE 00365000 C R1,EMS IS SIGNAL AN EMERGENCY SIGNAL? 00366000 BNE TRACDONE NO, DONE WITH TRACE INITIALIZATION 00367000 SETFC DS 0H 00368000 STC R5,8(,R2) FILL IN FUNCTION CODE FOR XC & EMS 00369000 TRACDONE DS 0H 00370000 .TR1 ANOP 00371000 SLR R4,R4 CLEAR BUSY LOOP CONTROL 00372000 LA R3,F256 INIT LOOP CONTROL FOR EQUIPMENT 00373000 * CHECK AND RECEIVER CHECK 00374000 SIGPLOOP DS 0H 00375000 SLR R15,R15 CLEAR STATUS REG BEFORE SIGP 00376000 SIGP R15,R0,0(R1) SIGNAL PROCESSOR 00377000 BC 8,CCODE0 GO PROCESS CONDITION CODE 0 00378000 BC 2,CBUSY GO PROCESS CONDITION CODE 2 00379000 BC 1,NOTOPER GO PROCESS CONDITION CODE 3 00380000 * 00381000 * PROCESSING FOR CONDITION CODE 1 00382000 * 00383000 AIF (NOT &TRACE(9)).TR2 **AIF** 00383100 TM TRACFLG2,TRAC13 TRACING ACTIVE? @VA07650 00383200 BZ NOTRACE1 SKIP TRACING @VA07650 00383300 MVI 5(R2),CODE1 STORE CODE1 IN TRACE ENTRY 00384000 ST R15,12(,R2) STORE STATUS IN TRACE ENTRY 00385000 .TR2 ANOP 00385100 NOTRACE1 LTR R15,R15 WAS EQUIPMENT CHECK BIT ON @VA07650 00386100 BM EQPTCK YES, PROCESS EQUIPMENT CHECK 00387000 EX R15,RECCKTST EX TM TO DETERMINE IF STATUS 00388000 * INDICATES RECEIVER CHECK 00389000 BO LOOP256 IF ON, GO RETRY 256 TIMES 00390000 EX R15,OPINTTST EX TM TO DETERMINE IF STATUS 00391000 * INDICATES OPERATOR INTERVENING 00392000 BO CBUSY1 IF ON, GO RETRY FOR ONE MINUTE 00393000 C R1,SENSE WAS THIS A SENSE REQUEST? 00394000 BNE XCPNDTST NO, TEST FOR EXTERNAL CALL PENDING 00395000 EX R15,STOPTST EX TM TO DETERMINE IF STATUS 00396000 * INDICATES STOPPED STATE 00397000 BO RETURN IF ON, RETURN TO CALLER 00398000 B NOTOPER1 TREAT OTHER STATUS AS PERM ERROR 00399000 XCPNDTST DS 0H 00400000 EX R15,XCPTST EX TM TO DETERMINE IF STATUS 00401000 * INDICATES EXTERNAL CALL PENDING 00402000 BO RETURN IF ON, RETURN TO CALLER 00403000 B CALLMA TREAT OTHER STATUS AS PERM ERROR @VA12934 00404000 EQPTCK DS 0H 00405000 C R1,RESTART WAS THIS A RESTART REQUEST? 00406000 BE NOTOPER1 YES, TREAT EQPT CHECK AS PERM ERROR 00407000 LOOP256 DS 0H 00408000 BCT R3,SIGPLOOP RETRY 256 TIMES 00409000 B NOTOPER1 AFTER 256 TIMES, TREAT AS PERM ERROR 00410000 * 00411000 * PROCESSING FOR CONDITION CODE 2 00412000 * 00413000 CBUSY DS 0H 00414000 AIF (NOT &TRACE(9)).TR3 **AIF** 00414100 TM TRACFLG2,TRAC13 TRACING ACTIVE? @VA07650 00414200 BZ CBUSY1 NO SKIP TRACING @VA07650 00414300 MVI 5(R2),CODE2 STORE CODE2 IN TRACE ENTRY 00415000 XC 12(4,R2),12(R2) CLEAR STATUS WORD IN TRACE ENTRY 00416000 CBUSY1 DS 0H 00417000 .TR3 ANOP 00417100 LTR R4,R4 WAS THIS THE FIRST BUSY COND? 00418000 BZ FIRSTBSY YES, SET UP TO RETRY FOR 1 MIN 00419000 STCK TIME2 STORE CURRENT CLOCK VALUE 00420000 BC 3,TERMVM IF CLOCK ERROR, TERMINATE VM 00421000 L R14,TIME1 GET ENDING CLOCK VALUE 00422000 CL R14,TIME2 HAS ONE MINUTE ELAPSED? @VA13137 00423000 BH SIGPLOOP NO, REPEAT SIGP 00424000 B NOTOPER1 AFTER 1 MIN, TREAT AS PERM ERROR @VA13137 00425000 FIRSTBSY DS 0H 00426000 LA R4,1 SET CONTROL FOR FIRST BUSY 00427000 STCK TIME1 STORE CURRENT CLOCK VALUE 00428000 BC 3,TERMVM IF CLOCK ERROR, TERMINATE VM 00429000 L R14,TIME1 GET INITIAL CLOCK VALUE 00430000 AL R14,ONEMINUT ADD ONE MINUTE INCREMENT 00431000 ST R14,TIME1 SAVE AS ENDING CLOCK VALUE 00432000 B SIGPLOOP REPEAT SIGP FOR 1 MINUTE 00433000 * 00434000 * PROCESSING FOR CONDITION CODE 3 00435000 * 00436000 NOTOPER DS 0H 00437000 AIF (NOT &TRACE(9)).TR4 **AIF** 00437100 TM TRACFLG2,TRAC13 NO SKIP TRACING @VA07650 00437200 BZ CALLMA @VA12934 00437300 MVI 5(R2),CODE3 STORE CODE3 IN TRACE ENTRY 00438000 XC 12(4,R2),12(R2) CLEAR STATUS WORD IN TRACE ENTRY 00439000 CALLMA CALL DMKMCTMA PROCESS CC 3 LIKE MALFUNCTION @VA12934 00439200 * ALERT 00439400 L R15,F4 SET RETURN CODE TO 4 @VA12934 00439600 BR R13 AND RETURN TO CALLER @VA12934 00439800 NOTOPER1 DS 0H 00440000 .TR4 ANOP 00440100 CALL DMKMCTFS HANDLE FAILING SIGNAL @VA12934 00441000 L R15,F4 SET RETURN CODE TO 4 @VA12934 00441500 BR R13 AND RETURN TO CALLER @VA09324 00442040 * 00443000 * PROCESSING FOR CONDITION CODE 0 00444000 * 00445000 CCODE0 DS 0H 00446000 AIF (NOT &TRACE(9)).TR5 **AIF** 00446100 TM TRACFLG2,TRAC13 NO SKIP TRACING @VA07650 00446200 BZ RETURN @VA07650 00446300 MVI 5(R2),CODE0 STORE CODE0 IN TRACE ENTRY 00447000 XC 12(4,R2),12(R2) CLEAR STATUS WORD IN TRACE ENTRY 00448000 RETURN DS 0H RETURN TO CALLER 00449000 .TR5 ANOP 00449100 SR R15,R15 SET CONDITION CODE TO 0 00450000 BR R13 RETURN TO CALLER 00451000 TERMVM DS 0H TERMINATE VM ON CLOCK ERROR 00452000 GOTO DMKCVTAB ABEND WITH CVT001 ABEND CODE 00453000 * 00454000 * TM INSTRUCTIONS THAT ARE OBJECTS OF EX TO DETERMINE THE 00455000 * STATUS RETURNED ON A CONDITION CODE 1 00456000 * 00457000 RECCKTST TM RECCKON,0 TEST FOR RECEIVER CHECK 00458000 OPINTTST TM OPINTON,0 TEST FOR OPERATOR INTERVENING 00459000 STOPTST TM STOPON,0 TEST FOR STOPPED STATE 00460000 XCPTST TM XCPNDON,0 TEST FOR EXTERNAL CALL PENDING 00461000 * 00462000 * CONSTANTS USED IN EXECUTED INSTRUCTIONS 00463000 * 00464000 RECCKON DC X'01' RECEIVER CHECK STATUS BIT 00465000 OPINTON DC X'20' OPERATOR INTERVENING STATUS BIT 00466000 STOPON DC X'40' STOPPED STATE STATUS BIT 00467000 XCPNDON DC X'80' EXTERNAL CALL PENDING STATUS BIT 00468000 EJECT 00469000 *. 00470000 * SUBROUTINE NAME - 00471000 * 00472000 * DMKEXTSL 00473000 * 00474000 * FUNCTION - 00475000 * 00476000 * UPON RECEIPT OF A MULTI-PROCESSING TYPE INTERRUPT, TO ROUTE 00477000 * CONTROL TO THE APPROPRIATE RECEIVING ROUTINE OR TO TAKE THE 00478000 * APPROPRIATE ACTION. 00479000 * 00480000 * ENTRY CONDITIONS - 00481000 * 00482000 * GPR12 - ENTRY POINT ADDRESS 00483000 * 00484000 * EXIT CONDITIONS - 00485000 * 00486000 * NORMAL - TO THE APPROPRIATE RECEIVING ROUTINE 00487000 * 00488000 * REGISTER USAGE - 00489000 * 00490000 * GPR0-1 - WORK REGISTERS 00491000 * GPR2 - INTERRUPT CODE 00492000 * 00493000 * OPERATION - 00494000 * 00495000 * A. PROCESSING FOR MALFUNCTION ALERTS 00496000 * 1. CALL DMKMCTMA. 00497000 * 00498000 * B. IF CPLOKFL SET, CLEAR CPLOKFL AND CPSYSLK 00499100 * 00499200 * C. PROCESSING FOR EMERGENCY SIGNALS 00499300 * 1. IF THE EMS IS A SHUTDOWN, TURN OFF APUOPER IN EACH PSA, 00499400 * TURN OFF EMSPSHD, TURN ON EMSRSHD, AND LOAD A DISABLED 00499500 * 008 WAIT STATE. 00499600 * 2. IF THE EMS IS FOR EXTEND, DISABLE CHANNEL 0 AND GOTO 00499700 * DMKDSPRU. 00499800 * 3. IF THE EMS IS A SYNC, GOTO DMKCLKAP. 00499900 * 4. IF THE EMS IS A CLKCHK, GOTO DMKCLKCC. 00500000 * 5. IF THE EMS IS QUIESCE, CLEAR RESUME PENDING AND 00500100 * GOTO DMKDSPRU. 00500200 * 00500300 * D. PROCESSING FOR EXTERNAL CALLS 00500400 * 1. IF THE XC IS AN APR, GOTO DMKMCTPR. 00500500 * 2. IF THE XC IS A RESUME, TURN OFF EMSINQSC (IF ON) AND 00500600 * XCRES. IF NO OTHER XC'S ARE PENDING, GOTO DMKDSPRU. 00500700 * 3. IF THE XC IS A DISPATCH, TRY TO OBTAIN SYSTEM LOCK. 00500800 * IF LOCK OBTAINED, TURN OFF XCDISP AND XCWAK AND GOTO 00500900 * DMKDSPCH. IF THE LOCK IS NOT AVAILABLE, GOTO 00501000 * DMKDSPRU. 00501100 * 4. IF THE XC IS A WAKEUP, TURN OFF XCWAK. IF THE SYSTEM 00501200 * WAS RUNNING A USER, RELOAD THE EXTERNAL OLD PSW. 00501300 * OTHERWISE, TRY TO OBTAIN THE GLOBAL SYSTEM LOCK. IF 00501400 * THE LOCK IS AVAILABLE, GOTO DMKDSPCH; IF THE LOCK IS NOT 00501500 * AVAILABLE, GOTO DMKDSPRU. 00501600 * 00501700 * E. PROCESSING FOR TOD SYNC CHECKS 00501800 * 1. CALL DMKCLKSC. 00501900 * 2. ONCE CONTROL IS RETURNED, IF THE SYSTEM LOCK IS HELD 00502000 * OR IS AVAILABLE, GOTO DMKDSPCH. OTHERWISE, GOTO 00502100 * DMKDSPRU. 00502200 * 00502300 * IF NO INTERRUPTS ARE PENDING, RELOAD THE EXTERNAL OLD PSW. 00502400 *. 00533000 SPACE 2 00534000 DMKEXTSL DS 0H EXTERNAL INTERRUPT SLIH 00535000 USING *,R12 TEMPORARY ADDRESSABILITY 00536000 L R12,EXTBASE LOAD UP DMKEXT BASE REG 00537000 USING DMKEXT,R12 SET UP MODULE ADDRESSABILITY 00538000 LH R2,INTEX PICK UP THE INTERRUPT CODE 00539000 * 00540000 * PROCESSING FOR MALFUNCTION ALERT 00541000 * 00542000 CH R2,MFACODE IS THIS A MALFUNCTION ALERT? 00543000 BNE NOTMFA NO, GO ON TO NEXT TEST 00544000 CALL DMKMCTMA PROCESS THE MALFUNCTION ALERT 00545000 NOTMFA DS 0H 00546000 * 00546100 * DETERMINE IF INTERRUPT OCCURRED IN DMKLOK WINDOW IN 00546200 * SPIN ROUTINE. IF SO, MUST CLEAR SPIN INDICATOR 00546300 * 00546400 TM APSTAT4,CPLOKFL IS LOCK MANAGER FLAG ON? @VA07615 00547100 BNO EMSTST NO, TEST FOR EMERGENCY SIGNAL @VA08873 00548100 NI APSTAT4,X'FF'-CPLOKFL TURN OFF LOCK MGR FLAG @VA07615 00549100 L R14,PREFIXB GET OTHER PROC PREFIX ADDRESS @V4M0173 00550000 NI APSTAT3-PSA(R14),X'FF'-CPSYSLK TURN OFF SYSTEM- @VA07615 00551100 * LOCK-NEEDED FLAG IN OTHER PSA @V4M0173 00552000 * 00553100 * PROCESSING FOR EMERGENCY SIGNAL 00553125 * 00553150 EMSTST DS 0H @VA08873 00553175 CH R2,EMSCODES IS THIS EMERGENCY SIGNAL @VA08873 00553200 BNE XCTST NO, CHECK EXTERNAL CALL @VA08873 00553225 TM EMSPEND,VALDEMS ARE ANY EMS FUNCTIONS PENDING? @VA08873 00553250 BZ XCTST2 NO, CHECK EXTERNAL CALL PENDING @VA08873 00553275 TM EMSPEND,EMSPSHD IS THIS A SHUTDOWN EMS? @VA08873 00553300 BNO XTNDTST NO, GO TEST FOR EXTEND @VA08873 00553325 SR R0,R0 CLEAR REGISTER @VA09941 00553330 LA R3,VMTTIME-VMBLOK(,R0) GET CORRECT @VA09941 00553334 * DISPLACEMENT INTO THE PSA 00553338 ST R3,TIMEDISP USE VMTTIME NOW RUNNING UP @VA09941 00553342 NI APSTAT1,X'FF'-APUOPER TURN OFF APUOPER IN THIS @VA08873 00553350 * PSA 00553375 L R1,PREFIXB GET PREFIX ADDR OF OTHER @VA08873 00553400 * PROCESSOR 00553425 ST R3,TIMEDISP-PSA(R1) USE VMTTIME NOW RUNNING UP @VA09941 00553430 NI APSTAT1-PSA(R1),X'FF'-APUOPER TURN OFF APUOPER @VA08873 00553450 * IN PSA OF OTHER PROCESSOR 00553475 NI EMSPEND,X'FF'-EMSPSHD TURN OFF SHUTDOWN @VA08873 00553500 * PENDING FLAG 00553525 OI EMSREC,EMSRSHD TURN ON SHUTDOWN RECEIVED FLAG @VA08873 00553550 LPSW WAIT08 LOAD DISABLED 008 WAIT STATE @VA08873 00553575 XTNDTST DS 0H @VA08873 00553600 TM EMSPEND,EMSPEXT IS THIS AN EXTEND EMS? @VA08873 00553625 BNO SYNCTST NO, GO TEST FOR SYNC EMS @VA08873 00553650 STCTL C2,C2,SIGCREG STORE CURRENT CR2 IN WORK AREA @VA08873 00553675 NI SIGCREG,X'FF'-CHAN0 DISABLE CHANNEL 0 @VA08873 00553700 LCTL C2,C2,SIGCREG LOAD ALTERED CR2 @VA08873 00553725 B UNLKXT TAKE UNLOCKED EXIT @VA08873 00553750 SYNCTST DS 0H @VA08873 00553775 TM EMSPEND,EMSPSYNC+EMSPCLKC SYNC OR CLKCHK ?? @VA08873 00553800 BZ QSC NO - MUST BE QUIESCE @VA08873 00553825 SPACE 00553850 * MUST NOW GET SYSTEM CREG1 FOR LATER ADDRESSABILITY 00553875 SPACE 00553900 L R3,ASYSVM GET SYSTEM VMBLOK @VA08873 00553925 STCTL C1,C1,SIGCREG SAVE CONTROL REG 1 @VA08873 00553950 LCTL C1,C1,VMSEG-VMBLOK(R3) SYSTEM CONTROL REG 1 @VA08873 00553975 TM EMSPEND,EMSPSYNC IS THIS A SYNC EMS? @VA08873 00554000 BNO CLKCHK NO, MUST BE CLKCHK EMS @VA08873 00554025 SPACE 00554050 * DMKCLK IS AT PRESENT SOMEWHERE IN STORAGE SO MUST FIND 00554075 * THE PROPER REAL ADDRESS OF ROUTINE TO BRANCH TO. 00554100 SPACE 00554125 L R12,=A(DMKCLKAP) ADDR. OF CLOCK SYNC ROUTINE @VA08873 00554150 LRA R12,0(0,R12) GET REAL ADDRESS OF ROUTINE @VA08873 00554175 LCTL C1,C1,SIGCREG RESTORE CONTROL REG 1 @VA08873 00554200 BR R12 GOTO CLOCK SYNC ROUTINE @VA08873 00554225 CLKCHK DS 0H CLKCHK PROCESSING @VA08873 00554250 SPACE 00554275 * DMKCLK IS AT PRESENT SOMEWHERE IN STORAGE SO MUST FIND 00554300 * THE PROPER REAL ADDRESS OF ROUTINE. 00554325 SPACE 00554350 L R12,=A(DMKCLKCC) ADDR OF HIGH ORDER SYNC ROUTINE@VA08873 00554375 LRA R12,0(0,R12) GET REAL ADDRESS OF ROUTINE @VA08873 00554400 LCTL C1,C1,SIGCREG RESTORE CONTROL REG 1 @VA08873 00554425 BR R12 GOTO HIGH ORDER SYNC ROUTINE @VA08873 00554450 QSC DS 0H QUIESCE PROCESSING @VA08873 00554475 * 00554500 * IF A RESUME IS PENDING WHEN A QUIESCE IS ISSUED, THE RESUME 00554525 * MUST BE CLEARED BEFORE THE SYSTEM IS QUIESCED SO THAT 00554550 * THE RESUME WILL NOT CANCEL THE WRONG QUIESCE 00554575 * 00554600 TM XCPEND,XCRES IS A RESUME PENDING? @VA08873 00554625 BZ UNLKXT NO, GO TO DMKDSPRU @VA08873 00554650 L R0,XCPEND GET WORD OF XC PENDING FLAGS @VA08873 00554675 RESLP3 DS 0H RETRY POINT FOR C&S @VA08873 00554700 LR R1,R0 MOVE WORD OF FLAGS TO WORK REG @VA08873 00554725 N R1,RESOFF TURN OFF RESUME PENDING FLAG @VA08873 00554750 CS R0,R1,XCPEND STORE ALTERED WORD OF FLAGS @VA08873 00554775 BNE RESLP3 IF COMPARE FAILS, TRY AGAIN @VA08873 00554800 B UNLKXT GO TO DMKDSPRU @VA08873 00554825 * 00556000 * PROCESSING FOR EXTERNAL CALLS 00557000 * 00558000 XCTST DS 0H 00559000 CH R2,XCCODES EXTERNAL CALL INTERRUPT? @VA08873 00559100 BNE TODTST NO, CHECK TOD SYNC CHECK @VA08873 00559200 XCTST2 DS 0H @VA08873 00559300 TM XCPEND,VALDXC ARE ANY XC FUNCTIONS PENDING? 00560000 BZ TODTST NO, CHECK TOD SYNC CHECK @VA08873 00561100 TM XCPEND,XCAPR IS THIS AN APR XC? 00562000 BNO RESTST NO, GO TEST FOR RESUME 00563000 GOTO DMKMCTPR GO DO AUTO PROCESSOR RECOVERY 00564000 RESTST DS 0H 00565000 TM XCPEND,XCRES IS THIS A RESUME XC? 00566000 BNO DISPTST NO, GO TEST FOR DISPATCH @V4M0210 00567000 L R0,EMSPEND GET WORD OF EMS PENDING FLAGS 00568000 RESLP1 DS 0H RETRY POINT FOR C&S 00569000 LR R1,R0 MOVE WORD OF FLAGS TO WORK REG 00570000 N R1,QSCOFF TURN OFF IN-QUIESCE FLAG @V4M0210 00571000 CS R0,R1,EMSPEND STORE ALTERED WORD OF FLAGS 00572000 BNE RESLP1 IF COMPARE FAILS, TRY AGAIN 00573000 * IS OFF 00574000 L R0,XCPEND GET WORD OF XC PENDING FLAGS 00575000 RESLP2 DS 0H RETRY POINT FOR C&S 00576000 LR R1,R0 MOVE WORD OF FLAGS TO WORK REG 00577000 N R1,RESOFF TURN OFF RESUME PENDING FLAG 00578000 CS R0,R1,XCPEND STORE ALTERED WORD OF FLAGS 00579000 BNE RESLP2 IF COMPARE FAILS, TRY AGAIN 00580000 TM XCPEND,VALDXC ARE ANY OTHER XC'S PENDING? @V4M0210 00581000 BZ UNLKXT NO, GO TAKE UNLOCKED EXIT @V4M0210 00582000 DISPTST DS 0H @V4M0210 00583000 TM XCPEND,XCDISP IS THIS A DISPATCH XC? @V4M0210 00584000 BNO WAKXC NO, MUST BE A WAKEUP XC 00585000 BAL R3,GETLOCK TRY FOR SUPERVISOR LOCK @VA08311 00585400 BNZ UNLKXT NO LOCK, GO TO DMKDSPRU @VA08873 00585600 L R0,XCPEND GET WORD OF XC PENDING FLAGS 00586000 DISPLP DS 0H RETRY POINT FOR C&S 00587000 LR R1,R0 MOVE WORD OF FLAGS TO WORK REG 00588000 * 00589100 * WHEN DISPATCH SIGNAL IS TURNED OFF, TURN OFF WAKEUP. 00589200 * THIS WILL PREVENT CONDITIONS PENDING WITH NO SIGNAL 00589300 * PENDING. THIS CAN OCCUR WHEN AN EXTERNAL CALL IS 00589400 * ALREADY PENDING WHEN THE SIGNAL IS ISSUED. 00589500 * 00589600 N R1,DISPOFF TURN OFF DISPATCH & WAKEUP @VA08873 00589700 CS R0,R1,XCPEND STORE ALTERED WORD OF FLAGS 00590000 BNE DISPLP IF COMPARE FAILS, TRY AGAIN 00591000 B LOCKXT EXIT TO DMKDSPCH @VA08311 00592600 WAKXC DS 0H @V4M0210 00599000 L R0,XCPEND GET WORD OF XC PENDING FLAGS 00600000 WAKLP DS 0H RETRY POINT FOR C&S 00601000 LR R1,R0 MOVE WORD OF FLAGS TO WORK REG 00602000 N R1,WAKOFF TURN OFF WAKEUP PENDING FLAG 00603000 CS R0,R1,XCPEND STORE ALTERED WORD OF FLAGS 00604000 BNE WAKLP IF COMPARE FAILS, TRY AGAIN 00605000 TM CPSTATUS,CPRUN WAS SYSTEM RUNNING A USER? 00606000 BO RERUN YES, RERUN OLD USER 00607000 LOCKSYS DS 0H @VA12934 00607500 BAL R3,GETLOCK NO, GO TRY FOR SYSTEM LOCK 00608000 BZ LOCKXT IF AVAILABLE, TAKE LOCKED EXIT 00609000 B UNLKXT ELSE, TAKE UNLOCKED EXIT 00610000 * 00644000 * PROCESSING FOR TOD SYNC CHECKS 00645000 * 00646000 TODTST DS 0H 00647000 CH R2,TODCODE IS THIS A TOD SYNC CHECK? 00648000 BNE NOCODE NO, NOTHING PENDING 00649000 STCTL C0,C0,SIGCREG STORE CURRENT CR0 IN WORK AREA 00650000 NI SIGCREG+2,X'FF'-SYNCMASK DISABLE FURTHER TOD SYNC CHECKS 00651000 LCTL C0,C0,SIGCREG LOAD ALTERED CR0 00652000 STCTL C0,C0,CPCREG0 STORE ALTERED CR0 IN PSA 00653000 BAL R3,GETLOCK GO TRY FOR SYSTEM LOCK 00654000 BNZ STACK NOT OBTAINED, STACK CALL TO DMKCLK 00655000 CHARGE SWITCH,ASYSVM SWITCH TO SYSTEM VMBLOK 00656000 CLKCALL DS 0H 00657000 CALL DMKCLKSC CALL SYNC CHECK ROUTINE 00658000 B LOCKXT GO TAKE LOCKED EXIT 00659000 STACK DS 0H 00660000 LA R0,CPEXSIZE GET SIZE OF CPEXBLOK 00661000 CALL DMKFREE GET STORAGE FOR CPEXBLOK 00662000 USING CPEXBLOK,R1 USE R1 AS BASE FOR CPEXBLOK 00663000 STM R0,R15,CPEXREGS SAVE CURRENT REGS 00664000 LA R2,CLKCALL GET ADDR FOR CALLING DMKCLK 00665000 ST R2,CPEXADD SAVE IN CPEXBLOK 00666000 MVC CPEXR11,ASYSVM STACK CPEXBLOK FOR SYSTEM 00667000 CALL DMKSTKMP STACK CPEXBLOK TO CALL DMKCLK 00668000 DROP R1 STOP USING R1 AS CPEXBLOK BASE 00669000 L R2,=A(DMKLOKSY+2) GET ADDRESS OF SYSTEM LOCK 00670000 CLC LPUADDR,0(R2) IS SYSTEM LOCK NOW HELD? 00671000 BNE UNLKXT NO, TAKE UNLOCKED EXIT 00672000 LOCKXT DS 0H EXIT TO LOCKED ENTRY OF DMKDSP 00673000 GOTO DMKDSPCH 00674000 UNLKXT DS 0H EXIT TO UNLOCKED ENTRY OF DMKDSP 00675000 GOTO DMKDSPRU 00676000 * 00677000 GETLOCK DS 0H 00678000 LOCK OBTAIN,TYPE=SYS,SPIN=NO TRY TO GET SYSTEM LOCK 00679000 BR R3 RETURN TO CALLER 00680000 * 00681000 * PROCESSING TO RELOAD EXTERNAL OLD PSW 00682000 * 00683000 NOCODE DS 0H 00684000 TM CPSTATUS,CPRUN WAS SYSTEM RUNNING A USER? 00685000 BNO TSTWAIT NO, GO TEST FOR A WAIT 00686000 RERUN DS 0H PREPARE TO RERUN OLD USER 00687000 TM VMPSTAT,VMV370R ARE EC-REGS PRESENT? 00688000 BZ LOADC0 NO, SKIP RELOAD OF C8 00689000 L R1,VMECEXT GET ADDRESS OF ECBLOK 00690000 LCTL C8,C8,EXTCR8-ECBLOK(R1) RELOAD CONTROL REG 8 00691000 LOADC0 DS 0H 00692000 MVI CPSTATUS,CPRUN SET RUNNING USER FLAG 00694000 CHARGE STOP STORE SUPERVISOR TIME FOR USER 00695000 SPT VMTMOUTQ GIVE USER REMAINING TIME LEFT 00696000 L R14,QUANTUMR CHECKPOINT TIME @V4M0218 00697000 S R14,TIMER - (CURRENT TIME) -> SUPERVISOR @V4M0218 00698000 L R15,QUANTUM ORIGINAL TIME @V4M0218 00699000 SR R15,R14 - SUPERVISOR @V4M0218 00700000 ST R15,QUANTUM . . WILL EVENTUALLY GIVE PROBLEM @V4M0218 00701000 LCTL C0,C0,RUNCR0 RELOAD CONTROL REGISTER 0 @VA08854 00701500 LM R0,R15,VMGPRS RELOAD USERS REGS 00702000 LPSW EXOPSW RELOAD EXTERNAL OLD PSW 00703000 TSTWAIT DS 0H 00704000 TM CPSTATUS,CPWAIT WAS SYSTEM IN A WAIT? 00705000 BNO RELOAD NO, JUST RELOAD EXT OLD PSW 00706000 TM APSTAT1,CPINITD IS INITIALIZATION FINISHED? @VA12934 00706200 BO LOCKSYS YES, SYSTEM WAS INITIALIZED AND @VA12934 00706400 * TOOK AN EXTERNAL INTERRUPTION IN 00706600 * A WAIT. EXIT TO THE DISPATCHER. 00706800 MVI CPSTATUS,CPWAIT FLAG SYSTEM AS IN A WAIT 00707000 CHARGE STOP STOP CHARGING SUPERVISOR TIME 00708000 SPT WAITEND RESET THE TIMER 00709000 LPSW EXOPSW RELOAD EXTERNAL OLD PSW 00710000 RELOAD DS 0H 00711000 L R1,=A(DMKPSAER) GET ADDR OF EXT INTERRUPT REGS 00712000 LM R0,R15,0(R1) RELOAD EXT INTERRUPT REGS 00713000 LPSW EXOPSW RELOAD EXTERNAL OLD PSW 00714000 EJECT 00715000 * CONSTANTS 00716000 EXTBASE DC A(DMKEXT) BASE REG 00717000 RESTART DC F'6' RESTART ORDER CODE 00718000 SENSE DC F'1' SENSE ORDER CODE 00719000 XC DC F'2' EXTERNAL CALL ORDER CODE 00720000 EMS DC F'3' EMERGENCY SIGNAL ORDER CODE 00721000 STOP DC F'5' STOP ORDER CODE 00722000 SSS DC F'9' STOP AND STORE STATUS ORDER CODE 00723000 ONEMINUT DC F'64' APPROXIMATELY ONE MINUTE 00724000 MFACODE DC X'1200' MFA INTERRUPT CODE 00725000 TODCODE DC X'1003' TOD SYNC CHECK INT CODE 00726000 EMSCODES DC X'1201' EMS INTERRUPT CODE @VA08873 00727100 XCCODES DC X'1202' EXTERNAL CALL INTERRUPT CODE @VA08873 00727200 QSCOFF DC X'FEFFFFFF' IN-QUIESCE FLAG OFF @VA08873 00727300 RESOFF DC X'BFFFFFFF' RESUME FLAG OFF @VA08873 00727400 WAKOFF DC X'DFFFFFFF' WAKEUP FLAG OFF @VA08873 00727500 DISPOFF DC X'CFFFFFFF' TURN OFF DISPATCH & WAKEUP @VA08873 00727600 DS 0D 00731000 WAIT08 DC X'000A0000' DISABLED WAIT PSW @V4M0220 00732000 DC X'00000008' WAIT CODE 8 @V4M0220 00733000 NOMFA DC X'831F' ALL EXTERNAL BITS BUT MFA 00734000 DMKEXTST DS 0F @VA10010 00734100 DC H'0' LOGICAL ADDR OF STOPPED PROCESSOR@VA10010 00734200 SPACE 2 00735000 CHAN0 EQU X'80' MASK TO DISABLE CHANNEL 0 00736000 CODE0 EQU X'00' 00737000 CODE1 EQU X'01' 00738000 CODE2 EQU X'02' 00739000 CODE3 EQU X'03' 00740000 EJECT 00741000 LTORG 00742000 EJECT 00743000 PSA 00744000 VALDEMS EQU EMSPQUI+EMSPEXT+EMSPSYNC+EMSPSHD+EMSPCLKC VALID 00745000 * EMERGENCY SIGNAL BITS 00746000 VALDXC EQU XCAPR+XCRES+XCWAK+XCDISP VALID EXTERNAL CALL BITS 00747000 SPACE 2 00748000 * REDEFINITION OF SIGSAVE 00749000 SIGSVR14 EQU SIGSAVE+8 00750000 SIGCREG EQU SIGSAVE+44 00751000 TIME1 EQU SIGSAVE+48 00752000 TIME2 EQU SIGSAVE+56 00753000 EJECT 00754000 COPY EQU 00755000 COPY SAVE 00756000 COPY VMBLOK 00757000 END DMKEXT 00758000