VMA TITLE 'DMKVMA (CP) VM/370 - RELEASE 6' 00001000 ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000 *. 00003000 * MODULE NAME - 00004000 * 00005000 * DMKVMA 00006000 * 00007000 * FUNCTION - 00008000 * 00009000 * 00010000 * ATTRIBUTES - 00011000 * REENTRANT, RESIDENT, CALLED VIA BALR 00012000 * 00013000 * ENTRY POINTS - 00014000 * DMKVMASH - CALLED VIA BALR WHEN 'LASTUSER' 00015500 * WAS RUNNING A SHARED SYSTEM. 00016000 * DMKVMASW - CALL VIA A BALR FROM DMKLOK TO SWITCH A 00017000 * VIRTUAL MACHINES SHARED PAGE TABLE POINTERS 00018000 * TO THE CURRENT PROCESSOR'S PAGE TABLES. 00019000 * 00020000 * DMKVMAS1 - ANCHOR FOR SHARED SYSTEMS (SHRTABLE POINTER) 00021000 * DMKVMAS2 - ANCHOR FOR NAMED SYSTEMS (SHRTABLE POINTER) 00022000 * 00023000 * ENTRY CONDITIONS - 00024000 * DMKVMASH 00025000 * GPR 11 = ADDRESS OF USER'S VMBLOK 00026000 * GPR 14 = BALR RETURN ADDRESS 00027000 * GPR 15 = ENTRY POINT 00028000 * 00029000 * DMKVMASW 00030000 * GPR 11 = ADDRESS OF USER'S VMBLOK 00031000 * GPR 14 = BALR RETURN ADDRESS 00032000 * GPR 15 = ENTRY POINT ADDRESS 00033000 * 00034000 * EXIT CONDITIONS - 00035000 * NORMAL - 00036000 * CONDITION CODE IT SET TO ZERO 00037000 * ERROR - 00038000 * CONDITION CODE IS SET TO NON-ZERO. 00039000 * 00040000 * FOR DMKVMASH, WHEN CONTROL IS RETURNED TO THE 00041000 * CALLER, GPR-2 WILL CONTAIN THE REAL ADDRESS OF THE LAST 00042000 * SHARED PAGE THAT WAS CHANGED. 00043000 * 00044000 * CALLS TO OTHER ROUTINES - 00045000 * DMKERMSG - TO SEND ERROR MESSAGES TO THE TERMINAL. 00046000 * DMKFREE - TO OBTAIN FREE STORAGE 00047000 * DMKFRET - TO RETURN STORAGE GOTTEN BY CALL TO DMKFREE 00048000 * DMKSTKCP - STACK A CPEXBLOK 00049000 * DMKCVTBH - CONVERT BINARY TO HEX 00050000 * DMKCFMBK - TO PUT USER IN CONSOLE FUNCTION MODE 00051000 * DMKDSPCH - DISPATCHER 00052000 * DMKPTRUL - TO UNLOCK A PAGE IN STORAGE 00053000 * DMKPTRFT - RELEASE A REAL STORAGE FRAME 00054000 * 00055000 * TABLES/WORKAREAS - 00056000 * ECBLOK 00057000 * BALRSAVE 00058000 * VMABLOK 00059000 * SHRTABLE 00060000 * VMBLOK 00061000 * PAGTABLE 00062000 * SEGTABLE 00063000 * SWPTABLE 00064000 * SWTHSAVE 00065000 * TEMPSAVE 00066000 * DMKSNTBL 00067000 * DMKPTRSC 00068000 * DMKPTRRC 00069000 * DMKDSPNP 00070000 * 00071000 * REGISTER USAGE - 00072000 * GPR0 - PREFIX STORAGE AREA 00073000 * GPR5 - ADDRESS OF SWPTABLE 00074000 * GPR6 - ADDRESS OF PAGCORE 00075000 * GPR7 - ADDRESS OF CORTABLE 00076000 * GPR8 - ADDRESS OF SEGTABLE 00077000 * GPR9 - ADDRESS OF VMABLOK 00078000 * GPR10- ADDRESS OF SHRTABLE 00079000 * GPR11- ADDRESS OF VMBLOK 00080000 * GPR12- BASE REGISTER FOR THIS MODULE 00081000 * GPR13- ADDRESS OF STANDARD SAVE AREA 00082000 * GPR14- LINKAGE REGISTER 00083000 * GPR15- LINKAGE REGISTER 00084000 * 00085000 * NOTES - 00086000 * NONE 00087000 * 00088000 * ABEND CODES - 00089000 * VMA008 - VMPAGES TO GO NEGATIVE 00090000 * 00091000 * OPERATION - 00092000 * DMKVMASH CHECKS ALL SHARED PAGES ASSOCIATED WITH SHARED NAMED 00093000 * SYSTEMS AND DETERMINES IF THEY HAVE BEEN CHANGED. IF NONE 00094000 * WERE CHANGED RETURN IS MADE BACK TO THE CALLER WITH THE 00095000 * CONDITION CODE = 0. OTHERWISE THE CONDITION CODE IS MADE 00096000 * NON-ZERO AND GPR-2 CONTAINS THE REAL ADDRESS OF THE LAST 00097000 * SHARED PAGE TAHT WAS CHANGED. 00098000 * 00099000 * 00100000 * 00101000 * DMKVMASW IS CALLED BY THE LOCK MANAGER WHENEVER A VIRTUAL 00102000 * MACHINE BLOCK LOCK IS OBTAINED FOR A VIRTUAL MACHINE WHO 00103000 * IS RUNNING ONE OR MORE SHARED NAMED SYSTEMS AND WAS LAST 00104000 * SERVICED ON THE OPPOSITE PROCESSOR. ALL SHARED PAGE TABLE 00105000 * POINTERS WILL BE SWITCHED TO THE CURRENT PROCESSOR AND THE 00106000 * VMBLOK WILL BE UPDATED TO REFLECT SERVICING WAS LAST 00107000 * PERFORMED ON THIS PROCESSOR. 00108000 *. 00109000 EJECT 00110000 COPY OPTIONS @V304735 00111000 COPY LOCAL @V304735 00112000 DMKVMA CSECT @V304735 00113000 ENTRY DMKVMACT @V304735 00114000 ENTRY DMKVMAS1,DMKVMAS2 @VM03171 00115000 ENTRY DMKVMASH @V304735 00116000 ENTRY DMKVMASW @V407511 00117000 EXTRN DMKPTRSC @V304735 00118000 EXTRN DMKPTRRC @V408246 00119000 EXTRN DMKDSPNP @V304735 00120000 EXTRN DMKCVTBH @V304735 00121000 EXTRN DMKCFMBK @V304735 00122000 EXTRN DMKSTKCP @V304735 00123000 EXTRN DMKERMSG @V304735 00124000 EXTRN DMKSNTBL,DMKPTRUL,DMKPTRFT @V60BC11 00125000 EXTRN DMKPTRPW @VA08037 00126000 AIF (NOT &AP).LOKSY4 00127000 EXTRN DMKSTKMP,DMKLOKSY @V60BC11 00128000 .LOKSY4 ANOP 00129000 SPACE 00130000 USING PSA,R0 @V304735 00131000 USING SWPTABLE,R5 @V304735 00132000 USING PAGCORE,R6 @V304735 00133000 USING CORTABLE,R7 @V304735 00134000 USING SEGTABLE,R8 @V304735 00135000 USING VMABLOK,R9 @V304735 00136000 USING SHRTABLE,R10 @V304735 00137000 USING VMBLOK,R11 @V304735 00138000 USING DMKVMA,R12 @V304735 00139000 USING SAVEAREA,R13 @V304735 00140000 SPACE 2 00141000 EJECT 00142000 EJECT 00143000 *. 00144000 ********************************************************************** 00145000 * 00146000 * CP ASSIST INSTRUCTION SHAREDPAGE - SCAN FOR A 00147000 * CHANGED SHARED PAGE. 00148000 * 00149000 * OPERANDS: 00150000 * 1 = ADDRESS OF VMBLOK 00151000 * 2 = NOT USED 00152000 * 00153000 * REGISTER INPUT: 00154000 * R14 = EXIT ADDRESS 00155000 * 00156000 * SYSTEM DATA AREAS REFERENCED: 00157000 * SHRTABLE, VMABLOK, VMBLOK, PAGE TABLE(S) 00158000 * 00159000 * EXITS: 00160000 * 1. ADDRESS IN R14 (NORMAL COMPLETION) 00161000 * REGISTER OUTPUT: NONE CHANGED BY THIS 00162000 * INSTRUCTION. 00163000 * 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL) 00164000 * NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT 00165000 * TO A NOOP. 00166000 * 00167000 ********************************************************************** 00168000 *. 00169000 SPACE 1 00170000 DMKVMASH DS 0H %VA07223 00171000 DC X'E613',S(0(R11),0(0)) %VA07223 00172000 STM R0,R15,BALRSAVE SAVE ALL CALLER'S REGISTERS %VA07223 00173000 USING DMKVMASH,R15 TEMPORARY ADDRESSABILITY %V3M4038 00174000 L R12,=A(DMKVMA) BACK TO STANDARD ADDRESSABILITY %V3M4038 00175000 DROP R15 ... %V3M4038 00176000 USING DMKVMA,R12 ... %V3M4038 00177000 * NOTE - ECPS:VM/370 DOES NOT 00178000 * MAINTAIN TEMPR0 00179000 SLR R0,R0 ZIP REG0 %V60BC11 00180000 ST R0,TEMPR0 ZERO FLAG WORD %V60BC11 00181000 L R9,VMASSIST GET POINTER TO VMABLOK %V3M4038 00182000 LTR R9,R9 THERE SHOULD BE ONE THERE %V3M4038 00183000 BZ TSTCC1 NO, ONLY RUNNING UNPROTECTED SEGS%V60BC11 00184000 LA R1,1 INCREMENT %V60BC11 00185000 AL R1,DMKVMACT ENTRY COUNT %V60BC11 00186000 ST R1,DMKVMACT SAVE UPDATED COUNTER %V60BC11 00187000 PROCSHR L R10,VMASHRBK GET ADDRESS OF (SHRTABLE) %V3M4038 00188000 L R3,SHRSEGCT NO OF SHARED SEGMENTS TO PROCESS %V3M4038 00189000 BCTR R3,0 DECREMENT FOR INDEXING %V407511 00190000 NXTSEG DS 0H %V408246 00191000 SLR R8,R8 ZIP REG %V407511 00192000 IC R8,SHRSEGNM(R3) GET SEGMENT NUMBER %V407511 00193000 SLL R8,2 MULTIPLY BY 4 FOR INDEXING %V407511 00194000 AL R8,VMSEG OBTAIN PROPER STE ADDR %V407511 00195000 TM SEGPAGE+3,SEGINV SEGMENT INVALID %V4M0172 00196000 BO NXTSEG1 YES, SKIP SCANNING %V4M0172 00197000 SLR R4,R4 CLEAR REGISTER FOR PAGE COUNT %VMI0028 00198000 IC R4,SEGPLEN NO. OF PAGES IN THIS SEGMENT %VMI0028 00199000 SRL R4,4 DROP UNWANTED BITS %VMI0028 00200000 LA R4,ONE(,R4) PLUS ONE FOR BCT LOOP %VMI0028 00201000 L R6,SEGPAGE GET PTO ADDRESS %V407511 00202000 CNOP 0,8 ALIGN %V408246 00203000 PAGEISK TM PAGCORE+1,PAGINVAL IS PAGE IN STORAGE %V3M4038 00204000 BO INVAL NO - GET NEXT PAGE ENTRY %V3M4038 00205000 LH R2,PAGCORE PICK UP REAL PAGE NUMBER %V3M4038 00206000 SLL R2,8 FORM A FULL PAGE ADDRESS %V3M4038 00207000 N R2,XPAGNUM NOW DROP THE DISPLACEMENT %V3M4038 00208000 ISK R0,R2 TAKE A LOOK AT THE KEY %V3M4038 00209000 SLL R0,8 POSITION KEY %V408246 00210000 LA R2,HALFPAGE(,R2) GET ADDR. OF 2ND PART OF PAGE %V3M4038 00211000 ISK R0,R2 TAKE A LOOK AT THIS HALF %V3M4038 00212000 N R0,CHGBITS CLEAR ALL BUT CHANGE BITS %V408211 00213000 BNZ PROTVIOL IF SO - USER BECOMES NON-SHARED %V3M4038 00214000 INVAL LA R6,PAGCORE+2 GET NEXT PAGE TABLE ENTRY ADDR. %V3M4038 00215000 BCT R4,PAGEISK IF MORE PAGES, PROCESS ALL %VMI0028 00216000 NXTSEG1 DS 0H %V4M0172 00217000 S R3,F1 DECREMENT SEGMENT COUNT %V407511 00218000 BC 8+2,NXTSEG CONTINUE UNTIL ALL PROCESSED %V4M0243 00219000 MVI TEMPR0+1,HEX00 RESET ERROR FLAG %V407511 00220000 NXTVMA DS 0H %V407511 00221000 L R9,VMAFPNT RUNNING WITH MORE SHARED SEGS. %V3M4038 00222000 LTR R9,R9 IF NON-ZERO HE IS. %V3M4038 00223000 BNZ PROCSHR CHECK OUT ALL SHARED PAGES %V3M4038 00224000 TM TEMPR0,HEXFF ANY CHANGED PAGES FOUND %V407511 00225000 BZ TSTCC NO, EXIT %V407511 00226000 OI APSTAT2,CPPTLBR INDICATE PTLB NEEDED @V407511 00227000 SENDMSG DS 0H @V60BC11 00228000 TM VMRSTAT,VMLOGOFF IS USER LOGGING OFF? @VMI0015 00229000 BO TSTCC YES - DON'T SEND ERROR MSG IF SO @VMI0015 00230000 L R2,BALR2 GET ADDRESS OF CHANGED PAGE @V60BC11 00231000 L R3,TEMPR0 SAVE FLAG WORD @V60BC11 00232000 L R6,TEMPR6 RETRIEVE ADDRESS OF PG TBL ENTRY @VMI0022 00233000 SLR R5,R5 ZERO REGISTER FOR INSERT @VMI0037 00234000 IC R5,TEMPR5+3 RESTORE SWPVPAGE VALUE FOR @VMI0037 00235000 * ERR451 ROUTINE 00236000 LA R0,CPEXSIZE GET SIZE OF A CPEXBLOK @V60BC11 00237000 CALL DMKFREE GET A CPEXBLOK @V60BC11 00238000 USING CPEXBLOK,R1 @V60BC11 00239000 SPACE 1 00239010 ST R2,TEMPR2 SAVE REAL STORAGE ADDRESS @VA09775 00239020 LR R15,R5 GET VIRTUAL PAGE NUMBER @VA09775 00239030 SLL R15,1 ADJUSTED FOR 2 BYTE ENTRIES @VA09775 00239040 SLR R6,R15 FIND BEGNG ADDRESS OF PAGE TABLE @VA09775 00239050 SRL R15,1 BACK TO VIRTUAL PAGE NUMBER @VA09775 00239060 L R8,VMSEG ADDRESS OF BEGINING OF SEGTABLE @VA09775 00239070 SLR R14,R14 USED FOR VIRTUAL SEGMENT NUMBER @VA09775 00239080 BUMPSEG DS 0H @VA09775 00239090 CLM R6,B'0110',SEGTABLE+1 PARTIAL MATCH? @VA09775 00239100 BNE BMPSEGA NO @VA09775 00239110 MVC TEMPR0(1),SEGTABLE+3 1ST BYTE @VA09775 00239120 NI TEMPR0,X'FF'-SEGINV REMOVE POSSIBLE INVALID @VA09775 00239130 CLM R6,B'0001',TEMPR0 FULL MATCH? @VA09775 00239140 BE FNDSEG YES @VA09775 00239150 BMPSEGA DS 0H @VA09775 00239160 LA R8,SEGTABLE+4 NEXT SEGMENT TABLE ENTRY @VA09775 00239170 LA R14,ONE(,R14) ADD ONE TO VIRTUAL SEGMENT NUMBER@VA09775 00239180 B BUMPSEG LOOK AT NEXT SEGMENT @VA09775 00239190 FNDSEG SLL R14,4 MAKE ROOM FOR PAGE NUMBER @VA09775 00239200 OR R14,R15 OR'D IN VIRTUAL PAGE NUMBER @VA09775 00239210 SLL R14,12 ADD IN PROPER DISPLACEMENT @VA09775 00239220 NC TEMPR2,F4095 REMOVE REAL PAGE ADDRESS @VA09775 00239230 O R14,TEMPR2 OR'D IN SECOND HALF OF REAL PAGE @VA09775 00239240 LR R2,R14 VIRTUAL ADDRESS TO REG 2 @VA09775 00239250 SL R6,F8 BACK-UP TO PAGE TABLE HEADER @VA09775 00239260 L R6,0(,R6) GET POINTER TO SHRTABLE @VA09775 00239270 LM R7,R8,SHRNAME-SHRTABLE(R6) NAME OF SHRD SYS @VA09775 00239280 STM R0,R15,CPEXREGS STORE REGISTERS @V60BC11 00240000 LA R15,ERR456 GET ADDR OF MESSAGE ROUTINE @VA09775 00241000 ST R15,CPEXADD SETUP RETURN ADDRESS @V60BC11 00242000 CALL DMKSTKCP STACK THE CPEXBLOK @V60BC11 00243000 DROP R1 @V60BC11 00244000 ST R3,TEMPR0 RESTORE FLAG BYTES @V60BC11 00245000 TSTCC DS 0H %V407511 00246000 TM TEMPR0+2,HEXFF DID WE OBTAIN SYSTEM LOCK %V60BC11 00247000 BZ TSTCC1 NO, DON'T HAVE TO RELEASE IT %V60BC11 00248000 LOCK RELEASE,TYPE=SYS YES, RELEASE SYSTEM LOCK @V60BC11 00249000 TSTCC1 DS 0H @V60BC11 00250000 CLI TEMPR0,HEX00 SET CONDITION CODE %V407511 00251000 LM R0,R15,BALRSAVE RESTORE CALLER'S REGISTERS %V3M4038 00252000 BR R14 RETURN TO CALLER %V3M4038 00253000 SPACE 2 00254000 PROTVIOL DS 0H @V408246 00255000 C R0,F256 WAS 1ST 2K CHANGED? @V408246 00256000 BL *+8 NO, LEAVE R2 AS IS @V408246 00257000 S R2,H2048 YES, BACK-UP R2 TO FULL PAGE ADDR@V60BC11 00258000 ST R2,BALR2 PASS ADDRESS BACK TO CALLER @V408246 00259000 ST R6,TEMPR6 SAVE ASSOCIATED PG TBL ENTRY @. @VMI0022 00260000 AIF (NOT &AP).APCHK5 00261000 TM APSTAT1,APUOPER RUNNING IN ATTACHED MODE @V60BC11 00262000 BZ PROTVIO2 NO, GO RETURN FRAME @V60BC11 00263000 L R15,=A(DMKLOKSY+2) GET ADDR OF SYSTEM LOCK @V60BC11 00264000 CLC LPUADDR,0(R15) DO WE HOLD THE SYSTEM LOCK @V60BC11 00265000 BE PROTVIO2 YES, GO RETURN FRAME @V60BC11 00266000 LOCK OBTAIN,TYPE=SYS,SPIN=NO,SAVE TRY FOR LOCK @V60BC11 00267000 BNZ PROTVIOA COULDN'T GET IT, TIE FRAME OFF @V60BC11 00268000 MVI TEMPR0+2,HEXFF INDICATE WE GOT SYSTEM LOCK @V60BC11 00269000 B PROTVIO2 GO RELEASE THE FRAME @V60BC11 00270000 PROTVIOA DS 0H @V60BC11 00271000 LH R2,PAGCORE LOAD PAGTABLE ENTRY @V407511 00272000 N R2,RESMASK CLEAR UNWANTED BITS @V407511 00273000 AL R2,ACORETBL GET ADDRESS OF CORTABLE ENTRY @V407511 00274000 OI CORFLAG-CORTABLE(R2),CORFLUSH+CORFREE FLAG @V407511 00275000 * CORTABLE ENTRY AS BEING ON THE @V407511 00276000 * FLUSH AND FREE LISTS @V407511 00277000 OI PAGCORE+1,PAGINVAL FLAG PTE AS INVALID @V407511 00278000 NI CORFLAG-CORTABLE(R2),X'FF'-(CORIOLCK+CORCFLCK) @VA08903 00279000 * CLEAR LOCK BITS 00280000 L R2,CORSWPNT-CORTABLE(,R2) LOAD SWAP TABLE PTR @VMV0006 00280100 OI SWPFLAG-SWPFLAG(R2),SWPTRANS SET IN-TRANSIT BIT @V4M0013 00285000 MVC TEMPR5+3(1),SWPVPAGE-SWPFLAG(R2) SAVE THE @VA09776 00285100 * VIRTUAL PAGE NUMBER FOR USE BY ERR451 ERROR MSG ROUTINE 00285200 LA R0,CPEXSIZE GET SIZE OF A CPEXBLOK @V60BC11 00286000 CALL DMKFREE GET A CPEXBLOK @V60BC11 00287000 USING CPEXBLOK,R1 @V60BC11 00288000 STM R0,R15,CPEXREGS SAVE REGISTERS @V60BC11 00289000 LA R15,RETFRAME GET ADDR OF RETURN FRAME RTN @V60BC11 00290000 ST R15,CPEXADD SETUP TO RETURN @V60BC11 00291000 CALL DMKSTKMP STACK THE CPEXBLOK @V60BC11 00292000 DROP R1 @V60BC11 00293000 AGO .APCHK6 00294000 .APCHK5 ANOP 00295000 B PROTVIO2 GO RETURN FRAME @V60BC11 00296000 .APCHK6 ANOP 00297000 PROTVIO1 DS 0H @V60BC11 00298000 MVI TEMPR0+1,HEXFF INDICATE CHANGED PAGES THIS SYS @V407511 00299000 MVI TEMPR0,HEXFF INDICATE CHANGED PAGE FOUND @V407511 00300000 * DURING SCAN OF ALL SHARED PAGEES @V407511 00301000 B INVAL GO CHECK NEXT PAGE @V407511 00302000 PROTVIO2 DS 0H @V60BC11 00303000 BAL R13,RETFRAM1 GO RETURN THE FRAME @V60BC11 00304000 B PROTVIO1 CONTINUE SCANNING @V60BC11 00305000 EJECT 00306000 * 00307000 * THIS ROUTINE IS ONLY CALLED WHEN WE ARE RUNNING IN ATTACHED 00308000 * PROCESSOR MODE. IT IS CALLED BY THE LOCK MANAGER WHENEVER A 00309000 * VMBLOK IS LOCKED AND IT WAS LAST SERVICED ON THE OPPOSITE 00310000 * PROCESSOR. ITS FUNCTION IS TO SWITCH THE USERS SHARED PAGE 00311000 * TABLE POINTERS. THIS IS ACCOMPLISHED BY DETERMINING WHICH 00312000 * PROCESSOR WE ARE CURRENTLY EXECUTING ON AND THE ADDING OR 00313000 * SUBTRACTING OF PAGBMP (X'C0') TO THE USERS CURRENT PAGE TABLE 00314000 * POINTER (STE). IF WE ARE SWITCHING FROM THE MAIN PROCESSOR 00315000 * TO THE ATTACHED PROCESSOR, WE ADD PAGBMP TO THE CURRENT POINTER. 00316000 * IF WE ARE SWITCHING FROM THE ATTACHED PROCESSOR TO THE MAIN 00317000 * PROCESSOR, WE SUBTRACT PAGBMP FROM THE CURRENT POINTER. 00318000 * 00319000 DMKVMASW DS 0H @V407511 00320000 USING DMKVMASW,R15 ESTABLISH ADDRESSABILITY @V407511 00321000 STM R0,R15,SWTHSAVE SAVE CALLERS REGS @V407511 00322000 L R12,=A(DMKVMA) MODULE BASE FOR ADDRESSABILITY @VMI0015 00323000 DROP R15 @VMI0015 00324000 USING DMKVMA,R12 @VMI0015 00325000 L R9,VMASSIST GET START OF VMABLOK QUEUE @V407511 00326000 LTR R9,R9 ANY VMABLOK'S @V407511 00327000 BZ SWEXIT NO, RUNNING UNPROTECTED, EXIT @V60BC11 00328000 SWLOOP DS 0H @V407511 00329000 L R10,VMASHRBK GET ADDR OF SHRTABLE @V407511 00330000 L R2,SHRSEGCT GET NUMBER OF SHARED SEGS @V407511 00331000 BCTR R2,0 MINUS 1 FOR INDEXING @V407511 00332000 SWSEG DS 0H @V407511 00333000 SLR R8,R8 ZERO WORK REG @V407511 00334000 IC R8,SHRSEGNM(R2) GET SHARED SEG NUMBER @V407511 00335000 SLL R8,2 TIMES 4 FOR INDEXING @V407511 00336000 A R8,VMSEG GET ADDR OF SEGTABLE ENTRY @V407511 00337000 L R5,SEGPAGE GET ADDR OF PAGE TABLE @V407511 00338000 N R5,CLCNTINV CLEAR INVALID BIT @V407511 00339000 TM SEGPAGE+3,SEGINV IS SEG INVALID FOR VM @V407511 00340000 BO SWCPU YES, DON'T DECREMENT @V407511 00341000 S R5,F16 BACKUP TO PAGTABLE HEADER @V407511 00342000 L R6,PAGACT-PAGTABLE(,R5) GET ACTIVE COUNT @V407511 00343000 SWCSLP1 DS 0H @V407511 00344000 LR R0,R6 LOAD REG FOR UPDATE @V407511 00345000 S R0,BUMPLOW DECREMENT PAGACT COUNT @V407511 00346000 CS R6,R0,PAGACT-PAGTABLE(R5) UPDATE PAGE TABLE @V407511 00347000 BNE SWCSLP1 UPDATE FAILED, TRY AGAIN @V407511 00348000 A R5,F16 RESTORE PAGTABLE ORIGIN @V407511 00349000 SWCPU DS 0H @V407511 00350000 TM APSTAT1,PROCIPL SWITCHING TO MAIN (IPL) PROC? @V60B7AA 00351100 BZ SWAPU NO, SWITCHING TO ATTACHED @V407511 00352000 S R5,SWLENGTH SUBTRACT FOR MAIN PROCESSOR @V407511 00353000 * PAGE TABLE @V407511 00354000 B SWSTORE CONTINUE PROCESSING @V407511 00355000 SWAPU DS 0H SWITCH TO ATTACHED PROC @V407511 00356000 A R5,SWLENGTH ADD FOR ATTACHED @V407511 00357000 * PROCESSOR PAGE TABLE @V407511 00358000 SWSTORE DS 0H 00359000 STCM R5,7,SEGPAGE+1 STORE NEW PAGE TABLE @V407511 00360000 * ADDR & SAVE SEGPLEN @V405711 00361000 S R5,F16 BACKUP TO PAGE HEADER @V407511 00362000 L R6,PAGACT-PAGTABLE(,R5) GET ACTIVE COUNT @V407511 00363000 SWCSLP2 DS 0H @V407511 00364000 LR R0,R6 LOAD REG FOR UPDATE @V407511 00365000 A R0,BUMPLOW INCREMENT PAGACT COUNT @V407511 00366000 CS R6,R0,PAGACT-PAGTABLE(R5) UPDATE ACTIVE COUNT @V407511 00367000 BNE SWCSLP2 FAILED, TRY AGAIN @V407511 00368000 S R2,F1 DECREMENT SHRSEGCT @V407511 00369000 BNM SWSEG NO, CONTINUE PROCESSING @V407511 00370000 SWBUMP DS 0H 00371000 ICM R9,15,VMAFPNT GET ADDR NEXT VMABLOK @V407511 00372000 BNZ SWLOOP BRANCH - MORE VMABLOKS @V407511 00373000 SWEXIT DS 0H @V60BC11 00374000 MVC VMSHRPRC(1),LPUADDR+1 SET NEW PROCESSOR ID @V407511 00375000 LM R0,R15,SWTHSAVE RESTORE CALLERS REGS @V407511 00376000 BR R14 RETURN TO CALLER @V407511 00377000 EJECT 00378000 * 00379000 * THIS SUBROUTINE WILL RECEIVE CONTROL VIA THE 00380000 * UNSTACKING OF A CPEXBLOK. ITS FUNCTION IS TO 00381000 * BUILD AN EMSGBLOK. IT WILL THEN CALL DMKERMSG 00382000 * TO SEND ERROR MESSAGE (DMKVMA456W CP ENTERED; 00383000 * 'NAME' - SHARED PAGE 'HEXLOC' ALTERED) TO THE 00384000 * VIOLATOR. IT WILL THEN CALL DMKCFMBK TO PLACE 00385000 * THE VIOLATOR IN CONSOLE FUNCTION MODE. (THIS 00386000 * ROUTINE WAS FORMERLY LABELED ERR451.) 00387000 * 00388000 SPACE 3 00389000 ERR456 EQU * @VA09775 00390000 USING EMSGBLOK,R5 @VM03107 00418000 LA R0,EMSGSIZE GET AREA @VM03107 00419000 CALL DMKFREE FROM FREE STORAGE @VM03107 00420000 LR R5,R1 SAVE ADDRESS OF BUFFER IN REG5 @VM03107 00421000 XC EMSGAREA,EMSGAREA CLEAR MESSAGE AREA @VM03107 00422000 STM R7,R8,EMSGNAME MOVE IN SHARED SYS NAME @VA09775 00423000 LR R1,R2 SET UP TARGET ADDRESS @VM03107 00424000 CALL DMKCVTBH MAKE IT PRINTABLE @VM03107 00425000 STH R0,EMSGADD1 SAVE FIRST PART @VA04402 00426000 ST R1,EMSGADD2 SAVE LAST HALF @VM03107 00427000 LA R0,EMSGLEN LENGTH OF DATA @VM03107 00428000 DROP R5 @VM03107 00429000 USING SWPTABLE,R5 @VM03107 00430000 ICM R0,B'1110',=C'VMA' MODULE IDENT. @V304735 00431000 LR R1,R5 ADDRESS OF MESSAGE @V304735 00432000 LA R2,EMSG456 LOAD ERROR CODE @VM03107 00433000 ICM R2,B'1100',=X'80E6' FILL IN REST OF INFORMATION @V304735 00434000 CALL DMKERMSG CALL THE MESSAGE WRITTER @V304735 00435000 LA R0,EMSGSIZE SIZE OF EMSGBLOK IN DW'S @VM03107 00436000 CALL DMKFRET @V304735 00437000 CALL DMKCFMBK PUT USER IN CONSOLE FUNCTION MODE@V304735 00438000 GOTO DMKDSPCH GOTO DISPATCHER @V304735 00439000 EJECT 00440000 * 00441000 * THIS SUBROUTINE WILL RECEIVE CONTROL VIA THE UNSTACKING 00442000 * OF A CPEXBLOK AT LABEL RETFRAME, OR VIA BAL LOGIC FROM 00443000 * DMKVMASH AT THE LABEL RETFRAM1. ITS FUNCTION IS TO 00444000 * RETURN A CHANGED SHARED PAGE FRAME TO FREE STORAGE. 00445000 * 00446000 SPACE 1 00447000 RETFRAME DS 0H @V60BC11 00448000 SLR R13,R13 INDICATE ENTERED VIA CPEXBLOK @V60BC11 00449000 RETFRAM1 DS 0H @V60BC11 00450000 LH R7,PAGCORE LOAD PAGTABLE ENTRY @V60BC11 00451000 N R7,RESMASK CLEAR UNWANTED BITS @V60BC11 00452000 LR R2,R7 PTE TO R2 @V60BC11 00453000 AL R7,ACORETBL GET ADDR OF CORTABLE ENTRY @V60BC11 00454000 SLL R2,8 FORM REAL ADDRESS @V60BC11 00455000 LTR R13,R13 ENTERED VIA CPEXBLOK @V60BC11 00456000 L R14,CORSWPNT GET ADDRESS OF SWPTABLE ENTRY @VMI0037 00457000 BNZ RETFRAM2 NO, SKIP RESETTING BITS @V60BC11 00458000 NI CORFLAG,X'FF'-CORFREE-CORFLUSH RESET FLAG BITS @V60BC11 00459000 NI SWPFLAG-SWPFLAG(R14),X'FF'-SWPTRANS RESET FLAG @V60BC11 00460000 RETFRAM2 DS 0H @V60BC11 00461000 MVC TEMPR5+3(1),SWPVPAGE-SWPFLAG(R14) SAVE THE @VMI0037 00462000 * VIRTUAL PAGE NUMBER FOR USE BY 00463000 * ERR451 ERROR MSG. ROUTINE 00464000 TM CORFLAG,CORCFLCK FRAME BEEN LOCKED @V60BC11 00465000 BZ RETFRAM3 NO, CHECK FOR RESERVED @V60BC11 00466000 L R0,BALR4 SAVE SINCE DMKPTR CLOBBERS @VA13543 00466300 * BALR4. @VA13543 00466600 CALL DMKPTRUL UNLOCK THE FRAME @V60BC11 00467000 ST R0,BALR4 RESTORE FOR USE BY DMKDSP @VA13543 00467500 NI CORFLAG,X'FF'-CORCFLCK RESET LOCK BIT @V60BC11 00468000 TM CORFLAG,CORRSV FRAME BEEN RESERVED @V60BC11 00469000 BZ RETFRAM4 NO, GO UPDATE AVAILABLE COUNT @V60BC11 00470000 RETFRAM3 DS 0H @V60BC11 00471000 TM CORFLAG,CORRSV FRAME BEEN RESERVED @V60BC11 00472000 BZ RETFRAM5 NO, GO RETURN FRAME @V60BC11 00473000 L R14,=A(DMKPTRRC) GET ADDR RESERVED COUNTER @V60BC11 00474000 L R15,0(,R14) LOAD RESERVED COUNTER @V60BC11 00475000 BCTR R15,0 DECREMENT COUNTER @V60BC11 00476000 ST R15,0(,R14) STORE UPDATED COUNTER @V60BC11 00477000 RETFRAM4 DS 0H @V60BC11 00478000 L R14,=A(DMKDSPNP) GET ADDR AVAILABLE FRAME CNTR @V60BC11 00479000 LA R15,1 LOAD INCREMENT VALUE @V60BC11 00480000 A R15,0(,R14) INCREMENT AVAILABLE COUNTER @V60BC11 00481000 ST R15,0(,R14) STORE UPDATED COUNTER @V60BC11 00482000 RETFRAM5 DS 0H @V60BC11 00483000 L R14,=A(DMKPTRSC) GET ADDR SHARED PAGE COUNTER @V60BC11 00484000 L R15,0(,R14) LOAD SHARED PAGE COUNTER @V60BC11 00485000 BCTR R15,0 DECREMENT SHARED PAGE COUNTER @V60BC11 00486000 ST R15,0(,R14) STORE UPDATED COUNTER @V60BC11 00487000 MVC PAGCORE,F8+2 INVALIDATE THE PTE @V60BC11 00488000 SLR R15,R15 ZIP REG @V60BC11 00489000 ST R15,CORPGPNT ZERO POINTER TO PTE @V60BC11 00490000 L R15,CORVM GET FRAME OWNER'S VMBLOK PTR @VMI0037 00491000 LH R14,VMPAGES-VMBLOK(,R15) GET COUNT OF PAGES @VMI0037 00492000 BCTR R14,0 DECREMENT PAGE COUNT BY ONE @VMI0037 00493000 BM ERROR8 ABEND IF VMPAGES TO GO NEGATIVE @VMI0037 00494000 STH R14,VMPAGES-VMBLOK(,R15) SAVE UPDATED PAGE COUNT@VMI0037 00495000 LM R0,R2,BALR0 SAVE DMKVMASH'S CALLER'S REGS @VMI0037 00496000 * (DMKPTRFT USES BALR0-BALR2) 00497000 CALL DMKPTRFT RETURN FRAME TO FREE STORAGE @V60BC11 00498000 STM R0,R2,BALR0 RESTORE DMKVMASH'S CALLER'S REGS @VMI0037 00499000 LTR R13,R13 CPEXBLOK ENTRY @V60BC11 00500000 BNZR R13 NO, CONTINUE SCANNING @V60BC11 00501000 GOTO DMKDSPCH YES, EXIT TO THE DISPATCHER @V60BC11 00502000 EJECT 00503000 DMKVMACT DC F'0' NUMBER TIMES DMKVMASH ENTERED @V304735 00504000 DMKVMAS1 DC 2A(DMKVMAS1) ANCHOR FOR SHARED SYSTEMS @VM03171 00505000 * (SHRTABLE) 00506000 DMKVMAS2 DC 2A(DMKVMAS2) ANCHOR FOR NAMED SYSTEMS @VM03171 00507000 * (SHRTABLE) 00508000 ERROR8 ABEND 8 VMPAGES TO GO NEGATIVE @VA07224 00509000 SPACE 1 00510000 SPACE 2 00511000 EJECT 00512000 RESMASK DC A(X'FFF0') MASK FOR PAGE RESIDENT @VM03107 00513000 CLCNTINV DC X'00FFFFFC' CLEAR COUNT & UNWANTED BITS @V60BC11 00514000 BUMPLOW DC X'00010000' INCREMENT/DECREMENT FOR PAGACT @V407511 00515000 CHGBITS DC X'00000202' CHANGE BIT MASK @V407511 00516000 H2048 DC F'2048' 2K @V60BC11 00517000 SWLENGTH DC F'192' LENGTH OF SHARED PAGE & @V407511 00518000 * SWAP TABLES @V407511 00519000 HALFPAGE EQU 2048 VALUE FOR ONE HALF PAGE @VM03107 00520000 * 00521000 ONE EQU 1 VALUE OF 1 @VM03107 00522000 THREE EQU 3 VALUE OF 3 @VM03107 00523000 * 00524000 INDEX1 EQU 1 VALUE OF 1 USED FOR INDEXING @VM03107 00525000 * 00526000 ROUND8 EQU 8 VALUE USED FOR ROUNDING TO DW @VM03107 00527000 * 00528000 MAXSEG EQU 16 NUMBER OF PAGE PER SEGMENT @VM03107 00529000 * 00530000 HEX00 EQU X'00' VALUE OF X'00' @VM03107 00531000 HEXFF EQU X'FF' VALUE OF X'FF' @VM03107 00532000 * 00533000 EMSG181 EQU 181 ERROR MESSAGE NUMBER 181 @VM03107 00534000 EMSG456 EQU 456 ERROR MESSAGE NUMBER 456 @VM03107 00535000 SPACE 1 00536000 * BITS DEFINED FOR SAVEWRK1 FLAG BYTE @V407511 00537000 * 00538000 INVLSEG EQU X'80' STE ENTRY WAS ORIGINALLY INVALID @V407511 00539000 PTOBTAIN EQU X'40' PAGE & SWAP TABLES OBTAINED @V407511 00540000 PREVCHNG EQU X'20' PREVIOUSLY FOUND A CHANGED PAGE @V407511 00541000 CALLCF EQU X'10' ENTER AT DMKVMACF @V407511 00542000 PASSONE EQU X'08' LOOP CONTROLLER IN FRETSHR @V407511 00543000 * 00544000 FULLPAGE EQU X'C0'/8 NUMBER OF DOUBLEWORDS IN 16 ENTRY@V407511 00545000 * PAGE AND SWAP TABLE SET @V407511 00546000 PAGE2314 EQU 32 NUMBER OF PAGES PER CYLINDER @V407511 00547000 * (2314/2319) @V407511 00548000 PAGE3330 EQU 57 NUMBER OF PAGE PER CYLINDER @V407511 00549000 * (3330) @V407511 00550000 PAGE3350 EQU 120 NUMBER OF PAGES PER CYLINDER @V407511 00551000 * (3350) @V407511 00552000 PAGE2305 EQU 24 NUMBER OF PAGES PER CYLINDER @V407511 00553000 * (2305/3340) @V407511 00554000 SPACE 3 00555000 LTORG * @VM03107 00556000 SPACE 3 00557000 EMSGBLOK DSECT @VM03107 00558000 * DSECT FOR ERROR MESSAGE PARMS 00559000 EMSGAREA DS 0CL16 MESSAGE AREA @VM03107 00560000 EMSGNAME DS CL8 AREA FOR NAME OF SHARED SYSTEM @VM03107 00561000 DS 2X FILLER @VM03107 00562000 EMSGADD1 DS CL2 FIRST PART OF ADDRESS @VM03107 00563000 EMSGADD2 DS CL4 LAST PART OF ADDRESS @VM03107 00564000 EMSGLEN EQU *-EMSGBLOK LENGTH OF BLOK IN BYTES @VM03107 00565000 EMSGSIZE EQU (*-EMSGBLOK)/8 SIZE OF EMSGBLOK IN DW'S @VM03107 00566000 SPACE 2 00567000 COPY EQU @V304735 00568000 COPY SAVE @V304735 00569000 COPY VMBLOK @V304735 00570000 COPY RBLOKS @VA04554 00571000 COPY DEVTYPES @VA04554 00572000 COPY ALLOC @VA04554 00573000 COPY CORE @V304735 00574000 COPY SHRTABLE @V304735 00575000 COPY SYSTBL @V407511 00576000 PSA @V304735 00577000 END 00578000