HVC TITLE 'DMKHVC (CP) VM/370 - RELEASE 6' 00001000
COPY OPTIONS 00003000
COPY LOCAL 00004000
*. 00005000
* MODULE NAME - 00006000
* 00007000
* DMKHVC 00008000
* 00009000
* CONTENTS - 00010000
* 00011000
* DMKHVCAL - VIRTUAL DIAGNOSE INSTRUCTION PROCESSING 00012000
* DMKHVCPC - DATA TABLE - DASD PAGES/CYLINDER 00013000
*. 00014000
SPACE 2 00015000
DMKHVC START 00016000
SPACE 00017000
ENTRY DMKHVCAL,DMKHVCPC @VM03170 00018000
ENTRY DMKHVCDI 00020000
SPACE 00021000
EXTRN DMKSSSHV @V60B6B8 00021010
EXTRN DMKDRDSY,DMKPRGSM 00022000
EXTRN DMKCCWTR,DMKUNTFR @VA10860 00023100
EXTRN DMKDGDDK,DMKCFMEN 00024000
EXTRN DMKCFGCL,DMKPGSSS @VM03170 00025000
EXTRN DMKPSASP @V202232 00026000
EXTRN DMKGIOEX @VM03170 00027000
EXTRN DMKSCNVU @VM03170 00029000
EXTRN DMKCVTDB @V213135 00031000
EXTRN DMKTMRPT 00033000
EXTRN DMKHVDAL @VM03170 00034000
EXTRN DMKHVEAL @VA11268 00034100
EXTRN DMKCFMBK,DMKCVTDT 00035000
EXTRN DMKVSIEX @VA05037 00036000
EXTRN DMKVMCFC @V387045 00037100
EXTRN HDKD7CEX HRC065DK 00037500
EXTRN HDKD8CDC HRC072DK 00037600
EJECT 00038000
*. 00039000
* SUBROUTINE NAME - 00040000
* 00041000
* DMKHVCAL 00042000
* 00043000
* FUNCTION - 00044000
* 00045000
* TO PERFORM SERVICES FOR VIRTUAL MACHINES AS REQUESTED 00046000
* VIA THE DIAGNOSE INSTRUCTION. 00047000
* 00048000
* ATTRIBUTES - 00049000
* 00050000
* REENTRANT, RESIDENT, ENTERED VIA 'GOTO' FROM DMKPRVLG 00051000
* 00052000
* ENTRY POINTS - 00053000
* 00054000
* DMKHVCAL 00055000
* 00056000
* ENTRY CONDITIONS - 00057000
* 00058000
* GPR 12 = ADDRESS OF DMKHVCAL 00059000
* GPR 11 = ADDRESS OF VMBLOK 00060000
* 'VMINST' FIELD CONTAINS THE DIAGNOSE INSTRUCTION IMAGE 00061000
* 00062000
* EXIT CONDITIONS - 00063000
* 00064000
* DEPENDENT ON THE SERVICE PERFORMED. CONTROL RETURNS 00065000
* TO THE USER VIA DMKDSPCH. 00066000
* 00067000
* CALLS TO OTHER ROUTINES - 00068000
* 00069000
* DMKCFMBK - TO PUT VIRTUAL MACHINE IN CONSOLE FUNCTION MODE 00070000
* DMKCFMEN - TO EXECUTE VIRTUAL CONSOLE FUNCTIONS 00071000
* DMKCVTDT - TO OBTAIN THE DATE AND TIME IN EBCDIC 00072000
* DMKDGDDK - TO PERFORM STANDARD DASD I/O 00073000
* DMKDSPCH - TO RE-DISPATCH THE SERVICED USER 00074000
* DMKFREE - TO OBTAIN FREE STORAGE FOR BUFFERS 00075000
* DMKGIOEX - TO PERFORM GENERAL SHORT-CUT I/O 00076000
* DMKPGSSS - TO RELEASE A PORTION OF VIRTUAL STORAGE 00077000
* DMKCGFCL - TO PROCESS THE REQUEST FOR A NAMED SYSTEM 00078000
* DMKCVTDB - TO CONVERT DECIMAL RELEASE NUMBERS TO BINARY 00079000
* DMKPRGSM - TO SIMULATE A PROGRAM INTERRUPT 00080000
* DMKPSASP - TO EXAMINE VIRTUAL STORAGE PROTECTION KEYS 00081000
* DMKPTRAN - TO PROCESS PAGING REQUESTS 00082000
* DMKRPAGT - TO PROVIDE A USER WITH ONE PAGE OF SYSTEM DATA 00083000
* DMKSCNRU - TO LOCATE THE SYSRES RDEVBLOK 00084000
* DMKSCNVU - TO LOCATE VIRTUAL I/O BLOCKS 00085000
* DMKTMRPT - TO GET USER'S VIRTUAL PROBLEM TIME USED 00086000
* DMKVSIEX - TO PERFORM DIAG 3270 WRITE 00087000
* DMKHVDAL - PROCESS DIAGNOSE CALLS NOT HANDLED IN THIS MODULE 00088000
* CONTROL PROGRAM IMAGE 00089000
* DMKHVEAL - PROCESS DIAGNOSE X'002C' AND X'0030' 00089050
* DMKVMCFC - PROCESS VMCF REQUEST 00089100
* HDKD7CEX - PROCESS LDF REQUEST HRC065DK 00089200
* HDKD8CDC - GET 3270 DEVICE DEPENDENT CHARACTERISTICS HRC072DK 00089300
EJECT 00090000
* 00091000
* EXTERNAL REFERENCES - 00092000
* 00093000
* DMKSYSRM - REAL MACHINE SIZE IN BYTES 00094000
* DMKCPEID - VM/370 RELEASE AND VERSION NUMBER FOR STIDX 00095000
* 00096000
* TABLES / WORK AREAS - 00097000
* 00098000
* VMBLOK, VDEVBLOK, RDEVBLOK, VMCPARM 00099000
* 00100000
* 00101000
* REGISTER USAGE - 00102000
* 00103000
* GPR 12 = BASE REGISTER FOR DMKHVCAL 00104000
* GPR 11 = VMBLOK ADDRESSABILITY 00105000
* GPR 9 = INTERNAL LINK REGISTER 00106000
* GPR 6 = ADDRESS OF DIAGNOSE 'R2' VALUE 00107000
* GPR 5 = ADDRESS OF DIAGNOSE 'R1' VALUE 00108000
* 00109000
* NOTES - 00110000
* 00111000
* AN ARTIFICIAL PROGRAM INTERRUPT (PRIVILEGED OPERATION 00112000
* EXCEPTION WHILE IN VIRTUAL SUPERVISOR STATE) IS GENER- 00113000
* ATED BY DMKHVCAL WHENEVER A VIRTUAL MACHINE REQUESTS 00114000
* A SERVICE WHICH IS RESTRICTED TO COMMAND CLASSES OTHER 00115000
* THAN THOSE ALLOWED TO THE VIRTUAL MACHINE. 00116000
* 00117000
* OPERATION - 00118000
* 00119000
* THE FUNCTION CODE CONTAINED IN THE ADDRESS FIELD OF THE 00120000
* DIAGNOSE INSTRUCTION IS EXAMINED FOR VALIDITY. 00121000
* A SPECIFICATION EXECPTION IS REFLECTED TO THE VIRTUAL 00122000
* MACHINE IF THE CODE IS UNRECOGNIZED OR NOT A MULTIPLE 00123000
* OF 4. A PRIVILEGED-OPERATION INTERRUPT IS GENERATED IF A 00124000
* RESTRICTED SERVICE IS REQUESTED BY THE VIRTUAL MACHINE. 00125000
* 00126000
* SERVICES AVAILABLE VIA VIRTUAL DIAGNOSE ARE AS FOLLOWS: 00127000
* 00128000
* CODE = X'0000' STORE EXTENDED ID - STIDX - (ANY CLASS) 00129000
* 'R1' = ADDRESS OF A DOUBLE WORD ALIGNED BUFFER IN VIRTUAL 00130000
* STORAGE 00131000
* 'R2' = BYTE COUNT OF INFORMATION TO BE STORED AT THE VIRTUAL 00132000
* STORAGE ADDRESS SPECIFIED BY 'R1' IN THE FOLLOWING FORMAT: 00133000
* +---------------------------------------+ 00134000
* | VM/370 | 00135000
* +--------------+----+---------+---------+ 00136000
* | LEVEL | VC | MCEL | IPUADDR | 00137000
* +--------------+----+---------+---------+ 00138000
* | USERID | 00139000
* +---------------------------------------+ 00140000
* 00141000
* THE FIELDS STORED ARE DEFINED AS FOLLOWS: 00142000
* VM/370 - APPEARS AS SHOWN, LEFT JUSTIFIED AND PADDED 00143000
* WITH BLANKS 00144000
* LEVEL - THE VERSION, LEVEL AND PLC TAPE NUMBER 00145000
* OF THE HYPERVISOR IN HEX. EACH FIELD OCCUPIES 00146000
* ONE BYTE AND IS OBTAINED FROM THE SYSTEM ID FIELD 00147000
* IN THE MODULE DMKCPEID 00148000
* VC - THE VERSION CODE RETURNED BY A STIDP EXECUTED 00149000
* BY THE HYPERVISOR (VM/370) 00150000
* MCEL - THE MAXIMUM MCEL RETURNED BY THE STIDP 00151000
* IPUADDR - THE PROCESSOR ADDRESS RETURNED BY A STAP 00152000
* EXECUTED BY THE HYPERVISOR - = TO 0 IF EXECUTED ON 00153000
* A VIRTUAL OR REAL UNIPROCESSOR 00154000
* USERID - THE VM USERID OF THE VIRTUAL MACHINE EXECUTING 00155000
* THE STIDX 00156000
* 00157000
* IF THE HYPERVISOR ITSELF IS EXECUTING IN A VIRTUAL MACHINE, 00158000
* THE EXTENDED ID RETURNED BY A STIDX EXECUTED BY THE 00159000
* HYPERVISOR IS APPENDED TO THE INFORMATION DESCRIBED ABOVE. 00160000
* NOTE THAT THIS DEFINITION DIFFERS FROM THAT DESCRIBED IN 00161000
* AR3799-01 IN THE AREA OF ALIGNMENT; ALSO, AN ARBITRARY LIMIT 00162000
* OF FIVE LEVELS OF HYPERVISION HAS BEEN IMPOSED. 00163000
* 00164000
* 00165000
* CODE = X'0004' EXAMINE REAL STORAGE LOCATIONS (CLASS C OR E) 00166000
* 'R1' = ADDRESS OF A LIST OF REQUESTED DATA WORD ADDRESSES 00167000
* 'R2' = COUNT OF FULL-WORD ENTRIES IN THE LIST 00168000
* 'R2'+1 = ADDRESS OF A RESULT TABLE 00169000
* 00170000
* SPECIAL NOTE: SINCE THIS DIAGNOSE SERVICE IS INTENDED FOR 00171000
* SYSTEM PERFORMANCE MONITORING, THE REQUEST AND RESULT TABLES 00172000
* MUST BE IN THE SAME PAGE OF VIRTUAL STORAGE, AND THAT PAGE 00173000
* MUST BE RESIDENT IN REAL STORAGE AT THE TIME THE DIAGNOSE IS 00174000
* EXECUTED ( THIS IS GUARANTEED IF THE INSTRUCTION ITSELF IS 00175000
* ALSO IN THE SAME PAGE). BRINGING VIRTUAL STORAGE PAGES INTO 00176000
* REAL STORAGE FOR PROCESSING THIS REQUEST WOULD AT BEST 00177000
* INFLUENCE, IF NOT INVALIDATE, ANY PERFORMANCE DATA GATHERED. 00178000
* 00179000
* FOR EACH ADDRESS ENTRY IN THE REQUEST TABLE, DMKHVC WILL 00180000
* PLACE A FULL-WORD OF DATA FROM THE SPECIFIED LOCATION 00181000
* IN REAL STORAGE, INTO THE RESULT TABLE SLOT CORRESPON- 00182000
* DING TO THE ADDRESS ENTRY. WHEN EITHER ALL REQUESTS ARE 00183000
* PROCESSED, THE END OF THE VIRTUAL STORAGE PAGE IS REACHED, 00184000
* OR AN ADDRESS OUTSIDE OF REAL STORAGE IS ENCOUNTERED, 00185000
* PROCESSING IS TERMINATED AND THE VIRTUAL MACHINE IS 00186000
* RE-DISPATCHED VIA DMKDSPCH. 00187000
* 00188000
* CODE = X'0008' VIRTUAL CONSOLE FUNCTION INTERFACE (CLASS G) 00189000
* 'R1' = ADDRESS OF A COMMAND-LINE BUFFER 00190000
* 'R2' = BYTE 0 - FLAGS 00190600
* BYTES 1-3 - BUFFER LENGTH 00191200
* 00192000
* THE FLAG BITS ARE USED AS FOLLOWS: 00192200
* BIT MEANING 00192400
* --- ----------------------------------- 00192600
* 0 THE VIRTUAL MACHINE ISSUING THIS 00192800
* DIAGNOSE DESIRES PASSWORD-ON-THE- 00193000
* COMMAND-LINE SUPPRESSION. 00193200
* 1-7 RESERVED 00193400
* 00193600
* IF FLAG BIT 0 IS ON, THE VMNPWOCL BIT IN THE 00193800
* VMBLOK IS TURNED ON. 00194000
* 00194010
* IF FLAG BIT 1 IS ON, THE COMMAND RESPONSE IS TO BE PLACED 00194020
* INTO VIRTUAL MEMORY RATHER THAN WRITTEN TO THE CONSOLE. IN 00194030
* THIS CASE NEITHER 'R1' OR 'R2' CAN BE R15, AND 00194040
* 00194050
* 'R1' = ADDRESS OF COMMAND STRING 00194060
* 'R2' = LENGTH OF COMMAND STRING 00194070
* 'R1+1' = ADDRESS OF BUFFER TO RECEIVE COMMAND RESPONSES 00194080
* ADDRESS CANNOT = 0, BUT CAN CROSS A PAGE 00194090
* 'R2+1' = LENGTH OF 'R1+1' BUFFER. MUST BE >0 AND =<8192 00194100
* 00194110
* THE BUFFER ADDRESS AND DATA LENGTH ARE THEN EXAMINED 00194200
* FOR VALIDITY. IF BIT 1 OF THE FLAG BYTE IS ON, THEN VALIDITY 00194400
* CHECK RESPONSE BUFFER ADDRESS AND LENGTH AS SPECIFIED IN 00194500
* 'R1+1' AND 'R2+1'. IF LENGTH OF THE COMMAND BUFFER >132, 00194600
* A SPECIFICATION EXCEPTION IS GENERATED. IF THE ADDRESS 00195000
* IS INVALID, AN ADRESSING EXCEPTION IS GENERATED. 00196000
* IF A ZERO LENGTH FIELD IS SPECIFIED, THE VIRTUAL 00197000
* MACHINE IS PLACED IN CONSOLE FUNCTION MODE VIA A CALL TO 00198000
* DMKCFMBK, AND EXIT IS VIA DMKDSPCH. 00199000
* FOR A VALID, NON-ZERO BUFFER LENGTH, THE COMMAND 00200000
* DATA IS MOVED FROM VIRTUAL STORAGE INTO REAL FREE STORAGE 00201000
* AND THE CONSOLE FUNCTION IS EXECUTED VIA A CALL TO 00202000
* DMKCFMEN. ANY ERROR CODE RESULTING FROM THE EXECUTION 00203000
* IS PASSED BACK TO THE VIRTUAL MACHINE IN THE 'R2' FIELD. 00204000
* IF ALL RESPONSES FIT INTO THE RESPONSE BUFFER, THEN 00204100
* SET CC = 0, ADN 'R2+1' = NUMBER OF CHARACTERS IN RESPONSE 00204200
* IF RESPONSES DID NOT FIT IN THE BUFFER, THEN SET CC = 1, 00204300
* AND 'R2=1' = AMOUNT OF THE OVERFLOW. 00204400
* 00205000
* CODE = X'000C' VIRTUAL "CHRONOLOG" CLOCK (CLASS G) 00206000
* 'R1' = ADDRESS OF A 32-BYTE BUFFER AREA, DBL-WD ALIGNED 00207000
* 00208000
* DMKHVCAL PLACES INTO THE SPECIFIED AREA 32 BYTES 00209000
* OF INFORMATION, IN THE FOLLOWING FORMAT: 00210000
* +----------+----------+----------+----------+ 00211000
* | MM/DD/YY | HH:MM:SS | VIRTCPU | TOTALCPU | 00212000
* +----------+----------+----------+----------+ 00213000
* WHERE THE DATE AND TIME ARE EBCDIC DOUBLE-WORD FIELDS, 00214000
* AND VIRTUAL AND TOTAL CPU TIME ARE DBL-WORD, UNSIGNED 00215000
* INTEGERS IN MICRO-SECOND UNITS. RETURN IS VIA DMKDSPCH. 00216000
* 00217000
* CODE = X'0010' RELEASE VIRTUAL STORAGE PAGES (CLASS G) 00218000
* 'R1' = START ADDRESS OF FIRST PAGE TO BE RELEASED 00219000
* 'R2' = START ADDRESS OF LAST PAGE TO BE RELEASED 00220000
* 00221000
* BOTH ADDRESSES ARE EXAMINED FOR ALIGNMENT AND VALIDITY. 00222000
* DMKPGSPP IS CALLED TO PERFORM THE ACTUAL PAGE RELEASE. 00223000
* 00224000
* CODE = X'0014' INTERFACE TO INPUT SPOOL FILES (CLASS G) 00225000
* 'R1','R2' AS REQUIRED BY DMKDRDER 00226000
* 00227000
* A CALL IS MADE TO DMKDRDER FOR SUB-FUNCTION DECODING 00228000
* AND ACTUAL PROCESSING. ON RETURN, THE ERROR CODE IS TESTED 00229000
* AND EITHER A PROGRAM INTERRUPT IS REFLECTED OR THE 00230000
* VIRTUAL MACHINE IS RE-DISPATCHED WITH THE CONDITION CODE 00231000
* INDICATING THE RESULTS OF THE OPERATION. 00232000
* 00233000
* CODE = X'0018' "STANDARD" DASD I/O W/O INTERRUPTS (CLASS G) 00234000
* 'R1' = VIRTUAL DEVICE ADDRESS, DASD DEVICE 00235000
* 'R2' = ADDRESS OF A DASD CCW STRING (FIXED FORMAT) 00236000
* 00237000
* CODE '18' IS PROCESSED VIA GOTO DMKDGDDK 00238000
* 00239000
* CODE = X'001C' CLEAR I/O AND M/C RECORDING AREA (CLASS F) 00240000
* 'R1' = CODE 1,2,3 INDICATING CLEAR OF I/O, M/C, OR BOTH 00241000
* 00242000
* THE 'R1' CODE VALUE IS PASSED TO DMKIOEFM IN GPR 2. 00243000
* 00244000
* CODE = X'0020' GENERAL VIRTUAL I/O W/O INTERRUPTS (CLASS G) 00245000
* 'R1' = VIRTUAL DEVICE ADDRESS 00246000
* 'R2' = ADDRESS OF A CCW STRING TO BE EXECUTED 00247000
* 00248000
* CODE '20' IS PROCESSED VIA GOTO DMKGIOEX. 00249000
* 00250000
* CODE = X'0024' VIRTUAL DEVICE TYPE INFORMATION (CLASS G) 00251000
* 'R1' = VIRTUAL DEVICE ADDRESS OR -1 IF VIRTUAL CONSOLE 00252000
* ON RETURN: 00253000
* 'R1' = VIRTUAL DEVICE ADDRESS 00254000
* 'R2' = VIRTUAL DEVICE INFORMATION 00255000
* 'R2'+1 = REAL DEVICE INFORMATION (IF ANY) 00256000
* 00257000
* THE VIRTUAL DEVICE INFORMATION CONSISTS OF THE FIELDS 00258000
* VDEVTYPC, VDEVTYPE, VDEVSTAT, AND VDEVFLAG, IN THAT ORDER, 00259000
* FROM THE VDEVBLOK OF THE SPECIFIED DEVICE. THE REAL DEVICE 00260000
* INFORMATION CONSISTS OF THE FIELDS RDEVTYPC, RDEVTYPE, 00261000
* RDEVMDL, AND RDEVFTR, IN THAT ORDER, FROM THE RDEVBLOK OF 00262000
* THE ASSOCIATED REAL DEVICE (IF THERE IS ONE). IF THE DEVICE 00263000
* IS A VIRTUAL CONSOLE, THE RDEVFTR FIELD OF 'R2+1' IS FILLED 00264000
* WITH THE INFORMATION FROM RDEVLLEN. THE INFORMATION 00265000
* IS PLACED IN THE 'R2' REGISTER AND THE FOLLOWING 'R2'+1, AS 00266000
* INDICATED BELOW: 00267000
* +----------+----------+----------+----------+ 00268000
* 'R2' | VDEVTYPC | VDEVTYPE | VDEVSTAT | VDEVFLAG | 00269000
* +----------+----------+----------+----------+ 00270000
* 'R2+1' | RDEVTYPC | RDEVTYPE | RDEVMDL | RDEVFTR | 00271000
* +----------+----------+----------+----------+ 00272000
* EACH FIELD IS A SINGLE-BYTE FLAG, WHOSE VALUES MAY BE 00273000
* DETERMINED FROM THE COPY FILES 'DEVTYPES', 'VBLOKS', AND 00274000
* 'RBLOKS' IN THE VM/370 MACRO LIBRARY. THE VIRTUAL 00275000
* CONDITION CODE IS SET AS FOLLOWS: 00276000
* CC = 0 => ALL DATA IS VALID 00277000
* CC = 2 => NO REAL DEVICE DATA, VIRTUAL TYPE OK 00278000
* CC = 3 => DEVICE DOES NOT EXIST 00279000
* 00280000
* CODE = X'0028' DYNAMIC CHANNEL PROGRAM MODIFICATION (CLASS G) 00281000
* 'R1' = SPECIFIES A REGISTER GIVING THE ADDRESS OF THE 00282000
* CCW THAT HAS BEEN MODIFIED. 00283000
* 'R2' = SPECIFIES ANOTHER REGISTER GIVING THE DEVICE 00284000
* ADDRESS (IN BITS 16-31). 00285000
* 00286000
* THE MODIFIED CCW AND DEVICE ADDRESS ARE EXAMINED FOR 00287000
* VALIDITY. IF THE MODIFIED CCW OR DEVICE ADDRESS IS INVALID, 00288000
* DMKHVC RETURNS CONTROL TO THE USER WITH A RETURN CODE AND 00289000
* CONDITION CODE OF ONE IN PSW. FOR A VALID MODIFIED CCW AND 00290000
* DEVICE ADDRESS, A CHANGE IS MADE TO THE REAL CCW THAT 00291000
* CORRESPONDS TO THE MODIFIED VIRTUAL CCW, IN ORDER FOR 00292000
* MODIFICATION OF THE VIRTUAL CCW LIST TO HAVE ANY REAL 00293000
* EFFECT ON VM/370. 00294000
* ANY ERROR CODE RESULTING FROM THE EXECUTION IS 00295000
* PASSED BACK TO THE VIRTUAL MACHINE IN REGISTER 15 AND A 00296000
* CONDITION CODE IS SET IN THE PSW TO INDICATE TO THE VIRTUAL 00297000
* MACHINE WHETHER THE NECESSARY MODIFICATION TO THE REAL 00298000
* CCW LIST WAS MADE SUCCESSFULLY. IN GENERAL, A CONDITION 00299000
* CODE OF 0 INDICATES SUCCESS, 1 INDICATES A PROBABLE 00300000
* PROGRAMMING ERROR IN ISSUING THE DIAGNOSE CALL, AND 00301000
* 2 INDICATES THAT IT WAS TOO LATE TO CHANGE THE REAL CCW 00302000
* LIST BECAUSE OF CHANNEL END OR DEVICE END HAS ALREADY 00303000
* OCCURRED. 00304000
* 00305000
* CODE = X'002C' SUPPORTED VIA CALL TO DMKHVE 00306000
* RETURN DASD START ADDR OF ERROR RECORDING 00306100
* DATA AREA (CLASS C, E, OR F) 00307000
* 'R1' = ON RETURN: COMPRESSED DASD ADDRESS (CCPD) OF 00308000
* FIRST RECORD IN ERROR RECORDING AREA. 00309000
* 00310000
* THE COMPRESSED DASD ADDRESS IS CONTRUCTED FROM THE 00311000
* START CYLINDER NUMBER OF THE ERROR RECORDING AREA (FROM 00312000
* DMKSYSER) AND THE DEVICE CODE (RDEVCODE) FROM THE SYSTEM 00313000
* IPL DEVICE RDEVBLOK. THE VIRTUAL CONDITION CODE IS SET 00314000
* TO ZERO AND RETURN IS VIA DMKDSPCH. 00315000
* 00316000
* CODE = X'0030' SUPPORTED VIA CALL TO DMKHVE 00317000
* READ ONE RECORD OF ERROR RECORDING AREA 00317100
* (CLASS C, E, OR F) 00318000
* 'R1' = COMPRESSED DASD ADDRESS (CCPD) OF REQUESTED DATA 00319000
* 'R2' = START ADDRESS OF A VIRTUAL STORAGE FULL-PAGE BUFFER 00320000
* 00321000
* THE DASD ADDRESS IS EXAMINED FOR VALIDITY, AND IF 00322000
* IT IS O.K., THE DATA RECORD IS MADE AVAILABLE VIA A CALL 00323000
* TO DMKRPAGT. THE VIRTUAL CONDITION CODE IS SET AS FOLLOWS: 00324000
* CC = 0 SUCCESSFUL READ, DATA IS AVAILABLE 00325000
* CC = 1 END OF CYLINDER REACHED, NO DATA 00326000
* CC = 2 => FATAL I/O ERROR READING DATA PAGE 00327000
* CC = 3 INVALID CYLINDER, OUTSIDE OF RECORDING AREA 00328000
* 00329000
* CODE = X'0034' READ SYSTEM DUMP SPOOL FILE (CLASS C OR E) 00330000
* 'R1','R2' AS REQUIRED BY DMKDRDMP 00331000
* 00332000
* CODE '34' IS PROCESSED VIA A CALL TO DMKDRDMP. 00333000
* ON RETURN, THE ERROR CODE IS EXAMINED AND EITHER A PROGRAM 00334000
* INTERRUPT IS REFLECTED OR THE VIRTUAL MACHINE IS 00335000
* RE-DISPATCHED WITH A CONDITION CODE SET. 00336000
* 00337000
* CODE = X'0038' READ SYSTEM SYMBOL TABLE (CLASS C OR E) 00338000
* 'R1','R2' AS REQUIRED BY DMKDRDSY 00339000
* 00340000
* CODE '38' IS PROCESSED VIA A CALL TO DMKDRDSY. 00341000
* RETURN HANDLING IS THE SAME AS FOR CODES '14' AND '34'. 00342000
* 00343000
* CODE = X'003C' DYNAMIC UPDATE OF SYSTEM USER DIRECTORY 00344000
* (CLASS A, B, OR C) 00345000
* 'R1','R2' IMMATERIAL 00346000
* 00347000
* CODE '3C' IS PROCESSED VIA A CALL TO DMKUDRDS. 00348000
* RETURN HANDLING IS THE SAME AS FOR CODES '14','34','38'. 00349000
* 00350000
* 00351000
* CODE = X'0040' RESERVED FOR FUTURE USE 00352000
* 00353000
* CODE = X'0044' RESERVED FOR FUTURE USE 00354000
* CODE = X'0048' NOTIFY FIRST LEVEL CP THIS IS A SECOND LEVEL VM 00355010
* SYSTEM AND THAT THIS VIRTUAL MACHINE HAS ISSUED AN SVC76 00355020
* CODE = X'0048' RESERVED FOR FUTURE USE 00356000
* 00357000
* CODE = X'004C' PUNCH ACCOUNTING CARDS 00358000
* (THE ACCOUNTING OPTION MUST BE SET) 00359000
* 00360000
* 'R1' = CONTAINS THE ADDRESS OF THE PARAMETER LIST OR ZERO. 00361000
* 'R2' = CONTAINS AFUNCTION HEXADECIMAL CODE INTERPRETED BY 00362000
* DMKCPVAA. 00363000
* 00364000
* CODE X'004C' IS PROCESSED VIA A CALL TO DMKCPVAA. ON 00365000
* RETURN, IF THE USER ACCOUNTING BLOCK EXIST, THE STORAGE 00366000
* IS RELEASED. DMKHVC CHECKS THE PARAMETER LIST ADDRESS TO 00367000
* ASSURE THAT THE ADDRESS IS VALID AND ALIGNED ON A DOUBLEWORD 00368000
* BOUNDARY. IF THE PARAMETER LIST ADDRESS IS ZERO, DMKHVC 00369000
* RETURN CONTROL TO THE USER WITH CONDITION CODE ZERO 00370000
* SET IN THE PSW. IF THE PARAMETER LIST ADDRESS IS INVALIDED OR 00371000
* NOT ALIGNED ON A DOUBLEWORD BOUNDARY, THAN AN ADDRESSING 00372000
* OR SPECIFICATION EXECPTION IS GENERATED RESPECTIVELY. 00373000
* FOR A PARAMETER LIST ADDRESS THAT'S NON-ZERO AND VALID, THE 00374000
* USERID IN THE PARAMETER LIST IS CHECK AGAINST THE DIRECTORY 00375000
* LIST AND THE FUNCTION HEXADECIMAL CODE IS CHECK TO DETERMINE 00376000
* IF THEY ARE VALID. IF NOT, DMKHVC RETURN CONTROL TO THE USER 00377000
* WITH CONDITION CODE ONE OR THREE SET IN THE PSW RESPECTIVELY. 00378000
* IF THE USERID AND FUNCTION HEXADECIMAL CODE ARE VALID, THE 00379000
* USER ACCOUNTING BLOCK IS BUILDED AND THE USERID, ACCOUNT 00380000
* NUMBER AND DISTRIBUTION NUMBER ARE MOVE INTO THE BLOCK FROM 00381000
* THE PARAMETER LIST OR THE USER MACHINE BLOCK AND CONTROL 00382000
* IS RETURNED TO THE USER WITH A CONDITION CODE ZERO 00383000
* SET IN THE PSW. 00384000
* 00385000
* CODE = X'0050' SAVE 370X CONTROL PROGRAM IMAGE 00386000
* (CLASS A, B, OR C) 00387000
* 'R1', 'R2' AS REQUIRED BY DMKSNCP 00388000
* 00389000
* PROCESSED VIA A CALL TO DMKSNCP. ON RETURN AN ERROR 00390000
* CODE (OR ZERO) IS RETURNED IN THE USER'S 'R2' REGISTER. 00391000
* 00392000
* CODE = X'0058' DIAG CONSOLE 3270 WRITE 00393000
* 00394000
* CODE = X'0054' DIAG PA2 CONSOLE INTERRUPT ENABLE 00395000
* 00396000
* 00397000
* CODE = X'005C' EDIT AN ERROR MESSAGE ACCORDING TO USER'S 00398000
* EMSG SETTING (CLASS G) 00399000
* 'R1' = ADDRESS OF MESSAGE TO BE EDITED 00400000
* 'R2' = LENGTH OF MESSAGE (INCLUDING CODE AND TEXT) 00401000
* ON RETURN: 00402000
* 'R1' = ADDRESS OF MESSAGE THAT USER SHOULD SEND 00403000
* 'R2' = LENGTH OF MESSAGE THAT USER SHOULD SEND; 00404000
* OR 0 IF NO MSG SHOULD BE SENT 00405000
* 00406000
* EMSG SETTING FOR THE USER IS TESTED BY TESTING VMMLEVEL 00407000
* FOR VMMCODE AND VMMTEXT. 00408000
* IF EMSG IS OFF, 'R2' IS SET TO 0. 00409000
* IF EMSG IS ON, 'R2' AND 'R1' ARE LEFT ALONE. 00410000
* IF EMSG IS CODE, 'R2' IS SET TO 10, WHICH IS LENGTH OF 00411000
* CODE ALONE. 00412000
* IF EMSG IS TEXT, 'R1' IS SET TO POINT TO TEXT PART OF MESSAGE, 00413000
* AND 'R2' IS DECREMENTED TO LENGTH OF TEXT ONLY. (IF 00414000
* RESULTING LENGTH IS NOT POSITIVE, 0 LENGTH IS RETURND.) 00415000
* ON RETURN FROM DIAGNOSE 5C, CALLER SHOULD CHECK 'R2'. 00416000
* IF A ZERO LENGTH WAS PASSED BACK, THE CALLER SHOULD 00417000
* NOT ISSUE A STARTIO AT ALL (I.E., THE MESSAGE SHOULD 00418000
* NOT BE SENT). IF A NON-0 LENGTH WAS PASSED BACK, 00419000
* HE SHOULD ISSUE A STARTIO USING THE 'R1' ADDRESS AND 00420000
* THE 'R2' LENGTH THAT WERE RETURNED BY THE DIAGNOSE 5C. 00421000
* 00422000
* CODE = X'0060' RETURN VIRTUAL MACHINE STORAGE SIZE (CLASS G) 00423000
* ON RETURN: 00424000
* 'R1' = SIZE OF VIRTUAL STORAGE 00425000
* 00426000
* CODE = X'0064' LOAD/FIND OR PURGE A NAMED SYSTEM (CLASS G) 00427000
* 'R1' = ADDRESS OF THE NAMED SYSTEM 00428000
* 'R2' = CODE FUNCTION: 00429000
* 00 = LOAD A NAMED SYSTEM IN SHARED MODE 00430000
* 04 = LOAD A NAMED SYSTEM IN NON-SHARED MODE 00431000
* 08 = PURGE A PREVIOUS LOADED NAMED SYSTEM 00432000
* 0C = FIND THE NAMED SYSTEM IN THE USERS VIRTUAL STORAGE 00433000
* 00433010
* CODE = X'0068' VIRTUAL MACHINE COMMUNICATION FACILITY 00433020
* 00433030
* 'RX' = VIRTUAL ADDRESS OF THE USER PARAMETER LIST 'VMCPARM'. 00433040
* 'RY' = RETURN CODE REGISTER 00433050
* 00433060
* VMCPARM - VM COMMUNICATION PARMLIST 00433070
* 00433080
* 0 +-----+-----+-----------+-----------------------+ 00433090
* | V*1 | V*2 | VMCPFUNC | VMCPMID | 00433100
* 8 +-----+-----+-----------+-----------------------+ 00433110
* | VMCPUSER | 00433120
* 10 +-----------------------+-----------------------+ 00433130
* | VMCPVADA | VMCPLENA | 00433140
* 18 +-----------------------+-----------------------+ 00433150
* | VMCPVADB | VMCPLENB | 00433160
* 20 +-----------------------+-----------------------+ 00433170
* | VMCPUSE | 00433180
* 28 +-----------------------------------------------+ 00433190
* 00433200
* 00433210
* THIS MODULE INITIALLY VALIDITY CHECKS THE VIRTUAL ADDRESS 00433220
* SPECIFIED FOR VMCPARM AS FOLLOWS: 00433230
* 00433240
* 1. IF THE ADDRESS IS NOT WITHIN VIRTUAL STORAGE OR EXTENDS 00433250
* BEYOND VIRTUAL STORAGE AN ADDRESSING EXCEPTION IS 00433260
* REFLECTED TO THE VIRTUAL MACHINE. 00433270
* 00433280
* 2. IF THE VMCPARM ADDRESS IS NOT DOUBLEWORD ALIGNED A 00433290
* SPECIFICATION EXCEPTION IS REFLECTED TO THE VIRTUAL 00433300
* MACHINE. 00433310
* 00433320
* 3. IF THE ABOVE TESTS SUCCEED A 'CALL' IS MADE TO MODULE 00433330
* DMKVMCFC WHO WILL PROCESS THE VMCF REQUEST. 00433340
* 00433350
* 4. UPON RETURN FROM DMKVMCFC 'R2' CONTAINS A DIAGNOSE 00433360
* RETURN CODE. THE RETURN CODE IS PASSED BACK TO THE 00433370
* USER IN HIS 'RY' REGISTER. 00433380
* 00433390
* 00434000
* DMKCFGCL - IS CALLED TO PROCESS THE REQUEST 00435000
* 00435100
* CODE = X'70' RESERVED FOR FUTURE IBM USE 00435200
* 00435300
* CODE = X'74' SAVE 3800 PRINTER IMAGE LIBRARY 00435400
* 00435500
* THIS CODE SAVES A 3800 IMAGE LIBRARY IN A SAVED SYSTEM 00435600
* 00435700
* 00436000
* CODE = X'0078' COMMUNICATION FROM DMKMSS RUNNING IN A 00437100
* VIRTUAL MACHINE. 00437110
* 00437120
* A VALUE OF 16 (X'10') IS PLACED IN REGISTER 00437130
* 0 AND MODULE DMKSSS IS CALLED TO PROCESS 00437140
* THE REQUEST. 00437150
* 00437160
* CODES = X'007C' AND X'0080' RESERVED FOR IBM USE 00437200
* CODE = X'0084' UPDATE DIRECTORY ENTRY IN PLACE 00437300
* 00437400
* 'RX' = VIRTUAL ADDRESS OF USER PARAMETER LIST 00437500
* 'RY' = LENGTH OF USER PARAMETER LIST 00437600
* 00437700
* ON RETURN 'RY' CONTAINS A RETURN CODE 00437800
* 00437900
* CODES = X'0088' THRU X'00FC' RESERVED FOR IBM USE 00438000
*. 00439000
EJECT 00440000
*---------------------------------------------------------------------* 00441000
* * 00442000
* PROCESS VIRTUAL DIAGNOSE FOR VIRTUAL MACHINES * 00443000
* * 00444000
*---------------------------------------------------------------------* 00445000
DMKHVCAL DS 0D PROCESS DIAGNOSE - X'83RR0NNN' 00446000
USING *,R12 00447000
USING PSA,0 00448000
USING VMBLOK,R11 00449000
SPACE 2 00450000
TM VMINST+3,X'03' IS CODE MULTIPLE OF 4? 00451000
BNZ SPECERR NO - SPECIFICATION 00452000
IC R5,VMINST+1 GET REGISTERS SPECIFIED 00453000
LR R6,R5 00454000
SLL R6,2(0) USER'S 'R2' NUMBER 00455000
N R6,F60 ... 00456000
SRL R5,2(0) ... 00457000
N R5,F60 REGISTER NO. * 4 00458000
LA R5,VMGPRS(R5) ADDR OF 'R1' IN VMBLOK 00459000
LA R6,VMGPRS(R6) ADDR OF 'R2' IN VMBLOK 00460000
LH R4,VMINST+2 GET FUNCTION CODE FROM INSTRUCTIO@V200820 00461000
CL R4,=A(HVCMAXC) WITHIN SYSTEM SUPPORTED RANGE ? @V200820 00462000
BH HVCUSER NO -- CHECK FOR INSTALLATION CODE@V200820 00463000
B HVCODER(R4) JUMP INTO IT 00464000
SPACE 2 00465000
HVCODER EQU * DECODING TABLE FOR HVC'S 00466000
B CALLHVD '000' - STORE EXTENDED ID @VM03170 00467000
B CALLHVD '004' - READ CP CORE @VM03170 00468000
B HVCONFN '008' - CONSOLE FUNCTION 00469000
B HVCHRON '00C' - PSEUDO-CLOCK 00470000
B HVCPGRL '010' - PAGEREL 00471000
B CALLHVD '014' - SPOOL INPUT FILE @VM03170 00472000
* MANIPULATE 00473000
B HVCDISK '018' - DASD I/O 00474000
B CALLHVD '01C' - CLEAR RECORDING AREA @VM03170 00475000
B HVCFAKE '020' - GENERAL I/O WITHOUT INTERRUPTS 00476000
B CALLHVD '024' - DEVICE TYPE INQUIRY @VM03170 00477000
B HVCDCPM '028' - DYNAMIC CHANNEL @V1D0631 00478000
* MODIFICATION 00479000
B CALLHVE '02C' - GET DASD START OF @VA11268 00480000
* LOGREC AREA 00480100
B CALLHVE '030' - READ ONE PAGE OF LOGREC @VA11268 00480200
* DATA 00480300
B CALLHVD '034' - READ SYSTEM DUMP SPOOL @VM03170 00484000
* FILE 00485000
B CALLHVD '038' - READ SYSTEM SYMBOL TABLE @VM03170 00486000
B CALLHVD '03C' - DYNAMIC DIRECTORY UPDATE @VM03170 00487000
B HVCEXIT '040' - RESERVED FOR FUTURE USE 00488000
B HVCEXIT '044' - RESERVED FOR FUTURE USE 00489000
B HVCVMCP @VA09952 00490010
B CALLHVD '04C' - PUNCH ACCOUNTING CARDS @VM03170 00491000
B CALLHVD '050' - SAVE 370X CONTROL PROGRAM@VM03170 00492000
B CALLHVD '054' - DIAG PA2 CONSOLE ENABLE @VM03170 00493000
B HVCGRAF '058' - DIAG CONSOLE 3270 WRITE @V200730 00494000
B HVCEMSG '05C' - EDIT MSG BY EMSG SETTING @VA01388 00495000
B HVCSTOR '060' GET VIRTUAL MACHINE @V304635 00496000
* STORAGE SIZE 00497000
B HVCSYS '064' LOADSYS/PURGESYS/FINDSYS @V304635 00498000
B HVCVMCF '068' VM COMMUNICATION @V60B9BA 00498500
B HVCEXIT '06C' RESERVED FOR FUTURE USE @V60B9BA 00498600
B HVCEXIT '070' RESERVED FOR FUTURE USE @V60B9BA 00498700
B CALLHVD '074' SAVE 3800 IMAGE LIBRARY @V60B9BA 00498800
B HVCMSS '078' CALL DMKSSS - MSS REQUEST @V60B6B8 00498810
B HVCLDF '07C' Logical Dev Support FaciltyHRC065DK 00498820
B HVCEXIT '080' RESERVED FOR FUTURE IBM USE@VMI0048 00498830
B CALLHVD '084' DIRECTORY UPDATE IN PLACE @VMI0048 00498840
B HVCEXIT '088' RESERVED FOR FUTURE USE HRC072DK 00499000
B HVC3270 '08C' 3270 DEV CHARACTERISTICS HRC072DK 00499100
HVCMAXC EQU *-HVCODER-4 MAXIMUM CODE NUMBER DEFINED HRC072DK 00499200
EJECT 00500000
CALLHVE CALL DMKHVEAL LET DMKHVE HANDLE @VA11268 00500100
BNZ PROGINT IF NON-ZERO REFLECT PROG. CHECK @VA11268 00500200
B HVCEXIT EXIT TO DISPATCHER @VA11268 00500300
SPACE 2 00500400
HVCUSER EQU * DECODING FOR INSTALLATION-DEFINED CODES@V200820 00501000
S R4,F256 WITHIN INSTALLATION-DEFINED RANGE@V200820 00502000
BM SPECERR NO -- SPECIFICATION EXCEPTION @V200820 00503000
CL R4,=A(USRMAXC) VALID CODE FOR THIS TABLE ? @V200820 00504000
BH SPECERR NO -- SPECIFICATION EXCEPTION @V200820 00505000
B USRCODE(R4) BRANCH TO PROCESSING ROUTINE @V200820 00506000
SPACE 2 00507000
USRCODE EQU * DECODING TABLE FOR INSTALLATION CODES @V200820 00508000
B SPECERR (PROTOTYPE) @V200820 00509000
USRMAXC EQU *-USRCODE-4 HIGHEST INSTALLATION CODE DEFINED@V200820 00510000
CALLHVD CALL DMKHVDAL LET HVD HANDLE THESE @VM03170 00511000
BNZ PROGINT IF NON-ZERO REFLECT PROGRAM CHECK@VM03170 00512000
SPACE 2 00513000
HVCEXIT EQU * RE-DISPATCH VIRTUAL MACHINE 00514000
NI VMRSTAT,X'FF'-(VMIOWAIT+VMEXWAIT) 00515000
HVCDISP GOTO DMKDSPCH PASS CONTROL TO DISPATCHER @VA05376 00516000
EJECT 00517000
EJECT 00518000
*---------------------------------------------------------------------* 00519000
* VIRTUAL CONSOLE FUNCTION - CODE '008' FOR ANYBODY * 00520000
*---------------------------------------------------------------------* 00521000
HVCONFN EQU * 00522000
TM VMOSTAT,VMCF EXECUTING A CONSOLE FUNCTION ?? @V200930 00523000
BZ HVCON1 NO, CONT @V200930 00524000
OI VMRSTAT,VMCFWAIT STOP MACHINE, WAIT TIL DONE @V200930 00525000
L R2,VMPSW+4 GET PSW ADDRESS @V200930 00526000
SL R2,F4 BACKUP TO RE-EXECUTE WHEN RUN @VA01587 00527000
ST R2,VMPSW+4 SET ADDRESS @V200930 00528000
B HVCEXIT RETURN @V200930 00529000
HVCON1 DS 0H @V200930 00530000
SLR R2,R2 ZERO WORK REGISTER 00531000
SR R7,R7 INDICATE NO RESPONSE BUFFER @V60C2B8 00531100
ICM R2,B'0111',1(R6) GET COMMAND LENGTH @V60BBBB 00531800
BZ HVBREAK ZERO LENGTH = GO TO CP MODE @V60BBBB 00532000
TM 0(R6),X'FF' ANY FLAGS SET? @V60BBBB 00532200
BZ HVNFLAG BR IF NOT @V60BBBB 00532400
BO SPECERR BR IF THEY'RE ALL ON - ERROR @V60BBBB 00532600
TM 0(R6),PASSSUP PASSWORD SUPPRESSION? @V60BBBB 00532800
BZ NFLAG0 BR IF NOT @V60BBBB 00533000
OI VMFSTAT,VMNPWOCL INDICATE PASSWORD SUPPRESSION @V60BBBB 00533200
NI 0(R6),X'FF'-PASSSUP TURN OFF FLAG BIT @V60BBBB 00533400
NFLAG0 DS 0H @V60BBBB 00533800
TM 0(R6),RESPBUF RESPONSE IN BUFFER? @V60C2B8 00534010
BNO NFLAG1 NO - GO CHECK FOR ANY MORE BITS @V60C2B8 00534020
LA R15,VMGPRS+R15*4 SET ADDRESS OF VIRTUAL R15 @V60C2B8 00534030
CR R5,R15 RX CANNOT BE R15, @V60C2B8 00534040
BNL SPECERR SINCE RX+1 IS RESPONSE BUFFER ADD@V60C2B8 00534050
CR R6,R15 RY CANNOT BE R15 @V60C2B8 00534060
BNL SPECERR SINCE RY+1 IS RESPONSE BUFFER LEN@V60C2B8 00534070
LPR R8,R2 MAKE COMMAND LENGTH >0 AND SAVE @V60C2B8 00534080
ICM R2,15,4(R6) SET RESPONSE BUFFER LENGTH @V60C2B8 00534090
BNP SPECERR LENGTH MUST BE >0 @V60C2B8 00534100
C R2,=F'8192' AND =< 8192 @V60C2B8 00534110
BH SPECERR ELSE GIVE ERROR @V60C2B8 00534120
SR R1,R1 CLEAR FOR ICM @V60C2B8 00534130
ICM R1,B'0111',5(R5) GET RESPONSE BUFFER ADDRESS @V60C2B8 00534140
BZ SPECERR ADDRESS OF 0 NOT A VALID BUFFER @V60C2B8 00534150
LR R7,R1 SAVE THE RESPONSE BUFFER ADDRESS @V60C2B8 00534160
LA R10,HVCNO1 SKIP 2ND PAGE KEY CK IF NO CROSS @V60C2B8 00534170
BAL R9,ADDCHEK AND VERIFY THE BUFFER @V60C2B8 00534180
LR R1,R14 GET ADDRESS OF LAST PAGE @V60C2B8 00534190
HVCON1A BAL R13,KEYTRAN CHECK KEY ON THIS PAGE @V60C2B8 00534200
SL R1,F4096 BACK UP 1 PAGE @V60C2B8 00534210
CLR R1,R7 ANY MORE PAGES TO CHECK @V60C2B8 00534220
BH HVCON1A YES, CONTINUE KEY CHECKING @V60C2B8 00534230
LR R1,R7 RESTORE ADDRESS OF 1ST PAGE @V60C2B8 00534240
HVCNO1 BAL R13,KEYTRAN CHECK KEY OF VIRTUAL BUFFER @V60C2B8 00534250
LR R2,R8 RESTORE COMMAND LENGTH (>0) @V60C2B8 00534260
NFLAG1 DS 0H @V60C2B8 00534270
HVNFLAG DS 0H CHECK COMMAND BUFFER @V60C2B8 00534280
CL R2,=F'132' EXCEED MAX? @VA03197 00535000
BH SPECERR YES - ERROR @VA03197 00536000
LR R3,R2 SAVE LENGTH @VA03197 00537000
L R1,0(,R5) START ADDRESS OF USER'S BUFFER 00538000
LR R8,R3 SAVE FULL BUFFER LENGTH 00539000
LA R10,GETBUFF RETURNS HERE IF NO PAGE CROSS 00540000
BAL R9,ADDCHEK VALIDATE + TEST VIRTUAL ADDRESS 00541000
SLR R9,R9 INDICATE THAT PAGE BND WAS CROSSED 00542000
LR R4,R3 FULL COUNT ALSO IN R4 00543000
SLR R14,R1 COMPUTE FIRST SEGMENT LENGTH 00544000
SLR R4,R14 COMPUTE SECOND SEGMENT LENGTH 00545000
LR R3,R14 PUT FIRST LENGTH IN GPR 3 00546000
GETBUFF EQU * GET FREE STORAGE FOR CFMEN BUFFER 00547000
OI VMOSTAT,VMCF CONSOLE FUNCTION EXECUTING @VA03286 00548000
OI VMOSTAT,VMVIRCF FLAG AS VIRTUAL CONS FUNC @V200930 00549000
MVC VMCONLN,4+2(R6) SET RESPONSE BUFFER LENGTH @V60C2B8 00549100
* WILL BE IGNORED IF ADDRESS = 0 00549200
ST R7,VMCONBUF STORE VIRTUAL ADDRESS OF RESP BUF@V60C2B8 00549300
LA R0,18(0) DBL-WDS FOR FULL BUFFER 00550000
CALL DMKFREE GET FREE STORAGE FOR BLOCK 00551000
LR R7,R1 SAVE BLOCK ADDRESS 00552000
MVC 0(8,R7),BLANKS FILL BUFFER WITH BLANKS 00553000
MVC 8(17*8,R7),0(R7) ... 00554000
L R1,0(0,R5) USER'S BUFFER ADDRESS 00555000
TRANS 2,1,OPT=(BRING,DEFER) 00556000
EJECT 00557000
BCTR R3,0 DECREMENT CHARACTER COUNT... 00558000
EX R3,CONFUNY MOVE DATA TO FREE STORAGE @V200820 00559000
LTR R9,R9 IS THERE A SECOND SEGMENT 00560000
BNZ CFNEXEC NO - ALL DONE NOW 00561000
LA R1,1(R3,R1) NEXT PAGE VIRTUAL STORAGE 00562000
TRANS 2,1,OPT=(BRING,DEFER) GET SECOND SEGMENT 00563000
LA R5,1(R3,R7) NEXT REAL STORAGE ADDRESS 00564000
BCTR R4,0 R4 HAS LENGTH OF 2ND SEGMENT 00565000
EX R4,CONFUNX MOVE SECOND HALF TO BUFFER 00566000
CFNEXEC EQU * EXECUTE VIRTUAL CONSOLE FUNCTION 00567000
LR R0,R8 FULL LINE LENGTH TO R0 00568000
LR R1,R7 BUFFER START ADDR TO R1 00569000
CALL DMKCFMEN EXECUTE VIRTUAL CONSOLE FUNCTION 00570000
C R11,ASYSVM IS USER STILL WITH US? @VA05376 00570300
BE HVCDISP NO, DON'T MODIFY VMBLOK STATUS @VA05376 00570700
LTR R2,R2 WAS THERE A NON-ZERO RETURN CODE?@VA04144 00571000
BNZ CFNSETRC YES. THEN SET IT. @VA04144 00572000
CLC VMCOMND(4),=CL4'IPL ' WAS THIS AN 'IPL' COMMAND?@VA04144 00573000
BE CFNIPLEX IF SO, DON'T SET RETURN CODE. @VA04144 00574000
CFNSETRC EQU * @VA04144 00575000
ST R2,0(0,R6) SEND RETURN CODE IN USER'S 'R2' 00576000
CFNIPLEX EQU * @VA03685 00577000
NI VMFSTAT,X'FF'-VMNPWOCL RESET PASSWORD @V60BBBB 00577300
* SUPPRESSION FLAG. @V60BBBB 00577600
TM VMOSTAT,VMSLEEP IS MACHINE SLEEPING ?? @V200930 00578000
BO HVCCKBUF YES, SKIP FLAG RESET @V60C2B8 00579100
NI VMOSTAT,X'FF'-VMVIRCF RESET DIAG CONS FUNC @V200930 00580000
HVCCKBUF CLC VMCONBUF,ZEROES WAS THERE A RESPONSE BUFFER @V60C2B8 00581010
BE HVCEXIT NO, THEN EXIT NOW @V60C2B8 00581020
MVC VMCONBUF,ZEROES CLEAR RESPONSE BUFFER ADDRESS @V60C2B8 00581030
NI VMPSW+2,X'FF'-X'30' SET CC = 0 @V60C2B8 00581040
NI VMPSW+4,X'FF'-X'30' SET CC = 0 @V60C2B8 00581050
LH R4,VMCONLN GET BYTES LEFT IN BUFFER @V60C2B8 00581060
LTR R4,R4 AND TEST @V60C2B8 00581070
BM EXCC1 <0 , MEANS BUFFER OVERFLOW @V60C2B8 00581080
L R2,4(,R6) GET ORIGINAL COUNT @V60C2B8 00581090
SR R2,R4 - COUNT LEFT = VALID CHAR COUNT @V60C2B8 00581100
ST R2,4(,R6) RETURN COUNT @V60C2B8 00581110
B HVCEXIT EXIT, CC=0 ALL SET @V60C2B8 00581120
EXCC1 LPR R4,R4 GET COUNT OF OVERFLOW CHARACTERS @V60C2B8 00581130
ST R4,4(,R6) AND RETURN TO USER @V60C2B8 00581140
B HVCDTC1 NOW EXIT WITH CC=1 @V60C2B8 00581150
SPACE 2 00582000
HVBREAK EQU * ENTER CONSOLE FUNCTION MODE 00583000
MVI 0(R6),X'00' ZERO FLAG BYTE @VA11382 00583500
CALL DMKCFMBK ENTER CFWAIT 00584000
B HVCEXIT ...AND GO TO DISPATCH 00585000
SPACE 00586000
CONFUNY MVC 0(*-*,R7),0(R2) @V200820 00587000
CONFUNX MVC 0(*-*,R5),0(R2) 00588000
SPACE 1 @V60BBBB 00588300
*-------------------------------------------------------------*@V60BBBB 00588600
* BITS DEFINED IN BYTE 0 OF RY (LENGTH REG) *@V60BBBB 00588900
*-------------------------------------------------------------*@V60BBBB 00589200
PASSSUP EQU X'80' VM REQUESTS PASSWORD SUPPRESSION @V60BBBB 00589500
RESPBUF EQU X'40' USER REQUESTS RESPONSE IN BUFFER @V60C2B8 00589600
EJECT 00590000
*---------------------------------------------------------------------* 00591000
* PSEUDO-CHRONOLOG CLOCK - CODE '00C' FOR ANYBODY * 00592000
* ------------------------------- * 00593000
* AT ENTRY, R1 MUST POINT TO A 32 BYTE DATA AREA THAT * 00594000
* MUST BE DOUBLE-WORD ALIGNED. THE DATA AREA WILL BE * 00595000
* FILLED IN IN THE FOLLOWING FORMAT -- * 00596000
* * 00597000
* +----------+----------+----------+----------+ * 00598000
* | MM/DD/YY | HH:MM:SS | VIRTCPU | TOTALCPU | * 00599000
* +----------+----------+----------+----------+ * 00600000
* * 00601000
* WHERE THE VIRTUAL AND TOTAL CPU TIMES ARE DOUBLE-WORD, * 00602000
* UNSIGNED INTEGERS EXPRESSED IN MICRO-SECOND UNITS. * 00603000
*---------------------------------------------------------------------* 00604000
HVCHRON EQU * 00605000
TM 3(R5),X'07' CHECK ADDRESS ALIGNMENT 00606000
BNZ SPECERR NO GOOD 00607000
L R1,0(,R5) GET USER'S DATA ADDRESS (VIRTUAL) 00608000
LA R2,32(0) FIELD LENGTH 00609000
LA R9,GETDATE DON'T CARE ABOUT PAGE CROSSINGS 00610000
BAL R10,ADDCHEK CHECK PAGE CROSS, VALIDITY 00611000
GETDATE EQU * CONVERT DATE AND CURRENT TIME 00612000
LA R1,TEMPR6 PUT THE DATE HERE 00613000
LA R2,TEMPR8 ...AND THE TIME HERE 00614000
CALL DMKCVTDT ... 00615000
L R5,0(0,R5) VIRTUAL ADDRESS OF BUFFER 00616000
LA R1,0(0,R5) FIRST DOUBLE-WORD TO R1 00617000
LM R7,R10,TEMPR6 PICK UP DATE, TIME 00618000
BAL R13,KEYTRAN TRANSLATE FIRST ADDRESS 00619000
STM R7,R8,0(R2) ...DATE MM/DD/YY 00620000
LA R1,8(0,R5) ...2-ND DBL-WD 00621000
BAL R13,KEYTRAN TRANSLATE... 00622000
STM R9,R10,0(R2) ...TIME HH:MM:SS 00623000
CALL DMKTMRPT OBTAIN UP-TO-DATE VTIME @V2B2638 00624000
LR R9,R0 SAVE PROBLEM TIME 00625000
LR R10,R1 ... 00626000
SPACE 00627000
SRDL R0,12(0) CONVERT IT TO MICRO-SECONDS 00628000
STM R0,R1,TEMPR6 PUT IT HERE TEMPORARILY 00629000
LM R7,R8,VMTTIME CALCULATE TOTAL CPU TIME USED 00630000
SLR R8,R10 SUBTRACT OUT HIS PROBLEM TIME 00631000
BC 8+2+1,*+8 BR. IF NO-CARRY 00632000
SL R7,F1 ADJUST FOR CARRY CONDITION 00633000
SLR R7,R9 ... 00634000
LM R0,R1,=X'7FFFFFFFFFFFF000' MAXIMUN POSITIVE NUMBER. 00635000
SLR R1,R8 FIND TOTAL TIME USED BY USER 00636000
BC 8+2+1,*+8 BR. IF NO CARRY 00637000
SL R0,F1 ADJUST FOR CARRY CONDITION 00638000
SLR R0,R7 TOTAL CPU TIME NOW IN R0-1 00639000
SRDL R0,12(0) CONVERT IT TO MICRO-SECONDS 00640000
SPACE 00641000
STM R0,R1,TEMPR8 ... 00642000
LA R1,16(0,R5) 3-RD DBL-WD 00643000
LM R7,R10,TEMPR6 PICK UP BOTH CPU TIMES 00644000
BAL R13,KEYTRAN TRANSLATE THIRD ADDR. 00645000
STM R7,R8,0(R2) VIRT. CPU TIME - MIC-SECS 00646000
LA R1,24(0,R5) 4-TH DBL-WD 00647000
BAL R13,KEYTRAN TRANSLATE... 00648000
STM R9,R10,0(R2) TOTAL CPU TIME - MIC-SECS 00649000
B HVCEXIT RE-DISPATCH 00650000
SPACE 2 00651000
KEYTRAN EQU * GET DATA PAGE, TEST PROTECTION KEYS 00652000
TRANS 2,1,OPT=(BRING,DEFER) GET THE REQUIRED PAGE 00653000
CALL DMKPSASP TEST VIRTUAL STORAGE KEYS @V202232 00654000
BNZ PROTERR OOPS 00655000
BR R13 ... 00656000
EJECT 00657000
*---------------------------------------------------------------------* 00658000
* RELEASE VIRTUAL PAGES - CODE '010' FOR ANYBODY * 00659000
* ------------------------------- * 00660000
* HERE TO RELEASE A CONTIGUOUS AREA OF USER VIRTUAL * 00661000
* MEMORY. BOTH MAIN STORAGE AND SECONDARY STORAGE ARE * 00662000
* RELEASED. AT ENTRY, 'R1' MUST CONTAIN THE PAGE ADDRESS * 00663000
* OF THE FIRST PAGE TO BE RELEASED, AND 'R2' MUST CONTAIN * 00664000
* THE ADDRESS OF THE LAST PAGE. THE ADDRESSES IN EACH * 00665000
* REGISTER MUST BE PAGE BOUNDARY ALIGNED, AND 'R2' MUST BE * 00666000
* GREATER THAN OR EQUAL TO 'R1'. * 00667000
*---------------------------------------------------------------------* 00668000
HVCPGRL EQU * 00669000
L R2,0(,R6) GET ADDRESS OF LAST PAGE TO BE RELEASED 00670000
CL R2,VMSTOR IS IT WITHIN VIRTUAL STORAGE ? @V304635 00671000
BNL ADDRERR NO -- REFLECT INVALID ADDRESS 00672000
LR R1,R2 SAVE ADDRESS 00673000
N R1,F4095 TEST FOR PAGE ALIGNMENT 00674000
BNZ SPECERR ALIGNMENT ERROR -- SPECIFICATION EXCEP. 00675000
L R1,0(,R5) TEST LOW ADDRESS ALSO 00676000
LTR R1,R1 ADDRESS MUST BE GE 0 00677000
BM SPECERR IF NOT, SPECIFICATION EXCEPTION 00678000
CR R1,R2 1ST PAGE MUST .LE. 2ND 00679000
BH SPECERR IF NOT, ERROR 00680000
LR R0,R1 SAVE 1ST PAGE 00681000
N R0,F4095 TEST ALIGNMENT 00682000
BNZ SPECERR ALIGNMENT ERROR 00683000
OI VMQSTAT,VMPRIDSP CHECK QUEUE STAT @VA08721 00683410
* OF SHARED SYSTEMS, AND DON'T 00683900
* CHANGE KEYS 00684400
CALL DMKPGSSS RELEASE PAGES IN ADDRESS RANGE @V304635 00686000
B HVCEXIT RETURN TO VM USER 00687000
SPACE 00688000
HVCDTC1 EQU * SET CONDITION CODE = 1 00689000
LA R2,X'10' CONDITION CODE WILL BE ONE 00690000
B HVCCSET GO SET CONDITION CODE 00691000
HVCDTC2 EQU * SET CONDITION CODE = 2 00692000
LA R2,X'20' CONDITION CODE WILL BE TWO 00693000
B HVCCSET GO SET CONDITION CODE 00694000
HVCDTC3 EQU * SET CONDITION CODE = 3 00695000
LA R2,X'30' CONDITION CODE WILL BE THREE 00696000
HVCCSET EQU * SET VIRTUAL CONDITION CODE 00697000
LA R1,VMPSW+4 POSITION IF IN BC MODE 00698000
TM VMESTAT,VMEXTCM (IT'S DIFFERENT FOR ECMODE) 00699000
BZ *+8 00700000
LA R1,VMPSW+2 POSITION IF IN EC MODE 00701000
NI 0(R1),B'11001111' CLEAR ANY EXITING CC @VA02203 00702000
EX R2,HVCSETCC SET THE CONDITION CODE IN VMPSW 00703000
B HVCEXIT 00704000
SPACE 00705000
HVCSETCC OI 0(R1),*-* EXECUTED FOR COND. CODE SETTING 00706000
HVCVMCP DS 0H @VA09952 00706010
*-------------------------------------------------------------- 00706020
* DO THE X'48' DIAGNOSE FOR CP UNDER CP 00706030
* R5 ADDRESS OF DIAGNOSE RX 00706040
* R11 ACCRESS OF CALLER VMBLOK 00706050
* RX=04 SVC76 SWITCH ON 00706060
* RX=08 CP VIRTUAL SWITCH ON 00706070
*-------------------------------------------------------------- 00706080
SPACE 3 00706090
CLC 0(3,R5),ZEROES FIRST 3 BYTES OF RX MUST BE ZERO @VA09952 00706100
BNE SPECERR NO ERROR @VA09952 00706110
CLI 3(R5),X'04' SVC76 REQUEST @VA09952 00706120
BE SVC76ON YES SWITCH ON @VA09952 00706130
CLI 3(R5),X'08' CP VIRTUAL REQUEST @VA09952 00706140
BE VMCPON YES SWITCH ON @VA09952 00706150
B SPECERR OTHERWISE YOU GOTS ERROR @VA09952 00706160
SVC76ON DS 0H @VA09952 00706170
OI VMSPMFLG,VMCPSV76 SVC76 OUT OF CP VIRT @VA09952 00706180
B HVCEXIT @VA09952 00706190
VMCPON DS 0H @VA09952 00706200
OI VMSPMFLG,VMCPVIRT ON SWITCH CP VIRTUAL @VA09952 00706210
B HVCEXIT @VA09952 00706220
EJECT 00707000
SPACE 2 00708000
*---------------------------------------------------------------------* 00709000
* STANDARD-FORM DISK I/O - CODE '018' FOR ANYBODY * 00710000
*---------------------------------------------------------------------* 00711000
HVCDISK EQU * 00712000
L R1,DMKHVCDI ADD 1 TO COUNT OF DIAGNOSE I/O'S 00713000
A R1,F1 00714000
ST R1,DMKHVCDI AND RESTORE 00715000
LR R1,R5 ADDRESS OF REGISTER FIELDS 00716000
LR R2,R6 ADDRESS OF SECOND REGISTER 00717000
GOTO DMKDGDDK GO PERFORM I/O 00718000
SPACE 2 00719000
SPACE 2 00720000
*---------------------------------------------------------------------* 00721000
* GENERAL I/O WITHOUT INTERRUPTS - CODE '020' FOR ANYBODY * 00722000
*---------------------------------------------------------------------* 00723000
HVCFAKE EQU * 00724000
L R1,DMKHVCDI GET COUNT OF DIAGNOSE I/O'S @VA05513 00724250
A R1,F1 INCREMENT BY ONE @VA05513 00724500
ST R1,DMKHVCDI RESTORE UPDATED COUNT @VA05513 00724750
LR R1,R5 ADDRESS OF REGISTER FIELDS 00725000
LR R2,R6 SECOND REGISTER ADDRESS 00726000
CALL DMKGIOEX GO PERFORM SIMPLIFIED I/O @V200820 00727000
B HVCEXIT @V200820 00728000
SPACE 2 00728010
*---------------------------------------------------------------------* 00728020
* VIRTUAL MACHINE COMMUNICATION - CODE '068' FOR ANYBODY 00728030
*---------------------------------------------------------------------* 00728040
HVCVMCF EQU * @V387045 00728050
TM 3(R5),X'07' VMCPARM ADDRESS D/W ALIGNED ? @V387045 00728060
BNZ SPECERR NO..REFLECT SPECIFICATION @V387045 00728070
* EXCEPTION.. 00728080
L R1,0(,R5) VIRTUAL ADDRESS OF VMCPARM @V387045 00728090
LA R2,VMCPLEN AND ITS LENGTH @V387045 00728100
LA R9,HVCCVMC ALLOW TO CROSS PAGE BOUNDARY @V387045 00728110
BAL R10,ADDCHEK VALIDITY CHECK ADDRESS @V387045 00728120
HVCCVMC EQU * @V387045 00728130
CALL DMKVMCFC PROCESS VMCF REQUEST @V387045 00728140
ST R2,0(,R6) PASS BACK RETURN CODE @V387045 00728150
B HVCEXIT EXIT TO DISPATCH @V387045 00728160
EJECT 00729000
*--------------------------------------------------------------HRC065DK 00729100
* LOGICAL DEVICE SUPPORT FACILITY- CODE '07C' FOR ANYBODY HRC065DK 00729120
*--------------------------------------------------------------HRC065DK 00729140
HVCLDF EQU * HRC065DK 00729160
CALL HDKD7CEX Process LDF request HRC065DK 00729180
B HVCEXIT Exit to dispatcher HRC065DK 00729200
*--------------------------------------------------------------HRC072DK 00729500
* 3270 DEVICE CHARACTERISTICS - CODE '08C' FOR ANYBODY HRC072DK 00729520
*--------------------------------------------------------------HRC072DK 00729540
HVC3270 EQU * HRC072DK 00729560
CALL HDKD8CDC Process 3270 dev characteristics HRC072DK 00729580
B HVCEXIT Exit to dispatcher HRC072DK 00729600
EJECT 00730000
HVCGRAF L R1,0(R6) GET DEVICE ADDRESS @V200730 00731000
CALL DMKSCNVU FIND CONTROL BLOKS @V200730 00732000
BNZ HVCDTC3 NOT FOUND @V200730 00733000
L R14,DMKHVCDI GET COUNT OF DIAGNOSE I/O'S @VA05513 00733250
A R14,F1 INCREMENT BY ONE @VA05513 00733500
ST R14,DMKHVCDI RESTORE UPDATED COUNT @VA05513 00733750
L R5,0(R5) GET CCW ADDRESS IN R5 @V200730 00734000
GOTO DMKVSIEX PROCESS @VA05037 00735000
EJECT 00736000
*---------------------------------------------------------------------* 00737000
* EDIT MESSAGE ACCORDING TO EMSG SETTING - CODE '05C' FOR ANYBODY * 00738000
*---------------------------------------------------------------------* 00739000
HVCEMSG EQU * @VA01388 00740000
L R2,0(,R6) GET MSG LENGTH @VA01388 00741000
TM VMMLEVEL,VMMCODE+VMMTEXT TEST EMSG SETTING @VA01388 00742000
BZ EMSGOFF EMSG OFF - SEND NO MSG @VA01388 00743000
BO EMSGLAST EMSG ON - SEND ENTIRE MSG @VA01388 00744000
TM VMMLEVEL,VMMCODE CODE ONLY? @VA01388 00745000
BO EMSGCODE YES, BRANCH @VA01388 00746000
S R2,=F'11' GET LENGTH OF TEXT ONLY @VA01388 00747000
BNP EMSGOFF NOTHING BUT A CODE @VA01388 00748000
L R1,0(,R5) GET MSG ADDRESS @VA01388 00749000
LA R1,11(,R1) POINT TO TEXT PART OF MSG @VA01388 00750000
ST R1,0(,R5) GIVE TEXT ADDRESS BACK TO USER @VA01388 00751000
B EMSGLAST IN HIS 'R1' @VA01388 00752000
EMSGOFF SR R2,R2 ZERO LENGTH @VA01388 00753000
B EMSGLAST @VA01388 00754000
EMSGCODE LA R2,10 LENGTH FOR CODE ONLY @VA01388 00755000
EMSGLAST ST R2,0(,R6) GIVE PROPER LENGTH BACK TO USER @VA01388 00756000
B HVCEXIT IN HIS 'R2' @VA01388 00757000
SPACE 1 00758000
*---------------------------------------------------------------------* 00759000
* RETURN VIRTUAL STORAGE SIZE - CODE '060' FOR ANYBODY * 00760000
*---------------------------------------------------------------------* 00761000
HVCSTOR L R1,VMSTOR PASS VIRTUAL MEMORY SIZE @V304635 00762000
ST R1,0(,R5) BACK IN USER'S R1 REGISTER. @V304635 00763000
B HVCEXIT NOW RETURN TO USER. @V304635 00764000
SPACE 1 00765000
*---------------------------------------------------------------------* 00766000
* LOADSYS-PURGESYS-LOADSYS FOR ANYBODY - CODE '064' 00767000
*---------------------------------------------------------------------* 00768000
HVCSYS L R1,0(,R5) GET ADDRESS OF DATA FIELD @V304635 00769000
LRA R1,0(,R1) CHECK IF VALID VIRTUAL ADDR. @V304635 00770000
BC 8+2,HVCSYS1 IF IT'S NOT A SEG EXCEPTION @V408246 00771100
* CONTINUE 00771300
L R1,0(,R5) RESTORE R1 FOR CALL TO PTRAN @V408246 00771500
CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 00771700
BC 2,ADDRERR ADDRESSING PROBLEM @V408246 00771900
HVCSYS1 DS 0H @V408246 00772100
L R3,0(,R6) GET CODE FUNCTION BYTE @V304635 00773000
CL R3,=F'12' MUST NOT BE GREATER THAN 12 @V304635 00774000
BH SPECERR IF IT IS - HE GETS SPEC. CHECK @V304635 00775000
TM 3(R6),X'03' MUST BE A MULTIPLE OF 4 @V304635 00776000
BNZ SPECERR ERROR IF IT ISN'T. @V304635 00777000
TM 3(R5),X'07' MUST BE ON DOUBLE-WORD BOUND. @V304635 00778000
BNZ SPECERR ERROR IF IT ISN'T @V304635 00779000
L R1,0(,R5) GET ADDRESS OF NAMED SYSTEM @V304635 00780000
TRANS 2,1,OPT=(BRING,DEFER) GET VIRTUAL PAGE @V304635 00781000
NI VMPSW+4,X'CF' SET CONDITION CODE TO ZERO @V304635 00782000
NI VMPSW+2,X'CF' ALSO SAME FOR EXTENDED MODE PSW @V304635 00783000
LM R1,R2,0(R2) GET NAME OF NAMED SYSTEM @V304635 00784000
CALL DMKCFGCL CALL LOADSYS PROCESSOR @V304635 00785000
B HVCEXIT RETURN TO DISPATCHER. @V304635 00786000
*---------------------------------------------------------------------* 00786010
* CALL DMKSSS TO PROCESS AN MSS REQUEST - CODE '078' * 00786020
*---------------------------------------------------------------------* 00786030
HVCMSS DS 0H @VA11354 00786041
ICM R15,15,=A(DMKSSSHV) PICK UP THE ADCON @VA11354 00786042
BZ PROTERR THE MODULE ISNT HERE @VA11354 00786043
L R1,0(,R5) GET BUFFER ADDRESS @VA11354 00786044
LA R2,MSSSIZE*8 GET LENGTH INTO R2 @VA11354 00786045
LA R9,SPECERR IF BAD GIVE SPEC CHECK @VA11354 00786046
BAL R10,ADDCHEK GO CHECK FOR PAGE BOUNDARY CROSS @VA11354 00786047
CALL DMKSSSHV @V60B6B8 00786050
B HVCEXIT RETURN TO ISSUER OF DIAGNOSE @V60B6B8 00786060
EJECT 00787000
* STARTING ADDRESSES AND LENGTH PASSED IN R1 & R2 00787100
* REGISTERS USED: R0, R13, R14, AND R15 00787300
ADDCHEK EQU * EXAMINE ADDRESS FOR VALIDITY 00788000
LA R1,0(,R1) 24 BITS ONLY 00789000
LRA R0,0(,R1) VALID START ADDRESS ? @V304635 00790000
BC 8+2,ADDCHEK1 IF IT'S NOT SEG EXCEPTION @V408246 00791100
* CONTINUE 00791200
LR R0,R2 SAVE R2 ACCROSS CALL TO PTRAN @V408246 00791300
CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 00791400
BC 2,ADDRERR ADDRESSING ERROR @V408246 00791500
LR R2,R0 RESTORE R2 @V408246 00791600
ADDCHEK1 DS 0H @V408246 00791700
LA R14,0(R2,R1) R2 CONTAINS FIELD LENGTH 00792000
BCTR R14,0 BACK UP TO LAST BYTE OF FIELD 00793000
L R15,XPAGNUM PAGE NUMBER MASK 00794000
NR R14,R15 ENDING PAGE ADDRESS 00795000
LRA R0,0(,R14) IS ENDING ADDRESS VALID ? @V304635 00796000
BC 8+2,ADDCHEK2 IF IT'S NOT SEG EXCEPTION @V408246 00797010
* CONTINUE 00797060
LR R13,R1 SAVE STARTING ADDRESS @V408246 00797110
LR R0,R2 SAVE R2 FOR CALL TO PTRAN @V408246 00797160
LR R1,R14 VIRT ADDR INTO R1 FOR PTRAN @V408246 00797210
CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 00797260
BC 2,ADDRERR ADDRESSING PROBLEM @V408246 00797310
LR R1,R13 RESTORE STARTING ADDRESS @V408246 00797360
LR R2,R0 RESTORE LENGTH @V408246 00797410
B ADDCHEK1 TRY AGAIN @V408246 00797460
ADDCHEK2 DS 0H @V408246 00797510
NR R15,R1 STARTING PAGE ADDRESS 00798000
CLR R14,R15 CHECK FOR PAGE BOUNDARY CROSSING 00799000
BCR 7,R9 YUP -- TAKE THE GR9 EXIT 00800000
BR R10 RETURN - EVERYTHING IS O.K. 00801000
EJECT 00804000
*---------------------------------------------------------------------* 00805000
* DYNAMIC CCW MODIFICATION - CODE '028' FOR ANYBODY * 00806000
* 'R1' = ADDRESS OF MODIFIED 'TIC' CCW * 00807000
* 'R2' = ADDRESS OF THE AFFECTED VIRTUAL DEVICE * 00808000
*---------------------------------------------------------------------* 00809000
HVCDCPM EQU * @V1D0631 00810000
USING IOBLOK,R9 @VA10860 00811100
USING VDEVBLOK,R13 @VA10860 00812100
USING RCWTASK,R7 @VA10860 00813100
NI VMPSW+2,X'FF'-X'30' SET CC TO 0 @VA10860 00814100
NI VMPSW+4,X'FF'-X'30' SET CC TO 0 @VA10860 00815100
CR R5,R6 RX SAME AS RY @VA10860 00816100
BE ERROR1 YES @VA10860 00817100
TM 3(R5),X'07' DW ALIGNED ? @VA10860 00818100
BNZ ERROR4 NO @VA10860 00819100
L R4,0(0,R5) CONTENTS OF RX, CCW ADDRESS @VA10860 00820100
L R1,0(0,R6) CONTENTS OF RY, DEV ADDRESS @VA10860 00821100
CALL DMKSCNVU FIND VDEVBLOK @VA10860 00822100
BNZ ERROR2 VDEVBLOK NOT FOUND @VA10860 00823100
LR R13,R8 VDEVBLOK IN R13 @VA10860 00824100
LA R1,0(R4) CCW ADDRESS LESS 1ST BYTE @VA10860 00825100
TRANS 2,1,OPT=(BRING,DEFER),ADEX=ERROR3 @VA10860 00826100
CLI 0(R2),X'03' NOOP ? @VA10860 00827100
BE NOOP YES @VA10860 00828100
TM 0(R2),X'08' TIC ? @VA10860 00829100
BZ ERROR6 NO @VA10860 00830100
TM 0(R2),X'07' TIC ? @VA10860 00831100
BNZ ERROR6 NO @VA10860 00832100
NOOP EQU * @VA10860 00833100
ICM R9,B'1111',VDEVIOB OLD IOBLOK @VA10860 00834100
BZ ERROR9 ISIN'T THERE @VA10860 00835100
ICM R7,B'0111',IOBCAW+1 ADDRESS OF CCW'S @VA10860 00836100
BZ RETURNC NO CCW'S NOT A SIO @VA10860 00837100
SL R7,F16 BEGINNING OF RCWTASK @VA10860 00838100
CLC RCWHEAD,FFS RCWTASK ? @VA10860 00839100
BNE RETURNC NO @VA10860 00840100
CLC RCWRCNT,ZEROES DMKCCW DO TRANSLATION YET ? @VA10860 00841100
BE RETURNC NO, HE WILL @VA10860 00842100
LR R5,R7 PRESERVE 1ST OLD RCWTASK @VA10860 00843100
SR R10,R10 @VA10860 00844100
FINDRCW EQU * @VA10860 00845100
L R6,RCWVCAW VIRTUAL,CCW ADDRESS @VA10860 00846100
CR R1,R6 BELOW THIS RCW @VA10860 00847100
BL NEXTRCW YES, NEXT RCW @VA10860 00848100
LH R0,RCWVCNT VIRTUAL CCW COUNT @VA10860 00849100
SLL R0,3 CONVERT TO BYTES @VA10860 00850100
AR R6,R0 END OF VIRTUAL CCW'S @VA10860 00851100
CR R1,R6 ABOVE THIS RCW ? @VA10860 00852100
BNL NEXTRCW YES, NEXT @VA10860 00853100
LR R10,R7 FOUND RCW @VA10860 00854100
NEXTRCW EQU * @VA10860 00855100
L R7,RCWPNT NEXT RCW @VA10860 00856100
LTR R7,R7 END OF RCW'S ? @VA10860 00857100
BNZ FINDRCW NO, KEEP LOOKING @VA10860 00858100
LTR R10,R10 FIND RCW ? @VA10860 00859100
BZ ERROR5 NO @VA10860 00860100
LR R7,R10 OLD RCW WITH MODIFIED CCW @VA10860 00861100
LA R3,RCWCCW START OF REAL CCW'S @VA10860 00862100
L R6,RCWVCAW START OF VIRTUAL CCW'S @VA10860 00863100
LH R0,RCWVCNT COUNT OF VIRTUAL CCW'S @VA10860 00864100
CH R0,RCWRCNT VIRTUAL COUNT=REAL COUNT @VA10860 00865100
BNE CPGEN NO, MUST BE CP GEN. CCW'S @VA10860 00866100
LR R8,R1 VIRTUAL CCW ADDRESS @VA10860 00867100
SR R8,R6 R8=DISPLACEMENT TO CCW @VA10860 00868100
AR R3,R8 DISPL + START =REAL CCW ADDRESS @VA10860 00869100
B FOUNDCCW @VA10860 00870100
CPGEN EQU * @VA10860 00871100
LA R0,8 @VA10860 00872100
FINDCCW EQU * @VA10860 00873100
TM RCWCTL-RCWCCW(R3),RCWGEN CP GENERATED ? @VA10860 00874100
BO BUMPREAL YES, NEXT REAL CCW @VA10860 00875100
CLR R1,R6 THIS CCW ? @VA10860 00876100
BE FOUNDCCW YES @VA10860 00877100
ALR R6,R0 NEXT VIRTUAL CCW @VA10860 00878100
BUMPREAL EQU * @VA10860 00879100
ALR R3,R0 NEXT REAL CCW @VA10860 00880100
B FINDCCW LOOP @VA10860 00881100
FOUNDCCW EQU * @VA10860 00882100
CLI 0(R3),X'03' REAL A NOOP ? @VA10860 00883100
BE NOOPCCW YES @VA10860 00884100
TM 0(R3),X'08' REAL A TIC ? @VA10860 00885100
BZ ERROR6 NO @VA10860 00886100
TM 0(R3),X'07' REAL A TIC ? @VA10860 00887100
BNZ ERROR6 NO @VA10860 00888100
NOOPCCW EQU * @VA10860 00889100
CLI 0(R2),X'03' VIRTUAL CCW NOOP ? @VA10860 00890100
BNE TICCHECK NO, MUST BE TIC @VA10860 00891100
BAL R14,TESTCSW TEST FOR I/O END @VA10860 00892100
LM R7,R8,0(R2) GET NOOP CCW @VA10860 00893100
STM R7,R8,0(R3) STORE NOOP CCW WE COULD GET CPC @VA10860 00894100
* IF CHANNEL FETCHES AS WE STORE 00895100
MVI 5(R3),X'00' ZERO DMKCCW'S FLAG BYTE @VA10860 00896100
B RETURNC DONE @VA10860 00897100
TICCHECK EQU * @VA10860 00898100
TM 3(R2),X'07' TIC TO ADDRESS DW ALIGNED ? @VA10860 00899100
BNZ ERROR8 NO @VA10860 00900100
LR R6,R2 PRESERVE REAL ADDR VIRT CCW @VA10860 00901100
ICM R2,B'0111',1(R6) TIC TO ADDRESS @VA10860 00902100
LRA R1,0(R2) IN USER CORE ? @VA10860 00903100
BC 2,ERROR7 NO @VA10860 00904100
LA R0,IOBSIZE @VA10860 00905100
CALL DMKFREE @VA10860 00906100
ICM R9,B'1111',VDEVIOB GET OLD IOB @VA10860 00907100
BZ FRTIOB TO LATE @VA10860 00908100
TM IOBCSW+4,CE+DE+UC+UE ENDING STATUS ? @VA10860 00909100
BNZ FRTIOB TO LATE @VA10860 00910100
TM IOBCSW+5,255-(IL+PCI) @VA10860 00911100
BNZ FRTIOB TO LATE @VA10860 00912100
MVC 0(IOBSIZE*8,R1),IOBLOK COPY OLD @VA10860 00913100
ST R2,IOBCAW-IOBLOK(0,R1) POIT TO NEW CCW'S @VA10860 00914100
ICM R2,B'1000',IOBCAW ADD 1ST BYTE @VA10860 00915100
LA R9,0(R2) DMKCCWTR REG9 @VA10860 00916100
LR R8,R13 VDEVBLOK @VA10860 00917100
SL R8,VMDVSTRT DMKCCWTR REG8 @VA10860 00918100
LR R10,R1 DMKCCWTR REG10 @VA10860 00919100
CALL DMKCCWTR TRANSLATE NEW CH PROGRAM @VA10860 00920100
L R8,IOBCAW-IOBLOK(0,R10) NEW CAW @VA10860 00921100
LA R8,0(R8) LESS 1ST BYTE @VA10860 00922100
SL R8,F16 NEW RCW ADDRESS @VA10860 00923100
NEXTOLD EQU * @VA10860 00924100
L R5,RCWPNT NEXT @VA10860 00925100
LTR R5,R5 LAST OLD RCW ? @VA10860 00926100
BZ TICCHAIN YES @VA10860 00927100
LR R7,R5 NEXT @VA10860 00928100
B NEXTOLD LOOP @VA10860 00929100
TICCHAIN EQU * @VA10860 00930100
ICM R9,B'1111',VDEVIOB @VA10860 00931100
BZ CSWIORCW @VA10860 00932100
TM IOBCSW+4,CE+DE ENDING STATUS ? @VA10860 00933100
BNZ CSWIORCW TO LATE @VA10860 00934100
TM IOBCSW+5,PRGC+PRTC+CCC+CDC+IFCC+CHC END STATUS? @VA10860 00935100
BNZ CSWIORCW TO LATE @VA10860 00936100
ST R8,RCWPNT CHAIN IN NEW RCW'S @VA10860 00937100
AL R8,F16 POINT TO CCW'S @VA10860 00938100
STCM R8,B'0111',1(R3) ADDRESS IN TIC @VA10860 00939100
MVI 0(R3),X'08' MAKE SURE CCW IS TIC @VA10860 00940100
LA R0,IOBSIZE @VA10860 00943100
CALL DMKFRET @VA10860 00944100
RETURNC EQU * @VA10860 00945100
SR R15,R15 ZERO @VA10860 00946100
CLI CPUID,X'FF' RUNNING SECOND LEVEL?? @VA11698 00947000
BE DIAGNOSE YES, ISSUE DIAGNOSE TO 1ST LEVEL @VA11698 00947100
R15SET EQU * @VA10860 00949100
ST R15,VMGPRS+4*R15 RETURN CODE @VA10860 00950100
B HVCEXIT @VA10860 00951100
DROP R7 @VA10860 00952100
EJECT 00953100
DIAGNOSE EQU * @V1D0631 00989000
BAL R14,TESTCSW GO TEST FOR CHANNEL OR DEVICE END@V1D0631 00990000
LH R6,IOBRADD GET DEVICE ADDRESS @VA11698 00991100
DC X'83360028' ISSUE DIAGNOSE TO CP @VA11698 00992100
BZ R15SET GO SAVE THE RETURN CODE @V1D0631 00993000
BC 2,SETCC2 GO SET CONDITION CODE TWO @V1D0631 00994000
SETCC1 EQU * @V1D0631 00995000
LA R2,X'10' SET CONDITION CODE 1 @V1D0631 00996000
SETCCODE EQU * @V1D0631 00997000
LA R1,VMPSW+4 GET THE BC PSW CONDITION CODE @V1D0631 00998000
* FIELD 00999000
TM VMESTAT,VMEXTCM IS THIS IN EC MODE ? @V1D0631 01000000
BZ NOECMODE NO, GO SET CONDITION CODE @V1D0631 01001000
LA R1,VMPSW+2 GET THE EC PSW CONDITION CODE @V1D0631 01002000
* FIELD 01003000
NOECMODE EQU * @V1D0631 01004000
EX R2,HSETCC SET CONDITION CODE @V1D0631 01005000
B R15SET GO SET THE RETURN CODE @V1D0631 01006000
HSETCC EQU * @V1D0631 01007000
OI 0(R1),*-* SET THE CONDITION CODE @V1D0631 01008000
ERROR1 EQU * @V1D0631 01009000
LA R15,1 'R1' AND 'R2' REGISTERS ARE THE @V1D0631 01010000
* SAME 01011000
B SETCC1 GO SET CONDITION CODE 1 @V1D0631 01012000
ERROR2 EQU * @V1D0631 01013000
LA R15,2 DEVICE SPECIFIED BY 'R2' @V1D0631 01014000
* REGISTER WAS 01015000
* NOT FOUND 01016000
B SETCC1 GO SET CONDITION CODE 1 @V1D0631 01017000
ERROR3 EQU * @V1D0631 01018000
LA R15,3 ADDRESS GIVEN BY 'R1' REGISTER @V1D0631 01019000
* WAS NOT 01020000
* WITHIN USER'S STORAGE SPACE 01021000
B SETCC1 GO SET CONDITION CODE 1 @V1D0631 01022000
ERROR4 EQU * @V1D0631 01023000
LA R15,4 ADDRESS GIVEN BY 'R1' REGISTER @V1D0631 01024000
* WAS NOT 01025000
* DOUBLE-WORD ALIGNED. 01026000
B SETCC1 GO SET CONDITION CODE 1 @V1D0631 01027000
ERROR5 EQU * @V1D0631 01028000
LA R15,5 CCW STRING CORRESPONDING TO @V1D0631 01029000
* 'R2' DEVICE 01030000
* AND 'R1' ADDRESS WAS NOT FOUND 01031000
B SETCC1 GO SET CONDITION CODE 1 @V1D0631 01032000
ERROR6 EQU * @V1D0631 01033000
LA R15,6 CCW AT ADDRESS SPECIFIED BY @V1D0631 01034000
* 'R1' IS 01035000
* NOT A TIC OR A NO-OP CCW 01036000
B SETCC1 GO SET CONDITION CODE 1 @V1D0631 01037000
ERROR7 EQU * @V1D0631 01038000
LA R15,7 NEW ADDRESS IN TIC IS NOT @V1D0631 01039000
* WITHIN USER'S 01040000
* STORAGE SPACE 01041000
B SETCC1 GO SET CONDITION CODE 1 @V1D0631 01042000
ERROR8 EQU * @V1D0631 01043000
LA R15,8 NEW ADDRESS IN TIC IS NOT @V1D0631 01044000
* DOUBLE-WORD 01045000
* ALIGNED 01046000
B SETCC1 GO SET CONDITION CODE 1 @V1D0631 01047000
CSWIORCW EQU * @V1D0631 01048000
LR R8,R13 VDEVBLOK FOR DMKUNTFR @VA10860 01048500
CALL DMKUNTFR GO RELEASE RCWTASKS @V1D0631 01049000
FRTIOB LA R0,IOBSIZE GET THE SIZE OF IOB @VA03292 01050000
CALL DMKFRET GO RELEASE SPACE FOR IOBLOK @V1D0631 01051000
ERROR9 EQU * @V1D0631 01052000
LA R15,9 TOO LATE TO CHANGE THE CCW STRING@V1D0631 01053000
* (CHANNEL END OR DEVICE END HAS 01054000
* ALREADY OCCURRED) 01055000
SETCC2 EQU * @V1D0631 01056000
LA R2,X'20' SET CONDITION CODE TO 2 @V1D0631 01057000
B SETCCODE GO SET CONDITION CODE @V1D0631 01058000
SPACE 2 01059000
TESTCSW EQU * @V1D0631 01060000
ICM R9,15,VDEVIOB GET THE ADDRESS OF THE IOBLOK @V1D0631 01061000
BZ ERROR9 IF ADDRESS IS ZERO, GO SET RETURN@V1D0631 01062000
* CODE TO 9 01063000
TM IOBCSW+4,CE+DE IS THIS CHANNEL OR DEVICE END ? @V1D0631 01064000
BNZ ERROR9 YES, GO SET RETURN CODE TO 9 @V1D0631 01065000
TM IOBCSW+5,PRGC+PRTC+CCC+CDC+IFCC+CHC ARE STATUS @V1D0631 01066000
* FLAGS ON 01067000
BNZ ERROR9 YES, GO SET RETURN CODE 9 @V1D0631 01068000
BR R14 RETURN TO IN LINE CODE @V1D0631 01069000
DROP R9,R13 DROP BASE REG. FOR IOBLOK & @V1D0631 01070000
* VDEVBLOK 01071000
SPACE 4 01072000
SPECERR EQU * @V1D0631 01073000
LA R0,X'06' INTERRUPT CODE 01074000
B PROGINT 01075000
SPACE 01076000
ADDRERR EQU * REFLECT ADDRESSING ERROR 01077000
LA R0,X'05' INTERRUPT CODE 01078000
B PROGINT 01079000
SPACE 01080000
PROTERR EQU * REFLECT PROTECTION CHECK 01081000
LA R0,X'04' INTERRUPT CODE 01082000
B PROGINT 01083000
SPACE 01084000
PRIVLGD EQU * REFLECT PRIVILEGED OPERATION 01085000
LA R0,X'02' INTERRUPT CODE 01086000
SPACE 01087000
PROGINT EQU * 01088000
GOTO DMKPRGSM SIMULATE PROGRAM INTERRUPT 01089000
EJECT 01090000
DMKHVCPC DS 0D PAGES PER CYLINDER - PAGING + SPOOLING 01131000
DC AL1(24) REC/CYL 2305-1 (SAME AS 2305-2) @V200538 01132000
DC AL1(24) 2305-2 01133000
DC AL1(57) 3330 01134000
DC AL1(57) 3330-11 (SAME AS 3330) @V200538 01135000
DC AL1(120) PAGE LIMIT FOR 3350 @V304498 01136000
DC AL1(32) 2314, 2319 01137000
DC AL1(24) PAGE LIMIT FOR 3340 (35MB) @V2A2029 01138000
DC AL1(24) PAGE LIMIT FOR 3340 (70MB) @V2A2029 01139000
SPACE 2 01140000
DMKHVCDI DC F'0' COUNT OF DIAGNOSE I/O'S 01141000
LTORG 01142000
EJECT 01143000
COPY EQU 01144000
COPY VMBLOK 01145000
COPY IOBLOKS (R9) @V1D0631 01146000
PSA 01147000
COPY UDIRECT 01148000
COPY ACCOUNT 01149000
COPY RBLOKS 01150000
COPY VBLOKS 01151000
COPY DEVTYPES 01152000
EJECT 01153000
COPY NETWORK @VA03785 01154000
COPY VMCBLOKS @V387045 01154500
OSVSCOM MSSCOM @VA11354 01154550
END DMKHVCAL 01155000