SSK TITLE 'DMSSSK (CMS) VM/370 - RELEASE 6' 00001000 *. 00002000 * MODULE NAME - 00003000 * 00004000 * DMSSSK 00005000 * 00006000 * FUNCTION - 00007000 * 00008000 * SET STORAGE PROTECT KEYS FOR A SPECIFIED SAVED SYSTEM 00009000 * 00010000 * ATTRIBUTES - 00011000 * 00012000 * DISK RESIDENT, EXECUTES IN THE TRANSIENT AREA 00013000 * 00014000 * ENTRY POINTS - 00015000 * 00016000 * DMSSSK 00017000 * 00018000 * ENTRY CONDITIONS - 00019000 * 00020000 * GPR 1 CONTAINS THE ADDRESS OF A PARAMETER LIST 00021000 * CONTAINING THE FOLLOWING: 00022000 * SETKEY - CL8'SETKEY' 00023000 * KEY - STORAGE KEY (DEC 0 - 15) 00024000 * NAME - SAVED SYSTEM NAME 00025000 * STADR - START ADDRESS IN HEX (OPTIONAL) 00026000 * X'FF' - FENCE 00027000 * 00028000 * EXIT CONDITIONS - 00029000 * NORMAL 00030000 * GPR 15 = 0 EXECUTION SUCCESSFUL 00031000 * 00032000 * ERROR 00033000 * MESSAGES 00034000 * DMSSSK070E INVALID PARAMETER ... GPR15=24 00035000 * DMSSSK362E INVALID STORAGE PROTECT KEY ... GPR15=24 00036000 * DMSSSK363E INVALID STARTING ADDRESS ... GPR15=24 00037000 * DMSSSK364E VM STORAGE SIZE ERROR GPR15=24 00038000 * DMSSSK365E SYSTEM NAME NOT SPECIFIED GPR15=24 00039000 * DMSSSK400S SYSTEM ... DOES NOT EXIST GPR15=44 00040000 * DMSSSK410S CP ERROR INDICATION ... GPR15=174 OR 171 00041000 * 00042000 * CALLS TO OTHER ROUTINES - 00043000 * 00044000 * DMSERR 00045000 * 00046000 * EXTERNAL REFERENCES - 00047000 * 00048000 * NONE 00049000 * 00050000 * TABLES / WORKAREAS - 00051000 * 00052000 * NONE 00053000 * 00054000 * REGISTER USAGE - 00055000 * 00056000 * NONE 00057000 * 00058000 * NOTES - 00059000 * 00060000 * NONE 00061000 * 00062000 * OPERATION - 00063000 * 00064000 * THIS MODULE WILL SET STORAGE PROTECT KEYS FOR A 00065000 * BLOCK OF STORAGE OCCUPIED BY A SAVED SYSTEM. THE 00066000 * STARTING ADDRESS MAY BE SPECIFIED BY THE CALLER AS 00067000 * LONG AS IT FALLS WITHIN THE RANGE OF THE SYSTEM 00068000 * LOAD EXTENTS. 00069000 * 00070000 * DMSSSK VALIDATES THE KEY ENTRY IN THE PARAMETER LIST 00071000 * BY ENSURING THAT IT IS A ONE OR TWO DIGIT NUMBER 00072000 * BETWEEN 0 AND 15. 00073000 * 00074000 * A FINDSYS IS THEN DONE FOR THE NAME PROVIDED WHICH 00075000 * PROVIDES THE LOAD RANGE OF THE SAVED SYSTEM. 00076000 * 00077000 * IF AN ADDRESS HAS BEEN INCLUDED IN THE PARAMETER 00078000 * LIST, IT IS CHECKED TO ENSURE THAT IT FALLS WITHIN 00079000 * THE LOAD RANGE OF THE SAVED SYSTEM. 00080000 * THE COMPLETE RANGE OF THE SAVED SYSTEM MUST ALSO 00081000 * FALL WITHIN THE V.M. STORAGE SIZE. 00082000 * 00083000 * AN SSK INSTRUCTION IS THEN DONE FOR EACH 2048 BYTE 00084000 * BLOCK IN THE RANGE SPECIFIED. 00085000 *. 00086000 EJECT 00087000 DMSSSK CSECT @V305614 00088000 SPACE 1 00089000 USING *,R12 @V305614 00090000 USING NUCON,R0 @V305614 00091000 LR R12,R15 TRANSFER BASE @V305614 00092000 LR R2,R1 GET NEW PLIST POINTER @V305614 00093000 LA R2,8(,R2) POINT TO THE KEY ENTRY @V305614 00094000 SPACE 1 00095000 SR R3,R3 INITIALIZE KEY COUNT @V305614 00096000 CLI 1(R2),X'40' ONE DIGIT KEY ? @V305614 00097000 BNE TWODIG NO, BR @V305614 00098000 CLI 0(R2),X'F9' MUST BE 9 OR LESS @V305614 00099000 BH KEYERR ELSE ERROR @V305614 00100000 B ONEDIG SKIP MAX CHECK @V305614 00101000 SPACE 1 00102000 TWODIG CLC 0(3,R2),MAXKEY CHECK FOR MAXIMUM POSSIBLE KEY @V305614 00103000 BH KEYERR BR, IF INVALID KEY @V305614 00104000 ONEDIG CLI 0(R2),X'F0' CAN'T BE LESS THAN 0 @V305614 00105000 BL KEYERR ERROR IF SO @V305614 00106000 SPACE 1 00107000 CLI 1(R2),X'40' 2 DIGIT KEY ? @V305614 00108000 BE KEYCVB NO, GO CONVERT TO BINARY @V305614 00109000 CLI 1(R2),X'F0' THIS ONE HAS TO BE 0 TO 5 @V305614 00110000 BL KEYERR ERROR IF NOT @V305614 00111000 SPACE 1 00112000 CLI 2(R2),X'40' 3RD CHARACTER MUST BE BLANK @V305614 00113000 BNE KEYERR ELSE ERROR @V305614 00114000 LA R3,1 INDICATE 2 DIGIT KEY @V305614 00115000 SPACE 1 00116000 KEYCVB LA R3,112(,R3) SET PACK L1 TO 7 @V305614 00117000 EX R3,PACKEY PACK STORAGE KEY @V305614 00118000 CVB R3,DECKEY GET BINARY STORAGE KEY @V305614 00119000 SLL R3,4 MOVE KEY TO RIGHT PLACE FOR SSK @V305614 00120000 SPACE 1 00121000 LA R2,8(,R2) BUMP SCAN POINTER @V305614 00122000 CLI 0(R2),X'FF' NAME PARAMETER SHOULD BE THERE @V305614 00123000 BE NAMERR BR, IF NOT @V305614 00124000 MVC SEGNAME(8),0(R2) GET PLIST SEGMENT NAME @V305614 00125000 LA R4,SEGNAME POINT TO IT @V305614 00126000 LA R5,12 INDICATE FINDSYS @V305614 00127000 DC X'83450064' FINDSYS @V305614 00128000 BC 2,FINDERR BR, IF UNSUCCESSFUL @V305614 00129000 SPACE 1 00130000 LA R2,8(,R2) BUMP SCAN POINTER @V305614 00131000 CLI 0(R2),X'FF' WAS THAT ALL ? @V305614 00132000 BE READY YES, TIME TO EXECUTE @V305614 00133000 SR R6,R6 CLEAR THE ADDRESS BYTE REG @V305614 00134000 SR R8,R8 AND THE RESULT REGISTER @V305614 00135000 LR R9,R2 LOAD UP BYTE POINTER @V305614 00136000 SPACE 1 00137000 LOOP CLI 0(R9),X'40' IS THIS THE END ? @V305614 00138000 BE ADRDONE YES, BR @V305614 00139000 CLI 0(R9),X'FF' SHOULDN'T HAPPEN, BUT.. @V305614 00140000 BE ADRDONE GO THROUGH THE MOTIONS @V305614 00141000 SPACE 1 00142000 IC R6,0(,R9) TAKE THE BYTE.. @V305614 00143000 CLI 0(R9),C'0' COULD IT BE 'A'-'F' ? @V305614 00144000 BL AFCHK YES, BR @V305614 00145000 CLI 0(R9),C'9' IS IT > 9 ? @V305614 00146000 BH ADRERR ERROR IF SO @V305614 00147000 SPACE 1 00148000 SH R6,CLR1 ..STRIP THE 'F'.. @V305614 00149000 LOOP1 SLL R8,4 ..MAKE ROOM FOR THE DIGIT.. @V305614 00150000 AR R8,R6 ..AND INSERT IT.. @V305614 00151000 LA R9,1(,R9) POINT TO THE NEXT ONE @V305614 00152000 B LOOP AND DO IT AGAIN @V305614 00153000 SPACE 1 00154000 AFCHK CLI 0(R9),C'A' HAS TO BE @V305614 00155000 BL ADRERR IN 'A' TO 'F' @V305614 00156000 CLI 0(R9),C'F' RANGE @V305614 00157000 BH ADRERR ELSE ERROR @V305614 00158000 SPACE 1 00159000 SH R6,CLR2 'TRANSLATE' TO HEX @V305614 00160000 B LOOP1 AND CONTINUE @V305614 00161000 SPACE 1 00162000 ADRDONE LA R6,1 MAKE SURE THE ADDRESS IS @V305614 00163000 SLL R6,24 VALID @V305614 00164000 CR R8,R6 CAN'T BE GREATER THAN 6 DIGITS @V305614 00165000 BNL ADRERR ..... @V305614 00166000 SPACE 1 00167000 CR R8,R4 MUST NOT BE < FINDSYS START ADR @V305614 00168000 BL ADRERR NOR @V305614 00169000 CR R8,R5 GREATER THAN FINDSYS END ADR @V305614 00170000 BH ADRERR ..... @V305614 00171000 LR R4,R8 TRANSFER IF OK @V305614 00172000 SPACE 1 00173000 LA R2,8(,R2) BUMP SCAN POINTER @V305614 00174000 CLI 0(R2),X'FF' NO MORE PARAMETERS @V305614 00175000 BNE INVPARM ALLOWED @V305614 00176000 SPACE 1 00177000 READY EQU * @V305614 00178000 C R5,VMSIZE MAKE SURE WE DON'T ISSUE SSK'S @V305614 00179000 BH SIZERR OUTSIDE VIRTUAL STORAGE @V305614 00180000 N R4,SSKSET STRIP BITS @V305614 00181000 N R5,SSKSET NOT USED @V305614 00182000 LA R6,2048 LOAD UP ADR INCREMENTER @V305614 00183000 SPACE 1 00184000 SSKLOOP CR R4,R5 PAST THE ENDING ADDRESS ? @V305614 00185000 BH SSKDONE YES, BRANCH @VA05503 00186000 SSK R3,R4 SET STORAGE KEY @V305614 00187000 AR R4,R6 INCREMENT TARGET ADDRESS @V305614 00188000 B SSKLOOP AND DO IT AGAIN @V305614 00189000 SPACE 1 00190000 SSKDONE SR R15,R15 SET ZERO RETURN CODE @V305614 00191000 BR R14 AND RETURN TO CALLER @V305614 00192000 SPACE 1 00193000 KEYERR EQU * @V305614 00194000 DMSERR NUM=362,LET=E,SUB=(CHARA,(R2)),TEXT='INVALID STORAGE PRX00195000 OTECT KEY ''........''' @V305614 00196000 LA R15,24 SET RETURN CODE 24 @V305614 00197000 BR R14 AND RETURN TO CALLER @V305614 00198000 SPACE 1 00199000 FINDERR EQU * @V305614 00200000 C R5,NONE NONEXISTENT SYSTEM ? @V305614 00201000 BNE CPERR NO, BR @V305614 00202000 DMSERR NUM=400,LET=S,SUB=(CHARA,(R2)),TEXT='SYSTEM ''........'X00203000 ' DOES NOT EXIST' @V305614 00204000 LR R15,R5 SHIFT RETURN CODE REGISTER @VM03156 00205000 BR R14 RETURN TO CALLER @V305614 00206000 SPACE 1 00207000 CPERR DMSERR NUM=410,LET=S,SUB=(DEC,(R5)),TEXT='CONTROL PROGRAM ERROX00208000 R INDICATION ''......''' @V305614 00209000 LR R15,R5 SHIFT RETURN CODE REGISTERS @VM03156 00210000 BR R14 RETURN TO CALLER @V305614 00211000 SPACE 1 00212000 ADRERR EQU * @V305614 00213000 DMSERR NUM=363,LET=E,SUB=(CHARA,(R2)),TEXT='INVALID STARTING AX00214000 DDRESS ''........''' @V305614 00215000 LA R15,24 SET RETURN CODE 24 @V305614 00216000 BR R14 AND RETURN TO CALLER @V305614 00217000 SPACE 1 00218000 INVPARM EQU * @V305614 00219000 DMSERR NUM=070,LET=E,SUB=(CHARA,(R2)),TEXT='INVALID PARAMETER *00220000 ''........''' @V305614 00221000 LA R15,24 SET RETURN CODE 24 @V305614 00222000 BR R14 AND RETURN TO CALLER @V305614 00223000 SPACE 1 00224000 SIZERR EQU * @V305614 00225000 DMSERR NUM=364,LET=E,SUB=(HEX,(R4),HEX,(R5)),TEXT='V.M. STORAGX00226000 E NOT LARGE ENOUGH TO CONTAIN SYSTEM LOADING AT ...... TX00227000 O ......',RENT=NO @V305614 00228000 LA R15,24 SET RETURN CODE 24 @V305614 00229000 BR R14 AND RETURN TO CALLER @V305614 00230000 SPACE 1 00231000 NAMERR EQU * @V305614 00232000 DMSERR NUM=365,LET=E,TEXT='SYSTEM NAME NOT SPECIFIED' @V305614 00233000 LA R15,24 SET RETURN CODE 24 @V305614 00234000 BR R14 AND RETURN TO CALLER @V305614 00235000 SPACE 1 00236000 PACKEY PACK DECKEY(*-*),0(*-*,R2) @V305614 00237000 SPACE 1 00238000 MAXKEY DC X'F1F540' MAXIMUM POSSIBLE KEY @V305614 00239000 CLR1 DC H'240' =X'00F0' @V305614 00240000 CLR2 DC H'183' =H'00B7' @V305614 00241000 DECKEY DS 1D DECIMAL KEY CONVERSION AREA @V305614 00242000 SEGNAME DS 1D SAVED SEGMENT NAME @V305614 00243000 DS 0F @V305614 00244000 SSKSET DC X'00FFF800' @V305614 00245000 NONE DC F'44' CP RETURN FOR NONEXISTENT SYSTEM @V305614 00246000 NUCON @V305614 00247000 REGEQU @V305614 00248000 END 00249000