NLD TITLE 'DMKNLD (CP) VM/370 - RELEASE 6' 00001000 ISEQ 73,80 VALIDATE SEQUENCEING OF INPUT 00002000 *. 00003000 * MODULE NAME - 00004000 * 00005000 * DMKNLD 00006000 * 00007000 * FUNCTION - 00008000 * 00009000 * TO PERFORM THE LOAD FUNCTION ON THE 3705 INDICATED. 00010100 * 00011000 * ATTRIBUTES - 00012000 * 00013000 * REENTRANT, PAGEABLE, CALLED VIA SVC 00014000 * 00015000 * ENTRY POINTS - 00016000 * DMKNLDR - ENTRY TO LOAD 3705 NETWORK CONTROL PROGRAM 00017000 * 00019000 * NOTE: THIS ROUTINE MAY BE CALLED VIA CONSOLE COMMAND FROM DMKNET 00020100 * OR INTERNALLY BY DMKCPI. 00021100 * 00022000 * ENTRY CONDITIONS - 00023000 * 00024000 * FROM DMKNET 00025000 * 00026000 * GPR2 - ZEROES 00027000 * GPR9 - ADDRESS OF COMMAND LINE BUFFER 00028000 * GPR11 - ADDRESS OF VMBLOK 00029000 * GPR12 - ADDRESS OF ENTRY POINT 00030000 * GPR13 - ADDRESS OF SAVEAREA 00031000 * 00032000 * FROM DMKCPI - 00033100 * 00034000 * GPR2 - NON-ZERO 00035000 * GPR8 - ADDRESS OF REAL DEVICE BLOK FOR 3705 00036000 * GPR11 - ADDRESS OF VMBLOK 00037000 * GPR12 - ADDRESS OF ENTRY POINT 00038000 * GPR13 - ADDRESS OF SAVEAREA 00039000 * 00040000 * EXIT CONDITIONS - 00041000 * 00042000 * NORMAL - 00043000 * GPR2 = 0 00044000 * 00045000 * ERROR - 00046000 * GPR2 = ERROR MESSAGE CODE NUMBER 00047000 * 00048000 * NOTE: RETURN IS DIRECTLY TO DMKCFM IF CALLED FROM DMKNET - TO CALLER 00049000 * OTHERWISE. 00050000 * 00051000 * CALLS TO OTHER ROUTINES - 00052000 * 00053000 * DMKSCNFD - TO LOCATE NEXT ARGUMENT IN THE COMMAND LINE 00054000 * DMKCVTHB - CONVERT HEXADECIMAL ADDRESSES TO BINARY 00055000 * DMKSCNVU - TO LOCATE ADDRESSES OF THE VIRTUAL DEVICE BLOKS 00056000 * DMKSCNRU - TO LOCATE ADDRESSES OF THE REAL DEVICE BLOKS 00057000 * DMKQCNWT - TO OUTPUT MESSAGES TO THE TERMINAL 00058000 * DMKFREE - TO OBTAIN STORAGE FROM FREE STORAGE 00059000 * DMKFRET - TO RETURN STORAGE TO FREE STORAGE 00060000 * DMKPGTVG - TO GET A BUFFER OF PAGEABLE CP CORE. 00061000 * DMKPGTVR - TO RELEASE A BUFFER OF PAGEABLE CP CORE. 00062000 * DMKPTRUL - TO UNLOCK A PAGE IN VIRTUAL MACHINE 00063000 * DMKERMSG - TO SEND ERROR MESSAGES TO THE TERMINAL. 00064000 * DMKPTRAN - TO BRING A PAGE IN CORE 00065000 * DMKCVTBH - CONVERT BINARY DATA TO HEXADECMAL 00066000 * DMKSTKIO - TO STACK AN I/O BLOCK FOR PROCESSING 00067000 * DMKRPAGT - TO READ A PAGE IN CORE 00069000 * DMKSCNVS - TO SEARCH FOR A VOLUME 00070000 * DMKIOSQR - TO PERFORM I/O OPERATIONS ON 3705 00071000 * 00074000 * EXTERNAL REFERENCES - 00075000 * 00076000 * CXWMINI1 - 370X CHANNEL ADAPTER TYPE1 LOADER BOOTSTRAP PHASE1 00077000 * CXWMINI2 - 370X CHANNEL ADAPTER TYPE1 LOADER BOOTSTRAP PHASE2 00078000 * CXWMAXI1 - 370X CHANNEL ADAPTER TYPE2 LOADER BOOTSTRAP PHASE1 00079000 * CXWMAXI2 - 370X CHANNEL ADAPTER TYPE2 LOADER BOOTSTRAP PHASE2 00080000 * DMKRNHIN - LOCATION OF 370X TERMINAL INTERRUPT HANDLER 00086000 * DMKRNTBL - LOCATION OF NCPNAME TABLE 00087000 * 00088000 * 00089000 * TABLES/WORKAREAS - NONE 00090000 * 00091000 * REGISTER USAGE - 00092000 * 00093000 * GPR0 - ARGUMENT LENGTH (PASSED BACK FROM DMKSCNFD) 00094000 * GPR1 - ARGUMENT ADDRESS (PASSED BACK FROM DMKSCNFD) 00095000 * GPR2 - PASS PARAMETERS TO CALLED ROUTINES 00096000 * GPR3 - WORK REG 00097000 * GPR4 - WORK REG 00098000 * GPR5 - WORK REG 00099000 * GPR6 - WORK REG 00100000 * GPR7 - INTERNAL LINKAGE REG 00101000 * GPR8 - RDEVBLOK ADDRESS (FROM SYSTEM ROUTINES) 00102000 * GPR9 - COMMAND LINE BUFFER (FROM DMKNET) AND LINKAGE REG 00103000 * GPR10 - IOBLOK ADDRESS 00104000 * GPR11 - VMBLOK ADDRESS 00105000 * GPR12 - BASE REG 00106000 * GPR13 - SAVEAREA ADDRESS 00107000 * GPR14 - LINKAGE REG 00108000 * GPR15 - LINKAGE REG 00109000 *. 00110000 EJECT 00111000 COPY OPTIONS @V200899 00112000 COPY LOCAL @V200899 00113000 SPACE 2 00114000 DMKNLD START , @V200899 00115000 SPACE 00116000 MODID DC CL8'DMKNLD' @V200899 00117000 SPACE 00118000 USING PSA,R0 @V200899 00119000 USING RDEVBLOK,R8 @V200899 00120000 USING IOBLOK,R10 @V200899 00121000 USING VMBLOK,R11 @V200899 00122000 USING SAVEAREA,R13 @V200899 00123000 SPACE 00124000 EXTRN DMKPGTVG,DMKPGTVR,DMKPGTCG,DMKPGTSD @V200899 00125000 EXTRN DMKSCNFD,DMKSCNRU,DMKSCNVS,DMKSCNRD @V200899 00126000 EXTRN DMKCVTBH,DMKCVTHB,DMKCVTDT,DMKSCNVU @V240820 00127000 EXTRN DMKIOSQR,DMKQCNRD,DMKERMSG @V200899 00128000 EXTRN DMKRPAGT,DMKSTKIO,DMKPTRUL @V407508 00129100 EXTRN DMKQCNCL,DMKQCNTO,DMKVDREL @V240820 00130000 EXTRN DMKPTRAN,DMKQCNWT @V407508 00130100 SPACE 00132000 EXTRN DMKRNHIN,DMKRNTBL,DMKSYSDU @V407508 00133100 EXTRN CXWMAXI1,CXWMAXI2,CXWMINI1,CXWMINI2 LOADER @V200899 00134000 EJECT 00137000 *. 00138000 * COMMAND LINE FORMAT - 00139000 * 00140000 * +---------+-----------------------------------+ 00141000 * | NETWORK | LOAD RADDR NCPNAME | 00142000 * | NET | | 00143000 * +---------+-----------------------------------+ 00144000 * 00145000 * OPERATION - 00153000 * 00154000 * 1. DETERMINE WHETHER ENTRY WAS FROM SYSTEM OR VIA NETWORK 00155000 * CONSOLE COMMAND. IF ENTERED FROM SYSTEM, GO TO STEP 10. 00156100 * OTHERWISE SET NETWORK CALL FLAG AND CONTINUE. 00157100 * 2. CALL DMKSCNFD TO GET 'RADDR' OPERAND FROM COMMAND LINE. 00159000 * IF NO OPERAND, CALL DMKERMSG TO SEND MESSAGE DMKNLD021E. 00160000 * 3. CALL DMKCVTHB TO CONVERT 'RADDR' TO BINARY. IF ERROR ON 00161000 * CONVERSION, CALL DMKERMSG TO SEND MESSAGE DMKNLD021E. 00162000 * 4. CALL DMKSCNRU TO GET REAL DEVICE (RDEVBLOK) FOR 'RADDR' 00163000 * DEVICE. IF DEVICE DOES NOT EXIST, CALL DMKERMSG TO SEND 00164000 * MESSAGE DMKNLD040E. 00165000 * 5. DETERMINE WHETHER 'RADDR' DEVICE IS A 370X. IF NOT, CALL 00166000 * DMKERMSG TO SEND DMKNLD006E MESSAGE. 00167000 * 6. CHECK IF 370X IS CURRENTLY OFFLINE. IF SO, CALL DMKERMSG 00168000 * TO SEND MESSAGE DMKNLD046E. 00169000 * 7. DETERMINE IF 370X IS DEDICATED TO A USER. IF YES, CALL 00170000 * DMKERMSG TO SEND MESSAGE DMKNLD140. 00171000 * 8. IF REQUEST IS FOR THE DUMP FUNCTION, GO TO STEP 25: 00172000 * OTHERWISE CALL DMKSCNFD TO GET 'NCPNAME' OPERAND 00173000 * FOR LOAD PROCESSING. IF NO OPERAND IS FOUND, CALL 00174000 * DMKERMSG TO SEND MESSAGE DMKNLD026E. 00175000 * 9. IF 'NCPNAME' OPERAND IS GREATER THAN EIGHT (8) CHARACTERS, 00176000 * CALL DMKERMSG TO SEND MESSAGE DMKNLD002E: OTHERWISE PLACE 00177000 * 'NCPNAME' IN RDEVBLOK FOR 370X. 00178000 * 10. TRANS IN DMKRNTBL 00179000 * 11. SEARCH DMKRNTBL FOR THE ENTRY CORRESPONDING TO 'NCPNAME' 00180000 * IF NO ENTRY IS FOUND, CALL DMKERMSG TO SEND MESSAGE 00181000 * DMKNLD044E. 00182000 * 12. CALL DMKSCNVS TO FIND TARGET DASD VOLUME ( AS INDICATED BY 00183000 * DMKRNTBL ENTRY ). IF NOT FOUND, CALL DMKERMSG TO 00184000 * SEND MESSAGE DMKNLD171E. 00185000 * 13. DETERMINE WHETHER VOLUME IS CP-OWNED. IF NOT, CALL 00186000 * DMKERMSG TO SEND MESSAGE DMKNLD171E. 00187000 * 14. CALCULATE MAXIMUM NUMBER OF PAGES / CYL FOR THE DEVICE 00188000 * CONTAINING THE TARGET VOLUME. 00189000 * 15. CALL DMKPGTVG TO GET A PAGE OF CP PAGEABLE CORE FOR USE 00190000 * AS A BUFFER. 00191000 * 16. TRANS IN DASD PAGE CONTAINING CCPARM (IE. FIRST RECORD 00192000 * OF NCP SAVED IMAGE) AND DETERMINE WHETHER THE NCP IMAGE 00193000 * WILL FIT IN THE SPECIFIED 370X. IF NOT, CALL DMKERMSG TO 00194000 * SEND MESSAGE DMKNLD170E. IF NCP WILL FIT, SAVE THE SIZE OF 00195000 * THE NCP AND THE ENTRY POINT ADDRESS (OBTAINED FROM CCPARM) 00196000 * ALSO FIND THE DASD ADDRESS OF THE FIRST NCP CORE IMAGE 00197000 * RECORD BY CALCULATING THE NUMBER OF RESOURCE DATA 00198000 * RECORDS FROM THE SIZE VALUE CONTAINED IN CCPARM. 00199000 * 17. IF A NICLIST ALREADY EXISTS FOR THE 370X, CALCULATE ITS 00200000 * SIZE FROM VALUES IN 370X RDEVBLOK AND CALL DMKFRET TO 00201000 * FREE IT. ALSO MARK RDEVBLOK AS INACTIVE. 00202000 * 18. GO TO IOBINIT SUBROUTINE TO GET AND INITIALIZE AN 00203000 * IOBLOK AND ADDITIONAL SAVE AREA FOR USE BY THE 370X 00204000 * I/O ROUTINE. 00205000 * 19. IF LOAD FUNCTION WAS REQUESTED VIA CONSOLE COMMAND, 00206000 * ISSUE A TIO TO THE 370X TO DETERMINE ITS STATUS (THIS 00207000 * IS UN-NECESSARY IF THE CALLER WAS A SYSTEM ROUTINE). 00208000 * 20. MARK 370X AS NOT READY AND GO TO SNDBOOTS SUB-ROUTINE 00209000 * TO TRANSMIT THE OS/360 LOADER BOOTSTRAP PROGRAM TO THE 00210000 * 370X. ANY ERRORS THAT OCCUR DURING THE BOOTSTRAP 00211000 * ROUTINE WILL RESULT IN MESSAGE: 00212000 * 00213000 * DMKNLD460E CTLR 'RADDR' LOAD FAILED; PROGRAM CHECK 00214000 * 00215000 * 21. USING DMKRPAPT, READ IN THE CORE IMAGE RECORDS FROM THE 00216000 * TARGET DASD, BUILD CCWS TO DEBLOCK FROM 4K TO 512 BYTES, 00217000 * AND TRANSMIT CORE IMAGE TO 370X. 00218000 * 22. TRANSMIT THE ENTRY POINT ADDRESS SAVED IN STEP 16 TO THE 00219000 * 370X. 00220000 * 23. READ IN THE FIRST RESOURCE DATA RECORD (IE. CCPARM), AND 00221000 * CALCULATE THE SIZE OF THE NICLIST NEED FOR THIS NCP, 00222000 * CALL DMKFREE TO OBTAIN STORAGE FOR THE NICLIST,AND 00223000 * FILL IN THE NEW NICLIST FROM DATA CONTAINED IN THE 00224000 * RESOURCE RECORDS (IF NECESSARY, ADDITIONAL RESOURCE 00225000 * RECORDS WILL BE READ IN). 00226000 * 24. SEND COMPLETION RESPONSE, CALL DMKFRET TO FREE 00227000 * IOBLOK AND SAVE AREA, RELEASE BUFFER BACK TO CP, AND EXIT. 00228000 * 00277000 * RESPONSES - 00278000 * CTLR (RADDR) (NCPNAME) LOAD COMPLETE 00279000 * 00281000 * ERROR MESSAGES - 00282000 * DMKNLD002E INVALID OPERAND - (OPERAND) 00283000 * DMKNLD006E INVALID DEVICE TYPE (ADDR) 00285000 * DMKNLD021E RADDR MISSING OR INVALID 00286000 * DMKNLD026E OPERAND MISSING OR INVALID 00287000 * DMKNLD040E DEV (ADDR) DOES NOT EXIST 00288000 * DMKNLD044E SYSTEM (NAME) DOES NOT EXIST 00289000 * DMKNLD170E SYSTEM (NAME) EXCEEDS STORAGE 00290000 * DMKNLD171E SYSTEM (NAME) VOLID (VOLID) NOT MOUNTED 00291000 * DMKNLD179E SYSTEM (NAME) VOLID (VOLID) NOT CP OWNED 00292000 * DMKNLD046E CTLR 'RADDR' OFFLINE 00293000 * DMKNLD140E CTLR 'RADDR' ATTACHED TO 'USERID' 00294000 * DMKNLD143E CTLR 'RADDR' IN USE BY SYSTEM 00295000 * DMKNLD460E CTLR 'RADDR' LOAD FAILED; PROGRAM CHECK 00296100 * DMKNLD470E CTLR 'RADDR' LOAD FAILED; PAGING I/O ERROR 00298100 * DMKNLD471E CTLR 'RADDR' LOAD FAILED; UNRECOVERABLE I/O ERROR 00299100 * DMKNLD464E CTLR 'RADDR' CC = 3; DEPRESS 370X "LOAD" BUTTON 00301000 * DMKNLD461R CTLR 'RADDR' IPL NOT REQUIRED; ENTER "YES" TO CONTINUE 00302000 *. 00303000 SPACE 2 00304000 *--------------------------------------------------------------------* 00305000 * EQUATES USED IN FLAG BYTE IN SAVEWRK1 * 00306000 *--------------------------------------------------------------------* 00307000 SPACE 00308000 FROMNET EQU X'80' CALL WAS FROM NETWK CMD (DMKNET) @V200899 00309000 BOOTSFLG EQU X'10' BOOTSTRAP REC PROC'NG INDICATOR @V200899 00312000 UNLKBUF EQU X'08' UNLOCK REQUIRED FOR PAGE BUFFER @V200899 00313000 PGTVREL EQU X'04' RELEASE REQD FOR VIRT BUFF ADDR @V200899 00314000 RNSAVREL EQU X'01' IOBLOK & RNIOSAV AREAS MUSTBE FREED@V200899 00317000 SPACE 2 00318000 DMKNLDR RELOC ENTRY POINT FOR 370X LOAD PROCESS@V200899 00319000 SWITCH CONTINUE ON THE I/O PROCESSOR @V407508 00320100 MVI SAVEWRK1,NONE INITIALIZE FLAG BYTE @V407508 00320200 BAL R10,CHKENTY CHECK ENTRY CONDITIONS @VM08949 00321000 MVC SAVEWRK2(8),RDEVNCP PUT NCPNAME IN SAVE AREA @VA01667 00322000 B LOADNCP PROCESS SYSTEM LOAD REQUEST @V200899 00323000 SPACE 2 00324000 CHKENTY EQU * CHECK FOR SYSTEM OR C.F. ENTRY @VM08949 00330000 TM SAVER2+3,SYSTEM ENTRY VIA CONSOLE FUNCTION ?@V200899 00331000 BZ NETCALL YES - SETUP FOR PARM SCAN @V200899 00332000 ST R8,SAVEWRK9 SAVE RDEVBLOK POINTER @V200899 00333000 CALL DMKSCNRD GET 'CCU' ADDRESS IN GR1 @V200899 00334000 STH R1,SAVEWRK1+2 SAVE IT FOR LATER MESSAGES @V200899 00335000 BR R10 RETURN FOR IMMEDIATE COMMAND @VM08949 00336000 EJECT 00337000 NETCALL EQU * CONSOLE FUNCTION 'NETWORK LOAD/DUMP' @V200899 00338000 IC R2,SAVEWRK1 PICK UP FLAG BYTE @V200899 00339000 SVC 16 RETURN DIRECTLY TO DMKCFM ON EXIT@V200899 00340000 STC R2,SAVEWRK1 RESET LOAD/DUMP FLAG BIT @V200899 00341000 OI SAVEWRK1,FROMNET ENTERED FROM DMKNETWK @V200899 00342000 CALL DMKSCNFD LOCATE REAL DEVICE ADDRESS @V200899 00343000 BNZ NLD021 BRANCH IF NOTHING FOUND @V200899 00344000 CALL DMKCVTHB TRY TO CONVERT TO BINARY @V200899 00345000 BNZ NLD021 BRANCH IF CONVERT FAILED @V200899 00346000 STH R1,SAVEWRK1+2 SAVE REAL ADDRESS @V200899 00347000 CALL DMKSCNRU GET REAL DEVICE BLOKS @V200899 00348000 BNZ NLD040 RADDR DOES NOT EXIST @V200899 00349000 ST R8,SAVEWRK9 SAVE RDEVBLOK ADDRESS @V200899 00350000 USING RDEVBLOK,R8 @V200899 00351000 LA R0,CLASSPEC*256+TYP3705 DEVICE CLASS, TYPE @V200899 00352000 CH R0,RDEVTYPC IS THIS DEVICE REALLY A 370X ? @V200899 00353000 BNE NLD006 NO -- INVALID DEVICE TYPE @V200899 00354000 TM RDEVSTAT,RDEVDISA IS DEVICE CURRENTLY OFFLINE @V200899 00355000 BNZ NLD046 YEP, GIVE THE MSG AND QUIT @V200899 00356000 TM RDEVSTAT,RDEVDED 3705 ATTACHED TO A USER NOW @V200899 00357000 BNZ NLD140 YES, TELL CALLER AND QUIT @V200899 00358000 CALL DMKSCNFD LOCATE 'NCPNAME' OPERAND @V200899 00361000 BNZ NLD026 OPERAND MISSING @V200899 00362000 CL R0,F8 THIS IS THE MAXIMUM LENGTH @V200899 00363000 BH NLD002 OPERAND INVALID @V200899 00364000 LR R2,R0 OPERAND LENGTH @V200899 00365000 BCTR R2,0 @V200899 00366000 MVC SAVEWRK2(8),BLANKS MOVE BLANKS TO NCPNAME FIELD@V200899 00367000 EX R2,MOVENAME MOVE NCPNAME INTO SAVEAREA @V200899 00368000 * B LOADNCP LOAD UP THE 370X 00369000 EJECT 00370000 LOADNCP EQU * GET TABLE OF NAMED CONTROL PROGRAMS @V200899 00371000 L R1,=A(DMKRNTBL) ADDRESS OF NCPTBLS @V200899 00372000 LTR R1,R1 IS DMKRNTBL DEFINED ? @VM08838 00373000 BNP NLD044 NO -- SYSTEM CANNOT EXIST @VM08838 00374000 TRANS 2,1,OPT=(SYSTEM,BRING,DEFER,IOERETN),AFFINITY @V407508 00375100 BNZ NLD470 PAGING ERROR @V305435 00376000 SPACE 00377000 USING NCPTBL,R4 @V200899 00378000 LR R4,R2 ADDRESS OF FIRST NCPTBL ENTRY @V200899 00379000 NAMELOOP EQU * FIND THE NCPTBL FOR THIS NCP @V200899 00380000 CLC NCPNAME(8),SAVEWRK2 COMPARE FOR THE NAME @V200899 00381000 BE NAMEHIT BRANCH IF HAVE A MATCH @V200899 00382000 L R3,NCPPNT LOAD DISP TO NEXT NCPTABLE ENTRY @V200899 00383000 AR R4,R3 GET ADDRESS OF NEXT ENTRY @V200899 00384000 LTR R3,R3 LAST ENTRY ??? @V200899 00385000 BNZ NAMELOOP NO - GO TRY AGAIN @V200899 00386000 B NLD044 NCP NAMED DOES NOT EXIST @V200899 00387000 SPACE 00388000 MOVENAME MVC SAVEWRK2(*-*),0(R1) EXECUTED MOVE @V200899 00389000 SPACE 00390000 NAMEHIT EQU * @V200899 00391000 MVC SAVEWRK8(4),NCPSTART SAVE CCPD ... @V2D3931 00392000 L R3,NCPPAGCT NUMBER OF PAGES IN NCP TO R3 @V200899 00393000 STC R3,SAVEWRK1+1 SAVE IN SAVEWRK1 @V200899 00394000 LA R1,NCPVOL ADDRESS OF VOL. SERIAL FOR SYSVOL@V200899 00395000 LA R0,6 SERIAL LENGTH @V200899 00396000 CALL DMKSCNVS SEARCH FOR THIS VOLUME @V200899 00397000 BNZ NLD171 SYSTEM VOLUME IS NOT MOUNTED @V200899 00398000 DROP R4,R8 @V200899 00399000 USING RDEVBLOK,R1 USE RDEVBLOK FOR SYSTEM DASD @V200899 00400000 TM RDEVFLAG,RDEVOWN IS VOLUME CP-OWNED ??? @V200899 00401000 BZ NLD179 NOPE -- ERROR @V200899 00402000 L R5,SAVEWRK8 PICK UP NCPSTARTING CCPD @V200899 00403000 IC R5,RDEVCODE+1 INSERT DEV INDEX INTO SYSOW TABLE@V200899 00404000 ST R5,SAVEWRK8 AND PUT BACK @V200899 00405000 LA R9,32 MAXIMUM PAGES/CYL ON 2314 @V200899 00406000 TM RDEVTYPE,TYP2314 IS THIS 2314 ???? @V200899 00407000 BO SAVMAXPG YES ----- @V200899 00408000 LA R9,57 TRY 3330 @V200899 00409000 TM RDEVTYPE,TYP3330 IS IT ???? @V200899 00410000 BO SAVMAXPG YES ----- @V200899 00411000 LA R9,120 MAXIMUM PAGES/CYL ON 3350 @V304498 00412000 TM RDEVTYPE,TYP3350 IS THIS 3350 ? @V304498 00413000 BO SAVMAXPG YES ----- @V304498 00414000 LA R9,96 Maximum pages/cyl on 3375 HRC106DK 00414100 TM RDEVTYPE,TYP3375 Is this 3375 ? HRC106DK 00414200 BO SAVMAXPG Yes ----- HRC106DK 00414300 LA R9,150 Maximum pages/cyl on 3380 HRC106DK 00414400 TM RDEVTYPE,TYP3380 Is this 3380 ? HRC106DK 00414500 BO SAVMAXPG Yes ----- HRC106DK 00414600 LA R9,24 MUST BE 2305 OR 3340 @V2A2029 00415000 DROP R1 ABANDON RDEVBLOK FOR SYSTEM DASD @V200899 00416000 EJECT 00417000 USING RDEVBLOK,R8 GO BACK AND USE 370X RDEVBLOK @V200899 00418000 SAVMAXPG EQU * @V200899 00419000 STC R9,SAVEWRK9 PUT MAXPG AWAY FOR LATER @V200899 00420000 CALL DMKPGTVG GET PAGE BUFFER FROM CP CORE @V200899 00421000 ST R1,SAVEWRK7 SAVE VIRTUAL BUFFER ADDRESS @V200899 00422000 OI SAVEWRK1,PGTVREL WE MUST RELEASE IT @V200899 00423000 SPACE 00424000 LR R0,R5 DASD ADDRESS OF CONTROL INFO PAGE@V200899 00425000 * VIRTUAL BUFFER ADDRESS IS STILL IN GR1 00426000 CALL DMKRPAGT,PARM=BRING+SYSTEM,AFFINITY @V407508 00427100 BNZ NLD470 PAGING ERROR @V305435 00428000 LR R7,R2 ADDRESS OF CCPARM TO R7 @V200899 00429000 USING CCPARM,R7 PARM BLOCK CREATED BY 'SAVENCP' @V200899 00430000 CLC SAVEWRK2(8),CCPNAME HAS THE IMAGE BEEN SAVED ?@VM08697 00431000 BNE NLD044E NO -- SYSTEM DOES NOT EXIST @VM08697 00432000 SR R1,R1 CLEAR WORK REG @V200899 00433000 IC R1,RDEVMDL GET STORAGE SIZE MODEL NUMBER @V200899 00434000 SLL R1,14(0) MULTIPLY BY 16384 . . . @VM08625 00435000 CL R1,CCPSIZE STORAGE LARGE ENOUGH ? @V200899 00436000 BL NLD170 NO -- SYSTEM EXCEEDS STORAGE @V200899 00437000 L R0,CCPSIZE NCP CORE SIZE TO R0 @V200899 00438000 L R1,CCPENTRY NCP ENTRY POINT TO R1 @V200899 00439000 STM R0,R1,SAVEWRK4 SAVE IN WORKAREA FOR LATER @V200899 00440000 L R1,CCPPSIZE SIZE OF PARMS TO R1 @V200899 00441000 LA R1,4095(0,R1) ADD PAGE SIZE -1 FOR OVERFLOW @V200899 00442000 SRL R1,12 DIVIDE BY 4096 TO GET NUM. OF PAGES @V200899 00443000 DROP R7 @VM08949 00444000 SPACE 00445000 L R3,SAVEWRK8 'CCPD' OF CCPARM START ON DISK @VM08949 00446000 SLR R5,R5 CLEAR A WORK REGISTER @VM08949 00447000 IC R5,SAVEWRK8+2 GET STARTING PAGE NUMBER IN GR5 @VM08949 00448000 AR R1,R5 GR1 = START PAGE NUMBER OF IMAGE @VM08949 00449000 CR R1,R9 IMAGE ON THE NEXT CYLINDER ? @VM08949 00450000 BNH NEXTCYL NO -- JUST RESET THE PAGE NUMBER @VM08949 00451000 SR R1,R9 GR1 = PAGE NUMBER ON NEXT CYL @VM08949 00452000 A R3,=X'00010000' ADD ONE TO CYLINDER NUMBER @VM08949 00453000 NEXTCYL EQU * FIX UP 'CCPD' FOR IMAGE START @VM08949 00454000 STC R1,TEMPSAVE PUT DOWN THE NEW PAGE NUMBER @VM08949 00455000 ICM R3,2,TEMPSAVE GR3 = 'CCPD' OF PROGRAM IMAGE @VM08949 00456000 ST R3,SAVEWRK6 SAVE IT TEMPORARILY @VM08949 00457000 EJECT 00458000 USING RNIOSAV,R4 GENERAL ADDRESSABILITY @V200899 00459000 TM RDEVFLAG,RDEVRCVY RECOVERY ALREADY ACTIVE ? @V200820 00460000 BO NLDEXIT YES - GET OUT OF HERE @V200820 00461000 BAL R7,IOBINIT ALLOCATE AND SETUP WORK AREAS @V200820 00462000 TM SAVEWRK1,FROMNET ENTERED VIA CONSOLE FUNCTION@V200820 00463000 BZ NOLDTIO NO - NO TEST I/O REQUIRED @V200820 00464000 TM RDEVSTAT,RDEVRSVD IN USE BY THE SYSTEM ? @V200820 00465000 BO NLD143 YES - CANNOT LOAD ON THE FLY@V200820 00466000 TM RDEVSTAT,RDEVNRDY IS THE 370X READY NOW ? @V200820 00467000 BO NOLDTIO NO -- O.K. TO JUST LOAD IT @V200820 00468000 OI IOBSPEC,IOBTIO SCHEDULE TEST I/O FOR 3705 @V200899 00469000 BAL R9,DORNIO DETERMINE IF LOAD IS REQUIRED@V200899 00470000 NI IOBSPEC,X'FF'-IOBTIO RESET TIO BIT IN IOBLOK@V200899 00471000 NOLDTIO EQU * 370X TO BE LOADED - CLEAN UP NICLIST @V200899 00472000 TM RDEVFLAG,RDEVLNCP IS THERE A NICBLOK LIST ? @V200899 00473000 BZ NONICL NO, DO NOT HAVE TO FREE @V200899 00474000 LH R1,RDEVMAX MAXIMUM RESOURCE ID. @V200899 00475000 LA R1,1(0,R1) GR1 = NUMBER OF NICBLOKS @V200899 00476000 MH R1,=AL2(NICSIZE) SIZE OF NICLIST IN DBLWRDS @V200899 00477000 LR R0,R1 @V200899 00478000 L R1,RDEVNICL @V200899 00479000 CALL DMKFRET RETURN NICLIST TO FREE STORAGE @V200899 00480000 SLR R1,R1 @V200899 00481000 ST R1,RDEVNICL @V200899 00482000 NONICL EQU * @V200899 00483000 NI RDEVFLAG,255-(RDEVLNCP+RDEVLCEP) NOT LOADED @V200820 00484000 MVC RDEVNCP(8),SAVEWRK2 MOVE NCPNAME TO RDEVBLO@V200899 00485000 OI RDEVSTAT,RDEVNRDY NOT READY UNTIL LOAD IS COMP@V200820 00486000 OI RDEVFLAG,RDEVRCVY RECOVERY PROCESS INITIATED @V200820 00487000 SPACE 00488000 L R1,=A(CXWMINI1) GET ENTRY OF CA1 PHASE1 @V200899 00489000 L R3,=A(CXWMINI2) GET ENTRY OF CA1 PHASE2 @V200899 00490000 TM RDEVFTR,FTRTYP1 DOES 3705 HAVE A TYPE1 CA ? @V200899 00491000 BO TRANSLDR YES, GO TRANSMIT BOOTSTRAPS @V200899 00492000 L R1,=A(CXWMAXI1) GET ENTRY OF CA2 PHASE1 @V200899 00493000 L R3,=A(CXWMAXI2) GET ENTRY OF CA2 PHASE2 @V200899 00494000 TRANSLDR EQU * @V200899 00495000 BAL R7,SNDBOOTS GO TO BOOTSTRAP XMIT ROUTINE @V200899 00496000 * B LD3705 00497000 EJECT 00498000 *--------------------------------------------------------------------* 00499000 * THE FOLLOWING ROUTINE HANDLES SENDING ALL CORE IMAGE PAGES BUT THE * 00500000 * LAST PAGE ( FULL OR PARTIAL ) TO THE 3705. * 00501000 *--------------------------------------------------------------------* 00502000 LD3705 EQU * @V200899 00503000 L R6,SAVEWRK4 NCPSIZE TO R6 @V200899 00504000 SR R7,R7 CLEAR R7 FOR SHIFT INST @V200899 00505000 SRDL R6,12 DIVIDE BY PAGE SIZE (4096) @V200899 00506000 SRL R7,20 OVERFLOW TO LOW ORDER BYTES OF R7@V200899 00507000 LTR R7,R7 IS THERE ANY OVERFLOW ? @V200899 00508000 BNZ LSTRECOK YES, - PAGE COUNT IS OK @V200899 00509000 BCTR R6,0 NO, DECREMENT PAGE COUNT BY ONE @V200899 00510000 L R7,F4096 AND MAKE OVERFLOW = TO PAGE SIZE@V200899 00511000 * TO ALLOW FOR LAST RECORD PROCESSING 00512000 LSTRECOK EQU * @V200899 00513000 ST R7,OVFLOSIZ SAVE OVERFLOW FOR LAST RECORD @V200899 00514000 L R3,SAVEWRK6 'CCPD' OF FIRST IMAGE PAGE @VM08949 00515000 SPACE 00516000 PAGELOOP EQU * SEND IMAGE PAGES TO THE 370X @VM08949 00517000 BAL R9,LOCKBUF BRING AND LOCK IMAGE PAGE @VM08949 00518000 LA R1,RNCCWS START OF CCW LIST AREA @VM08949 00519000 LA R5,8(0,0) NUMBER OF WRITE CCW'S @VM08949 00520000 LA R9,512(0,0) LENGTH FOR EACH WRITE @VM08949 00521000 LDCCWLP EQU * @V200899 00522000 ST R2,0(0,R1) REAL ADDRESS TO CCW @V200899 00523000 MVI 0(R1),WRITEOP SET WRITE OP IN CCW @V200899 00524000 ST R9,4(0,R1) SET COUNT AND CLEAR FLAG BYTES @VM08949 00525000 MVI 4(R1),CC+SILI SET CMD CHAIN AND SILI @V200899 00526000 ALR R2,R9 BUMP TO NEXT WRITE RECORD @VM08949 00527000 LA R1,8(0,R1) BUMP TO NEXT CCW @V200899 00528000 BCT R5,LDCCWLP LOOP FOR EIGHT CCW'S (4K BYTES) @VM08949 00529000 MVC 0(8,R1),NOPCCW MOVE IN A NO-OP @V200899 00530000 BAL R9,DORNIO GO TO RN SIO ROUTINE @V200899 00531000 BAL R9,BUFINCR INCREMENT 'CCPD', UNLOCK BUFFER @VM08949 00532000 BCT R6,PAGELOOP PROCESS NEXT CORE IMAGE RECORD (@V200899 00533000 EJECT 00534000 *--------------------------------------------------------------------* 00535000 * THIS CODE PROCESSES THE LAST CORE IMAGE RECORD SENT TO 3705 * 00536000 *--------------------------------------------------------------------* 00537000 LSTRECPR EQU * @V200899 00538000 BAL R9,LOCKBUF BRING AND LOCK IMAGE PAGE @VM08949 00539000 L R5,OVFLOSIZ SIZE OF LAST IMAGE PIECE @VM08949 00540000 LA R1,RNCCWS START OF CCW LIST AREA @VM08949 00541000 LA R9,512(0,0) LENGTH FOR EACH FULL WRITE CCW @VM08949 00542000 LSTRECLP EQU * @V200899 00543000 ST R2,0(0,R1) RECORD ADDR TO CCW @V200899 00544000 MVI 0(R1),WRITEOP MOVE IN WRITE CC @V200899 00545000 CR R5,R9 IS LENGTH GREATER THAN 512 ? @VM08949 00546000 BNH LRECEND NO, USE REC LENGTH IN CCW @V200899 00547000 ST R9,4(0,R1) SET LENGTH AND CLEAR FLAG BYTES @VM08949 00548000 MVI 4(R1),CC+SILI AND TURN ON CC AND SILI @V200899 00549000 LA R1,8(0,R1) BUMP TO NEXT CCW SLOT @V200899 00550000 ALR R2,R9 BUMP TO NEXT WRITE RECORD @VM08949 00551000 SR R5,R9 DECREMENT REMAINING LENGTH @VM08949 00552000 B LSTRECLP DO IT AGIAN TILL REC LGTH IS LESS@V200899 00553000 LRECEND EQU * @V200899 00554000 ST R5,4(0,R1) SET LENGTH FOR LAST WRITE @VM08949 00555000 MVI 4(R1),CC+SILI TURN ON CC AND SILI TO NOP @V200899 00556000 MVI 0(R1),WRTBRKOP MAKE CCW OP A WRITE BREAK @V200899 00557000 MVC 8(8,R1),NOPCCW MOVE IN A NO-OP @V200899 00558000 BAL R9,DORNIO AND GO TO RN SIO CODE @V200899 00559000 BAL R9,BUFUNLK UNLOCK THE IMAGE PAGE BUFFER @VM08949 00560000 MVC NEXTADDR(4),SAVEWRK5 SAVE CONTROL PROGRAM ENTRY @V2D3931 00561000 * B NICSET ...WHILE WE SETUP THE NICLIST 00562000 DROP R4 @V200820 00563000 EJECT 00564000 *---------------------------------------------------------------------* 00565000 * 370X LOAD HAS COMPLETED WITHOUT ERROR - TIME TO GET AND FILL * 00566000 * NICLIST FOR THE IMAGE JUST LOADED BY RETRIEVING THE RESOURCE DATA * 00567000 * STORED ON SYSTEM DISK WITH NCP CORE IMAGE. * 00568000 *---------------------------------------------------------------------* 00569000 SPACE 00570000 NICSET EQU * @V200820 00571000 L R3,SAVEWRK8 'CCPD' OF CCPARM START PAGE @VM08949 00572000 BAL R9,LOCKBUF BRING AND LOCK THE INFORMATION @VM08949 00573000 LR R7,R2 SET UP ADDRESSABILITY FOR @V200820 00574000 USING CCPARM,R7 DSECT FOR PARMS @V200820 00575000 MVC SAVEWRK5,CCPPSIZE SAVE SIZE OF PARMS FOR LATER@V200820 00576000 TM CCPTYPE,CCPTNCP IS THIS AN NCP ( OR A PEP ) @VA08872 00577100 BO NICSNCP YES, GO SET UP NICLIST @VA08872 00578100 NICSET1A EQU * @VA06109 00578400 LA R6,TEMPSAVE POINT TO A DUMMY 'NICLIST' @V200820 00579000 LA R0,(NICSIZE*8)*2 MAKE IT TWO NICBLOK'S LONG @V200820 00580000 OI RDEVFLAG,RDEVLCEP EMULATOR IS ACTIVE @V200820 00581000 B NICSCEP GO SCAN CCPARM INFORMATION @V200820 00582000 NICSNCP EQU * ALLOCATE NICBLOK LIST @V200820 00583000 LH R1,CCPMAXID MAXIMUM RESOURCE ID TO R1 @V200820 00584000 STH R1,RDEVMAX PUT IN RDEVBLOK @V200820 00585000 LA R1,1(0,R1) BUMP BY ONE TO ALLOW FOR ZERO @V200820 00586000 MH R1,=AL2(NICSIZE) COMPUTE SIZE NEEDED @V200820 00587000 LR R0,R1 NUMBER OF DBLWDS TO R0 @V200820 00588000 CALL DMKFREE GET CORE FOR NEW NICLIST @V200820 00589000 * GR1= ADDRESS OF NICLIST 00590000 ST R1,RDEVNICL PUT ADDR OF NICLIST IN RDEVBLOK @V200820 00591000 OI RDEVFLAG,RDEVLNCP INDICATE NCP ACTIVE @V200820 00592000 TM CCPTYPE,CCPTPEP IS THIS A PEP ? @VA08872 00593100 BNO *+8 NO, NCP ONLY @VA08872 00594100 OI RDEVFLAG,RDEVLCEP EMULATOR IS ALSO ACTIVE @V200820 00595000 SLL R0,3 NUM. DBLWDS * 8 = SIZE OF NICLIST @V200820 00596000 LR R6,R1 NICLIST ADDRESS TO GR6 @V200820 00597000 NICSCEP EQU * START PROCESSING FOR AN EMULATOR @V200820 00598000 LA R1,CCPRESID-CCPARM START OF RESOURCES @V200820 00599000 LA R2,4 PUT INCREMENT INTO R2 @V200820 00600000 LA R3,4095 CONSTANT OF 4095 TO R3 @V200820 00601000 CL R3,CCPPSIZE ARE PARMS 1 FULL PAGE OR LESS ? @V200820 00602000 BL NICSETB NO, . . . @V200820 00603000 L R3,CCPPSIZE YES, USE PARMS SIZE @V200820 00604000 BCTR R3,0 DECREMENT R3 FOR BXH INST. @V200820 00605000 * B NICSETB 00606000 EJECT 00607000 *---------------------------------------------------------------------* 00608000 * REGISTER USAGE DURING THE FOLLOWING CODE TO FILL NICLIST IS: * 00609000 * * 00610000 * GPR1 - OFFSET TO CURRENT RESOURCE ENTRY * 00611000 * GPR2 - SIZE OF RESOURCE ENTRY (USED AS INCREMENT) * 00612000 * GPR3 - OFFSET TO END OF RESOURCE RECORD-1 OR * 00613000 * OFFSET TO END OF RESOURCE ENTRIES-1 * 00614000 * GPR4 - SIZE OF NICBLOK (USED AS INCREMENT) * 00615000 * GPR5 - END OF NICLIST-1 * 00616000 * GPR6 - CURRENT NICLIST ENTRY (IE. CURRENT NICBLOK) * 00617000 * GPR7 - START OF 4K RESOURCE RECORD * 00618000 *---------------------------------------------------------------------* 00619000 SPACE 00620000 NICSETB EQU * @V200820 00621000 USING NICBLOK,R6 @V200820 00622000 LA R4,NICSIZE*8 INCRENENT FOR BUMPING THRU NI@V200820 00623000 LR R5,R0 SIZE (IN BYTES) OF NICLIST @V200820 00624000 LA R5,0(R5,R6) POINT TO END OF NICLIST @V200820 00625000 BCTR R5,0 DECREMENT FOR BXLE INST. @V200820 00626000 SR R9,R9 NICNAME REGISTER @V200820 00627000 L R14,ASYSVM @V200820 00628000 NICSETL EQU * @V200820 00629000 XC NICBLOK(NICSIZE*8),NICBLOK CLEAR NEXT ENTRY @V200820 00630000 USING CCPRESID,R1 DSECT OF CCPARM RESOURCE ENTRY @V200820 00631000 IC R0,CCPRSTYP(R7) GET RESOURCE TYPE FROM CCPARM@V200820 00632000 STC R0,NICTYPE AND PUT IN NICBLOK @V200820 00633000 STH R9,NICNAME STORE RESOURCE ID. IN NICBLOK@V200820 00634000 ST R14,NICUSER VMBLOK ADDRESS TO NICBLOK @V200820 00635000 LH R0,CCPRSTEP(R7) GET EMULATOR ADDRESS (IF ANY)@V200820 00636000 TM RDEVFTR,FTRTYP1 IS THIS A TYPE 1 CA ? @V240820 00637000 BZ *+8 NO -- DON'T SET CHANNEL ADDR@V240820 00638000 ICM R0,2,SAVEWRK1+2 ADD CHANNEL TO SUB-CHANNEL @V240820 00639000 STH R0,NICEPAD AND STORE IT IN NICBLOK @V200820 00640000 IC R0,CCPRSTAT(R7) INITIAL STATUS FOR RESOURCE @V200820 00641000 STC R0,NICSTAT ...SET IN THE NICBLOK @V200820 00642000 CLI NICTYPE,NICTERM+NICCIBM SELECTRIC TERMINAL ? @V200820 00643000 BNE *+8 NO --- @V200820 00644000 OI NICFLAG,NICPSUP ASSUME PRINT SUPPRESS FEATUR@V200820 00645000 TM NICSTAT,NICEPMD+NICSWEP POTENTIAL E.P. LINE ? @V240820 00646000 BZ NICSETN NO -- ALL SET ALREADY @V200820 00647000 L R15,IOBMISC POINTER TO THE WORK AREA @V240820 00648000 STM R0,R14,0(R15) SAVE THE CURRENT REGISTERS @V240820 00649000 LR R9,R10 SAVE THE IOBLOK ADDRESS IN GR9 @V240820 00650000 LH R1,NICEPAD EMULATOR-MODE ADDRESS @V200820 00651000 CALL DMKSCNRU TRY TO FIND THE RDEVBLOK @V200820 00652000 BNZ NICSETE NOPE - IGNORE IT @V200820 00653000 L R1,RDEVUSER GET ADDR OF RDEVBLOK VMBLOK @V407508 00654100 SWTCHVM OPT=STAY SWITCH TO THIS VMBLOK @V407508 00655100 LH R1,SAVEWRK1+2 NATIVE ADDRESS FOR THE 370X @V200820 00657000 STH R1,RDEVBASE MAKE SURE THIS IS SET @V200820 00658000 NI RCUSTAT-RCUBLOK(R7),255-(RCUDISA+RCUCHAOF) @V4M0244 00659000 * VARY ON CONTROL UNIT AND CHANNEL PATH TO DEVICE @V4M0244 00659100 TM RDEVSTAT,RDEVDED+RDEVDISA ATTACHED / OFFLINE@V240820 00660000 BNZ NICSET1 YES - SKIP NEXT PART @V240820 00661000 TM RDEVFLAG,RDEVENAB WAS THE DEVICE ENABLED ? @V240820 00662000 BZ NICSET4 NO -- JUST RESET TO ZERO @V240820 00663000 CALL DMKQCNCL FLUSH ANY CONTASK CHAIN @VM08809 00664000 CL R11,ASYSVM WAS THERE AN ACTIVE USER ? @V240820 00665000 BE NICSET1 NO -- O.K. @VM08809 00666000 CALL DMKQCNTO,AFFINITY FORCE DISCONNECT THIS USER @V407508 00667100 MVC RDEVUSER(4),ASYSVM RESET TO THE SYSTEM VMBLOK @VA01892 00668000 NICSET1 EQU * CLEAN UP OUTSTANDING I/O @VM08809 00669000 L R4,RDEVFIOB INIT IOBLOK FORWARD POINTER @VA04587 00669500 ICM R10,15,RDEVAIOB TEST FOR ACTIVE I/O @V240820 00670000 BZ NICSET3 NO -- CONTINUE @V240820 00671000 TM IOBFLAG,IOBCP CP GENERATED I/O ? @VA04587 00671300 BZ NICSET3 NO, LEAVE FOR DMKVDREL @VA04587 00671600 SLR R0,R0 @VM08809 00672000 ST R0,RDEVAIOB NO MORE ACTIVE IOBLOK @VM08809 00673000 NICSET2 EQU * TRY TO CLEAN UP QUEUED IOBLOKS @VM08809 00674000 LA R0,IOBSIZE SIZE OF IOBLOK @VA04587 00675100 LR R1,R10 ADDRESS OF IOBLOK @VA04587 00676100 CALL DMKFRET UNLOAD IT .... POST HASTE @VA04587 00677100 NICSET3 EQU * @VM08809 00678000 CR R4,R8 ANY IOBLOKS QUEUED ? @VA04587 00678700 BE NICSET4 NO, ...... @VA04587 00679400 LR R10,R4 ADDRESSABILITY FOR IOBLOK @VA04587 00680100 L R4,IOBFPNT POINT TO NEXT BLOCK ON QUEUE @VA04587 00680800 TM IOBFLAG,IOBCP CP GENERATED I/O ? @VA04587 00681500 BZ NICSET3 TRY NEXT IOBLOK ............ @VA04587 00682200 LM R1,R2,IOBFPNT PICK UP CHAIN LINKS .. @VA04587 00682900 ST R1,IOBFPNT-IOBLOK(,R2) DE-CHAIN IT ..... @VA04587 00683600 ST R2,IOBBPNT-IOBLOK(,R1) ...... @VA04587 00684300 B NICSET2 GO RESET ANOTHER IOBLOK @VM08809 00685000 SPACE 00686000 NICSET4 EQU * CLEAN UP RDEVBLOK FLAGS @VM08809 00687000 NI RDEVFLAG,RDEVEPMD+RDEVENAB LEAVE THESE @VM08809 00688000 NI RDEVSTAT,RDEVDED+RDEVIRM AND THESE @VM08809 00689000 CLI RDEVTYPE,TYPBSC IS THIS A BISYNC LINE ? @V2D3931 00690000 BE *+8 YES, BYPASS CLEARING FLAG BYTE @V2D3931 00691000 MVI RDEVTFLG,X'00' RESET TERMINAL FLAGS @VM08809 00692000 MVI RDEVSTA2,X'00' . . . @VM08809 00693000 TM SAVEWRK1,FROMNET CALLED FROM DMKNETWK ? @VM08809 00694000 BZ *+8 NO -- O.K. AS IS @VM08809 00695000 NI RDEVFLAG,255-RDEVENAB LET THE LINE RE-ENABLE @VM08809 00696000 TM RDEVTYPE,TYPIBM1 2741 / 1050 LINE ? @VM08809 00697000 BZ NICSET5 NO -- @VM08809 00698000 MVI RDEVTYPE,TYPUNDEF NOW UNDEFINED TYPE @VM08809 00699000 MVI RDEVTMCD,RDEVPTTC RESET TERMINAL CODE @VM08809 00700000 EJECT 00701000 NICSET5 EQU * RESET AND CONTINUE @VM08809 00702000 LR R10,R9 RESTORE OUR OWN IOBLOK ADDRESS @V240820 00703000 TM RDEVSTAT,RDEVDED WAS THE DEVICE DEDICATED ? @V240820 00704000 BZ NICSET7 NO -- CHECK FOR EP-MODE @V240820 00705000 LR R9,R8 RDEVBLOK ADDRESS TO GR9 @V240820 00706000 LH R1,RDEVATT VIRTUAL DEVICE ADDRESS @V240820 00707000 CALL DMKSCNVU GET THE VIRTUAL DEVICE BLOCKS @V240820 00708000 LTR R8,R8 IS THERE A VIRTUAL DEVICE BLOCK ?@VA08229 00708100 BNP NODETACH NO, CANNOT DETACH OR RELEASE IT @VA08229 00708200 USING VDEVBLOK,R8 @V240820 00709000 TM VDEVFLAG,VDEVDIAL DIALED CONNECTION ? @V240820 00710000 BO NICSET6 YES - JUST RELEASE IT @V240820 00711000 LH R1,VDEVADD VIRTUAL DEVICE ADDRESS ALONE @V240820 00712000 SLL R1,1(0) SHIFT FOR VCUDVTBL INDEX @V240820 00713000 L R2,FFS X'FFFFFFFF' @V240820 00714000 STH R2,VCUDVTBL-VCUBLOK(R1,R7) DETACH DEVICE @V240820 00715000 STH R2,VDEVADD . . . @V240820 00716000 DROP R8 @V240820 00717000 NICSET6 EQU * RELEASE DEDICATED DEVICE @V240820 00718000 CALL DMKVDREL,AFFINITY . . . @V407508 00719100 NODETACH EQU * BYPASS DETACH AND RELEASE @VA08229 00719600 LR R8,R9 RDEVBLOK BACK TO GR8 AGAIN @V240820 00720000 USING RDEVBLOK,R8 @V240820 00721000 NICSET7 EQU * CHECK FOR EP-MODE SWITCHED LINE @V240820 00722000 TM RDEVFLAG,RDEVEPMD SWITCHED FROM NCP TO EP ? @V240820 00723000 BZ NICSET8 NO -- ALL DONE HERE @V240820 00724000 L R1,SAVEWRK9 370X BASE RDEVBLOK @V240820 00725000 LA R1,0(R1) ZERO HIGH ORDER BYTE @VA12808 00725500 MVC RDEVEPDV(4),RDEVEPDV-RDEVBLOK(R1) RE-CHAIN @V240820 00726000 ST R8,RDEVEPDV-RDEVBLOK(,R1) . . . @V240820 00727000 L R7,RDEVCUA CONTROL UNIT FOR DYNAMIC BLOCK @V240820 00728000 LH R1,RDEVADD REAL DEVICE ADDRESS ALONE @V240820 00729000 SLL R1,1(0) SHIFT FOR RCUDVTBL INDEX @V240820 00730000 L R2,FFS X'FFFFFFFF' @V240820 00731000 STH R2,RCUDVTBL-RCUBLOK(R1,R7) DISCONNECT @V240820 00732000 STH R2,RDEVADD RESET DYNAMIC RDEVBLOK ADDRESS @V240820 00733000 NICSET8 EQU * RESTORE VALUES @V240820 00734000 L R8,SAVEWRK9 BACK TO THE 370X RDEVBLOK @V240820 00735000 LA R8,0(R8) ZERO HIGH ORDER BYTE @VA12808 00735500 L R1,SAVER11 GET ADDR OF CALLER'S VMBLOK @V407508 00736100 SWTCHVM OPT=STAY SWITCH TO THIS VMBLOK @V407508 00737100 EJECT 00739000 NICSETE EQU * @V240820 00740000 L R15,IOBMISC POINTER TO THE WORK AREA @V240820 00741000 LM R0,R14,0(R15) RESTORE REGISTERS @V240820 00742000 TM NICSTAT,NICSWEP SWITCHABLE TO NCP-MODE ? @V200820 00743000 BO NICSETN YES - NOW WE'RE ALL SET @V200820 00744000 BCTR R9,0 BACK OFF THE RESOURCE I.D. @V200820 00745000 SLR R6,R4 BACK OFF THE NICBLOK ADDRESS @V200820 00746000 OI RDEVFLAG,RDEVEPLN EMULATOR LINE IN USE ON 370X@V240820 00747000 NICSETN EQU * NEXT CCPARM ENTRY, NEXT NICBLOK @V200820 00748000 LA R9,1(0,R9) BUMP NICNAME REG @V200820 00749000 BXH R1,R2,NICSETP BRANCH IF NO MORE CCPARM @V200820 00750000 BXLE R6,R4,NICSETL BRANCH IF MORE NICLIST @V200820 00751000 B LOADCMP @V200820 00752000 NICSETP EQU * @V200820 00753000 BXH R6,R4,LOADCMP BRANCH IF ALL DONE @V200820 00754000 CL R1,SAVEWRK5 END OF RESOURCE DATA ? @V200820 00755000 BE LOADCMP YES - COMMAND COMPLETE @V200820 00756000 L R3,SAVEWRK8 CURRENT 'CCPD' FOR CCPARM PAGE @VM08949 00757000 BAL R9,BUFINCR INCREMENT CCPD, UNLOCK BUFFER @VM08949 00758000 ST R3,SAVEWRK8 SAVE NEW CCPD VALUE @VM08949 00759000 BAL R9,LOCKBUF BRING AND LOCK THE NEW PAGE @VM08949 00760000 LR R7,R2 RADDR OF CCPARM TO R7 @V200899 00761000 SR R1,R1 ZERO CCPARM OFFSET REG @V200899 00762000 LA R2,4 PUT CCPARM INCREMENT BACK INT@V200899 00763000 L R3,SAVEWRK5 GET NUMBER OF BYTES OF CCPARMS @V200899 00764000 S R3,F4096 MINUS 4K @V200899 00765000 ST R3,SAVEWRK5 PUT IT BACK IN CASE IT IS NEEDED@V200899 00766000 LA R3,4095 BUFFER SIZE - 1 TO R3 @V200899 00767000 C R3,SAVEWRK5 REMAINING PARMS LT 4K ? @V200899 00768000 BL NICSETL NO, . . . . . @V200899 00769000 L R3,SAVEWRK5 YES, USE BYTES REMAINING @V200899 00770000 BCTR R3,0 DECREMENT FOR BXH INST. @V200899 00771000 B NICSETL AND LOOP @V200899 00772000 EJECT 00773000 LOADCMP EQU * @V200899 00774000 BAL R9,BUFUNLK UNLOCK THE BUFFER PAGE @VM08949 00775000 *--------------------------------------------------------------------* 00776000 * NOW WRITE NCP ENTRY POINT ADDRESS TO 3705 * 00777000 * (THIS MUST COME AFTER SETTING UP NICBLOK LIST, SINCE * 00778000 * THE 370X NCP WILL PRESENT 'IPL COMPLETE' BTU TO DMKRNH) * 00779000 *--------------------------------------------------------------------* 00780000 L R4,IOBMISC POINT TO RNIOSAV WORK AREA @V200899 00781000 USING RNIOSAV,R4 @V200899 00782000 LA R6,NEXTADDR POINT TO THE ENTRY POINT ADDRESS @V240820 00783000 ST R6,RNCCWS AND PUT IT IN CCW @V200899 00784000 MVI RNCCWS,WRITEOP SET CCW OP TO WRITE @V200899 00785000 LA R6,4(0,0) LENGTH OF DATA TO R6 @V200899 00786000 ST R6,RNCCWS+4 AND INTO CCW @V200899 00787000 MVI RNCCWS+4,CC+SILI CHAIN FLAGS TO NOP @V200899 00788000 MVC RNCCWS+8(8),NOPCCW MOVE IN A NO-OP @V200820 00789000 BAL R9,DORNIO GO TO SIO CODE @V200820 00790000 SPACE 00791000 OI RDEVSTAT,RDEVRSVD LOADED BY THE SYSTEM @V200820 00792000 TM RDEVFLAG,RDEVLNCP IS THERE AN NCP OUT THERE ? @VM08827 00793000 BO LOADMSG YES - ALL SET AS IS @VM08827 00794000 NI RDEVSTAT,255-(RDEVRSVD+RDEVNRDY) FOR THE E.P. @VM08827 00795000 LOADMSG EQU * SEND MSG 'CTLR XXX LOAD COMPLETE'@VM08827 00796000 MVC RNIOSAV(CMPMSGLN),COMPMSG MOVE MSG SKELETON @V200820 00797000 MVC RNIOSAV+COMPNCPN(8),RDEVNCP NCPNAME TO MSG @V240820 00798000 SPACE 00799000 CMDCOMP EQU * SEND COMPLETE MESSAGE TO USER @V200820 00800000 LH R1,SAVEWRK1+2 GET RADDR OF 370X FOR MESSAGE@V200820 00801000 CALL DMKCVTBH GO CONVERT TO HEX @V200820 00802000 STCM R1,B'0111',RNIOSAV+COMPRADD PUT RADDR IN MSG @V200820 00803000 SLR R2,R2 PARMS BASE FOR DMKQCNWT @V200820 00804000 TM SAVEWRK1,FROMNET CALL VIA CONSOLE FUNCTION ? @V200820 00805000 BO *+8 YES - RESPONSE TO CALLER @V200820 00806000 LA R2,OPERATOR SEND MESSAGE TO SYSTEM OPERATOR @V200820 00807000 LA R1,RNIOSAV START OF MESSAGE DATA @V200820 00808000 LA R0,CMPMSGLN LENGTH OF MSG TO R0 @V200820 00809000 CALL DMKQCNWT,PARM=NORET(,R2),AFFINITY @V407508 00810100 B NLDEXIT @V200820 00811000 EJECT 00812000 LOCKBUF EQU * BRING AND LOCK PAGE BY 'CCPD' @VM08949 01000000 LR R0,R3 'CCPD' TO GR0 FOR DMKRPAGT @VM08949 01001000 L R1,SAVEWRK7 VIRTUAL BUFFER ADDRESS TO GR1 @VM08949 01002000 CALL DMKRPAGT,PARM=BRING+LOCK+SYSTEM,AFFINITY GET PAGE@V407508 01003100 BNZ NLD470 PAGING ERROR @V305435 01004000 ST R2,SAVEWRK6 SAVE REAL ADDRESS FOR UNLOCK @VM08949 01005000 OI SAVEWRK1,UNLKBUF REMEMBER TO UNLOCK BUFFER @VM08949 01006000 BR R9 @VM08949 01007000 SPACE 2 01008000 BUFINCR EQU * INCREMENT 'CCPD', UNLOCK BUFFER @VM08949 01009000 A R3,F256 INCREMENT THE PAGE NUMBER @VM08949 01010000 CLM R3,2,SAVEWRK9 REACHED THE END OF A CYLINDER ? @VM08949 01011000 BNH BUFUNLK NO -- CONTINUE @VM08949 01012000 A R3,=X'00010000' INCREMENT CYLINDER NUMBER @VM08949 01013000 ICM R3,2,F1+3 RESET TO PAGE NUMBER ONE @VM08949 01014000 BUFUNLK EQU * UNLOCK THE REAL PAGE BUFFER @VM08949 01015000 L R2,SAVEWRK6 REAL PAGE ADDRESS FROM LOCK @VM08949 01016000 CALL DMKPTRUL UNLOCK THE REAL PAGE @VM08949 01017000 NI SAVEWRK1,255-UNLKBUF ERASE CLEANUP FLAG @VM08949 01018000 BR R9 @VM08949 01019000 EJECT 01020000 *--------------------------------------------------------------------* 01099000 * SUBROUTINE TO TRANSMIT 370X BOOTSTRAP RECORDS TO CCU * 01100000 *--------------------------------------------------------------------* 01101000 SNDBOOTS EQU * @V200899 01102000 BAL R9,TRNLOCK BRING AND LOCK PHASE ONE @VM08692 01103000 OI SAVEWRK1,BOOTSFLG REMEMBER TO UNLOCK IT @VM08692 01104000 L R1,IOBMISC POINT R1 TO FIRST CCW SLOT @V200899 01105000 ST R2,0(0,R1) PUT REAL ADDRESS IN WRITE IPL @V200899 01106000 MVI 0(R1),WIPLOP SET WRITE IPL OP CODE @V200899 01107000 MVI 4(R1),CC+SILI SET CMD CHAINING AND SILI ON @V200899 01108000 MVC 6(2,R1),2(R2) MOVE LENGTH OF PHASE 1 TO CCW @V200899 01109000 MVC 8(8,R1),NOPCCW MOVE IN A NO-OP @V200899 01110000 BAL R9,DORNIO GO TO RN SIO ROUTINE @V200899 01111000 CALL DMKPTRUL UNLOCK PHASE ONE PAGE (R2 OK) @VM08692 01112000 NI SAVEWRK1,255-BOOTSFLG TURN OFF FLAG FOR NOW @VM08692 01113000 SPACE 01114000 LR R1,R3 GR1 = ADDRESS OF BOOTSTRAP TWO @VM08692 01115000 BAL R9,TRNLOCK BRING AND LOCK PHASE TWO @VM08692 01116000 OI SAVEWRK1,BOOTSFLG REMEMBER TO UNLOCK IT @VM08692 01117000 L R1,IOBMISC POINT R1 TO FIRST CCW SLOT @V200899 01118000 ST R2,0(0,R1) PUT REAL ADDRESS IN WRITE IPL @V200899 01119000 MVI 0(R1),WRTBRKOP SET WRITE BREAK OP CODE @V200899 01120000 CMDOK EQU * @V200899 01124000 MVI 4(R1),CC+SILI SET CMD CHAINING AND SILI ON @V200899 01125000 MVC 6(2,R1),2(R2) MOVE LENGTH OF PHASE 1 TO CCW C@V200899 01126000 MVC 8(8,R1),NOPCCW MOVE IN A NO-OP @V200899 01127000 BAL R9,DORNIO GO TO RN SIO ROUTINE @V200899 01128000 CALL DMKPTRUL UNLOCK PHASE TWO PAGE (R2 OK) @VM08692 01129000 NI SAVEWRK1,X'FF'-BOOTSFLG RESET BOOTSTRAP PROCESS @V200899 01130000 BR R7 RETURN TO MAIN LINE CODE @V200899 01131000 SPACE 01132000 TRNLOCK EQU * BRING IN AND LOCK SYSTEM PAGE @VM08692 01133000 * BRING IN AND LOCK SYSTEM PAGE @V407508 01134100 TRANS 2,1,OPT=(BRING,DEFER,SYSTEM,LOCK),IOER=NLD470,AFFINITY 01134200 BR R9 @VM08692 01135000 EJECT 01136000 *--------------------------------------------------------------------* 01137000 * GET AND CLEAR STORAGE FOR USE AS AN IOBLOK * 01138000 *--------------------------------------------------------------------* 01139000 SPACE 01140000 IOBLGET EQU * @V200820 01141000 LA R0,IOBSIZE SIZE OF IOBLOK TO R0 @V200820 01142000 CALL DMKFREE CALL DMKFREE TO GET STORAGE @V200820 01143000 LR R10,R1 IOBLOK ADDRESS TO R10 @V200820 01144000 XC IOBRADD(IOBSIZE*8),IOBRADD CLEAR IOBLOK @V200820 01145000 ST R11,IOBUSER USER'S VMBLOK ADDRESS TO IOBLOK @V200820 01146000 LA R1,RNIOINT PUT ADDRESS OF 3705 INT. HANDLER @V200820 01147000 ST R1,IOBIRA INTO IOBLOK @V200820 01148000 BR R9 RETURN @V200820 01149000 SPACE 2 01150000 *--------------------------------------------------------------------* 01151000 * GET STORAGE FOR USE AS CCW AREA AND I/O REG SAVE AREA AND CLEAR IT * 01152000 *--------------------------------------------------------------------* 01153000 SPACE 01154000 IOBINIT EQU * @V200820 01155000 BAL R9,IOBLGET ALLOCATE AND INITIALIZE AN IOBLOK@V200820 01156000 LA R0,RNWKSIZE SIZE OF AREA TO R0 @V200820 01157000 CALL DMKFREE GO GET STORAGE @V200820 01158000 LR R4,R1 ADDRESS OF RNIOSAV TO R4 @V200820 01159000 ST R1,IOBMISC SAVE ADDRESS OF STORAGE IN IOBLOK @V200820 01160000 XC 0(RNWKSIZE*8,R4),0(R4) CLEAR THE AREA @V200820 01161000 OI SAVEWRK1,RNSAVREL RELEASE WORK AREAS @V200820 01162000 BR R7 RETURN TO MAIN LINE CODE @V200820 01163000 EJECT 01164000 *--------------------------------------------------------------------* 01165000 * THIS IS THE SIO INTERFACE CODE FOR 3705 I/O OF LOAD/DUMP PROGRAMS * 01166000 *--------------------------------------------------------------------* 01167000 SPACE 01168000 DORNIO EQU * @V200820 01169000 STM R0,R9,RNSVREGS SAVE CALLERS REGS @V200899 01170000 LA R1,5(0,0) RETRY COUNT IN CASE OF ERROR @VM08672 01171000 STH R1,IOBRCNT . . . @VM08672 01172000 MVC IOBCAW(4),IOBMISC SAVE CCW BUFFER POINTER @V2D3931 01173000 MVI IOBFLAG,IOBCP CP-GENERATED CHANNEL PROGRAM @VM08672 01174000 RESTRNIO EQU * @V200899 01175000 MVI IOBSTAT,X'00' CLEAR IOBLOK STATUS BYTE @VM08672 01176000 NI IOBFLAG,IOBCP+IOBRSTRT LEAVE ONLY THESE FLAGS @VM08672 01177000 ST R13,IOBMISC2 SAVE POINTER TO CALLERS SAVE AREA@V200899 01178000 XC IOBCSW(8),IOBCSW CLEAR OUT THE CSW @VM08775 01179000 CALL DMKIOSQR CALL IOS @V200899 01180000 GOTO DMKDSPCH GO TO DISPACTH TO WAIT FOR I/O @V200899 01181000 EJECT 01182000 *--------------------------------------------------------------------* 01183000 * THIS IS THE 3705 I/O INTERRUPT HANDLER FOR DMKNLD * 01184000 *--------------------------------------------------------------------* 01185000 SPACE 01186000 RNIOINT EQU * @V200899 01187000 USING *,R12 RE-ESTABLISH @V200899 01188000 SL R12,=A(RNIOINT-DMKNLD) ADDRESSABILITY TO BASE @V200899 01189000 USING DMKNLD,R12 @V200899 01190000 L R13,IOBMISC2 RESTORE SAVEAREA POINTER @V200899 01191000 L R4,IOBMISC RESTORE RNIOSAV POINTER @V200899 01192000 TM IOBSPEC,IOBTIO IS INTERRUPT FOR A TIO @V200899 01193000 BO TIORETN YES,GO HANDLE SPECIAL @V200899 01194000 TM IOBSTAT,IOBCC3 ANY CONDITION CODE FROM I/O @V200899 01195000 BO VANISH CC=3 - SOMETHING IS VERY WRONG @VM08775 01196000 BZ CHKSTAT CC=0 - EVERYTHING IS O.K. ---SO F@V200899 01197000 * CC=1 OR 2 HAVE TO CHECK FURTHER 01198000 TM IOBSTAT,IOBCC1 IS IT CC=1 ? @V200899 01199000 BZ IORETRY NO, RETRY I/O @V200899 01200000 CHKSTAT EQU * @V200899 01201000 CLC IOBCSW+4(2),=X'0C00' IS STATUS NORMAL? (CE+DE)@V200899 01202000 BE RNIOXIT YES, I/O WENT O.K. @V200899 01203000 CLC IOBCSW+4(2),=AL1(ATTN+DE+CE,0) ATTN+CE+DE? @VA08855 01203040 BE LOADOK YES, LOAD FINISHED OK @VA08855 01203080 CLC IOBCSW+4(2),=AL1(ATTN+DE,0) ATTN AND DE?? @VA11588 01203130 BNE RNIOERR NO, MUST BE AN ERROR @VA08855 01203160 LOADOK EQU * @VA08855 01203200 LA R0,IOBSIZE USING NEW STUFF, GET AN IOB... @VM05005 01203240 CALL DMKFREE ... AND DUMMY IT UP FOR DMKRNH...@VM05005 01203320 ST R10,0(R1) (SWITCH IOBLOKS) @VM05005 01203400 LR R10,R1 TO MAKE IT LOOK LIKE THE OLD @VM05005 01203480 L R1,0(R1) SUPPORT WHERE ATTN CAME IN AFTER @VM05005 01203560 XC IOBLOK(IOBSIZE*8),IOBLOK LOAD WAS COMPLETE @VM05005 01203640 MVI IOBCSW+4,ATTN MAKE IT LOOK LIKE ATTN ALONE @VM05005 01203720 OI IOBFLAG,IOBCP CP GENERATED @VM05005 01203800 OI IOBSPEC,IOBUNSL UNSOLICITED I/O INT. @VM05005 01203880 MVC IOBRADD(2),IOBRADD-IOBLOK(R1) SAME ADDRESS @VM05005 01203960 ST R10,IOBLINK ENDING STATUS @VM05005 01204040 L R0,ASYSVM SYSTEM OWNS THIS ONE @VM05005 01204120 ST R0,IOBUSER ... @VM05005 01204200 L R0,=A(DMKRNHIN) SEND THE INTERRUPT TO RNH @VM05005 01204280 ST R0,IOBIRA ... @VM05005 01204360 CALL DMKSTKIO SEND IT OFF... @VM05005 01204440 LR R10,R1 AND RESTORE THE OLD IOB ADDR. @VM05005 01204520 B RNIOXIT RETURN TO CALLER @VM05005 01204600 SPACE 01204680 RNIOERR TM IOBCSW+5,X'FF'-(CDC+IL) ANY HARD ERRORS? @VM05005 01204760 BNZ RNIOER YES,DISASTER @V200899 01205000 TM IOBCSW+4,CUE+SM HARD DEVICE ERRORS ? @V200899 01206000 BNZ RNIOER YES, QUIT NOW @V200899 01207000 TM IOBCSW+4,UC UNIT CHECK ??? @V200899 01208000 BZ IORETRY NO, RETRY I/O @V200899 01209000 L R1,IOBIOER GET ADDR OF IOERBLOK @V200899 01210000 USING IOERBLOK,R1 @V200899 01211000 TM IOERDATA,IPLREQ+INTREQ+ABORT RETRY O.K. ? @V200899 01212000 DROP R1 @V200899 01213000 BZ IORETRY YES -- JUST RETRY THE I/O @V200899 01214000 BAL R7,FRERBLOK RELEASE THE IOERBLOK @VM08692 01215000 LM R0,R9,RNSVREGS RESTORE REGISTERS @V200899 01216000 B NLD460 PROGRAM CHECK IN BOOTSTRAP @V305435 01217000 * ROUTINE 01218000 SPACE 2 01219000 VANISH EQU * CC = 3 DURING LOAD OR DUMP @VM08775 01220000 BAL R7,FRERBLOK RELEASE IOERBLOK, IF ANY @VM08775 01221000 LM R0,R9,RNSVREGS RESTORE REGISTERS @VM08775 01222000 B NLD464E GIVE CC = 3 MESSAGE @VM08775 01223000 EJECT 01224000 TIORETN EQU * @V200899 01225000 TM IOBSTAT,IOBCC3 CHECK CC FROM TIO @V200899 01226000 BO NLD040 CC=3 DEVICE NOT THERE - ERROR@V200899 01227000 BZ OPMSG IF CC=0 TREAT AS IF IPL REQ'D@V200899 01228000 * WASN'T ON 01229000 TM IOBSTAT,IOBCC1 IS IT CC=1 @V200899 01230000 BZ IORETRY NO -- RETRY @V200899 01231000 TM IOBCSW+4,UC WAS IT A UNIT CHECK ? @V200899 01232000 BO CKTIOSNS YES - THAT'S WHAT WE EXPECT @V200899 01233000 L R1,=A(DMKRNHIN) SET UP IOBIRA FOR DMKRNH @V200899 01234000 ST R1,IOBIRA . . . @V200899 01235000 MVC IOBUSER(4),ASYSVM SET UP SYSTEM VMBLOK POINTER @V2D3931 01236000 CALL DMKSTKIO AND RESTACK I/O @V200899 01237000 BAL R9,IOBLGET GET ANOTHER IOBLOK FOR US @V200899 01238000 ST R13,IOBMISC2 RESET THESE VALUES ... @V200899 01239000 ST R4,IOBMISC ... @V200899 01240000 B OPMSG GO TALK TO THE OPERATOR @V200899 01241000 SPACE 2 01242000 CKTIOSNS EQU * TEST SENSE DATA RECEIVED @V200899 01243000 L R1,IOBIOER GET ADDRESS OF IOERBLOK @V200899 01244000 USING IOERBLOK,R1 @V200899 01245000 TM IOERDATA,IPLREQ+INTREQ IS SENSE IPL REQUIRED OR@V200899 01246000 * INTERVENTION REQUIRED ? 01247000 BNZ RNIOXIT YES, NO NEED TO SEND MSG @V200899 01248000 DROP R1 @V200899 01249000 EJECT 01250000 *---------------------------------------------------------------------* 01251000 *HAVE TO SEND FOLLOWING MSG: * 01252000 * * 01253000 * DMKNLD461R CTLR (RADDR) IPL NOT REQUIRED; ENTER 'YES' TO CONTINUE: * 01254000 * * 01255000 *IN ORDER TO GET CONCURRENCE OF OPERATOR TO LOAD OR DUMP 370X * 01256000 * THAT DOES NOT HAVE IPL REQUIRED BIT ON IN SENSE. * 01257000 *---------------------------------------------------------------------* 01258000 SPACE 01259000 OPMSG EQU * @V200899 01260000 MVC 0(M461RLN,R4),M461SKEL MOVE 461R SKELETON MSG @V200899 01261000 LH R1,SAVEWRK1+2 PICK UP RADDR OF 370X @V200899 01262000 CALL DMKCVTBH AND CONVERT TO HEX @V200899 01263000 STCM R1,B'0111',M461RADD(R4) MOVE RADDR INTO MESSAGE@V200899 01264000 LR R1,R4 ADDRESS OF MSG TO R1 @V200899 01265000 LA R0,M461RLN MSG LENGHT TO R0 @V200899 01266000 L R2,=A(NOTRESP) SIGNAL NOT A COMMAND RESPONSE @V60C2B8 01267100 CALL DMKQCNWT,PARM=NORET+ERRMSG+NOAUTO(,R2) PROMPT @V60C2B8 01267120 LA R0,16 LENGTH OF REPLY TO R0 @V200899 01268000 LA R1,OPMREPLY REPLY BUFFER ADDRESS TO R1 @V200899 01269000 CALL DMKQCNRD,PARM=UCASE+EDIT @V200899 01270000 BNZ NOCHANG SOMETHING WENT WRONG DURING REPLY@V200899 01271000 CL R0,F3 CORRECT REPLY LENGTH ? @VM08851 01272000 BNE NOCHANG NO -- ABORT THE COMMAND @VM08851 01273000 CLC OPMREPLY(3),=C'YES' IS REPLY 'YES' @V200899 01274000 BE RNIOXIT UH HUH - GO DO THE FUNCTION @V200899 01275000 NOCHANG EQU * @V200899 01276000 LA R2,461 SET RETURN CODE FOR CALLER @V200899 01277000 B NLDERXIT NO, EXIT WITHOUT DOING IT @V200899 01278000 EJECT 01279000 IORETRY EQU * @V200899 01280000 BAL R7,FRERBLOK GO FREE IOERBLOK (IF ANY) @V200899 01281000 MVI IOBFLAG,X'00' CLEAR IOBLOK FLAG BYTE @VM08672 01282000 L R1,IOBCSW GET CSW FROM IOBLOK @V200899 01283000 S R1,F8 BACK UP TO POINT AT CCW IN ERROR @V200899 01284000 BNP IORSTRT RETRY FROM THE BEGINNING @VM08672 01285000 ST R1,IOBRCAW RETRY FROM THE FAILING CCW @VM08672 01286000 OI IOBFLAG,IOBRSTRT . . .VIA RESTART CAW @VM08672 01287000 IORSTRT EQU * CHECK RETRY COUNT @VM08672 01288000 LH R1,IOBRCNT GET RETRY COUNTER @V200899 01289000 S R1,F1 SUBTRACT 1 @V200899 01290000 STH R1,IOBRCNT AND PUT BACK @V200899 01291000 BNP NORETRY RETRY COUNT USED UP @VA08639 01292200 L R8,SAVEWRK9 RESTORE RDEVBLOK @VA08639 01292400 LA R8,0(R8) ZERO HIGH ORDER BYTE @VA12808 01292500 B RESTRNIO RESTART I/O @VA08639 01292600 NORETRY EQU * @VA08639 01292800 TM IOBSPEC,IOBTIO WAS ERROR ON TIO ? @V200899 01293000 BO NLD040 YES, TREAT AS IF DEVICE NON-EXIST@V200899 01294000 RNIOER EQU * @V200899 01295000 BAL R7,FRERBLOK GO FREE IOERBLOK (IF ANY) @V200899 01296000 LM R0,R9,RNSVREGS RESTORE REGS AT TIME OF I/O CALL @V200899 01297000 B NLD471 FATAL I/O ERROR @V305435 01298000 RNIOXIT EQU * @V200899 01299000 BAL R7,FRERBLOK GO FREE IOERBLOK (IF ANY) @V200899 01300000 SWITCH CONTINUE ON THE I/O PROCESSOR @V407508 01300100 LM R0,R9,RNSVREGS RESTORE REGS FOR CALLER @V200899 01301000 BR R9 I/O WAS OK - RETURN TO CALLER @V200899 01302000 SPACE 3 01303000 *---------------------------------------------------------------------* 01304000 * THIS SUBROUTINE WILL FREE THE IOERBLOK IF ANY EXISTS 01305000 *---------------------------------------------------------------------* 01306000 SPACE 01307000 FRERBLOK EQU * @V200899 01308000 L R1,IOBIOER GET IOERBLOK ADDR @V200899 01309000 LTR R1,R1 DOES ONE EXIST @V200899 01310000 BZ NOERBLOK NO, SKIP FREE CODE @V200899 01311000 LA R0,IOERSIZE SIZE OF IOERBLOK TO R0 @V200899 01312000 AH R0,IOEREXT-IOERBLOK(R1) ADD LENGTH OF EXT. @V200899 01313000 CALL DMKFRET GO FREE IT @V200899 01314000 XC IOBIOER(4),IOBIOER ZERO IOERBLOK PTR IN IOBLOK @V200899 01315000 NOERBLOK EQU * @V200899 01316000 BR R7 RETURN TO MAIN LINE CODE @V200899 01317000 EJECT 01318000 *---------------------------------------------------------------------* 01319000 * THIS SUBROUTINE WILL DISPOSE OF ALL RESOURCES THAT STILL ARE HELD * 01320000 * AT EXIT FROM DMKNLD. THIS IS TO AVOID THE POSSIBILITY OF * 01321000 * ANYTHING REMAINING IN CORE OR IN A STATUS (IE. LOCKED) THAT DID * 01322000 * NOT EXIST AT ENTRY TO DMKNLD. IT IS DRIVEN BY FLAG BITS SET IN * 01323000 * THE HIGH ORDER BYTE OF SAVEWRK1 (SEE EQUATES AT START OF MODULE * 01324000 * FOR APPROPRIATE MEANINGS OF BITS). * 01325000 *---------------------------------------------------------------------* 01326000 SPACE 01327000 CLEANUP EQU * @V200899 01328000 TM SAVEWRK1,BOOTSFLG NEED TO UNLOCK BOOTSTRAPS @VM08692 01329000 BZ CHKRBUF NO -- SEE ABOUT PAGE BUFFER @VM08692 01330000 CALL DMKPTRUL UNLOCK BOOTSTRAP (GR2 IS O.K.) @VM08692 01331000 NI SAVEWRK1,255-BOOTSFLG TIDINESS PAYS OFF @VM08692 01332000 CHKRBUF EQU * @VM08692 01333000 TM SAVEWRK1,UNLKBUF BUFFER TO BE UNLOCKED ? @V200899 01334000 BZ CHKRELSE NO, SEE IF BUFFER TO BE RELEASED @V200899 01335000 BAL R9,BUFUNLK UNLOCK THE BUFFER PAGE @VM08949 01336000 CHKRELSE EQU * @V200899 01337000 TM SAVEWRK1,PGTVREL BUFFER TO BE RELEASED? @V200899 01338000 BZ CHKRNREL NO, CHECK FOR WORK AREAS @V407508 01339100 L R1,SAVEWRK7 GET VADDR OF BUFFER @V200899 01340000 CALL DMKPGTVR GO RELEASE IT @V200899 01341000 NI SAVEWRK1,255-PGTVREL ADDRESS RELEASED @VM08692 01342000 CHKRNREL EQU * @V200899 01348000 TM SAVEWRK1,RNSAVREL WORK AREAS TO BE FREED ? @VM08692 01349000 BCR 8,R7 NO - ALL DONE @V200899 01350000 L R1,IOBMISC GET ADDR OF RNIOSAV @V200899 01351000 LA R0,RNWKSIZE LENGTH OF RNIOSAV TO R0 @V200899 01352000 CALL DMKFRET GO FREE IT @V200899 01353000 LR R1,R10 IOBLOK ADDR TO R1 @V200899 01354000 LA R0,IOBSIZE SIZE OF IOBLOK FOR FREE @V200899 01355000 CALL DMKFRET GO FREE IOBLOK @V200899 01356000 L R8,SAVEWRK9 370X REAL DEVICE BLOCK @V200899 01357000 LA R8,0(R8) ZERO HIGH ORDER BYTE @VA12808 01357500 NI RDEVFLAG,255-RDEVRCVY RECOVERY NOT ACTIVE @V200899 01358000 NI SAVEWRK1,255-RNSAVREL ALL CLEANED UP @VM08692 01359000 BR R7 RETURN TO MAIN LINE CODE @V200899 01360000 EJECT 01361000 NLD002 LA R2,2 LOAD ERROR CODE @V200899 01362000 B CALLERM . . . @V200899 01363000 NLD006 EQU * @V200899 01366000 LA R2,6 SET ERROR CODE @V200899 01367000 B NLDRADD GO SETUP FOR DMKERMSG @V200899 01368000 NLD021 EQU * @V200899 01369000 LA R2,21 SET ERROR CODE @V200899 01370000 B NOVAR @V200899 01371000 NLD026 LA R2,26 ERROR CODE @V200899 01372000 B NOVAR @V200899 01373000 NLD040 EQU * @V200899 01374000 BAL R7,CLEANUP UNLOCK, FRET, ETC. @V200899 01375000 LA R2,040(0) MSG= DMKNLD040E @V200899 01376000 NLDRADD EQU * SETUP RADDR PARM FOR DMKERMSG @V200899 01377000 LH R1,SAVEWRK1+2 GET RADDR OF 370X @V200899 01378000 CALL DMKCVTBH CONVERT TO PRINTABLE FORM @V200899 01379000 N R1,X40FFS BLANK HIGH BYTE @V200899 01380000 SLR R0,R0 ZERO LENGTH REGISTER @V200899 01381000 B CALLERM . . . @V200899 01382000 NLD044E EQU * SYSTEM HAS NOT YET BEEN SAVED @VM08697 01383000 BAL R7,CLEANUP RELEASE BUFFER ADDRESS, ETC. @VM08697 01384000 NLD044 EQU * @V200899 01385000 LA R0,8 NAME LENGTH @V200899 01386000 LA R1,SAVEWRK2 ADDRESS OF BAD NAME @V200899 01387000 LA R2,44 ERROR CODE @V200899 01388000 B CALLERM . . . @V200899 01389000 NLD046 EQU * @V200899 01390000 BAL R7,TYPRADD SETUP TYPE, RADDR FOR DMKERM @V200899 01391000 LA R2,046(0) MSG= DMKNLD046E @V200899 01392000 B CALLERM GO PUT OUT ERROR MSG @V200899 01393000 NLD140 EQU * CTLR XXX ATTACHED TO USERID @V200899 01394000 BAL R7,TYPRADD SETUP TYPE, RADDR FOR DMKERM @V200899 01395000 L R2,RDEVUSER ADDRESS OF USER'S VMBLOK @VA01880 01396000 MVC SAVEWRK4+1(8),VMUSER-VMBLOK(R2) USERID @VA01880 01397000 MVI SAVEWRK4,X'00' FIELD DELIMITER FOR DMKERM @VA01880 01398000 LA R0,17 LENGTH OF PARMS TO R0 @V200899 01399000 LA R2,140(0) MSG= DMKNLD140E @VA01880 01400000 B CALLERM GO PUT OUT ERROR MSG @V200899 01401000 NLD143 EQU * CTLR XXX IN USE BY SYSTEM @V200899 01402000 BAL R7,TYPRADD SETUP TYPE, RADDR FOR DMKERM @V200899 01403000 LA R2,143(0) MSG= DMKNLD143E @V200899 01404000 B CALLERM . . . @V200899 01405000 NLD170 EQU * @V200899 01406000 BAL R7,CLEANUP GO RELEASE AND UNLOCK ANY AREAS @V200899 01407000 * THAT WERE GOTTEN BY DMKNLD 01408000 LA R0,8 NAMELENGTH @V200899 01409000 LA R1,SAVEWRK2 NAME ADDRESS @V200899 01410000 LA R2,170 ERROR CODE @V200899 01411000 B CALLERM . . . @V200899 01412000 SPACE 2 01413000 NLD171 EQU * DMKNLD171E VOLID VOLID NOT MOUNTE@V200899 01414000 LA R2,171(0) MSG= DMKNLD171E @V200899 01415000 B NLDSYSV SETUP PARMS FOR DMKERMSG @V200899 01416000 NLD179 EQU * DMKNLD179E VOLID VOLID NOT CP OWN@V200899 01417000 LA R2,179(0) MSG= DMKNLD179E @V200899 01418000 NLDSYSV EQU * BUILD PARMS 'NCPNAME', 'VOLID' @V200899 01419000 MVI SAVEWRK4,X'00' FIELD DELIMITER AFTER 'NCPNAME' @V200899 01420000 MVC SAVEWRK4+1(6),NCPVOL-NCPTBL(R4) MOVE IN VOLID@V200899 01421000 LA R0,15 VARIABLE DATA LENGTH @V200899 01422000 LA R1,SAVEWRK2 ADDRESS OF DATA STRING @V200899 01423000 B CALLERM . . . @V200899 01424000 SPACE 01425000 NLD470 LA R15,470 PAGING I/O ERROR @VM03030 01429000 B NLDMSG ISSUE MESSAGE @V305435 01430000 SPACE 1 01431000 NLD471 LA R15,471 UNRECOVERABLE I/O ERROR @VM03030 01432000 B NLDMSG ISSUE MESSAGE @V305435 01433000 SPACE 1 01434000 NLD460 LA R15,460 PROGRAM CHECK IN BOOTSTRAP @VM03030 01435000 B NLDMSG ISSUE MESSAGE @V305435 01436000 EJECT 01437000 NLDMSG ST R15,SAVER2 SAVE ERROR RETURN CODE FOR CALLER@VM03030 01438000 BAL R7,CLEANUP CLEAN UP AS REQUIRED @VM03030 01439000 XC SAVEWRK2(L'SAVEWRK2*2),SAVEWRK2 AREA FOR MESSAGE@V305435 01440000 L R2,SAVER2 ERROR CODE NEEDED FOR DMKERM @VM03030 01441000 LH R1,SAVEWRK1+2 'RADDR' TO CONVERT @V305435 01442000 CALL DMKCVTBH CONVERT IT TO HEX @V305435 01443000 STCM R1,B'0111',SAVEWRK2 SAVE 'RADDR' IN MESSAGE @V305435 01444000 MVC SAVEWRK3,=C'LOAD' ASSUME LOADING @V305435 01445000 NLDMSGOK LA R1,SAVEWRK2 ADDRESS OF MESSAGE TEXT @V305435 01449000 LA R0,L'SAVEWRK2*2 AND LENGTH OF THE TEXT @V305435 01450000 B CALLERM CALL THE MESSAGE WRITTER @V305435 01451000 EJECT 01452000 NLD464E EQU * CC = 3 DURING LOAD OR DUMP I/O @VM08775 01453000 BAL R7,CLEANUP CLEAN UP AS NECESSARY @VM08775 01454000 LH R1,SAVEWRK1+2 370X DEVICE ADDRESS @VM08775 01455000 CALL DMKCVTBH CONVERT FOR OUTPUT @VM08775 01456000 ICM R1,8,BLANKS HIGH-ORDER BLANK FOR DMKERMSG @VM08775 01457000 SLR R0,R0 DATA IS IN GR1 @VM08775 01458000 LA R2,464(0) MSG= DMKNLD464E @VM08775 01459000 B CALLERM @VM08775 01460000 SPACE 01461000 TYPRADD EQU * BUILD TYPE, RADDR PARMS FOR DMKERMSG @V200820 01462000 MVC SAVEWRK2(4),=C'CTLR' MOVE IN DEVICE NAME @V200820 01463000 LH R1,SAVEWRK1+2 REAL DEVICE ADDRESS @V200820 01464000 CALL DMKCVTBH CONVERT DEVICE ADDR (R8 IS ALL SE@V200820 01465000 ST R1,SAVEWRK3 PUT DEV ADDR IN ERMSG PARM LIST @V200820 01466000 MVI SAVEWRK3,X'00' MOVE IN SEPARATER @V200820 01467000 LA R0,8 LENGTH OF PARMS TO R0 @V200820 01468000 LA R1,SAVEWRK2 ADDRESS OF PARMS TO R1 @V200820 01469000 BR R7 RETURN @V200820 01470000 SPACE 01471000 NOVAR SR R1,R1 ZERO ARG REG @V200899 01472000 CALLERM ICM R0,14,MODID+3 INSERT MODULE ID @V200899 01473000 TM SAVEWRK1,FROMNET ENTER VIA CONSOLE FUNCTION ?@V200820 01474000 BO *+8 YES - O.K. TO SEND AS IS @V200820 01475000 O R2,=X'20000000' SEND MSG TO SYSTEM OPERATOR @V200820 01476000 CALL DMKERMSG CALL MESSAGE MODULE @V200820 01477000 *--------------------------------------------------------------------* 01478000 * MESSAGE MODULE RETURNS DIRECTLY TO CALLER 01479000 *--------------------------------------------------------------------* 01480000 NLDEXIT EQU * @V200899 01481000 SR R2,R2 ZERO RETURN CODE REG @V200899 01482000 NLDERXIT EQU * @V200899 01483000 ST R2,SAVER2 STORE RETURN CODE FOR USER @V200899 01484000 BAL R7,CLEANUP GO RELEASE AND UNLOCK ANY AREAS @V200899 01485000 * THAT WERE OBTAINED BY DMKNLD 01486000 EXIT AND EXIT @V200899 01487000 EJECT 01488000 *---------------------------------------------------------------------* 01489000 * INTERNAL MESSAGES AND RESPONSES GENERATED AND USED BY DMKNLD * 01490000 *---------------------------------------------------------------------* 01491000 SPACE 01492000 COMPMSG DC C'CTLR XXX XXXXXXXX LOAD COMPLETE' @V200820 01495000 CMPMSGLN EQU (*-COMPMSG) @V200820 01496000 COMPRADD EQU 5 RADDR LOCATION IN COMPMSG @V200820 01497000 COMPNCPN EQU 9 NCPNAME LOCATION IN COMPMSG @V200820 01498000 * 01499000 M461SKEL DC C'DMKNLD461R CTLR XXX IPL NOT REQUIRED; ' @V200899 01500000 DC C'ENTER ''YES'' TO CONTINUE: ' @V200899 01501000 M461RLN EQU (*-M461SKEL) LENGTH OF DMKNLD461R MESSAGE @V200899 01502000 M461RADD EQU 16 LOC OF RADDR FIELD IN DMKNLD461R MS@V200899 01503000 SPACE 01504000 NOPCCW DC X'0300000020000001' UTILITY NO-OP CCW @V200899 01505000 EJECT 01506000 LTORG @V200899 01507000 EJECT 01508000 *--------------------------------------------------------------------* 01509000 * THE FOLLOWING DSECT IS USED BY THE 3705 LOAD/DUMP PROGRAMS TO MAP * 01510000 * THE 3705 I/O CCWS AND REGISTER SAVE AREA FOR I/O ROUTINES * 01511000 *--------------------------------------------------------------------* 01512000 SPACE 01513000 RNIOSAV DSECT @V200899 01514000 RNCCWS DS 9D CCW AREA ( 9 DOUBLEWORDS ) @V200899 01515000 OPMREPLY EQU RNCCWS AREA FOR OPERATOR REPLY TO '461R'@V200899 01516000 RNSVREGS DS 10F I/O REG SAVE AREA (REGS 0 - 9) @V200899 01517000 OVFLOSIZ DS 1F SAVE AREA FOR SIZE OF LAST LOAD IMAGE@V200899 01518000 NEXTADDR EQU OVFLOSIZ NEXT ADDR FOR 370X DUMP PROGRAM @V200899 01519000 NEXTLNTH DS 1H SIZE OF NEXT RECORD FOR DUMP @V200899 01520000 DS 1H UNUSED @V200899 01521000 RNWKSIZE EQU (*-RNIOSAV)/8 SIZE IN DOUBLE WORDS @V200899 01522000 SPACE 3 01523000 *--------------------------------------------------------------------* 01524000 * THE FOLLOWING EQUATES ARE USED BY THE 3705 LOAD/DUMP I/O ROUTINES * 01525000 *--------------------------------------------------------------------* 01526000 SPACE 01527000 WIPLOP EQU X'05' WRITE IPL CCW OP CODE @V200899 01528000 WRTBRKOP EQU X'09' WRITE BREAK CCW OP CODE @V200899 01529000 WRITEOP EQU X'01' WRITE CCW OP CODE @V200899 01530000 READOP EQU X'02' READ CCW OP CODE @V200899 01531000 SPACE 01531100 NONE EQU X'00' EQUATE TO INITIALIZE FLAG BYTE @V407508 01531200 EJECT 01532000 COPY CCPARM @V200899 01533000 COPY NCPTBL @V200899 01534000 COPY NETWORK @V200899 01535000 COPY EQU @V200899 01536000 COPY DEVTYPES @V200899 01537000 PSA @V200899 01538000 COPY SAVE @V200899 01539000 COPY VMBLOK @V200899 01540000 COPY RBLOKS @V200899 01541000 EJECT 01542000 COPY VBLOKS @V240820 01543000 COPY IOBLOKS @V306638 01544000 COPY IOER @V200899 01545000 END DMKNLD 01547000