SVC TITLE 'DMKSVC (CP) VM/370 - RELEASE 6' 00001000
ISEQ 73,80 VALIDATE SEQUENCING OF SYSIN 00002000
*. 00003000
* MODULE NAME - 00004000
* 00005000
* DMKSVC 00006000
* 00007000
* CONTENTS - 00008000
* 00009000
* DMKSVCIN - SVC INTERRUPT HANDLER 00010000
* 00011000
* FUNCTION - 00012000
* 00013000
* TO PERFORM THE APPROPRIATE ACTIONS FOR VARIOUS 00014000
* TYPES OF SVC INTERRUPT CODES. 00015000
* 00016000
* ATTRIBUTES - 00017000
* 00018000
* SERIALLY REUSABLE, RESIDENT 00019000
* 00020000
* ENTRY POINTS - 00021000
* 00022000
* DMKSVCIN - SVC INTERRUPT HANDLER 00023000
* 00024000
* ENTRY POINTS - NON-EXECUTABLE 00025000
* 00026000
* DMKSVCNS - ADDRESS OF NEXT AVAILABLE SAVE-AREA 00027000
* DMKSVCLO - "DMKFRELO" MINUS LENGTH OF ONE SAVE-AREA 00028000
* DMKSVCHI - "DMKFREHI" 00029000
* 00030000
* ENTRY CONDITIONS - 00031000
* 00032000
* NONE, OTHER THAN THE INFORMATION IN THE 00033000
* OLD PSW AND INTERRUPT CODE. 00034000
* 00035000
* EXIT CONDITIONS - 00036000
* 00037000
* (SEE "OPERATION"). 00038000
* 00039000
* SYSTEM ABEND CODES - 00040000
* 00041000
* SVC001 - SAVE-AREA SCRATCHPAD EXHAUSTED ON LINK REQUEST 00042000
* SVC002 - SUPERVISOR STATE SVC WITHOUT SYSTEM LOCK 00043000
* SVC003 - PAGING I/O ERROR ON LINK TO CP PAGEABLE ROUTINE 00044000
EJECT 00045000
* CALLS TO OTHER ROUTINES - 00046000
* 00047000
* DMKDSPCH - TO DISPATCH A VIRTUAL MACHINE 00048000
* DMKDSPB - TO CHECK OUT A WAIT-STATE PSW 00049000
* DMKDSPRU - TO UNRUN THE CURRENT USER AND DISPATCH ANOTHER 00050000
* DMKSTKDE - TO STACK A DEFERRED RETURN WITH SYSTEM LOCK 00051000
* DMKSTKSW - TO STACK PRIORITY BLOK FOR OTHER PROCESSOR 00052000
* DMKPRGRF - TO REFLECT AN SVC INTERRUPT TO A VIRTUAL MACHINE 00053000
* DMKDMPDK - TO DUMP THE MACHINE IN CASE OF A FATAL ERROR 00054000
* DMKPTRUL - TO UNLOCK A PAGE ON RETURN FROM PAGEABLE PROGRAM 00055000
* DMKFREE - TO OBTAIN FREE STORAGE FOR CALL LINKAGE 00056000
* DMKTRCSV - TO HANDLE A USER SVC WHEN VM TRACING IS ON 00057000
* DMKCFMBK - PLACE USER IN CF MODE ADSTOP 00058000
* DMKQCNWT - WRITE ADSTOP MESSAGE 00059000
* DMKFRET - TO RELEASE ADSTOP BUFFER 00060000
* DMKTRCIT - TO RE-INITIALIZE INSTRUCTION TRACING FOR ADSTOP 00061000
* DMKTRCPB - TO RESET OLD INSTRUCTION TRACING IF NECESSARY 00062000
* DMKVERO - TO PROCESS AN SVC76 REQUEST FROM OS 00063000
* DMKVERD - TO PROCESS AN SVC76 REQUEST FROM DOS 00064000
* DMKCVTBH - TO CONVERT ADSTOP ADDRESS TO PRINTABLE CHARS 00065000
* DMKPSACG - TO END CURRENT SUPERVISOR STATE CHARGES TO USER 00066000
* DMKLOKDF - TO TEST STATE OF GLOBAL SYSTEM LOCK 00067000
SPACE 00068000
* EXTERNAL REFERENCES - 00069000
* 00070000
* DMKSLC - END OF V=R STORAGE FOR FREE SAVE-AREA MGMT. 00071000
* DMKLOKSY - GLOBAL SYSTEM LOCK (FOR AP SUPPORT) 00072000
* 00073000
* TABLES / WORK AREAS - 00074000
* 00075000
* SVCREGS - REGISTER SAVE AREA IN PAGE 0 00076000
* DUMPSAVE - REGISTER CONTENTS AT TIME OF ABEND (IN PAGE 0) 00077000
* DMKSYSVM - VMBLOK OF CP370 SYSTEM 00078000
* DMKSYSOP - SYSTEM OPERATOR'S VMBLOK 00079000
* REGISTER USAGE - 00080000
* 00081000
* GPR 12 = BASE REGISTER FOR CALLED ROUTINE 00082000
* GPR 13 = ADDRESS OF STANDARD SAVE AREA FOR CALLED ROUTINE 00083000
* 00084000
* GPRS 0-11 AND 14-15 NOT USED (OR ARE PRESERVED) 00085000
* 00086000
* SYSTEM LOCK REQUIREMENTS - 00087000
* 00088000
* FROM PROBLEM STATE: 00089000
* THE SYSTEM LOCK IS NEVER HELD ON ENTRY. 00090000
* FOR SVC 76 OR X'B3' THE LOCK IS ACQUIRED IF THE SVC 00091000
* IS NOT TO BE REFLECTED TO THE VIRTUAL MACHINE. 00092000
* FOR SVC S FAST REFLECTED TO THE VIRTUAL MACHINE THE 00093000
* LOCK IS NOT ACQUIRED. 00094000
* FOR SVC S SLOW REFLECTED, THE LOCK IS ACQUIRED BEFORE 00095000
* CONTROL IS PASSED TO DMKPRGRF. 00096000
* FROM SUPERVISOR STATE: 00097000
* SVC 0 - THE STATE OF THE SYSTEM LOCK IS UNPREDICTABLE. 00098000
* ALL OTHER SVC S - THE SYSTEM LOCK IS HELD ON ENTRY. 00099000
EJECT 00100000
* OPERATION - 00101000
* 00102000
* SVC-INTERRUPTIONS ARE HANDLED AS FOLLOWS: 00103000
* 00104000
* 1. IF THE MACHINE WAS IN PROBLEM STATE, DMKSVCIN TAKES 00105000
* THE FOLLOWING ACTION: 00106000
* 00107000
* A. THE SVC INTERRUPT CODE IS EXAMINED TO DETERMINE IF 00108000
* THE INTERRUPT CODE IS FOR 'ADSTOP' (SVC CODE X'B3') 00109000
* OR FOR ERROR RECORDING (SVC CODE X'4C'). IF NOT, 00110000
* CONTROL IS GIVEN TO STEP B. 00111000
* FOR AN 'ADSTOP' SVC, THE SYSTEM LOCK IS ACQUIRED, THE 00112000
* MESSAGE 'ADSTOP AT XXXXX' IS SENT TO THE USER, THE 00113000
* OVERLAYED INSTRUCTION IS REPLACED, AND IF THE USER 00114000
* WANTS VM ASSIST TO HANDLE SVCS, VM ASSIST SVC HANDLING 00115000
* IS TURNED BACK ON. FINALLY THE USER IS 00116000
* PLACED IN CONSOLE FUNCTION MODE VIA A CALL TO 00117000
* DMKCFMBK. 00118000
* FOR AN SVC 76, GENERAL REGISTERS 0 AND 1 ARE CHECKED 00119000
* FOR VALID OS OR DOS ERROR RECORDING PARAMETERS. 00120000
* IF INVALID, CONTROL IS GIVEN TO STEP B. OTHERWISE 00121000
* THE SYSTEM LOCK IS ACQUIRED, AND DMKVER IS CALLED TO 00122000
* FURTHER PROCESS THE RECORDING REQUEST. IF CONTROL IS 00123000
* RETURNED FROM DMKVER, THE REQUEST WAS INVALID, THUS THE 00124000
* SVC 76 MUST BE REFECTED TO THE USER. IN THIS CASE 00125000
* CONTROL IS GIVEN TO STEP C. 00126000
* 00127000
* B. IF THE VIRTUAL MACHINE'S REAL PAGE ZERO IS IN STORAGE 00128000
* AN APPROPRIATE SVC OLD PSW IS STORED, AND NEW PSW 00129000
* FETCHED IN ORDER TO "FAST REFLECT" THE INTERRUPT TO THE 00130000
* VIRTUAL MACHINE WITHOUT UNNECESSARY REGISTER SAVING OR 00131000
* DISPATCHING OVERHEAD. THE NEW PSW IS CHECKED FOR MODE 00132000
* OR ENABLEMENT CHANGES WHICH PRECLUDE "FAST REFLECT", 00133000
* AND IF FOUND, THE SYSTEM LOCK IS ACQUIRED BEFORE 00134000
* CONTROL IS PASSED TO DMKDSPB FOR PSW VALIDATION; FOR 00135000
* SUCCESSFUL "FAST REFLECT" CONTROL IS PASSED DIRECTLY 00136000
* BACK TO THE VIRTUAL MACHINE WITHOUT FURTHER PROCESSING. 00137000
* 00138000
* C. FOR NORMAL REFLECTION OF AN INTERRUPT TO A VIRTUAL 00139000
* MACHINE, ITS GENERAL AND FLOATING POINT REGISTERS ARE 00140000
* SAVED, ITS VMBLOK IS MARKED IN INSTRUCTION-WAIT, THE 00141000
* ACTIVE INTERRUPT STATUS INFORMATION IS LOADED INTO 00142000
* INTO REGISTERS, THE SYSTEM LOCK IS ACQUIRED, AND 00143000
* CONTROL IS PASSED VIA 'GOTO' TO DMKPRGRF. 00144000
EJECT 00145000
* OPERATION (CONTINUED) - 00146000
* 00147000
* 2. IF THE MACHINE WAS IN SUPERVISOR STATE, DMKSVCIN VALIDATES 00148000
* THAT THE SYSTEM LOCK IS HELD FOR ALL CASES EXCEPT SVC 0, 00149000
* ABENDING IF NOT, AND THEN TAKES ONE OF THE FOLLOWING STEPS, 00150000
* DEPENDING ON THE INTERRUPT CODE: 00151000
* 00152000
* SVC 0: THIS INDICATES AN "IMPOSSIBLE" CONDITION, OR FATAL 00153000
* ERROR; THE GENERAL REGISTERS ARE SAVED IN THE 00154000
* DUMPSAVE AREA, AND DMKDMPDK IS INVOKED TO DUMP THE 00155000
* MACHINE. THE SYSTEM THEN DOES A SOFTWARE RE-IPL. 00156000
* 00157000
* SVC 4: RESERVED FOR FUTURE USE. AT PRESENT, THIS IS 00158000
* HANDLED LIKE SVC 0. 00159000
* 00160000
* SVC 8: THIS INDICATES A "CALL" TO A VM/370 ROUTINE WHOSE 00161000
* ADDRESS IS SPECIFIED IN BITS 8-31 OF REGISTER 15. THE 00162000
* AFFINITY FLAG (BIT 0 OF REG 15), IF ON, SPECIFIES THAT 00163000
* WHEN CONTROL IS RETURNED TO THE CALLER, IT SHOULD 00164000
* BE ON THE PROCESSOR INITIATING THE CALL. A NEW SAVE 00165000
* AREA IS OBTAINED (DMKFREE BEING CALLED IF NECESSARY), 00166000
* AND THE CALLER'S ADDRESSABILITY (GPR 12), SAVE-AREA 00167000
* ADDRESS (GPR 13) AND THE RETURN ADDRESS (FROM THE 00168000
* SVC OLD PSW) ARE PRESERVED IN THE NEW SAVE-AREA. 00169000
* (IF AFFINITY WAS SPECIFIED, THE CURRENT PROCESSOR ID 00170000
* IS PLACED IN A SAVE-AREA FIELD WHICH IS OTHERWISE 0.) 00171000
* THEN, IF THE CALLED ROUTINE (SPECIFIED BY GPR 15) IS 00172000
* WITHIN THE CP370 NUCLEUS, ITS ADDRESS IS PLACED IN GPR 00173000
* 12, AND CONTROL IS TRANSFERRED TO THE CALLED ROUTINE. 00174000
* 00175000
* IF, ON THE OTHER HAND, THE CALLED ROUTINE IS NOT 00176000
* WITHIN THE CP370 NUCLEUS, BUT IS IN A PAGEABLE 00177000
* MODULE, THEN ALL NEEDED REGISTERS AND CONTROL 00178000
* INFORMATION IS PRESERVED IN THE NEW SAVE-AREA, AND 00179000
* A "TRANS" IS ISSUED TO HAVE THE PAGING ROUTINES 00180000
* BRING IN THE PAGE CONTAINING THE NEEDED MODULE. 00181000
* WHEN RETURN FROM THE "TRANS" OCCURS, THE REAL 00182000
* ADDRESS OF THE PAGEABLE ROUTINE IS PLACED IN GPR 12, 00183000
* AND CONTROL IS THEN TRANSFERRED TO THE CALLED ROUTINE. 00184000
* 00185000
* SVC 12: THIS INDICATES A "RETURN" FROM A CALLED ROUTINE TO 00186000
* THE CALLING ROUTINE. THE SAVE-AREA IS EXAMINED FOR 00187000
* PROCESSOR AFFINITY, WHICH, IF SPECIFIED AND 00188000
* NON-MATCHING, CAUSES STACKING TO THE SPECIFIED 00189000
* PROCESSOR BEFORE RETURN PROCEEDS. IF THE RETURNING 00190000
* ROUTINE IS A PAGEABLE MODULE, DMKPTRUL IS CALLED 00191000
* RETURN IS A PAGEABLE CP370 MODULE, DMKPTRUL IS CALLED 00192000
* TO UNLOCK THE PAGE; IN ANY EVENT, THE ADDRESSABILITY 00193000
* (GPR 12) AND SAVE-AREA ADDRESS (GPR 13) OF THE CALLER 00194000
* ARE THEN RESTORED, THE RETURN ADDRESS IS PLACED IN THE 00195000
* SVC OLD PSW, AND CONTROL IS RETURNED TO THE CALLING 00196000
* PROGRAM BY LOADING THE SVC OLD PSW. 00197000
EJECT 00198000
* OPERATION (CONTINUED ) - 00199000
* 00200000
* SVC 16: THIS CODE INDICATES THAT THE "CURRENT" SAVE AREA IS 00201000
* TO BE RELEASED, WITHOUT ANY TRANSFER OF CONTROL. THE 00202000
* CHAIN OF SAVE-AREAS USED BY SVC 8 & SVC 12 IS REVISED 00203000
* TO INCLUDE THE SAVE-AREA BEING RETURNED, AND CONTROL 00204000
* IS RETURNED TO THE PROGRAM WHICH ISSUED THE SVC 16. 00205000
* 00206000
* SVC 20: THIS CODE INDICATES THAT A NEW SAVE-AREA IS TO BE 00207000
* GIVEN TO THE CALLER, WITHOUT ANY TRANSFER OF CONTROL. 00208000
* THE NEXT AVAILABLE SAVE-AREA IN THE CHAIN USED BY 00209000
* SVC 8 & SVC 12 IS DETACHED FROM THE CHAIN, AND 00210000
* RETURNED TO THE CALLER IN GPR 13. NO CONTROL TRANSFER 00211000
* TAKES PLACE - CONTROL BEING RETURNED TO THE CALLER 00212000
* OF THE SVC 20. 00213000
* 00214000
* SVC 24: THIS CODE CAUSES CONTROL TO BE PASSED TO THE MAIN 00215000
* PROCESSOR AT THE INSTRUCTION FOLLOWING THE SVC. 00216000
* ALL GENERAL REGISTERS ARE PRESERVED, BUT PSW FIELDS 00217000
* OTHER THAN THE INSTRUCTION COUNTER ARE NOT. 00218000
* 00219000
* 00220000
* 00221000
* SVC 76: THIS CODE IS IGNORED, CAUSING NO OPERATION. 00222000
* IF THIS SYSTEM IS RUNNING ON A VIRTUAL MACHINE, 00223000
* DMKIOF ISSUES AN 'SVC 76' WHICH SHOULD CAUSE THE 00224000
* NATIVE HYPERVISOR TO RECORD AN I/O ERROR AND NO-OP 00225000
* THE SVC; HOWEVER, IF THE NATIVE HYPERVISOR DOES NOT 00226000
* RECOGNIZE VALID ERROR RECORDING REGISTERS AT THE TIME 00227000
* OF THE SVC, IT WILL REFLECT IT TO THIS SYSTEM, IN 00228000
* WHICH CASE IT SHOULD BE IGNORED. 00229000
*. 00230000
EJECT 00231000
COPY OPTIONS 00232000
COPY LOCAL 00233000
DMKSVC START 0 -LOADER CONTROL- @V407579 00234000
SPACE 00235000
ENTRY DMKSVCIN @V407579 00236000
ENTRY DMKSVCNS = INTERNAL SYMBOL "NEXTSAVE" @V407579 00237000
ENTRY DMKSVCLO CONTAINS (DMKFRELO -L'SAVEAREA) @V407579 00238000
ENTRY DMKSVCHI CONTAINS (DMKFREHI) @V407579 00239000
SPACE 00240000
EXTRN DMKPRGRF 00241000
AIF (NOT &TRACE(6)).TRA1 ***AIF*** 00242000
EXTRN DMKTRCSV TO HANDLE USER SVC WHEN VM TRACING IS ON 00243000
EXTRN DMKTRCIT TO RE-INITIALIZE INSTRUCTION TRACING 00244000
EXTRN DMKTRCPB TO RESET OLD INSTRUCTION TRACING (IF ANY) 00245000
.TRA1 ANOP 00246000
EXTRN DMKDMPDK @V407579 00247000
EXTRN DMKCVTBH 00248000
AIF (NOT &VIRREAL).NOVR1 00249000
EXTRN DMKSLC HIGH END OF V=R AREA (IF ANY) - OR 0 00250000
.NOVR1 ANOP 00251000
EXTRN DMKPTRUL @V200820 00252000
EXTRN DMKCFMBK 00253000
EXTRN DMKDSPB 00254000
AIF (NOT &AP).DSPRU4 00254900
EXTRN DMKDSPRU DISPATCH UNLOCKED PARALLEL PATH @V407579 00255000
EXTRN DMKSTKDE STACK OF DEFERRED LOCKED RETURN @V407579 00256000
EXTRN DMKSTKSW STACK BLOK FOR OTHER PROCESSOR @V4M0141 00257000
EXTRN DMKLOKSY GLOBAL SYSTEM LOCK @V407579 00258000
.DSPRU4 ANOP 00258100
EXTRN DMKVERO,DMKVERD @V200226 00259000
SPACE 2 00260000
USING PSA,0 @V407579 00261000
SPACE 1 00262000
OPCODEEX EQU X'44' S/370 OP CODE FOR 'EXECUTE' INST.@V407579 00263000
* 00264000
SVCCRETN EQU 12 VM/370 SVC CODE FOR 'RETURN' @V407579 00265000
SVCCIOER EQU 76 OS/DOS/370 SVC CODE FOR I/O ERROR@V407579 00266000
SVCCSTOP EQU X'B3' VM/370 ADSTOP PLANTED 'SVC' CODE @V407579 00267000
* 00268000
D2MASK EQU X'00000FFF' MASK FOR S/370 INST. DISPLACEMENT@V407579 00269000
* 00270000
INCRBY1 EQU 1 USED TO INCREMENT COUNTERS BY 1 @V407579 00271000
* 00272000
EQUAL EQU B'1000' CONDITION CODE MASK @V407579 00273000
EJECT 00274000
**** SVC ROUTINES **** 00275000
SPACE 00276000
DMKSVCIN DS 0H SVC FLIH %V4M0144 00277000
OI CPSTATUS,CPSUPER INDICATE SUPERVISOR STATE %V4M0144 00278000
STM R12,R15,SVCREGS SAVE REGISTERS %V4M0144 00279000
L R12,SVCNPSW+4 OBTAIN ADDRESSABILITY %V407579 00280000
USING DMKSVCIN,R12 %V407579 00281000
TM SVCOPSW+1,PROBMODE CHECK FOR PROBLEM MODE %V3M4038 00282000
BO REFSVC YES - REFLECT IT. %V3M4038 00283000
AIF (NOT &TRACE(9)).TR1 00284000
TM TRACFLG1,TRAC02 TRACING ACTIVE? %V3M4038 00285000
BZ NOTRAC1 BRANCH IF NOT %V3M4038 00286000
TRACE CODE=TRCSVC,R14,R13,R15 TRACE SUPERVISOR SVC %V407579 00287000
USING TRACETBL,R14 %V407579 00288000
L R13,SVCR13 REFRESH R13 %V407579 00289000
L R15,SVCR15 REFRESH R15 %V407579 00290000
STCM R15,B'0111',TRACEADR TRACE R15 ON ENTRY %V407579 00291000
CLI INTSVC+1,SVCCRETN TEST FOR 'RETURN' SVC %V407579 00292000
BNE NOT0C NO... LEAVE R15 IN ENTRY %V3M4038 00293000
MVC TRACEADR,SAVERTN-SAVEAREA(R13) TRACE CALLER %V407579 00294000
NOT0C MVC TRACECOD,INTSVCL SAVE INTERRUPT ILC AND CODE %V407579 00295000
MVC TRACEPSW,SVCOPSW SAVE SVC OLD PSW %V407579 00296000
DROP R14 %V407579 00297000
NOTRAC1 EQU * %V3M4038 00298000
.TR1 ANOP 00299000
CLI INTSVC+1,SVCCIOER TEST FOR VM/370 ERROR RECORD%V407579 00300000
BE SVCIGNOR IGNORE SVC 76 FROM DMKIOF %V407579 00301000
LH R14,INTSVC GET SVC INTERRUPT-CODE %V407579 00302000
AIF ('&AP' EQ '1').APON4 00302600
B SVCODES(R14) HANDLE SVC VIA BRANCH TABLE %V407579 00302700
AGO .APOFF4 00302800
.APON4 ANOP 00302900
TM APSTAT1,APUOPER TEST FOR AP SYSTEM %V407579 00303000
BZ SVCODES(R14) HANDLE SVC VIA BRANCH TABLE %V407579 00304000
L R15,=A(DMKLOKSY+2) ACCESS THE SYSTEM LOCK %V407579 00305100
CLC LPUADDR,0(R15) TEST FOR CURRENTLY HELD %V407579 00305600
L R15,SVCR15 REFRESH R15 %V407579 00306100
BE SVCODES(R14) HANDLE SVC VIA BRANCH TABLE %V407579 00306600
LTR R14,R14 TEST FOR SVC 0 EXPLICITLY @V407579 00309000
BZ SVCODES(R14) IF SO, VALID DIE @V407579 00310000
ABSVC MVC CPABEND,SVC002 SET ABEND FOR LACK OF LOCK @V407579 00311000
B SVCDIE2 @V407579 00312000
SVC002 DC C'SVC',AL1(2) ABEND CODE FOR SVC W/O SYS LOCK @V407579 00313000
.APOFF4 ANOP 00313100
SPACE 00314000
SVCODES DS 0F BRANCH-TABLE FOR SVC-CODES: 00315000
CODE0 B SVCDIE FATAL CONDITION - INTO HARD WAIT STATE. 00316000
CODE4 B SVCDIE SVC 4 NOT VALID 00317000
CODE8 B SVCLINK LINK REQUEST. %V3M4038 00318000
CODE12 B SVCRET RETURN REQUEST. %V3M4038 00319000
CODE16 B SVCRLSE RELEASE CURRENT SAVE AREA. 00320000
CODE20 B SVCGET GET NEXT SAVE AREA 00321000
CODE24 B SVCSWIT SWITCH CONTROL TO MAIN PROC. @V407579 00322000
NSVCODES EQU *-SVCODES COUNT OF SVC CODES. 00323000
EJECT 00324000
REFSVC DS 0D DO FAST REFLECT OF USER SVC IF POSSIBLE: 00325000
LCTL C8,C8,CPCREG8 RESET HOST SYSTEM'S MC MASK @V3M4026 00326000
LA R15,INCRBY1 COUNT USER SVCS (BY PROCESSOR) @V407579 00327000
AL R15,PSASVCCT @V407579 00328000
ST R15,PSASVCCT AND SAVE 00329000
L R14,RUNUSER ACCESS VMBLOK OF RUNNING USER @V4M0203 00330000
USING VMBLOK,R14 @V4M0203 00331000
STPT VMTMOUTQ STOP CHARGING FOR PROBLEM TIME 00332000
CHARGE START START CHARGING SUPERVISOR TIME @V407579 00333000
DROP R14 @V4M0203 00334000
MVC QUANTUMR,TIMER SAVE INTERVAL TIMER @VA01775 00335000
AIF (NOT &TRACE(9)).TR3 00336000
TM TRACFLG1,TRAC02 TRACING ACTIVE? 00337000
BZ NOTRAC3 BRANCH IF NOT 00338000
TRACE CODE=TRCSVC,R15,R13,R14 TRACE USER SVC REFLECT @V407579 00339000
USING TRACETBL,R15 @V407579 00340000
MVC TRACEADR,SVCR15+1 SHOW R15 AT ENTRY @V407579 00341000
MVC TRACECOD,INTSVCL SAVE INTERRUPT ILC AND CODE @V407579 00342000
MVC TRACEPSW,SVCOPSW SAVE SVC OLD PSW @V407579 00343000
NOTRAC3 EQU * 00344000
.TR3 ANOP 00345000
L R15,RUNUSER ACCESS VMBLOK OF RUNNING USER @V4M0203 00346000
USING VMBLOK,R15 @V4M0203 00347000
CLI INTSVC+1,SVCCIOER TEST FOR ERROR RECORDING @V407579 00348000
BE SVCVER YES - GO VERIFY PARAMETER REGS. @V200226 00349000
CLI INTSVC+1,SVCCSTOP TEST FOR VM/370 ADSTOP @V407579 00350000
BE SVCADSTP YES, CHECK IT OUT @VA05407 00351000
TSTRACE LCTL C0,C0,CPCREG0 SET TO CP ARCHITECTURE @VA05407 00352000
AIF (NOT &TRACE(6)).TRA2 ***AIF*** 00353000
TM VMTRCTL,VMTRSVC+VMTRBRIN VM TRACING IN EFFECT ? 00354000
BNZ REFSVCB TRF IF YES. 00355000
.TRA2 ANOP 00356000
TM VMESTAT,VMEXTCM IS VM IN EXTENDED CONTROL MODE? 00357000
BO REFECMOD DO EC-MODE FAST REFLECT, IF SO @V407579 00358000
LRA R13,PSA TRY ADDRESSABILITY TO USER'S PSA @V407579 00359000
BNZ REFSVCB IF NOT IN, MAKE DMKPRGRF DO THE WORK 00360000
L R14,SVCOPSW+4 GET ADDRESS FROM SVC-OLD-PSW 00361000
ST R14,SVCOPSW+4-PSA(,R13) USER'S OLD IC @V407579 00362000
L R14,INTSVCL GET ILC (BITS 13-14) AND CODE @V407579 00363000
SRL R14,3 MOVE ILC TO BITS 16-17 @V407579 00364000
O R14,SVCOPSW COMBINE WITH CC, PGM MASK @V407579 00365000
STCM R14,B'0010',SVCOPSW+4-PSA(R13) USER'S ILC,CC@V407579 00366000
L R14,INTSVCL GET SVC INTERRUPT CODE @V407579 00367000
REFMASK ICM R14,B'1100',VMPSW GET VIRTUAL MASK, KEY, MODE @V407579 00368000
ST R14,SVCOPSW-PSA(,R13) USER'S MASK, KEY, MODE @V407579 00369000
L R14,SVCNPSW-PSA(,R13) GET USER'S NEW MASK,ETC@V407579 00370000
L R13,SVCNPSW+4-PSA(,R13) GET USER'S NEW IC @V407579 00371000
ST R13,VMPSW+4 00372000
LA R13,0(,R13) STRIP ALL BUT IC @V407579 00373000
ST R13,RUNPSW+4 SET NEW IC FOR RE-ENTRY TO USER @V407579 00374000
L R13,VMPSW KEEP TRACK OF FORMER MASK/MODE @V407579 00375000
ST R14,VMPSW ESTABLISH NEW USER MASK/MODE @V407579 00376000
XR R13,R14 IDENTIFY CHANGING PSW STATES @V407579 00377000
NR R13,R14 GOING FROM ZERO TO ONE @V407579 00378000
N R13,BCBADBIT X'FF0A0000' BITS OF INTEREST @V407579 00379000
BNZ REFSVCA IF NOT, MAKE "DISPATCH" DO THE WORK. 00380000
TM VMPEND,VMPERPND PER INTERRUPT PENDING? PER001 00380100
BO REFSVCA YES. GO TO DMKDSPB TO PROCESS IT. PER001 00380200
ICM R14,B'0010',VMPSW+4 GET USER'S NEW CC, PGM MASK @V407579 00381000
N R14,MODEBUSR X'00F03F00' PSW BITS SET BY USER @V407579 00382000
TM VMPSTAT,VMV370R EXTENTED MACHINE ? @VA08573 00382100
BO REFRUN1 YES,GO RELOAD CTL REGS @VA08573 00382200
REFRUN O R14,MODEBSYS X'070D0000' PSW BITS SET BY CP @V407579 00383000
ST R14,RUNPSW PROPER RE-ENTRY PSW (FIRST HALF) @V407579 00384000
TM VMTRCTL,VMTRPER IS "PER" IN USE? PER001 00384100
BNO *+8 NO, SKIP TURNING IT ON PER001 00384200
OI RUNPSW,PERMODE TURN ON PER BIT PER001 00384300
LR R13,R11 PRESERVE USER'S R11 @V407579 00385000
LR R11,R15 STANDARD ADDRESSABILITY @V407579 00386000
DROP R15 @V407579 00387000
USING VMBLOK,R11 @V407579 00388000
CHARGE STOP END OF SUPERVISOR CHARGES @V407579 00389000
SPT VMTMOUTQ START CHARGING PROBLEM TIME 00390000
DROP R11 @V407579 00391000
LR R11,R13 RESTORE USER'S R11 @V407579 00392000
L R12,QUANTUMR CHECKPOINT TIMER @V4M0167 00393000
S R12,TIMER - (CURRENT TIMER) -> SUPERVISOR @V4M0167 00394000
L R13,QUANTUM ORIGINAL TIME @V4M0167 00395000
SR R13,R12 - SUPERVISOR @V4M0167 00396000
ST R13,QUANTUM . . WILL EVENTUALLY GIVE PROBLEM @V4M0167 00397000
MVI CPSTATUS,CPRUN INDICATE RUNNING USER STATUS @V4M0156 00398000
LM R12,R15,SVCREGS NOW RESTORE THE REG'S WE USED 00399000
LPSW RUNPSW AND AWAY WE GO. 00400000
* 00401000
USING VMBLOK,R15 @V407579 00402000
REFECMOD LCTL C1,C1,VMSEG REVERT TO USER'S REAL SPACE @V407579 00403000
LRA R13,PSA TRY ADDRESSABILITY TO USER'S PSA @V407579 00404000
BNZ REFSVCB IF NOT AVAILABLE, SLOW REFLECT @V407579 00405000
L R14,SVCOPSW+4 GET ADDRESS FROM SVC-OLD-PSW @V407579 00406000
ST R14,SVCOPSW+4-PSA(,R13) USER'S OLD IC @V407579 00407000
L R14,INTSVCL GET ILC (BITS 13-14) AND CODE @V407579 00408000
ST R14,INTSVCL-PSA(,R13) USER'S EC-MODE CODE @V407579 00409000
L R14,SVCOPSW GET CC, PGM MASK @V407579 00410000
ICM R14,B'1100',VMPSW GET VIRTUAL MASK, KEY, MODE @V407579 00411000
ST R14,SVCOPSW-PSA(,R13) USER'S MASK, KEY, MODE @V407579 00412000
L R14,SVCNPSW-PSA(,R13) GET USER'S NEW MASK,ETC@V407579 00413000
L R13,SVCNPSW+4-PSA(,R13) GET USER'S NEW IC @V407579 00414000
ST R13,VMPSW+4 SET NEW IC @V407579 00415000
ST R13,RUNPSW+4 SET NEW IC FOR RE-ENTRY TO USER @V407579 00416000
L R13,VMPSW KEEP TRACK OF FORMER MASK/MODE @V407579 00417000
ST R14,VMPSW ESTABLISH NEW USER MASK/MODE @V407579 00418000
CLI VMPSW+4,0 CHECK MUST-BE-ZERO BITS OF EC PSW@V407579 00419000
BNE REFSVCA IF NOT, MAKE DISPATCH CHECK IT @V407579 00420000
XR R13,R14 IDENTIFY CHANGING PSW STATES @V407579 00421000
N R13,ECBADBIT X'FF0AC0FF' BITS OF INTEREST @V407579 00422000
BNZ REFSVCA USE DISPATCH CHECK-OUT, IF ANY @V407579 00423000
REFRUN1 DS 0H @VA08573 00423100
LCTL C0,C1,RUNCR0 RESTORE RUNNING ADDRESS SPACE @V407579 00424000
L R13,VMECEXT ACCESS EC-MODE VMBLOK EXTENSION @V407579 00425000
LCTL C8,C8,EXTCR8-ECBLOK(R13) TO REFRESH MONITOR MASK@V407579 00426000
B REFRUN CONTINUE INTERRUPT REFLECTION @V407579 00427000
DROP R15 @V407579 00428000
* 00429000
CNOP 0,4 ALIGNMENT FOR FOLLOWING FIELDS @V407579 00430000
BCBADBIT DC AL1(X'FF',EXTMODE+WAIT,0,0) MUST NOT COME ON @V407579 00431000
ECBADBIT DC AL1(X'FF',EXTMODE+WAIT,X'C0',X'FF') NO FLIPS@V407579 00432000
MODEBUSR DC AL1(0,X'F0',X'3F',0) USER BITS: KEY, CC, PGM@V407579 00433000
MODEBSYS DC AL1(TRANMODE+IOMASK+EXTMASK,EXTMODE+MCHEK+PROBMODE,0,0) 00434000
SPACE 3 00435000
REFSVCA DS 0H LET 'DISPATCH' TAKE CARE OF IT: 00436000
STM R0,R11,VMGPRS-VMBLOK(R15) SAVE VM REGS 0-11 @V407579 00437000
LR R11,R15 SWITCH VMBLOK ADDRESSABILITY 00438000
USING VMBLOK,R11 @V407579 00439000
AIF (NOT &FLOATPT).NOFP1 00440000
STD Y0,VMFPRS STORE 00441000
STD Y2,VMFPRS+8 FLOATING 00442000
STD Y4,VMFPRS+16 POINT 00443000
STD Y6,VMFPRS+24 REGISTERS 00444000
.NOFP1 ANOP 00445000
MVC VMGPRS+R12*4(4*4),SVCREGS SAVE REGS 12-15 @V407579 00446000
OI VMRSTAT,VMEXWAIT USER IN SIMULATION WAIT @V407579 00447000
BAL R10,OBSLOCK SYSTEM LOCK NEEDED BEFORE DMKDSP @V407579 00448000
* ********************************* 00449000
NI VMRSTAT,X'FF'-VMEXWAIT SIMULATION WAIT ENDED @V407579 00450000
GOTODSPB GOTO DMKDSPB AND LET "DISPATCH" CARRY THE BALL. 00451000
* 00452000
SPACE 3 00453000
REFSVCB DS 0H LET "REFLECT" TAKE CARE OF IT: 00454000
STM R0,R11,VMGPRS-VMBLOK(R15) SAVE REGISTERS 0-11 00455000
LR R11,R15 SWITCH VMBLOK ADDRESSABILITY 00456000
MVC VMGPRS+R12*4(4*4),SVCREGS AND SAVE REGISTERS 12-15 00457000
AIF (NOT &FLOATPT).NOFP2 00458000
STD Y0,VMFPRS SAVE FLOATING POINT REGISTERS 00459000
STD Y2,VMFPRS+8 ... 00460000
STD Y4,VMFPRS+16 ... 00461000
STD Y6,VMFPRS+24 ... 00462000
.NOFP2 ANOP 00463000
LM R4,R5,SVCOPSW PRESERVE PAGE 0 INTERRUPT PSW @V407579 00464000
L R6,INTSVCL AND INTERRUPT ILC/CODE @V407579 00465000
BAL R10,OBSLOCK SYSTEM LOCKED CODE BEYOND HERE **@V407579 00466000
* ********************************* 00467000
REFSVCC EQU * HERE TO REFLECT AN SVC 76 THAT @VA01775 00468000
* CP ISN'T HANDLING 00469000
AIF (NOT &TRACE(6)).TRA3 ***AIF*** 00470000
TM VMTRCTL,VMTRSVC+VMTRBRIN VM TRACING IN EFFECT ? 00471000
BNZ REFTRACE TRF IF YES. 00472000
.TRA3 ANOP 00473000
OI VMRSTAT,VMEXWAIT USER IN SIMULATION WAIT @V4M0108 00474000
LA R1,SVCOPSW LET R1 POINT TO SVC OLD-PSW, AND 00475000
LA R3,INTSVCL LET R3 POINT TO SVC ILC & INT-CODE; 00476000
GOTO DMKPRGRF GO "REFLECT" IT. 00477000
SPACE 1 00478000
AIF (NOT &TRACE(6)).TRA4 ***AIF*** 00479000
REFTRACE DS 0H TRACING ON, LET DMKTRCSV DO THE WORK: 00480000
LR R0,R4 ARGUMENTS IN REGS FOR TRACE @V407579 00481000
LR R1,R5 SVCOLD PSW @V407579 00482000
LR R2,R6 @V407579 00483000
SRL R2,16 SVC ILC IN BITS 16-31 @V407579 00484000
LR R4,R6 SVC ILC/CODE @V407579 00485000
LR R10,R1 SVC OLD PSW ADDRESS INTO R10, 00486000
SLR R10,R2 MINUS LENGTH = ADDRESS OF SVC (OR EX-SVC) 00487000
CALL DMKTRCSV CALL DMKTRCSV TO HANDLE EVERYTHING ELSE 00488000
BNZ GOTODSPB CC NONZERO - MUST GO TO "DMKDSPB" 00489000
GOTO DMKDSPCH CC 0 - GO TO REGULAR DISPATCH ENTRY POINT 00490000
.TRA4 ANOP 00491000
SPACE 3 00492000
OBSLOCK DC 0H'0' SUBROUTINE TO OBTAIN SYSTEM LOCK @V407579 00493000
AIF (NOT &AP).APCHK6 00493900
LOCK OBTAIN,TYPE=SYS,SPIN=NO TRY TO OBTAIN SYSLOCK @V407579 00494000
BCR EQUAL,R10 RETURN IF LOCK OBTAINED @V407579 00495000
L R15,VMDFTPNT DEFER BLOCK FOR SYNC EVENTS @V407579 00496000
USING CPEXBLOK,R15 @V407579 00497000
STM R0,R15,CPEXREGS PRESERVE REGS OF CALLER @V407579 00498000
LA R0,DEFERETN @V407579 00499000
ST R0,CPEXADD SET KNOWN RETURN POINT @V407579 00500000
DROP R15 @V407579 00501000
LR R1,R15 @V407579 00502000
CALL DMKSTKDE STACK THE LOCK DEFERRAL @V407579 00503000
GOTO DMKDSPRU AND RUN ANOTHER WHILE WAITING.. @V407579 00504000
* 00505000
.APCHK6 ANOP 00505100
DEFERETN BR R10 RETURN TO THE ORIGINAL CALLER @V407579 00506000
EJECT 00507000
*********************************************************************** 00508000
* * 00509000
* 'SVCDIE' IS REACHED VIA AN SVC 0 FROM WITHIN THE CONTROL * 00510000
* PROGRAM INDICATING AN IMPOSSIBLE CONDITION OR FATAL ERROR. * 00511000
* * 00512000
*********************************************************************** 00513000
* 00514000
SVCDIE L R13,SVCOPSW+4 POINT TO THE SVC ZERO ABEND CODE 00515000
MVC CPABEND(4),0(R13) AND MOVE IT INTO PSA 00516000
SVCDIE2 STM R0,R11,DUMPSAVE SAVE REGS FOR DUMP ROUTINE @V407579 00517000
MVC DUMPSAVE+4*R12(4*4),SVCREGS .. @V407579 00518000
GOTO DMKDMPDK GO TO DUMP ROUTINE VIA R12. 00519000
EJECT 00520000
*********************************************************************** 00521000
* * 00522000
* SVC 8 - 'SVCLINK' PASSES CONTROL FROM ONE CP MODULE TO ANOTHER, * 00523000
* OBTAINING A NEW SAVE AREA. GR12,15 = ADR OF CALLED MODULE* 00524000
* GR13 = ADR OF SAVE AREA. * 00525000
* * 00526000
*********************************************************************** 00527000
SPACE 00528000
*. 00529000
*********************************************************************** 00530000
* 00531000
* 00532000
* CP ASSIST INSTRUCTION "LINK" - SVC 8 IN SUPERVISOR STATE 00533000
* 00534000
* 00535000
* REGISTER INPUT: 00536000
* GPR 15 = ADDRESS OF THE MODULE BEING CALLED 00537000
* 00538000
* SYSTEM DATA AREAS REFERENCED (BY MODULE WHERE APPLICABLE): 00539000
* DMKPSA - 'APAGCP', 'ASVCLIST', 'SVCLIST', TRACE FIELDS 00540000
* SAVEAREA,ALOKSY 00541010
* 00542000
* 00543000
* EXITS: 00544000
* 00545000
* 1. ADDRESS IN GPR 15 (NORMAL COMPLETION) 00546000
* 00547000
* REGISTER OUTPUT: 00548000
* GPR 12 = SAME AS GPR 15 00549000
* GPR 13 = ADDRESS OF SAVEAREA 00550000
* GPR 14 = ADDRESS OF THE NEXT SEQUENTIAL INSTRUCTION 00551000
* AFTER THE SVC 8 (RETURN ADDRESS OF CALLER) 00552000
* 00553000
* 2. ADDRESS IN SVC NEW PSW - AT X'65' (ABNORMAL COMPLETION) 00554000
* 00555000
* NOTE: THIS EXIT WILL GENERATE AN SVC INTERRUPT 00556000
* 00557000
*********************************************************************** 00558000
*. 00559000
SPACE 00560000
SVCLINK DS 0D SVC 8 - CALL A CP ROUTINE: %V3M4038 00561000
L R15,SVCOPSW+ADDR PICK UP RETURN ADDRESS %V4M0126 00562000
L R13,NEXTSAVE GET POINTER TO SAVE-AREA(IF ANY) %V3M4038 00563000
LTR R13,R13 ANY? %V3M4038 00564000
BZ GETFREE8 NO, GO GET A 12 DBLWD SAVE AREA %V3M4038 00565000
USING SAVEAREA,R13 USE THE SAVEAREA DSECT %V3M4038 00566000
SVCLINKC L R14,SAVENEXT GET NEXT SAVE-AREA PTR (IF ANY) %V407579 00567000
ST R14,NEXTSAVE DE-QUEUE THIS ELEMENT %V407579 00568000
MVC SAVER12(2*4),SVCR12 SAVE CALLER'S R12-R13 %V407579 00569000
ST R15,SAVERETN SET RETURN ADDRESS (FROM PSW) %V4M0126 00570000
L R15,SVCR15 REFRESH REG 15 %V4M0126 00571000
DROP R12 %V407579 00572000
SVCLINKR LR R12,R15 ESTABLISH BASE FOR CALLEE %V407579 00573000
CL R12,APAGCP IS HE IN NUCLEUS OR PAGEABLE CP? %V3M4038 00574000
BCR 4,R12 'BL' IF IN NUCLEUS - BRANCH NOW. %V3M4038 00575000
* 00576000
L R12,SVCNPSW+4 RE-ESTABLISH CURRENT BASE @V407579 00577000
USING DMKSVCIN,R12 @V407579 00578000
LTR R15,R15 TEST FOR AFFINITY REQUEST @V407579 00579000
BM SVCLINKA IF SO, HANDLE AS SPECIAL CASE @V407579 00580000
* 00581000
* CALL A PAGEABLE CP ROUTINE: 00582000
* 00583000
STM R1,R2,SAVEWRK2 IF PAGEABLE, SAVE R1-R2 IN WORK-AREA 00584000
LR R1,R15 REQUESTED CALLEE ADDRESS IN R1 @V407579 00585000
TRANS 2,1,OPT=(BRING,DEFER,LOCK,SYSTEM),IOER=ABEND3 GO GET IT 00586000
LCTL C1,C1,VMSEG RESTORE USERS SEGMENT TABLE @V304635 00587000
DROP R12 @V407579 00588000
LR R12,R2 REAL ADDRESS INTO R12 00589000
LM R1,R2,SAVEWRK2 RESTORE R1-R2 FROM WORK-AREA, 00590000
BR R12 NOW GO TO CALLEE. 00591000
SPACE 00592000
ABEND3 ABEND 3 PERMANENT I/O PAGING ERROR 00593000
SPACE 1 00594000
USING DMKSVCIN,R12 @V407579 00595000
SVCLINKA MVC SAVEPROC,LPUADDR+1 SAVE THE ID OF PROCESSOR @V407579 00596000
LA R15,0(,R15) REMOVE THE AFFINITY FLAG @V407579 00597000
B SVCLINKR NOW COMPLETE THE LINK @V407579 00598000
EJECT 00599000
*********************************************************************** 00600000
* * 00601000
* SVC 12- 'SVCRET' RETURNS CONTROL TO CALLING CP MODULE, RELEASING * 00602000
* THE SAVE AREA AND RESTORING CALLER'S R12 AND R13. * 00603000
* * 00604000
*********************************************************************** 00605000
SPACE 1 00606000
*. 00607000
*********************************************************************** 00608000
* 00609000
* 00610000
* CP ASSIST INSTRUCTION "RETURN" - SVC 12 IN SUPERVISOR STATE 00611000
* 00612000
* 00613000
* REGISTER INPUT: 00614000
* GPR 12 = BASE ADDRESS OF MODULE ISSUING THE 'RETURN' SVC 00615000
* GPR 13 = ADDRESS OF SAVEAREA 00616000
* 00617000
* SYSTEM DATA AREAS REFERENCED (BY MODULE WHERE APPLICABLE): 00618000
* DMKPSA - 'APAGCP', 'ASVCLIST', 'SVCLIST', TRACE FIELDS 00619000
* SAVEAREA,ALOKSY 00620010
* 00621000
* 00622000
* EXITS: 00623000
* 00624000
* 1. ADDRESS IN FIRST WORD OF SAVEAREA (NORMAL COMPLETION) 00625000
* 00626000
* REGISTER OUTPUT: 00627000
* GPR 12-13 = RESTORED FROM SAVEAREA 00628000
* 00629000
* 2. ADDRESS IN SVC NEW PSW - AT X'65' (ABNORMAL COMPLETION) 00630000
* 00631000
* NOTE: THIS EXIT WILL GENERATE AN SVC INTERRUPT 00632000
* 00633000
*********************************************************************** 00634000
*. 00635000
SPACE 00636000
SVCRET DS 0D SVC 12 - RETURN TO CALLER: %V3M4038 00637000
L R14,SAVERETN GET RETURN-ADDRESS %V407579 00638000
CLI SAVEPROC,0 TEST FOR SPECIFIC PROC. RETURN %V407579 00639000
BNE SVCRETAF SPECIAL HANDLING FOR AFFINITY %V407579 00640000
SVCRETC ST R14,SVCOPSW+4 SET UP SVCOLD PSW FOR RETURN %V407579 00641000
L R14,SVCR12 GET CALLEE'S BASE ADDRESS %V407579 00642000
CL R14,APAGCP WAS CALLEE A PAGEABLE MODULE ? %V407579 00643000
BNL RELPAGE YES - GO UNLOCK HIM. %V3M4038 00644000
AIF (NOT &VIRREAL).NOVR2 %V407579 00645000
CL R14,SLCADDR MAYBE - EXIT FROM V=R STORAGE ? %V407579 00646000
BL RELPAGE YES - RELEASE THE PAGE %V407579 00647000
* (NO EXITS FROM ANY MODULE IN PAGE 0) 00648000
.NOVR2 ANOP 00649000
SVCRETJ CL R13,DMKSVCHI SAVE-AREA ABOVE DYN. PAGING AREA %V407579 00650000
BNL SVCRETJ1 YES - GOOD. %V3M4038 00651000
CL R13,DMKSVCLO CHECK IF IN DYNAMIC PAGING AREA %V407579 00652000
BH SVCRETJ2 IF SO, FRET SAVE-AREA %V3M4038 00653000
AIF (NOT &VIRREAL).SVCRET1 00654000
CL R13,SLCADDR ONE MORE CHECK < END OF V=R ? %V3M4038 00655000
BL SVCRETJ2 IF YES THAT'S IN PAGING AREA TOO %V3M4038 00656000
.SVCRET1 ANOP 00657000
SVCRETJ1 L R14,NEXTSAVE R13 OK, GET OLD TOP-OF-LIST, %V407579 00658000
ST R14,SAVENEXT CHAIN ONTO THIS ELEMENT, %V407579 00659000
ST R13,NEXTSAVE PUSH DOWN LIST %V3M4038 00660000
LM R12,R13,SAVER12 RESTORE CALLER'S R12-R13 %V3M4038 00661000
LPSW SVCOPSW AND RETURN TO CALLER. %V3M4038 00662000
* 00663000
RELPAGE LR R13,R2 PRESERVE CALLER'S R2 @V407579 00664000
LR R2,R14 PASS UNLOCK ADDR TO UNLOCK @V407579 00665000
CALL DMKPTRUL UNLOCK PAGE (WITHOUT CTL. LOSS) @V407579 00666000
LR R2,R13 REFRESH CALLER'S R2 @V407579 00667000
L R13,SVCR13 AND R13 OF ISSUER @V407579 00668000
B SVCRETJ BACK TO MAIN PATH @V407579 00669000
* 00670000
SVCRETAF LA R14,0(,R14) CLEAR SPECIFIED PROCESSOR ID @V407579 00671000
LA R15,INCRBY1 COUNT OCCURANCES @V407579 00672000
AL R15,SVCRAFCT @V407579 00673000
ST R15,SVCRAFCT @V407579 00674000
AIF (NOT &AP).APCHK7 00674900
CLC SAVEPROC,LPUADDR+1 TEST FOR SAME PROCESSOR @V407579 00675000
BE SVCRETC CONTINUE NORMAL EXIT @V407579 00676000
LA R15,INCRBY1 COUNT OCCURANCES OF REQ'D SWITCH @V407579 00677000
AL R15,SVCRAFSS @V407579 00678000
ST R15,SVCRAFSS @V407579 00679000
STM R0,R8,SAVER0 SAVE REGS IN A KNOWN PATTERN @V407579 00680000
LR R3,R14 SAVE R14 ACROSS CALLS @V407510 00681000
LM R4,R7,SVCREGS PRESERVE SVCREGS THRU CTL PASS @V407579 00682000
L R2,SVCOPSW AND SUPERVISOR STATE PSW @V407579 00683000
LA R0,CPEXSIZE OBTAIN A BLOCK TO STACK CTL XFER @V407579 00684000
CALL DMKFREE (FREE WILL RETURN ON SAME PROC.) @V407579 00685000
USING CPEXBLOK,R1 @V407579 00686000
LA R0,SVCRETUS SET RETURN CONTROL POINT @V407579 00687000
ST R0,CPEXADD @V407579 00688000
LR R14,R3 REFRESH R14 TO ENTRY STATE @V407579 00689000
STM R0,R15,CPEXREGS SET REGS FOR RETURN @V407579 00690000
DROP R1 @V407579 00691000
CALL DMKSTKSW STACK FOR OTHER PROCESSOR @V4M0141 00692000
TSTDSP L R15,PREFIXB ACCESS OTHER PSA @VA09257 00692100
TM XCPEND-PSA(R15),XCDISP DISPATCH PENDING @VA09257 00692200
BZ GOTODSP NO @VA09257 00692300
LOCK RELEASE,TYPE=SYS YES, RELEASE LOCK @VA09257 00692400
GOTO DMKDSPRU UNLOCKED ENTRY TO DSP @VA09257 00692500
GOTODSP DS 0H @VA09257 00692600
GOTO DMKDSPCH RELINQUISH CONTROL HERE. @V407579 00693000
SVCRETUS ST R2,SVCOPSW RESTORE RETURN EXIT PSW @V407579 00694000
STM R4,R7,SVCREGS RESTORE SVCREGS TO ENTRY STATE @V407579 00695000
LM R0,R8,SAVER0 RESTORE REGS TO CALLEE'S VALUES @V407579 00696000
.APCHK7 ANOP 00696100
B SVCRETC NOW COMPLETE THE RETURN @V407579 00697000
SPACE 00698000
* SAVE-AREA IN R13 WAS IN DYNAMIC PAGING AREA: 00699000
SVCRETJ2 LM R14,R15,SVCOPSW REMEMBER SVC OLD PSW (TO BE SAFE) 00700000
STM R14,R1,FRTSAV SAVE SVC-OLD-PSW AND CALLER'S R0-R1 00701000
LR R1,R13 ADDRESS OF SAVE-AREA INTO R1 00702000
MVC FRTSAV+4*4(2*4),SAVER12 COPY CALLER'S R12-13 @V407579 00703000
LA R0,SAVESIZE SAVE-AREA SIZE IN DOUBLE WORDS 00704000
CALL DMKFRET GIVE BACK AREA IN DYNAMIC PAGING AREA 00705000
LA R15,INCRBY1 COUNT HOW MANY TIMES WE DID IT @V407579 00706000
AL R15,DYNFRET ... 00707000
ST R15,DYNFRET ... 00708000
LM R14,R1,FRTSAV PICK UP PSW AND R0-1 @V407579 00709000
STM R14,R15,SVCOPSW RETURNING PSW @V407579 00710000
LM R12,R13,FRTSAV+16 RESTORE CALLERS R12-13 @V407579 00711000
LPSW SVCOPSW BACK TO ORIGINAL CALLER @V407579 00712000
EJECT 00713000
*********************************************************************** 00714000
* * 00715000
* SVC 16- 'SVCRLSE' RELEASES CURRENT SAVE AREA, UNLOCKS BYPASSED * 00716000
* MODULE(IF PAGEABLE), AND POINTS R13 AT FORMER SAVE AREA. * 00717000
* SVC 20- 'SVCGET' GET NEXT SAVE AREA * 00718000
* * 00719000
*********************************************************************** 00720000
SPACE 1 00721000
SVCRLSE DS 0D SVC 16 - RELEASE CURRENT SAVE AREA: 00722000
L R14,SAVER12 GET BASE OF BYPASSED MODULE @V407579 00723000
CL R14,APAGCP WAS CALLEE A PAGEABLE MODULE ? @V407579 00724000
BNL RELPAGE1 YES - GO UNLOCK HIM. 00725000
AIF (NOT &VIRREAL).NOVR3 @V407579 00726000
CL R14,SLCADDR ARE WE RELEASING V=R STORAGE? @V407579 00727000
BNL SVCRLSEX NO - NORMAL RELEASE. 00728000
CL R14,F4095 RELEASING FROM PAGE 0 ? @V407579 00729000
BH RELPAGE1 NO--UNLOCK THE PAGE @V407579 00730000
.NOVR3 ANOP 00731000
SVCRLSEX L R15,SAVER13 GET CALLER'S SAVE AREA @V407579 00732000
L R14,NEXTSAVE TAKE CURRENT CHAIN @V407579 00733000
ST R14,SAVENEXT APPEND IT TO RETURNING SAVE-AREA @V407579 00734000
ST R13,NEXTSAVE RESET ANCHOR @V407579 00735000
LR R13,R15 PASS PREDECESSOR'S SAVE-AREA @V407579 00736000
B SVCSEXIT BACK TO ISSUER(WITHOUT CTL XFER) @V407579 00737000
* 00738000
RELPAGE1 LR R13,R2 PRESERVE CALLER'S R2 @V407579 00739000
LR R2,R14 PASS UNLOCK ADDR TO UNLOCK @V407579 00740000
CALL DMKPTRUL UNLOCK THE PAGE @V407579 00741000
LR R2,R13 REFRESH CALLER'S R2 @V407579 00742000
L R13,SVCR13 AND R13 OF ISSUER @V407579 00743000
B SVCRLSEX BACK TO MAIN PATH @V407579 00744000
SPACE 3 00745000
SVCGET DS 0D SVC 20 - GET NEXT SAVE AREA: 00746000
L R13,NEXTSAVE GET NEXT SAVE AREA 00747000
LTR R13,R13 ANY SAVE AREA? 00748000
BNZ *+8 YES 00749000
BAL R14,SVCFR NO, GET ONE FROM FREE @V407579 00750000
L R14,SAVENEXT GET SUCCESSOR POINTER @V407579 00751000
ST R14,NEXTSAVE DEQUEUE CURRENT ELEMENT @V407579 00752000
MVC SAVER12(2*4),SVCR12 SAVE R12 AND R13 @V407579 00753000
SVCSEXIT L R12,SVCR12 RESTORE R12 @V407579 00754000
LM R14,R15,SVCR14 AND R14-15. (R13 ALREADY SET) @V407579 00755000
LPSW SVCOPSW AND RETURN. 00756000
* 00757000
DROP R13 @V407579 00758000
EJECT 00759000
*********************************************************************** 00760000
* * 00761000
* SVC 24- 'SVCSWIT' SWITCH CONTROL TO MAIN PROCESSOR * 00762000
* SVC 76- 'SVCIGNOR' IGNORE DMKIOF ERROR RECORD IN VIRTUAL MACHINE * 00763000
* * 00764000
*********************************************************************** 00765000
SPACE 1 00766000
SVCSWIT DS 0D SVC 24 - SWITCH TO MAIN PROCESSOR@V407579 00767000
AIF (NOT &AP).APCHK8 00767900
LA R15,INCRBY1 COUNT OCCURANCES REQUIRING SWITCH@V407579 00768000
AL R15,SVCSWTSS @V407579 00769000
ST R15,SVCSWTSS @V407579 00770000
L R13,PREFIXA ADDRESS THE ABSOLUTE PREFIX @V407579 00771000
L R15,PSACPXBP-PSA(,R13) CPEXBLOK FOR SWITCH @V407579 00772000
USING CPEXBLOK,R15 @V407579 00773000
LTR R15,R15 CHECK FOR NON-RECURSIVE USE @V407579 00774000
BZ ABSVC ABEND HERE FOR ANALYSIS @V407579 00775000
SLR R14,R14 @V407579 00776000
ST R14,PSACPXBP-PSA(,R13) CATCH FUTURE RECURSION @V407579 00777000
STM R0,R11,CPEXREGS SAVE REGS FOR RETURN @V407579 00778000
MVC CPEXR12(4*4),SVCREGS @V407579 00779000
MVC CPEXADD,SVCOPSW+4 ADDR TO RETURN TO SWITCHER @V407579 00780000
DROP R15 @V407579 00781000
LR R3,R15 RETAIN THE STACK BLOCK @V407579 00782000
LA R0,CPEXSIZE OBTAIN REPLACEMENT BLOCK @V407579 00783000
CALL DMKFREE (FREE WILL RETURN ON SAME PROC.) @V407579 00784000
ST R1,PSACPXBP-PSA(,R13) REPLENISH USED BLOCK @V407579 00785000
LR R1,R3 STACK THE SWITCHING REQUEST @V407579 00786000
CALL DMKSTKSW STACK FOR OTHER PROCESSOR @V4M0141 00787000
USING CPEXBLOK,R1 SET UP ADDRESSABILITY @V407510 00788000
OI CPEXTYPE,CPEXLPSW INDICATE CONTROL VIA LPSW @V407510 00789000
DROP R1 @V407510 00790000
B TSTDSP EXIT TO DMKDSPCH/RU @VA09257 00791100
SPACE 1 00792000
.APCHK8 ANOP 00792100
SVCIGNOR LM R12,R15,SVCREGS REFRESH REGS ON ENTRY @V407579 00793000
LPSW SVCOPSW RETURN, AS IF SVC = NO-OP @V407579 00794000
EJECT 00795000
GETFREE8 DS 0H GET SAVE AREA FOR SVC 8 (LINK) 00796000
LA R14,SVCLINKC ESTABLISH RETURN ADDR @V407579 00797000
* 00798000
SVCFR DS 0H GET SAVE AREA FROM FREE STORAGE: 00799000
L R13,ASCRATCH GET ADDRESS OF SCRATCH-AREA 00800000
CL R13,SAVARLIM BEWARE GOING OVER THE LIMIT WE CAN HANDLE 00801000
BNH SVCFR2 WE'RE OK - SAVE GOODIES & CALL DMKFREE. 00802000
*>>>>>>>> 00803000
ABEND 1 WELL, ANYWAY, WE TRIED HARD 00804000
*>>>>>>>> 00805000
SPACE 00806000
* GET A 12-WORD SAVE-AREA FROM REGULAR 'DMKFREE' ENTRY-POINT: 00807000
* (DEPENDENT ON SUCCESSFUL FREE CALL, RETURNING ON SAME PROCESSOR) 00808000
SVCFR2 MVC 0(4*4,R13),SVCREGS SAVE 'SVCREGS' @V407579 00809000
STM R14,R1,16(R13) SAVE R14 THRU R1 00810000
A R13,SAVARLEN INCREMENT POINTER FOR NEXT TIME 00811000
ST R13,ASCRATCH AND STORE 00812000
LA R0,SAVESIZE SAVE AREA SIZE IN DBL WORDS INTO R0 00813000
CALL DMKFREE GET SAVE-AREA FROM FREE STG. @V407579 00814000
LA R14,INCRBY1 COUNT THIS EVENT @V407579 00815000
AL R14,FRECKLES ... @V407579 00816000
ST R14,FRECKLES ... 00817000
* 00818000
SVCFR3 XC 0(SAVESIZE*8,R1),0(R1) CLEAR THE NEW SAVE AREA 00819000
LR R13,R1 SAVE AREA ADDR. 00820000
L R14,ASCRATCH GET ADDRESS OF SCRATCH-AREA 00821000
S R14,SAVARLEN DECREMENT THE POINTER 00822000
ST R14,ASCRATCH AND REPLACE 00823000
MVC SVCREGS(4*4),0(R14) RESTORE 'SVCREGS' @V407579 00824000
LM R14,R1,16(R14) RELOAD R14 THRU R1, AND ... 00825000
BR R14 RETURN TO SVC 8 OR 20 PROCESSING @V407579 00826000
EJECT 00827000
USING VMBLOK,R15 @V202232 00828000
SVCADSTP DC 0H'0' HANDLE SVC X'B3', POSSIBLE ADSTOP@V407579 00829000
STM R0,R11,VMGPRS SAVE USER'S REGISTERS 00830000
MVC VMGPRS+R12*4(4*4),SVCREGS SAVE REGS 12-15 @V407579 00831000
L R13,SVCOPSW+4 GET OLD PSW ADDRESS 00832000
SH R13,INTSVCL AND SUBTRACT LENGTH OF INTERRUPTING INST 00833000
LRA R14,0(,R13) FIND INSTRUCTION IMAGE @V407579 00834000
BNZ TSTRACE NOT A PROPER ADSTOP, REFLECT SVC @V407579 00835000
CLI 0(R14),OPCODEEX DID 'EXECUTE' CAUSE ADSTOP? @V407579 00836000
BNE CKADDR NO .. GO VALIDATE ADSTOP ADDRESS 00837000
MVC VMINST(2),0(R14) SAVE IMAGE OF FIRST HALF @V407579 00838000
LRA R14,2(,R13) @V407579 00839000
BNZ TSTRACE NOT A PROPER ADSTOP, REFLECT SVC @V407579 00840000
MVC VMINST+2(2),0(R14) SAVE IMAGE OF SECOND HALF @V407579 00841000
LA R13,D2MASK GET DISPLACEMENT OF 'EX' OPERAND @V407579 00842000
N R13,VMINST @V407579 00843000
IC R14,VMINST+2 GET BASE .. @V407579 00844000
SRL R14,2 @V407579 00845000
N R14,F60 (F60=X'3C') BASE*4 @V407579 00846000
BZ NOBASE BASE IS ZERO 00847000
L R14,VMGPRS(R14) GET VALUE OF BASE @V407579 00848000
LA R13,0(R14,R13) ADD BASE TO DISPLACEMENT @V407579 00849000
NOBASE IC R14,VMINST+1 GET INDEX .. @V407579 00850000
SLL R14,2 @V407579 00851000
N R14,F60 (F60=X'3C') INDEX*4 @V407579 00852000
BZ CKADDR INDEX IS ZERO @V407579 00853000
L R14,VMGPRS(R14) GET VALUE OF INDEX @V407579 00854000
LA R13,0(R14,R13) ADD INDEX TO BASE+DISPLACEMENT @V407579 00855000
SPACE 00856000
CKADDR L R14,VMADSTOP ADDRESS THE ADSTOP BUFFER @V407579 00857000
LTR R14,R14 IF PRESENT @V407579 00858000
BZ TSTRACE REFLECT, IF NOT @V407579 00859000
USING ADSTBLOK,R14 @V407579 00860000
TM VMESTAT,VMEXTCM TEST FOR EC MODE EXECUTION @V407579 00861000
BZ CKREAL NO, TEST GUEST REAL @VA05407 00862000
TM VMPSW,TRANMODE TRANSLATE MODE? @VA05407 00863000
BZ CKREAL NO, TEST GUEST REAL @VA05407 00864000
LRA R13,0(,R13) FIND REAL ADDR OF SVC X'B3' @V407579 00865000
BNZ TSTRACE REFLECT, IF NOT PRESENT @V407579 00866000
LCTL C0,C0,CPCREG0 RESTORE VIRTUAL MACHINE'S @V407579 00867000
LCTL C1,C1,VMSEG FIRST LEVEL ADDRESS SPACE @V407579 00868000
L R14,ADSTINAD ADSTOP W.R.T. FIRST LEVEL SPACE @V407579 00869000
LRA R14,0(,R14) FIND REAL ADDR OF REQUESTED STOP @V407579 00870000
BNZ TSTRACE REFLECT, IF NOT PRESENT @V407579 00871000
CLR R14,R13 TEST FOR MATCH @V407579 00872000
BNE TSTRACE REFLECT, IF NOT @V407579 00873000
L R14,VMADSTOP REFRESH ADDRESSABILITY @V407579 00874000
B REPLINST REFRESH THE INSTRUCTION IMAGE @V407579 00875000
* 00876000
CKREAL CL R13,ADSTINAD IS THIS THE ADSTOP? @VA05407 00877000
BNE TSTRACE REFLECT, IF NOT @V407579 00878000
LRA R13,0(,R13) FIND REAL ADDR OF SVC X'B3' @V407579 00879000
BNZ TSTRACE REFLECT, IF NOT PRESENT @V407579 00880000
REPLINST MVC 0(2,R13),ADSTINST RESTORE INSTRUCTION IMAGE @V407579 00881000
DROP R14 @V407579 00882000
LR R2,R14 RETAIN ADSTOP BUFFER ADDRESS @V407579 00883000
SLR R14,R14 @V407579 00884000
ST R14,VMADSTOP CLEAR ADSTOP BUFFER POINTER @V407579 00885000
L R13,SVCOPSW+4 BACK UP THE PSW @V407579 00886000
SH R13,INTSVCL @V407579 00887000
AIF (NOT &FLOATPT).NOFP3 00888000
STD Y0,VMFPRS STORE 00889000
STD Y2,VMFPRS+8 FLOATING 00890000
STD Y4,VMFPRS+16 POINT 00891000
STD Y6,VMFPRS+24 REGISTERS 00892000
.NOFP3 ANOP 00893000
ST R13,VMPSW+4 SET VM PSW TO CONTINUE @V407579 00894000
IC R0,SVCOPSW+2 GET CC AND MASK 00895000
TM VMESTAT,VMEXTCM EXTENDED CONTROL MACHINE ?? 00896000
BZ SVCABC NO -- SAVE PSW IN BC MODE FORMAT 00897000
STC R0,VMPSW+2 SAVE EXTENDED SPW 00898000
B *+8 .. 00899000
SVCABC STC R0,VMPSW+4 SAVE CC AND PGM MASK 00900000
OI VMRSTAT,VMEXWAIT MAKE SURE CAN'T GET DISPATCHED 00901000
LR R11,R15 VMBLOK ADDRESS TO R11 00902000
DROP R15 00903000
USING VMBLOK,R11 00904000
BAL R10,OBSLOCK SYSTEM LOCKED CODE BEYOND HERE **@V407579 00905000
* ********************************* 00906000
TM VMESTAT,VMMICSVC USER RQST MICRO HANDLE SVCS?@V201537 00907000
BZ NOMICRO NO, LEAVE SVC BIT SET TO 1 @V201537 00908000
NI VMMCR6,X'FF'-VMMSVC YES, INDICATE MICRO DO SVCS @V201537 00909000
NOMICRO DS 0H @V201537 00910000
LR R1,R2 ADDRESS OF OLD ADSTOP BUFFER @V407579 00911000
LA R0,ADSTBFSZ BUFFER SIZE 00912000
CALL DMKFRET FRET BUFFER 00913000
LA R0,3 GET BUFFER 00914000
CALL DMKFREE ... 00915000
LR R4,R1 SAVE BUFFER ADDRESS 00916000
LR R1,R13 INSTRUCTION ADDRESS TO R1 00917000
N R1,XRIGHT24 AND OFF HIGH BYTE 00918000
CALL DMKCVTBH CONVERT TO HEX 00919000
MVC 0(16,R4),STOPMSG TEXT OF ADSTOP MSG 00920000
STH R0,10(R4) ADDRESS 00921000
ST R1,12(R4) .. 00922000
LA R0,16 SIZE 00923000
LR R1,R4 MSG ADDRESS 00924000
LA R3,3 BUFFER SIZE FOR DFRET 00925000
CALL DMKQCNWT,PARM=NORET+DFRET 00926000
AIF (NOT &TRACE(6)).TRA5 ***AIF*** 00927000
TM VMTRCTL,VMTRBRIN INSTRUCTION TRACING TODAY ? 00928000
BZ SVCACON NOPE - CONTINUE ... 00929000
L R1,VMPSW+4 YES - ADDRESS OF THIS INSTRUCTION 00930000
L R15,VMTREXT REFERENCE TRACE-CONTROL BLOCK 00931000
USING TREXT,R15 00932000
CLC TREXIN1(8),FFS ANYTHING ALREADY SET ? 00933000
BE CALTRCIT NOPE - OK TO CALL DMKTRCIT FORTHWITH. 00934000
DROP R15 AHA - IF SOMETHING THERE, WE MUST... 00935000
CALL DMKTRCPB RESET THE OLD INSTRUCTION(S) FIRST, THEN: 00936000
CALTRCIT CALL DMKTRCIT NOW SET INSTRUCTION TRACING AGAIN 00937000
SVCACON DS 0H 00938000
.TRA5 NI VMRSTAT,255-VMEXWAIT TURN OFF INSTRUCTION-WAIT FLAG 00939000
NI VMPEND,255-VMPERPND IF PER PENDING, IT WILL RECUR LATER 00940000
CALL DMKCFMBK GO TO BREAK ENTRY OF CFM 00941000
GOTO DMKDSPCH GET OUT 00942000
DROP R11 @V407579 00943000
SPACE 2 00944000
STOPMSG DC CL16'ADSTOP AT ......' 00945000
EJECT 00946000
USING VMBLOK,R15 @V200226 00947000
SPACE 00948000
SVCVER EQU * @V200226 00949000
* 00950000
* DO BASIC CHECKS ON PARM REGS FOR VALID SVC 76. 00951000
LTR R1,R1 TEST FOR DOS PARM @V407579 00952000
BM CKDOSR0 BRANCH IF DOS POSSIBILITY @V407579 00953000
BZ TSTRACE IF ZERO, MUST NOT BE RECORDING @V407579 00954000
LTR R0,R0 IF R0 = NEG, MIGHT BE OS,VS, VM @V407579 00955000
BNM TSTRACE IF NOT, GO REFLECT THE SVC @V407579 00956000
LA R13,AVEROS O.WISE POINT TO OS ERROR CAPTURE @V407579 00957000
B SVCVERVM AND SAVE VIRTUAL MACHINE STATE @V407579 00958000
CKDOSR0 LTR R0,R0 IF POSITIVE - MIGHT BE DOS @V407579 00959000
BNP TSTRACE ELSE REFLECT SVC @V407579 00960000
LA R13,AVERDOS POINT TO DOS ERROR CAPTURE @V407579 00961000
* 00962000
SVCVERVM STM R0,R11,VMGPRS SAVE USER REGS @V407579 00963000
MVC VMGPRS+R12*4(4*4),SVCREGS SAVE REGS 12-15 @V407579 00964000
AIF (NOT &FLOATPT).NOFP5 @V200226 00965000
STD Y0,VMFPRS SAVE @V200226 00966000
STD Y2,VMFPRS+8 FLOATING @V200226 00967000
STD Y4,VMFPRS+16 POINT @V200226 00968000
STD Y6,VMFPRS+24 REGS. @V200226 00969000
.NOFP5 ANOP 00970000
LM R4,R5,SVCOPSW PRESERVE PAGE 0 INTERRUPT PSW @V407579 00971000
L R6,INTSVCL AND INTERRUPT ILC/CODE @V407579 00972000
LR R11,R15 USE STANDARD VMBLOK ADDRESSING @V407579 00973000
DROP R15 @V407579 00974000
USING VMBLOK,R11 @V407579 00975000
ST R5,VMPSW+4 UPDATE VIRTUAL PSW @V407579 00976000
TM VMESTAT,VMEXTCM ECMODE? @VA01775 00977000
BZ BCMODE NO, GO CHANGE PSW TO BC @VA01775 00978000
STH R4,VMPSW+2 VIRT. PSW FORMAT = REAL PSW @V407579 00979000
LCTL C0,C0,CPCREG0 RE-ESTABLISH STD. TRANSLATE ARCH.@V407579 00980000
B AX @VA01775 00981000
BCMODE EQU * CHANGE PSW TO BC MODE BEFORE @VA01775 00982000
LR R3,R6 OPERATE ON ILC @V407579 00983000
SRL R3,3 MOVE TO BITS 16-17 @V407579 00984000
OR R3,R4 ADD CC AND PGM MASK @V407579 00985000
STCM R3,B'0010',VMPSW+4 PROPER PLACE FOR BC DATA @V407579 00986000
AX EQU * @VA01775 00987000
OI VMRSTAT,VMEXWAIT PUT IN WAIT @V200226 00988000
LR R3,R1 SAVE ADDRESS OF RECORD @V4M0012 00989000
LR R7,R0 2'S COMPLEMENT OF REC LENGTH @V4M0012 00990000
BAL R10,OBSLOCK SYSTEM LOCKED CODE BEYOND HERE **@V407579 00991000
* ********************************* 00992000
LR R1,R3 RESTORE R1 @V4M0012 00993000
LR R0,R7 RESTORE R0 @V4M0012 00994000
VERCALL L R15,0(,R13) ADDRESS THE PROPER RECORDING CODE@V407579 00995000
CALL (15) GO TO DMKVER TO PROCESS FURTHER @V200226 00996000
* 00997000
* A RETURN FROM DMKVER MEANS THAT SOMETHING INVALID WAS 00998000
* FOUND SO MUST REFLECT THE SVC TO THE USER 00999000
* 01000000
LCTL C1,C1,VMSEG INSURE CONTROL REG IS CORRECT @V200226 01001000
B REFSVCC GO REFLECT IT @VA01775 01002000
EJECT 01003000
AVEROS DC A(DMKVERO) ENTRY TO OS ERROR RECORD CAPTURE@V407579 01004000
AVERDOS DC A(DMKVERD) ENTRY TO DOS ERROR RECORD CAPTURE@V407579 01005000
* 01006000
ASCRATCH DC A(SVCRFRST) POINTER TO <FIRST> SCRATCH-AREA (VARIES) 01007000
SAVARLIM DC A(SVCRLAST) LIMIT = POINTER TO LAST SCRATCH-AREA 01008000
* 01009000
* AT LEAST TWO "SCRATCH" SAVE-AREAS TO SAVE SVCREGS & R14 THRU R1 01010000
* (NEEDED FOR CALLING DMKFREE FOR SAVE-AREA FOR SVC 8 & SVC 20) 01011000
* NOTE: ADD MORE BETWEEN "SVCRFRST" & "SVCRLAST" AS NEEDED 01012000
SVCRFRST DS 4D FIRST SAVE-AREA FOR SVCREGS & R14 THRU R1 01013000
DS 4D ANOTHER 01014000
SVCRLAST DS 4D LAST SAVE-AREA FOR SVCREGS & R14 THRU R1 01015000
SPACE 01016000
FRTSAV DS 3D SAVE PSW, R14-1 OVER FRET CALL @V407579 01017000
FRECKLES DC F'0' NO. OF CALLS TO DMKFREE FOR SAVE-AREAS 01018000
DYNFRET DC F'0' NO OF CALLS TO DMKFRET FOR SAVE-AREAS 01019000
SVCSWTSS DC F'0' COUNT OF ACTUAL SWITCHES OCCURRED@V407579 01020000
* 01021000
SVCRAFCT DC F'0' COUNT OF AFFINITY RETURNS ISSUED @V407579 01022000
SVCRAFSS DC F'0' COUNT OF AFFINITY RETURNS SWITCHD@V407579 01023000
* (IN DYNAMIC PAGING AREA ON AN EXIT) 01024000
SPACE 01025000
SAVARLEN DC F'32' LENGTH OF ONE SCRATCH-AREA 01026000
SPACE 3 01027000
* THE FOLLOWING 16-BYTE DATA LIST MUST BE KEPT CONTIGUOUS AND IN ORDER 01028000
* BECAUSE IT IS USED BY THE CP ASSIST INSTRUCTIONS "LINK" AND "RETURN". 01029000
SPACE 01030000
SVCLIST DS 0F @V3M4026 01031000
NEXTSAVE DC A(0) +0 PTR TO NEXT AVAIL. SAVE AREA @V3M4026 01032000
AIF (NOT &VIRREAL).NOVR4 @VA05876 01033000
SLCADDR DC A(DMKSLC) +4 A(END OF V=R STORAGE OR ZERO) @V3M4026 01034000
AIF (&VIRREAL).VR4 @VA05876 01035000
.NOVR4 ANOP 01036000
SLCADDR DC A(0) +4 (ZERO FOR NON-VIRTUAL=REAL) @VA05876 01037000
.VR4 ANOP 01038000
DMKSVCHI DC A(0) +8 "DMKFREHI" @V407579 01039000
DMKSVCLO DC A(0) +12 "DMKFRELO" MINUS L'SAVEAREA @V407579 01040000
DMKSVCNS EQU NEXTSAVE (EXTERNALLY-REFERENCED NAME) @V407579 01041000
ADDR EQU 4 DISPLACEMENT OF ADDRESS IN PSW @V4M0126 01042000
EJECT 01043000
LTORG 01044000
SPACE 3 01045000
ADSTBLOK DSECT 01046000
ADSTINAD DS 1F ANSTRUCTION ADDRESS 01047000
ADSTINST DS 1F INSTRUCTION 01048000
ADSTFLAG DS 1H FLAG AREA 01049000
DS 0D 01050000
ADSTBFSZ EQU (*-ADSTBLOK)/8 BUFFER SIZE IN DOUBLE WORDS 01051000
SPACE 3 01052000
TRACETBL DSECT , LAYOUT OF SYSTEM TRACE ENTRIES @V407579 01053000
TRACETYP DS X TRACE TYPE (INCL. PROCESSOR) @V407579 01054000
TRACEADR DS AL3 ADDRESS POINTER @V407579 01055000
TRACECOD DS F INTERRUPT CODE @V407579 01056000
TRACEPSW DS D OLD PSW @V407579 01057000
TRACELNG EQU *-TRACETBL ENTRY LENGTH @V407579 01058000
EJECT 01059000
COPY EQU 01060000
PSA , @V407579 01061000
ORG SVCREGS DEFINE REGS FOR EASE OF REFERENCE@V407579 01062000
SVCR12 DS F @V407579 01063000
SVCR13 DS F @V407579 01064000
SVCR14 DS F @V407579 01065000
SVCR15 DS F @V407579 01066000
ORG , @V407579 01067000
COPY SAVE 01068000
COPY VMBLOK 01069000
COPY TREXT 01070000
END DMKSVC @V407579 01071000