ibm:vm370-lib:cp:dmkprv.assemble_src
Table of Contents
DMKPRV Source
References
- Fixes Applied : 9
- This Source Date : Thursday, December 14, 1978
- Last Fix ID : [HRC013DK]
Source Listing
- DMKPRV.ASSEMBLE.txt
- PRV TITLE 'DMKPRV (CP) VM/370 - RELEASE 6' 00001000
- ISEQ 73,80 00002000
- COPY OPTIONS 00003000
- COPY LOCAL 00004000
- *. 00005000
- * MODULE NAME - 00006000
- * 00007000
- * DMKPRV 00008000
- * 00009000
- * CONTENTS - 00010000
- * 00011000
- * DMKPRVLG - 00012000
- *. 00013000
- SPACE 4 00014000
- DMKPRV START 00015000
- ENTRY DMKPRVLG @V202232 00016000
- SPACE 00017000
- ENTRY DMKPRVNC NO. OF CALLS TO DMKPRVLG @V2B2638 00018000
- ENTRY DMKPRVEK INST COUNT FOR X'08' SSK @V2B2638 00019000
- ENTRY DMKPRVIK INST COUNT FOR X'09' ISK @V2B2638 00020000
- ENTRY DMKPRVMS INST COUNT FOR X'80' SSM @V2B2638 00021000
- ENTRY DMKPRVLP INST COUNT FOR X'82' LPSW @V2B2638 00022000
- ENTRY DMKPRVDI INST COUNT FOR X'83' DIAG @V2B2638 00023000
- ENTRY DMKPRVMN INST COUNT FOR X'AC' STNSM @V2B2638 00024000
- ENTRY DMKPRVMO INST COUNT FOR X'AD' STOSM @V2B2638 00025000
- ENTRY DMKPRVLR INST COUNT FOR X'B1' LRA @V2B2638 00026000
- ENTRY DMKPRVCP INST COUNT FOR X'B202' STIDP @V2B2638 00027000
- ENTRY DMKPRVCH INST COUNT FOR X'B203' STIDC @V2B2638 00028000
- ENTRY DMKPRVTE INST COUNT FOR X'B204' SCK @V2B2638 00029000
- ENTRY DMKPRVCE INST COUNT FOR X'B206' SCKC @V2B2638 00030000
- ENTRY DMKPRVCT INST COUNT FOR X'B207' STCKC @V2B2638 00031000
- ENTRY DMKPRVPE INST COUNT FOR X'B208' SPT @V2B2638 00032000
- ENTRY DMKPRVPT INST COUNT FOR X'B209' STPT @V2B2638 00033000
- ENTRY DMKPRVEP INST COUNT FOR X'B20A' SPKA @V2B2638 00034000
- ENTRY DMKPRVIP INST COUNT FOR X'B20B' IPK @V2B2638 00035000
- ENTRY DMKPRVPB INST COUNT FOR X'B20D' PTLB @V2B2638 00036000
- ENTRY DMKPRVRR INST COUNT FOR X'B213' RRB @V2B2638 00037000
- ENTRY DMKPRVTC INST COUNT FOR X'B6' STCTL @V2B2638 00038000
- ENTRY DMKPRVLC INST COUNT FOR X'B7' LCTL @V2B2638 00039000
- ENTRY DMKPRVCS INST COUNT FOR X'BA' CS @V2B2638 00040000
- ENTRY DMKPRVCD INST COUNT FOR X'BB' CDS @V2B2638 00041000
- ENTRY DMKPRVMA ADDRESS OF EXPANDED VMA LIST @V3M4026 00042000
- ENTRY DMKPRVVP COUNT FOR SPT'S BY EVMA @V3M4026 00043000
- ENTRY DMKPRVVC COUNT FOR SCKC'S BY EVMA @V3M4026 00044000
- ENTRY DMKPRVVL COUNT FOR LPSW'S BY EVMA @V3M4026 00045000
- ENTRY DMKPRVVS COUNT FOR SIO/SIOF'S BY EVMA @V3M4026 00046000
- ENTRY DMKPRVVM COUNT FOR SSM/STXSM'S BY EVMA @V3M4026 00047000
- EXTRN DMKDSPA,DMKDSPB 00048000
- EXTRN DMKVSIEX,DMKPRGSM @VA05037 00049000
- EXTRN DMKHVCAL,DMKTMRTN 00050000
- EXTRN DMKPERIL 00051000
- AIF (NOT &TRACE(6)).NTR1 **AIF** 00052000
- EXTRN DMKTRCPV,DMKTRCPB 00053000
- .NTR1 ANOP 00054000
- EXTRN DMKPSAFP CHECK FOR FETCH PROTECTION @V202232 00055000
- EXTRN DMKPSASP CHECK FOR STORAGE PROTECTION @V202232 00056000
- EXTRN DMKSCNVU RETURNS VCHBLOK,VCUBLOK,VDEVBLOK.@VMD0103 00057000
- EXTRN DMKVATAB 00058000
- EXTRN DMKVATRN,DMKVATLA 00059000
- EXTRN DMKVATEX 00060000
- EJECT 00061000
- EXTRN DMKSTKDE TO STACK/DEFER @V407593 00062000
- AIF (NOT &AP).DSPRU4 00063000
- EXTRN DMKDSPRU DISP ON OTHER PROCESSOR @V407593 00064000
- EXTRN DMKLOKSY GLOBAL SYSTEM LOCK @V407508 00065000
- .DSPRU4 ANOP 00066000
- *. 00067000
- * SUBROUTINE NAME - 00068000
- * 00069000
- * DMKPRVLG - 00070000
- * 00071000
- * FUNCTION - 00072000
- * 00073000
- * TO PERFORM THE SIMULATION OF A PRIVILEGED OPERATION. 00074000
- * 00075000
- * ATTRIBUTES - 00076000
- * 00077000
- * REENTRANT, RESIDENT, ENTERED VIA GOTO FROM DMKPRGIN 00078000
- * 00079000
- * ENTRY POINTS - 00080000
- * 00081000
- * DMKPRVLG 00082000
- * 00083000
- * ENTRY CONDITIONS - 00084000
- * 00085000
- * GPR 12 = ADDRESS OF DMKPRVLG 00086000
- * 00087000
- * EXIT CONDITIONS - 00088000
- * 00089000
- * THE PRIVILEGED INSTRUCTION HAS BEEN SIMULATED; 00090000
- * CONTROL RETURNS TO THE USER VIA DMKDSPCH OR DMKDSPA. 00091000
- * 00092000
- * CALLS TO OTHER ROUTINES - 00093000
- * 00094000
- * DMKPTRAN - TO HANDLE PAGING EXCEPTIONS 00095000
- * DMKDSPCH - TO RE-DISPATCH VIRTUAL MACHINE WHEN POSSIBLE 00096000
- * DMKDSPA - FOR IMMEDIATE RE-DISPATCH OF VIRTUAL MACHINE 00097000
- * DMKDSPB - FOR VALIDATION OF A NEW VIRTUAL PSW AND 00098000
- * SUBSEQUENT RE-DISPATCH OF THE VIRTUAL MACHINE 00099000
- * DMKVSIEX - TO PROCESS VIRTUAL I/O INSTRUCTIONS 00100000
- * DMKHVCAL - TO PROCESS HYPERVISOR CALL INSTRUCTION 00101000
- * DMKTMRTN - TO PROCESS CLOCK AND TIMER INSTRUCTIONS 00102000
- * DMKPRGSM - TO REFLECT A PROG. INT. TO VIRT-MACH 00103000
- * DMKTRCPV - TO TRACE VIRTUAL PRIVILEGED INSTRUCTIONS 00104000
- * DMKVATAB - TO INVALIDATE SHADOW PAGE TABLES 00105000
- * DMKVATRN - TO TRANSLATE VIRTUAL-VIRTUAL ADDRESSES TO REAL 00106000
- * DMKVATLA - TO TRANSLATE VIRTUAL-VIRTUAL ADDRESS TO VIRTUAL 00107000
- * DMKVATEX - TO SIMULATE A RELOCATION INTERRUPT 00108000
- * DMKPSAFP - TO CHECK FOR FETCH PROTECTION 00109000
- * DMKPSASP - TO CHECK FOR STORAGE PROTECTION 00110000
- * DMKSCNVU - FROM UNIT ADDR IT RETURNS VCHBLOK,VCUBLOK,VDEVBLOK. 00111000
- * 00112000
- * EXTERNAL REFERENCES - 00113000
- * 00114000
- * NONE 00115000
- * 00116000
- * TABLES / WORK AREAS - 00117000
- * 00118000
- * NONE 00119000
- * 00120000
- EJECT 00121000
- * REGISTER USAGE - 00122000
- * 00123000
- * GPR 12 = BASE REGISTER 00124000
- * GPR 13 = SECOND BASE REGISTER @VMD0133 00125000
- * GPR 11 = VMBLOK ADDRESSABILITY 00126000
- * GPR 10 = ECBLOK ADDRESSABILITY 00127000
- * GPRS 8,9 INTERNAL LINK REGISTERS 00128000
- * GPRS 0-7, 14-15 ARE WORK REGISTERS @VMD0133 00129000
- * 00130000
- * NOTES - 00131000
- * 00132000
- * FOR CERTAIN PRIVILEGED INSTRUCTIONS, THE VIRTUAL MACHINE MUST 00133000
- * HAVE THE EC-MODE OPTION (THAT IS, VMV370R FLAGBIT IN VMPSTAT 00134000
- * MUST = 1) - OTHERWISE AN OPERATION EXCEPTION IS REFLECTED. 00135000
- * THESE INCLUDE: LRA, PTLB, RRB, STNSM, AND STOSM. 00136000
- * 00137000
- * 'RDD' AND 'WRD' ARE HANDLED AS INVALID OPERATIONS AND 00138000
- * AN OPERATION EXCEPTION PROGRAM INTERRUPT IS SIMULATED. 00139000
- * 00140000
- * ALL SIMULATED PROGRAM INTERRUPTS ARE REFLECTED TO THE 00141000
- * VIRTUAL MACHINE VIA GOTO TO DMKPRGSM, EXCEPT AS EXPLICITLY 00142000
- * STATED IN THE SECTION BELOW. 00143000
- * 00144000
- * OPERATION - 00145000
- * 00146000
- * FOR ALL INSTRUCTIONS WHICH ARE SIMULATED, ISSUE A MONITOR 00147000
- * CALL CLASS 5 CODE 0 TO COLLECT SIMULATION DATA (IF ACTIVELY 00148000
- * ENABLED). 00149000
- * 00150000
- * IF THE INTERRUPTING INSTRUCTION IS A DIAGNOSE (X'83'), 00151000
- * DMKHVCAL IS INVOKED TO PERFORM THE SIMULATION. 00152000
- * 00153000
- * IF THE INTERRUPT IS AN INVALID OPERATION CODE, THE 00154000
- * PROGRAM INTERRUPT IS REFLECTED TO THE VIRTUAL MACHINE. 00155000
- * 00156000
- * IF THE PRIVILEGED OPERATION IS AN INPUT-OUTPUT REQUEST, 00157000
- * DMKPRVLG INVOKES THE VIRTUAL MACHINE I/O EXECUTIVE 00158000
- * PROGRAM, DMKVSIEX. 00159000
- * 00160000
- * IF THE VIRTUAL MACHINE HAS REQUESTED TRACING OF NON-I/O 00161000
- * PRIVILEGED INSTRUCTIONS, DMKTRCPV IS CALLED TO PERFORM 00162000
- * THE TRACING FUNCTION. 00163000
- * 00164000
- * IF THE PRIVILEGED INSTRUCTION IS ANY OF THE CLOCK 00165000
- * OR TIMER INSTRUCTIONS (I.E. SCK, SCKC, STCKC, SPT, STPT), 00166000
- * DMKTMRTN IS INVOKED TO PERFORM THE INSTRUCTION SIMULATION 00167000
- * AND CLOCK-QUEUE MAINTENANCE. 00168000
- * 00169000
- * FOR UNRECOGNIZABLE PRIVILEGED OPERATIONS, DMKPRVLG WILL 00170000
- * SIMULATE AN OPERATION EXCEPTION PROGRAM INTERRUPT. 00171000
- * 00172000
- EJECT 00173000
- * IF THE PRIVILEGED OPERATION IS NONE OF THE ABOVE, SIMULATION 00174000
- * PROCEEDS WITHIN DMKPRVLG, AS FOLLOWS: 00175000
- * 00176000
- * SSM - A CHECK IS MADE TO DETERMINE IF BIT 1 OF VIRTUAL 00177000
- * CONTROL REGISTER ZERO (SSM SUPPRESSION FEATURE) IS SET 00178000
- * TO ONE, AND IF SO A PROGRAM INTERRUPT CODE X'13' IS 00179000
- * SIMULATED FOR THE VIRTUAL MACHINE. OTHERWISE, THE NEW 00180000
- * SYSTEM MASK IS INSERTED IN THE VIRTUAL PSW. 00181000
- * 00182000
- * STNSM, STOSM - THE CURRENT VIRTUAL SYSTEM MASK IS STORED 00183000
- * IN THE SPECIFIED VIRTUAL STORAGE LOCATION AND THEN ALTERED 00184000
- * WITH THE IMMEDIATE BYTE OF THE INSTRUCTION. 00185000
- * 00186000
- * LPSW - THE ADDRESS SPECIFIED IS CHECKED FOR BOUNDARY ALIGNMENT 00187000
- * AND A SPECIFICATION EXCEPTION IS REFLECTED IF INCORRECT. 00188000
- * THE NEW PSW IS MOVED INTO THE VIRTUAL PSW. 00189000
- * 00190000
- * EXECUTE - THE INSTRUCTION POINTED TO BY THE INTERRUPTING 00191000
- * INSTRUCTION IS SUBSTITUTED FOR THE EXECUTE INSTRUCTION, 00192000
- * WITH THE SECOND BYTE OF THE NEW INSTRUCTION MODIFIED BY THE 00193000
- * LOW-ORDER BYTE OF THE REGISTER SPECIFIED IN THE EXECUTE, 00194000
- * UNLESS THE REGISTER SPECIFIED IS REGISTER ZERO. THE 00195000
- * NEW INSTRUCTION IS DECODED FOR SIMULATION. 00196000
- * 00197000
- * STIDP - THE ADDRESS SPECIFIED IS CHECKED FOR BOUNDARY 00198000
- * ALIGNMENT AND A SPECIFICATION EXCEPTION IS SIMULATED IF 00199000
- * IT IS INCORRECT. A REAL 'STIDP' IS PERFORMED INTO THE 00200000
- * SPECIFIED VIRTUAL STORAGE LOCATION AND THE CPU MODEL 00201000
- * NUMBER FIELD IS MODIFIED BY X'F000' TO INDICATE THAT 00202000
- * IT IS A VIRTUAL CPU. 00203000
- * 00204000
- * LCTL, STCTL OPERATE NORMALLY ON VIRTUAL CONTROL REGISTER 0 00205000
- * AND ON BIT 2 (I/O EXTENDED LOGOUT MASK) OF CONTROL REGISTER 14 00206000
- * FOR ALL VIRTUAL MACHINES. ANY REFERENCE TO THE OTHER 00207000
- * CONTROL REGISTERS IS IGNORED UNLESS THE VIRTUAL MACHINE 00208000
- * IS ALLOWED THE EXTENDED-CONTROL FEATURE. A FULL SET 00209000
- * OF SIXTEEN CONTROL REGISTERS IS MAINTAINED FOR VIRTUAL 00210000
- * EXTENDED-CONTROL MACHINES, SUCH THAT ANY OF THEM MAY BE 00211000
- * LOADED AND STORED BY THE VIRTUAL MACHINE. CURRENTLY ONLY 00212000
- * CONTROL REGISTERS 0, 1, 2, 3 ARE EXAMINED BY THE 00213000
- * CONTROL PROGRAM. (BIT 2 OF C-REG 14 IS EXAMINED, BUT A 00214000
- * SEPARATE COPY OF THAT BIT IS KEPT IN THE VMBLOK AND ONLY THAT 00215000
- * COPY IS EXAMINED.) FLAGS ARE SET IN THE VMBLOK IF EITHER 00216000
- * CONTROL REGISTER 0 OR 1 IS LOADED, TO PERMIT VIRTUAL 00217000
- * ADDRESS TRANSLATION TABLE MAINTENANCE BY DMKVATAB. 00218000
- * 00219000
- * ISK - IF THE VIRTUAL PAGE REFERENCED IS IN REAL CORE, 00220000
- * AN 'ISK' IS PERFORMED ON THE REAL STORAGE BLOCK, THE 00221000
- * REAL KEY IS OR'ED WITH THE VIRTUAL KEY IN THE SWAP- 00222000
- * TABLE ENTRY AND IS PLACED IN THE SPECIFIED REGISTER. 00223000
- * IF THE VIRTUAL PAGE IS NOT IN CORE, THE KEY IS EXTRACTED 00224000
- * FROM THE SWAP-TABLE ENTRY FOR THE PAGE AND RETURNED TO THE 00225000
- * VIRTUAL MACHINE IN THE REGISTER SPECIFIED. 00226000
- * FOR EXTENDED-CONTROL VIRTUAL MACHINES, A FULL SEVEN-BIT KEY 00227000
- * IS RETURNED, OTHERWISE ONLY 5 BITS ARE RETURNED. 00228000
- * 00229000
- EJECT 00230000
- * SSK - IF THE VIRTUAL PAGE IS IN REAL CORE, AN ISK IS 00231000
- * PERFORMED ON THE REAL STORAGE BLOCK REFERENCED, THE REAL 00232000
- * REFERENCE AND CHANGE BITS ARE STORED IN THE BACKUP BITS 00233000
- * IN THE SWAP-TABLE ENTRY FOR THE VIRTUAL PAGE REFERENCED, 00234000
- * THE NEW STORAGE KEY IS STORED IN THE SWAP-TABLE ENTRY 00235000
- * WITH THE REFERENCE AND CHANGE BITS ZERO IF THE VIRTUAL 00236000
- * MACHINE IS NOT ALLOWED THE EXTENDED-CONTROL FEATURE, OR 00237000
- * UNCHANGED IF THE FEATURE IS ALLOWED, AND THE REAL STORAGE 00238000
- * KEY IS SET WITH THE HIGH-ORDER FOUR BITS OF THE NEW KEY 00239000
- * AND THE FETCH-PROTECT, REFERENCE, AND CHANGE BITS ZERO. 00240000
- * IF THE VIRTUAL PAGE IS NOT IN REAL CORE, THE NEW KEY IS 00241000
- * STORED IN THE SWAP-TABLE ENTRY FOR THAT PAGE. 00242000
- * 00243000
- * THE FOLLOWING INSTRUCTIONS ARE EXTENDED-CONTROL-MODE INSTRUCTIONS 00244000
- * AND WILL CAUSE AN OPERATION EXCEPTION TO BE REFLECTED TO THE 00245000
- * VIRTUAL MACHINE UNLESS THE MACHINE IS ALLOWED THE EXTENDED- 00246000
- * CONTROL FEATURE. OPERATION OF THE INSTRUCTIONS IN BC-MODE 00247000
- * MAY OR MAY NOT BE THE SAME AS IN EC-MODE, DEPENDING ON THE 00248000
- * PARTICULAR INSTRUCTION. 00249000
- * 00250000
- * LRA - A CALL IS MADE TO DMKVATLA TO TRANSLATE THE THIRD- 00251000
- * LEVEL ADDRESS INTO A SECOND-LEVEL ADDRESS, AND THE 00252000
- * CONDITION CODE AND REGISTER VALUES ARE SET ACCORDING TO 00253000
- * RETURN CODES FROM DMKVATLA. 00254000
- * 00255000
- * PTLB - THE VIRTUAL ADDRESS TRANSLATION SHADOW TABLES ARE 00256000
- * MARKED INVALID VIA A CALL TO DMKVATAB. 00257000
- * 00258000
- * RRB - IF THE VIRTUAL PAGE IS NOT IN REAL CORE, THE VIRTUAL 00259000
- * REFERENCE BIT IN THE SWAP-TABLE ENTRY IS SET ZERO AND THE 00260000
- * CONDITION CODE SET TO INDICATE THE INITIAL STATUS OF THE 00261000
- * VIRTUAL REFERENCE AND CHANGE BITS. IF THE VIRTUAL PAGE IS 00262000
- * IN REAL CORE, AN ISK IS PERFORMED ON THE REAL STORAGE BLOCK, 00263000
- * THE REAL REFERENCE AND CHANGE BITS ARE STORED IN THE BACKUP 00264000
- * BITS OF THE SWAP-TABLE ENTRY AND THE CONDITION CODE 00265000
- * IS SET TO INDICATE THE STATUS OF THE REAL REFERENCE AND 00266000
- * CHANGE BITS OR'ED WITH THE VIRTUAL REFERENCE AND CHANGE 00267000
- * BITS. THE REAL REFERENCE AND CHANGE BITS ARE RESET TO ZERO 00268000
- * VIA AN SSK, AND THE VIRTUAL REFERENCE BIT IS RESET TO ZERO. 00269000
- * 00270000
- * THE FOLLOWING INSTRUCTIONS ARE SIMULATED. IPK AND SPKA ARE 00271000
- * PRIVILEDGED INSTRUCTIONS WHILE CS AND CDS ARE 00272000
- * NON-PRIVLEDGED INSTRUCTIONS. THE CS AND CDS 00273000
- * INSTRUCTION SIMULATION TAKES PLACE ONLY ON THOSE 00274000
- * CPU'S NOT EQUIPED WITH THE HARDWARE CONDITIONAL- 00275000
- * SWAPPING FEATURE. 00276000
- * 00277000
- * SPKA - A BRANCH IS MADE TO ROUTINE 'INSTADR' TO OBTAIN BASE 00278000
- * PLUS DISPLACEMENT. UPON RETURN THE NEW STORAGE KEY IS STORED 00279000
- * IN THE VIRTUAL PSW AND EXIT IS MADE VIA "FASTER" FOR FAST 00280000
- * REFLECT BACK TO THE DISPATCHER. 00281000
- * 00282000
- * IPK - THE STORAGE KEY IS EXTRACTED FROM THE VIRTUAL PSW AND 00283000
- * STORED AS PER SPECIFICATIONS IN GENERAL PURPOSE REGISTER 2. 00284000
- * 00285000
- * CS AND CDS - THE FIRST AND THIRD OPERANDS ARE CHECK FOR PROPER 00286000
- * REGISTER SPECIFICATION AND THE SECOND OPERAND IS CHECKED 00287000
- * FOR PROPER BOUNDARY ALIGNMENT. A SPECIFICATION EXCEPTION IS 00288000
- * REFLECTED IF INCORRECT. DEPENDING ON THE RESULTS OF THE 00289000
- * COMPARE, EITHER FETCH PROTECTION OR STORAGE PROTECTION IS 00290000
- * CHECKED FOR THE SECOND OPERAND. IF IT IS INCORRECT, A 00291000
- * STORAGE PROTECTION CHECK IS REFLECTED TO THE VIRTUAL 00292000
- * MACHINE. IF NO ERRORS ARE FOUND, THE SWAP TAKES PLACE 00293000
- * BETWEEN THE OPERANDS, DEPENDING UPON THE COMPARE. 00294000
- * 00295000
- * THE NORMAL OPERATION OF THE INSTRUCTIONS SIMULATED, WHILE 00296000
- * INCLUDED IN THE ABOVE INFORMATION, SHOULD BE VERIFIED 00297000
- * BY REFERENCE TO THE SYSTEM/360 AND SYSTEM/370 PRINCIPLES 00298000
- * OF OPERATION, FORMS GA22-6821 AND GA22-7000, RESPECTIVELY. 00299000
- * 00300000
- EJECT 00301000
- * FOR ALL INSTRUCTIONS WHICH REFERENCE DATA AREAS IN VIRTUAL 00302000
- * STORAGE (I.E. SSM, STNSM, STOSM, LPSW, EX, STIDP, STIDC, 00303000
- * LCTL, STCTL, CS, CDS), THE ADDRESS GENERATED FROM THE 00304000
- * INSTRUCTION IS EXAMINED FOR VALIDITY AND AN ADDRESSING 00305000
- * EXCEPTION IS SIMULATED IF THE ADDRESS IS OUTSIDE OF VIRTUAL 00306000
- * STORAGE. IF THE INSTRUCTION WAS EXECUTED BY AN ECMODE MACHINE 00307000
- * RUNNING IN VIRTUAL TRANSLATE MODE, DMKVATRN IS CALLED TO 00308000
- * TRANSLATE THE THIRD-LEVEL ADDRESS TO A FIRST-LEVEL ADDRESS. 00309000
- * PAGE, SEGMENT, OR TRANSLATION EXCEPTIONS ARE REFLECTED 00310000
- * TO THE VIRTUAL MACHINE IF THERE IS AN ERROR RETURN FROM 00311000
- * DMKVATRN. IN THE SPECIFIC CASES OF 'ISK', 'SSK', AND 'RRB', 00312000
- * SECOND-LEVEL ADDRESSES ARE REQUIRED EVEN IF THE INSTR- 00313000
- * UCTION IS EXECUTED FROM THIRD-LEVEL STORAGE, SUCH THAT NO 00314000
- * CALL TO DMKVATRN IS REQUIRED. 00315000
- * 00316000
- * VIRTUAL STORAGE PROTECTION KEYS ARE EXAMINED BY DMKPSASP 00317000
- * FOR ANY INSTRUCTIONS WHICH MODIFY VIRTUAL STORAGE (I.E. 00318000
- * STNSM, STOSM, STIDP, STIDC, STCTL, CS, CDS). A PROTECTION 00319000
- * EXCEPTION IS SIMULATED FOR THE FIRTUAL MACHINE IF THE KEYS 00320000
- * DISAGREE. 00321000
- * 00322000
- * SIMILARLY, FOR PRIV OPS FOR WHICH FETCH PROTECTION APPLIES, 00323000
- * (VIZ. SSM, LCTL, CS, & CDS), DMKPSAFP IS CALLED TO CHECK 00324000
- * THE VIRTUAL STORAGE KEY (INCLUDING THE FETCH PROTECT BIT); IF 00325000
- * THE FETCH PROTECT BIT IS SET AND THE KEYS DISAGREE, A 00326000
- * PROTECTION EXCEPTION IS SIMULATED. 00327000
- * 00328000
- * RE-DISPATCH OF THE VIRTUAL MACHINE WHEN INSTRUCTION SIMULATION 00329000
- * IS COMPLETE IS PERFORMED VIA GOTO TO EITHER DMKDSPCH OR 00330000
- * DMKDSPA ('FAST REFLECT'). ALL PRIVILEGED INSTRUCTIONS ARE 00331000
- * 'ELIGIBLE' FOR FAST REFLECT UNDER THE FOLLOWING CONDITIONS: 00332000
- * (1) DMKPTRAN HAS NOT BEEN CALLED DURING SIMULATION. 00333000
- * (2) VIRTUAL C-REGS 0,1,2,3 HAVE NOT CHANGED (ECMODE ONLY) 00334000
- * (3) PSW SYSTEM MASK, EC-MODE BIT, WAIT-STATE BIT HAVE 00335000
- * NOT CHANGED. 00336000
- * 00337000
- *. 00338000
- EJECT 00339000
- *---------------------------------------------------------------------* 00340000
- * * 00341000
- * SIMULATE PRIVILEGED OPERATIONS FOR VIRTUAL MACHINES * 00342000
- * * 00343000
- *---------------------------------------------------------------------* 00344000
- *. 00345000
- *********************************************************************** 00346000
- * 00347000
- * 00348000
- * EXPANDED VMA PARTIAL INSTRUCTION EMULATION FUNCTION: 00349000
- * 00350000
- * INVOKED BY THESE INSTRUCTIONS WHEN EXECUTED IN PROBLEM STATE 00351000
- * WITH CONTROL REGISTER 6 BYTE 0 SET TO THE SPECIFIED VALUE: 00352000
- * LPSW, SIO, SIOF, SSM - B'10XXXX1X' (X = 0 OR 1) 00353000
- * SCKC, SPT, STNSM, STOSM - B'10X0XX1X' (X = 0 OR 1) 00354000
- * AND THE APPROPRIATE INDIVIDUAL CONTROLS IN THE ASSIST 00355000
- * CONTROL WORD (OFFSET X'14' INTO MICBLOK) SET TO 1: 00356000
- * BIT 0 LPSW BIT 2 SCKC/SPT 00357000
- * BIT 3 SIO/SIOF BIT 4 SSM/STNSM/STOSM 00358000
- * 00359000
- * REGISTER INPUT: 00360000
- * CR 6 = BITS 0-7 ARE THE ASSIST FLAGS; BITS 8-28 ADDRESS 00361000
- * THE MICBLOK (THE VIRTUAL MACHINE POINTER LIST) 00362000
- * 00363000
- * SYSTEM DATA AREAS REFERENCED (BY MODULE WHERE APPLICABLE): 00364000
- * DMKPRV - 'DMKPRVMA' (EQUALS 'VMALIST') 00365000
- * DMKPSA - 'AVMALIST', 'PRNPSW', CPCREGS, TIMER FIELDS, 00366000
- * TRACING INFORMATION, 'CPSTATUS', 'PROPSW' 00367000
- * MICBLOK, VCHBLOK, VCUBLOK, VDEVBLOK, VMBLOK 00368000
- * 00369000
- * 00370000
- * EXIT TO 'DMKDSPB' OR 'DMKDSPCH' (IF LPSW, SSM, STNSM, STOSM) 00371000
- * NOTE: THE CONTENT OF ANY UNSPECIFIED GPR IS UNPREDICTABLE 00372000
- * REGISTER OUTPUT: 00373000
- * CR 0 = VALUE FROM 'CPCREG0' 00374000
- * CR 8 = VALUE FROM 'CPCREG8' 00375000
- * GPR 11 = X'A8' LESS THAN 'MICVPSW' (ADDRESS OF VMBLOK) 00376000
- * GPR 12 = ADDRESS OF 'DMKDSPB' OR 'DMKDSPCH' 00377000
- * 00378000
- * SEE DMKTMR FOR MORE INFORMATION ON THE EMULATION DONE FOR 00379000
- * INSTRUCTIONS SCKC AND SPT, SEE DMKVSI FOR SIO AND SIOF... 00380000
- * 00381000
- *********************************************************************** 00382000
- *. 00383000
- SPACE 00384000
- DMKPRVLG EQU * ENTRY FROM 'DMKPRGIN' %V3M4038 00385000
- USING PSA,R0 %V3M4038 00386000
- USING VMBLOK,R11 %V3M4038 00387000
- USING *,R12,R13 %VMD0133 00388000
- LA R13,4095(R12) ESTABLISH SECOND BASE REGISTER %VMD0133 00389000
- LA R13,1(R13) %VMD0133 00390000
- LCTL C0,C1,RUNCR0 RELOAD C-REGS 0 AND 1 FOR 'LRA' %V3M4038 00391000
- COUNT DMKPRVNC MP-SAFE INCR. TO COUNTER %V407593 00392000
- LA R6,1 INCREMENT VALUE FOR LATER %V3M4038 00393000
- L R1,PROPSW+4 INSTERRUPTION ADDRESS %V3M4038 00394000
- LA R1,0(R1) CLEAR HIGH ORDER BYTE %VA08621 00395100
- LH R3,INTPR INTUPT CODE %VA08621 00395200
- LH R4,INTPRL INSTRUCTIO LENGTH %VA08621 00395300
- SR R1,R4 GET START OF INST %VA08621 00395400
- LRA R2,0(0,R1) GET REAL ADDR OF INST %VA08621 00395500
- LA R7,VMINST ADDR OF VMBLOK %VA08621 00395600
- LR R5,R1 COPY ADDR %VA08621 00395700
- N R5,F4095 GET PAGE DISPLACEMENT %VA08621 00395800
- AR R5,R4 ADD INST LENGTH %VA08621 00395900
- S R5,F4096 LESS ONE PAGE %VA08621 00396000
- BP PRVSLO WHOOPS CROSSED A PAGE %VA08621 00396100
- SR R4,R6 DECREMENT FOR EXEC %VA08621 00396200
- EX R4,PRVMOV MOVE IN DATA %VA08621 00396300
- B LOADCNTL DONE %VA08621 00396400
- PRVMOV MVC 0(*-*,R7),0(R2) *EXECUTED* %VA08621 00396500
- SPACE 1 00396600
- PRVSLO EQU * %VA08621 00396700
- SR R5,R4 FIND OUT HOW MUCH OF THIS %VA08621 00396800
- LCR R5,R5 PAGE TO MOVE IN %VA08621 00396900
- SR R5,R6 DECREMENTFOR MOVE %VA08621 00397000
- EX R5,PRVMOV MOVE IN PART WAY %VA08621 00397100
- AR R5,R6 BUMP LENGTH %VA08621 00397200
- LR R8,R1 R1 TO R8 %VA08621 00397300
- AR R1,R5 BUMP SOURCE POINTER %VA08621 00397400
- AR R7,R5 BUMP SINK POINTER %VA08621 00397500
- SR R5,R4 FIND OUT HOW MUCH %VA08621 00397600
- LCR R5,R5 IS LEFT TO MOVE %VA08621 00397700
- LRA R2,0(0,R1) IS 2ND PART IN STORAGE %VA08621 00397800
- BZ PRVRCHK NO NEED FOR PTRAN %VA08621 00397900
- LA R2,BRING+DEFER SET PARMS FOR PTR %VA08621 00398000
- LCTL C0,C0,CPCREG0 GET CP CR0 %VA08621 00398100
- BAL R14,LOCKET GET SYSTEM LOCK %VA08621 00398200
- CALL DMKPTRAN %VA08621 00398300
- BC 2,ADDREXCP NOT IN OUR BOX %VA08621 00398400
- PRVRCHK SR R5,R6 DECR FOR EXEC %VA08621 00398500
- LR R1,R8 R8 BACK TO R1 %VA08621 00398600
- EX R5,PRVMOV MOVE IN DATA %VA08621 00398700
- LOADCNTL EQU * %VA08621 00398800
- LH R2,VMPRGIL GET FOR LATER TEST OF INST SIZE %VA08621 00398900
- LCTL C0,C0,CPCREG0 SET NORMAL VM/370 ARCH. CONTROLS %V3M4038 00410000
- LCTL C1,C1,VMSEG ...AND USE THE STANDARD SEGTABLE %V3M4038 00411000
- TM VMTRCTL,X'FF' ANY TRACE REQUESTED? %V407593 00413000
- BNZ TRACTIVE YES...LOCK IT OR STACKIT.. %V407593 00414000
- TM VMESTAT,VMPERCM PER ACTIVE??? %V407593 00415000
- BZ NOTRPER NO, SKIP THE LOCK/STACK %V407593 00416000
- TRACTIVE BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 00417000
- * RETURN HERE WITH LOCK HELD 00418000
- NOTRPER BCT R3,GETINST NO BR. IF INTPR = 1 (OP. EXCPT.) %V4M0108 00419000
- B OPSIM ELSE GOTO SIMULATE OP. EXCEPTION @V407593 00420000
- SPACE 2 00421000
- GETINST EQU * %V3M4038 00422000
- CLI VMINST,X'9C' CHECK FOR I/O INSTRUCTION %V3M4038 00423000
- BL INSTLOW NOPE %V3M4038 00424000
- CLI VMINST,X'9F' ... %V3M4038 00425000
- BH INSTHIH NOPE %V3M4038 00426000
- MC MNCOSIM,MNCLINST CLASS INST, CODE SIMULATION %VA08858 00427000
- GOTO DMKVSIEX OFF TO V-I/O EXECUTIVE %V3M4038 00428000
- SPACE 3 00429000
- * 00430000
- * COMMON ROUTINE TO OBTAIN SYS-LOCK. ENTERED BY 00431000
- * BAL R14,LOCKET 00432000
- * 00433000
- LOCKET EQU * TEST IF LOCK ALREADY HELD @V407593 00434000
- AIF (NOT &AP).APCHK4 00435000
- TM APSTAT1,APUOPER IS THIS AN AP SYSTEM? @V407508 00436000
- BNOR R14 NO, RETURN TO CALLER @V407508 00437000
- L R15,=A(DMKLOKSY+2) GET ADDRESS OF SYSTEM LOCK @V407508 00438000
- CLC LPUADDR,0(R15) IS THE SYSTEM LOCK HELD? @V407508 00439000
- BCR 8,R14 YES, LOCK HELD @V407593 00440000
- LOCK OBTAIN,TYPE=SYS,SPIN=NO,SAVE @V407593 00441000
- BCR 8,R14 GOT THE LOCK, RETURN TO CALLER @V407593 00442000
- L R15,VMDFTPNT LOCK NOT OBTAINABLE,... @V407593 00443000
- USING CPEXBLOK,R15 GET DEFERRED EXECUTION-BLOCK, @V407593 00444000
- STM R0,R14,CPEXREGS SAVE CALLERS REGS @V407593 00445000
- LA R14,LOCKRTN GET ADDR OF EXECUTION RETURN PT @V4M0130 00446000
- ST R14,CPEXADD AND EXECUTION RETURN POINT @V407593 00447000
- DROP R15 IS IN REG 14 @V407593 00448000
- LR R1,R15 AND DEFER EXECUTION OF @V407593 00449000
- CALL DMKSTKDE @V407593 00450000
- GOTO DMKDSPRU @V407508 00451000
- LOCKRTN DS 0H DEFERRED EXECUTION RETURN POINT @V4M0130 00452000
- LCTL C1,C1,VMSEG RELOAD CONTROL REG 1 AFTER DEFER @V4M0130 00453000
- .APCHK4 ANOP 00454000
- BR R14 RETURN TO CALLER @V4M0130 00455000
- SPACE 2 00456000
- EJECT 00457000
- *---------------------------------------------------------------------* 00458000
- * 'FASTER' - FAST REFLECT VIA 'DMKDSPA' * 00459000
- * 'PRIVRET' - NORMAL RETURN VIA 'DMKDSPCH' * 00460000
- *---------------------------------------------------------------------* 00461000
- FASTER EQU * 00462000
- NI VMRSTAT,255-VMEXWAIT OUT OF INSTR WAIT. PER001 00462500
- TM VMPEND,VMPERPND IS THERE A PENDING "PER" EVENT ? 00463000
- BNZ PRIVRET DMKDSP WILL CHECK FOR PER PENDING. PER001 00464000
- GOTO DMKDSPA FAST REFLECT 00472000
- SPACE 00473000
- PRIVRET EQU * 00474000
- NI VMRSTAT,255-VMEXWAIT RESET INSTRUCTION WAIT %V408246 00475000
- GOTO DMKDSPCH GO TO GROUND ZERO %V4M0156 00476000
- EJECT 00477000
- SPECEXCP EQU * SPECIFICATION EXCEPTION 00478000
- LA R0,X'06' INTERRUPT CODE 00479000
- B ERREFLCT 00480000
- SPACE 00481000
- OPEREXCP EQU * OPERATION EXCEPTION 00482000
- LA R0,X'01' INTERRUPT CODE 00483000
- B ERREFLCT 00484000
- SPACE 00485000
- PROTEXCP EQU * PROTECTION EXCEPTION 00486000
- LA R0,X'04' INTERRUPT CODE 00487000
- B ERREFLCT 00488000
- SPACE 00489000
- ADDREXCP EQU * REFLECT ADDRESSING EXCEPTION 00490000
- LA R0,X'05' INTERRUPT CODE 00491000
- SPACE 2 00492000
- ERREFLCT EQU * REFLECT PROGRAM INTERRUPT 00493000
- GOTO DMKPRGSM SIMULATE PROGRAM INTERRUPT 00504000
- EJECT 00505000
- *---------------------------------------------------------------------* 00506000
- * DECODE PRIVILEGED INSTRUCTION FOR SIMULATION * 00507000
- *---------------------------------------------------------------------* 00508000
- SPACE 1 00509000
- OPSIM CLI VMINST,X'BA' IS IT COMPARE AND SWAP ? @VA03148 00510000
- BE PRCS YES, SIMULATE IT @VA03148 00511000
- CLI VMINST,X'BB' IS IT COMPARE DOUBLE AND SWAP? @VA03148 00512000
- BE PRCDS YES, SIMULATE IT @VA03148 00513000
- CLI VMINST,X'44' IS IT EXECUTE MAYBE ? @V200198 00514000
- BNE CHEKPROB GO CHECK PROBLEM STATE @VA03148 00515000
- COUNT DMKPRVEX MP-SAFE INCR. TO COUNTER @V407593 00516000
- LA R6,1 SET INCREMENT FOR INST COUNT @V2B2638 00518000
- LA R1,1 INDEXING IS ALLOWED @VM08556 00519000
- BAL R9,GETADDR GET INSTRUCTION ADDRESS @VM08556 00520000
- LH R4,0(0,R2) GET FIRST HALFWORD @VM08556 00521000
- IC R5,VMINST+1 CHECK MODIFIER @VM08556 00522000
- SRL R5,2(0) REG. NUM. * 4 @VM08556 00523000
- N R5,F60 CHECK FOR MODIFIER @VM08556 00524000
- BZ SKMODIF ZERO - NO MODIFIER @VM08556 00525000
- IC R5,VMGPRS+3(R5) EXTRACT THE MODIFIER BYTE @VA01985 00526000
- OR R4,R5 MODIFY INSTRUCTION @VM08556 00527000
- SKMODIF STH R4,VMINST STORE NEW INSTRUCTION @VM08556 00528000
- CLI VMINST,X'BA' IS IT COMPARE AND SWAP? @VA08990 00528100
- BE CONTOPCK YES, CONTINUE WITH CHECK @VA08990 00528200
- CLI VMINST,X'BB' IS IT COMPARE DOUBLE AND SWAP? @VA08990 00528300
- BE CONTOPCK YES, CONTINUE WITH CHECK @VA08990 00528400
- CLI VMINST,X'B2' IS IT SPKA OR IPK? @VA08990 00528500
- BNE OPEREXCP NONE OF THE ABOVE---OP CHECK @VA08990 00528600
- CONTOPCK EQU * @VA08990 00528700
- LA R3,2(0,R3) INDEX TO 2'ND HALF OF INST. @VM08556 00529000
- BAL R8,ADTRANS GET ITS REAL ADDRESS @VM08556 00530000
- LH R4,0(,R2) GET 2'ND HALF OF INST. @VM08556 00531000
- STH R4,VMINST+2 SAVE IN VMBLOK @VM08556 00532000
- SLR R2,R2 DON'T ALLOW TRACE OF INST. @VM08556 00533000
- B OPSIM PROCESS NEW INST. @VM08556 00534000
- CHEKPROB TM VMPSW+1,PROBMODE VIRTUAL PROBLEM STATE ? @VA03148 00535000
- BO OPEREXCP YES, REFLECT OPERATION EXECPTION @VA03148 00536000
- CLC =X'B20A',VMINST IS IT SPKA ? @VA03148 00537000
- BE INSTHIH YES, HANDLE AS IF PRIV OP. @VA03148 00538000
- CLC =X'B20B',VMINST IS IT IPK ? @VA03148 00539000
- BE INSTHIH YES, SIMULATE AS IF PRIV OP. @VA03148 00540000
- B OPEREXCP REFLECT OPERATION EXCEPTION @VA03148 00541000
- SPACE 1 00542000
- INSTLOW EQU * OPCODE LT X'9C' %V3M4038 00543000
- AIF (NOT &TRACE(6)).NTR2 **AIF** 00544000
- TM VMTRCTL,VMTRPRV+VMTRBRIN TRACING EITHER TYPE? %V3M4038 00545000
- BZ OFFTRAKL NO %V3M4038 00546000
- BAL R4,CHKTRA1 CALL TRACING SUPERVISOR (MAYBE) 00547000
- OFFTRAKL EQU * COMPLETE DECODING %V3M4038 00548000
- .NTR2 ANOP 00549000
- CLI VMINST,X'44' IS IT EXECUTE? %V3M4038 00550000
- BL PRSKEY NO - "ISK", "SSK" %V3M4038 00551000
- BE PREXEC YES - "EX" %V3M4038 00552000
- * R2 IS STILL CLEAN FOR 'IC' 00553000
- * 00554000
- * VERIFY THAT THE OP-CODE IS WITHIN THE RANGE OF THE INDEX TABLE 00555000
- * 00556000
- CLI VMINST,X'80' LOWER LIMIT OF TABLE %V3M4038 00557000
- BL OPEREXCP IF LOWER, REFLECT OPER EXCEPTION %V3M4038 00558000
- CLI VMINST,X'85' UPPER LIMIT %V3M4038 00559000
- BH OPEREXCP IF HIGHER, OPERATION EXCEPTION %V3M4038 00560000
- SPACE 00561000
- MC 0,5 CLASS 5, CODE 0 INST. SIMULATION %V3M4038 00562000
- IC R2,VMINST GET OP-CODE %V3M4038 00563000
- IC R2,INDTAB-X'80'(R2) LOCATE PROPER COUNTER INDEX %V3M4038 00564000
- LA R2,CNTTAB1(R2) ADDR, OF CNTR TO R2 %V407593 00565000
- COUNT 0(R2) MP-SAFE INCR. TO COUNTER %V407593 00566000
- SLR R2,R2 INSURE R2 IS STILL CLEAN %V407508 00567000
- IC R2,VMINST RE-OBTAIN OP CODE %V3M4038 00568000
- IC R2,DECODEL-X'80'(R2) DECODE '80'-GROUP %V3M4038 00569000
- B BRACHLO(R2) GO TO SIMULATE ROUTINE %V3M4038 00570000
- BRACHLO EQU * 00571000
- B OPEREXCP 00572000
- SSM B PRSSM "SSM" - X'80' %V3M4038 00573000
- LPSW B PRLPSW "LPSW" - X'82' %V3M4038 00574000
- WRD B OPEREXCP "WRD" - X'84' (NOT SUPPORTED) 00575000
- RDD B OPEREXCP "RDD" - X'85' (NOT SUPPORTED) 00576000
- DIAG BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @VA07545 00577000
- * RETURN HERE WITH LOCK HELD. 00578000
- * THIS SUBROUTINE IS A NO-OP IN UP 00579000
- * MODE. 00580000
- GOTO DMKHVCAL @VA07223 00581000
- EJECT 00582000
- INSTHIH EQU * OPCODE GT X'9F' %V3M4038 00583000
- AIF (NOT &TRACE(6)).NTR3 **AIF** 00584000
- TM VMTRCTL,VMTRPRV TRACING PRIVILEGED OPS. ? %V3M4038 00585000
- BZ OFFTRAKH NO %V3M4038 00586000
- BAL R4,CHKTRA2 CALL TRACING SUPERVISOR (PROBABLY) 00587000
- OFFTRAKH EQU * COMPLETE DECODING %V3M4038 00588000
- .NTR3 ANOP 00589000
- * R2 STILL CLEAN FOR 'IC' 00590000
- * 00591000
- * VERIFY THAT THE OP-CODE IS WITHIN THE RANGE OF THE INDEX TABLE 00592000
- * 00593000
- CLI VMINST,X'AC' LOWER LIMIT OF TABLE %V3M4038 00594000
- BL OPEREXCP IF LOWER, GIVE OPER EXCEPTION %V3M4038 00595000
- CLI VMINST,X'B7' UPPER LIMIT %V3M4038 00596000
- BH OPEREXCP IF HIGHER, OPERATION EXCEPTION %V3M4038 00597000
- SPACE 00598000
- PRVMCB MC MNCOSIM,MNCLINST CLASS INST, CODE SIMULATION %V3M4038 00599000
- IC R2,VMINST PICK UP OP-CODE %V3M4038 00600000
- IC R2,INDTAB-X'AC'(R2) LOCATE PROPER COUNTER INDEX %V3M4038 00601000
- LA R2,CNTTAB2(R2) ADDR OF CNTR TO R2 %V407593 00602000
- COUNT 0(R2) MP-SAFE INCR. TO COUNTER. %V407593 00603000
- SLR R2,R2 INSURE R2 IS STILL CLEAN %V407508 00604000
- IC R2,VMINST RE-OBTAIN THE OP CODE %V3M4038 00605000
- IC R2,DECODEH-X'AC'(R2) %V3M4038 00606000
- B BRANCHI(R2) GO TO SIMULATE ROUTINE %V3M4038 00607000
- BRANCHI EQU * 00608000
- B OPEREXCP 00609000
- STNSM B PSTSSM "STNSM", "STOSM" %V3M4038 00610000
- STCTL B PSTCTL "STCTL" - X'B6' 00611000
- LCTL B PRLCTL "LCTL" - X'B7' 00612000
- LRA B PRLRA "LRA" - X'B1' 00613000
- SPACE 00614000
- AIF (NOT &TRACE(6)).NTR4 **AIF** 00615000
- EJECT 00616000
- CHKTRA1 DS 0H DETERMINE WHETHER TO CALL DMKTRCPV: 00617000
- * (R4 = RETURN-REGISTER) 00618000
- TM VMTRCTL,VMTRPRV SPECIFICALLY "PRIV" TRACING WANTED ? 00619000
- BO CHKTRA2 YES - GO TO IT. 00620000
- CLI VMINST,X'82' JUST VMTRBRIN - IS THIS AN LPSW ? 00621000
- BCR 7,R4 <BNE> NOPE - FORGET IT. 00622000
- L R15,VMTREXT YES - REFERENCE TRACE CONTROL BLOCK 00623000
- USING TREXT,R15 ... 00624000
- CLC TREXIN1(8),FFS INSTRUCTION TRACING ALREADY SET UP ? 00625000
- BCR 7,R4 <BNE> YES - NOT NECESSARY TO CALL TRACER. 00626000
- CLI TREXNSI,00 LPSW OR EX-LPSW ALREADY HANDLED BY DMKTRC 00627000
- BCR 7,R4 <BNE> YES - NOT NECESSARY TO CALL TRACER. 00628000
- DROP R15 00629000
- CHKTRA2 DS 0H CALL TRACER (UNLESS ALREADY CALLED) ... 00630000
- LTR R2,R2 IF R2=0, THIS WAS AN EXECUTED INSTRUCTION 00631000
- BCR 8,R4 <BZ> IF YES, DON'T CALL THE TRACER AGAIN. 00632000
- CALL DMKTRCPV CALL TRACING SUPERVISOR 00633000
- LCTL C1,C1,VMSEG RESTORE CR1 @VA03185 00634000
- BR R4 AND RETURN TO OFFTRAKL OR OFFTRAKH. 00635000
- .NTR4 ANOP 00636000
- EJECT 00637000
- BEETWOS EQU * 'B2XX' DECODING %V3M4038 00638000
- CLI VMINST+1,X'13' DO WE HAVE A VALID MODIFIER? %V3M4038 00639000
- BH OPEREXCP NO, BRANCH %V3M4038 00640000
- IC R2,VMINST+1 PICK UP MODIFIER BYTE %V3M4038 00641000
- IC R2,INDTAB(R2) PICK UP PROPER COUNTER INDEX %V3M4038 00642000
- LA R2,DMKPRVB2(R2) ADDR OF CNTR TO R2 %V407593 00643000
- COUNT 0(R2) MP-SAFE INCR. TO COUNTER %V407593 00644000
- SLR R2,R2 INSURE R2 IS STILL CLEAN %V407508 00645000
- IC R2,VMINST+1 RE-OBTAIN THE MODIFIER BYTE %V3M4038 00646000
- IC R2,DECODB2(R2) %V3M4038 00647000
- B BRACHB2(R2) GO TO PROCESS %V3M4038 00648000
- BRACHB2 EQU * 00649000
- B OPEREXCP 00650000
- STIDP B PSTIDP STORE CPU ID 00651000
- STIDC B PSTIDC STORE CHANNEL ID 00652000
- PTLB B PRPTLB PURGE TLB 00653000
- RRB B PRVRRB RESET REF. BIT 00654000
- SPKA B PRSPKA SET PSW KEY FROM ADDRESS @V200198 00655000
- IPK B PRVIPK INSERT PSW KEY INTO REG 2 @V200198 00656000
- GOTOTMR GOTO DMKTMRTN %V3M4038 00657000
- SPACE 3 00658000
- DECODEL EQU * DECODE OPS X'80'-X'85' 00659000
- DC AL1(SSM-BRACHLO) X'80' 00660000
- DC AL1(0) X'81' 00661000
- DC AL1(LPSW-BRACHLO) X'82' 00662000
- DC AL1(DIAG-BRACHLO) X'83' 00663000
- DC AL1(WRD-BRACHLO) X'84' 00664000
- DC AL1(RDD-BRACHLO) X'85' 00665000
- SPACE 2 00666000
- DECODEH EQU * DECODE OPS X'AC'-X'B7' 00667000
- DC 2AL1(STNSM-BRANCHI) X'AC',X'AD' 00668000
- DC 3AL1(0) X'AE','AF','B0' 00669000
- DC AL1(LRA-BRANCHI) X'B1' 00670000
- DC AL1(BEETWOS-BRANCHI) X'B2XX' 00671000
- DC 3AL1(0) X'B3','B4','B5' 00672000
- DC AL1(STCTL-BRANCHI) X'B6' 00673000
- DC AL1(LCTL-BRANCHI) X'B7' 00674000
- SPACE 2 00675000
- DECODB2 EQU * DECODE 'B2XX' INSTRUCTIONS 00676000
- DC 2AL1(0) 'B200','B201' 00677000
- DC AL1(STIDP-BRACHB2) 'B202' 00678000
- DC AL1(STIDC-BRACHB2) 'B203' 00679000
- DC AL1(GOTOTMR-BRACHB2) 'B204' @V2B2638 00680000
- DC AL1(0) 'B205' (NON PRIVLEDGED) @V2B2638 00681000
- DC 4AL1(GOTOTMR-BRACHB2) 'B206' - 'B209' @V2B2638 00682000
- DC AL1(SPKA-BRACHB2) 'B20A' @V200198 00683000
- DC AL1(IPK-BRACHB2) 'B20B' @V200198 00684000
- DC AL1(0) NOT SUPPORTED @V200198 00685000
- DC AL1(PTLB-BRACHB2) 'B20D' 00686000
- DC 5AL1(0) 'B20E' THRU 'B212' 00687000
- DC AL1(RRB-BRACHB2) 'B213' 00688000
- DS 0H 00689000
- EJECT 00690000
- PREXEC EQU * EXECUTE INSTRUCTION 00691000
- COUNT DMKPRVEX MP-SAFE INCR. TO COUNTER @V407593 00692000
- LA R1,1 INDEXING ALLOWED 00693000
- BAL R9,GETADDR GET INSTRUCTION ADDRESS 00694000
- LH R4,0(0,R2) FIRST HALFWORD 00695000
- IC R5,VMINST+1 CHECK MODIFIER 00696000
- SRL R5,2(0) REG. NO. * 4 00697000
- N R5,F60 00698000
- BZ NOMODIF ZERO - NO MODIFIER 00699000
- IC R5,VMGPRS+3(R5) MODIFIER BYTE 00700000
- OR R4,R5 MODIFY INSTRUCTION 00701000
- NOMODIF EQU * @VA13186 00702100
- STH R4,VMINST SET IN VMBLOK @VA13186 00702200
- LA R3,2(0,R3) INDEX TO 2ND HALF OF VIRT INST @VA13186 00702300
- BAL R8,ADTRANS NOW GET ITS REAL ADDRESS @VA13186 00702400
- LH R4,0(,R2) GET THE REAL STUFF.... @VA13186 00702500
- STH R4,VMINST+2 AND STUFF IT AWAY @VA13186 00702600
- * BEGINNING OF LOGIC TO SUPPORT 6 BYTE 'EXECUTED' INSTRUCTIONS 00702700
- * THAT ARE PRIV OPS 00702800
- TM VMINST,X'C0' * IS THIS A SIX BYTE INST? @VA13186 00702900
- BNO SKIP3RD * NO...BRANCH @VA13186 00703000
- LA R3,2(0,R3) INDEX TO 3'RD HALFWORD OF INST. @VA13186 00703100
- BAL R8,ADTRANS GET ITS REAL ADDRESS @VA13186 00703200
- LH R4,0(,R2) PICK UP 3RD HALFWORD OF INST. @VA13186 00703300
- STH R4,VMINST+4 SAVE IN VMBLOK @VA13186 00703400
- SKIP3RD DS 0H @VA13186 00703500
- * END OF 6 BYTE INSTRUCTION SUPPORT 00703600
- SLR R2,R2 TELL TRACE TO FORGET IT @VA13186 00703700
- B GETINST NOW PROCESS THE STUFF @VA13186 00703800
- SPACE 2 00710000
- PRLPSW EQU * LOAD PSW INSTRUCTION %V3M4038 00711000
- TM VMTRCTL,VMTRBRIN INSTRUCTION TRACING SET? %VA05533 00712000
- BNO PRLPSW1 NO, SKIP FOLLOWING TEST %VA05533 00713000
- L R15,VMTREXT GET ADDRESS OF TRACE BLOCK @VA05533 00714000
- USING TREXT,R15 @VA05533 00715000
- NI TREXFLAG,255-TREXNDSP RESET DISPATCH TRACE CALL @VA05533 00716000
- DROP R15 @VA05533 00717000
- PRLPSW1 SLR R1,R1 NO INDEXING %VA05533 00718000
- BAL R8,INSTADR COMPUTE VIRTUAL ADDRESS %V3M4038 00719000
- LA R4,7 MASK TO CHECK BOUNDARY ALIGNMENT %V3M4038 00720000
- NR R4,R3 ON DBL-WD BOUNDARY? %V3M4038 00721000
- BNZ SPECEXCP NOPE - INTERRUPT %V3M4038 00722000
- BAL R8,ADTRANS GET REAL ADDRESS %V3M4038 00723000
- CALL DMKPSAFP CHECK FOR FETCH PROTECTION %V3M4038 00724000
- BNZ PROTEXCP OOPS - GENERATE PROTECTION CHECK %V3M4038 00725000
- L R4,4(0,R2) ... %V3M4038 00726000
- ST R4,VMPSW+4 ... %V3M4038 00727000
- L R5,0(0,R2) FIRST HALF OF NEW PSW %V3M4038 00728000
- LR R1,R5 SAVE 1ST WORD OF NEW PSW %V408246 00729000
- X R1,VMPSW DIFF. BETWEEN NEW AND OLD PSW %V408246 00730000
- ST R5,VMPSW STORE NEW PSW %V408246 00731000
- TM VMPSW+1,EXTMODE EXTENDED MODE NEW PSW? %V408246 00732000
- BO PRLPSWEC YES %V408246 00733000
- N R1,=X'FF0A0000' NO (BC), ANY STATUS DIFFERANCES?%V408246 00734000
- BZ PRLPSWA NONE, FAST DISPATCH %V408246 00735000
- N R1,=X'000A0000' SERIOUS STATUS DIFFERANCES? %V408246 00736000
- BZ PRLCKPND NO, CHECK ENABLED FOR PENDING %V408246 00737000
- B VPSWCHK YES, -> DMKDSP FOR FURTHER CHECKS%V408246 00738000
- * 00739000
- PRLPSWEC DS 0H CHECK OUT EC-MODE PSW %V408246 00740000
- CLI VMPSW+4,0 BITS 32-39 = 0? %V408246 00741000
- BNE VPSWCHK NO, -> DMKDSP %V408246 00742000
- N R1,=X'FF0AC0FF' ANY STATUS DIFFERENCES? %V408246 00743000
- BZ PRLPSWA NONE, FAST DISPATCH %V408246 00744000
- N R1,=X'FC0AC0FF' SERIOUS STATUS DIFFERANCES? %V408246 00745000
- BNZ VPSWCHK SOME, -> DMKDSP %V408246 00746000
- TM VMPSW,VMIOPND ENABLED FOR I/O? %V408246 00747000
- BZ PRLEXT NO, CHECK FOR EXTERNAL %V408246 00748000
- TM VMPEND,VMPGPND YES, PAGE FAULT PENDING? %V408246 00749000
- BO VPSWCHK YES %V408246 00750000
- L R5,FFS ASSUME ENABLED FOR ALL %V408246 00751000
- PRLCKPND DS 0H CHECK PENDING %V408246 00752000
- SR R2,R2 CLEAR %V408246 00753000
- ICM R2,12,VMIOINT ANY PENDING I/O?? %V408246 00754000
- BZ PRLEXT NO, NOTHING %V408246 00755000
- NR R2,R5 ENABLED FOR PENDING? %V408246 00756000
- BNZ VPSWCHK YES, -> DMKDSP (REFLECT) %V408246 00757000
- PRLEXT DS 0H CHECK-OUT EXTERNAL PENDING %V408246 00758000
- TM VMPSW,VMEXTPND ENABLED FOR EXTERNAL? %V408246 00759000
- BZ PRLPSWA NO %V408246 00760000
- ICM R2,B'1111',VMPXINT ANY PENDING? %V408246 00761000
- BNZ VPSWCHK YES, REFLECT EXTERNAL INTERRUPT %V408246 00762000
- PRLPSWA DS 0H %V3M4038 00763000
- TM VMDSTAT,VMDSP+VMRUN+VMINQ PROPSW STILL VALID ? %V3M4038 00764000
- BNO VPSWCHK NO - NO FAST REFLECT %V3M4038 00765000
- TM PROPSW+1,PROBMODE IS MONITOR CODE ACTIVE %V3M4038 00766000
- BZ VPSWCHK IF YES - BYPASS FAST DISPATCH %V3M4038 00767000
- TM VMTRCTL,VMTRPRV+VMTRBRIN TRACING ACTIVE? %V408246 00768000
- BNZ VPSWCHK YES, WILL HAVE TO WAIT FOR DSP %V408246 00769000
- STCM R4,B'0111',PROPSW+5 VIRT. ADDR. IN NEW PSW %V408246 00770000
- NI PROPSW+1,X'0F' RESET CURRENT PROTECT KEY %V4M0201 00771000
- OC PROPSW+1(1),VMPSW+1 PUT IN NEW KEY %V4M0201 00772000
- TM VMPSW+1,PROBMODE ENTERING PROBLEM STATE? %V408246 00773000
- BZ FASTER NO %V408246 00774000
- TM CPSTAT2,CPMICON ASSIST ENABLED? %V408246 00775000
- BZ FASTER NO %V408246 00776000
- ICM R2,B'0111',VMMADDR ASSIST ENABLED? %V408246 00777000
- BZ FASTER NO %V408246 00778000
- OI VMMCR6,VMMPROB TURN ON PROBLEM MODE %V408246 00779000
- LCTL C6,C6,VMMICRO AND RELOAD ASSIST CREG %V408246 00780000
- B FASTER %V3M4038 00781000
- SPACE 2 00782000
- VPSWCHK EQU * EXAMINE VIRTUAL PSW SETTINGS %V3M4038 00783000
- * 00785000
- * LOCKET IS A NOOP IN UP SYSTEM @VA07223 00786000
- * 00787000
- BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND %V407593 00788000
- * RETURN HERE WITH LOCK HELD %V407593 00789000
- NI VMRSTAT,X'FF'-VMEXWAIT OUT OF INSTRUCTION WAIT @VA09498 00789500
- GOTO DMKDSPB 'NEW PSW' ENTRY TO DISPATCH %V3M4038 00790000
- EJECT 00791000
- PRSSM EQU * SET SYSTEM MASK %V3M4038 00792000
- TM VMPSTAT,VMV370R EC-MODE MACHINE? %V3M4038 00793000
- BO CHKVCR0 YES %V3M4038 00794000
- TM VMVCR0,X'40' IS BIT 1, CR0 = 1 ? %V3M4038 00795000
- BZ SSMJOIN NO - NORMAL SSM %V3M4038 00796000
- B SPECIAL1 SPECIAL INTERRUPT %V3M4038 00797000
- CHKVCR0 EQU * %V3M4038 00798000
- L R10,VMECEXT EXTENSION BLOCK %V3M4038 00799000
- USING ECBLOK,R10 %V3M4038 00800000
- TM EXTCR0,X'40' IS BIT 1, CR0 = 1? %V3M4038 00801000
- BZ SSMJOIN NO - NORMAL SSM %V3M4038 00802000
- DROP R10 00803000
- SPECIAL1 EQU * GIVE SPECIAL PROGRAM INTERRUPT 00804000
- LA R0,X'13' INTERRUPT FOR 'SSM' SUPPRESSION 00805000
- B ERREFLCT ...BACK TO VM 00806000
- PSTSSM EQU * STORE+AND, STORE+OR SYS MASK %V3M4038 00807000
- TM VMPSTAT,VMV370R IS THIS AN EC-MODE MACHINE ? %V3M4038 00808000
- BZ OPEREXCP NO - REFLECT OPERATION EXCEPTION %V3M4038 00809000
- * (CF 370 PRINCIPLES OF OPERATION) 00810000
- SSMJOIN EQU * STNSM | STOSM | SSM: %V3M4038 00811000
- TM VMTRCTL,VMTRBRIN INSTRUCTION TRACING SET %VA05533 00812000
- BNO SSMJOIN1 NO, SKIP FOLLOWING TEST %VA05533 00813000
- L R15,VMTREXT GET ADDRESS OF TRACE BLOCK @VA05533 00814000
- USING TREXT,R15 @VA05533 00815000
- NI TREXFLAG,255-TREXNDSP RESET DISPATCH TRACE CALL @VA05533 00816000
- DROP R15 @VA05533 00817000
- SSMJOIN1 SLR R1,R1 NO INDEXING %VA05533 00818000
- BAL R9,GETADDR GET REAL, VIRTUAL ADDRESS %V3M4038 00819000
- IC R4,0(0,R2) GET DATA BYTE %V3M4038 00820000
- CLI VMINST,X'80' SIMPLE SSM? %V3M4038 00821000
- BE CHEKSSM YES, CHECK FOR FETCH PROTECTION %V3M4038 00822000
- * NO - MUST BE STNSM OR STOSM: 00823000
- CALL DMKPSASP CHECK STORAGE PROTECTION KEYS %V3M4038 00824000
- BNZ PROTEXCP NO GOOD - ERROR %V3M4038 00825000
- IC R4,VMPSW GET OLD SYSTEM MASK %V3M4038 00826000
- IC R5,VMINST+1 IMMEDIATE BYTE FROM INST. %V3M4038 00827000
- STC R4,0(0,R2) STORE SYSTEM MASK %V3M4038 00828000
- TM VMESTAT,VMPERCM VIRTUAL OR CP PER ACTIVE ? %V3M4038 00829000
- BZ PSTNPER NO - SKIP PER EVENT CHECKING %V3M4038 00830000
- LA R1,PERSALT STORAGE ALTERATION EVENT 00831000
- LA R2,1(0) FIELD LENGTH STORED 00832000
- BAL R9,PERCHEK SEE IF RECORDABLE EVENT 00833000
- PSTNPER EQU * MODIFY CURRENT SYSTEM MASK %V3M4038 00834000
- CLI VMINST,X'AC' STORE + AND ? %V3M4038 00835000
- BE PSTANDSM YES %V3M4038 00836000
- OR R4,R5 STORE + OR SYS MASK %V3M4038 00837000
- B SETMASK %V3M4038 00838000
- PSTANDSM EQU * STORE + AND SYS MASK %V3M4038 00839000
- NR R4,R5 ... %V3M4038 00840000
- SETMASK EQU * SET SYSTEM MASK %V3M4038 00841000
- EX R4,CLVMSK CHECK NEW WITH THE OLD %V3M4038 00842000
- STC R4,VMPSW SAVE NEW MASK %V3M4038 00843000
- BE FASTER EQUAL - FAST DISPATCH %V3M4038 00844000
- TM VMPSTAT,VMV370R VIRTUAL EC MODE MACHINE ? %V3M4038 00845000
- BNZ VPSWCHK YES - CHECK FULLY %V3M4038 00846000
- CLI VMPSW,0 NEW MASK ENABLED FOR INTERRUPTS? %V3M4038 00847000
- BE FASTER NO - UNABLE TO RELFECT ANYTHING %V3M4038 00848000
- TM VMPSW,VMEXTPND ENABLED FOR EXT INTERRUPTS ? %V3M4038 00849000
- BZ STSMIO NO..CONTINUE... %V3M4038 00850000
- TM VMVCR0+3,X'E0' ENABLED IN CR0 ? %V3M4038 00851000
- BZ STSMIO NO..CONTINUE... %V3M4038 00852000
- L R1,VMPXINT CHECK FOR PENDING %V3M4038 00853000
- LTR R1,R1 EXT INTERRUPTS... %V3M4038 00854000
- BNZ VPSWCHK DISPATCH WILL DO THE REST.. %V3M4038 00855000
- STSMIO EQU * %V3M4038 00856000
- SLR R1,R1 CLEAR R1 %V3M4038 00857000
- IC R1,VMIOINT INTERRUPT PENDING MASK %V3M4038 00858000
- NR R1,R4 ENABLE FOR PENDING INTERRUPTS %V3M4038 00859000
- BZ FASTER NOTHING - FAST RE-DISPATCH %V3M4038 00860000
- B VPSWCHK EXAMINE NEW PSW %V3M4038 00861000
- SPACE 00862000
- CHEKSSM CALL DMKPSAFP SSM - CHECK FOR FETCH PROTECTION %V3M4038 00863000
- BZ SETMASK OK - GO TO IT. %V3M4038 00864000
- B PROTEXCP OOPS - GENERATE PROTECTION CHECK @V202232 00865000
- CLVMSK CLI VMPSW,0 COMPARE OLD AND NEW PSW MASKS %V3M4038 00866000
- EJECT 00867000
- PRSKEY EQU * 'ISK' OR 'SSK' 00868000
- *---------------------------------------------------------------------* 00869000
- * REGISTER USAGE IN 'PRSKEY': * 00870000
- * R1 = SEGMENT TABLE ADDRESS * 00871000
- * R2 = REAL ADDRESS OF BLOCK (IF PAGE IN CORE) * 00872000
- * R3 = ADDRESS IN VMBLOK OF R2 VALUE * 00873000
- * R4 = REAL STORAGE KEY * 00874000
- * R5 = R1 REGISTER NO. * 4 * 00875000
- * R6 = VIRTUAL ADDRESS OF BLOCK * 00876000
- * R7 = SWAP TABLE ENTRY ADDRESS * 00877000
- * R8 = MASK FOR STORAGE KEY TO USER * 00878000
- *---------------------------------------------------------------------* 00879000
- PRVMCC MC MNCOSIM,MNCLINST CLASS INST, CODE SIMULATION @VM01017 00880000
- LA R8,X'FE' DEFAULT "MASK" FOR ALL 7 BITS @VA01071 00881000
- * OF THE KEY 00882000
- CLI VMINST,X'09' IS IT ISK INSTR. 00883000
- BNE NOTISK NO, MUST BE SSK 00884000
- COUNT DMKPRVIK MP-SAFE INCR. TO COUNTER @V407593 00885000
- TM VMESTAT,VMEXTCM IN EXTENDED CONTROL NOW ? @VA01071 00886000
- BO R8MASKOK YES - R8 "MASK" OF X'FE' IS OK. @VA01071 00887000
- B R8MASKF8 NO - GO SET "MASK" TO X'F8'. @VA01071 00888000
- NOTISK COUNT DMKPRVEK MP-SAFE INCR. TO COUNTER @V407593 00889000
- TM VMPSTAT,VMV370R DOES THIS GUY HAVE AN EC-MODE @VA01071 00890000
- * MACHINE ? 00891000
- BO R8MASKOK YES - R8 "MASK" OF X'FE' IS OK. @VA01071 00892000
- R8MASKF8 LA R8,X'F8' SET FOR 5 BITS ONLY, FOR BC @VA01071 00893000
- * MODE/MACHINE 00894000
- R8MASKOK EQU * R8 "MASK" CORRECTLY SET; @VA01071 00895000
- * CONTINUE: 00896000
- BAL R9,REGSPEC GET REGISTER SPECIFICATIONS 00897000
- LA R3,VMGPRS(R6) ADDR IN VMBLOK OF R2 FIELD 00898000
- TM 3(R3),X'0F' CHECK ALIGNMENT 00899000
- BNZ SPECEXCP NO GOOD 00900000
- GETKEYAD L R6,0(,R3) GET VIRTUAL BLOCK ADDRESS @VA01071 00901000
- LA R10,FASTER BRANCH VECTOR FOR BCR'S 00902000
- LA R6,0(0,R6) 24-BITS ONLY, PLEASE 00903000
- LRA R2,0(,R6) GET REAL PAGE ADDR. @V408246 00904000
- BC 8+2,SEGOK PAGE AVAILABLE AND/OR PTE @V408246 00905000
- BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 00906000
- * RETURN HERE WITH LOCK HELD 00907000
- LR R1,R6 GET ADDRESS @V408246 00908000
- TRANS 2,1,OPT=(DEFER) @V408246 00909000
- BC 2,ADDREXCP ADDR. EXCEPTION @V408246 00910000
- CLI VMINST,X'B2' VIRT. RRB? @V408246 00911000
- BNE *+8 NO @V408246 00912000
- ST R6,0(,R3) YES, RESTORE TEMPSAVE @V408246 00913000
- SEGOK DS 0H @V408246 00914000
- SLR R7,R7 CLEAR @V408246 00915000
- IC R7,1(,R3) VIRTUAL SEGMENT INDEX @V408246 00916000
- SLL R7,2 SEGMENT TABLE ENTRY INDEX @V408246 00917000
- AL R7,VMSEG ADD STO, GET STE @V408246 00918000
- L R7,0(R7) GET PTE @V408246 00919000
- LA R7,0(0,R7) 00920000
- N R7,=X'00FFFFFE' TURN OFF INVALID BIT @V407566 00921000
- S R7,F4 BACK UP... 00922000
- L R7,0(0,R7) ...FOR SWAPTABLE POINTER 00923000
- IC R4,2(0,R3) PAGE NUMBER * 16 00924000
- N R4,F240 CLEAR JUNK 00925000
- SRL R4,1(0) INDEX IN SWAPTABLE 00926000
- LA R7,0(R4,R7) SWPTABLE ENTRY 00927000
- USING SWPFLAG,R7 REFERENCE SWAP TABLE INFO. IN R7 @VA01071 00928000
- SLR R4,R4 REAL KEY ASSUMED ZERO 00929000
- SLR R1,R1 INDEX TO SWPKEYS 00930000
- TM 2(R3),X'08' EVEN OR ODD HALF-PAGE? 00931000
- BZ HALFONE EVEN 00932000
- LA R1,1(0,0) ODD 00933000
- HALFONE EQU * 00934000
- LRA R2,0(0,R6) GET REAL ADDRESS 00935000
- BNZ PGNOTRES PAGE NOT IN CORE 00936000
- ISK R4,R2 GET REAL KEY 00937000
- EJECT 00938000
- PGNOTRES EQU * 00939000
- CLI VMINST,9 ISK? 00940000
- BNE PSETKEY NO 00941000
- IC R9,SWPKEY1(R1) GET KEY FROM SWPTABLE @VA01071 00942000
- OR R9,R4 ...PLUS REAL KEY 00943000
- STC R9,SWPKEY1(R1) RESET IN SWPTABLE @VA01071 00944000
- NR R9,R8 MASK FOR USER 00945000
- STC R9,VMGPRS+3(R5) RETURN RESULT TO USER 00946000
- TM VMESTAT,VMPERCM VIRTUAL OR CP PER ACTIVE ? 00947000
- BCR 8,R10 NO -- FAST REFLECT 00948000
- LR R4,R5 REGISTER INDEX IN R4 00949000
- LA R1,PERGPRS GENERAL REGISTER ALTERATION EVENT 00950000
- BAL R9,PERCHEK SEE IF RECORDABLE EVENT 00951000
- B FASTER FAST DISPATCH 00952000
- PSETKEY EQU * HANDLE 'SSK' OR 'RRB' ... @VA01071 00953000
- N R4,F6 GET REAL REF, CHG BITS 00954000
- LR R2,R4 INTO R2 FOR BACKUP-BIT SETTING 00955000
- ALR R2,R2 @V213235 00956000
- IC R9,SWPFLAG GET SWPFLAG BYTE @VA01071 00957000
- OR R9,R2 ADD BACKUP BITS 00958000
- STC R9,SWPFLAG ...RESET FLAG BYTE @VA01071 00959000
- CLI VMINST,X'B2' IS IT AN RRB? 00960000
- BE RESREFB YES - GO SET COND. CODE 00961000
- TM SWPFLAG,SWPSHR SHARED PAGE @VA07028 00962000
- BOR R10 YES, SSK = NO-OP ON SHARED PAGE @VA07028 00963000
- IC R9,VMGPRS+3(R5) GET NEW KEY 00964000
- NR R9,R8 MASK FOR USER 00965000
- STC R9,SWPKEY1(R1) SET IN SWPTABLE ENTRY @VA01071 00966000
- SETREAL EQU * SET REAL STORAGE KEY 00967000
- TM VMPSTAT,VMREAL V=R USER ? @VA01071 00968000
- BO *+8 YES - LEAVE ALL OF KEY "AS IS" @VA01071 00969000
- N R9,=A(X'F8') MASK FOR REAL KEY (WITH @VA01071 00970000
- * FETCH-PROT. BIT) 00971000
- LRA R2,0(0,R6) SEE IF PAGE IN CORE 00972000
- BCR 7,R10 PAGE NOT IN CORE 00973000
- SSK R9,R2 SET REAL KEY 00974000
- BR R10 FAST DISPATCH 00975000
- EJECT 00976000
- PRVRRB EQU * RESET REFERENCE BIT 00977000
- SLR R1,R1 NO INDEXING 00978000
- BAL R8,INSTADR GET VIRTUAL ADDRESS 00979000
- ST R3,TEMPSAVE SAVE IT IN PSA 00980000
- NI TEMPSAVE+3,X'F0' FORCE VALID ALIGNMENT FOR 'ISK' 00981000
- LA R3,TEMPSAVE POINT TO IT FOR 'PRSKEY' 00982000
- TM VMPSTAT,VMV370R IS THIS AN EC-MODE MACHINE ? @VA00780 00983000
- BO GETKEYAD YES (WHEW) GET VIRTUAL BLOCK @VA01071 00984000
- * ADDRESS ETC. 00985000
- B OPEREXCP NO - REFLECT OPERATION EXCEPTION @VA00780 00986000
- * (CF 370 PRINCIPLES OF OPERATION) @VA00780 00987000
- SPACE 00988000
- RESREFB EQU * BACK FROM MIDDLE OF 'SSK' 00989000
- IC R9,SWPKEY1(R1) GET KEY FROM SWAP-TABLE @VA01071 00990000
- OR R9,R4 ADD TO REAL REF, CHG BITS 00991000
- STC R9,SWPKEY1(R1) UPDATE KEY IN SWAP-TABLE @VA01071 00992000
- LA R4,6(0,0) MASK FOR REF, CHG BITS ONLY 00993000
- NR R4,R9 GET VIRTUAL REF, CHG IN GR4 00994000
- SLL R4,3(0) POSITION FOR CC SETTING IN PSW 00995000
- LA R2,SWPKEY1(R1) ADDRESS OF VIRTUAL KEY IN @VA01071 00996000
- * SWPTABLE 00997000
- NI 0(R2),X'FF'-X'04' RESET REFERENCE BIT 00998000
- NI VMPSW+2,X'CF' SET EC-MODE COND. CODE = 0, AND @VA00780 00999000
- NI VMPSW+4,X'CF' SET BC-MODE COND. CODE = 0 01000000
- LA R10,SETPSWCC CHANGE VECTOR TO SET COND. CODE 01001000
- N R9,=A(X'FA') RETAIN ALL OF KEY EXCEPT @VA01071 01002000
- * REFERENCE BIT 01003000
- DROP R7 AND ... @VA01071 01004000
- B SETREAL GO SET REAL STORAGE KEY 01005000
- PRVIPK IC R0,VMPSW+1 GET KEY AND EMWP @V200198 01006000
- N R0,F240 SET EMWP PORTION TO ZERO @V200198 01007000
- STC R0,VMGPRS+R2*4+3 BITS 24-31 OF GPR2 @V200198 01008000
- TM VMESTAT,VMPERCM IS PER ACTIVE? @V200198 01009000
- BZ FASTER NOPE, REDISPATCH @V200198 01010000
- LA R1,PERGPRS SET FOR GPR CHANGED @V200198 01011000
- LA R4,R2*4 INDICATE REG2 WAS HIT @V200198 01012000
- BAL R9,PERCHEK AND SO INDICATE TO VM @V200198 01013000
- B FASTER NOW REDISPATCH @V200198 01014000
- PRSPKA SR R1,R1 DON'T WANT INDEXING @V200198 01015000
- BAL R8,INSTADR GET BASE PLUS DISPLACEMENT @V200198 01016000
- IC R0,VMPSW+1 LOAD IN PSW PROTECT KEY & EMWP @V200198 01017000
- N R0,F15 ZERO OUT PROTECTION KEY @V200198 01018000
- N R3,F240 ZERO OUT ALL BUT BITS 24-27 @V200198 01019000
- OR R0,R3 OR IN NEW KEY @V200198 01020000
- STC R0,VMPSW+1 STORE NEW KEY & EMWP BACK @V200198 01021000
- NI PROPSW+1,X'0F' RESET CURRENT STORAGE KEY @VM01081 01022000
- OC PROPSW+1(1),VMPSW+1 SET USERS NEW STORAGE KEY @VM01081 01023000
- B FASTER REDISPATCH VIRTUAL MACHINE @V200198 01024000
- SPACE 2 01025000
- REGSPEC EQU * COMPUTE REGISTER INDICES FOR R1,R3 01026000
- L R4,F60 LOAD NECESSARY MASK INTO GR4 01027000
- IC R5,VMINST+1 REGISTER SPECIFICATION BYTE 01028000
- LR R6,R5 01029000
- SRL R5,2(0) 'R1' 01030000
- SLL R6,2(0) 'R2' 01031000
- NR R5,R4 REDUCE REGISTER NUMBERS TO INDICES 01032000
- NR R6,R4 ...INTO 'VMGPRS' FIELD IN VMBLOK 01033000
- BR R9 01034000
- EJECT 01035000
- PRLCTL EQU * LCTL - LOAD CONTROL - X'B7' 01036000
- SLR R1,R1 NO INDEXING 01037000
- BAL R8,INSTADR COMPUTE VIRTUAL ADDRESS @VA03696 01038000
- LA R1,3(0,0) TEST ADDRESS FOR ALIGNMENT 01039000
- NR R1,R3 ...MUST BE A FULL-WORD BOUNDARY 01040000
- BNZ SPECEXCP NOPE - GENERATE A PROGRAM INTERRUPT 01041000
- BAL R8,ADTRANS GET REAL ADDRESS @VA03696 01042000
- CALL DMKPSAFP CHECK FOR FETCH PROTECTION @V202232 01043000
- BNZ PROTEXCP OOPS - GENERATE PROTECTION CHECK @V202232 01044000
- BAL R9,REGSPEC GET REGISTER SPECIFICATIONS 01045000
- * 'REGSPEC' WILL LEAVE THE MASK 'F60' IN GR4 01046000
- SPACE 01047000
- LOADECR EQU * LCTL FOR EC-MODE ALLOWED VIRTUAL MACH. 01048000
- TM VMPSTAT,VMV370R ECMODE MACHINE ? @VM01024 01049000
- BZ *+8 NO..ECBLOK DOES NOT EXIST... @VM01024 01050000
- L R10,VMECEXT EXTENSION BLOCK 01051000
- USING ECBLOK,R10 01052000
- LA R9,FASTER AND SET R9 "SWITCH" 01053000
- CLR R5,R6 SHOULD WE PRE-CHECK ADDRESSES ? 01054000
- BE LOADCHK NOPE - JUST LOADING ONE CONTROL REGISTER 01055000
- LOADCRS EQU * PRE-CHECK ADDRESS AVAILABILITY 01056000
- LA R7,4(0,0) INCREMENT VALUE + INDEX TEST VALU@VMD0133 01057000
- LOADMLT EQU * LOAD MULTIPLE CONTROL REGISTERS 01058000
- BAL R8,ADTRANS TRANSLATE THE VIRTUAL ADDRESS 01059000
- CALL DMKPSAFP CHECK FOR FETCH PROTECTION @V202232 01060000
- BZ LOADCHK KEYS MATCH @VA02233 01061000
- * ERROR FORCES US OUT OF LOOP. BUT FIRST DO STUFF WE'D 01062000
- * NORMALLY DO AT END OF LOOP. 01063000
- TM VMESTAT,VMINVSEG+VMNEWCR0 @VA02233 01064000
- BZ PROTEXCP REFLECT PROTECTION EXC... @VA02233 01065000
- BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01066000
- * RETURN HERE WITH LOCK HELD 01067000
- CALL DMKVATAB @VA02233 01068000
- B PROTEXCP REFLECT IT @VA02233 01069000
- EJECT 01070000
- LOADCHK EQU * TEST FOR C-REGS 0,1,2,14. @VMD0103 01071000
- NR R5,R4 R4=F60, CHANGES CREG 16 TO CREG0.@VMD0103 01072000
- LA R0,C14*L4 THIS IS WHAT INDEX WOULD BE FOR @VMD0103 01073000
- * C-REG 14. 01074000
- CR R5,R0 CURRENTLY WORKING ON C-REG 14? @VMD0103 01075000
- BNE ENDC14 NO. @VMD0103 01076000
- OI VMVCR14,VMIOLOG ASSUME IOLOG BIT WILL BE 1, @VMD0103 01077000
- * AND TURN ON IN VMBLOK. 01078000
- TM 0(R2),VMIOLOG TEST IOLOG BIT HE IS LOADING @VMD0103 01079000
- * INTO C-REG 14. 01080000
- BO ENDC14 BRANCH IF ASSUMPTION OF 1 BIT @VMD0103 01081000
- * WAS CORRECT. 01082000
- NI VMVCR14,X'FF'-VMIOLOG HES'S SETTING IOLOG BIT @VMD0103 01083000
- * OFF. DO SAME IN VMBLOK. 01084000
- ENDC14 EQU * @VMD0103 01085000
- L R1,0(0,R2) LOAD THE C-REG... 01086000
- LTR R5,R5 CREG0 ?? @VA12971 01086100
- BNZ *+8 NO, BYPASS CREG0 RESET @VA12971 01086200
- N R1,=XL4'FFF8FFFF' RESET BITS 13-15 IN BYTE 1 @VA12971 01086300
- TM VMPSTAT,VMV370R ECMODE MACHINE ? @VM01024 01087000
- BNZ LOADCHK0 YES..CONTINUE... @VM01024 01088000
- LTR R5,R5 LOADING CREG0 ? @VM01024 01089000
- BNZ LOADEND2 NO..NOTHING TO DO.. @VM01024 01090000
- ST R1,VMVCR0 UPDATE CR0 @VM01024 01091000
- B LOADEND2 AND CONTINUE... @VM01024 01092000
- LOADCHK0 EQU * @VM01024 01093000
- * 01094000
- * 01095000
- LA R15,8 TO TEST FOR CONTROL REG 0,1, OR 2@VMD0133 01096000
- CLR R5,R15 CONTROL REGISTER 0 OR 1? @VMD0133 01097000
- BNL LOADATA NOPE - AT LEAST CONTROL REG 2. 01098000
- CL R1,EXTCR0(R5) DOES IT MATCH THE "OLD" CONTROL REG VALUE 01099000
- BE LOADEND2 YES - GOOD SHOW - KEEP COOL. 01100000
- AIF (NOT &TRACE(6)).NTR5 **AIF** 01101000
- TM VMTRCTL,VMTRBRIN TRACING BRANCHES OR INSTRUCTIONS ? 01102000
- BZ LOADCHK1 NOPE - NO PROBLEM. 01103000
- CALL DMKTRCPB YES - PUT BACK OLD USER INSTRUCTIONS NOW 01104000
- .NTR5 ANOP 01105000
- LOADCHK1 LA R9,LCTLVAT SET R9 SWITCH TO CALL DMKVATAB 01106000
- LTR R5,R5 NOW WAS THAT CONTROL REGISTER 0 OR 1 ? 01107000
- BZ LOADCHKZ IT WAS 0. 01108000
- OI VMESTAT,VMINVSEG SET FLAGBIT IF CONTROL REG 1 CHANGED 01109000
- B LOADEND AND GO STORE NEW VALUE. 01110000
- LOADCHKZ OI VMESTAT,VMNEWCR0 SET FLAGBIT IF CONTROL REG 0 CHANGED 01111000
- B LOADEND AND GO STORE NEW VALUE. 01112000
- * 01113000
- LOADATA EQU * LOAD C-REG OTHER THAN ZERO OR ONE: 01114000
- BH LOADEND TRF IF > CONTROL REG 2 (CC IS STILL SET) 01115000
- * LOADING C-REG 2 (I/O MASKS) ... 01116000
- TM VMPSW,X'02' IS USER PSW ENABLED FOR I/O ? 01117000
- BZ LOADEND NO - NO PROBLEM INCURRED 01118000
- LA R15,LCTLVAT SEE WHAT R9 SWITCH IS 01119000
- CLR R9,R15 PERCHANCE = A(LCTLVAT) ? 01120000
- BE LOADEND YES - LEAVE IT AT THAT. 01121000
- LA R9,VPSWCHK NO - THEN SET IT TO A(VPSWCHK). 01122000
- LOADEND ST R1,EXTCR0(R5) STORE NEW VALUE OF THE CONTROL REGISTER 01123000
- LOADEND2 EQU * SEE IF WE'RE FINISHED YET: 01124000
- CLR R5,R6 HAVE WE LOADED THE LAST REGISTER ? 01125000
- BCR 8,R9 <BE> YES - GO TO FASTER / VPSWCHK / LCTLVAT 01126000
- LOADNXT EQU * ADVANCE TO THE NEAREST RAILROAD... 01127000
- ALR R3,R7 ...IF YOU PASS 'GO', @VMD0133 01128000
- ALR R5,R7 ...COLLECT $200 @VMD0133 01129000
- B LOADMLT ...AND CONTINUE ON AROUND 01130000
- LCTLVAT EQU * PERFORM SHADOW-TABLE CLEAN-UP 01131000
- BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01132000
- * RETURN HERE WITH LOCK HELD 01133000
- CALL DMKVATAB MAINTENANCE ROUTINE 01134000
- B VPSWCHK ENABLED STATUS HAS CHANGED 01135000
- DROP R10 01136000
- EJECT 01137000
- PSTCTL EQU * STCTL - STORE CONTROL - X'B6' 01138000
- BAL R9,REGSPEC GET REGISTER SPECIFICATIONS 01139000
- SLR R1,R1 01140000
- BAL R8,INSTADR COMPUTE VIRTUAL ADDRESS @VA03696 01141000
- LA R1,3(0,0) MASK TO TEST FULL-WORD ALIGNMENT 01142000
- NR R1,R3 ... 01143000
- BNZ SPECEXCP OOPS - GENERATE A PROGRAM INTERRUPT 01144000
- TM VMPSTAT,VMV370R ECMODE MACHINE? @VMD0103 01145000
- BNZ STRECMOD YES - DIFFERENT ENTIRELY. @VMD0103 01146000
- SR R0,R0 @VMD0103 01147000
- BCTR R0,0 FLAG -1 ASSUMES C-REG 0 NOT TO @VMD0103 01148000
- * BE STORED. 01149000
- LR R1,R0 FLAG -1 ASSUMES C-REG 14 NOT TO @VMD0103 01150000
- * BE STORED. 01151000
- SR R3,R5 COMPUTE BASE OF DATA AREA, NEEDED@VMD0103 01152000
- * BY STRNG ROUTINE. (BASE IS PLACE 01153000
- * WHERE C-REG 0 WOULD GO IF RANGE 01154000
- * OF REGISTERS WAS EXTENDED DOWN- 01155000
- * WARD TO INCLUDE C-REG 0.) 01156000
- CR R5,R6 COMPARE END POINTS OF REG RANGE. @VMD0103 01157000
- BNH STRNOWRP DON'T HAVE WRAP FROM C-REG 15-0. @VMD0103 01158000
- * THE C-REGS DO WRAP OVER THE 15-0 BOUNDARY. WE WILL 01159000
- * TREAT IT AS TWO SUB-RANGES, ONE ON EACH SIDE OF THE 01160000
- * BOUNDARY. 01161000
- LR R4,R6 SAVE R6 (UPPER LIMIT OF RANGE)...@VMD0103 01162000
- LA R6,C15*L4 AND SET DUMMIED UPPER LIMIT OF @VMD0103 01163000
- * C-REG 15. 01164000
- BAL R9,STRNG ALTERS FLAGS (R0,R1) IF C-REGS @VMD0103 01165000
- * 0, 14 ARE IN THIS RANGE. 01166000
- LR R6,R4 RE-ESTABLISH R6 (TRUE UPPER LIMT)@VMD0103 01167000
- SR R5,R5 AND ESTABLISH DUMMIED LOWER LIMIT@VMD0103 01168000
- * OF C-REG 0. 01169000
- LA R3,16*L4(0,R3) RELOCATE THE DATA AREA BASE @VMD0103 01170000
- * UPWARD TO THE C-REG 0 POSITION 01171000
- * OF THE UPPER SUB-RANGE. (SEE 01172000
- * STRNG ROUTINE'S INPUT DESCRIPT.) 01173000
- STRNOWRP BAL R9,STRNG ALTERS FLAGS (R0,R1) IF CREGS 0, @VMD0103 01174000
- * 14 ARE IN THIS RANGE. 01175000
- * WE NOW ACT ON R0, R1 FLAGS AND STORE INDICATED C-REGS. 01176000
- LR R6,R1 SAVE FLAG OF -1 OR ADDR FOR C14. @VMD0103 01177000
- LTR R3,R0 PREPARE TO PROCESS C-REG 0. @VMD0103 01178000
- BM STRNOT0 FORGET IT, C-REG 0 NOT IN RANGE. @VMD0103 01179000
- BAL R9,STRVCHK GET REAL ADDR (OF R3) INTO R2, @VMD0103 01180000
- * ALSO CHECK STORAGE PROTECTION. 01181000
- L R1,VMVCR0 GET C-REG 0 FROM VMBLOK. @VMD0103 01182000
- ST R1,0(0,R2) STORE INTO STCTL'S DATA AREA. @VMD0103 01183000
- BAL R9,STRPERAA SEE IF VIRT. OR CP PER IS ACTIVE.@VMD0103 01184000
- STRNOT0 EQU * @VMD0103 01185000
- LTR R3,R6 PREPARE TO PROCESS C-REG 14. @VMD0103 01186000
- BM FASTER FORGET IT, C-REG 14 NOT IN RANGE.@VMD0103 01187000
- BAL R9,STRVCHK GET REAL ADDR (OF R3) INTO R2, @VMD0103 01188000
- * ALSO CHECK STORAGE PROTECTION. 01189000
- OI 0(R2),VMIOLOG ASSUME BIT TO BE STORE WILL BE 1.@VMD0103 01190000
- TM VMVCR14,VMIOLOG SEE IF C14 IN VMBLOK HAS A 1. @VMD0103 01191000
- BO STR14B OKAY, WE ASSUMED 1 CORRECTLY. @VMD0103 01192000
- NI 0(R2),X'FF'-VMIOLOG GUESSED WRONG. CHANGE TO 0.@VMD0103 01193000
- STR14B BAL R9,STRPERAA SEE IF VIRT. OR CP PER IS ACTIVE.@VMD0103 01194000
- B FASTER ALL DONE. RE-DISPATCH. @VMD0103 01195000
- SPACE 2 01196000
- *********************************************************************** 01197000
- * STRNG: A ROUTINE TO EXAMINE A NON-WRAPPING RANGE OF REGISTERS AND 01198000
- * DECIDE WHETHER REGISTER 0 AND REGISTER 14 ARE IN THE RANGE. 01199000
- *********************************************************************** 01200000
- * INPUTS: R5, R6 CONTAIN STARTING AND ENDING REG NUMBERS TIMES 4. 01201000
- * R0, R1 ARE FLAGS, INITIALIZED TO -1 OR TO AN ADDRESS. 01202000
- * R3 SET TO ADDRESS OF BASE OF DATA AREA (BASE IS WHERE REG 0 01203000
- * WOULD GET STORED, COMPUTED BY EXTENDING DATA AREA 01204000
- * DOWNWARD IF REG 0 IS NOT IN THE RANGE). 01205000
- * R9 HAS RETURN ADDRESS. 01206000
- * OUTPUTS: R0 IS SET TO ADDRESS FOR STORING REG 0 IN DATA AREA IF 01207000
- * REG 0 IS IN THE RANGE; OTHERWISE R0 IS UNCHANGED. 01208000
- * R1 IS SET TO ADDRESS FOR STORING REG 14 IN DATA AREA 01209000
- * IF REG 14 IS IN THE RANGE; OTHERWISE R1 IS UNCHANGED. 01210000
- *********************************************************************** 01211000
- STRNG LTR R5,R5 STARTING REG IS C-REG 0? @VMD0103 01212000
- BNZ STRNG0Z NO, SO (WITHOUT WRAP) C-REG 0 @VMD0103 01213000
- * CANNOT BE IN THE RANGE. 01214000
- LR R0,R3 ADDR. FOR C-REG 0 IN DATA AREA. @VMD0103 01215000
- STRNG0Z EQU * @VMD0103 01216000
- CH R6,=Y(C14*L4) IS THE END REG EITHER 14 OR 15? @VMD0103 01217000
- BLR R9 C-REG 14 IS NOT IN THE RANGE. @VMD0103 01218000
- BE STRNG14 C-REG 14 IS IN THE RANGE. @VMD0103 01219000
- * C-REG 14 MIGHT BE IN RANGE. POSSIBILITIES ARE X-15 AND 15-15. 01220000
- CR R5,R6 RANGE IS X-15 OR 15-15. WHICH? @VMD0103 01221000
- BER R9 RANGE IS 15-15. EXIT. @VMD0103 01222000
- STRNG14 EQU * C-REG 14 IS IN THE RANGE. @VMD0103 01223000
- LA R1,C14*L4(0,R3) ADDR FOR C-REG 14 IN DATA AREA. @VMD0103 01224000
- BR R9 @VMD0103 01225000
- SPACE 2 01226000
- *********************************************************************** 01227000
- * STRVCHK: GET REAL ADDR (0F R3) INTO R2, ALSO CHECK STORAGE PROTECTN. 01228000
- *********************************************************************** 01229000
- STRVCHK BAL R8,ADTRANS GET REAL ADDR (OF R3) INTO R2. @VMD0103 01230000
- CALL DMKPSASP CHECK STORAGE PROTECTION KEY. @VMD0103 01231000
- BZR R9 RETURN, NO PROTECTION PROBLEMS. @VMD0103 01232000
- B PROTEXCP EXIT TO PROTECTION INTERRUPT. @VMD0103 01233000
- SPACE 2 01234000
- *********************************************************************** 01235000
- * STRPERAA: PERFORM 'PERCHEK' CHECKING AFTER SOME INITIALIZATION. 01236000
- *********************************************************************** 01237000
- STRPERAA TM VMESTAT,VMPERCM VIRTUAL OR CP PER ACTIVE? @VMD0103 01238000
- BZR R9 NO, RETURN. SKIP PER EVENT CHECK@VMD0103 01239000
- LA R1,PERSALT STORAGE ALTERATION EVENT. @VMD0103 01240000
- LA R2,L4 FIELD LENGTH STORED. @VMD0103 01241000
- B PERCHEK GO TO PERCHEK ROUTINE TO SEE IF @VMD0103 01242000
- * EVENT NEEDS RECORDING. RETURN IS 01243000
- * TO ADDRESS ALREADY IN R9. 01244000
- SPACE 2 01245000
- STRECMOD L R10,VMECEXT EXTENSION BLOCK CONTAINS C-REGS. @VMD0103 01246000
- USING ECBLOK,R10 @VMD0103 01247000
- STRLOOPE BAL R8,ADTRANS GET REAL ADDR (OF R3) INTO R2. @VMD0103 01248000
- CALL DMKPSASP CHECK STORAGE PROTECTION KEYS. @VMD0103 01249000
- BNZ PROTEXCP NO MATCH - INTERRUPT. @VMD0103 01250000
- L R1,EXTCR0(R5) PICK UP A C-REG. @VMD0103 01251000
- ST R1,0(0,R2) STORE INTO VIRTUAL MEMORY. @VMD0103 01252000
- BAL R9,STRPERAA SEE IF VIRT. OR CP PER IS ACTIVE.@VMD0103 01253000
- STRNPERE EQU * @VMD0103 01254000
- CR R5,R6 IS CURRENT C-REG THE LAST ONE? @VMD0103 01255000
- BE FASTER YES - JUST RE-DISPATCH. @VMD0103 01256000
- LA R5,L4(0,R5) NEXT C-REG. @VMD0103 01257000
- NR R5,R4 R4=F60, WRAPS C-REG 16 TO C-REG 0@VMD0103 01258000
- LA R3,L4(0,R3) NEXT VIRTUAL LOCATION. @VMD0103 01259000
- B STRLOOPE @VMD0103 01260000
- DROP R10 @VMD0103 01261000
- EJECT 01262000
- PRPTLB EQU * PURGE TABLE LOOK-ASIDE BUFFER 01263000
- TM VMPSTAT,VMV370R IS THIS AN EC-MODE MACHINE ? @VA00780 01264000
- BZ OPEREXCP NO - REFLECT OPERATION EXCEPTION @VA00780 01265000
- * (CF 370 PRINCIPLES OF OPERATION) @VA00780 01266000
- OI VMESTAT,VMINVPAG FLAG BAD SHADOW PAGE TABLES @V3M4026 01267000
- BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01268000
- * RETURN HERE WITH LOCK HELD 01269000
- CALL DMKVATAB INVALIDATE ALL SHADOW PAGE TABLES 01270000
- NI APSTAT2,X'FF'-CPPTLBR & CLEAR PENDING FLAG @V4M0103 01271000
- PTLB PURGE TLB @VA07615 01272000
- B FASTER ...AND RE-DISPATCH VIRTUAL MACHINE 01273000
- SPACE 2 01274000
- PRLRA EQU * LOAD 'REAL' ADDRESS 01275000
- LA R1,1(0) INDEXING IS ALLOWED 01276000
- BAL R8,INSTADR GET VIRTUAL-VIRTUAL ADDRESS 01277000
- TM VMPSTAT,VMV370R ALLOW TO USE 'LRA' INSTRUCTION 01278000
- BZ OPEREXCP IF NOT - REFLECT OPERATION EXCEPTION 01279000
- LR R5,R11 LOAD ADDRESS OF USER'S VMBLOK 01280000
- BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01281000
- * RETURN HERE WITH LOCK HELD 01282000
- TM VMESTAT,VMEXTCM IS VM IN EXTENDED MODE 01283000
- BO VATLRAS YES - GET VIRTUAL-VIRTUAL ADDRESS 01284000
- LA R5,2(,R5) NO - COND. CODE IS IN OTHER LOCATION 01285000
- VATLRAS CALL DMKVATLA VIRTUAL-VIRTUAL TO VIRTUAL ADDRESS 01286000
- NI VMPSW+2-VMBLOK(R5),X'CF' RESET CONDITION CODE = 0 01287000
- IC R4,VMINST+1 GET REGISTER SPECIFICATION 01288000
- SRL R4,2(0) 01289000
- N R4,F60 REG. NO. * 4 01290000
- ST R2,VMGPRS(R4) PASS BACK TRANSLATED ADDRESS 01291000
- LTR R0,R0 WAS THE TRANSLATION O.K.? 01292000
- BZ PRLRAPE YES - CHECK FOR PER EVENT 01293000
- S R1,F15 CONVERT CODE FROM 16,17,18 TO 1,2,3 01294000
- SLL R1,4(0) POSITION FOR SETTING COND. CODE BITS 01295000
- IC R3,VMPSW+2-VMBLOK(,R5) CC, PROG MASK FROM PSW 01296000
- OR R3,R1 'OR' IN NEW CONDITION CODE 01297000
- STC R3,VMPSW+2-VMBLOK(,R5) AND SET IN VIRTUAL PSW 01298000
- PRLRAPE EQU * CHECK FOR PER EVENT 01299000
- TM VMESTAT,VMPERCM VIRTUAL OR CP PER ACTIVE ? 01300000
- BZ FASTER NO - JUST RETURN 01301000
- LA R1,PERGPRS GENERAL REGISTER ALTERATION 01302000
- BAL R9,PERCHEK RECORD DATA IF NEEDED 01303000
- B FASTER RETURN 01304000
- EJECT 01305000
- PSTIDP EQU * STORE CPU ID 01306000
- SLR R1,R1 NO INDEXING 01307000
- BAL R8,INSTADR COMPUTE VIRTUAL ADDRESS @VA03696 01308000
- L R6,F7 CHECK ALGINMENT 01309000
- NR R6,R3 MUST BE DBL-WD ALIGNED 01310000
- BNZ SPECEXCP NO GOOD - INTERRUPT 01311000
- BAL R8,ADTRANS GET REAL ADDRESS @VA03696 01312000
- CALL DMKPSASP CHECK STORAGE PROTECTION KEYS @V202232 01313000
- BNZ PROTEXCP NO GOOD - INTERRUPT 01314000
- *------------------- 01316000
- * ZAP CPU ID SO HE WON'T RECOGNIZE THE MODEL NUMBER 01317000
- *------------------- 01318000
- USING CPUID,R2 01319000
- OI CPUVERSN,X'FF' SET VERSION CODE FOR VIRTUAL MACHINE 01320000
- STH R6,CPUMCELL SET MCEL TO 0 - NO DATA WILL BE @V213135 01321000
- * OVERRIDE CPU SERIAL IN CASE CPUID SET BY MEANS OF 01322000
- * 'SET CPUID' COMMAND OR DIRECTORY 'OPTION' CONTROL STATEMENT 01323000
- MVC CPUSER(3),VMCPUID OVERRIDE FROM VMBLOK @V407466 01324000
- * STORED 01325000
- DROP R2 @VA08195 01325100
- TM APSTAT1,PROCIO IS THIS THE MAIN PROCESSOR @VA08195 01325200
- BO MAINMODL YES-WE ARE ON THE MAIN PROCESSOR @VA08195 01325300
- L R6,PREFIXB OTHER PROCESSOR ADDRESS @VA08195 01325400
- MAINMODL EQU * @VA08195 01325500
- USING CPUID,R2 @VA08195 01325600
- MVC CPUMODEL,CPUMODEL-PSA(R6) MOVE IN CPU MODEL NUM.@VA08195 01325700
- DROP R2 01326000
- TM VMESTAT,VMPERCM VIRTUAL OR CP PER ACTIVE ? 01327000
- BZ FASTER NO - JUST RETURN 01328000
- LA R1,PERSALT STORAGE ALTERATION 01329000
- LA R2,8(0) FIELD LENGTH STORED 01330000
- BAL R9,PERCHEK SET PER PENDING IF REQUIRED 01331000
- B FASTER ...AND RETURN 01332000
- SPACE 2 01333000
- PSTIDC EQU * STORE CHANNEL ID 01334000
- SLR R1,R1 NO INDEXING 01335000
- BAL R8,INSTADR GET CHANNEL ADDRESS 01336000
- NI VMPSW+2,X'CF' SET COND. CODE ZERO - EC MODE 01337000
- NI VMPSW+4,X'CF' SET CONDITION CODE ZERO - BC 01338000
- LR R1,R3 UNIT ADDR INTO R1 FOR DMKSCNVU. @VMD0103 01339000
- * NOTE: STIDC LOOKS ONLY AT THE CHANNEL ADDR., BUT WE 01340000
- * WILL BEGIN WITH THE PARTICULAR SPECIFIED UNIT ANYWAY. 01341000
- * IF SPECIFIED UNIT PORTION IS GARBAGE, WE FAIL AND WILL RESORT 01342000
- * TO LOOKING FOR ANY UNIT ON THE CHANNEL. BY STARTING WITH 01343000
- * THE PARTICULAR UNIT WE HAVE A BETTER CHANCE OF GIVING THE 01344000
- * USER ACCURATE STIDC DATA IF HE HAS VIOLATED THE RULE ABOUT 01345000
- * MAPPING ALL DEVICES ON A VIRTUAL CHANNEL TO REAL DEVICES ON 01346000
- * A SINGLE TYPE OF REAL CHANNEL. 01347000
- CALL DMKSCNVU IF CC=0, THEN R6=VCHBLOK, @VMD0103X01348000
- R7=VCUBLOK, AND R8=VDEVBLOK. @VMD0103 01349000
- * IF R6=-1, VCHBLOK WAS NOT FOUND. 01350000
- BNZ STICHNL NO VIRT. DEVICE FOR THIS UNIT ADR@VMD0103 01351000
- BAL R9,DVTYPCHK CHECK OUT THE VIRTUAL DEVICE. @VMD0103 01352000
- * IF IT IS A TYPE THAT MAPS TO A REAL 01353000
- * DEVICE, THEN DON'T RETURN HERE, BUT GO TO 01354000
- * DEVFND INSTEAD. OTHERWISE, RETURN HERE. 01355000
- STICHNL EQU * INITIAL UNIT ADDR DOES NOT MAP @VMD0103 01356000
- * TO A REAL DEVICE. 01357000
- LTR R6,R6 R6 (FROM DMKSCNVU) POINTS TO @VMD0103 01358000
- * VCHBLOK? 01359000
- BM PRIVCC3 CHANNEL NOT ACTIVE. SET CC=3. @VMD0103 01360000
- USING VCHBLOK,R6 @VMD0103 01361000
- LA R4,2 LOAD INCREMENT FOR LOOP. @VMD0103 01362000
- LA R5,30 LOAD LOOP LIMIT. @VMD0103 01363000
- SR R1,R1 CLEAR INDEX. @VMD0103 01364000
- NXTCU LH R7,VCHCUTBL(R1) LOAD HFWD OFFSET TO VCUBLOK. @VMD0103 01365000
- LTR R7,R7 IS THIS CONTROL UNIT ACTIVE? @VMD0103 01366000
- BM CULOOP NO, INCREMENT INDEX, LOOP AGAIN. @VMD0103 01367000
- A R7,VMCUSTRT OFFSET + START = CU ADDRESS. @VMD0103 01368000
- USING VCUBLOK,R7 @VMD0103 01369000
- SR R2,R2 CLEAR INDEX FOR TABLE OF DEVICE @VMD0103 01370000
- * OFFSETS. 01371000
- NXTDEV LH R8,VCUDVTBL(R2) LOAD HFWD OFFSET TO VDEVBLOK. @VMD0103 01372000
- LTR R8,R8 IS CORRESPONDING DEVICE ACTIVE? @VMD0103 01373000
- BM DEVLOOP NO, INCREMENT INDEX, LOOP AGAIN. @VMD0103 01374000
- A R8,VMDVSTRT OFFSET + START = VDEVBLOK ADDR. @VMD0103 01375000
- USING VDEVBLOK,R8 @VMD0103 01376000
- BAL R9,DVTYPCHK CHECK OUT THE VIRTUAL DEVICE. IF @VMD0103 01377000
- * IT IS A TYPE THAT MAPS TO A REAL DEVICE, 01378000
- * THEN DON'T RETURN HERE, BUT GO TO DEVFND 01379000
- * INSTEAD. OTHERWISE, RETURN HERE. 01380000
- DROP R7,R8 @VMD0103 01381000
- DEVLOOP BXLE R2,R4,NXTDEV TRY THE NEXT DEVICE. @VMD0103 01382000
- CULOOP BXLE R1,R4,NXTCU TRY THE NEXT CTRL UNIT. @VMD0103 01383000
- * FALLING THRU MEANS NO VIRTUAL DEVICE ON THE VIRTUAL CHANNEL 01384000
- * MAPS TO A REAL DEVICE. SO SIMULATE STIDC USING DATA FROM 01385000
- * THE VIRTUAL CHANNEL BLOCK RATHER THAN FROM A REAL CHANNEL 01386000
- * BLOCK. 01387000
- USEVIRT EQU * @V508690 01388000
- SLR R5,R5 START TO SET UP CHANNEL ID WORD 01389000
- TM VCHTYPE,VCHSEL SELECTOR CHANNEL ? 01390000
- BO PSETIDC YES - ALL ZEROES WILL DO 01391000
- ICM R5,B'1000',F16+3 TYPE '00010000' = BYTE MULTIPLEX 01392000
- TM VCHTYPE,VCHBMX IS THIS A VIRTUAL BLOCK MULTIPLEXOR ? 01393000
- BZ PSETIDC NO - AS EXPECTED 01394000
- SLL R5,1(0) TYPE '00100000' = BLOCK MULTIPLEXOR 01395000
- EJECT 01396000
- PSETIDC EQU * GET USER'S PAGE ZERO, DO THE STORE 01397000
- SLR R1,R1 01398000
- BAL R8,TRANS21 "TRANS 2,1,OPT=(BRING,DEFER)" 01399000
- ST R5,CHANID-PSA(0,R2) STORE CHANNEL ID 01400000
- B FASTER ...AND RE-DISPATCH MACHINE 01401000
- PRIVCC3 EQU * SET CONDITION CODE THREE 01402000
- LA R4,X'30' CONDITION CODE THREE TO BE SET 01403000
- SETPSWCC EQU * SET PSW CONDITION CODE 01404000
- LA R1,VMPSW+2 POSITION IF IN EC MODE 01405000
- TM VMESTAT,VMEXTCM IS HE ? 01406000
- BO *+8 YES 01407000
- LA R1,VMPSW+4 POSITION IF IN BC MODE 01408000
- EX R4,SETPECC SET CONDITION CODE 01409000
- B FASTER ...AND RE-DISPATCH 01410000
- SETPECC OI 0(R1),*-* 01411000
- SPACE 2 01412000
- *********************************************************************** 01413000
- * DVTYPCHK: SUBROUTINE CHECKS IF VIRTUAL DEVICE MAPS TO A REAL 01414000
- * DEVICE AND IF NOT IT RETURNS. BUT IF IT DOES MAP, 01415000
- * THEN IT NEVER RETURNS TO WHERE IT WAS CALLED FROM, BUT 01416000
- * FALLS THRU TO DEVFND INSTEAD. 01417000
- *********************************************************************** 01418000
- USING VDEVBLOK,R8 @VMD0103 01419000
- DVTYPCHK CLI VDEVTYPC,CLASDASD PERHAPS A DASD DEVICE? @VMD0103 01420000
- BE DVTYPOKY YES. SEE IF IT MAPS. @VMD0103 01421000
- TM VDEVSTAT,VDEVDED DEDICATED DEVICE? @VMD0103 01422000
- BZR R9 NO. RETURN. @VMD0103 01423000
- DVTYPOKY EQU * IT IS A TYPE THAT SHOULD MAP. @VMD0103 01424000
- ICM R8,15,VDEVREAL GET RDEVBLOK ADDRESS. @VMD0103 01425000
- DROP R8 @VMD0103 01426000
- BZR R9 NO ADDRESS. STRANGE. RETURN. @VMD0103 01427000
- SPACE 2 01428000
- USING RDEVBLOK,R8 @VMD0103 01429000
- DEVFND L R8,RDEVCUA GET ADDR OF CONTROL UNIT BLOK. @VMD0103 01430000
- USING RCUBLOK,R8 @VMD0103 01431000
- TM RCUTYPE,RCUSUB IS THIS A SUB-CONTROL UNIT? @VMD0103 01432000
- BZ GETCH NO, MAIN CONTROL. NEXT LEVEL IS @VMD0103 01433000
- * THE CHANNEL BLOK. 01434000
- * IT IS A SUB-CONTROL UNIT. NEXT LEVEL IS MAIN CONTROL UNIT. 01435000
- L R8,RCUPRIME GET MAIN CONTROL UNIT BLOK. @VMD0103 01436000
- GETCH L R4,RCUCHA PICK UP THE CHANNEL BLOK. @VMD0103 01437000
- DROP R8 @VMD0103 01438000
- USING RCHBLOK,R4 @VMD0103 01439000
- L R5,RCHSTIDC DATA FROM STIDC INSTR. ON THE @VMD0103 01440000
- * REAL CHANNEL. 01441000
- LTR R5,R5 FLAG -1 MEANS REAL STIDC GAVE @VMD0103 01442000
- * CC=3. 01443000
- BM PRIVCC3 REAL CHAN GAVE CC=3, SO GIVE THE @VMD0103 01444000
- * SAME THING NOW. 01445000
- * DATA IN R5 FROM REAL STIDC IS ALL SET EXCEPT FOR ONE THING. 01446000
- * THE REAL CHANNEL MIGHT HAVE BEEN A BLOCK MPX, BUT THE VIRTUAL 01447000
- * CHANNEL MIGHT BE SUPPOSED TO LOOK LIKE A SELECTOR (BECAUSE 01448000
- * OF DEFINE COMMAND). CHECK, AND IF SO RESET R5 TO BE SELECTOR. 01449000
- TM VCHTYPE,VCHSEL VIRTUAL CHANNEL IS SELECTOR? @VMD0103 01450000
- BNO PSETIDC NO. VALUE IN R5 IS OKAY, USE IT.@VMD0103 01451000
- N R5,=X'DFFFFFFF' TURN OFF BLOCK MPX BIT (IF ON). @VMD0103 01452000
- B PSETIDC USE STIDC DATA FROM R5. @VMD0103 01453000
- DROP R4,R6 @VMD0103 01454000
- SPACE 01455000
- EJECT 01456000
- *--------------------------------------------------------------------* 01457000
- * COMPARE AND SWAP - CS 01458000
- *--------------------------------------------------------------------* 01459000
- PRCS COUNT DMKPRVCS MP-SAFE INCR. TO COUNTER @V407593 01460000
- LA R6,3 SET FOR WD BDY CHECK @V2B2638 01461000
- B PRCDS1 AND CONTINUE... @V200198 01462000
- SPACE 1 01463000
- *--------------------------------------------------------------------* 01464000
- * COMPARE DOUBLE AND SWAP - CDS 01465000
- *--------------------------------------------------------------------* 01466000
- PRCDS COUNT DMKPRVCD MP-SAFE INCR. TO COUNTER @V407593 01467000
- TM VMINST+1,X'11' R1 AND R3 MUST SPECIFY EVEN REGS @V2B2638 01468000
- BNZ SPECEXCP OR WE HAVE INVALID FORMAT. @V200198 01469000
- LA R6,7 SET FOR DBL WD CHECK @V200198 01470000
- PRCDS1 MC MNCOSIM,MNCLINST CLASS INST, CODE SIMULATION @VM01017 01471000
- SLR R1,R1 SET FOR NO INDEXING. @V2B2638 01472000
- BAL R8,INSTADR COMPUTE VIRTUAL ADDRESS @VA03696 01473000
- LR R7,R3 SET UP FOR BOUNDARY CHECK... @V200198 01474000
- NR R7,R6 CHECK IT (PRESERVE R3 FOR PER) @V200198 01475000
- BNZ SPECEXCP NOPE, SPECIFICATION EXCEPTION @V200198 01476000
- BAL R8,ADTRANS GET REAL ADDRESS @VA03696 01477000
- NI VMPSW+4,X'CF' SET CC0 FOR BC @V200198 01478000
- NI VMPSW+2,X'CF' SET CC0 FOR EC @V200198 01479000
- IC R5,VMINST+1 GET R1/R3 DESIGNATIONS @V200198 01480000
- LR R1,R5 AND REMEMBER FOR LATER. @V200198 01481000
- SRL R5,2 INDEX TO R1... @V200198 01482000
- N R5,F60 IN THE.... @V200198 01483000
- LR R4,R5 ...(SAVE FOR POSSABLE PER)... @V200198 01484000
- ALR R5,R11 USERS VMBLOK. @V200198 01485000
- EX R6,PRCDS3 COMPARE THE PROPER ARGUMENTS @V200198 01486000
- BE PRCDS2 EQUAL, OPER3 REPLACES OPER2. @V200198 01487000
- CALL DMKPSAFP NOW CHK FETCH (FASTER THIS WAY) @V200198 01488000
- BNZ PROTEXCP OOPS... @V200198 01489000
- EX R6,PRCDS4 UNEQUAL, OPER2 REPLACES OPER1 @V200198 01490000
- LA R1,PERGPRS JUST IN CASE WE HAVE A PER @V200198 01491000
- TM VMESTAT,VMEXTCM IN EXTENDED MODE? @V200198 01492000
- BO *+12 YES, SKIP THE BC SET... @V200198 01493000
- OI VMPSW+4,X'10' SET CC1 IN BC MODE PSW @V200198 01494000
- B DOPER GO CHECK FOR PER @V200198 01495000
- OI VMPSW+2,X'10' SET CC1 IN EC MODE PSW @V200198 01496000
- B DOPER GO CHECK FOR PER @V200198 01497000
- PRCDS2 SLL R1,2 INDEX TO R3... @V200198 01498000
- N R1,F60 IN THE... @V200198 01499000
- ALR R1,R11 USERS VMBLOK. @V200198 01500000
- CALL DMKPSASP CHECK OPER2 FOR STORAGE PROT @V200198 01501000
- BNZ PROTEXCP OOPS @V200198 01502000
- EX R6,PRCDS5 EQUAL, OPER3 REPLACES OPER2 @V200198 01503000
- LA R1,PERSALT PER STORAGE ALTERATION @V200198 01504000
- LR R2,R6 FIELD LENGTH @V200198 01505000
- DOPER TM VMESTAT,VMPERCM IS PER ACTIVE? @V200198 01506000
- BZ FASTER NOPE. @V200198 01507000
- BAL R9,PERCHEK GO CHECK IT OUT @V200198 01508000
- B FASTER DONE @V200198 01509000
- EJECT 01510000
- PRCDS3 CLC VMGPRS-VMBLOK(0,R5),0(R2) R1 : S2 @V200198 01511000
- PRCDS4 MVC VMGPRS-VMBLOK(0,R5),0(R2) R1 <-- S2 (R1 NE S2) @V200198 01512000
- PRCDS5 MVC 0(0,R2),VMGPRS-VMBLOK(R1) S2 <-- R3 (R1 EQ S2) @V200198 01513000
- EJECT 01514000
- *------------------------------------------------ 01515000
- * CALLING SEQUENCE FOR PERCHEK: 01516000
- * 01517000
- * VMESTAT MUST BE CHECKED FOR VMPERCM BEFORE CALLING PERCHEK 01518000
- * R1 CONTAINS TYPE OF PER EVENT, PERGPRS OR PERSALT 01519000
- * 01520000
- * FOR PERGPRS: 01521000
- * R4 CONTAINS THE GPR NO. * 4 01522000
- * 01523000
- * FOR PERSALT: 01524000
- * R2 CONTAINS THE FIELD LENGTH 01525000
- * R3 CONTAINS THE VIRTUAL ADDRESS WHICH IS CHANGING 01526000
- *------------------------------------------------ 01527000
- PERCHEK EQU * CHECK FOR PER EVENT SIMULATED 01528000
- TM VMESTAT,VMPERCM DOES ANYONE WANT THIS? PER001 01529000
- BZR R9 NO PER, RETURN PER001 01530000
- TM VMTRCTL,VMTRPER CP PER? PER001 01531000
- BZ OWNPER USER PER, GO HANDLE PER001 01532000
- L R10,VMPERCTL OTHERWISE IT'S OURS. PER001 01533000
- LA R15,PERCR9-PERBLOK(,R10) LOAD START OF CR'S. PER001 01534000
- LA R14,PERADDR-PERBLOK(,R10) LOAD EVENT ADDR LOC. PER001 01535000
- B TRAPPER AND LOOK AT THE INTERRUPT. PER001 01536000
- OWNPER L R10,VMECEXT EXTENTION BLOCK ADDRESS. PER001 01537000
- LA R15,EXTCR9-ECBLOK(,R10) START OF CR'S. PER001 01538000
- LA R14,EXTPERAD-ECBLOK(,R10) START OF PERADDR, PEPER001 01539000
- TRAPPER EQU * GPR 15 = ADDRESS OF CR9,10,11 VALUES 01540000
- IC R0,0(,R15) GET CONTROL BYTE FROM C-REG 9 01541000
- NR R0,R1 MASKED ON FOR THIS TYPE? 01542000
- BCR 8,R9 NO - RETURN 01543000
- CH R1,=AL2(PERGPRS) REGISTER ALTERATION? 01544000
- BNE PERCH01 NO - CHECK STORAGE 01545000
- SRL R4,2(0) GET REGISTER NUMBER 01546000
- N R4,F15 INSURE WITHIN RANGE 01547000
- L R0,=A(X'8000') GET A ONE BIT FOR REGISTER CHECKING 01548000
- SRL R0,0(R4) SHIFT BIT INTO POSITION 01549000
- N R0,0(,R15) MONITORING THIS REGISTER? 01550000
- BCR 8,R9 NO - RETURN 01551000
- PERDONE EQU * PER EVENT NEEDS RECORDING 01552000
- TM VMPEND,VMPERPND PER ALREADY PENDING? 01553000
- BZ PERDON1 NO - SET UP EVERYTHING 01554000
- IC R0,4(0,R14) PER CODE BITS 01555000
- OR R0,R1 ADD NEW EVENT TYPE CODE 01556000
- STC R0,4(0,R14) ...AND RESET 01557000
- BR R9 RETURN TO CALLER 01558000
- PERDON1 EQU * SET ALL INFO IN EXTENSION BLOCK 01559000
- SLL R1,8(0) SHIFT CODE BITS 01560000
- STH R1,4(0,R14) ...TO SET VALUE IN EXTENSION BLOCK 01561000
- L R1,VMPSW+4 INSTRUCTION ADDRESS 01562000
- LH R0,VMPRGIL INSTR. LENGTH CODE FROM INTRPT 01563000
- SLR R1,R0 (PSW ADDR MAY APPEAR NEGATIVE) 01564000
- ST R1,0(0,R14) ...GOES IN ALSO 01565000
- MVI 0(R14),X'00' MAKE SURE HIGH-ORDER IS ZERO 01566000
- OI VMPEND,VMPERPND SET PER DATA AVAILABLE 01567000
- BR R9 RETURN TO CALLER 01568000
- EJECT 01569000
- PERCH01 EQU * CHECK FOR STORAGE ALTERATION PER 01570000
- CH R1,=AL2(PERSALT) IF NOT THIS... 01571000
- BCR 7,R9 ...DON'T KNOW WHAT IT IS 01572000
- L R0,4(,R15) STARTING ADDRESS (VIRTUAL) 01573000
- CL R0,8(,R15) DOES IT INVOLVE WRAP-AROUND? 01574000
- BH PERCH03 YES - BLOODY 01575000
- CLR R0,R3 VIRTUAL ADDRESS IS IN R3 01576000
- BL PERCH02 R3 ABOVE LOW BOUND 01577000
- BE PERDONE HIT IT ON THE NOSE 01578000
- LA R2,0(R2,R3) ADD FIELD LENGTH... 01579000
- CLR R2,R0 ...TO CHECK END OF FIELD 01580000
- BH PERDONE HIT IT THIS TIME 01581000
- BR R9 NO RECORDABLE EVENT 01582000
- PERCH02 EQU * R3 ABOVE LOW BOUND 01583000
- CL R3,8(,R15) IS IT BELOW TOP END? 01584000
- BNH PERDONE HIT IT 01585000
- BR R9 OUT OF THE RANGE 01586000
- PERCH03 EQU * STORAGE WRAP-AROUND CASE 01587000
- CLR R0,R3 BELOW FIRST VALUE? 01588000
- BNH PERDONE VIRT ADDR < 1ST OF RANGE @V200198 01589000
- CL R3,8(,R15) OR ABOVE LAST VALUE? 01590000
- BNH PERDONE NO - EVENT @V200198 01591000
- LA R2,0(R2,R3) CHECK END OF FIELD 01592000
- CR R2,R0 ... @V200198 01593000
- BNL PERDONE HIT IT HERE @V200198 01594000
- BR R9 NO RECORDABLE EVENT 01595000
- EJECT 01596000
- *---------------------------------------------------------------------* 01597000
- * 'GETADDR' - COMPUTE VIRTUAL AND REAL ADDRESSES FROM BASE, * 01598000
- * DISPLACEMENT FORM. FOR VIRTUAL 370R, A CHECK IS MADE * 01599000
- * FOR VIRTUAL PAGE OR SEGMENT EXCEPTION, OR FOR FILLING * 01600000
- * IN THE VM SHADOW TABLES. * 01601000
- * * 01602000
- * ON ENTRY: R9 = RETURN ADDRESS * 01603000
- * INSTRUCTION IS IN VMBLOK(VMINST) * 01604000
- * R1 = 0 => NO INDEX REGISTER * 01605000
- * R1 ยฌ= 0 => COMPUTE INDEXING * 01606000
- * * 01607000
- * ON EXIT: REQUIRED PAGE IS IN CORE * 01608000
- * R2 = REAL ADDRESS REFERENCED * 01609000
- * R3 = VIRTUAL ADDRESS * 01610000
- *---------------------------------------------------------------------* 01611000
- GETADDR EQU * 01612000
- BAL R8,INSTADR GET ADDRESS FROM INSTRUCTION 01613000
- BAL R8,ADTRANS TRANSLATE TO REAL ADDRESS 01614000
- BR R9 ...AND RETURN TO CALLER 01615000
- SPACE 01616000
- * INPUTS TO INSTADR: INSTR. IN VMBLOK; R1 = FLAG (SEE ABOVE); 01617000
- * R8 = RETURN ADDRESS. 01618000
- * OUTPUTS: R3 = VIRTUAL ADDR.; R1, R2 ARE DESTROYED. 01619000
- INSTADR EQU * COMPUTE VIRTUAL ADDRESS FROM INSTRUCTION 01620000
- LA R3,X'FFF' MASK FOR INSTRUCTION DISPLACEMENT@V213235 01621000
- N R3,VMINST GET DISPLACEMENT FIELD ONLY @V213235 01622000
- IC R2,VMINST+2 01623000
- SRL 2,2(0) BASE REG. NO. * 4 01624000
- N R2,F60 01625000
- BZ NOBASER ZERO BASE 01626000
- L R2,VMGPRS(R2) BASE REGISTER VALUE 01627000
- NOBASER EQU * 01628000
- LA R3,0(R3,R2) VIRTUAL ADDRESS 01629000
- LTR R1,R1 COMPUTE INDEX? 01630000
- BCR 8,R8 NO - JUST RETURN 01631000
- IC R1,VMINST+1 01632000
- SLL R1,2(0) INDEX REG. NO. * 4 01633000
- N R1,F60 01634000
- BCR 8,R8 NO INDEX - RETURN 01635000
- L R1,VMGPRS(R1) INDEX REGISTER VALUE 01636000
- LA R3,0(R1,R3) INDEXED VIRTUAL ADDRESS 01637000
- BR R8 RETURN 01638000
- SPACE 2 01639000
- * INPUTS TO ADTRANS: R3 = VIRTUAL ADDR.; R8 = RETURN ADDR. 01640000
- * OUTPUTS: R2 = REAL ADDR (OF R3 INPUT); 01641000
- * R0, R1, R14, R15 ARE DESTROYED. 01642000
- ADTRANS EQU * TRANSLATE VIRTUAL ADDRESS TO REAL 01643000
- TM VMESTAT,VMEXTCM IN EC-MODE NOW? 01644000
- BZ SIMPTRN NO - THAT'S TOO EASY 01645000
- TM VMPSW,TRANMODE IN TRANSLATE MODE ALSO? 01646000
- BO CALLVAT YES - A WORTHY CHALLENGE 01647000
- SIMPTRN EQU * 01648000
- LR R1,R3 VIRTUAL ADDRESS TO R1 01649000
- TRANS21 LCTL C1,C1,VMSEG GET SEG-TABLE ORIGIN @V407593 01650000
- LRA R2,0(0,R1) TRY FOR REAL ADDRESS @V407593 01651000
- BC 8,TR21END GOTIT, LOCK NOT NEEDED. @V407593 01652000
- BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01653000
- * RETURN HERE WITH LOCK HELD 01654000
- TRANS 2,1,OPT=(BRING,DEFER),ADEX=ADDREXCP @V407593 01655000
- TR21END BR R8 RETURN TO CALLER @V407593 01656000
- EJECT 01657000
- CALLVAT EQU * TRANS. VIRT-VIRT TO REAL 01658000
- TM VMESTAT,VMINVPAG SHADOW TABLES VALID? @VM01060 01659000
- BNZ CALLVAT1 NOPE, CALL DMKVAT FOR THIS @VM01060 01660000
- L R1,VMECEXT GET THE USER'S C-REGS 01661000
- LCTL C0,C1,EXTSHCR0-ECBLOK(R1) POINT TO SHADOW TABLES 01662000
- LRA R2,0(0,R3) MAKE THE ATTEMPT FIRST 01663000
- LCTL C0,C0,CPCREG0 RESTORE STANDARD C-REGS 01664000
- LCTL C1,C1,VMSEG ...BEFORE WE GO ANYWHERE 01665000
- BCR 8,R8 ALL O.K. - LET HIM GO 01666000
- CALLVAT1 BAL R14,LOCKET GO LOCK/STACK SYSTEM, AND @V407593 01667000
- * RETURN HERE WITH LOCK HELD 01668000
- CALL DMKVATRN VIRTUAL ADDRESS IS IN R3 01669000
- LTR R0,R0 CHECK RETURN CODE 01670000
- BCR 8,R8 SUCCESSFUL TRANSLATION 01671000
- CL R1,F5 RELOCATION INTERRUPT ? @VA03696 01672000
- BE ADDREXCP NO..NORMAL PATH.. @VA03696 01673000
- * INTERRUPT CODE IS IN R1, EXCEPTION ADDRESS IN R3 01674000
- L R4,VMPSW+4 SET TO BACK UP PSW ADDRESS 01675000
- SH R4,VMPRGIL ILC DATA SAVED IN VMBLOK 01676000
- ST R4,VMPSW+4 ... 01677000
- GOTO DMKVATEX SIMULATE RELOCATION INTERRUPT 01678000
- DS 0F 01679000
- DMKPRVNC DC F'0' NO. OF CALLS TO DMKPRVLG @V2B2638 01680000
- DMKPRVEK DC F'0' INST COUNT FOR X'08' SSK @V2B2638 01681000
- DMKPRVIK DC F'0' INST COUNT FOR X'09' ISK @V2B2638 01682000
- DMKPRVEX DC F'0' INST COUNT FOR X'44' EX ON @V2B2638 01683000
- * SIM INST 01684000
- SPACE 2 01685000
- * THE FOLLOWING TABLES MUST BE KEPT INTACT FOR CORRECT COUNTER MAINT 01686000
- SPACE 01687000
- CNTTAB1 EQU * X'80'-X'85' = 6 ENTRIES @V2B2638 01688000
- DMKPRVMS DC F'0' (X'80') INST COUNT FOR SSM @V2B2638 01689000
- DC F'0' (X'81') RESERVED @V2B2638 01690000
- DMKPRVLP DC F'0' (X'82') INST COUNT FOR LPSW @V2B2638 01691000
- DMKPRVDI DC F'0' (X'83') INST COUNT FOR DIAG @V2B2638 01692000
- DC F'0' (X'84') RESERVED @V2B2638 01693000
- DC F'0' (X'85') RESERVED @V2B2638 01694000
- SPACE 01695000
- CNTTAB2 EQU * X'AC'-X'B7' = 12 ENTRIES @V2B2638 01696000
- DMKPRVMN DC F'0' (X'AC') INST COUNT FOR STNSM @V2B2638 01697000
- DMKPRVMO DC F'0' (X'AD') INST COUNT FOR STOSM @V2B2638 01698000
- DC F'0' (X'AE') RESERVED @V2B2638 01699000
- DC F'0' (X'AF') RESERVED @V2B2638 01700000
- DC F'0' (X'B0') RESERVED @V2B2638 01701000
- DMKPRVLR DC F'0' (X'B1') INST COUNT FOR LRA @V2B2638 01702000
- DC F'0' B2 INSTS COUNTED SEPARATELY @V2B2638 01703000
- DC F'0' (X'B3') RESERVED @V2B2638 01704000
- DC F'0' (X'B4') RESERVED @V2B2638 01705000
- DC F'0' (X'B5') RESERVED @V2B2638 01706000
- DMKPRVTC DC F'0' (X'B6') INST COUNT FOR STCLT @V2B2638 01707000
- DMKPRVLC DC F'0' (X'B7') INST COUNT FOR LCTL @V2B2638 01708000
- SPACE 01709000
- DMKPRVB2 EQU * X'B200'-X'B213' = 20 ENTRIES @V2B2638 01710000
- DC F'0' (X'B200') RESERVED @V2B2638 01711000
- DC F'0' (X'B201') RESERVED @V2B2638 01712000
- DMKPRVCP DC F'0' (X'B202') INST COUNT FOR STIDP @V2B2638 01713000
- DMKPRVCH DC F'0' (X'B203') INST COUNT FOR STIDC @V2B2638 01714000
- DMKPRVTE DC F'0' (X'B204') INST COUNT FOR SCK @V2B2638 01715000
- DC F'0' (X'B205') RESERVED @V2B2638 01716000
- DMKPRVCE DC F'0' (X'B206') INST COUNT FOR SCKC @V2B2638 01717000
- DMKPRVCT DC F'0' (X'B207') INST COUNT FOR STCKC @V2B2638 01718000
- DMKPRVPE DC F'0' (X'B208') INST COUNT FOR SPT @V2B2638 01719000
- DMKPRVPT DC F'0' (X'B209') INST COUNT FOR STPT @V2B2638 01720000
- DMKPRVEP DC F'0' (X'B20A') INST COUNT FOR SPKA @V2B2638 01721000
- DMKPRVIP DC F'0' (X'B20B') INST COUNT FOR IPK @V2B2638 01722000
- DC F'0' (X'B20C') RESERVED @V2B2638 01723000
- DMKPRVPB DC F'0' (X'B20D') INST COUNT FOR PTLB @V2B2638 01724000
- DC 5F'0' (X'B20E'-'B212') RESERVED @V2B2638 01725000
- DMKPRVRR DC F'0' (X'B213') INST COUNT FOR RRB @V2B2638 01726000
- INDTAB DC 28AL1((*-INDTAB)*4) 28 ENTRIES @V2B2638 01727000
- SPACE 01728000
- DMKPRVCS DC F'0' (X'BA') INST COUNT FOR CS @V2B2638 01729000
- DMKPRVCD DC F'0' (X'BB') INST COUNT FOR CDS @V2B2638 01730000
- SPACE 3 01731000
- * THE FOLLOWING 56-BYTE DATA LIST MUST BE KEPT CONTIGUOUS AND IN ORDER 01732000
- * BECAUSE IT IS USED BY THE EXPANDED VIRTUAL MACHINE ASSIST TO PROCESS 01733000
- * THE FOLLOWING PRIVILEGED OPS: LPSW, PTLB, SCKC, SIO, SIOF, SPT, SSM, 01734000
- * STNSM, AND STOSM. 01735000
- SPACE 01736000
- DMKPRVMA DS 0F POINTER LIST FOR EXPANDED VMA @V3M4026 01737000
- DC V(DMKVSIVS) +0 ENTRY POINT FOR 'SIO' ASSIST @V3M4026 01738000
- DC V(DMKVSIEX) +4 BASE ADDR/ENTRY PT FOR 'SIO' @V3M4026 01739000
- DC V(DMKDSPCH) +8 NO NEED TO CHECK NEW PSW @V3M4026 01740000
- DC V(DMKTMRCC) +12 ENTRY POINT USED BY 'SCKC' @V3M4026 01741000
- DC V(DMKTMR) +16 BASE ADDR FOR 'SCKC', 'SPT' @V3M4026 01742000
- DC V(DMKTMRSP) +20 ENTRY POINT USED BY 'SPT' @V3M4026 01743000
- DC V(DMKVATAT) +24 ADDR OF 'ARCHTECT' IN DMKVAT @V3M4026 01744000
- DC V(DMKDSPB) +28 MUST CHECK OUT NEW PSW @V3M4026 01745000
- DMKPRVVS DC F'0' +32 NO. OF EVMA SIO/SIOF'S @V3M4026 01746000
- DMKPRVVL DC F'0' +36 NO. OF EVMA LPSW'S @V3M4026 01747000
- DMKPRVVM DC F'0' +40 NO. OF EVMA SSM/STXSM'S @V3M4026 01748000
- DMKPRVVC DC F'0' +44 NO. OF EVMA SCKC'S @V3M4026 01749000
- DC F'0' +48 RESERVED @V3M4026 01750000
- DMKPRVVP DC F'0' +52 NO. OF EVMA SPT'S @V3M4026 01751000
- EJECT 01752000
- LTORG 01753000
- L4 EQU 4 GENERAL USE AS SYMBOLIC LENGTH. @VMD0103 01754000
- EJECT 01755000
- COPY EQU 01756000
- COPY VMBLOK 01757000
- COPY TREXT 01758000
- COPY PERBLOKS PER001 01758100
- COPY RBLOKS @V508690 01759000
- COPY DEVTYPES @V508690 01760000
- COPY VBLOKS 01761000
- PSA 01762000
- COPY CORE 01763000
- COPY SAVE @V407593 01764000
- END DMKPRVLG 01765000
ibm/vm370-lib/cp/dmkprv.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator