Index of /pdf/dec/vax/vms/training
EY-2278E-MM-0001 LISTINGS BOOK Prepared by Educational Services of Digital Equipment Corporation First Edition, October 1984 Copyright© 1984 by Digital Equipment Corporation All Rights Reserved The reproduction of this material, in part or whole, is strictly prohibited. For copy information, contact the Educational Services Department, Digital Equipment Corporation, Bedford, Massachusetts 01730. Printed in U.S.A. The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may not be used or copied except in accordance with the terms of such license. Digital Equipment Corporation assumes no responsibility for the use or reliability of its software on equipment that is not supplied by Digital. The manuscript for this book was created using DIGITAL Standard Runoff. Book production was done by Educational Services Development and Publishing in Nashua, NH. The following are trademarks of Digital Equipment Corporation: ~n~oomoTM DATATRIEVE DEC DE Cm ate DECnet DEC set DECsystem-10 DECSYSTEM-20 DECtape DECUS DECwriter DIBOL MASS BUS PDP P/OS Professional Rainbow RSTS RSX UNIBUS VAX VMS VT Work Processor APPENDIX Supplemental Listings The following listings are provided for your reference. Some are executive source modules. Others are solutions to Module Test problems. Executive Source Modules 1. CRDRIVER - Card Reader Driver 2. SYSQIOREQ - $QIO System Service Procedure 3. SYSQIOFDT - System $QIO FDT Routines 4. IOSUBNPAG - Nonpaged 1/0 Subroutines 5. FORKCNTRL - Fork Process Dispatcher 6. INITADP - UNIBUS Adapter Initialization Routines only (entry INI$UBADP) 7. LIOSUB780 - Purge Data Path Routine 8. LOADMREG - Load Mapping Registers Routines 9. IOCIOPOST - 1/0 Post-Processing Routines 10. COMDRVSUB - Communication Routines Solutions to Module Test Problems l . PCDRIVER.LIS PCDRIVER.COM PCDRIVER.OPT LOADER.COM READV. F'OR RANDWV.FOR MODE.FOR PCll Reader/Punch Driver Assembles and Links Driver Used for Linking Driver Loads Driver and Connects Units Test Program Test Prograra Test Program 2. ACPMNT.LIS ACPMNT.COM PCACP.LIS PCACP.COM PCDMT.LIS PCDMT.COM TESTPROG.FOR Mount Image for ACP Assembles and Links Mount Image PCll ACP Assembles and Links ACP Dismount Image for ACP Assembles and Links Dismount Image Test Program 3. PCDRIVER.LIS PCDRIVER.COM PCDRIVER.OPT PC LOAD.COM ATTN .FOR Set Attention PCll Driver Assembles and Links Driver Used for Linking Driver Loads Driver and Connects Units Test Program -- Controls PCll 4. PRINTER.LIS PRINTER.COM CINLOAD.COM Connect to Interrupt Example Assembles and Links Program Connects Printer with Connect to Interrupt Driver CRDRIVER CRDRIVER Table of co~tents ( 1) 686 ( 1) 724 ( 1) 752 ( 1) 824 ( 1) 1007 ( 1) 1063 ( 1) 1085 - CR11 CARD READER DRIVER CRll FUNCTION DECISION TABLE CANCEL I/O ON CHANNEL READ FUNCTION PROCESSING START I/O OPERATION ON CR11 CARD ReADER CRll CARD READER INTDERRUPTS CARD READER INITIALIZATION CARD READER UNIT INITIALIZATION 3-JUN-1984 11:02:03 VAX-11 Macro V03-0l Page 0 CRDRIVER V03-002 ;EMD0087 -1 ;EMD0087 ;EMD0087 ;EMD0087 ;EMD0087 ;EMD0087 ;EMD0087 ;EMD0(}87 ;EMD0087 ;EMD0087 -6 KDM0002 EMD0087 EMD0087 KDM0002 2 KDM0002 KDM0002 KDM0002 - CRll CARD READER DRIVER 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 1 10-MAR-1982 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(l) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1 .TITLE CRDRIVER - CRll CARD READER DRIVER .1 .!DENT 'V03-002' 3 4 ; 5 ;**************************************************************************** 6 ;* 7 ;* COPYRIGHT (c) 1978, 1980, 1982 BY 8 ;* DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. * * * 9 ; * ALL RIGHTS RESERVED. * 10 ;* * 11 ;* 12 ;* 13 ;* 14 ;* 15 ;* 16 ;* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED. * * * * * * 17 18 ; ** THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE 19 * AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * * * 20 * CORPORATION. * 21 22 23 * * * DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * * * 24 ; * 25 ;* * * 26 ;**************************************************************************** 27 28 D. N. CUTLER 1-SEP-77 29 .1 MODIFICATION HISTORY: . 2 .3 V03-002 EMD0087 Ellen M. Dusseault 30-Apr-1984 .4 Add DEV$M NNM characteristic to DEVCHAR2 so that these .5 devices wTl l have the "node$" prefix. .6 . 7 V03-001 KDM0002 Kathleen D. Morse 28-Jun-1982 . 8 Added $DVNDEF, $SSDEF, $DCDEF, and $PRDEF. .9 36 37 MACRO LIBRARY CALLS 38 39 40 $CRBDEF ;DEFINE CRB OFFSETS 41 $CRDEF ;DEFINE CARD READER STATUS BITS .1 $DCDEF ;DEFINE ADAPTER TYPES . 2 $DDBDEF ;DEFINE DOB OFFSETS .3 $DPTDEF ;DEFINE DPT OFFSETS .4 $DYNDEF ;DEFINE DYNAMIC DATA STRUCTURE TYPES 44 $IDBDEF ;DEFINE IDB OFFSETS 45 $IODEF ;DEFINE I/O FUNCTION CODES 46 $IRPDEF ;DEFINE IRP OFFSETS 47 $JIBDEF ;DEFINE JIB OFFSETS 48 $MSGDEF ;DEFINE SYSTEM MESSAGE TYPES 49 $PCBDEF ;DEFINE PCB OFFSETS .1 $PRDEF ;DEFINE PROCESSOR REGISTERS . 2 $UCBDEF ;DEFINE UCB OFFSETS .3 $SSDEF ;DEFINE STATUS CODES CRDRIVER V03-002 -1 - CR11 CARD READER DRIVER 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 2 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) 00000000 00000004 00000008 oooooooc 00000010 00000014 OOOOOFOF 000008A2 OOOOOAAA 00000090 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0004 0006 0006 0000 0000 0000 0000 0000 0000 0000 0000 51 $VECDEF ;DEFINE VEC OFFSETS 52 53 54 LOCAL SYMBOLS 55 56 ARGUMENT LIST OFFSET DEFINITIONS 57 58 59 Pl=O FIRST FUNCTION DEPENDENT PARAMETER 60 P2=4 SECOND FUNCTION DEPENDENT PARAMETER 61 P3=8 THIRD FUNCTION DEPENDENT PARAMETER 62 P4=12 FOURTH FUNCTION DEPENDENT PARAMETER 63 P5=16 FIFTH FUNCTION DEPENDENT PARAMETER 64 P6=20 SIZTH FUNCTION DEPENDENT PARAMETER 65 66 67 ; SPECIAL CARD COLUMN PATTERNS 68 69 70 CR EOF=AB111100001111 END OF FILE (12-11-0-1-6-7-8-9) 71 CR-026=AB100010100010 TRANSLATE 026 CARD CODE (12-2-4-8) 72 CR=029=AB101010101010 TRANSLATE 029 CARD CODE (12-0-2-4-6-8) 73 74 75 CR11 CONTROLLER REGISTER OFFSET DEFINITIONS 76 77 78 $DEFINI CR 79 80 $DEF CR CSR .BLKW ;CONTROL STATUS REGISTER 81 _VIELD CR CSR,O,<- CONTROL STATUS REGISTER FIELD DEFINITIONS 82 <READ, ,M> ,- READ CARD 83 <EJECT, ,M>,-. EJECT CARD 84 <,4>,- RESERVED BITS 85 <IE, ,M>,- INTERRUPT ENABLE 86 <CLDONE, , M>, - COLUMN DONE 87 <OFFLIN, ,M>,- READER OFF LI NE 88 <BUSY,, M>, - CARD BEING READ 89 <ONLINE, , M>, - READER ONLINE 90 <TIMERR,,M>,- TIMING ERROR 91 <MCHECK, ,M>,- MOTION CHECK 92 <HCHECK, ,M>,- HOPPER CHECK 93 <CRDONE, ,M> ,- CARO DONE 94 <ERROR, , M>, - ERROR CONDITION 95 > 96 $DEF CR CRB1 .BLKW ;CARD READ DATA BUFFER 1 (BINARY) 97 $DEF CR-CRB2 .BLKW ;CARD READ DATA BUFFER 2 (PACKED) 98 99 $DEFEND CR 100 101 102 DEFINE DEVICE DEPENDENT UNIT CONTROL BLOCK OFFSETS 103 104 105 $DEFINI UCB 106 107 .=UCB$K_LENGTH CRDRIVER V03-002 ;EMDa087 ;EMD0087 - CR11 CARD READER DRIVER 3-JUN-1984 11 :02:03 VAX-11 Macro V03-01 Page 3 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) 00000098 0090 0090 0091 oa92 aa93 0094 oa96 oa98 0098 a098 0098 ooao 0000 0000 0000 0000 0000 0000 0000 0000 aooa 0000 oooa aa38 0038 003C 003C 003C 003C oa43 0043 004A 004E 0052 0057 005E 0062 0062 0067 Oa6C 0071 0076 oooa 0000 0000 0000 0000 0000 0000 0000 0000 0000 ooao 0000 0000 aa38 aa38 108 109 $DEF UCB$B CR COLCNT .BLKB CURRENT COLUMN COUNT 11a $DEF UCB$B-CR-EOFCNT .BLKB END OF FILE PUNCH COUNT 111 $DEF UCB$B-CR-EOFCOL .BLKB NUMBER OF END OF FILE PUNCHES REQUIRED 112 $DEF UCB$B-CR-OFLCNT .BLKB OFFLINE TIME COUNTER 113 $DEF UCB$W-CR-FSTCOL .BLKW FIRST COLUMN BINARY DATA 114 $DEF UCB$W=CR=CSR .BLKW SAVED FINAL CONTROL STATUS REGISTER 115 116 UCB$K_CR LENGTH=. 117 118 $DEFEND UCB 119 12a 121 LOCAL DATA 122 123 DRIVER PROLOGUE TABLE 124 125 126 DPTAB - DEFINE DRIVER PROLOGUE TABLE 127 END=CR END,- END OF DRIVER 128 ADAPTER=UBA,- ADAPTER TYPE 129 UCBSIZE=UCB$K CR LENGTH, ;UCB SIZE 13a NAME=CRDRIVER- - ;DRIVER NAME 131 DPT STORE INIT ;CONTROL BLOCK INIT VALUES 132 DPT-STORE UCB,UCB$B FIPL,B,8 ;FORK IPL 133 DPT-STORE UCB,UCB$L-DEVCHAR,L,- ;DEVICE CHARACTERISTICS 134 - <DEV$M REC- ; RECORD ORIENTED 135 !DEV$M-AVL- ; AVAILABLE 136 !DEV$M-IDV> ; INPUT DEVICE .1 DPT STORE UCB,UCB$L DEVCHAR2,L,- ; DEVICE CHARACTERISTIC . 2 - <DEV$M NNM> - ; PREFIX WITH "NODE$" 137 DPT STORE UCB,UCB$B DEVCLASS,B,DC$ CARD ;DEVICE CLASS 138 DPT-STORE UCB,UCB$B-DEVTYPE,B,DT$ CR11 ;DEVICE TYPE 139 DPT-STORE UCB,UCB$W-DEVBUFSIZ,W,80 ;DEFAULT BUFFER SIZE 140 DPT-STORE UCB,UCB$L-DEVDEPEND,L,CR$K Ta29 ;DEFAULT TRANSLATION MODE 141 DPT-STORE UCB,UCB$B-DIPL,B,22 ;DEVICE IPL 142 DPT-STORE REINIT - ;CONTROL BLOCK RE-INIT VALUES 143 DPT-STORE CRB,CRB$L INTD+4,D,CR$INT ;INTERRUPT SERVICE ROUTINE ADDRESS 144 DPT=STORE CRB,CRB$L=INTD+VEC$L_INITIAL,D,CR_INITIAL ;CONTROLLER INIT 145 DPT STORE CRB,CRB$L INTD+VEC$L UNITINIT,D,CR CRll !NIT ;UNIT INIT 146 DPT-STORE DDB,DDB$L-DDT,D,CR$DDT ;DDT ADDRESS - 147 DPT-STORE END - 148 149 150 DRIVER DISPATCH TABLE 151 152 153 DDT AB CR.- ;DRIVER DISPATCH TABLE 154 CR STARTIO, - ;START I/O OPERATION 155 0 ':: ;UNSOLICITED INTERRUPT 156 CR FUNCTABLE,- ;FUNCTION DECISION TABLE 157 158 CR-CANCELI 0, - a :: ;CANCEL I/O OPERATION ;REGISTER DUMP ROUTINE 159 a.- ;SIZE OF DIAGNOSTIC BUFFER 160 a ;SIZE OF ERROR LOG BUFFER 161 162 CRDRIVER V03-002 - CR 11 CARD READER DRIVER 0038 0038 0038 0038 20 0038 31 0039 32 003A 33 003B 34 003C 35 003D 36 003E 37 003F 38 0040 60 0041 3A 0042 23 0043 40 0044 27 0045 30 0046 22 0047 39 0048 5C 0049 16 004A 5C 004B 5C 004C 5C 004D 5C 004E 04 004F 5C 0050 5C 0051 5C 0052 5C 0053 14 0054 15 0055 5C 0056 1A 0057 30 0058 2F 0059 53 005A 54 005B 55 005C 56 005D 57 005E 58 005F 59 0060 5C 0061 5C 0062 2C 0063 25 0064 5F 0065 3E 0066 3F 0067 5A 0068 5C 0069 5C 006A 5C 006B SC 006C 163 : 029 CONVERSION TABLE 164 165 166 CR_CVT029: 167 .BYTE AA/ I 168 .BYTE AA I 1 I 169 .BYTE AA/2/ 170 .BYTE AA/3/ 171 .BYTE AA/4/ 172 .BYTE AA/5/ 173 .BYTE AA/6/ 174 .BYTE AA /7 I 175 .BYTE AA/8/ 176 .BYTE AA I ' I 177 .BYTE AA I : I 178 .BYTE /\A/#/ 179 .BYTE AA/@/ 180 .BYTE AA I' I 181 .BYTE AA/=/ 182 .BYTE AA/" I 183 .BYTE AA/9/ 184 .BYTE AA/\/ 185 .BYTE AX16 186 .BYTE AA/\/ 187 .BYTE AA/\/ 188 .BYTE AA/\/ 189 .BYTE AA/\/ 190 .BYTE AX04 191 .BYTE AA/\/ 192 .BYTE AA/\/ 193 .BYTE AA/\/ 194 .BYTE AA/\/ 195 .BYTE AX14 196 .BYTE AX15 197 .BYTE AA/\/ 198 .BYTE AXlA 199 .BYTE J\A/01 200 .BYTE AA\/\ 201 .BYTE AA/S/ 202 .BYTE AA/T/ 203 .BYTE AA/U/ 204 .BYTE AA/V/ 205 .BYTE /\A/WI 206 .BYTE AA/XI 207 .BYTE AA/Y/ 208 .BYTE AA/\/ 209 .BYTE /\A/\/ 210 .BYTE AA/,/ 211 .BYTE AA/%/ 212 .BYTE AA/ I 213 .BYTE AA/">/ 214 .BYTE AA/? I 215 .BYTE AA/Z/ 216 .BYTE AA/\/ 217 .BYTE AA/\/ 218 .BYTE AA/\/ 219 .BYTE AA/\/ 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 4 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) ;029 TRANSLATE TABLE ; 0 AXOO A0000 ; 1 AX01 /\0001 ; 2 AX02 /\0002 ; 3 AX03 /\0003 ; 4 AX04 /\0004 ; 5 AX05 /\0005 ; 6 AX06 /\0006 ; 7 AX07 /\0007 ; 8 AX08 /\0010 ; 9 AX09 A0011 ; 10 AXOA /\0012 ; 1·1 AXOB /\0013 ; 12 AXOC /\0014 ; 13 AXOD /\0015 ; 14 AXOE /\0016 ; 15 AXOF /\0017 ; 16 AX10 /\Q020 ; 17 AX 11 /\Q021 ; 18 AX12 /\Q022 ; 19 AX13 /\0023 ; 20 AX14 /\0024 ; 21 AX 15 /\0025 ; 22 AX16 /\0026 ; 23 AX17 /\0027 ; 24 AX18 /\Q030 ; 25 AX19 /\0031 ; 26 AXlA /\Q032 ; 27 AX1B /\0033 ; 28 AX1C /\0034 ; 29 AXlD /\Q035 ; 30 AX1E /\0036 ; 31 AXlF /\Q037 ; 32 AX20 /\0040 ; 33 AX21 /\0041 ; 34 AX22 /\Q042 ; 35 AX23 /\0043 ; 36 AX24 /\0044 ; 37 AX25 /\0045 ; 38 AX26 /\0046 ; 39 AX27 /\0047 ; 40 AX28 /\0050 ; 41 AX29 /\Q051 ; 42 AX2A /\0052 ; 43 AX2B /\0053 ; 44 AX2C /\0054 ; 45 AX2D /\Q055 ; 46 AX2E /\0056 ; 47 AX2F /\0057 ; 48 AX30 /\0060 ; 49 AX31 /\0061 ; 50 AX32 /\0062 ; 51 AX33 /\0063 : 52 AX34 "0064 CRDRIVER V03-002 ~ CR 11 CARD READER DRIVER DA 0060 220 17 006E 221 1B 006F 222 5.C 0070 223 5C 0071 224 5C 0072 225 5C 0073 226 5C 0074 227 05 0075 228 06 0076 229 07 0077 230 2D 0078 231 4A 0079 232 4B 007A 233 4C 007B 234 40 007C 235 4E 0070 236 4F 007E 237 50 007F 238 51 0080 239 5C 0081 240 50 0082 241 24 0083 242 2A 0084 243 29 0085 244 38 0086 245 5E 0087 246 52 0088 247 11 0089 248 12 008A 249 13 0088 250 5C 008C 251 5C 0080 252 08 DOSE 253 5C 008F 254 18 0090 255 19 0091 256 5C 0092 257 5C 0093 258 1c 0094 259 10 0095 260 1E 0096 261 1F 0097 262 70 0098 263 7E 0099 264 73 009A 265 74 009B 266 75 009C 267 76 009D 268 77 009E 269 78 009F 270 79 OOAO 271 5C OOA1 272 5C OOA2 273 5C OOA3 274 5C OOA4 275 5C OOA5 276 .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE AXOA AX17 AX1B AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AX05 AX06 AX07 AA/-/ AA/J/ AA/K/ AA/L/ AA/M/ AA/N/ AA/0/ AA/P/ AA/Q/ AA/\/ AA/] I AA/$/ AA/*/ AA/)/ AA/;/ AA/A/ AA/R/ AX11 AX12 AX13 AA/\/ AA/\/ AX08 AA/\/ AX18 AX19 AA/\/ AA/\/ AX1C AX 1D AX1E AX 1 F AA/}/ AA/-/ AA/s/ AA/t/ AA/u/ AA/v/ AA/w/ AA/x/ AA/y/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ 3-JUN-1984 11: 02: 03 VAX-11 Macro V03-0l Page 5 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) ; 53 ; 54 ; 55 ; 56 ; 57 ; 58 ; 59 ; 60 ; 61 ; 62 ; 63 ; 64 ; 65 ; 66 ; 67 ; 68 ; 69 ; 70 ; 71 ; 72 ; 73 ; 74 ; 75 ; 76 ; 77 ; 78 ; 79 ; 80 ; 81 ; 82 ; 83 ; 84 ; 85 ; 86 ; 87 ; 88 ; 89 ; 90 ; 91 ; 92 ; 93 ; 94 ; 95 ; 96 ; 97 ; 98 ; 99 ; 100 ; 101 ; 102 ; 103 ; 104 ; 105 ; 106 ; 107 ; 108 : 109 AX35 AX36 AX37 AX38 AX39 AX3A AX3B AX3C AX3D AX3E AX3F AX40 AX41 AX42 AX43 AX44 AX45 AX46 AX47 AX48 AX49 AX4A AX48 AX4C AX4D AX4E AX4F AX50 AX51 AX52 AX53 AX54 AX55 AX56 AX57 AX58 AX59 AX5A AX5B AX5C AX5D AX5E AX5F AX60 AX61 AX62 AX63 AX64 AX65 AX66 AX67 AX68 AX69 AX6A AX6B AX6C AX6D AQ065 AQ066 A0067 AQQ70 AQQ71 A0072 A0073 AQQ74 A0075 A0076 AQ077 A0100 A0101 A0102 A01Q3 A0104 AQ105 A0106 AQ1Q7 AQ11 Q AQl 11 AQl 12 AQl 13 AQl 14 AQl 15 AQl 16 A0117 AQ12Q AQ121 A0122 AQ123 AQ124 AQ125 AQ126 AQ127 AQ13Q AO 131 A0132 A0133 A0134 AQ135 /\Q136 /\0137 AQ140 AQ141 AQ142 AQ143 A0144 A0145 A0146 AQ147 AQ150 AQ151 AQ152 A0153 A0154 A0155 CRDRIVER V03-002 - CR 11 CARD READER DRIVER 5C OOA6 277 5C OOA7 278 7A OOA8 279 5C OOA9 280 5C OOAA 281 5C OOAB 282 5C OOAC 283 5C OOAO 284 5C OOAE 285 5C OOAF 286 5C OOBO 287 SC OOBl 288 SC OOB2 289 5C OOB3 290 5C OOB4 291 5C OOB5 292 5C OOB6 293 5C OOB7 294 26 OOB8 295 41 OOB9 296 42 OOBA 297 43 DOBB 298 44 OOBC 299 45 OOBO 300 46 OOBE 301 47 OOBF 302 48 ooco 303 5C OOCl 304 5B OOC2 305 2E OOC3 306 3C OOC4 307 28 OOC5 308 2B OOC6 309 21 OOC7 310 49 DOCS 311 01 OOC9 312 02 OOCA 313 03 OOCB 314 5C oocc 315 09 OOCD 316 5C OOCE 317 FF OOCF 318 5C 0000 319 5C 0001 320 5C 0002 321 OB OOD3 322 QC 0004 323 OD 0005 324 OE 0006 325 OF 0007 326 7B 0008 327 61 0009 328 62 OODA 329 63 0008 330 64 OODC 331 65 0000 332 66 OODE 333 .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYT:= .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .. BYTE .BYTE .BYTE .BYTE .BYTE AA/\/ AA/\/ AA/z/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/&/ AA/A/ AA/B/ AA/C/ AA/0/ AA/E/ AA/F/ AA/G/ AA/H/ AA/\/ /\A/[/ AA/./ AA/</ AA/(/ /\A/+/ AA/! I AA/I/ AXQl /\XQ2 /\X03 AA/\/ AX09 AA/\/ AXFF AA/\/ AA/\/ /\A/\/ AXOB AXOC AXQD AXQE AXOF AA/{/ /\A/a/ AA/b/ AA/c/ /\A/d/ AA/e/ AA/f/ 3-JUN-1984 11:02:03 VAX-11 Macro V03-0l Page 6 10-MAR-1982 20:31:59 DISK$VMSMASTER:[ORIVER.SRC]CRORIVE(l) ; 110 ; 111 ; 112 ; 113 ; 114 ; 11S ; 116 ; 117 ; 118 ; 119 ; 120 ; 121 ; 122 ; 123 ; 124 ; 125 ; 126 ; 127 ; 128 ; 129 ; 130 ; 131 ; 132 ; 133 ; 134 ; 135 ; 136 ; 137 ; 138 ; 139 ; 140 ; 141 ; 142 ; 143 ; 144 j 145 ; 146 j 147 ; 148 j 149 ; 150 ; 151 j 152 ; 153 ; 154 ; 155 ; 156 ; 157 ; 158 ; 159 ; 160 ; 161 ; 162 ; 163 ; 164 ; 165 ; 166 AX6E AX6F AX70 AX71 AX72 AX73 AX74 AX75 AX76 AX77 AX78 AX79 AX7A AX7B AX7C AX70 AX7E AX7F AX80 AX81 AX82 AX83 AX84 AX85 AX86 AX87 AX88 AX89 AX8A AX8B AX8C AX8D AXSE AX8F AX90 AX9 l /\X92 /\X93 AX94 AX95 AX96 AX97 AX98 AX99 AX9A AX9B AX9C AX9D AX9E AX9F /\XAO AXAl AXA2 AXA3 /\X.A4 /\XA5 AXA6 A0156 AQ157 AQ16Q AQ 161 AQ162 AQ163 AQ164 AQ165 A0166 AQ167 AQ17Q AO 171 AQ172 AQ173 AQ174 AQ175 AQ176 AQ177 AQ2QQ AQ2Q1 AQ202 AQ2Q3 AQ204 AQ2Q5 AQ2Q6 AQ2Q7 AQ210 /\Q211 AQ212 AQ213 AQ214 AQ215 /\0216 AQ217 AQ22Q AQ221 AQ222 AQ223 AQ224 AQ225 AQ226 /\0227 AQ23Q AQ231 /\Q232 AQ233 AQ234 AQ235 AQ236 AQ237 /\0240 AQ241 AQ242 AQ243 AQ244 AQ245 /\0246 CRDRIVER V03-002 - CRl 1 CARD READER DRIVER 67 OODF 334 68 DOED 335 SC ODEl 336 5C DOE2 337 SC OOE3 338 SC OOE4 339 SC DOES 34D SC OOE6 341 SC OOE7 342 69 DOE8 343 SC DDE9 344 5C OOEA 345 5C OOEB 346 SC DOEC 347 SC DOED 348 SC ODEE 349 SC ODEF 350 SC OOFO 351 SC ODFl 3S2 5C OOF2 3S3 SC OOF3 354 5C OOF4 355 5C DOF5 356 SC DOF6 3S7 SC OOF7 3S8 7C OOF8 3S9 6A OOF9 360 6B OOFA 361 6C OOFB 362 60 OOFC 363 6E OOFD 364 6F OOFE 36S 70 OOFF 366 71 0100 367 SC 01Dl 368 5C 0102 369 SC 0103 370 SC 0104 371 SC OlOS 372 SC 0106 373 5C 0107 374 72 0108 37S SC 0109 376 SC OlOA 377 SC OlOB 378 SC OlOC 379 SC OlOD 380 5C OlOE 381 SC DlOF 382 SC D11D 383 10 0111 384 SC 0112 385 5C 0113 386 SC 0114 387 SC 01 lS 388 SC 0116 389 5C 0117 390 .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE /\A/g/ AA/h/ /\A/\/ /\A/\/ AA/\/ /\A/\/ AA/\/ AA/\/ AA/\/ AA/ i I AA/\/ AA/\/ AA/\/ /\A/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/I/ AA/j/ AA/k/ AA I 1 I AA/m/ AA/n/ AA/o/ AA/p/ AA/q/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/r/ /\A/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AXlD AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ 3-JUN-1984 11: 02: 03 VAX-11 Macro V03-01 Page 7 10-MAR-1982 2D:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(l) ; 167 ; 168 ; 169 ; 17D ; 171 ; 172 ; 173 ; 174 ; 17S ; 176 ; 177 ; 178 ; 179 ; 18D ; 181 ; 182 ; 183 ; 184 ; 185 ; 186 ; 187 ; 188 ; 189 ; 19D ; 191 ; 192 ; 193 ; 194 ; 195 ; 196 ; 197 ; 198 ; 199 ; 2DD ; 2D1 ; 2D2 ; 203 ; 204 ; 205 ; 206 ; 2D7 ; 2D8 ; 2D9 ; 210 ; 211 ; 212 ; 213 ; 214 ; 21S ; 216 ; 217 ; 218 ; 219 ; 22D ; 221 ; 222 : 223 AXA7 AXA8 AXA9 AXAA AXAB AXAC AXAD AXAE AXAF AXBO AXBl AX82 AX83 AXB4 AXB5 AXB6 AXB7 AX88 AX89 AXBA AXBB AXBC AXBD AXBE AXBF AXCO AXCl AXC2 AXC3 AXC4 AXC5 AXC6 AXC7 AXC8 AXC9 AXCA AXCB AXCC AXCD AXCE AXCF AXDD AX01 AX02 AX03 AX04 AX05 AX06 AX07 AX08 AX09 AXDA AXDB AXDC AXDD AXDE AXDF /\0247 A02SD /\02S1 /\0252 /\Q253 A02S4 /\0255 /\0256 A02S7 AQ26D AQ261 A0262 A0263 A0264 A0265 A0266 A0267 A027Q A0271 AQ272 A0273 A0274 A0275 A0276 A0277 A03D0 A0301 AQ302 A03D3 /\0304 A0305 A0306 A03D7 A031D A0311 A0312 A0313 A0314 AQ31S AQ316 A0317 A032D A0321 A0322 A0323 AQ324 AQ325 AQ326 A0327 A033D A0331 A0332 A0333 A0334 AQ33S AQ336 AQ337 CRDRIVER V03-002 - CR 11 CARD READER DRIVER 5C 0118 5C 0119 5C 01 lA 5C 011B 5C 011C 5C 011 D 5C 011 E 5C 011 F 5C 0120 5C 0121 5C 0122 5C 0123 5C 0124 5C 0125 5C 0126 5C 0127 5C 0128 5C 0129 5C 012A 5C 012B 5C 012C 5C 012D 5C 012E 5C 012F 5C 0130 5C 0131 5C 0132 5C 0133 5C 0134 5C 0135 5C 0136 5C 0137 0138 0138 0138 0138 0138 0138 20 0138 31 0139 32 013A 33 013B 34 013C 35 013D 36 013E 37 013F 38 0140 60 0141 5F 0142 3D 0143 40 0144 5E 0145 27 0146 5C 0147 39 0148 5C 0149 16 014A 391 .BYTE AA/\/ 392 .BYTE AA/\/ 393 .BYTE AA/\/ 394 .BYTE AA/\/ 395 .BYTE AA/\/ 396 .BYTE AA/\/ 397 .BYTE AA/\/ 398 .BYTE AA/\/ 399 .BYTE /\A/\/ 400 .BYTE AA/\/ 401 .BYTE AA/\/ 402 .BYTE AA/\/ 403 .BYTE AA/\/ 404 .BYTE AA/\/ 405 .BYTE AA/\/ 406 .BYTE AA/\/ 407 .BYTE AA/\/ 408 .BYTE AA/\/ 409 .BYTE AA/\/ 410 .BYTE /\A/\/ 411 .BYTE /\A/\/ 412 .BYTE AA/\/ 413 .BYTE AA/\/ 414 .BYTE AA/\/ 415 .BYTE AA/\/ 416 .BYTE /\A/\/ 417 .BYTE AA/\/ 418 .BYTE /\A/\/ 419 .BYTE /\A/\/ 420 .BYTE AA/\/ 421 .BYTE AA/\/ 422 .BYTE AA/\/ 423 424 425 ; 026 CONVERSION TABLE 426 427 428 CR__ CVT026: 429 .BYTE /\A/ I 430 .BYTE AA/ 1I 431 .BYTE AA/2/ 432 .BYTE /\A/3/ 433 .BYTE /\A/4/ 434 .BYTE AA/5/ 435 .BYTE /\A/6/ 436 .BYTE AA/7/ 437 .BYTE AA/8/ 438 .BYTE AA/' I 439 .BYTE AA/ I 440 .BYTE AA/-;/ 441 .BYTE AA/@/ 442 .BYTE AA//\/ 443 .BYTE AA/' I 444 .BYTE AA/\/ 445 .BYTE AA/9/ 446 .BYTE AA/\/ 447 .BYTE AX16 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 8 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) ; 224 ; 225 ; 226 ; 227 ; 228 ; 229 ; 230 ; 231 ; 232 ; 233 ; 234 ; 235 ; 236 ; 237 ; 238 ; 239 ; 240 ; 241 ; 242 ; 243 ; 244 ; 245 ; 246 ; 247 ; 248 ; 249 ; 250 ; 251 ; 252 ; 253 ; 254 ; 255 AXEO AXE1 AXE2 AXE3 AXE4 AXE5 AXE6 AXE7 AXES AXE9 AXEA AXEB AXEC AXED AXEE AXEF AXFO AXF1 AXF2 AXF3 AXF4 AXF5 AXF6 /\Xf7 AXF8 /\Xf 9 AXFA AXFB /\XfC AXFD AXFE /\Xff /\Q340 /\Q341 /\Q342 /\Q343 /\Q344 /\Q345 /\0346 /\0347 /\0350 /\0351 /\Q352 /\0353 /\Q354 /\Q355 /\0356 /\0357 /\0360 /\Q361 /\0362 /\Q363 /\Q364 /\Q365 /\Q366 /\Q367 /\0370 /\Q371 /\Q372 /\Q373 /\Q374 /\0375 /\Q376 /\Q377 ;026 TRANSLATE TABLE ; 0 AXOO AQOOO ; 1 AXO 1 A0001 ; 2 AXQ2 /\Q002 ; 3 AX03 /\Q003 ; 4 AX04 /\0004 ; 5 AX05 /\Q005 ; 6 AX06 /\0006 ; 7 AX07 /\QQ07 ; 8 AX08 /\Q010 ; 9 AX09 /\QO 11 ; 10 AXOA l\Q012 ; 11 AXOB /\0013 ; 12 AXOC /\Q014 ; 13 AXOD /\Q015 ; 14 AXOE l\Q016 ; 15 AXOF AQ017 ; 16 AX10 /\0020 ; 17 /\Xl 1 AQ021 : 18 AX 12 /\QQ22 CRDRIVER V03-002 - CR 11 CARD READER DRIVER 5C 014B 448 5C 014C 449 5C 014D 450 5-C 014E 451 04 014F 452 5C 0150 453 5C 0151 454 5C 0152 455 5C 0153 456 14 0154 457 15 0155 458 5C 0156 459 1A 0157 460 30 0158 461 2F 0159 462 53 015A 463 54 015B 464 55 015C 465 56 0150 466 57 015E 467 58 015F 468 59 0160 469 5C 0161 470 3B 0162 471 2C 0163 472 28 0164 473 22 0165 474 23 0166 475 25 0167 476 5A 0168 477 5C 0169 478 5C 016A 479 5C 016B 480 5C 016C 481 OA 0160 482 17 016E 483 18 016F 484 5C 0170 485 5C 0171 486 5C 0172 487 5C 0173 488 5C 0174 489 05 0175 490 06 0176 491 07 0177 492 2D 0178 493 4A 0179 494 48 017A 495 4C 017B 496 4D 017C 497 4E 0170 498 4F 017E 499 50 017F 500 51 0180 501 5C 0181 502 3A 0182 503 24 0183 504 .BYTE .BYTE .BYTE ·.BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE AA/\/ AA/\/ AA/\/ /\A/\/ AX04 AA/\/ AA/\/ AA/\/ AA/\/ AX14 AX15 AA/\/ AX1A AA/0/ /\A\/\ /\A/S/ AA/T/ AA/U/ AA/V/ /\A/W/ AA/X/ /\A/Y/ AA/\/ AA/;/ AA I, I AA/(/ AA I" I AA/#/ AA/%/ AA/Z/ AA/\/ AA/\/ AA/\/ /\A/\/ AXOA AX17 AXlB AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AX05 /\XQ6 AX07 AA/-/ /\A/J/ AA/K/ AA I LI AA/M/ AA/N/ AA/O/ AA/P/ AA/Q/ AA/\/ AA/: I /\A/$/ 3-JUN-1984 11: 02: 03 VAX-11 Macro V03-01 Page 9 10-MAR-1982 20:31:59 DISK$VMSMASTER: [DRIVER.SRC]CRDRIVE(l) ; 19 ; 20 ; 21 ; 22 ; 23 ; 24 ; 25 ; 26 ; 27 ; 28 ; 29 ; 30 ; 31 ; 32 ; 33 ; 34 ; 35 ; 36 ; 37 ; 38 ; 39 ; 40 ; 41 ; 42 ; 43 ; 44 ; 45 ; 46 ; 47 ; 48 ; 49 ; 50 ; 51 ; 52 ; 53 ; 54 ; 55 ; 56 ; 57 ; 58 ; 59 ; 60 ; 61 ; 62 ; 63 ; 64 ; 65 ; 66 ; 67 ; 68 ; 69 ; 70 ; 71 ; 72 ; 73 ; 74 : 75 /\Xl 3 /\X14 /\X15 /\X16 AX17 AX18 /\X19 AX1A /\X1B AX1C AX1D /\X1 E /\X 1 F /\X20 /\X21 /\X22 AX23 AX24 AX25 /\X26 /\X27 AX28 /\X29 AX2A /\X2B /\X2C /\X2D AX2E /\X2F /\X30 /\X31 /\X32 /\X33 /\X34 AX35 AX36 AX37 AX38 /\X39 AX3A /\X3B AX3C AX30 AX3E AX3F AX40 /\X41 AX42 AX43 AX44 AX45 AX46 /\X47 AX48 AX49 AX4A AX4B A0023 /\0024 A0025 /\0026 /\0027 /\0030 A0031 A0032 A0033 A0034 /\Q035 A0036 /\Q037 /\Q040 /\0041 /\0042 /\0043 A0044 /\QQ45 /\QQ46 /\Q047 /\Q050 /\0051 A0052 A0053 /\0054 A0055 A0056 A0057 /\0060 /\Q061 /\0062 /\Q063 AQ064 /\QQ65 A0066 A0067 1\0070 A0071 A0072 A0073 A0074 A0075 A0076 A0077 /\Q100 AO 101 AQ102 AQl 03 AQ104 AQ105 /\0106 /\Ql07 /\Q 1 1 0 AQl 11 A0112 AQ113 CRDRIVER V03-002 - CR11 CARD READER DRIVER 2A 0184 5B 0185 3E 0186 26 0187 52 0188 11 0189 12 018A 13 018B 5C 018C 5C 0180 08 018E 5C 018F 18 0190 19 0191 5C 0192 5C 0193 lC 0194 10 0195 1E 0196 1F 0197 70 0198 7E 0199 73 019A 74 019B 75 019C 76 0190 77 019E 78 019f 79 OlAO 5C 01A1 SC 01A2 SC 01A3 SC 01A4 5C 01AS 5C 01A6 5C 01A7 7A 01A8 5C 01A9 5C 01AA SC OlAB 5C 01AC 5C 01AD SC 01AE SC OlAF 5C 01BO SC OlBl 5C 01B2 SC 01B3 5C 01B4 SC 01B5 SC 01B6 5C 01B7 2B 01B8 41 0189 42 OlBA 43 01BB 44 OlBC 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 SS2 553 554 S55 556 557 558 559 560 S61 .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE /\A/*/ /\A/[/ /\A/>/ /\A/&/ /\A/R/ /\X 11 AX12 /\Xl3 /\A/\/ /\A/\/ AX08 AA/\/ /\Xl8 AX19 /\A/\/ AA/\/ AXlC AXlD AXl E AX 1 F /\Al} I /\A/-/ /\A/s/ /\A/ ti /\A/u/ /\A/v/ /\A/w/ AA/x/ AA/y/ /\A/\/ AA/\/ AA/\/ /\A/\/ /\A/\/ /\A/\/ /\A/\/ /\A/z/ AA/\/ /\A/\/ /\A/\/ /\A/\/ AA/\/ /\A/\/ AA/\/ AA/\/ /\A/\/ AA/\/ AA/\/ /\A/\/ AA/\/ AA/\/ /\A/\/ /\A/+/ AA/A/ AA/B/ AA/Cl AA/D/ 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 10 10-MAR-1982 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) ; 76 ; 77 ; 78 ; 79 ; 80 ; 81 ; 82 ; 83 ; 84 ; 85 ; 86 ; 87 ; 88 ; 89 ; 90 ; 91 ; 92 ; 93 ; 94 ; 95 ; 96 ; 97 ; 98 ; 99 ; 100 ; 101 ; 102 ; 103 ; 104 ; 105 ; 106 ; 107 ; 108 ; 109 ; 110 ; 111 ; 112 ; 113 ; 114 ; 115 ; 116 ; 117 ; 118 ; 119 ; 120 ; 121 ; 122 ; 123 ; 124 ; 125 ; 126 ; 127 ; 128 ; 129 ; 130 ; 131 : 132 /\X4C /\X4D /\X4E AX4F AX50 /\X51 /\X52 /\X53 /\X54 AX55 AX56 AX57 AX58 /\X59 /\X5A /\X5B AX5C AX50 /\X5E AX5F AX60 /\X61 /\X62 /\X63 /\X64 AX65 /\X66 AX67 AX68 /\X69 AX6A /\X6B /\X6C /\X60 /\X6E AX6f AX70 AX71 AX72 AX73 AX74 AX75 AX76 /\X77 AX78 /\)(79 AX7A AX7B AX7C AX70 /\X7E AX7F AX80 /\X81 /\X82 AX83 AX84 /\0114 /\0115 /\Q 116 AO 117 /\0120 /\0121 /\0122 A0123 A0124 /\0125 /\0126 A0127 A0130 AO 131 /\0132 /\0133 A0134 A0135 AQ136 A0137 A0140 /\0141 /\0142 /\0143 /\0144 A0145 /\0146 A0147 /\0150 /\Q 151 AQ152 /\0153 /\0154 /\0155 /\0156 A0157 /\Ql60 AO 161 A0162 A0163 /\0164 A0165 /\Ql66 /\Ql67 AQ170 AO 171 AQ172 AQ173 /\0174 A0175 A0176 AQ177 /\0200 /\Q201 /\0202 A0203 A0204 CRDRIVER V03-002 - CR11 CARD READER DRIVER 45 01BO 562 46 01BE 563 47 01BF 564 48 OlCO 565 5C 01C1 566 3F 01C2 567 2E 01C3 568 29 01C4 569 50 01C5 570 3C 01C6 571 21 01C7 572 49 01C8 573 01 01C9 574 02 01CA 575 03 01CB 576 5C 01CC 577 09 01CO 578 5C 01CE 579 FF OlCF 580 5C 0100 581 5C 01D1 582 5C 0102 583 OB 0103 584 oc 0104 585 OD 0105 586 OE 01D6 587 OF 0107 588 76 0108 589 61 01D9 590 62 01DA 591 63 010B 592 64 OlDC 593 65 0100 594 66 OlDE 595 67 01DF 596 68 01EO 597 5C 01E1 598 5C 01E2 599 5C 01E3 600 SC 01E4 601 5C 01E5 602 SC 01E6 603 5C 01E7 604 69 01E8 605 5C 01E9 606 5C 01EA 607 5C OlEB 608 5C OlEC 609 5C OlEO 610 5C 01EE 611 5C 01EF 612 5C 01FO 613 5C 01F1 614 5C 01F2 615 5C 01F3 616 5C 01F4 617 5C 01F5 618 .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE ·.BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE AA/E/ AA/F/ AA/G/ AA/H/ AA/\/ AA I? I AA/./ AA/)/ AA/] I AA/</ AA/!/ AA/I/ AX01 AX02 AX03 AA/\/ AX09 AA/\/ AXFF AA/\/ AA/\/ AA/\/ AXOB AXOC AXOD AXOE AXOF AA/{/ AA/a/ AA/b/ AA/c/ AA/d/ AA/e/ AA/f/ AA/g/ AA/h/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/ i I AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 11 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) ; 133 ; 134 ; 135 ; 136 ; 137 ; 138 ; 139 ; 140 ; 141 ; 142 ; 143 ; 144 ; 145 ; 146 ; 147 ; 148 ; 149 ; 150 ; 151 ; 152 ; 153 ; 154 ; 155 : 156 ; 157 ; 158 ; 159 ; 160 ; 161 ; 162 ; 163 ; 164 ; 165 ; 166 ; 167 ; 168 ; 169 ; 170 ; 171 ; 172 ; 173 ; 174 ; 175 ; 176 ; 177 ; 178 ; 179 ; 180 ; 181 ; 182 ; 183 ; 184 ; 185 ; 186 ; 187 ; 188 : 189 AX85 AX86 AX87 AX88 AX89 AX8A AX8B AX8C AX80 AX8E AX8F AX90 AX91 AX92 AX93 AX94 AX95 AX96 AX97 AX98 AX99 AX9A AX9B AX9C AX9D AX9E AX9F AXAO AXA1 AXA2 AXA3 AXA4 AXA5 AXA6 AXA7 AXA8 AXA9 AXAA AXAB AXAC AXAO AXAE AXAF AXBO AXBl AXB2 AXB3 AXB4 AXB5 AXB6 AXB7 AXB8 AXB9 AXBA AXBB AXBC AXBO A0205 A0206 /\0207 A0210 AQ211 AQ212 AQ213 AQ214 A0215 A0216 A0217 A0220 A0221 /\Q222 /\0223 AQ224 A0225 /\Q226 A0227 A0230 /\Q231 A0232 /\0233 AQ234 /\Q235 /\Q236 AQ237 A0240 /\Q241 AQ242 A0243 A0244 ,l\Q245 /\Q246 A0247 A0250 A0251 'A0252 A0253 A0254 A0255 A0256 A0257 A0260 /\0261 A0262 A0263 A0264 A0265 A0266 A0267 A0270 A0271 /\0272 A0273 A0274 A0275 CRDRIVER V03-002 - CR 11 CARD READER DRIVER 5C 01F6 619 5C 01F7 620 7C 01f8 621 6A 01F9 622 6B OlFA 623 6C OlFB 624 6D OlFC 625 6E OlFD 626 6F 01FE 627 70 01 FF· 628 71 0200 629 5C 0201 630 5C 0202 631 5C 0203 632 5C 0204 633 5C 0205 634 5C 0206 635 5C 0207 636 72 0208 637 5C 0209 638 5C 020A 639 5C 020B 640 5C 020C 641 5C 020D 642 5C 020E 643 5C 020F 644 5C 0210 645 10 0211 646 5C 0212 647 5C 0213 648 5C 0214 649 5C 0215 650 5C 0216 651 5C 0217 652 5C 0218 653 5C 0219 654 5C 021A 655 5C 021B 656 5C 021C 657 5C 0210 658 5C 021E 659 5C 021F 660 5C 0220 661 5C 0221 662 5C 0222 663 5C 0223 664 5C 0224 665 5C 0225 666 5C 0226 667 5C 0227 668 5C 0228 669 5C 0229 670 5C 022A 671 5C 022B 672 5C 022C 673 5C 0220 674 5C 022E 675 .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE AA/\/ AA/\/ AA/I/ AA/j/ AA/k/ AA/1/ AA/rn/ AA/n/ AA/o/ AA/p/ AA/q/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/r/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AX 10 AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ 3-JUN-1984 11:02:03 VAX-11 Macro V03-0l Page 12--- 10-MAR-1982 20:31:59 DISK$VMSMkSTER:[DRIVER.SRC]CRDRIVE(l) ; 190 ; 191 ; 192 ; 193 ; 194 ; 195 ; 196 ; 197 ; 198 ; 199 ; 200 ; 201 ; 202 ; 203 ; 204 ; 205 ; 206 ; 207 ; 208 ; 209 ; 210 ; 211 ; 212 ; 213 ; 214 ; 215 ; 216 ; 217 ; ' 218 219 ; 220 ; 221 ; 222 ; 223 ; 224 ; 225 ; 226 ; 227 ; 228 ; 229 ; 230 ; 231 ; 232 ; 233 ; 234 ; 235 ; 236 ; 237 ; 238 ; 239 ; 240 ; 241 ; 242 ; 243 ; 244 ; 245 : 246 AXBE AXBF AXCO AXCl AXC2 AXC3 AXC4 AXC5 AXC6 AXC7 AXC8 AXC9 AXCA AXCB AXCC AXCD AXCE AXCF AXDO AXDl AXD2 AX03 AXD4 AXD5 AXD6 AXD7 AXDB AXD9 AXDA AXDB AXDC AXDD AXDE AXDF AXEO AXEl AXE2 AXE3 AXE4 AXE5 AXE6 AXE7 AXES AXE9 AXEA AXEB AXEC AXED AXEE AXEF AXFO AXFl AXF2 AXF3 AXf 4 AXf 5 AXf6 /\0276 /\0277 /\0300 A0301 A0302 AQ303 A0304 A0305 AQ306 A0307 A0310 A0311 A0312 AQ313 A0314 AQ315 AQ316 /\0317 A0320 A0321 AQ322 AQ323 A0324 A0325 /\0326 /\0327 A0330 A0331 A0332 AQ333 A0334 A0335 AQ336 AQ337 A0340 A0341 A0342 AQ343 AQ344 AQ345 AQ346 A0347 A0350 A0351 A0352 A0353 A0354 AQ355 AQ356 AQ357 A0360 AQ361 AQ362 A0363 ,f\0364 A0365 A0366 CRDRIVER V03-002 - CR 11 CARD READER DRIVER 5C 022F 676 5C 0230 677 5C 0231 678 5-C 0232 679 5C 0233 680 5C 0234 681 5C 0235 682 5C 0236 683 5C 0237 684 .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ AA/\/ 3-JUN-1984 11 :02:03 VAX-11 Macro V03-0l Page 13 10-MAR-1982 20:31:59 DISK$VMSMASTER: [DRIVER.SRC]CRDRIVE(l) ; 247 ; 248 ; 249 ; 250 ; 251 ; 252 ; 253 ; 254 : 255 AXF7 /\Xf 8 AXF9 AXFA AXFB AXFC AXFD AXFE AXFF /\Q367 /\Q370 /\Q371 /\Q372 /\Q373 /\Q374 /\0375 /\Q376 /\Q377 CRDRIVER V03-002 - CR11 CARD READER DRIVER CR11 FUNCTION DECISION TABLE 3-JUN-1984 11 :02:03 VAX-11 Macro V03-01 Page 14 10-MAR-1982 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIV~(1) 0238 0238 0238 0238 0238 0238 0238 0238 0238 0238 0238 0238 0238 0238 0238 0240 0240 0240 0240 0240 0240 0240 0240 0240 0248 0248 0248 0248 0248 0254 0254 0254 0254 0260 0260 0260 0260 686 .SBTTL CR11 FUNCTION DECISION TABLE 687 688 CR11 FUNCTION DECISION TABLE 689 690 691 CR FUNCTABLE: ;FUNCTION DECISION TABLE 692 693 FUNCTAB <' READLBLK,- ; LEGAL FUNCTION ;READ LOGICAL BLOCK 694 READPBLK,- ;READ PHYSICAL BLOCK 695 READVBLK,- ;READ VIRTUAL BLOCK 696 SENSEMODE,- ;SENSE READ MODE 697 SENSECHAR,- ;SENSE READER CHARACTERISTICS 698 SETMODE,- ;SET READER MODE 699 SETCHAR,- ;SET READER CHARACTERISTICS 700 > 701 FUNCTAB ';BUFFERED I/O FUNCTIONS 702 <READLBLK,- ;READ LOGICAL BLOCK 703 READPBLK,- ;READ PHYSICAL BLOCK 704 READVBLK,- ;READ VIRTUAL BLOCK 705 SENSEMODE,- ;SENSE READ MODE 706 SENSECHAR,- ;SENSE READER CHARACTERISTICS 707 SETMODE,- ;SET READER MODE 708 SETCHAR,- ;SET READER CHARACTERISTICS 709 > 710 FUNCTAB CR READ,- ;' READ FUNCTIONS 711 <READLBLK,- ;READ LOGICAL BLOCK 712 READPBLK,- ;READ PHYSICAL BLOCK 713 READVBLK,- ;READ VIRTUAL BLOCK 714 > 715 FUNCTAB +EXE$SETMODE,- SET MODE/CHARACTERISTICS FUNCTIONS 716 <SETCHAR,- SET READER CHARACTERISTICS 717 SETMODE,- SET READER MODE 718 > 719 fUNCTAB TEXE$SENSEMODE,- SENSE MODE/CHARACTERISTICS FUNCTIONS 720 <SENSECHAR,- SENSE READER CHARACTERISTICS 721 SENSEMODE,- SENSE READER MODE 722 > CRDRIVER V03-002 - CR11 CARD READER DRIVER CANCEL I/O ON CHANNEL 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 15 10-MAR-1982 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) 5C A5 04 68 A5 01 OOOOOOOO'GF 026C 026C 026C 026C 026C 026C 026C 026C 026C Q,26C 026C 026C 026C 026C 026C 026C 026C 026C 026C 026C 026C 026C 026C 65 026C 12 026F AA 0271 17 0275 724 .SBTTL CANCEL I/0 ON CHANNEL 725 ;+ 726 CR CANCELIO - CANCEL I/0 ON CHANNEL 727 728 THIS ROUTINE IS CALLED WHEN THE LAST CHANNEL ASSIGNED TO A DEVICE IS DEASSIGNED. 729 THE DEVICE IS DEALLOCATED, AND WHEN THE CANCEL I/O ON CHANNEL SYSTEM SERVICE IS 730 EXECUTED. 731 732 INPUTS: 733 734 735 = R2 NEGATIVE CHANNEL NUMBER. = R3 ADDRESS OF CURRENT I/O REQUEST PACKET. 736 R4 = CURRENT PROCESS PCB ADDRESS. 737 R5 = DEVICE UCB ADDRESS. 738 739 OUTPUTS: 740 741 THE DEVICE INDEPENDENT CANCEL I/O ROUTINE IS CALLED AND A CHECK IS MADE 742 TO SEE IF THE UCB REFERENCE COUNT IS ZERO. IF THE REFERENCE COUNT IS ZERO, 743 THEN THE MESSAGE SENT TO JOB CONTROLLER BIT IS CLEARED. 744 745 746 CR CANCE LI 0: ;CANCEL I/0 ON CHANNEL 747 - TSTW UCB$W REFC(R5) ;REFERENCE COUNT ZERO? 748 BNEQ 10$ - ;IF NEQ NO 749 BICW #UCB$M JOB,UCB$W DEVSTS(R5) ;CLEAR MESSAGE SENT BIT 750 10$: JMP GAIOC$CANCELIO - ;CANCEL I/O ON CHANNEL CRDRIVER V03-002 - CRll CARD READER DRIVER READ FUNCTION PROCESSING 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 16 10-MAR-1982 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) 50 6C DO 51 04 AC 3C 5C 13 OOOOOOOO'GF 16 32 A3 51 BO 09 BB 51 50 BF 9A 03 20 A3 06 El 51 02 C4 32 A3 51 Bl 04 1E 32 A3 51 BO 51 DC co OOOOOOOO'GF 16 37 50 E9 OOOOOOOO'GF 16 2E 50 E9 09 BA 2C A3 52 DO 30 A3 51 BO 50 DD 50 0080 C4 DO 20 AO 51 C2 50 8EDO 82 OC A2 9E 62 50 DO OOOOOOOO'GF 17 027B 027B 027B 027B 027B 027B 027B 027B 0278 027B 0218 027B 027B 027B 027B 027B 0278 027B 027B 0278 027B 027B 027B 0278 027B 027B 027B 027B 027B 0278 027B 027E 0282 0284 028A 028E 0290 0294 0299 029C 02AO 02A2 02A6 02A9 02AF 02B2 02B8 02BB 02BD 02C1 02C5 02C7 02CC 02DO 02D3 02D7 02DA 752 .SBTTL READ FUNCTION PROCESSING 753 ;+ 754 CR_READ - READ FUNCTION PROCESSING 755 756 THIS ROUTINE IS CALLED FROM THE FUNCTION DECISION TABLE DISPATCHER TO PROCESS 757 A READ LOGICAL, READ PHYSICAL, OR READ VIRTUAL FUNCTION TO A CARD READER. 758 759 INPUTS: 760 761 RO = SCRATCH. 762 Rl = SCRATCH. 763 R2 = SCRATCH. 764 R3 = ADDRESS OF I/O REQUEST PACKET. 765 R4 = CURRENT PROCESS PCB ADDRESS. 766 R5 = ASSIGNED DEVICE UCB ADDRESS. 767 R6 = ADDRESS OF CCB. 768 R7 = I/O FUNCTION CODE. 769 R8 = FUNCTION DECISION TABLE DISPATCH ADDRESS. 770 R9 = SCRATCH. 771 R10 = SCRATCH. 772 R11 =SCRATCH. 773 AP = ADDRESS OF FIRST FUNCTION DEPENDENT PARAMETER. 774 775 OUTPUTS: 776 777 THE FUNCTION PARAMETERS ARE CHECKED AND A BUFFER IS ALLOCATED FOR THE 778 CARD READER DRIVER TO READ A CARD IMAGE INTO. 779 780 781 CR READ: ;READ FUNCTION PROCESSING 782 MOVL Pl(AP),RO ;GET ADDRESS OF USER BUFFER 783 MOVZWL P2(AP),R1 ;GET LENGTH OF USER BUFFER 784 BEQL 30$ ;IF EQL ZERO LENGTH TRANSFER 785 JSB GAEXE$READCHK ;CHECK ACCESSIBILITY OF USER BUFFER 786 MOVW Rl,IRP$W BCNT(R3) ;INSERT LENGTH OF USER BUFFER 787 PUSHR #AM<RO,R3> ;SAVE BUFFER AND I/0.PACKET ADDRESSES 788 MOVZBL #80,Rl ;SET LENGTH REQUIRED FOR ASCII READ 789 BBC #IO$V BINARY,IRP$W FUNC(R3),10$ ;IF CLR, ASCII READ 790 MULL #2,Rl- - ;SET LENGTH REQUIRED FOR BINARY READ 791 10$; CMPW Rl ,IRP$W BCNT(R3) ;LENGTH OF READ LARGER THAN USER ~UFFER? 792 BGEQU 20$ - ;IF GEQU YES 793 MOVW R1,IRP$W BCNT(R3) ;SET LENGTH OF USER BUFFER TO SIZE OF READ 794 20$: ADDL #12,Rl - ;ACCOUNT FOR BUFFER OVERHEAD 795 JSB GAEXE$BUFFRQUOTA ;CHECK IF PROCESS HAS SUFFICIENT QUOTA 796 BLBC R0,40$ ;IF LBC QUOTA CHECK FAILURE 797 JSB GAEXE$ALLOCBUF ;ALLOCATE BUFFER FOR CARD READ 798 BLBC R0,40$ ;IF LBC ALLOCATION FAILURE 799 POPR #AM<RO,R3> ;RETRIEVE BUFFER AND I/O PACKET ADDRESSES 800 MOVL R2,IRP$L SVAPTE(R3) ;INSERT ADDRESS OF READ BUFFER 801 MOVW R1,IRP$W-BOFF(R3) ;INSERT NUMBER OF QUOTA BYTES CHARGED 802 PUSHL RO - ;SAVE BUFFER ADDRESS 803 MOVL PCB$L JIB(R4),RO ;GET JIB ADDRESS 804 SUBL R1,JIB$L BYTCNT(RO) ;CHARGE PROCESS FOR BUFFER 805 POPL RO - ;RESTORE BUFFER ADDRESS 806 MOVAB 12(R2),(R2)+ ;INSERT ADDRESS OF DATA AREA 807 MOVL RO,(R2) ;SAVE ADDRESS OF USER BUFFER 808 JMP GAEXE$QIODRVPKT ;QUEUE DRIVER PACKET CRDRIVER V03-002 - CR11 CARD READER DRIVER READ FUNCTION PROCESSING 3-JUN-1984 11 :02:03 VAX-11 Macro V03-01 Page 17 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(l) 50 01 OOOOOOOO'GF OC OOOOOOOO'GF 02EO 02EO 02EO 02EO 02EO 3C 02EO 17 02E3 02E9 02E9 02E9 02E9 02E9 BA 02E9 17 02EB 809 810 811 ; ZERO LENGTH TRANSFER 812 813 814 30$: MOVZWL #SS$ NORMAL,RO 815 JMP GAEXE$F IN I SH IOC 816 817 818 ; QUOTA OR BUFFER ALLOCATION FAILURE 819 820 821 40$: POPR #AM<R2,R3> 822 JMP GAEXE$ABORTI 0 ;SET NORMAL COMPLETION STATUS ;FINISH I/O ;RETRIEVE I/O PACKET ADDRESS ;ABORT I/O OPERATION CRDRIVER V03-002 - CRll CARD READER DRIVER 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 18 START I/O OPERATION ON CR11 CARD READER 10-MAR-1982 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(l) 06 00 23 20 A3 OD 06 00 lA 20 A3 12 40 A5 38 A3 42 A5 44 A5 3A A3 3C A3 016A 78 AS 2C B3 0091 C5 01 05 20 A3 06 0091 C5 08 0091 C5 0092 C5 0090 C5 01 0093 C5 54 24 A5 02F1 02F1 02Fl 02F1 02F1 02F1 02F1 02F1 02Fl 02F1 02F1 02F1 02F1 02Fl 02F1 02F1 02F1 02F1 02F1 02F1 02F1 02Fl 02F1 ED 02F1 02F4 13 02F7 ED 02F9 02FC 12 02FF 0301 0301 0301 0301 0301 BO 0301 0306 0306 0306 0306 0306 BO 0306 DO 030B 31 0310 . 0313 0313 0313 0313 0313 DO 0313 90 0318 El 031D 90 0322 90 0327 0328 BE 032E 94 0333 DO 0337 824 .SBTTL START I/O OPERATION ON CR11 CARD READER 825 ;+ 826 CR STARTIO - START I/O OPERATION ON CR11 CARD READER 827 828 THIS ROUTINE IS ENTERED WHEN THE ASSOCIATED UNIT IS IDLE AND A PACKET IS 829 AVAILABLE FOR PROCESSING. 830 831 INPUTS: 832 833 R3 ADDRESS OF I/O REQUEST PACKET. 834 R5 ADDRESS OF DEVICE UNIT UCB. 835 836 OUTPUTS: 837 838 CARD MOTION IS STARTED BY SETTING THE APPROPRIATE FUNCTION BITS IN THE 839 CONTROL STATUS REGISTER. AS EACH COLUMN INTERRUPT OCCURS, THE DATA FROM 840 THE DATA BUFFER REGISTER(S) IS STORED IN THE BUFFER ALLOCATED BY THE 841 FDT ROUTINE. WHEN ALL 80 COLUMNS HAVE BEEN READ, A FORK PROCESS IS CREAT- 842 ED, THE COLUMN DATA IS CONVERTED ACCORDING TO THE I/O FUNCTION CODE, AND 843 REQUEST COMPLETE IS CALLED FOR POST PROCESSING. 844 ' 845 846 CR STARTIO: ;START I/O OPERATION 847 - CMPZV #IRP$V FCODE,#IRP$S FCODE,- ;SET MODE FUNCTION? 848 IRP$W FUNC(R3),#I0$-SETMODE ; 849 8EQL 10$ - - ;IF EQL YES 850 CMPZV #IRP$V FCODE,#IRP$S FCODE,- ;SET CHARACTERISTICS FUNCTION? 851 IRP$W FUNC(R3),#IO$-SETCHAR ; 852 BNEQ 20$ - - ;IF NEQ NO 853 854 855 SET READER CHARACTERISTICS 856 857 858 MOVW IRP$L_MEDIA(R3),UCB$B_DEVCLASS(R5) ;SET DEV{CE CLASS AND TYPE 859 860 861 SET READER MODE 862 863 864 10$: MOVW IRP$L MEDIA+2(R3),UCB$W DEVBUFSIZ(R5) ;SET DEFAULT BUFFER SIZE 865 MOVL IRP$L-MEDIA+4(R3),UCB$L-DEVDEPEND(R5) ;SET DEVICE DEPENDENT FLAGS 866 BRW 140$ - - 867 868 869 SET UP PARAMETERS AND READ CARD 870 871 872 20$: MOVL @IRP$L SVAPTE(R3),UCB$L SVAPTE(RS) ;SET ADDRESS OF BUFFER 873 MOVB #1,UCB$B CR EOFCNT(R5) -;SET END OF FILE COUNT FOR ASCII 874 BBC #I0$V 8INARV,IRP$W FUNC(R3),30$ ;IF CLR, ASCII READ 875 MOVB #8,UCB$B CR EOFCNT(R5) ;SET END OF FILE COUNT FOR BINARY 876 30$: MOVB UCB$B_CR=EOFCNT(R5),UCB$B_CR_EOFCOL(R5) ;SET REQUIRED NUMBER 877 MNEGS #1,UCB$B CR COLCNT(R5) SET INIT1AL COLUMN COUNT 878 CLRB UCB$B CR-OFLCNT(R5) . SET INITIAL OFFLINE COUNT 879 MOVL UCB$L=CRB(R5),R4 GET ADDRESS OF CRB CRDRIVER V03-002 - CR11 CARD READER DRIVER 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 19 START I/O OPERATION ON CR11 CARD READER 10-MAR-1982 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) 54 2C B4 64 0100 BF 5D El 64 40 SF 22 64 A5 03 01 OF FFCC 0093 CS 0093 C5 18 54 05 OOOOOOOO'GF 53 OOOOOOOO'GF lB B2 50 2C OOF3 64 40 SF OOB2 cs 50 0054 BF DODD 02 A4 41 BF 64 64 COOO BF 4A 51 02 A4 52 04 A4 0090 cs 05 0094 cs Sl DO 0338 033F 83 0345 13 034A 034C 0356 11 035C 03SE 035E 035E 035E 03SE 9B 035E 0362 EO 0366 9D 036B 036E 94 0373 BB 0377 9A 0379 9E 037C 0382 16 03B3 BA 03B9 11 03BB 03BD 038D 038D 038D 03·8D 3C 038D 31 0390 0393 0393 0393 0393 98 0393 0397 86 039D 3C 03A1 31 03A6 03A9 03A9 03A9 03A9 03A9 BS 03A9 9B 03AC 03AF 03BO 83 03BA 12 03BF BO 03C1 BO 03C5 96 03C9 12 03CD BO 03CF 880 MOVL @CR8$L INTD+VEC$L ID8(R4),R4 ;GET DEVICE CSR ADDRESS 881 40$: DS8INT ,.;tPL"'3i- - ;DISABLE INTERRUPTS 882 BITW #CR CSR M OFFLIN,CR CSR(R4) ;READER OFFLINE? 8B3 BEQL 70$- - - - IF EQL NO 884 WFIKPCH 50$,#2 WAIT FOR TIMEOUT 8B5 IOFORK CREATE FORK PROCESS BB6 BRB 40$ 8B7 888 889 READER TIME OUT OR DEVICE ERROR 890 891 892 50$: MOVZ8W #CR CSR M IE,CR CSR(R4) ;CLEAR READER ERRORS 893 SETI PL UCB$8 FIPL(R5) - ;LOWER TO DEVICE FORK LEVEL 894 BBS #UCB$V CANCEL,UCB$W STS(R5),60$ ;IF SET, CANCEL I/O REQUESTED 895 ACBB #15,#l~UCB$B_CR_OFLCNT(R5),40$ ;IF SET, NOT TIME FOR MESSAGE 896 ~LRB UCB$B CR OFLCNT(R5) CLEAR OFFLINE COUNT 897 PUSHR #AM<R3,R4> SAVE REGISTERS 89B MOVZBL #MSG$ DEVOFFLIN,R4 SET DEVICE MESSAGE NUMBER 899 MOVA8 GASYS$GL_OPRMBX,R3 GET ADDRESS OF OPERATOR MAILBOX 900 JSB GAEXE$SNDEVMSG ;SEND MESSAGE TO OPERATOR 901 POPR #AM<R3,R4> ;RESTORE REGISTERS 902 BRB 40$ 903 904 905 CANCEL CURRENT READ REQUEST 906 907 908 60$: MOVZWL #SS$ ABORT,RO ;SET ABORT STATUS 909 BRW 150$- 910 ; 911 ; DATA OVERFLOW (MORE THAN 80 COL) DETECTED 912 913 914 65$: MOVZBW #CR_CSR_M_IE,CR_CSR(R4) ;INHIBIT READS 915 IOFORK 916 INCW UCB$W ERRCNT(R5) ;INCREMENT HARDWARE ERROR COUNT 917 MOVZWL #SS$ CTRLERR,RO ;RETURN HARDWARE ERROR STATUS 91B BRW 150$- 919 920 921 I NI TI ATE READ 922 923 924 70$: TSTW CR CRB1(R4) ;CLEAR COLUMN BUFFER 92S MOVZBW #CR CSR M IE!CR CSR M READ,- ;ENABLE INTERRUPTS AND START READ 926 CR CSR(R4) - -- ; 927 BO$: WFIKPCH S0$,#3 ;WAITFOR INTERRUPT OR TIMEOUT 92B 929 BITW BNEQ #CR CSR 120$ - M - CRDONE!CR - CSR - Ml fERNREOQR,CYRES C S R ( R 4 ) ;CARD DONE OR ERROR? 930 MOVW CR CRB1(R4),R1 READ BINARY COLUMN 931 MOVW CR-CRB2(R4),R2 READ PACKED COLUMN 932 INCB UCi$B CR COLCNT(RS) INCREMENT COLUMN COUNT 933 BNEQ 90$ - - IF NEQ NOT FIRST COLUMN 934 MOVW R1,UCB$W_CR_FSTCOL(RS) SAVE FIRST COLUMN BINARY DATA CRDRIVER V03-002 - CR11 CARD READER DRIVER 3-JUN-19S4 11:02:03 VAX-11 Macro V03-01 Page 20 START I/O OPERATION ON CRll CARD READER 10-MAR-19B2 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) 0092 C5 0090 C5 OB 51 OFOF BF 04 0091 C5 50 BF 0090 C5 A3 7B B5 52 07 20 A3 06 7S B5 51 7S A5 7S A5 A5 0096 C5 64 64 40 SF 50 OS70 SF 0091 C5 61 50 OS3S SF 51 0096 C5 53 51 OB 65 51 oc 04 51 OD 5D 51 OF 50 01 50 51 61 61 OOCO SF 20 A3 36 OAAA SF 0094 C5 3E OSA2 SF 0094 C5 3D FBDB CF 04 00 44 A5 05 FCCE CF 55 2C B3 32 A3 60 00 32 A3 91 03D4 03DS 15 03DB Bl 03DD 12 03E2 97 03E4 91 03ES 03EB lB 03EE 90 03FO E1 03F4 BO 03F9 D6 03FD D6 0400 0403 11 0409 040B 040B 040B 040B 040B BO 040B 9B 0410 0414 3C 041A 95 041F 13 0423 3C 0425 3C 042A EO 042F EO 0433 0437 0437 0437 0437 EO 0437 EO 043B 043F B3 043F 0443 12 0445 Bl 0447 044B 13 044E B1 0450 0454 13 0457 9E 0459 ED 045E 0461 13 0464 9E 0466 DD 046B DO 046D 2E 0471 0475 0477 935 90$: CMPB UCB$B_CR_EOFCOL(R5),UCB$B_CR_COLCNT(R5) ;PAST END OF FILE DATA? 936 937 93S 939 940 100$: BLEQ CMPW BNEQ DECB CMPB 100$ ;IF LEQ YES #CR EOF,R1 ;END OF FILE PUNCH? 100$ ;IF NEQ NO UCB$B CR EOFCNT(R5) ;DECREMENT END OF FILE COUNT #SO,UCB$B_CR_COLCNT(R5) ;DATA OVERFLOW (MORE THAN 80 COL) ? 941 BLEQU 65$ ;IF LEQU, YES 942 MOVB R2,@UCB$L SVAPTE(R5) ;STORE PACKED COLUMN 943 BBC #I0$V BINARY,IRP$W FUNC(R3),110$ ;IF CLR, ASCII READ 944 MOVW R1,@UCB$L SVAPTE(R5) STORE BINARY COLUMN 945 INCL UCB$L SVAPTE(R5) UPDATE BUFFER ADDRESS 946 110$: INCL UCB$L-SVAPTE(R5) UPDATE BUFFER ADDRESS 947 DSBINT - DISABLE INTERRUPTS 94S BRB SO$ 949 950 951 SPECIAL CONDITION 952 953 954 120$: MOVW CR CSR(R4),UCB$W CR CSR(R5) ;SAVE READER STATUS 955 MOVZBW #CR CSR M IE,CR CSR(R4) ;CLEAR READER ERRORS 956 IOFORK - -- - ;CREATE FORK PROCESS 957 MOVZWL #SS$ ENDOFFILE,RO ;ASSUME END OF FILE ENCOUNTERED 95S TSTB UCB$B CR EOFCNT(R5) ;END OF FILE? 959 BEQL 150$ - - ;IF EQL YES 960 MOVZWL #SS$ DATAOVERUN,RO ;ASSUME TIMING ERROR 961 MOVZWL UCB$W CR CSR(R5),Rl ;GET READER STATUS 962 BBS #CR CSR V TIMERR,Rl,150$ ;IF SET, TIMING ERROR - EXIT 963 BBS #CR=CSR=V=MCHECK,R1 ,1SO$ ;IF SET, MOTION CHECK - RETRY 964 965 ;' *** NOTE: SINCE HOPPER CHECK SETS ERROR, A READ CHECK IS NOT DETECTABLE 966 ;*** IF HOPPER CHECK IS ALSO SET, IE. NO READ CHECK RETRIES ON LAST CARD 967 96S BBS #CR CSR V HCHECK,Rl,125$ ;IF SET, HOPPER CHECK - OK 969 BBS #CR=CSR=V=ERROR,Rl,180$ ;IF SET, READ CHECK - RETRY 970 125$: 971 BITW #IO$M- BINARY!I0$M- PACKED,IRP$W- FUNC(R3),, ;BINARY OR PACKED READ? 972 BNEQ 140$ ;IF NEQ YES 973 CMPW #CR_029,UCB$W_CR FSTCOL(R5) ;CHANGE MODE TO 029 TRANSLATION? 974 BEQL 160$ ;IF EQL YES 975 CMPW #CR 026,UCB$W_CR_FSTCOL(R5) ;CHANGE MODE TO 026 TRANSLATION? 976 977 97S 979 9SO 981 9B2 130$: 9B3 9S4 BEQL MOVAB CMPZV BEQL MOVAB PUSHL MOVL MOVTC 170$ ;IF EQL YES CR CVT029,RO ;GET ADDRESS OF 029 TRANSLATION TABLE #CR$V TMODE,#CR$S TMODE,- ;029 TRANSLATION MODE? UCB$L-DEVDEPEND(R5),#CR$K T029 ; 130$ - ;IF EQL YES CR CVT026,RO ;GET ADDRESS OF 026 TRANSLATION TABLE RS- ;SAVE ADDRESS OF UCB @IRP$L SVAPTE(R3),R1 ;GET ADDRESS OF I/O BUFFER IRP$W_BCNT(R3),(R1),#0,(RO),IRP$W_BCNT(R3),(R1) ;TRANSLATE CRDRIVER V03-002 - CR11 CARD READER DRIVER 3-JUN~l984 11: 02: 03 VAX-11 Macro V03-0l Page 21 START I/O OPERATION ON CR11 CARD READER 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) 55 8EDO 50 01 3C 10 7E A5 FO 50 10 51 04 00 01 FO 44 AS 04 06 11 00 00 FO 44 A5 04 FE74 31 047A 047D 0480 0484 0486 0488 048E 048E 048E 048E 048E 048E 0491 0494 0496 0496 0496 0496 0496 0496 0499 049C 985 986 140$: 987 POPL R5 ;RETRIEVE ADDRESS OF UCB MOVZWL #SS$ NORMAL,RO ;SET NORMAL COMPLETION INSV UCB$W_BCNT(R5),#16,#16,RO ;INSERT TRANSFER BYTE COUNT 988 150$: CLRL Rl ;CLEAR SECOND I/O LONGWORD 989 REQCOM ;COMPLETE REQUEST 990 991 992 ; SET 029 TRANSLATION MODE 993 994 995 160$: INSV #CR$K T029,#CR$V TMODE,- ;SET 029 TRANSLATION MODE 996 #CR$S=TMODE,UCB$L DEVDEPEND(R5) 997 BRB 180$ 998 999 1000 ; SET 026 TRANSLATION MODE 1001 1002 1003 170$: INSV #CR$K T026,#CR$V TMODE,- ;SET 026 TRANSLATION MODE 1004 #CR$S=TMODE,UCB$L_DEVDEPEND(R5) 1005 180$: BRW 20$ CRDRIVER V03-002 - CR11 CARD READER DRIVER CR11 CARD READER INTDERRUPTS 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 22 10-MAR-1982 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(l) 53 9E 54 63 11 64 A5 01 53 10 A5 OC B5 50 BE 52 BE 54 BE 50 64 64 40 BF 50 0400 SF oc 5C A5 07 02 68 A5 00 QA 50 BE 52 BE 54 BE OOOOOOOO'GF 54 02 OOOOOOOO'GF 53 OOOOOOOO'GF 04 50 68 A5 01 049F 1007 .SBTTL CR11 CARD READER INTDERRUPTS 049F 1008 ;+ 049F 1009 CR$INT - CR11 CARD READER INTERRUPTS 049F 1010 049F 1011 THIS ROUTINE IS ENTERED VIA A JSB INSTRUCTION WHEN AN INTERRUPT OCCURS ON A 049F 1012 CR11 CARD READER CONTROLLER. THE STATE OF THE STACK ON ENTRY IS: 049F 049F 049F 049F 1013 1014 1015 1016 OO(SP) = ADDRESS OF IDB ADDRESS. = 04(SP) - 24(SP) = SAVED RO - R5. 28(SP) INTERRUPT PC. 049F 1017 32(SP) = INTERRUPT PSL. 049F 1018 049F 1019 INTERRUPT DISPATCHING OCCURS AS FOLLOWS: 049F 1020 049F 1021 IF THE INTERRUPT IS EXPECTED, THE DRIVER IS CALLED AT ITS 049F 1022 INTERRUPT RETURN ADDRESS (UCB$L FPC). IF THE INTERRUPT IS 049F 1 02;3 NOT EXPECTED AND THE DEVICE IS NOT ALLOCATED, A MESSAGE IS 049F 1024 SENT TO THE JOB CONTROLLER TO INFORM IT THAT AN INPUT 049F 1025 SYMBIONT PROCESS SHOULD BE CREATED TO READ THE CARDS. 049F 1026 ' 049F 1027 049F 1028 CR$INT:: CARD READER INTERRUPT DO 049F 1029 MOVL @(SP)+,R3 GET ADDRESS OF IDB 7D 04A2 1030 MOVQ IDB$L CSR(R3),R4 GET CONTROLLER CSR AND OWNER UCB ADDRESS E5 04A5 1031 BBCC #UCB$V INT,UCB$W STS(R5) 10$ ;IF CLR, INTERRUPT NOT EXPECTED DO 04AA 1032 MOVL UCB$L FR3(R5),R3- RESTORE REMAINING DRIVER CONTEXT 16 04AE 1033 JSB @UCB$L FPC(R5) CALL DRIVER 7D 04B1 1034 MOVQ (SP)+,RO RESTORE REGISTERS 7D 04B4 1035 MOVQ (SP)+,R2 70 0487 1036 MOVQ (SP)+,R4 02 04BA 1037 REI 04BB 1038 04BB 1039 04BB 1040 UNSOLICITED INTERRUPT 04BB 1041 04BB 1042 3C 04BB 1043 10$: MOVZWL CR CSR(R4),RO ;GET READER STATUS 9B 04BE 1044 MOVZBW #CR CSR M IE,CR CSR(R4) ;CLEAR STATUS, ENABLE INTERRUPTS B3 04C2 1045 BITW #CR-CSR-M-ONLINE,RO ;READER TRANSITION TO ONLINE? 13 04C7 1046 BEQL 20$- - - ;IF EQL NO B5 04C9 1047 TSTW UCB$W REFC(R5) ;DEVICE ASSIGNED OR ALLOCATED? 12 04CC 1048 BNEQ 20$ - ;IF NEQ YES E2 04CE 1049 BBSS #UCB$V JOB,UCB$W DEVSTS(R5),20$ ;IF SET, MESSAGE ALREADY SENT 10 04D3 1050 BSBB 30$ - - ;SEND MESSAGE TO JOB CONTROLLER 7D 0405 1051 20$: MOVQ (SP)+,RO ;RESTORE REGISTERS 7D 04D8 1052 MOVQ (SP)+,R2 7D 04DB 1053 MOVQ (SP)+,R4 02 04DE 1054 REI 16 04DF 1055 30$: JSB GAEXE$FORK ;' CREATE FORK PROCESS 9A 04E5 1056 MOVZBL #MSG$ CRUNSOLIC,R4 ;SET MESSAGE TYPE 9E 04E8 1057 MOVAB GASYS$GL JOBCTLMB,R3 ;SET ADDRESS OF JOB CONTROLLER MAILBOX 04EE 16 04EF 1058 JSB GAEXE$SNDEVMSG ;SENT MESSAGE TO JOB CONTROLLER EB 04F5 1059 BLBS R0,40$ ;IF LBS SUCCESSFUL NOTIFICATION AA 04F8 1060 BICW #UCB$M JOB,UCB$W_DEVSTS(R5) ;CLEAR MESSAGE SENT BIT 05 04FC 1061 40$: RSB CRDRIVER V03-002 - CR\1 CARD READER DRIVER CARD READER INITIALIZATION 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 23 10-MAR-1982 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) 04FD 1063 .SBTTL CARD READER INITIALIZATION 04FD 1064 ;+ 04FD 1065 CR INITIAL - CR11 CARD READER INITIALIZATION 04FD 1066 04FD 106'7 THIS ROUTINE IS CALLED AT SYSTEM STARTUP AND AFTER A POWER FAILURE. THE CSR 04FD 1068 ADDRESS OF THE RESPECTIVE CR11 CONTROLLER IS READ TO INSURE ITS PRESENCE ON 04FD 1069 THE UBA AND THEN CARD READER INTERRUPTS ARE ENABLED. 04FD 1070 04FD 1071 INPUTS: 04FD 1072 04FD 1073 R4 = CR11 CONTROLLER CSR ADDRESS. 04FD 1074 R5 = IDB ADDRESS OF DEVICE UNIT. 04FD 1075 04FD 1076 OUTPUTS: 04FD 1077 04FD 1078 ALL REGISTERS ARE PRESERVED. 04FD 1079 04FD 1080 04FD 1081 CR INITIAL: ;CRll INITIALIZATION 64 40 BF 96 04FD 1082 05 0501 1083 MOVZBW #CR CSR M IE,CR CSR(R4) :ENABLE CRll INTERRUPTS- RSB - -- ·~ CRDRIVER V03-002 - CR11 CARD READER DRIVER CARD READER UNIT INITIALIZATION 3-JUN-1984 11:02:03 VAX-11 Macro V03-01 Page 24 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) 64 A5 10 50 24 A5 50 2C AO 04 AO· 55 0502 1085 .SBTTL CARD READER UNIT INITIALIZATION 0502 1086 ;+ 0502 1087 CR CRll INIT - CARD READER UNIT INITIALIZATION 0502 1088 0502 1089 THIS ROUTINE IS CALLED AT SYSTEM STARTUP AND AFTER A POWER FAILURE. THE 0502 1090 ONLINE BIT IS SET IN THE DEVICE UCB. 0502 1091 0502 1092 INPUTS: 0502 1093 0502 1094 R5 = ADDRESS OF DEVICE UCB. 0502 1095 0502 1096 OUTPUTS: 0502 1097 0502 1098 THE ONLINE BIT IS SET IN THE DEVICE UCB AND THE ADDRESS OF THE UCB 0502 1099 IS FILLED INTO THE OWNER FIELD OF THE IDB. 0502 1100 0502 1101 0502 1102 CR CRl 1 INIT: ;CARD READER UNIT INITIALIZATION AB 0502 1103 BISW #UCB$M ONLINE,UCB$W STS(R5) ;SET UNIT ONLINE DO g5Q6 1104 MOVL UCB$L CRB(R5),RO - ;GET ADDRESS OF CRB DO 050A 1105 MOVL CRB$L-INTD+VEC$L IDB(RO),RO ;GET ADDRESS OF IDB DO 050E 1106 MOVL R5,IDB$L_OWNER(RO) ;SET ADDRESS OF DEVICE UCB 05 0512 1107 RSB 0513 1108 CR END: ADDRESS OF LAST LOCATION IN DRIVER 0513 1109 0513 1110 .END CRDRIVER Symbol table $$$ $$OP AT$ UBA CR$DDT CR$INT CR$K T026 CR$K-T029 CR$S-TMODE .CR$V-TMODE CRB$L INTO CR 026 CR-029 CR-CANCEL! 0 CR-CR11 INIT CR-CRB1CR-CRB2 CR-CSR CR-CSR M CRDONE CR-CSR-M-ERROR CR-CSR-M-IE CR-CSR-M-OFFLI N CR-CSR-M-ONLINE CR-C·SR-M-READ CR-CSR-V-ERROR CR-CSR-V-tiCHECK CR-CSR-V-MCHECK CR-CSR-V-TIMERR CR-CVT02G CR-CVT029 CR-END CR:-EOF CR-FUNCTABLE CR-INITIAL CR-READ CR-START IO DC$ CARD DDB$L DDT DEV$M-AVL DEV$M-IDV DEV$M-NNM DEV$M-REC DPT$C-LENGTH DPT$C-VERSION DPT$INITAB DPT$REINITAB DPT$TAB OT$ CR11 DVN$C CRB DVN$C-DDB DYN$C=QPT DVN$C UCB EXE$ABORl'I 0 EXE$ALLOCBUF · EXE$BUFFRQUOTA EXE$FINISHIOC EXE$FORI! EXE$IOFORK - CR 11 CARD READER DRIVER 3-JUN-1984 11: 02: 03 VAX-11 Macro V03-0l Page 25 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(l) = = 00000020 00000002 R 02 = 00000001 0.0000000 RG 03 0000049F RG = = 00000000 00000001 = 00000004 = 00000000 = 00000024 = 000008A2 = OOOOOAAA 03 0000026C R 03 00000502 R 03 00000002 00000004 = 00000000 00004000 = 00008000 == 00000040 00000100 = 00000400 = 00000001 = = = = OOOOOOOF 00000000 oooooooc 00000008 00000138 R 03 00000038 R 03 = 00000513 R OOOOOFOF 03 00000238 R 03 000004FD R 03 00000276 R 03 000002F1 = = 00000041 oooooooc R 03 ******** x 02 ******** x 02 ******** x 02 = ******** 00000038 x 02 = 00000004 00000038 R 02 00000062 R 02 00000000 R = 00000001 = 00000005 02 = = 00000006 OOOOOOlE = 00000010 ******** x 03 ******** x 03 ******** x 03 ******** ******** ******** x x x 03 03 03 EXE$QIODRVPKT EXE$READCHK EXE$SENSEMODE EXE$SETMODE EXE$SNDEVMSG FUNCTA8 LEN IDB$L CSR IDB$L-OWNER IO$M BINARY IO$M-PACKED I0$V-BINARV IO$ READLBLK IO$-READPBLK I0$-READVBLK !0$-SENSECHAR IO$-SENSEMODE IO$-SETCHAR IO$-SETMODE !0$-VIRTUAL IOC$CANCELI 0 IOC$MNTVER IOC$REQCOM IOC$RETURN IOC$WFIKPCH IRP$L MEDIA IRP$L-SVAPTE IRP$S-FCODE IRP$V-FCODE IRP$W-BCNT IRP$W-BOFF IRP$W-FUNC JIB$L=BVTCNT MASKH MAS KL MSG$ CR UN SO LI C MSG$=DEVOFFLIN Pl P2 P3 P4 P5 P6 PCB$L JIB PR$_ IPL SIZ ... SS$ ABORT sss:=cTRLERR SS$ DATAOVERUN SS$-ENDOFFILE SS$-NORMAL svs$GL JOBCTLMB SYS$GL-OPRMBX UCB$B CR COLCNT UCB$B-CR-EOFCNT UCB$8-CR-EOFCOL UCB$B_CR_OFLCNT UCB$B=DEVCLASS ******** x 03 ******** x 03 ******** x 03 ******** x 03 = ******** 00000034 x 03 = = = 00000000 00000004 00000040 = 00000080 = 00000006 = 00000021 = oooooooc = 00000031 = 00000018 = 00000027 = = OOOOOOlA 00000023 = 0000003F ******** x 03 **************** x x 03 03 ******** x 03 = ******** 00000038 x 03 == 0000002C 00000006 = 00000000 = 00000032 = 00000030 = = 00000020 00000020 = = = 00000080 08000000 00000002 = = = = = 00000005 00000000 00000004 00000008 oooooooc = = = = = = = 00000010 00000014 00000080 00000012 00000001 0000002C 00000054 = = = 00000838 00000870 00000001 ******** x 03 ******** x 03 00000090 00000091 00000092 = 00000093 00000040 CRDRIVER Symbol table - CR11 CARD READER DRIVER 3-JUN-1984 11 :02:03 VAX-11 Macro V03-01 Page 26 10-MAR-1982 20:31:59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) UCB$B DEVTVPE UCB$B-DIPL UCB$B-FIPL UCB$K-CR LENGTH UCB$K-LENGTH UCB$L-CRB UCB$L-DEVCHAR UCB$L-DEVCHAR2 UCB$L-DEVDEPEND UCB$L-FPC UCB$L-FR3 UCB$L-SVAPTE UCB$M-JOB UCB$M-ONLINE UCB$V-CANCEL UCB$V-INT UCB$V-JOB UCB$W-BCNT UCB$W-CR CSR UCB$W-CR-FSTCOL UCB$W-DEVBUFSIZ UCB$W-DEVSTS UCB$W-ERRCNT UCB$W-REFC UCB$W-STS VEC$L-IDB VEC$L -INITIAL VEC$L=UN IT IN IT 00000041 0000005E oooooooe 00000098 00000090 00000024 00000038 0000003C 00000044 oooooooc 00000010 00000078 00000001 00000010 00000003 00000001 00000000 0000007E 00000096 00000094 00000042 00000068 00000082 0000005C 00000064 00000008 oooooooc 00000018 +----------------+ +! -P-s-e-c--t --s-y-n-o-p-s-i-s-+! PSECT name ABS $ABS$ $$$105 PROLOGUE $$$115=DRIVER Allocation ---------- -PS-E-C-T---N-o-. Attributes ---------- 00000000 ( 0. ) 00 ( 0.) NOP IC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE 00000098 ( 152.) 01 ( 1 . ) NOP IC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE 00000077 ( 119.) 02 ( 2.) NOPIC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 00000513 ( 1299.) 03 ( 3.) NOPIC USR CON REL LCL NOSHR EXE RD WRT NOVEC LONG +------------------------+ ! Performance indicators ! +----~-------------------+ Phase Page faults CPU Time Elapsed Time Initialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals 35 00:00:00.08 00:00:02.17 97 00:00:00.51 00:00:06.20 524 00:00:23.55 00:01:16.65 0 00:00:03.25 00:00: 10.16 199 00:00:04.98 00:00:17.35 16 00:00:00.14 00:00:00.71 3 00:00:00.02 0.0:00 00.02 0 00:00:00.00 00:00 00.00 877 00:00:32.54 00:01 53.26 The working set limit was 1800 pages. CRDRIVER VAX-11 Macro Run Statistics - CR11 CARD READER DRIVER 3-JUN-1984 11 :02:03 VAX-11 Macro V03-0l Page 27 10-MAR-1982 20:31 :59 DISK$VMSMASTER:[DRIVER.SRC]CRDRIVE(1) 123849 bytes (242 pages) of virtual memory were used to buffer the intermediate code. There were 110 pages of symbol table space allocated to hold 2103 non-local and 29 local symbols. 1119 source lines were read in Pass 1, producing 18 object records in Pass 2. 36 pages of virtual memory were used to define 33 macros. +--------------------------+ ! Macro library statistics ! +--------------------------+ Macro library name Macros defined $255$DUA28:[SYS.OBJ]LIB.MLB;1 20 -$255$DUA28:[SYSLIB]STARLET.MLB;2 11 TOTALS (all libraries) 31 2350 GETS were required to define 31 macros. There were no errors, warnings or information messages. MACRO/LIS=LIS$:CRDRIVER/OBJ=OBJ$:CRDRIVER MSRC$:CRDRIVER/UPDATE=(ENH$:CRDRIVER)+EXECML$/LIB SYSQIOREQ SYSQIOREQ Table of contents ( 1) 76 ( 1) 131. 32 ( 1) 165 ( 1) 583 ( 1) 701 ( 1) 752 ( 1) 775 ( 1) 810 ( 1) 845. 10 ( 1) 847 ( 1) 870 - QUEUE I/O REQUEST SYSTEM SERVICE 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 DECLARATIONS QIO ERROR AND EXCEPTION HANDLING ROUTINES QUEUE I/O REQUEST BUILD I/O.PACKET FOR PAGE READ/WRITE COMPLETE I/O OPERATION QUEUE I/O PACKET TO DRIVER EXE$ALTQUEPKT - Call driver ALTSTART entry point QUEUE I/O PACKET TO ACP EXE$QXQPPKT - QUEUE I/O PACKET TO XQP INSERT I/O PACKET IN UNIT QUEUE INSERT I/O PACKET IN QUEUE BY PRIORITY Page 0 SYSQIOREQ V03-012 ;LMP0221 -1 ;LMP0221 ;LMP0221 ;LMP0221 ;SRB0118 ; SRBO 118 ;SRB0118 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;SSA0017 ;SSA0017 ;SSA0017 ;SSA0017 SSA0017 LMP0206 LMP0206 LMP0206 - QUEUE I/O REQUEST SYSTEM SERVICE 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 1 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC)SYSQIOREQ.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1 .TITLE SYSQIOREQ - QUEUE I/O REQUEST SYSTEM SERVICE .1 .!DENT 'V03-012' 3 4 5 ;' **************************************************************************** 6 ;* 7 ;* 8 ;* 9 ;* 10 COPYRIGHT (c) 1978, 1980, 1982 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. ALL RIGHTS RESERVED. * * * * ; * * 11 ;* 12 ;* 13 ;* 14 ;* 15 ;* 16 ;* 17 ; * 18 ;* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED. THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * * * * * * * * 19 * 20 ;;** 21 ; * 22 ;* AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION. DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS * * * 23 ;* SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. 24 ; * 25 ; * * * * 26 ;**************************************************************************** 27 28 ;++ 29 30 AUTHOR: 31 32 D. N. CUTLER, 14-JUN-76 33 34 FACILITY: 35 36 SYSTEM SERVICE QUEUE 1/0 REQUEST 37 38 MODIFIED BY: 39 .1 V03-012 LMP0221 L. Mark Pilant, 30-Mar-1984 17:08 . 2 Remove references to UCB$L_OWNUIC and UCNB$W_VPROT. .3 .4 V03-0l1 SRB0118 Steve Beckhardt 23-Mar-1984 . 5 Changed waiting ~or DIOCNT or BIOCNT tci' wait at IPL 0. .6 . 7 V03-010 CDS0005 Christian D. Saether 20-Mar-1984 .8 Use symbolic definition to locate XQP queue header. .9 Give the XQP ast a priority boost. . 10 .11 V03-009 SSA0017 Stan Amway 9-Mar-1984 . 12 Maintain device queue length in UCB. . 13 Efficiently supports MONITORS disk class and provides .14 accurate queue lengths for HSC and UDA disks. .. 15 . 16 V03-008 LMP0206 L. Mark Pilant, 7-Mar-1984 12:20 . 17 Only do an access check on the first QIO to the channel for . 18 logical and physical requests. SYSQIOREQ V03-012 ;LMP0206 ;LMP0185 ;LMP0185 ;LMP0185 ;CDS0004 ;CDS0004 ;CDS0004 ;CDS0004 ;CDS0004 ;RLRMXBCNTC ;RLRMXBCNTC ;RLRMXBCNTC ;RLRMXBCNTC ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CD~0002 ;CDS0002 ;CDS0002 ;CDS0002 ;CDS0002 ;CDS0002 ;CDS0002 ;CDSOOOl ;CDSOOOl ;CDSOOOl ;LJK0172 ;LJK0172 ;LJK0172 -33 - QUEUE 1/0 REQUEST SYSTEM SERVICE 3-JUN-1984 15:39:30 VAX-11 Macro V03-0l Page 2 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 0000 0000 000{) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 .19 .20 ; . 21 ; .22 ; .23 ; .24 ; .25 ; . 26 ; .27 ; .28 ; .29 ; . . 30 ; . 31 .32 ; .33 ; . 34 ; .35 ; .36 ; .37 ; .38 ; .39 ; .40 ; . 41 ; .42 ; .43 ; .44 ; .45 ; .46 ; .47 ; . 48 ; 73 74 V03-007 LMP0185 L. Mark Pilant, Add support for ACLs on devices. 27-Jan-1984 11 :05 V03-006 CDS0004 Christian D. Saether 20-May-1983 Get the PIO from the PCB instead of the IRP so that journalling works ( i t uses the irp pid field for something else) . V03-005 RLRMXBCNTc Robert L. Rappaport 28-Mar-1983 Verify IRP$L DIAGBUF is non-zero before assuming that i t contains the-original value of IRP$L_SVAPTE in VIRTUAL_LOGIO . V03-004 CDS0003 Christian D. Saether 14-Mar-1983 Return from EXE$QXQPPKT with status, rather than assuming success . V03-003 CDS0002 Christian D. Saether 12-Mar-1983 Do not insque packet to xqp work queue in EXE$QXQPPKT, but rather pass it as the ast parameter and queue it in the xqp, if necessary. This avoids a problem where the packet is processed by the xqp before the ast is dequeued . V03-002 CDS0001 c Saether 13-Aug-1982 Changes to send file system packets to XQP. V03-001 LJK0172 Lawrence J. Kenah 18-June-1982 Count 1/0 operations in EXE$BLDPKTxxxx to allow file expiration to work correctly for mapped files . SYSQIOREQ V03-012 ;CDS0001 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 -4 - QUEUE I/O REQUEST SYSTEM SERVICE DECLARATIONS 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 3 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SVS.SRC]SYSQIOREQ.(1) 00000004 00000008 oooooooc 00000010 00000014 00000018 0000001C 00000020 00000024 00000028 0000002C 00000030 00000000 00000008 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 76 .SBTTL DECLARATIONS 77 78 79 MACRO LIBRARY CALLS 80 81 82 $ACBDEF ;DEFINE ACB OFFSETS 83 $AQBDEF ;DEFINE AQB OFFSETS 84 $CA DEF ;DEFINE CONDITIONAL ASSEMBLY PARAMETERS 85 $CCBDEF ;DEFINE CCB OFFSETS . 1 $CDRPDEF ;DEFINE CORP OFFSETS . 2 $DDBDEF ;DEFINE DOB OFFSETS · 3 $DDTDEF ;DEFINE DDT OFFSETS .4 $DEVDEF ;DEFINE DEV VALUES .5 $DYNDEF ;DEFINE DATA STRUCTURE TYPE CODES .6 $F11BDEF ;DEFINE F11BXQP OFFSETS 90 $IODEF ;DEFINE IO FUNCTION CODES 91 $IPLDEF 92 $IRPDEF ;DEFINE INTERRUPT PRIORITY LEVELS ;DEFINE IRP OFFSETS 93 $PCBDEF 94 $PHDDEF ;DEFINE PCB OFFSETS ;DEFINE PHO OFFSETS 95 $PRDEF ;DEFINE PROCESSOR REGISTERS 96 $PRIDEF ;DEFINE PRIORITY CLASS INCREMENTS 97 $PRVDEF ;DEFINE PRIVILEGE BITS 98 $PSLDEF ;DEFINE PROCESSOR STATUS FIELDS 99 $RSNDEF 100 $SECDEF ;DEFINE RESOURCE WAIT NUMBERS ;DEFINE SEC OFFSETS 101 $SSDEF 102 $UCBDEF ;DEFINE STATUS VALUES ;DEFINE UCB OFFSETS 103 $VCBDEF ;DEFINE VCB OFFSETS 104 $WCBDEF ;DEFINE WINDOW CONTROL BLOCK OFFSETS 105 106 107 LOCAL SYMBOLS 108 109 ARGUMENT LIST OFFSET DEFINITIONS 110 111 112 EFN=4 113 CHA.N=S 114 FUNC=12 115 IOSB=16 116 ASTADR=20 117 ASTPRM=24 118 P1=28 119 P2=32 120 P3=36 121 P4=40 122 P5=44 123 P6=48 . 124 125 ;EVENT FLAG NUMBER ;l/O CHANNEL NUMBER ;I/O FUNCTION CODE ;ADDRESS OF I/O STATUS BLOCK ;ADDRESS OF AST SERVICE ROUTINE ;AST SERVICE ROUTINE PARAMETER ;FIRST FUNCTION DEPENDENT PARAMETER ;SECOND FUNCTION DEPENDENT PARAMETER ;THIRD FUNCTION DEPENDENT PARAMETER ;FOURTH FUNCTION DEPENDENT PARAMETER ;FIFTH FWNCTION DEPENDENT PARAMETER ;SIXTH FUNCTION DEPENDENT PARAMETER 126 ; FUNCTION DECISION TABLE OFFSET DEFINITIONS 127 128 129 LEGAL=O 130 IOTYPE=8 ;LEGAL FUNCTION MASK ;I/O FUNCTION TYPE MASK SYSQIOREQ V03-012 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ·; LMPOl 85 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP'0185 ;LMP0185 ;LMP0185 LMP0185 LMP0185 LMP0185 LMP0185 LMP0185 LMP0185 - QUEUE I/O REQUEST SYSTEM SERVICE DECLARATIONS 3-JuN~1984 15:39:30 VAX-11 Macro V03-01 Page 4 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 00000010 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0008 0008 0008 0008 0008 131 FDTACT=16 ;ACTION ROUTINE MASKS .1 . 2 · 3 TABLES FOR DETERMINING THE ACCESS DESIRED, BASED UPON THE I/O FUNCTION .4 CODE. THIS IS NECESSARY FOR THE FIRST TIME THROUGH PROTECTION CHECK DONE . 5 ON SHARABLE, NON-MOUNTABLE (NON-FILES ORIENTED) DEVICES . .6 · 7 .8 .MACRO ACCMSK CODES .9 MAS KL = 0 .10 MASKH = 0 .11 . 12 .IRP X,<CODES> .13 .IF GT <IO$ 'X&IO$ VIRTUAL>-31 .14 MASKH .15 .16 MAS KL . 17 = MASKH!<l@<<IO$ 'X&IO$ VIRTUAL>-32>> .IFF - - = MASKL!<l@<IO$ 'X&IO$ VIRTUAL>> .ENDC; GT -<IO$ 'X&IO$ VIRTUAL>~31 . 18 .ENDR ; X,<CODES> - - .19 .LONG MASKL,MASKH .20 .ENDM ACCMSK . 21 .22 READ ACCESS: .23 - ACCMSK <READPBLK,READLBLK,READVBLK,- .24 READHEAD,READTRACKD,REREADN,REREADP,- .25 READPROMPT,TTYREADALL,TTVREADPALL> .26 .27 WRITE ACCESS: .28 - ACCMSK <WRITEPBLK,WRITELBLK,WRITEVBLK,- .29 WRITECHECK,WRITECHECKH,- .30 WRITEHEAD,WRITETRACKD,WRITERET> SYSQIOREQ V03-012 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 ;LMP0185 -2 LMP0185 LMP0185 LMP0185 LMP0185 LMPO 1"85 - QUEUE I/O REQUEST SYSTEM SERVICE 3-JUN-1984 15:39:30 VAX-11 Macro V03-0l Page 5 QIO ERROR AND EXCEPTION HANDLING ROUTINE 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 0010 0010 0010 0010 0010 1E 08 A6 02 E2 0010 19 38 A5 10 El 0015 50 OOOO'CF 9E 001A OA DD AF _ 57 EO 001F 50 OOOO'CF 9E 0024 05 DB AF 57 El 0029 60 16 002E 12 50 E9 0030 0092 31 0033 0036 0036 0036 0036 0036 0036 FFC7' 30 0036 40 11 0039 50 013C BF 3C 003B 03 11 0040 50 24 3C 0042 OODF 31 0045 0048 0048 0048 0048 0048 0048 0048 4C A4 01 3C 004B 52 OOOO'CF 7E 004F 4C A4 E2 0054 00 OOOO'CF 0057 FFA2' 31 005B 005E 005E 005E 57 2F Dl 005E 60 18 0061 55 60 A5 DO 0063 SA 11 0067 0069 0069 0069 0069 A5 11 0069 .32 .SBTTL QIO ERROR AND EXCEPTION HANDLING ROUTINES .33 . 34 Device is not mountable. .35 .36 N' OT FILE DEV: See if it is necessary to do the protection check . .37 - BBSS #CCB$V PROCHKDON,CCB$B STS(R6),20$ ;XFER IF HERE ALREADY .38 BBC #DEV$V-SHR,UCB$L DEVCHAR(R5),20$ ;XFER IF NOT SHARABLE .39 MOVAB WAEXE$CHKRDACCES:Ro ;SET ADDR OF CHECKING ROUTINE .40 BBS R7,READ ACCESS,10$ ;XFER IF A READ FUNCTION .41 MOVAB WAEXE$CHKWRTACCES,RO ;SET ADDR OF CHECKING ROUTINE .42 BBC R7,WRITE ACCESS,20$ ;XFER IF NOT WRITE FUNCTION .43 10$: JSB (RO) - ;DO PROTECTION CHECK .44 BLBC RO,ERRORB ;XFER IF NOT SUCCESSFUL .45 20$: BRW CHKDON ;ELSE REJOIN MAINLINE CODE 134 135 ; MISCELLANEOUS ERROR HANDLING AND EXCEPTION HANDLING ROUTINES. THESE HAVE 136 ; BEEN MOVED OUT OF LINE TO MAKE THE COMMON PATH NEARLY BRANCH FREE. 137 138 139 CLREF: 140 BSBW SCH$CLREF CLEAR SPECIFIED EVENT FLAG 141 BRB VCHAN CONTINUE WITH QIO 142 IVCHAN: MOVZWL #SS$ IVCHAN,RO SET ERROR STATUS 143 BRB ERR ORB AND ERROR REQUEST 144 PRIVERR: MOVZWL #SS$ NOPRIV,RO SET ERROR STATUS 145 ERRORB: BRW ERROR AND ERROR REQUEST 146 147 148 An access or deaccess operation is pending for this channel. Wait for 149 it to complete, then retry the QIO. 150 151 152 DACSPND:SETIPL #IPL$ SYNCH ;SYNCHRONIZE ACCESS TO SYSTEM DATA BASE 153 MOVZWL #RSN$-ASTWAIT,PCB$L EFWM(R4) ;SET AST WAIT RESOURCE NUMBER 154 MOVAQ WASCHiGQ MWAIT,R2 - ;SET ADDRESS OF WAIT QUEUE 155 BBSS PCB$L_EFWM(R4),WASCH$GL_RESMASK,10$ ;SEI WAITING FLAG 156 10$: BRW 157 . SCH$WAIT ;WAIT FOR AST 158 ,; Device is marked spooled. Acquire intermediate UCB address if virtual funtion. 159 160 S' POOL: CMPL SA#IO$ LOGICAL,R7 VIRTUAL I/O FUNCTION? 161 BGEQ NS POOL IF GEQ NO 162 MOVL UCB$L AMB(R5),R5 GET INTERMEDIATE DEVICE UCB ADDRESS 163 BRB NS POOL · 1 · 2 Intermediate branch to the protection checking routine. . 3 .4 N' OT FILE DEVB: .5 - BRB NOT- FILE- DEV SYSQIOREQ V03-012 - QUEUE I/O REQUEST SYSTEM SERVICE QUEUE I/O REQUEST 3-JUN-1984 15:39:30 VAX-11 Macro V03-0l Page 6 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 0068 006B 006B 006B 0068 0068 006B 0068 0068 006B 0068 0068 006B 0068 0068 006B 0068 0068 006B 0068 0068 0068 006B 0068 006B 006B 0068 0068 0068 0068 006B 0068 0068 0068 006B 006B 0068 0068 0068 0068 0068 006B 0068 0068 006B 006B 006B 006B 0068 006B 006B 0068 006B 006B 006B 0068 006B 165 .SBTTL QUEUE I/O REQUEST 166 ;+ 167 ; EXE$QIOREQ - QUEUE I/O REQUEST 168 169 THIS SERVICE PROVIDES THE CAPABILITY TO INITIATE AN I/0 OPERATION 170 BY QUEUEING A REQUEST TO A DEVICE'S ASSOCIATED DRIVER. ONCE THE 171 OPERATION HAS BEEN INITIATED, CONTROL WILL RETURN TO THE CALLER 172 WHO CAN SYNCHRONIZE I/O COMPLETION IN ONE OF THREE WAYS: 173 174 1) SPECIFY THE ADDRESS OF AN AST ROUTINE THAT WILL BE 175 EXECUTED WHEN THE I/O COMPLETES. 176 177 2) WAIT FOR THE SPECIFIED EVENT FLAG TO BE SET. 178 179 3) POLL THE SPECIFIED I/O STATUS BLOCK FOR A COMPLETION 180 STATUS. 181 182 THIS ROUTINE VERIFIES THE FUNCTION INDEPENDENT PARAMETERS, ALLOCATES 183 AN I/O REQUEST PACKET, COPIES THE FUNCTION INDEPENDENT PARAMETERS AND 184 PROCESS INFORMATION TO THE I/O PACKET, CHECKS ACCESS TO THE DEVICE, 185 AND CALLS THE DRIVER'S FUNCTION DECISION TABLE ROUTINE(S) THAT CORRESPOND 186 TO THE SPECIFIED FUNCTION. IT IS THEN UP TO THE FDT ROUTINE TO EITHER 187 COMPLETE THE REQUEST IMMEDIATELY (EXE$ABORTIO OR EXE$FINISHIO) OR TO 188 QUEUE THE I/O REQUEST FOR FURTHER PROCESSING BY THE DRIVER'S STARTIO 189 ROUTINE (EXE$QIODRVPKT). 190 191 INPUTS: 192 193 EFN(AP) = EVENT FLAG NUMBER. 194 CHAN(AP) = I/0 CHANNEL NUMBER. 195 FUNC(AP) = I/0 FUNCTION CODE. 196 IOSB(AP) = ADDRESS OF I/O STATUS BLOCK. 197 ASTADR(AP) = ADDRESS OF AST SERVICE ROUTINE. 198 ASTPRM(AP) = AST SERVICE ROUTINE PARAMETER. 199 Pl(AP) TO P6(AP) =FUNCTION DEPENDENT PARAMETERS. 200 201 R4 = CURRENT PROCESS PCB ADDRESS. 202 203 OUTPUTS: 204 205 RO LOW BIT CLEAR INDICATES FAILURE TO INITIATE THE I/O REQUEST. 206 207 RO = SS$_ABORT - A NETWORK LOGICAL LINK WAS BROKEN. 208 209 RO = SS$ ACCVIO - THE I/0 STATUS BLOCK CANNOT BE WRITTEN BY 210 THE CALLER. 211 212 RO = SS$_DEVOFFLINE - THE SPECIFIED DEVICE IS OFFLINE. 213 214 RO = SS$ EXQUOTA - THE PROCESS HAS EXCEEDED ITS BUFFERED I/O 215 QUOTA, DIRECT I/O QUOTA, OR BUFFERED I/O BYTE COUNT 216 QUOTA AND HAS DISABLED RESOURCE WAIT MODE. OR, THE 217 PROCESS HAS EXCEEDED ITS AST LIMIT QUOTA. 218 219 RO = SS$_ILLEFC - AN ILLEGAL EVENT FLAG NUMBER WAS SPECIFIED. 220 221 RO = SS$ INSFMEM - INSUFFICIENT DYNAMIC MEMORY IS AVAILABLE SVSQIOREQ V03-012 - QUEUE I/0 REQUEST SYSTEM SERVICE QUEUE I/O REQUEST 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 7 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) OFFC 53 04 AC 9A 3F 53 91 co 1A 00 50 A4 53 E5 FFFFOOOF 8F CB 50 08 AC 85 13 50 81 00000000'9F AC 1A 59 50 CE OOOOOOOO'FF49 9E 56 53 DC 53 02 16 EF 58 59 59 10 78 09 A6 58 91 97 18 55 66 DO 96 04 A6 EB 5A OC AC 3C FFFFFFCO BF CB 57 5A 98 38 A5 06 EO 0068 0068 0068 0068 0068 0068 0068 006B 0068 0068 006B 006B 006B 006B 0068 0068 0068 0068 006D 006D 006D 006D 006D 0071 0074 0076 007B 007B 007B 007B 007B 007B 0081 0084 0086 0088 0080 008F 0092 0099 009A 009C OOAO 00A1 00A5 OOA9 OOAB OOAE OOB2 OOB2 0082 0082 OOB2 OOB2 0086 OOBC OOBE 222 TO ALLOCATE AN I/O REQUEST PACKET AND THE PROCESS HAS 223 DISABLED RESOURCE WAIT MODE. 224 225 RO = SS$_IVCHAN - AN INVALID CHANNEL NUMBER WAS SPECIFIED. 226 227 RO = SS$ NOPRIV - THE SPECIFIED CHANNEL DOES NOT EXIST OR WAS 228 ASSIGNED FROM A MORE PRIVILEGED ACCESS MODE. OR, THE 229 PROCESS DOES NOT HAVE THE PRIVILEGE TO PERFORM THE 230 SPECIFIED TYPE OF I/O FUNCTION ON THE DEVICE. 231 232 RO = SS$_UNASEFC - UNASSOCIATED EVENT FLAG CLUSTER SPECIFIED. 233 234 RO LOW BIT SET INDICATES SUCCESSFUL COMPLETION. 235 236 = RO SS$_NORMAL - NORMAL COMPLETION. 237 238 239 .ENTRY EXE$QI0,AM<R2,R3,R4,R5,R6,R7,R8,R9,R10,R11> 240 241 Clear specified event flag. For local event flags, this is done in line. 242 243 244 QIO: MOVZBL EFN(AP),R3 GET EVENT FLAG NUMBER 245 CMPB R3,#63 CHECK FOR LOCAL 246 BGTRU CLREF IF NO, MUST DO FULL CLREF 247 BBCC R3,PCB$L_EFCS(R4),VCHAN CLEAR SPECIFIED EVENT FLAG 248 249 250 Validate channel number, compute CCB address and acquire UCB address. 251 252 253 VCHAN: BICL3 #<AXFFFFOOOO!<CCB$C LENGTH-1>>,-;FETCH'CHANNEL NUMBER AND 254 CHAN(AP),RO - CLEAR EXTRANEOUS BITS 255 BEQL IVCHAN IF EQL INVALID CHANNEL 256 CMPW RO,@#CTL$GW_CHINDX LEGAL CHANNEL NUMBER? 257 BGTRU IVCHAN IF GTRU NO 258 MNEGL RO,R9 CONVERT TO CHANNEL INDEX 259 MOVAB @CTL$GL_CCBBASE[R9],R6 GET ADDRESS OF CORRESPONDING CCB 260 MOVPSL R3 ;READ CURRENT PSL 261 EXTZV #PSL$V_PRVMOD,#PSL$S_PRVMOD,R3,R11 ;EXTRACT PREVIOUS MODE FIELD 262 ASHL #16,R9,R9 PREPARE CHANNEL INDEX. FOR LATER MERGE 263 CMPB R11 ,CCB$B AMOD(R6) CALLER HAVE PRIVILEGE TO ACCESS CHANNEL? 264 BGEQ PRIVERR - IF GEO NO 265 MOVL CCB$L UCB(R6),R5 GET ASSIGNED DEVICE UCB ADDRESS 266 BLBS CCB$L=WIND(R6),DACSPND IF LBS ACCESS/DEACCESS PENDING 267 268 269 Isolate function code and begin decoding 270 271 272 MOVZWL FUNC(AP),RlO ;GET I/O FUNCTION CODE AND MODIFIERS 273 BICL3 #AC<IO$M_FCODE>,R10,R7 ;CLEAR ALL BUT I/O FUNCTION CODE 274 BBS SA#DEV$V_SPL,UCB$L_DEVCHAR(R5),SPOOL ;IF SET, DEVICE IS SPOOLED SYSQIOREQ V03-012 LMP01S5 LMP01S5 1 ;SRB0118 - QUEUE I/O REQUEST SYSTEM SERVICE QUEUE I/0 REQUEST 3-JUN-1984 15:39:30 VAX-11 Macro V03-0l Page 8 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SVSQIOREQ.(1) Al 3S AS OE 50 0088 cs SB 08 AO 37 68 57 39 64 AS 04 51 10 AC 08 61 7B 08 AB S7 S9 3A A4 79 3A A4 52 6E 62 FEFB' lF 50 9E 64 50 OOF4 BF 14 57 34 C2 57 3S BO 50 0084 BF 03 50 DC so 51 60 A4 52 OOC3 OOC3 OOC3 OOC3 OOC3 El OOC3 DO DOCS DO OOCD El 0001 El 0005 OODA OODA OODA OODA OODA DO OODA 13 OODE OOEO 7C DOES ODES OOEB OOEB ODES OOEB OOEB OOEB OOEB El OOEB OOFO B6 OOFO 87 OOF2 18 OOFS 3F OOF7 DO OOFA B6 OOFD DOFF 30 0102 E9 0105 B7 010S 11 OlOA OlOC 3C 010C 11 0111 0113 91 0113 13 0116 91 0118 13 01 lB 0110 3C 0110 11 0122 0124 3C 0124 0127 DD 012A DO 012C 04 0130 275 276 277 Acquire FDT address. 278 279 .1 NSPOOL: BBC #DEV$V FOD,UCB$L DEVCHAR(R5),NOT FILE DEVB ;XFER IF NOT MOUNTAB . 2 CHKDON: MOVL UCB$L DDT(R5),RO- ;GET ADDRESS OF DDT 281 MOVL DDT$L-FDT(RO),R8 ;GET ADDRESS OF FDT 282 BBC R7,LEGAL(R8),ILLIO ;IF CLR, ILLEGAL I/O FUNCTION 283 BBC #UCB$V_ONLINE,UCB$W_STS(R5),0FFLINE ;IF CLR, DEVICE OFFLINE 284 285 286 Probe and clear IOSB if it is specified. 287 288 289 PRIOSB: MOVL IOSB(AP),Rl GET ADDRESS OF I/O STATUS BLOCK 290 BEQL NOIOSB IF EQL NONE SPECIFIED 291 IFNOWRT #8,(Rl),ACCVIO CAN I/O STATUS BLOCK BE WRITT~N? 292 CLRQ (Rl) CLEAR I/O STATUS BLOCK 293 294 295 Charge appropriate I/O counts depending upon type. Counts will have to 296 be backed out if no I/O packet is available. Set IPL to block process 297 deletion once we are committed. 298 299 300 NOIOSB: SETIPL #IPL$ ASTDEL ;PREVENT PROCESS DELETION 301 BBC R7,IOTVPE(RB),DIRECT ;IF CLR, DIRECT I/O FUNCTION 302 ASSUME IRP$M BUFIO EQ 1 ;TO ALLOW INCREMENT BELOW 303 INCW R9 - ;SET IRP$M BUF~O 304 DECW PCB$W BIOCNT(R4) ;CHARGE FOR ANOTHER BUFFERED I/O 305 BGEQ OK - ;OK IF NOT NEGATIVE 306 PUSHAW PCB$W BIOCNT(R4) ;SET ADDRESS OF QUOTA CELL 307 NOCNT: MOVL (SP) ,R2 ;FETCH QUOTA ADDRESS 308 INCW (R2) ;BACKOUT CHARGE .1 SETI PL #0 ;LOWER IPL TO WAIT AT IPL 0 309 BSBW EXE$SNGLEQUOTA ;CHECK UNIT QUOTA OF I/O FUNCTION TYPE 310 BLBC RO,ERROR ;IF LBC QUOTA EXCEEDED 311 DECW @(SP)+ ;CHARGE FOR I/O OF TYPE 312 BRB OK 313 314 I LLI 0: MOVZWL #SS$ ILLIOFUNC,RO ;SET ILLEGAL I/O FUNCTION STATUS 315 BRB ERROR 316 317 OFFLINE:CMPB #IO$ DEACCESS,R7 ;CHECK FOR DEACCESS I/O FUNCTION 318 BEQL PRIOSB ;ALLOW IT TO PROCEED 319 CMPB #IO$ ACPCONTROL,R7 ;LIKEWISE FOR ACP CONTROL 320 BEQL PRIOSB ;SO THAT A FILE ON AN OFFLINE DEVICE 321 ;MAY BE CLOSED 322 MOVZWL #SS$ DEVOFFLINE,RO ;SET DEVICE OFFLINE STATUS 323 BRB ERROR 324 325 ACCVIO: MOVZWL SA#SS$ ACCV IO, RO 326 ERROR: SETI PL #0 - SET ACCESS VIOLATION STATUS ALLOW INTERRUPTS 327 PUSHL RO SAVE FINAL STATUS 328 MOVL PCB$L PID(R4),Rl GET PROCESS ID OF CURRENT PROCESS 329 CLRL R2 - SET PRIORITY CLASS INCREMENT SVSQIOREQ V03-012 -7 - QUEUE I/O REQUEST SYSTEM SERVICE QUEUE I/O REQUEST 3-JUN-19B4 15:39:30 VAX-11 Macro V03-01 Page 9 12-MAR-19B2 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 53 04 AC 9A 0132 FEC7 30 0136 01 BA 0139 04 013B 013C 013C 013C 013C 013C FEC 1' 30 013C 35 50 EB 013F 3A A4 3F 0142 03 59 EB 0145 3E A4 3F 0148 9E B6 014B DB 11 014D 014F 014F 014F 014F 014F 50 04 A6 32 014F 00000000'9F DO 0153 51 0159 51 20 Al CO 015A OC A140 DO 015E FC A2 0162 52 11 0164 0166 3E A4 3F 0166 BF 11 0169 016B 3E A4 87 016B F6 19 016E 0170 52 OOOO'DF OF 0170 C5 1D 0175 0177 0177 0177 0177 0177 0177 0177 0177 0177 0177 0177 0177 0177 0177 OA A6 86 0177 017A 53 B2 7E 017A 50 14 AC 7D 017D OOBC C4 DO 0181 58 A3 0185 330 MOVZBL EFN(AP),R3 GET SPECIFIED EVENT FLAG NUMBER 331 BSBW SCH$POSTEF POST SPECIFIED EVENT FLAG 332 POPR #AM<RO> RESTORE FINAL STATUS 333 RET 334 335 336 ALLOCATE REQUEST I/0 PACKET - WHEN THE LOOKASIDE LIST IS EMPTY. 337 338 339 ALLOC: BSBW EXE$ALLOCIRP ALLOCATE I/O REQUEST PACKET 340 BLBS RO,SUCCES IF LBS SUCCESSFUL ALLOCATION 341 PUSHAW PCB$W BIOCNT(R4) ASSUME BUFFERED I/O 342 BLBS R9,NALLOC IF SET, BUFFERED I/O 343 PUSHAW PCB$W DIOCNT(R4) ELSE DIRECT I/O 344 NALLOC: INCW @(SP)+ RESTORE COUNT, SINCE NO I/O STARTED 345 BRB ERROR 346 347 34B Convert section index to window address. 349 350 351 SECTION: CVTWL CCB$L WIND(R6),RO ;SIGN EXTEND SECTION INDEX 352 MOVL @#CTL$GL PHD,Rl ;GET ADDRESS OF PROCESS HEADER 353 ADDL PHD$L PSTBASOFF(R1),Rl ;CALCULATE BASE ADDRESS OF SECTION TABLE 7 354 MOVL SEC$L.::::WINDOW(Rl)[R0],-4(R2) ;GET ADDRESS OF REAL WINDOW 355 BRB NO SECT 356 364 NODCNT: PUSHAW PCB$W DIOCNT ( R4) ;SET FOR DIRECT I/O FUNCTION 365 BRB NOC NT- 366 367 DIRECT: DECW PCB$W DIOCNT(R4) ;CHARGE FOR ANOTHER DIRECT I/O 36B BLSS NODCNT ;BR IF NONE ALLOWED 369 OK: 370 GTPKT: REMQUE @WAIOC$GL IRPFL,R2 ;GET I/O PACKET FROM LOOK ASIDE LIST 371 BVS ALLOC - ;IF VS EMPTY LIST 372 373 ; 374 BUILD DEVICE INDEPENDENT PART OF I/0 PACKET 375 376 R2 - !RP Address 377 R4 - PCB Address 378 R5 - UCB Address 379 , R6 - CCB Address 0 380 7 - Function code (original) 3Bl 8 - FDT address 382 R9 - Channel index @ 16 + (IRP$M_BUFIO -- if buffered I/O) 383 ; RlO - Function code (transformed) 3B4 Rll - Access mode 385 386 S' UCCES: I NCW CCB$W IOC(R6) ;INCREMENT OUTSTANDING I/O ON CHANNEL 387 ASSUME IRP$W-SIZE EQ 8 ;FOR FOLLOWING OPTIMIZATION 3BB MOVAQ (R2)+:R3 ;COPY ADDRESS AND ADD IRP$W SIZE TO R2 3B9 MOVQ ASTADR(AP),RO ;INSERT A$T ADDRESS AND PARAMETER 390 MOVL PCB$L_ARB(R4),IRP$L_ARB(R3) ;COPY ACCESS RIGHTS BLOCK ADDRESS SYSQIOREQ V03-012 ;RLRMXBCNTC :; SR80118 ; SR80118· ;SR80118 ; SR80118 ; SR80·118 ;SR80118 ;SR80118 ; SR80118 ; SR80118 ;SR80118 SR80118 SR80118 SRBOl 18 - QUEUE I/O REQUEST SYSTEM SERVICE QUEUE I/O REQUEST 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 10 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 0187 50 D5 0187 07 13 0189 58 40 SF 88 0188 38 A4 87 018F 58 58 18 78 0192 0196 58 C9 0196 OOOAOOC4 SF 0198 82 019D 2C A4 10 9C 019E 58 01A2 01A3 82 60 A4 DO 01A3 58 04 AC 90 01A7 01A8 01AB OlAB 82 50 7D 01A8 5B 58 10 9C 01AE 0182 0182 82 04 A6 DO 0182 97 14 0186 0188 0188 82 55 DO 0188 0188 58 5A BO 0188 018E 018E 018E 82 58 DO 018E 58 04 co 01C1 82 10 AC DO 01C4 5C 1C co 01C8 01C8 01CB 82 59 10 9C 01CB 59 57 01 CB 01CF 82 7C 01D3 62 D4 0105 4C A3 D4 01D7 OlDA 01DA OOOO'CF D5 01DA 05 13 01DE FE1D' 30 01EO 10 11 01E3 01E5 01E5 01E5 OOOO'CF DO 01E8 50 A3 01EC OOOO'CF 06 01EE 01F2 58 38 A5 DO 01F5 391 392 393 394 395 396 5$: 397 398 ASSUME TSTL BEQL 8IS8 DECW ASHL ASSUME 8ISL3 IRP$B RMOD EQ 11 ;FOR SHIFT BELOW RO - ;CHECK FOR AST 5$ ;NONE #ACB$M QUOTA,Rll ;NOTE QUOTA CHARGE PC8$W ASTCNT(R4) ;CHARGE QUOTA #24,Rll,Rll ;ALIGN ACCESS MODE IRP$B TYPE EQ 10 ;FOR BISL BELOW R11,#<<DYN$C_IRP@16>!IRP$C_LENGTH>,(R2)+ ;INSERT TYPE AND LENGTH 399 ROTL #16,PCB$B_PRIB-3(R4),R11;FETCH AND ALIGN PRIORITY 400 401 ASSUME IRP$L PIO EQ 12 MOVL PCB$L-PID(R4),(R2)+ ;' INSERT PROCESS ID OF CURRENT PROCESS 402 MOVB EFN(AP),Rll ;MERGE EVENT FLAG NUMBER 403 404 ASSUME IRP$L AST EQ 16 FOR MOVQ BELOW 405 ASSUME IRP$L-ASTPRM EQ 20 FOR MOVQ BELOW 406 MOVQ RO,(R°2)+ INSERT AST ADDRESS AND PARAMETER 407 ROTL #16,Rl 1,Rl1 ALIGN PRIORITY AND EVENT FLAG NUMBER 408 409 ASSUME IRP$L WIND EQ 24 410 MOVL CCB$L-WIND(R6),(R2)+ ;GET WINDOW ADDRESS 411 BGTR SECTION ;BR IF SECTION INDEX 412 413 ASSUME IRP$L UCB EQ 28 414 NOSECT: MOVL R5,(R°2)+ ;INSERT DEVICE UCB ADDRESS 415 ASSUME IRP$W FUNC EQ 32 416 MOVW R10,Rl1 ;MERGE I/O FUNCTION CODE 417 ASSUME IRP$B EFN EQ 34 418 ASSUME IRP$B-PRI EQ 35 419 ASSUME IRP$L-IOSB EQ 36 420 MOVL R11,(R2)+ INSERT PRI,EFN,FUNC 421 AODL ~~#FDTACT-12,RB POINT TO ACTION ROUTINE MASKS 422 MOVL / IOSB(AP), (R2)+ INSERT I/O STATUS BLOCK ADDRESS 423 ADDL #Pl ,AP POINT TO FIRST FUNCTION DEPENDENT PARAMETER 424 ASSUME IRP$W CHAN EQ 40 425 ASSUME IRP$W-STS EQ 42 426 ROTL #16,R9,(R2)+ INSERT CHANNEL INDEX AND STATUS 427 BICL3 #1,R7,R9 PREPARE FOR VIRTUAL CHECK BELOW 428 CLRQ (R2)+ CLEAR PTE ADDRESS, BYTE OFFSET, AND BYTE CO 429 CLRL (R2) ; .1 CLRL IRP$L_DIAG8UF(R3) ;INIT ORIGINAL PTE ADDR (LOG OR VIRT I/0 · 2 .3 . IF DF CA$ MEASURE IOT .4 TSTL WAPMS$GL IOPFMPDB DATA COLLECTION ENABLED? .5 BEQL 3$ - BR IF NO .6 8SBW .PMS$START RQ · 7 BRB 4$ - INSERT START OF I/O REQUEST MESSAGE .8 .ENDC .9 .10 3$: SETIPL #15 ;DISABLE SOFTWARE INTERRUPTS .11 MOVL WAPMS$GL_IOPFMSEQ,IRP$L_SEQNUM(R3) ;INSERT PACKET SEQUENCE NUMBER . 12 . 13 .14 4$: INCL WAPMS$GL IOPFMSEQ SETI PL #IPL$ ASTDEL MOVL UCB$L=DEVCHAR(R5),R11 INCREMENT I/O TRANSACTION SEQUENCE NUMBER ENABLE INTERRUPTS GET DEVICE CHARACTISTICS FOR MANY SYSQIOREQ V03-012 -13 ;SRB0118 -1 - QUEUE I/O REQUEST SYSTEM SERVICE QUEUE I/O REQUEST 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 11 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 59 30 35 OD 5B OE 18 A3 18 53 58 13 61 58 18 57 10 20 A3 10 00014040 SF 58 14 38 A4 40 01F9 01F9 01F9 01F9 01F9 01F9 01F9 D1 01F9 12 OlFC El OlFE 0202 0202 0202 0202 0202 D5 0202 12 0205 El 0207 El 0208 020F 020F 020F 020F 020F C2 020F A2 0212 D3 0216 021C 021D 021D 12 021D 021F 021F 021F 021F B5 021F 19 0222 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 0224 443 ;COMPARES BELOW 444 445 CHECK IF REQUESTING PROCESS HAS PRIVILEGE TO ACCESS DEVICE 446 447 NOTE: LOW BIT OF FUNCTION CODE WAS CLEARED ABOVE 448 449 ASSUME IO$ READVBLK-IO$ WRITEVBLK EQ 1 .1 CMPL $A#l0$ WRITEVBLK~R9 VIRTUAL READ OR WRITE? 451 BNEQ 15$ - IF NEQ NO 452 BBC SA#DEV$V_FOD,R11 ,5$ IF CLR, NOT FILE DEVICE 453 454 455 THE FOLLOWING TEST IS NECESSITATED BY THE SYSTEM INITIALIZATION SEQUENCE 456 457 458 TSTL IRP$L WIND(R3) WINDOW ADDRESS SPECIFIED? 459 BNEQ 90$ - IF NEQ YES 460 BBC $A#DEV$V MNT,Rll,60$ IF CLR, DEVICE NOT MOUNTED 461 BBC SA#DEV$V=FOR,R11 ,80$ IF CLR, MOUNTED STRUCTURED 462 463 464 CONVERT VIRTUAL READ/WRITE FUNCTION TO ITS LOGICAL COUNTERPART 465 466 467 5$: SUBL SA#IO$ READVBLK-IO$ READLBLK,R7 ;CONVERT TO LOGICAL FUNCTION 468 SUBW SA#IO$-READVBLK-I0$-READLBLK,IRP$W FUNC(R3) 469 BITL #<DEV$M_SPL!- - ;NOT SPOOLED, 470 DEV$M .=oo ! - NOT FILE DEVICE, 471 DEV$M-SHR>,R11 AND NOT SHARABLE 472 BNEQ 15$ - BR IF SATISFIED 473 474 CHECK IF AST QUOTA IS EXCEEDED 475 476 477 90$: TSTW PCB$W ASTCNT(R4) ;AST QUEUE ENTRY QUOTA EXCEEDED? 478 BLSS 75$ - ;IF LEQ YES 479 480 481 SCAN FUNCTION DECISION TABLE CALLING EACH SELECTED ACTION ROUTINE WITH: 482 483 RO = ADDRESS OF ACTION ROUTINE ENTRY POINT. 484 Rl = SCRATCH. 485 R2 = SCRATCH. 486 R3 = ADDRESS OF I/O REQUEST PACKET. 487 R4 = CURRENT PROCESS PCB ADDRESS. 488 R5 = ASSIGNED DEVICE UCB ADDRESS. 489 R6 = ADDRESS OF CCB. 490 R7 = I/O FUNCTION CODE BIT NUMBER. 491 RB = FDT DISPATCH ADDRESS. (UPDATED TO POINT TO ACTION ROUTINE MASKS) 492 R9 = SCRATCH. 493 R10 = SCRATCH. 494 R11 =SCRATCH. 495 AP = ADDRESS OF FIRST FUNCTION DEPENDENT PARAMETER. 496 497 NB: in the Guide to Writing a Device Driver, we document the contents 498 of RO as being the address of the FDT action routine entry point. SYSQIOREQ V03-012 ;LMP0206 ;LMP0221 ;LMP0221 ;LMP0221 ;LMP0221 ;LMP0221 ;LMP0221 -7 ;LMP0206 - QUEUE I/O REQUEST SYSTEM SERVICE QUEUE I/O REQUEST 3-JUN-19B4 15:39:30 VAX-11 Macro V03-01 Page 12 12-MAR-19B2 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 5B OC F9 6B 57 50 OB AB 60 Fl 57 2F 3B 57 1F 6E 22 OB A6 04 5A OOOO'CF 6C 17 58 10 6A 12 50 50 24 OOFC 10 A3 BB 50 lC F3 E5 57 lF AA 0100 BF 2A A3 59 14 AC 9E 0224 0224 0224 0224 0224 0224 co 0224 El 0227 DO 022B 16 022F 1 1 0231 0233 0233 0233 0233 0233 Dl 0233 19 0236 023B 023B 0238 023B 023B 023B Dl 023E 19 0241 0243 E2 0249 9E 024E 11 0253 0255 El 0255 0259 0259 16 0259 EB 025B 3C 025E 31 0261 D5 0264 13 0267 3C 0269 11 026C 11 026E 0270 0270 0270 0270 Dl 0270 19 0273 AS 0275 0279 DO 027B 13 027F 02B1 02B1 0281 0281 499 This is the only reason that the dispatch code below does not read: 500 JSB @8(R8) 501 Should future gererations wish to modify FDT dispatching to use the 502 single dispatch instruction, they must bear the responsibility for 503 breaking user written drivers. 504 505 110$: ADDL #12,R8 POINT TO NEXT FUNCTION MASK 506 BBC R7, (RB) , 11 0$ IF CLR, THEN ACTION NOT SELECTED 507 MOVL 8(R8),RO GET ADDRESS OF ACTION ROUTINE 50B JSB (RO) CALL ACTION ROUTINE 509 BRB 110$ 510 511 512 CONTINUE DECODING FUNCTIONS OTHER THAN VIRTUAL READ/WRITE 513 514 515 15$: 516 CMPL BLSS SA#IO$ LOGICAL,R7 BO$ - :VIRTUAL I/O FUNCTION? ;IF LSS YES 517 51B 519 LOGICAL OR PHYSICAL I/O FUNCTION 520 521 522 IFPRIV PHY I0,80$ ;PROCESS HAVE PHYSICAL I/0 PRIVILEGE? 523 CMPL SA#IO$ PHYSICAL,R7 ;PHYSICAL I/O FUNCTION? 524 BLSS 20$ - ;IF LSS NO 525 IFNPRIV LOG I0,60$ ;PROCESS HAVE LOGICAL I/O PRIVILEGE? .1 BBSS #CCB$V PHYCHKDON,CCB$B STS(R6),80$ ;XFER IF CHECK DONE · 2 MOVAB WAEXE$CHKPHYACCES,R10 - ;SET FOR PHYSICAL I/O FUNCTION CHECK . 3 BRB 30$ .4 .5 40$: BBC SA#DEV$V_SHR,R11,80$ IF CLR, DEVICE NOT SHAREABLE . 6 50$: R4 - PCB ADDRESS .7 RS - UCB ADDRESS 533 JSB (RlO) CHECK ACCESS TO VOLUME 534 BLBS R0,80$ IF LBS ACCESS ALLOWED 535 60$: 536 70$: MOVZWL #SS$ NOPRIV,RO BRW EXE$ABORTI 0 .SET NO PRIVILEGE STATUS 537 75$: 53B TSTL BEQL IRP$L AST(R3) 110$ - ;DOES THIS REQUEST NEED AN AST? ;NO, THEN CAN'T BE QUOTA EXCEEDED. 539 540 MOVZWL #SS$ EXQUOTA,RO BRB 70$ - .;AST QUOTA EXCEEDED . .1 77$: 541 BRB 40$ ;INTERMEDIATE BRANCH 542 ; PROCESS HAS ACCESS TO DEVICE 543 544 545 80$: CMPL SA#IO$ PHYSICAL,R7 ;LOGICAL OR VIRTUAL I/O FUNCTION? 546 BLSS 90$ - ;IF LSS YES 547 BISW #IRP$M_PHYSIO,IRP$W_STS(R3) ;SET PHYSICAL I/O FLAG 548 MOVL <P6-Pl:>(AP),R9 ;GET ADDRESS OF DIAGNOSTIC BUFFER 549 BEQL 90$ ;IF EQL THEN NOT SPECIFIED 550 551 Process diagnostic buffer parameter 552 553 IFNPRIV DIAGNOSE,60$ ;PROCESS HAVE PRIVILEGE TO DIAGNOSE? SYSQIOREQ V03-012 ;LMP0206 -1 ;LMP0206 ;LMP0206 -1 - QUEUE I/O REQUEST SYSTEM SERVICE QUEUE I/O REQUEST 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 13 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SVSQIOREQ.(1) S-1 0088 C5 DO 51 14 Al 3C lC 13 53 DD FD69 30 53 8EDO C4 50 E9 4C A3 52 DO 82 QC A2 9E 62 59 DO 0080 BF AB 2A A3 FF6E 31 B4 08 A6 03 E2 SA OOOO'CF- 9E 99 5B 06 EO AS 5B OE El 91 5B 13 El SD SB 18 El FF85 31 0287 028C 0290 0292 0294 0297 029A 029D 02A1 02A5 02A8 02AC 02AE 02B1 02B1 02Bl 02Bl 02Bl 0287 02BC 02C1 02Cl 02Cl 02Cl 02Cl 02Cl 02C5 02C9 02CD 02D1 554 MOVL UCB$L DDT(RS),Rl ;GET ADDRESS OF DDT 555 MOVZWL DDT$W=DIAGBUF(R1),R1 ;GET SIZE OF DIAGNOSTIC BUFFER .1 BEQL 130$ ;IF EQL NO DIAGNOSTIC FUNCTIONS 557 PUSHL R3 ;SAVE I/O PACKET ADDRESS 558 BSBW EXE$ALLOCBUF ;ALLOCATE DIAGNOSTIC BUFFER 559 POPL R3 ;RETRIEVE I/O PACKET ADDRESS 560 BLBC R0,70$ ;IF LBC ALLOCATION FAILURE 561 MOVL R2,IRP$L DIAGBUF(R3) ;SAVE ADDRESS OF DIAGNOSTIC BUFFER 562 MOVAB 12(R2),(R2)+ ;SET POINTER TO DATA AREA 563 MOVL R9,(R2) ;SAVE USER ADDRESS OF DIAGNOSTIC BUFFER 564 BISW #IRP$M_DIAGBUF,IRP$W_STS(R3) ;SET DIAGNOSTIC BUFFER PRESENT 565 130$: BRW 90$ 566 ; 567 ; LOGICAL I/O FUNCTION 568 569 570 20$: IFPRIV LOG I0, 130$ ;PROCESS HAVE LOGICAL I/O PRIVILEGE? .1 BBSS #CCB$V LOGCHKDON,CCB$B STS(R6),80$ ;XFER IF CHECK DON~ S71 MOVAB WAEXE$CHKLOGACCES,R10 - ;SET FOR LOGICAL I/0 FUNCTION CHECK 572 573 574 ; PHYSICAL OR LOGICAL I/0 FUNCTION - CHECK ACCESSIBILITY OF DEVICE 575 576 577 30$: BBS SA#DEV$V_SPL,Rl1,60$ IF SET, SPOOLED DEVICE .1 BBC SA#DEV$V_FOD,R11,77$ IF CLR, NOT FILE DEVICE 579 BBC SA#DEV$V_MNT,R11,60$ IF CLR, DEVICE NOT MOUNTED 580 BBC SA#DEV$V_FOR,R11,60$ IF CLR, MOUNTED STRUCTURED 581 BRW 50$ SYSQIOREQ V03-012 - QUEUE I/O REQUEST SYSTEM SERVICE BUILD I/0 PACKET FOR PAGE READ/WRITE 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 14 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 02D4 02D4 02D4 0204 0204 02D4 0204 0204 0204 02D4 02D4 0204 0204 02D4 02D4 02D4 02D4 0204 0204 0204 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 0204 02D4 02D4 0204 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 583 .SBTTL BUILD I/O PACKET FOR PAGE READ/WRITE 584 + 585 EXE$BUILDPKTR - BUILD I/O PACKET FOR PAGE READ 586 EXE$BUILDPKTW - BUILD I/O PACKET FOR PAGE WRITE 587 EXE$BLDPKTSWPR - BUILD I/O PACKET FOR SWAP READ 588 EXE$BLDPKTSWPW - BUILD I/0 PACKET FOR SWAP WRITE 589 EXE$BLDPKTGSR - BUILD I/O PACKET FOR SHARED MEMORY GLOBAL SECTION READ 590 EXE$BLDPKTGSW - BUILD I/O PACKET FOR SHARED MEMORY GLOBAL SECTION WRITE 591 592 THIS ROUTINE IS CALLED TO FILL OUT AND QUEUE AN I/O PACKET 593 FOR A SWAPPING OR PAGING READ OR WRITE. 594 595 INPUTS: 596 597 598 599 RO = VIRTUAL BLOCK NUMBER Rl = NUMBER OF BYTES TO TRANSFER (PAGE INCREMENTS) R2 = WINDOW ADDRESS FOR MAPPING VBN TO LBN 600 601 = R3 = SYSTEM VIRTUAL ADDRESS OF PAGE TABLE ENTRY· R4 CURRENT PROCESS CONTROL BLOCK ADDRESS 602 PCB$W DIOCNT(R4) IS ASSUMED GREATER THAN ZERO 603 604 AND MUST BE CHECKED BY THE CALLER. R5 = I/0 REQUEST PACKET ADDRESS 605 WITH THE FOLLOWING FIELDS ALREADY FILLED IN 606 607 IRP$W SIZE(R5) AND IRP$B TYPE(R5) 608 FOR ENTRY AT EXE$BUILDPKTW, EXE$BLDPKTGSR, AND EXE$BLDPKTGSW, 609 THESE ARE FILLED IN BY THE CALL:" FOR ALL OTHER ENTRY POINTS 610 THEY ARE FILLED IN BY THIS CODE. 611 IRP$L AST(R5) = 612 FOR PAGE READ CASE - SYSTEM VIRTUAL ADDRESS OF SLAVE (PROCESS) 613 PAGE TABLE ENTRY FOR THE CASE OF A GLOBAL PAGE READ. 614 THIS MUST BE 0 FOR A SYSTEM OR PROCESS PAGE READ. 615 FOR PAGE WRITE CASE - STANDARD QI/O AST ADDRESS 616 FOR SWAPIO CASE - THIS PARAMETER IS CURRENTLY NOT USED 617 618 IRP$L ASTPRM(R5) = 619 FOR PAGE READ CASE - THE CONTENTS OF THE FAULTED PAGE TABLE ENTRY 620 USED TO RECOVER THE ORIGINAL BACKING STORE ADDRESS WHEN A PAGE 621 READ ERROR OCCURRED FOR A COPY ON REFERENCE PAGE. 622 FOR PAGE WRITE CASE - STANDARD QI/O AST PARAMETER 623 FOR SWAPIO CASE - ADDRESS OF KERNEL AST ROUTINE TO CALL 624 625 IRP$B_PRI(R5) = THE PRIORITY AT WHICH THE TRANSFER IS TO BE QUEUED 626 627 IRP$B RMOD(R5) = 628 FOR PAGE WRITE CASE - STANDARD QI/O MODE OF REQUESTER 629 FOR ALL OTHER CASES - CONTAINS GARBAGE WHICH IS IGNORED 630 631 IRP$B EFN(R5) 632 FOR PAGE WRITE CASE - STANDARD QI/O EVENT FLAG NUMBER 633 FOR ALL OTHER CASES - CONTAINS GARBAGE WHICH IS IGNORED 634 635 IRP$L IOSB(R5) = 636 FOR PAGE WRITE CASE - STANDARD QI/O I/O STATUS BLOCK ADDRESS 637 FOR ALL OTHER CASES - CONTAINS GARBAGE WHICH IS IGNORED 638 639 OUTPUTS: SYSQIOREQ V03-012 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ; LJKO 1"72 ;LJK0172 LJK0172 LJK0172 LJK0172 LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 ;LJK0172 - QUEUE I/O REQUEST SYSTEM SERVICE BUILD I/O PACKET FOR PAGE READ/WRITE 3-JUN-1984 15:39:30 VAX-11 Macro V03-0l Page 15 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 00520000 BF 30 00500000 8F 28 00520000 8F 16 00500000 BF OE 00140000 BF 10 00160000 8F OOOAOOC4 SF 18 00 08 A5 2C A5 53 4C A5 53 53 55 6t::. 01 11 55 28 A245 OB 55 20 A3 )00FFFF SF 55 SE 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 02D4 DD 02D4 11 02DA 02DC 02DC DD 02DC 11 02E2 02E4 02E4 DD 02E4 11 02EA 02EC 02EC DD 02EC 11 02F2 02F4 02F4 DD 02F4 11 02FA 02FC 02FC DD 02FC 0302 FO 0302 0308 030A DO 030C DO 0310 DO 0314 EE 0317 031B 031C 031C 031C 031C 031C 031C 031C D6 031C A3 0320 0323 CB 0325 0328 032D 032D 640 641 R4,R5 ALTERED 642 ' 643 644 .ENABL LSB .1 . 2 Note that the differentiation between READ and WRITE operations is .3 encoded in the setting of the IRP$M_FUNC bit. .4 . 5 IRP$M FUNC 1 => IO$ READPBLK ; Read operation .6 IRP$M=FUNC 0 => I0$=WRITEPBLK ; Write operation . 7 .8 EXE$BLDPKTGSR:: ;BUILD PACKET FOR SHMGSD READ .9 PUSHL #<IRP$M SWAPIO IRP$M VIRTUAL ! IRP$M FUNC>@16 ,,.. 10 BRB 20$ - - ;TYPE/SIZE ALREADY SET IN PACKET . , 2 EXE$BLDPKTGSW: : ;BUILD PACKET FOR SHMGSD WRITE . ,3 PUSHL #<IRP$M SWAPIO IRP$M VIRTUAL>@16 . 14 BRB 20$ - - ;TYPE/SIZE ALREADY SET IN PACKET . 15 . 16 EXE$BLDPKTSWPR:: ;BUILD SWAP READ PACKET . 17 PUSHL #<IRP$M SWAPIO IRP$M_VIRTUAL ! IRP$M_FUNC>@16 . 18 BRB 10$ - . 19 .20 EXE$BLDPKTSWPW:: ;BUILD SWAP WRITE PACKET . 2, PUSHL #<IRP$M SWAPIO IRP$M_VIRTUAL>@16 .22 BRB 10$ - .23 .24 EXE$BUILDPKTW:: ;BUILD I/O PACKET FOR PAGE WRITE .25 PUSHL #<IRP$M PAGIO IRP$M_VIRTUAL>@16 .26 BRB 20$ - .27 .28 EXE$BUILDPKTR:: ;BUILD I/O PACKET FOR PAGE READ .29 PUSHL #<IRP$M PAGIO ! IRP$M_VIRTUAL ! IRP$M_FUNC>@16 .30 . 31 10$: INSV #<DYN$C IRP@16 ! IRP$C LENGTH>,- ;SET SIZE .32 #0,#24,lRP$W_SIZE(R5) - ;AND TYPE OF PACKET . 33 20$ :. .34 .35 .36 MOVL MOVL MOVL EXTV R3,IRP$L SVAPTE(R5) ;SYSTEM VIRTUAL ADR OF PAGE TABLE ENTRY R3,IRP$L-DIAGBUF(R5) ;NEED COPY OF ORIGINAL FOR SEGMENTED XFERS R5,R3 - ;PACKET ADDRESS TO R3 #<IRP$V_FUNC+16>,#1 ,(SP),R5 .37 .38 R5 -1 for read .39 R5 0 for write .40 .41 ASSUME <IO$ WRITEPBLK + 1> EQ IO$ READPBLK .42 ASSUME <WCB$L_WRITES - 4> EQ WCB$L_READS .43 .44 INCL WCB$L WRITES(R2)[R5] ;USE CODE TO BUMP READ OR WRITE COUNT .45 SUBW3 R5,#IO$_WRITEPBLK,IRP$W_FUNC(R3) ;SET REAL FUNCTION CODE .46 BICL3 #AXFFFF,(SP)+,R5 ;GET STATUS BITS AND CLEAR CHANNEL .47 .48 ASSUME IRP$W_STS EQ IRP$W_CHAN+2 SYSQIOREQ V03-012 ;LJK0172 -33 - QUEUE I/O REQUEST SYSTEM SERVICE BUILD I/O PACKET FOR PAGE READ/WRITE 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 16 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 032D .49 28 A3 55 DO 0320 678 55 10 A2 DO 0331 679 lC A3 55 DO 0335 680 OC A3 60 A4 DO 0339 681 48 A3 50 DO 033E 682 18 A3 52 DO 0342 683 OOBC C4 DO 0346 684 58 A3 034A 034C 685 30 A3 84 034C 686 32 A3 51 DO 034F 687 40 A3 04 0353 688 44 A3 51 DO 0356 689 035A 690 035A 691 035A 692 FCA3' 30 035A 693 035D 694 035D 695 035D 696 FCAO' 31 035D 697 0360 698 0360 699 MOVL MOVL MOVL MOVL MOVL MOVL MOVL R5,IRP$W CHAN(R3) ;SET CHANNEL AND STATUS WCB$L ORGUCB(R2),R5 ;GET UCB ADDRESS FROM WINDOW R5,IRP$L UCB(R3) ;SET UCB ADDRESS PCB$L PID(R4),IRP$L PID(R3) ;PROCESS ID FROM PCB RO,IRP$L SEGVBN(R3)- ;STARTING VIRTUAL BLOCK NUMBER R2,IRP$L-WIND(R3) ;WINDOW ADDRESS PCB$L_ARB(R4),IRP$L_ARB(R3) ;ACCESS RIGHTS BLOCK ADDRESS CLRW MOVL CLRL MOVL IRP$W BOFF(R3) R1,IRP$L BCNT(R3) IRP$L ABCNT(R3) R1,IRP$L_OBCNT(R3) . IF DF,CA$_MEASURE_IOT BSBW PMS$START_RQ .ENDC BRW IOC$QNXTSEG1 .DSABL LSB ;ZERO BYTE OFFSET ;SET BYTE COUNT ;ZERO ACCUMULATED BYTE COUNT ;SET ORIGINAL BVTE COUNT ;INSERT START OF I/O REQUEST MESSAGE ;QUEUE THE FIRST SEGMENT OF THE I/O REQUEST ;AND RETURN SYSQIOREQ V03-012 - QUEUE I/0 REQUEST SYSTEM SERVICE COMPLETE I/O OPERATION 3-JUN-1984 15:39:30 VAX-11 Macro V03-0l Page 17 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(l) 24 A3 11 OB A3 06 38 A4 oc 51 70 A5 38 A3 50 50 01 OOOO'DF 63 39 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 0360 D4 0360 E5 0363 B6 0368 11 036B 036D D4 036D 036F D6 036F 7D 0372 3C 0376 OE 0379 037E 11 0381 0383 701 .SBTTL COMPLETE I/O OPERATION 702 + 703 EXE$ABORTIO - ABORT I/0 OPERATION 704 705 THIS ROUTINE IS JUMPED TO FROM A FUNCTION DECISION TABLE ACTION ROUTINE 706 TO FINISH AN I/O OPERATION WITHOUT RETURNING THE FINAL I/O STATUS. 707 708 EXE$FINISHIO - FINISH I/O OPERATION 709 710 THIS ROUTINE IS JUMPED TO FROM A FUNCTION DECISION TABLE ACTION ROUTINE 711 TO FINISH AN I/O OPERATION AND RETURN THE FINAL I/O STATUS. 712 713 EXE$FINISHIOC - FINISH I/O OPERATION WITH SECOND I/0 STATUS LONGWORD CLEARED 714 715 THIS ROUTINE IS JUMPED TO FROM A FUNCTION DESCISION TABLE ACTION ROUTINE 716 TO FINISH AN I/O OPERATION AND RETURN THE FINAL I/O STATUS WITH THE 717 SECOND I/O STATUS LONGWORD CLEARED. 718 719 INPUTS: 720 721 = RO FIRST LONGWORD OF FINAL I/O STATUS. 722 Rl = SECOND LONGWORD OF FINAL I/O STATUS. 723 724 = R3 = ADDRESS Of I/O REQUEST PACKET. R4 CURRENT PROCESS PCB ADDRESS. 725 R5 =UCB ADDRESS OF DEVICE UNIT. 726 727 OUTPUTS: 728 729 THE FINAL I/0 STATUS IS STORED IN THE I/0 PACKET AND THE PACKET IS 730 INSERTED IN THE I/O POST PROCESSING QUEUE. A SOFTWARE INTERRUPT 731 IS GENERATED TO INITIATE I/O POST PROCESSING AND THE FIRST WORD 732 OF THE FINAL I/O STATUS IS RETURNED AS THE SERVICE STATUS. 733 734 735 .ENABL LSB 736 EXE$ABORTI 0: : ;ABORT I/O OPERATION 737 CLRL IRP$L IOSB(R3) ;CLEAR ADDRESS OF I/O STATUS BLOCK 738 BBCC #ACB$V QUOTA,IRP$B RMOD(R3),10$ ;If CLR, NO AST SPECIFIED 739 INCW PCB$W ASTCNT(R4) - ;UPDATE AVAILABLE AST QUEUE ENTRIES 740 BRB 10$ - ; 741 EXE$FINISHIOC:: ;FINISH I/O OPERATION CLEAR SECOND LONGWORD 742 CLRL Rl ;CLEAR SECOND I/O STATUS LONGWORD 743 EXE$FINISHIO:: ;FINISH I/O OPERATION 744 INCL UCB$L OPCNT(R5) ;INCREMENT OPERATIONS COMPLETED 745 MOVQ RO,IRP$L MEDIA(R3) ;STORE FINAL I/O STATUS 746 MOVZWL SA#SS$ NORMAL,RO ;SET NORMAL COMPLETION STATUS 747 10$: 748 INSQUE (R3),@iAIOC$GL PSBL SOFT INT #I PL$ IOPOST - ;INSERT I/O PACKET IN POST PROCESS QUEUE ;INITIATE SOFTWARE INTERRUPT 749 BRB QIORETURN 750 .DSABL LSB SYSQIOREQ V03-012 - QUEUE I/O REQUEST SYSTEM SERVICE QUEUE I/O PACKET TO DRIVER 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 18 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 0383 752 .SBTTL QUEUE I/O PACKET TO DRIVER 0383 753 ;+ 0383 754 EXE$QIODRVPKT - QUEUE I/O PACKET TO DRIVER 0383 755 0383 756 THIS ROUTINE IS JUMPED TO FROM A FUNCTION DECISION TABLE ACTION ROUTINE 0383 757 TO QUEUE AN I/0 PACKET TO THE APPROPRIATE DRIVER. 0383 758 0383 759 INPUTS: 0383 760 0383 761 R3 ADDRESS OF I/O REQUEST PACKET. 0383 762 R4 CURRENT PROCESS PCB ADDRESS. 0383 763 R5 UCB ADDRESS OF DEVICE UNIT. 0383 764 0383 765 ' OUTPUTS: 0383 766 0383 767 THE I/0 PACKET IS QUEUED BY PRIORITY IN THE APPROPRIATE DEVICE 0383 768 QUEUE AND A NORMAL COMPLETION STATUS IS RETURNED. 0383 769 ' 0383 770 0383 771 EXE$QIODRVPKT:: QUEUE I/O PACKET 66 10 0383 772 BSBB EXE$INSIOQ INSERT I/O PACKET IN DEVICE QUEUE 32 11 0385 773 BRB EXE$QIORETURN SVSQIOREQ V03-012 - QUEUE I/O REQUEST SYSTEM SERVICE 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 19 EXE$ALTQUEPKT - Cal 1 driver ALTSTART ent 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SVS.SRC]SYSQIOREQ.(1) 0387 775 .SBTTL EXE$ALTQUEPKT - Call driver ALTSTART entry point 0387 776 0387 777 0387 778 EXE$ALTQUEPKT - activates a driver at its ALTSTART entry point 0387 779 0387 780 Routine description: 0387 781 0387 782 Locates and cal ls a driver entry point supplied, as an alternate 0387 783 START I/0 entry point. Does not test for unit busy before the 0387 784 call. Exits by returning to caller. 0387 785 0387 786 The routine expects to gain control at or below driver fork 0387 787 level. The routine raises to driver fork IPL before the call, 0387 788 and restores the previous IPL before returning to its caller. 0387 789 0387 790 Inputs: 0387 791 0387 792 R3 - address of packet or buffer 0387 793 R5 - address of UCB 0387 794 0387 795 Outputs: 0387 796 0387 797 Control returns to the requesting process. 0387 798 0387 799 The routine destroys RO-Rl. 0387 800 0387 801 0387 802 0387 803 EXE$ALTQUEPKT:: Start 1/0 in driver. 0387 804 DSBINT UCB$B FIPL(R5) Raise to fork IPL. 50 0088 C5 DO 038E 805 MOVL UCB$L-DDT(R5),RO Get address of unit's DDT. lC BO 16 0393 806 JSB @DDT$L_ALTSTART(RO) Call alternate start I/O routine. 0396 807 ENBINT Reenable interrupts. 05 0399 808 RSB Return to caller. SYSQIOREQ V03-012 ;CDSOOOl -1 ;CDSOOOl -1 ;CDSOOOl ;CDSOOOl ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDSOOOS ;CDSOOOS ;CDSOOOS ;CDS0005 ;CDS0005 ;CDS0005 ;CDSOOOS ;CDS0005 ;CDS0005 - QUEUE I/O REQUEST SYSTEM SERVICE QUEUE I/O PACKET TO ACP 3-JUN-1984 15:39:30 VAX-11 Macro V03-0l Page 20 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC)SYSQIOREQ.(l) 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 039A 52 34 A5 DO 039A 52 10 A2 DO 039E QC A2 05 03A2 19 13 03A5 60 10 03A7 OE 12 03A9 51 OC A2 DO 03AB FC4E' 30 03AF 04 50 ES 03B2 03B5 0389 50 01 3C 0389 03BC 03BC 04 03BF 03CO 55 60 A3 9E 03C.O 03C4 F2 AF 9F 03C7 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 810 .SBTTL QUEUE I/0 PACKET TO ACP 811 ;+ 812 ; EXE$QIOACPPKT - QUEUE I/O PACKET TO ACP 813 814 THIS ROUTINE IS JUMPED TO FROM A FUNCTION DECISION TABLE ACTION ROUTINE .1 TO QUEUE AN I/O PACKET TO THE APPROPRIATE ACP OR XQP. 816 817 INPUTS: 818 819 R3 ADDRESS OF I/O REQUEST PACKET. 820 R4 CURRENT PROCESS PCB ADDRESS. 821 R5 UCB ADDRESS OF DEVICE UNIT. 822 823 CURRENT IPL MUST BE AT SYNCH OR HIGHER LEVEL. 824 825 OUTPUTS: 826 827 R4 ALTERED .1 THE I/O PACKET IS QUEUED AT THE END OF THE APPROPRIATE ACP OR XQP QUEUE 829 AND A NORMAL COMPLETION STATUS IS RETURNED. 830 ' 831 832 EXE$QIOACPPKT:: ;QUEUE I/O PACKET TO ACP 833 MOVL UCB$L VCB(R5),R2 ;GET ADDRESS OF VCB 834 MOVL VCB$L-AQB(R2),R2 ;GET ADDRESS OF ACP AQB · 1 TSTL AQB$L-ACPPID(R2) ;GET ADDRESS OF AQB . 2 BEQL XQP - ;EQL IF IT'S FOR XQP 835 BSBB EXE$INSERTIRP ;INSERT I/O PACKET IN ACP QUEUE 836 BNEQ EXE$QIORETURN ;IF NEQ NOT FIRST ENTRY IN QUEUE 837 MOVL AQB$L ACPPID(R2),R1 ;GfT ACP PROCESS ID 838 BSBW SCH$WAKE ;WAKE UP ACP PROCESS 839 BLBS RO,EXE$QIORETURN ;IF LBS ACP STILL PRESENT 840 BUG CHECK NONEXSTACP ;NONEXISTENT ACP PROCESS 841 EXE$QIORETURN: : ;QUEUE I/O REQUEST COMPLETION STATUS RETURN 842 MOVZWL #SS$ NORMAL,RO ;SET NORMAL COMPLETION STATUS 843 QIORETURN: - ;RETURN SPECIFIED STATUS 844 SETI PL #0 ;ALLOW ALL INTERRUPTS 845 RET · 1 XQP: . 2 MOVAB IRP$L FQFL(R3), R5 USE CORP PART OF IRP AS ACS .3 SETI PL #IPL$-ASTDEL ALLOW PAGEFAULTS .4 PUSHAB QIORETURN RETURN ADDRESS FROM EXE$QXQPPKT .5 .6 FALL THROUGH TO XQP QUEUEING ROUTINE IMMEDIATELY FOLLOWING. · 7 RSB FROM THIS ROUTINE RETURNS TO EXIT ABOVE. .8 .9 . 10 .SBTTL EXE$QXQPPKT - QUEUE I/O PACKET TO XQP · 11 ;+ . 12 EXE$QXQPPKT - INSERT I/O PACKET IN XQP QUEUE . 13 . 14 THIS ROUTINE IS CALLED TO INSERT AN I/O PACKET IN THE XQP QUEUE . 15 AND START THE THREAD OF EXECUTION IF IT IS THE ONLY REQUEST. . 16 . 17 CALLING SEQUENCE: . 18 BSB/JSB EXE$QXQPPKT - THIS IS EITHER CALLED FROM QIO OR . 19 AS A SPECIAL KERNEL AST INVOKED BY IOPOST. SYSQIOREQ V03-012 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDSOOOS ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 ;CDS0005 - QUEUE I/O REQUEST SYSTEM SERVICE EXE$QXQPPKT - QUEUE I/O PACKET TO XQP 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 21 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) OOOOOOOO'GF . DO 50 14 A5 AO AS 9E 20 90 OB AS DC AS 60 A4 DO 10 A5 08 AO DO 52 02 DO FC16' 30 05 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 03CA 0300 03D1 03D6 0306 03D8 03DA 03DF 03E4 03E7 03EA .20 . 21 INPUTS: .22 . 23 . 24 = R4 CURRENT PROCESS PCB ADDRESS . = RS ADDRESS OF TEMP ACB PART OF IRP . .25 .26 OUTPUTS: .27 . 28 = RO status from SCH$QAST . .29 .30 IF SUCCESS: .31 A KERNEL AST IS QUEUED TO THE DISPATCH ROUTINE OF THE XQP . 32 IF NO PACKETS WERE ALREADY ON THE REQUEST QUEUE OF THE XQP . .33 .34 THIS ROUTINE MUST BE CALLED AT IPL ASTDEL SO THAT THE .35 IRP CANNOT BE LOST (BECAUSE OF PROCESS DELETION) UNTIL IT . 36 IS PLACED ON THE XQP REQUEST QUEUE . .37 .38 .39 .40 EXE$QXQPPKT:: . 41 MOVL GACTL$GL_F11BXQP, RO ;ADDR OF XQP QUEUE HEAD .42 MOVAB CDRP$L IOQFL(R5), - ;ADDRESS OF IRP .43 ACB$L ASTPRM(R5) ;IS AST PARAMETER. .44 MOVB #PSL$C KERNEL!ACB$M NODELETE,-,;KERNEL MODE, DON'T DELETE IRP .45 ACB$B RMOD(R5) - .46 MOVL PCB$L-PID(R4), ACB$L PID(R5) ;COPY PIO. .47 MOVL F11B$L DISPATCH(RO),-ACB$L AST(R5) ;XQP DISPATCHER ADDRESS. . 48 MOVL #PRI$ RESAVL, R2 ;SAME AS AFTER WAITING FOR A LOCK . .49 BSBW SCH$QAST ;QUEUE THE AST. .50 RSB ;AND RETURN SYSQIOREQ V03-012 ;SSA0017 - QUEUE 1/0 REQUEST SYSTEM SERVICE INSERT 1/0 PACKET IN UNIT QUEUE 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 22 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 6A A5 05 64 A5 08 FC03 06 52 4C AS 04 03EB 03EB 03EB 03EB 03EB 03EB 03EB 03EB 03EB 03EB 03EB 03EB 03EB 03EB 03EB 86 03F2 E2 03F5 30 03FA 11 03FD DE ,03FF 10 0403 0405 05 0408 847 .SBTTL INSERT 1/0 PACKET IN UNIT QUEUE 848 ;+ 849 EXE$INSIOQ - INSERT 1/0 PACKET IN UNIT QUEUE 850 851 THIS ROUTINE IS CALLED TO INSERT AN 1/0 PACKET IN A UNIT QUEUE AND CALL 852 THE APPROPRIATE 1/0 DRIVER IF THE UNIT IS NOT BUSY. 853 854 INPUTS: 855 856 857 = R3 ADDRESS OF I/O REQUEST PACKET. = RS UCB ADDRESS OF DEVICE UNIT. 858 859 860 EXE$INSIOQ:: INSERT IN I/O QUEUE 861 DSBINT UCB$B FIPL(R5) RAISE IPL TO FORK LEVEL .1 INCW UCB$W-QLEN(R5) Bump device queue length 862 BBSS #UCB$V BSY,UCB$W STS(R5),10$ ;IF SET, THEN DEVICE IS BUSY 863 BSBW IOC$INITIATE - ;INITIATE 1/0 FUNCTION 864 865 10$: BRB 20$ MOVAL UCB$L IOQFL(RS),R2 ;'GET ADDRESS OF I/0 QUEUE LISTHEAD 866 BSBB EXE$INSERTIRP ;INSERT I/O PACKET IN DEVICE QUEUE 867 20$: ENBINT ;ENABLE INTERRUPTS 868 RSB SYSQIOREQ V03-012 - QUEUE I/O REQUEST SYSTEM SERVICE INSERT I/O PACKET IN QUEUE BY PRIORITY 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 23 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) 51 52 51 04 Al 51 52 07 23 Al 23 A3 FO 61 63 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 0409 DO 0409 DO 040C D1 0410 13 0413 91 0415 1F 041A OE 041C 05 041F 0420 0420 870 .SBTTL INSERT I/0 PACKET IN QUEUE BY PRIORITY 871 ;+ 872 EXE$INSERTIRP - INSERT 1/0 PACKET IN QUEUE BY PRIORITY 873 874 THIS ROUTINE IS CALLED TO INSERT AN 1/0 PACKET IN A SPECIFIED QUEUE BY 875 PRIORITY. 876 877 INPUTS: 878 879 R2 = ADDRESS OF QUEUE LISTHEAD. 880 R3 = ADDRESS OF I/O PACKET. 881 882 CURRENT IPL MUST BE THE FORK LEVEL OF THE RESPECTIVE DRIVER PROCESS 883 OR HIGHER. 884 885 OUTPUTS: 886 887 THE 1/0 PACKET IS INSERTED IN THE SPECIFIED QUEUE BY PRIORITY ANO 888 THE 'Z' CONDITION CODE IS RETURNED TO THE CALLER. 889 890 , z, ENTRY WAS FIRST ENTRY IN THE QUEUE. 891 892 z I I 0 -:;.. ENTRIES WERE ALREADY IN THE QUEUE. 893 894 R2 AND R3 ARE PRESERVED ACROSS THE CALL. 895 896 897 EXE$INSERTIRP:: ;INSERT I/O PACKET IN QUEUE BY PRIORITY 898 MOVL R2,Rl ;COPY LISTHEAO ADDRESS 899 10$: 900 MOVL CMPL IRP$L IOQBL(R1),R1 R2,R1~ ;GET ADDRESS OF NEXT ENTRY ;END OF QUEUE? 901 BEQL 20$ ;IF EQL YES 902 CMPB IRP$8 PRI(R3),IRP$B PRI(R1) ;NEW ENTRY PRIORITY GREATER? 903 BLSSU 10$ - - ;IF LSS YES 904 20$: INSQUE I~P$L_IOQFL(R3),IRP$L_IOQFL(R1) ;INSERT PACKET IN I/O QUEUE 905 RSB 906 907 .END SYSQlOREQ Symbol table ACB$B RMOD ACB$L-AST ACB$L-ASTPRM ACB$L-PID ACB$M-NODELETE ACB$M-QUOTA ACB$V-QUOTA ACCV IO ~LLOC AQB$L ACPPID ASTADR ASTPRM BUG$ NONEXSTACP CCB$B AMOD CCB$B-STS CCB$C-LENGTH CCB$L-UCB CCB$L-WIND CCB$V-LOGCHKDON CCB$V-PHYCHKDON CCB$V-PROCHKDON CCB$W-IOC CDRP$L_IOQFL CHAN CH KOON CLREF CTL$GL CCBBASE CTL$GL-F11BXQP CTL$GL-PHD CTL$GW-CHINDX DACSPND DDT$L ALTSTART DDT$L-FDT DDT$W-DIAGBUF DEV$M-FOD DEV$M-SHR DEV$M-SPL DEV$V-FOD DEV$V-FOR DEV$V-MNT DEV$V-SHR DEV$V-SPL DIREC'f DYN$C_IRP EFN ERROR ERRORS EXE$ABORTIO EXE$ALLOCBUF EXE$ALl:.OCIRP EXE$ALTQUEPKT EXE$BLDPKTGSR EXE$BLDPKTGSW EXE$BLDPKTSWPR EXE$BLDPKTSWPW EXE$BUILDPKTR EXE$BUILDPKTW - QUEUE I/0 REQUEST SYSTEM SERVICE 3-JUN-1984 15:39:30 VAX-11 ~aero V03-0l Page 24 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) = 00000008 = 00000010 = 00000014 = O-OOOOOOC = 00000020 = 00000040 = 00000006 00000124 R 01 = = = 0000013C oooooooc 00000014 00000018 R 01 ******** = 00000009 = 00000008 = 00000010 = 00000000 x 01 = = = = = = = 00000004 00000003 00000004 00000002 OOOOOOOA FFFFFFAO 00000008 OOOOOOC8 R 01 00000036 R 01 ******** x 01 ******** x 01 "'******* x 01 ******** x 01 00000048 R = 0000001C = 00000008 = 00000014 = 00004000 01 = = 00010000 00000040 = OOOOOOOE = 00000018 = 00000013 = 00000010 = 00000006 = 00000168 R = OOOOOOOA 00000004 01 00000127 R 01 00000045 R 01 00000360 RG 01 ******** x 01 ******** x 01 00000387 RG 01 00000204 RG 01 000002DC RG 01 000002E4 RG 01 000002EC RG 01 000002FC RG 01 000002F4 RG 01 EXE$CHKLOGACCES EXE$CHKPHYACCES EXE$CHKRDACCES EXE$CHKWRTACCES EXE$FINISHlO EXE$FINISHlOC EXE$INSERTIRP EXE$INSlOQ EXE$QIO EXE$QIOACPPKT EXE$QIODRVPKT EXE$QIORETURN EXE$QXQPPKT EXE$SNGLEQUOTA F118$L_DISPATCH FDTACT FUNC GTPKT ILLIO l0$M FCODE IO$ ACPCONTROL 10$-DEACCESS IO$-LOGICAL 10$-PHYSI CAL 10$-READHEAD IO$-READLBLK IO$-READPBLK IO$-READPROMPT IO$-READTRACKD I0$-READVBLK IO$-REREADN 10$-REREADP I0$-TTVREADALL IO$-TTVREADPALL 10$-VIRTUAL IO$-WRITECHECK 10$-WRITECHECKH I0$-WRITEHEAD 10$-WR ITEL8LK l0$-WRITEP8LK 10$-WRITERET 10$-WRITETRACKD 10$-WR ITEV8LK lOC$GL IRPFL lOC$GL-PSBL lOC$INITIATE lOC$QNXTSEG1 IOSB IO TYPE IPL$ ASTDEL IPL$-IOPOST IPL$-SVNCH IRP$B EFN IRP$B-PRI IRP$B-RMOD IRP$B-TYPE IRP$C-LENGTH ******** x 01 ******** x 01 ******** x 01 ******** x 01 0000036F RG 01 00000360 RG 01 00000409 RG 01 000003EB RG 01 00000068 RG 01 0000039A RG 01 00000383 RG 01 00000389 RG 01 000003CA RG 01 = = = ******** 00000008 00000010 oooooooc x 01 00000170 R 01 OOOOOlOC R 01 == 0000003F 00000038 = = 00000034 0000002F == 0000001F OOOOOOOE = 00000021 = oooooooc == 00000037 00000010 = = 00000031 00000016 = 00000017 = 0000003A = = 00000038 0000003F = OOOOO"OOA == 00000018 00000000 = 00000020 = 00000008 = 00000018 = OOOOOOOF = 00000030 ******** x 01 ******** x 01 ******** x 01 = = ******** 00000010 = 00000008 00000002 x 01 == 00000004 = 00000008 00000022 == 00000023 00000008 == OOOOOOOA OOOOOOC4 SYSQIOREQ Symbol table IRP$L ABCNT IRP$L-ARB IRP$L-AST IRP$L -ASTPRM IRP$L-BCNT IRP$L-DIAGBUF IRP$L-FQFL I RP$L-IOQ6L IRP$L-IOQFL IRP$L-IOSB IRP$L-MEDIA IRP$L-06CNT IRP$L-PID IRP$L-SEGV6N IRP$L-SEQNUM IRP$L-SVAPTE IRP$L-UCB IRP$L-WIND IRP$M-6UFIO IRP$M-DIAG6UF IRP$M-FUNC IRP$M-PAGIO IRP$M-PHYSIO IRP$M-SWAPIO IRP$M-VIRTUAL IRP$V-FUNC IRP$W-60FF IRP$W-CHAN IRP$W-FUNC IRP$W-SIZE IRP$W-STS IVCHAN LEGAL MASKH MAS KL NALLOC NOC NT NODCNT NOIOS6 NOSE CT NOT FILE DEV NOT-FILE-DEV6 NSPOOL - OFF LI NE OK Pl P2 P3 P4 P5 P6 PCB$8 PRIS PCB$L-ARB PCB$L-EFCS PCB$L-EFWM PCB$L-PID PCB$Q=PRIV - QUEUE I/0 REQUEST SYSTEM SERVICE 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 25 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SYS.SRC]SYSQIOREQ.(1) = = 00000040 00000058 = 00000010 = = = 00000014 00000032 0000004C = = = 00000060 00000004 00000000 = 00000024 = 00000038 = = 00000044 oooooooc = = = 00000048 00000050 0000002C = 0000001C == 00000018 = = 00000001 00000080 00000002 = = 00000004 00000100 = 00000040 = 00000010 = 00000001 == 00000030 00000028 = 00000020 = = 00000008 0000002A 00000036 R = 00000000 = 00010001 = 0100ACOO 01 00000146 R 01 OOOOOOFA R 01 00000166 R 01 OOOOOOE8 R 01 00000188 R 01 00000010 R 01 00000069 R 01 OOOOOOC3 R 01 00000113 R 01 00000170 R = OOOOOOlC = 00000020 01 = 00000024 = 00000028 = 0000002C = 00000030 = 0000002F = 0000008C = 00000050 = 0000004~ = 00000060 = 00000084 PCB$W ASTCNT PCB$W-B IOCNT PCB$W-DIOCNT PHD$L-PSTBASOFF PMS$GL IOPFMPD6 PMS$GL-IOPFMSEQ PMS$START_RQ PR$ IPL PR$-SIRR PRI$ RESAVL PR IOSB PRIVERR PRV$V DIAGNOSE PRV$V-LOG IO PRV$V-PHY-IO PSL$C-KERNEL PSL$S-PRVMOD PSL$V=PRVMOD QIO QIORETURN READ ACCESS RSN$-ASTWAIT SCH$CLREF SCH$GL RESMASK SCH.$GQ-MWA IT SCH$POSTEF SCH$QAST SCH$WAIT SCH$WAKE SEC$L WINDOW SECTION SPOOL SS$ ACCVIO SS$-DEVOFFLI NE SS$-EXQUOTA SS$-! LLIOFUNC SS$-IVCHAN SS$-NOPRIV SS$-NORMAL SUCCES UC6$6 FIPL UCB$L-AM6 UC6$L-DDT UCB$L-DEVCHAR UCB$L-IOQFL UCB$L-OPCNT UCB$L-VCB UCB$V-BSY UC8$V-ONLINE UCB$W-QLEN UCB$W-STS VCB$L=AQB VCHAN WCB$L ORGUCB WCB$L-READS WCB$L -WRITES WRITE=ACCESS = = = = 00000038 0000003A 0000003E 00000020 ******** ******** = ******** 00000012 x x x 01 01 01 = = 00000014 00000002 OOOOOODA R 01 00000042 R 01 = 00000006 = = = 00000007 00000016 00000000 = = 00000002 00000016 0000006D R 01 0000036C R 01 = 00000000 R 00000001 01 ******** ******** x x 01 01 ******** x 01 ******** x 01 ******** x 01 ******** x 01 = o*o**o*o*o*o*o*c x 01 0000014F R 01 = = = = = 0000005E oooooooc 00000084 0000001C OOOOOOF4 0000013C R 01 == 00000024 00000001 00000177 R = 00000006 = = 00000060 00000088 = 00000038 = 0000004C 01 = 00000070 = = 00000034 00000008 = 00000004 = 0000006A = 00000064 = 00000010 00000078 R 01 = 00000010 = = 00000024 00000028 00000008 R 01 SVSQIOREQ Symbol table - QUEUE I/O REQUEST SYSTEM SERVICE 3-JUN-1984 15:39:30 VAX-11 Macro V03-01 Page 26 12-MAR-1982 17:19:50 DISK$VMSMASTER:[SVS.SRC]SVSQIOREQ.(1) XQP 000003CO R 01 PSECT name Allocation +--~-------------+ ! Psect synopsis ! +--------------~-+ PSECT No. Attributes ABS . BLANK . $ABS$ 00000000 00000420 00000000 0.) 00 1056.) 01 0.) 02 0.) NOPIC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE 1.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 2.) NOPIC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE +---------------~--------+ +! -P-e-r-f-o-r-m-a-n--c-e--i-n-d-i-c-a-t-o-r-s-+! Phase Initialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals -P-a-g-e --f-a-u-l-t-s 9 77 608 0 250 29 6 0 983 -CP-U---T-im--e 00:00:00.09 00:00:00.67 00:00:26.37 00:00:03.89 00:00:06.58 00:00:00.21 00:00:00.03 00:00:00.00 00:00:37.87 Elapsed Time ------------- 00:00:00.54 00:00:06.51 00:02:38.99 00:00:18.56 00:00:34.76 00:00:00.37 00:00:00.14 00:00:00.00 00:03:39.88 The working set limit was 1650 pages. 13Q110 bytes (272 pages) of vi~tual memory were used to buffer the intermediate There were 140 pages of symbol table space allocated to hold 2591 non-local and 1039 source lines were read in Pass 1, producing 18 object records in Pass 2. 42 pages of virtual memory were used to define 41 macros. code. 27 local symbols. +--------------------------+ +! -M--a-cr-o---li-b-r-a-r-y---s-t-a-t-i-s-t-i-c-s-+! Macro library name Macros defined $255$DUA28:[SVS.OBJ]LIB.MLB;1 26 -$255$DUA28:[SVS~IB]STARLET.MLB;2 11 TOTALS (all libraries) 37 2723 GETS were required to define 37 macros. There were no error~. warnings or information messages. MACRO/LIS=LIS$:SYSQIOREQ/OBJ=OBJ$:SYSQIOREQ MSRC$:SYSQIOREQ/UPDATE=(ENH$:SYSQIOREQ)+EXECML$/LIB SYSQIOFDT SYSQIOFDT Table of contents ( 1) 97 ( 1) 148 ( 1) 181 ( 1) 213. 1 ( 1) 214 ( 1) 267 ( 1) 310 ( 1) 400 (2) 438 (2) 474 (2) 513 (2) 587 (2) 652 (2) 692 (2) 735 (2) 773 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 PLACE PROCESS IN I/O RESOURCE WAIT ONE PARAMETER FUNCTION PROCESSING ZERO PARAMETER FUNCTION PROCESSING LOCAL DIS~ VALID FUNCTION PROCESSING READ AND WRITE FUNCTION PROCESSING READ AND WRITE FUNCTION BUFFER CHECK AND LOCK ROUTINES READ AND WRITE BUFFER CHECK AND LOCK AND RETURN ROUTINES BACKOUT A QIO CHECK BUFFER ACCESSIBILITY FOR READ FUNCTION CHECK BUFFER ACCESSIBILITY FOR WRITE FUNCTION CHECK BUFFER ACCESSIBILITY FOR READ FUNCTION AND RETURN CHECK BUFFER ACCESSIBILITY FOR WRITE FUNCTION AND RETURN SET DEVICE MODE AND CHARACTERISTICS FUNCTIONS (AT FDT LEVEL) SET DEVICE MODE AND CHARACTERISTICS FUNCTIONS SENSE DEVICE MODE AND CHARACTERISTICS FUNCTIONS CARRIAGE CONTROL INTERPRETATION Page 0 SYSQIOFDT V03-009 ;WMC0001 -1 ;WMC0001 ;WMC0001 ;WMCOOOl ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;SSA00002 ;SSA00002 ;SSA00002 ;SSA00002 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;PRD0030 ;PRD0030 ;PRD0030 ;PRD0030 ;ROW0192 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 1 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(l) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1 . TITLE SYSQIOFDT - SYSTEM SERVICE QUEUE I/O FDT SUBROUTINES .1 . !DENT 'V03-009' 3 4 5 ;' **************************************************************************** 6 7 ·;' ** COPYRIGHT (c) 1978, 1980, 1982 BY * 8 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. * * * 9 ;* 10 11 12 13 14 ; ; ; ; ; * * * * * 15 ; * 16 17 ; ; * * 18 ; * 19 20 21 ; ; ; * * * 22 ; * 23 ;* ALL RIGHTS RESERVED. THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED. THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION. DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * * * * * * * * * * * * * * * 24 25 26 ;;; ******************************************************************************** 27 28 D. N. CUTLER 15-SEP-76 29 30 MODIFIED BY: 31 · 1 V03-009 WMCOOOl Wayne Cardoza 23-Apr-1984 . 2 Add a comment warning about general use of EXE$IORSNWAIT. .3 .4 V03-008 ROW0259 Ralph 0. Weber 20-NOV-1983 .5 For IO$ PACKACK operations passing through EXE$LCLDSKVALID, .6 always allow the PACKACK request to go to the driver when . 7 UCB$V VALID in UCB$L STS is clear, regardless of any other .8 conditions. However7 UCB$V LCL VALID and UCB$B ONLCNT must .9 still be correctly adjusted~ This is believed to allow . 10 PACKACKs to fail and be retried. . 11 . 12 V03-007 SSA00002 Stan Amway 30-SEP-1983 .13 Modified BACKOUT QIO to call new routine PMS$ABORT RQ . 14 to insure complete traces of I/O activity. - .15 .16 V03-'006 ROW0224 Ralph 0. Weber 15-SEP-1983 . 17 Change EXE$LCLDSKVALID to alter UCB$B ONLCNT either up or down . 18 only if the local processor has not already performed such an .19 alteration. Use UCB$V LCL VALID in UCB$L STS to determine .20 state of device with respect to the local-processor. . 21 .22 V03-005 PRD0030 Paul R. Destefano 09-Sep-1983 .23 Added EXE$LCLDSKVALID routine to track disk online count .24 and local valid status. .25 .26 V03-004 ROW0192 Ralph 0. Weber 20-AUG-1983 SYSQIOFDT V03-009 ;ROW0192 ;ROW0192 ;ROW0192 ;ROW0192 ;ROW49973 ;ROW49973 ;ROW49973 ;ROW49973 ;ROW49973 ;ROW49973 ;ROW49973 ;ROW49973 ;PRD0030 ;PRD0030 ;PRD0030 ;PRD0030 ;PRD0030 ;PRQ.0030 ;PRD0030 -35 ;ROW49973 ;ROW49973 ;ROW49973 ;ROW49973 ;ROW49973 ;ROW49973 ;ROW49973 -4 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 2 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(1) 00000000 00000004 00000008 oooooooc 00000010 00000014 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 . 27 Fix EXE$WRITE and EXE$READ to allow longword byte counts . . 28 This should allow virtual disk transfers to exceed 65K bytes . .29 (This wil 1 be distributed in V3.5 as SYS ECO 65.) .30 .31 V03-003 ROW49973 Ralph 0. Weber 29-0CT-1982 .32 Change calling requirements for EXE$IORSNWAIT from an entry .33 IPL of IPL$ SYNCH to an entry IPL of IPL$ ASTDEL. Have the .34 call to BACKOUT QIO made at IPL$ ASTDEL. -Then, raise to .35 IPL$ SYNCH to perform scheduler operations. This eliminates .36 undesirable page faults at an IPL above' IPL$ ASTDEL when . 37 BACKOUT_QIO references a channel control block . .38 .39 V03-002 ROW49577 Ralph 0. Weber 27-SEP-1982 .40 ECO 25 Change EXE$SETCHAR and EXE$SETMODE to return SS$ ILLIOFUNC if .41 UCB$8 DEVCLASS equals DC$ DISK. This is to prohibit SETMODE .42 (set ~ode) and SETCHAR (set characteristics) functions on disk .43 devices. On disk devices, those functions overwrite the disk .44 geometry information which results in abbarant system .45 behavior. 67 68 SYSTEM SERVICE QUEUE I/O FUNCTION DECISION TABLE SUBROUTINES 69 70 MACRO LIBRARY CALLS 71 72 73 $ACBDEF ;DEFINE ACB OFFSETS 74 $CCBDEF ;DEFINE CCB OFFSETS .1 $DC DEF ;DEFINE DEVICE CLASSES .2 $DE\/DEF ;DEFINE DEVICE CHARACTERISTICS . 3 $IODEF ;DEFINE I/O FUNCTION CODES .4 $IPLDEF ;DEFINE SYSTEM IPLS .5 $IRPDEF ;DEFINE IRP OFFSETS .6 $PCBDEF ;DEFINE PCB VALUES . 7 $PRDEF ;DEFINE PROCESSOR REGISTERS 79 $SSDEF ;DEFINE SYSTEM STATUS VALUES 80 $UCBDEF ;DEFINE UCB OFFSETS 81 $VADEF ;DEFINE VIRTUAL ADDRESS FIELDS 82 $SF DEF ;DEFINE CALL FRAME 83 84 85 LOCAL SYMBOLS 86 87 ARGUMENT LIST OFFSET DEFINITIONS 88 89 90 Pl=O FIRST FUNCTION DEPENDENT PARAMETER 91 P2=4 SECOND FUNCTION DEPENDENT PARAMETER 92 P3=8 THIRD FUN~TION DEPENDENT PARAMETER 93 P4=12 FOURTH FUNCTION DEPENDENT PARAMETER 94 P5=16 FIFTH FUNCTION DEPENDENT PARAMETER 95 P6=20 SIXTH FUNCTION DEPENDENT PARAMETER SYSQIOFDT V03-009 ;WMCOOOl ;WMC0001 ;WMCOOOl ;WMC0001 ;WMCOOOl ;WMCOOOl ;WMC0001 ;ROW49973 -4 ROW49973 ROW49973 ROW49973 ROW49973 3 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-0l Page 3 PLACE PROCESS IN 1/0 RESOURCE WAIT 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(1) 21 24 A4 OA 51 OOf 5 4C A4 6E OOOO'CF SE 5C 08 AD 5E 50 52 OOOO'CF FFDA' FFD7' 0000 0000 0000 0000 0000 0000 0000 0000 0000 OOOQ 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000() 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 EO 0000 DD 0005 30 0007 OOOA 9A OOOD E2 0011 00 0016 DO 0017 DO 0016 7E 001E 31 0023 0026 0026 0026 31 0026 97 .SBTTL PLACE PROCESS IN I/O RESOURCE WAIT 98 ;+ 99 EXE$IORSNWAIT - PLACE PROCESS IN I/O RESOURCE WAIT 100 101 FUNCTIONAL DESCRIPTION: 10:2 103 104 THIS ROUTINE IS USED BY FDT PROCEEDURES TO RE-START A QIO REQUEST AFTER A RESOURCE WAIT. THE CURRENT I/O IS CLEANED up'~ND THE PRE-QIO 105 STACK IS SET UP. THEN THE PROCESS IS PLACED IN THE WAIT STATE. 106 IF THE PROCESS DOES NOT HAVE RESOURCE WIAT ENABLED, THE I/O IS ABORTED 107 WITH A STATUS SPECIFIED BY THE CALLER. 108 .1 **CAUTION** THIS ROUTINE IS NOT CALLED AT SYNCH SO THE RESOURCE MAY ALREADY . 2 HAVE BEEN DECLARED AVAILABLE. THIS ROUTINE SHOULD ONLY BE USED FOR RESOURCES . 3 WHICH ARE GUARANTEED TO BE PERIODICALLY (TIMESCHDL) DECLARED AVAILABLE . .4 . 5 .6 IMPLICIT INPUTS: .7 . 8 CALLER MUST BE AT IPL=IPL$_ASTDEL 113 114 INPUTS: 115 116 117 = RO STATUS TO RETURN IF NO WAIT REQUESTED = Rl RESOURCE NUMBER TO WAIT FOR 118 119 = R3 = ADDRESS OF CURRENT PACKET R4 ADDRESS OF THE CURRENT PCB 120 R6 = ADDRESS OF CHANNEL CONTROL BLOCK 121 122 OUTPUTS: 123 124 RO,R1 ,R2,R3 ARE USED. 125 126 CONTROL IS TRANSFERED TO EXE$ABORTIO IF NO RESOURCE WAIT 127 HAS BEEN REQUESTED, 128 129 OR TO SCH$WAIT IF RESOURCE WAIT IS REQUESTED. 130 131 132 133 EXE$IORSNWA1 T: : ;PLACE PROCESS IN RESOURCE WAIT 134 BBS #PCB$V SSRWAIT,PCB$L STS(R4),50$ ;BR IF NO WAIT REQUEST .1 PUSHL Rl - - ;REMEMBER RESOURCE NUMBER . 2 BSBW BACKOUT QIO ;CLEANUP QIO . 3 SETI PL #IPL$ SYNCH ;SYNCHRONIZE WITH SCHEDULER DATABASE .4 MOVZBL (SP),PCB$L EFWM(R4) ;SET UP WAIT MARKER 138 BBSS (SP)+,WASCH$GL_RESMASK,30$ ;INDICATE PROCESS IS WAITING 139 30$: MOVL SF$L SAVE AP(FP),AP RESTORE PRE-QIO ARGUMENT LIST POINTER 140 MOVL FP,SP - CLEAN STACK BACK TO CALL FRAME 141 MOVAQ WASCH$GQ MWAIT,R2 ADDRESS WAIT LIST 142 BRW SCH$WAIT- PLACE PROCESS IN WAIT STATE 143 144 NO RESOURCE WAIT REQUESTED - ABORT THE I/O 145 146 5' 0$: BRW EXE$ABORTIO SYSQIOFDT V03-009 38 A3 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 4 ONE PARAMETER FUNCTION PROCESSING 24-APR-1982 15:51 :12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(1) 0029 148 .SBTTL ONE PARAMETER FUNCTION PROCESSING 0029 149 ;+ 0029 150 ; EXE$0NEPARM - ONE PARAMETER FUNCTION PROCESSING 0029 151 ; 0029 152 ; THIS ROUTINE IS CALLED FROM THE FUNCTION DECISION TABLE DISPATCHER TO 0029 153 ; PROCESS A ONE PARAMETER FUNCTION THAT REQUIRES NO SPECIAL CHECKING. 0029 154 ; 0029 155 ; INPUTS: 0029 0029 156 ; 157 ; = RO SCRATCH. 0029 158 ; Rl = SCRATCH. 0029 159 ; R2 = SCRATCH. 0029 160 ; R3 =ADDRESS OF I/O REQUEST PACKET. 0029 0029 0029 0029 0029 0029 161 ; 162 ; 163 ; 164 ; 165 ; 166 ; = R4 = CURRENT PROCESS PCB ADDRESS. R5 ASSIGNED DEVICE UCB ADDRESS. = R6 ADDRESS OF CCB. = R7 I/O FUNCTION CODE BIT NUMBER. = RB FUNCTION DECISION TABLE DISPATCH ADDRESS. = R9 SCRATCH. 0029 0029 0029 167 ; 168 ; 169 ; = RlO = SCRATCH. Rl 1 SCRATCH. AP = ADDRESS OF FIRST FUNCTION DEPENDENT PARAMETER. 0029 170 0029 171 ; OUTPUTS: 0029 172 ; 0029 173 ; ***TBS*** 0029 174 ; 0029 175 0029 176 .ENABL LSB 0029 177 EXE$0NEPARM:: ;ONE PARAMETER FUNCTION PROCESSING 6C DO 0029 178 MOVL Pl(AP),IRP$L_MEDIA(R3) :STORE PARAMETER IN MEDIA ADDRESS 03 11 0020 179 BRB 10$ SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 5 ZERO PARAMETER FUNCTION PROCESSING 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SVSQIOFDT.(1) 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 002F 38 A3 04 002F FFCB' 31 0032 0035 181 .SBTTL ZERO PARAMETER FUNCTION PROCESSING 182 ;+ 183 ; EXE$ZEROPARAM - ZERO PARAMETER FUNCTION PROCESSING 184 ; 185 ; THIS ROUTINE IS CALLED FROM THE FUNCTION DECISION TABLE DISPATCHER TO 186 ; PROCESS A ZERO PARAMETER FUNCTION THAT REQUIRES NO ADDITION CHECKING. 187 ; 188 ; INPUTS: 189 ; 190 ; 191 ; 192 ; 193 ; 194 ; 195 ; 196 ; 197 ; 198 ; 199 ; 200 ; 201 ; 202 ; RO Rl R2 R3 = SCRATCH. = SCRATCH. = SCRATCH. = ADDRESS OF I/O REQUEST PACKET. R4 = CURRENT PROCESS PCB ADDRESS. R5 = ASSIGNED DEVICE UCB ADDRESS. R6 = ADDRESS OF CCB. R7 = I/O FUNCTION CODE BIT NUMBER. RS = FUNCTION DECISION TABLE DISPATCH ADDRESS. = R9 = SCRATCH. = RlO SCRATCH. R11 SCRATCH. AP = ADDRESS OF FIRST FUNCTION DEPENDENT PARAMETER. 203 ; 204 ; OUTPUTS: 205 ; 206 ; ***TBS*** 207 208 209 EXE$ZEROPARM:: ZERO PARAMETER FUNCTION PROCESSING 210 CLRL IRP$L MEDIA(R3) CLEAR PARAMETER 211 10$: BRW EXE$QIODRVPKT QUEUE I/0 PACKET TO DRIVER 212 .DSABL LSB SYSQIOFDT V03-009 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0224 ;ROW0224 ;R0~0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0'224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0259 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0259 ;ROW0224 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-0l Page 6 LOCAL DISK VALID FUNCTION PROCESSING 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(1) 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 0035 08 57 91 0035 1B 12 0038 OE 64 A5 11 E2 003A 003F 003F OOAE C5 96 0042 01 OOAE C5 91 0046 05 13 004B 11 64 A5 OB EO 004D 0052 0052 0052 FFAB' 31 0052 0055 0055 0055 0055 .1 .SBTTL LOCAL DISK VALID FUNCTION PROCESSING . 2 ;+ . 3 EXE$LCLDSKVALID - LOCAL DISK VALID FUNCTION FROCESSING .4 .5 This routine is cal led from the function decision table dispatcher to .6 process functions which affect the online count and local valid status . 7 of a disk. .8 .9 If the function is the first local pack acknowedge function . 10 (UCB$V LCL VALID is clear), the online count, UCB$B ONLCNT, is .11 incremented and UCB$V LCL VALID is set. If the onlTne count was . 12 previously zero, the I/O packet is queued to the driver for further . 13 PACKACK processing. If the online count was not previously zero but .14 the UCB$V VALID bit is clear, the I/O packet is also queued to the . 15 driver for further processing. .16 . 17 If the function is the first local available or unload function . 18 (UCB$V LCL VALID is set), the onl ine count, UCB$B ONLCNT, is . 19 decremented and UCB$V LCL VALID is cleared. If the decremented online .20 count is zero, the I/0 packet is queued to the driver for further . 21 AVAILABLE or UNLOAD processing . .22 .23 INPUTS: .24 .25 RO = SCRATCH. .26 R3 =ADDRESS OF I/O REQUEST PACKET. .27 .28 = R5 = ASSIGNED DEVICE UCB ADDRESS. R7 I/O FUNCTION CODE BIT NUMBER. .29 .30 OUTPUTS: .31 .32 UCB$B ONLCNT is altered to reflect the number of hosts which have set . 33 the drive online (i.e. issued PACKACK functions to the drive) . .34 .35 UCB$V LCL VALID in UCB$L STS is set for PACKACK functions and cleared . 36 for AVAILABLE or UNLOAD functions . .37 .38 .39 EXE$LCLDSKVALID:: LOCAL DISK VALID FUNCTION PROCESSING. .40 .41 CMPB R7, #IO$ PACKACK .42 BNEQ 50$ - Pack acknowledge function? Branch if not a PACKACK. .43 BBSS #UCB$V LCL VALID, - Is this the first local PACKACK? .44 UCB$L STS(R5), 20$ Branch if not first local PACKACK. .45 SETI PL #IPL$-SCS Synchronize with the MSCP server. .46 INCB UCB$B-ONLCNT(R5) Increment online count. .47 CMPB UCB$B-ONLCNT(R5), #1 Is this the first cluster PACKACK? .48 BEQL 30$ - Branch if first cluster PACKACK. .49 20$: BBS #UCB$V VALID, - Is the volume already valid? .50 UCB$L STS(R5), 80$ Branch if volume is already valid. . 5, .52 .53 30$: BRW EXE$QIODRVPKT For f i rs t c I us t er PAC KA CK , 1as t .54 cluster UNLOAD or AVAILABLE, or .55 truely invalid volume, ask driver .56 to really perform the function. .57 SVSQIOFDT V03-009 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 ;ROW0224 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 7 LOCAL DISK VALID FUNCTION PROCESSING 24-APR-1982 15 :51: 12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(1) 0055 09 64 A5 11 E5 0055 005A 005A OOAE C5 97 0050 EF 13 0061 0063 0063 0063 50 01 3C 0063 FF97' 31 0066 . 58 50$: .59 . 60 . 61 . 62 .63 .64 .65 80$: .66 .67 .68 BBCC SETI PL DECB BEQL #UCB$V LCL VALID, UCB$L STS(R5), 80$ #IPL$-SCS UCB$B=ONLCNT(R5) 30$ MOVZWL #SS$_NORMAL, RO BRW EXE$FINISHIOC UNLOAD and AVAILABLE come here . First local UNLOAD or AVAILABLE? Branch if not first . Synchronize with MSCP server . Decrement online count . Branch if the online count is zero. For requests which are not being passed on to the driver. Set normal completion status. Finish I/0 operation. SYSQIOFDT V03-009 ;ROW0192 -1 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-19B4 15:36:44 VAX~11 Macro V03-01 Page B READ AND WRITE FUNCTION PROCESSING 24-APR-19B2 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(1) 52 A1 'AF 04 52 9B'AF 04 2A A3 01 52 9E'AF 3C A3 OC AC 06 00 lF 20 A3 04 15 20 A3 51 04 AC 05 50 6C 62 FF65 1 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 0069 DE 0069 11 006D 006F DE 006F E3 0073 007B DE 007B DO 007C ED OOBl OOB4 15 OOB7 A2 OOB9 DOBB DO OOBD 13 0091 DO 0093 16 0096 31 0098 0099 214 .SBTTL READ AND WRITE FUNCTION PROCESSING 215 + 216 EXE$READ - READ FUNCTION PROCESSING 217 EXE$WRITE - WRITE FUNCTION PROCESSING 21B EXE$MODIFY - MODIFY FUNCTION PROCESSING 219 220 THESE ROUTINES ARE CALLED FROM THE FUNCTION DECISION TABLE DISPATCHER TO 221 PROCESS A READ OR WRITE PHYSICAL OR LOGICAL FUNCTION. 222 EXE$MODIFY IS USED FOR FUNCTIONS THAT READ AND WRITE MEMORY. 223 224 INPUTS: 225 226 227 = RO SCRATCH. = Rl SCRATCH. 228 R2 = SCRATCH. 229 R3 =ADDRESS OF I/O REQUEST PACKET. 230 R4 = CURRENT PROCESS PCB ADDRESS. 231 R5 = ASSIGNED DEVICE UCB ADDRESS. 232 R6 = ADDRESS OF CCB. 233 R7 = I/O FUNCTION CODE BIT NUMBER. 234 235 = RB = FUNCTION DECISION TABLE DISPATCH ADDRESS. R9 SCRATCH. 236 RlO = SCRATCH. 237 R11 =SCRATCH. 23B AP = ADDRESS OF FIRST FUNCTION DEPENDENT PARAMETER. 239 240 OUTPUTS: 241 242 ***TBS*** 243 ' 244 245 .ENABL LSB 246 EXE$MODIFY:: ;MODIFY FUNCTION PROCESSING 247 MOVAL B/\EXE$MODIFYLOCK,R2 ;SET ADDRESS OF BUFFER CHECK ROUTINE 248 BRB 5$ 249 EXE$READ:: ;READ FUNCTION PROCESSING 250 MOVAL B/\EXE$READLOCK,R2 ;SET ADDRESS OF BUFFER CHECK ROUTINE 251 5$: BBCS #IRP$V FUNC,IRP$W STS(R3) ,10$ ;SET READ FUNCTION STATUS 252 EXE$WRITE:: - ;WRITE FUNCTION PROCESSING 253 MOVAL B"EXE$WRITELOCK,R2 ;SET ADDRESS OF BUFFER CHECK ROUTINE 254 10$: 255 256 257 MOVL CMPZV BLEQ P4(AP),IRP$B CARCON(R3) ;INSERT CARRIAGE CONTROL BYTE #IRP$V FCODE~#IRP$S FCODE,- ;PHYSICAL I/O FUNCTION? IRP$W FUNC(R3),#IO$-PHYSICAL ; 20$ - - ;IF LEQ YES 25B SUBW #IO$ READLBLK-IO$ READPBLK,- ;CONVERT TO PHYSICAL FUNCTION 259 IRP$W FUNC ( R3), - .1 20$: MOVL P2(AP),Rl GET NUMBER OF BYTES TO TRANSFER 261 BEQL 30$ IF EQL NONE 262 MOVL Pl(AP),RO GET STARTING VIRTUAL ADDRESS OF TRANSFER 263 JSB (R2) CHECK BUFFER AND LOCK IN MEMORY 264 30$: BRW EXE$QIODRVPKT QUEUE I/O PACKET TO DRIVER 265 .DSABL LSB SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 9 READ AND WRITE FUNCTION BUFFER CHECK AND 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(l) 009B 267 .SBTTL READ AND WRITE FUNCTION BUFFER CHECK AND LOCK ROUTINES 009B 268 ; + 009B 269 EXE$READLOCK - CHECK BUFFER FOR READ ACCESSIBILITY AND LOCK 009B 270 EXE$WRITELOCK - CHECK BUFFER FOR WRITE ACCESSIBILITY AND LOCK 009B 271 EXE$MODIFYLOCK - CHECK BUFFER FOR READ ACCESSIBILITY AND LOCK 009B 272 009B 273 THESE ROUTINES ARE CALLED TO CHECK THE ACCESSIBILITY OF AN I/O BUFFER AND 009B 274 TO LOCK THE BUFFER IN MEMORY FOR A DIRECT MEMORY TRANSFER. 009B 275 009B 276 INPUTS: 009B 277 009B 278 RO STARTING ADDRESS OF I/O BUFFER. 009B 279 R1 LENGTH OF TRANSFER IN BYTES. 009B 280 R4 CURRENT PROCESS PCB ADDRESS. 009B 281 R6 ADDRESS OF CCB. 009B 282 009B 283 OUTPUTS: 009B 284 009B 285 THE I/O BUFFER IS CHECKED FOR THE PROPER ACCESSIBILITY. IF THE 009B 286 CHECK SUCCEEDS, THEN THE BUFFER IS LOCKED IN MEMORY AND THE STARTING 009B 287 ADDRESS OF THE PAGE TABLE ENTRIES THAT MAP THE TRANSFER IS STORED 009B 288 IN THE I/O PACKET. ELSE THE I/O IS COMPLETED WITH A STATUS OF 009B 289 ACCESS VIOLATION. 009B 290 ' 009B 291 009B 292 EXE$READLOCK:: CHECK BUFFER FOR READ FUNCTION AND LOCK 11 10 009B 293 BSBB EXE$READLOCKR EXE$READLOCKR RETURNS NORMALLY ON 009D 294 SUCCESS, VIA COROUTINE CALL ON FAILURE 05 009D 295 RSB RETURNS TO CALLER ON SUCCESS, TO 009E 296 EXE$READLOCKR ON FAILURE 009E 297 009E 298 EXE$WR ITELOCK: : CHECK BUFFER FOR WRITE FUNCTION AND LOCK 15 10 009E 299 BSBB EXE$WRIT.ELOCKR EXE$WRITELOCKR RETURNS NORMALLY ON OOAO 300 SUCCESS, VIA COROUTINE CALL ON FAILURE 05 OOAO 301 RSB RETURNS TO CALLER ON SUCCESS, TO OOAl 302 EXE$WRITELOCKR ON FAILURE OOAl 303 OOAl 304 EXE$MODIFYLOCK:: CHECK BUFFER FOR MODIFY FUNCTION AND LOCK 01 10 OOA1 305 BSBB EXE$MODIFYLOCKR EXE$MODIFYLOCKR RETURNS NORMALLY ON OOA3 306 SUCCESS, VIA COROUTINE CALL ON FAILURE 05 OOA3 307 RSB RETURNS TO CALLER ON SUCCESS, TO OOA4 308 EXE$MODIFYLOCKR ON FAILURE SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 10 READ AND WRITE BUFFER CHECK AND LOCK AND 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(1) 50 009D 52 04 QC 50 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 00A4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 DD OOA4 3ca0 OOA6 OOA9 11 OOAC OOAE OOAE DD OOAE 310 .SBTTL READ AND WRITE BUFFER CHECK AND LOCK AND RETURN ROUTINES 311 + 312 EXE$READLOCKR - CHECK BUFFER FOR READ ACCESSIBILITY AND LOCK AND RETURN 313 ON ERROR 314 EXE$WRITELOCKR - CHECK BUFFER FOR WRITE ACCESSIBILITY AND LOCK AND RETURN 315 ON ERROR 316 EXE$MODIFYLOCKR - CHECK BUFFER FOR READ ACCESSIBILITY AND LOCK AND RETURN 317 ON ERROR 318 319 THESE ROUTINES ARE CALLED TO CHECK THE ACCESSIBILITY OF AN I/0 BUFFER 320 AND TO LOCK THE BUFFER IN MEMORY FOR A DIRECT MEMORY TRANSFER. IN 321 ADDITION, THESE ROUTINES PERFORM A COROUTINE CALL IF THERE IS AN ERROR 322 OR ANY PAGES HAVE TO BE FAULTED IN. THE PURPOSE OF THE COROUTINE 323 CALL IS TO ALLOW THE CALLER TO PERFORM ANY NECESSARY CLEANUP BEFORE 324 THE QIO IS BACKED UP OR ABORTED. THESE ROUTINES ARE TYPICALLY CALLED 325 BY DRIVERS THAT MUST LOCK MULTIPLE AREAS INTO MEMORY. SINCE THESE 326 ROUTINES CANNOT UNLOCK AREAS PREVIOUSLY LOCKED, THE COROUTINE CALL ALLOWS 327 THE CALLER (THE DRIVER) TO UNLOCK PREVIOUSLY LOCKED AREAS (AND PERFORM 328 ANY OTHER CLEANUP) AND THEN RETURN HERE TO BACK UP OR ABORT THE I/O. 329 330 EXE$MODIFYLOCKR IS USED WHEN THE BUFFER WILL BE READ AND WRITTEN BY THE 331 I/O DEVICE. IT DISABLES AN OPTIMIZATION IN MMG$IOLOCK WHICH IS USED 332 WHEN THE BUFFER IS ONLY WRITTEN. 333 334 INPUTS: 335 336 RO STARTING ADDRESS OF I/O BUFFER. 337 Rl LENGTH OF BUFFER IN BYTES. 338 R4 CURRENT PROCESS PCB ADDRESS. 339 R6 ADDRESS OF CCB. 340 341 OUTPUTS: 342 343 THE I/O BUFFER IS CHECKED FOR THE PROPER ACCESSIBILITY. IF THE 344 CHECK SUCCEEDS, THEN THE BUFFER IS LOCKED IN MEMORY AND THE STARTING 345 ADDRESS OF THE PAGE TABLE ENTRIES THAT MAP THE TRANSFER IS STORED 346 IN THE I/O PACKET. 347 348 RO = RETURN CODE 349 350 NOTE THAT IF THERE ARE NO ERRORS AND NO PAGES HAVE TO BE FAULTED 351 IN, THEN THESE ROUTINES RETURN NORMALLY. HOWEVER, IF THERE IS AN 352 ERROR OR A PAGE HAS TO BE FAULTED IN, THEN THE CALLER IS CALLED 353 BY A COROUTINE CALL. THE CALLER'S RSB THEN RETURNS HERE WHERE 354 THE QIO IS EITHER BACKED UP OR ABORTED. NOTE THAT IN THIS CASE 355 THE CALLER'S ERROR HANDLING CODE MUST PRESERVE ALL REGISTERS, 356 INCLUDING RO AND Rl. 357 358 .ENABL LSB 359 EXE$MODIFYLOCKR:: CHECK BUFFER FOR MODIFY FUNCTION AND LOCK 360 PUSHL RO SAVE STARTING ADDRESS OF BUFFER 361 BSBW EXE$READCHKR CHECK BUFFER FOR READ FUNCTION 362 BISL #4,R2 DISABLE OPTIMIZATION IN MMG$IOLOCK 363 BRB 10$ 364 365 EXE$READLOCKR:: ;CHECK BUFFER FOR READ FUNCTION AND LOCK 366 PUSHL RO ;SAVE STARTING ADDRESS OF BUFFER SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-0l Page 11 READ AND WRITE BUFFER CHECK AND LOCK AND 24-APR-19B2 15: 51: 12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(1) 0093 30 05 11 50 DD ODEA 30 lA 50 E9 50 BEDO 50 FEOO BF AB 30 A3 53 DD FF34' 30 53 BE DO OB 50 E9 2C A3 51 DO 05 5E 04 co 9E 16 50 D5 1 c 12 51 DD lB 10 02 BA 5E 5D DO 5C OB AD 7D 5E 00' co 50 8E 04 C3 F8'AF 9F 02 61 95 60 17 FFO 1' 31 OOBO OOB3 0085 0095 OOB5 OOB7 OOBA OOBD ooco oocs ooci OOC9 oocc OOCF OOD2 OOD6 OOD7 OODA OODC DODE OOEO OOE2 OOE4 OOE6 OOE9 ODED OOFO OOF4 OOF7 OOF8 OOFA OOFC DOFF 367 BSBW EXE$READCHKR ;CHECK BUFFER FOR READ FUNCTION 36B BRB 10$ 369 370 EXE$WRITELOCKR:: ;CHECK BUFFER FOR WRITE FUNCTION AND LOCK 371 PUSHL RO ;SAVE STARTING ADDRESS OF BUFFER 372 BSBW EXE$WRITECHKR ;CHECK BUFFER FOR WRITE FUNCTION 373 10$: BLBC RO, 15$ ;BRANCH IF ERROR 374 POPL RO ;RESTORE STARTING ADDRESS OF BUFFER 375 BICW3 #AC<VA$M_BYTE>,RO,IRP$W_BOFF(R3) ;SET BYTE OFFSET IN PAGE 376 377 378 379 3BO 3B1 3B2 15$: 3B3 20$: 3B4 385 3B6 387 388 3B9 390 391 392 393 394 395 40$: 396 397 50$: 398 PUSHL BSBW MOVL BLBC MOVL RSB ADDL JSB TSTL BNEQ PUSHL BSBB POPR MOVL MOVQ ADDL SUBL3 PUSHAB REI TSTB JMP BRW .DSABL R3 MMG$IOLOCK (SP)+,R3 R0,20$ R1,IRP$L_SVAPTE(R3) #4,SP @(SP)+ RO 50$ Rl BACKOUT_QIO #AM<Rl> FP,SP B(FP),AP SA#EXE$C CMSTKSZ,SP #4,(SP)+-:-Ro BA40$ ( R1) (RO) EXE$ABORTI 0 LSB ;SAVE ADDRESS OF I/O PACKET ;LOCK PAGES FOR I/O ;RETRIEVE ADDRESS OF I/O PACKET ;IF LBC LOCK FAILURE ;INSERT ADDRESS OF FIRST PTE IN PACKET ';THROW AWAY OLD RO ;COROUTINE CALL TO CLEANUP ;ERRORS ENCOUNTERED? ; IF NEQ YES ;SAVE VIRTUAL ADDRESS OF PAGE TO FAULT ;CLEANUP QIO ;RETRIEVE VIRTUAL ADDRESS OF PAGE TO FAULT ;TRIM STACK BACK TO CHANGE MODE FRAME ;RESTORE USER ARGUMENT AND FRAME POINTERS ;REMOVE CHANGE MODE CALL FRAME FROM STACK ;CALCULATE RESTART ADDRESS ;SET NEW RETURN ADDRESS ; ;FAULT USER BUFFER AGAIN ;REPEAT SYSTEM SERVICE ;ABORT I/O REQUEST SYSQIOFDT V03-009 ;SSAb0002 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-0l Page 12 BACKOUT A QIO 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(1) FEFE' 30 OA A6 B7 05 2A A3 00 El 3A A4 86 03 11 3E A4 B6 OC 2A A3 07 El 50 4C A3 DO 53 DD FEEO' 30 53 8EDO 03 OB A3 06 El 38 A4 B6 50 53 DO FECF' 30 05 DOFF OOFF OOFF DOFF DOFF DOFF OOFF DOFF OOFF DOFF OOFF OOFF OOFF OOFF DOFF DOFF DOFF OOFF OOFF OOFF OOFF OOFF OOFF 0102 0105 010A 010D 010F 0112 0117 01 lB 01 lD 0120 0123 0128 0128 012E 0131 400 .SBTTL BACKOUT A QIO 401 ;+ 402 BACKOUT_QIO - BACKOUT A QIO 403 404 THIS ROUTINE IS CALLED TO BACKOUT A QIO. IT DECREMENTS THE CHANNEL I/0 405 COUNT, INCREMENTS THE DIRECT OR BUFFERED I/O COUNT, DEALLOCATES THE 406 DIAGNOSTIC BUFFER (IF PRESENT), OPTIONALLY INCREMENTS THE AST COUNT, AND 407 FINALLY DEALLOCATES THE IRP. 408 409 INPUTS: 410 411 R3 ADDRESS OF I/O REQUEST PACKET 412 R4 CURRENT PROCESS PCB ADDRESS 413 R6 ADDRESS OF CCB 414 415 OUTPUTS: 416 417 RO - R3 CLOBBERED 418 419 ' 420 421 BACKOUT QIO: .1 -BSBW PMS$ABORT RQ ;BACKOUT A QIO ;RECORD ABORT IF I/0 MONITORING ENABLED 422 DECW CCB$W IOC(R6) ;DECREMENT CHANNEL I/O COUNT 423 BBC #IRP$V BUFIO,IRP$W STS(R3),10$ ;BR IF NOT BUFFERED I/O 424 INCW PCB$W BIOCNT(R4) - ;ADJUST COUNT OF BUFFERED I/O 425 BRB 20$ - ;CONTINUE 426 10$: INCW PCB$W DIOCNT(R4) ;ADJUST DIRECT I/O COUNT 427 20$: BBC #IRP$V DIAGBUF,IRP$W STS(R3),30$ ;BR. IF NO DIAGNOSTIC BUFFER 428 MOVL IRP$L DIAGBUF(R3),RO- ;GET ADDRESS OF DIAGNOSTIC BUFFER 429 PUSHL R3 - ;SAVE R3 430 BSBW EXE$DEANONPAGED ;DEALLOCATE DIAGNOSTIC BUFFER 431 POPL R3 ;RESTORE R3 432 30$: BBC #ACB$V QUOTA,IRP$B RMOD(R3) ,40$ ;BR IF AST NOT REQUESTED 433 INCW PCB$W ASTCNT(R4) - ;ADJUST AST COUNT 434 40$: MOVL R3,RO- :DEALLOCATE PACKET 435 BSBW EXE$DEANONPAGED 436 RSB SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-0l Page 13 CHECK BUFFER ACCESSIBILITY FOR READ FUNC 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) 0132 438 .SBTTL CHECK BUFFER ACCESSIBILITY FOR READ FUNCTION 0132 439 ;+ 0132 440 EXE$READCHK - CHECK BUFFER ACCESSIBILITY FOR READ FUNCTION 0132 441 0132 442 THIS ROUTINE IS CALLED TO CHECK BUFFER ACCESSIBILITY FOR A READ I/O 0132 443 FUNCTION. 0132 444 0132 445 INPUTS: 0132 446 0132 447 RO = ADDRESS OF BUFFER. 0132 448 Rl = SIZE OF TRANSFER IN BYTES. 0132 449 R3 =ADDRESS OF I/O REQUEST PACKET. 0132 450 0132 451 OUTPUTS: 0132 452 0132 453 IF BUFFER IS NOT WRITE ACCESSIBLE, THEN THE I/O REQUEST IS TERM- 0132 454 INATED VIA EXE$IOFINISH WITH A STATUS OF SS$_ACCVl0. 0132 455 0132 456 If BUFFER IS WRITE ACCESSIBLE, THEN THE FOLLOWING VALUES ARE RE- 0132 457 TURNED: 0132 458 0132 459 RO = ADDRESS OF BUFFER. 0132 460 Rl = SIZE OF TRANSFER IN BYTES. 0132 461 R2 =READ FUNCTION INDICATOR (1). 0132 462 R3 = ADDRESS OF I/O REQUEST PACKET. 0132 463 0132 464 IRP$W BCNT(R3) SIZE OF TRANSFER IN BYTES. 0132 465 IRP$W=FUNC(R3) READ. 0132 466 0132 467 0132 468 .ENABL LSB 0132 469 EXE$READCHK:: CHECK BUFFER FOR READ FUNCTION 50 DD 0132 470 PUSHL RO SAVE ADDRESS OF BUFFER 10 10 0134 471 BSBB EXE$READCHKR CHECK BUFFER 04 11 0136 472 BRB 10$ SYSQIOFDT V03:-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-0l Page 14 CHECK BUFFER ACCESSIBILITY FOR WRITE FUN 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) 50 DD 68 10 03 50 EB FEBE' 31 50 8EPO 05 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 0138 013A 013C 013F 0142 0145 0146 474 .SBTTL CHECK BUFFER ACCESSIBILITY FOR WRITE FUNCTION 475 ;+ 476 EXE$WRITECHK - CHECK BUFFER ACCESSIBILITY FOR WRITE FUNCTION 477 478 THIS ROUTINE IS CALLED TO CHECK BUFFER ACCESSIBILITY FOR A WRITE I/O 479 FUNCTION. 480 481 INPUTS: 482 483 RO ADDRESS OF BUFFER. 484 Rl SIZE OF TRANSFER IN BYTES. 485 R3 ADDRESS OF I/O REQUEST PACKET. 486 487 OUTPUTS: 488 489 IF BUFFER IS NOT READ ACCESSIBLE, THEN THE I/O REQUEST IS TERM- 490 INATED VIA EXE$IOFINISH WITH A STATUS OF SS$_ACCVIO. 491 492 IF BUFFER IS READ ACCESSIBLE, THEN THE FOLLOWING VALUES ARE RE- 493 TURNED: 494 495 RO ADDRESS OF BUFFER. 496 Rl SIZE OF TRANSFER IN BYTES. 497 R2 WRITE FUNCTION INDICATOR (0). 498 R3 ADDRESS OF I/O REQUEST PACKET. 499 500 IRP$W BCNT(R3) SIZE OF TRANSFER IN BYTES. 501 IRP$W=FUNC(R3) WRITE. 502 · 503 504 EXE$WRITECHK:: CHECK BUFFER FOR WRITE FUNCTION 505 PUSHL RO SAVE ADDRESS OF BUFFER 506 BSBB EXE$WRITECHKR CHECK BUFFER 507 10$: BLBS R0,20$ BRANCH IF SUCCESS 508 BRW EXE$ABORTI 0 ABORT I/O 509 20$: POPL RO RESTORE ADDRESS OF BUFFER 510 RSB 511 .DSABL LSB SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 15 CHECK BUFFER ACCESSIBILITY FOR READ FUNC 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) 32 A3 51 OF 51 32 A3 07 50 2A A3 02 52 01 51 50 50 01FF BF 51 50 52 FEOO SF 51 51 13 50 52 51 6142 F 1 50 01 7E 50 0146 0146 0146 0146 0146 0146 0146 0146 0146 014q 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 0146 DO 0146 10 014A DO 014C E9 0150 AS 0153 DO 0157 05 015A 015B CO 015B AA 015E C2 0163 32 0166 F7 016B 1D 016E 0170 0170 C2 0176 3E 0179 14 017D 3C 017F 05 01S2 0183 7D 01S3 513 .SBTTL CHECK BUFFER ACCESSIBILITY FOR READ FUNCTION AND RETURN 514 ;+ 515 ; EXE$READCHKR - CHECK BUFFER ACCESSIBILITY FOR READ FUNCTION AND RETURN 516 517 THIS ROUTINE IS CALLED TO CHECK BUFFER ACCESSIBILITY FOR A READ I/O 518 FUNCTION. STATUS IS RETURNED IN RO. 519 520 INPUTS: 521 522 RO ADDRESS OF BUFFER. 523 R1 SIZE OF TRANSFER IN BYTES. 524 R3 ADDRESS OF I/O REQUEST PACKET. 525 526 OUTPUTS: 527 528 IF THE BUFFER rs NOT WRITE ACCESSIBLE, THEN THE FOLLOWING 529 VALUE rs RETURNED: 530 531 RO = SS$ ACCVIO 532 533 IF BUFFER IS WRITE ACCESSIBLE, THEN THE FOLLOWING VALUES ARE RE- 534 TURNED: 535 536 RO SS$ NORMAL 537 Rl SIZE OF TRANSFER IN BYTES. 538 R2 READ FUNCTION INDICATOR (1). 539 R3 ADDRESS OF I/O REQUEST PACKET. 540 541 IRP$L BCNT(R3) SIZE OF TRANSFER IN BYTES. 542 IRP$W=FUNC(R3) READ. 543 ' 544 545 .ENABL LSB 546 EXE$READCHKR:: CHECK BUFFER FOR READ FUNCTION 547 MOVL R1 ,IRP$L BCNT(R3) SAVE R1 548 BSBB 10$ - CHECK ACCESS 549 MOVL IRP$L BCNT(R3),Rl RESTORE R1 550 BLBC R0,5$- , IF LBC, NO ACCESS· 551 BISW #IRP$M FUNC,IRP$W STS(R3) ; SET READ FUNCTION 552 MOVL #1,R2 - - SET READ FUNCTION INDICATOR 553 5$: RSB 554 555 10$: ADDL RO,R1 ENDING ADDRESS OF BUFFER 556 BICW #VA$M BYTE,RO 557 SUBL RO,R1- TRUNCATE TO START OF· PAGE CALCULATE LENGTH OF BUFFER TO PROBE 558 CVTWL #-f\X200,R2 SET ADDRESS ADJUSTMENT CONSTANT 559 15$: CVTLW R1 ,R1 GREATER THAN 32k? 560 BVS 30$ IF VS, YES; CHECK BY CHUNKS 561 562 20$: IFNOWRT R1, (RO) ,ACCVIO CAN ENDS OF USER'S BUFFER BE WRITTEN? 563 SUBL R2,RO 564 MOVAW (Rl) [R2] ,Rl CALCULATE VA OF NEXT PAGE CALCULATE NEW LENGTH 565 BGTR 20$ IF GTR THEN MORE TO TEST 566 MOVZWL #SS$_NORMAL,RO INDICATE SUCCESS 567 RSB AND RETURN 568 569 30$: MOVQ RO,-(SP) SAVE CURRENT VALUES ON STACK SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-0l Page 16 CHECK BUFFER ACCESSIBILITY FOR READ FUNC 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) 51 7EOO BF 6E 51 04 AE 51 DC 05 50 50 SE CF SE 08 50 OC 3C 0186 018B co 0188 C'2 018E 10 0192 E9 0194 70 0197 11 019A 019C 019C co 019C 05 019F OlAO 3C OlAO 05 01A3 01A4 570 MOVZWL 571 572 ADDL 573 SUBL 574 BSBB 575 BLBC 576 MOVQ 577 BRB 578 579 ACCVI01: 580 ADDL 581 RSB 582 ACCV!O: 583 MOVZWL 584 RSB 585 #AX7EOO,R1 Rl,(SP) R1,4(SP) 20$ RO,ACCVI01 (SP)+,RO 15$ #8,SP #SS$_ACCVIO,RO ; SIZE OF CHUNK USED STEPPING THRU BUF. ; (32K - 1 PAGE) ; ADVANCE ADDRESS BY THIS AMOUNT ; DECREASE COUNT ; PROBE CHUNK ; IF LBC, NO ACCESS ; POP PRE-ADJUSTED VALUES OFF STACK : SEE IF LENGTH NOW LT 32K SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-19B4 15:36:44 VAX-11 Macro V03-01 Page 17 CHECK BUFFER ACCESSIBILITY FOR WRITE FUN 24-APR-19B2 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) 32 A3 51 OA 51 32 A3 02 50 52 51 50 50 OlFF BF 51 50 52 FEOO BF 51 51 13 50 52 51 6142 F 1 50 01 7E 50 51 7EOO BF 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 DO 01A4 10 01AB DO 01AA E9 01AE D4 01B1 05 01B3 01B4 co 01B4 AA 01B7 C2 OlBC 32 01BF F7 01C4 1D 01C7 01C9 01C9 C2 01CF 3E 01D2 14 01D6 3C 01DB 05 OlDB OlDC 7D OlDC 3C OlDF 01E4 5B7 .SBTTL CHECK BUFFER ACCESSIBILITY FOR WRITE FUNCTION AND RETURN 5B8 ;+ 589 EXE$WRITECHKR - CHECK BUFFER ACCESSIBILITY FOR WRITE FUNCTION AND RETURN 590 591 THIS ROUTINE IS CALLED TO CHECK BUFFER ACCESSIBILITY FOR A WRITE I/O 592 FUNCTION. STATUS IS RETURNED IN RO 593 594 INPUTS: 595 596 RO ADDRESS OF BUFFER. 597 Rl SIZE OF TRANSFER IN BYTES. 598 R3 ADDRESS OF I/O REQUEST PACKET. 599 600 OUTPUTS: 601 602 IF BUFFER IS NOT READ ACCESSIBLE, THEN THE FOLLOWING VALUE IS 603 RETURNED: 604 605 RO = SS$_ACCVIO 606 607 IF BUFFER IS READ ACCESSIBLE, THEN THE FOLLOWING VALUES ARE RE- 60B TURNED: 609 610 RO SS$ NORMAL 611 Rl SIZE OF TRANSFER IN BYTES. 612 R2 WRITE FUNCTION INDICATOR (0). 613 R3 ADDRESS OF I/O REQUEST PACKET. 614 615 IRP$L BCNT(R3) SIZE OF TRANSFER IN BYTES. 616 IRP$W=FUNC(R3) WRITE. 617 ' 618 619 EXE$WRITECHKR:: 620 MOVL R1,IRP$L BCNT(R3) 621 BSBB 40$ - CHECK BUFFER FOR WRITE FUNCTION SAVE Rl CHECK ACCESS 622 MOVL IRP$L BCNT(R3),R1 RESTORE Rl 623 BLBC R0,35$ IF LBC, NO ACCESS 624 CLRL R2 SET WRITE FUNCTION INDICATOR 625 35$: RSB 626 627 40$: ADDL RO,Rl ENDING ADDRESS OF BUFFER 628 BICW #VA$M BVTE,RO 629 SUBL RO,R1- TRUNCATE TO START OF PAGE CALCULATE LENGTH OF BUFFER TO PROBE 630 CVTWL #-AX200,R2 SET ADDRESS ADJUSTMENT CONSTANT 631 45$: CVTLW R 1, R 1 GREATER THAN 32k? 632 BVS 60$ 633 IF VS, YES; CHECK BY CHUNKS 634 50$: 635 IFNORD Rl, (RO) ,ACCVIO SUBL R2,RO CAN ENDS OF USER'S BUFFER BE READ? CALCULATE VA OF NEXT PAGE 636 MOVAW (Rl)[R2],Rl 637 BGTR 50$ CALCULATE NEW LENGTH IF GTR THEN MORE TO TEST 638 MOVZWL #SS$_NORMAL,RO INDICATE SUCCESS 639 RSB AND RETURN 640 641 60$: 642 643 MOVQ RO,-(SP) MOVZWL #AX7EOO,R1 SAVE CURRENT VALUES ON STACK SIZE OF CHUNK USED STEPPING THRU BUF. (32K - 1 PAGE) SYSQIOFDT V03-009 6E 51 04 AE 51 DC AC 50 50 SE CF - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 18 CHECK BUFFER ACCESSIBILITY FOR WRITE FUN 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) co 01E4 644 C2 01E7 645 10 OlEB 646 E9 OlED 647 7D OlFO 648 1 1 01F3 649 01F5 650 ADDL SUBL BSBB BLBC MOVQ BRB .DSABL Rl,(SP) Rl ,4(SP) 50$ RO,ACCVIOl (SP)+,RO 45$ LSB ADVANCE ADDRESS BY THIS AMOUNT DECREASE COUNT PROBE CHUNK IF LBC, NO ACCESS POP PRE-ADJUSTED VALUES OFF STACK SEE IF LENGTH NOW LT 32K SYSQIOFDT V03-009 ;ROW49577 ; ROW49577 ;ROW49577 ;ROW49577 ;ROW49577 ;ROW49577 ;PRD0030 ;PRD0030 ;PRDOl930 ;PRD0030 ; ROW49577 -6 - SYSTEM SERVICE QUEUE 1/0 FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 19 SET DEVICE MODE AND CHARACTERISTICS FUNC 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SVSQIOFDT.(2) 1 E 57 23 04 40 A5 61 42 A5 02 A1 44 A5 04 A1 2A 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 OlF!:) 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 01F5 10 01F5 Dl 01F7 13 OlFA BO OlFC BO 0200 DO 0205 11 020A 652 .SBTTL SET DEVICE MODE AND CHARACTERISTICS FUNCTIONS (AT FDT LEVEL) 653 ·+ 654 , EXE$SETCHAR - SET DEVICE MODE AND CHARACTERISTICS FUNCTIONS (AT FDT LEVEL) 655 656 THIS ROUTINE PLACES THE NEW CHARACTERISTICS SPECIFIED BY THE QUADWORD POINTED 657 TO BY P1 INTO THE SECOND AND THIRD LONGWORDS OF THE DEVICE UCB. 658 659 INPUTS: 660 661 RO = SCRATCH. 662 R1 = SCRATCH. 663 R2 = SCRATCH. 664 R3 =ADDRESS OF I/O REQUEST PACKET. 665 R4 = CURRENT PROCESS PCB ADDRESS. 666 R5 = ASSIGNED DEVICE UCB ADDRESS. 667 R6 = ADDRESS OF CCB. 668 R7 = I/O FUNCTION CODE BIT NUMBER. 669 RB = FUNCTION DECISION TABLE DISPATCH ADDRESS. 670 R9 = SCRATCH. 671 R10 = SCRATCH. 672 R11 =SCRATCH. 673 AP = ADDRESS OF FIRST FUNCTION DEPENDENT PARAMETER. 674 675 OUTPUTS: 676 677 THE CHARACTERISTICS SPECIFIED BY THE QUADWORD POINTER TO BY Pl ARE STORED 678 IN THE SECOND AND THIRD LONGWORDS OF THE DEVICE UCB. .1 . 2 COMPLETION CODES: .3 .4 SS$ NORMAL - SUCCESSFUL . 5 SS$-ACCVIO - BUFFER ACCESS VIOLATION .6 SS$=ILLIOFUNC - FUNCTION IS ILLEGAL ON DISK DEVICES .7 .8 .9 .ENABL LSB . 10 EXE$SETCHAR:: ;SET DEVICE MODE AND CHARACTERISTICS .11 BSBB CHECK SET ;IS THIS SET FUNCTIQN VAILD? 685 CMPL #10$ SETMODE,R7 ;SET MODE FUNCTION? 686 BEQL 10$ - ;IF EQL YES 687 MOVW (R1),UCB$B DEVCLASS(R5) ;SET DEVICE TYPE AND CLASS 688 10$: MOVW 2(R1),UCB$W DEVBUFSIZ(R5) ;SET DEFAULT BUFFER SIZE 689 MOVL 4(R1),UCB$L-DEVDEPEND(R5) ;SET DEVICE CHARACTERISTICS 690 BRB 20$ - SYSQIOFDT V03-009 ;ROW49577 ;PRD0030 ;PRD0030 ;PRD0030 ;ROW49577 ;PRD0030 ;PRD0030 ;PRD0030 ;ROW49577 ;ROW49577 ;ROW49577 ;ROW49577 ;ROW49577 ;ROW49577 ;ROW49577 ;ROW49577 ;ROW49577 ;ROW49577 ;ROW49577 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 20 SET DEVICE MODE AND CHARACTERISTICS FUNC 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) 07 38 A3 61 FDEB' 40 A5 01 OA 51 6C 50 OOF4 BF 03 50 OC FDCE' 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 020C 10 020C 7D 020E 31 0212 0215 0215 91 0215 13 0219 DO 021B 021E 05 0224 0225 3C 0225 11 022A 3C 022C 31 022F 692 .SBTTL SET DEVICE MODE AND CHARACTERISTICS FUNCTIONS 693 ;+ 694 EXE$SETMODE - SET DEVICE CHARACTERISTICS AND MODE 695 696 FUNCTIONAL DESCRIPTION: 697 698 THIS ROUTINE PLACES THE NEW CHARACTERISTICS SPECIFIED BY Pl INTO 699 THE I/O PACKET FOR INSERTION INTO THE UCB WHEN THE UNIT IS IDLE. 700 THE INPUT DATA IS IN THE FORM RETURNED BY $GTCHAN. THE SPECIFIED BUFFER 701 IS ASSUMED TO BE 12 BYTES IN LENGTH. THE P2 LENGTH SPECIFIER IS IGNORED. 702 703 THE NEW CHARACTERISTICS ARE PLACED IN IRP$L MEDIA/MEDIA+4 AND THE 704 PACKET IS QUEUED VIA EXE$QIODRVPKT. - 705 706 INPUTS: 707 708 709 R3 = I/O PACKET ADDRESS R4 = CURRENT PCB 710 711 712 = RS R6 = = ACB ADDRESS ASSIGNED CCB ADDRESS AP ADDRESS Of THE QIO ARGUMEMT Pl 713 714 OUTPUTS: 715 716 RO = STATUS OF THE OPERATION 717 R3+ ARE PRESERVED. 718 719 COMPLETION CODES: 720 721 SS$ NORMAL - SUCCESSFUL 722 SS$-ACCVIO - BUFFER ACCESS VIOLATION .1 SS$=ILLIOFUNC - FUNCTION IS ILLEGAL ON DISK DEVICES . 2 ;- .3 .4 EXE$SETMODE:: SET DEVICE MODE AND CHARACTERISTICS .5 BSBB CHECK SET IS THIS SET FUNCTION VAILD? .6 MOVQ (Rl),lRP$L MEDIA(R3) INSERT CHARACTERISTICS IN I/O PACKET .7 BRW EXE$QIODRVPKT QUEUE THE PACKET .8 .9 CHECK SET: . 10 - CMPB #DC$ DISK, UCB$B DEVCLASS(R5) ; Is this a disk device? .11 BEQL 91$ - - Branch if disk; they can't be set. . 12 MOVL Pl(AP), Rl Get buffer address. . 13 IFNORD #8, ( R1), 93$ Branch if no read access to buffer . .14 RSB Else, all is ok; return to caller. . 15 .16 91$: . 17 MOVZWL #SS$ ILLIOFUNC, RO BRB 99$ - Setup illegal I/O function status. or . 18 93$: MOVZWL #SS$ ACCV IO, RO Setup access violation status. . 19 99$: BRW EXE$ABORTI 0 Then blow the I/O request away. SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 21 SENSE DEVICE MODE AND CHARACTERISTICS FU 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 0232 51 44 A5 DO 0232 50 01 3C 0236 FDC4' 31 0239 023C 735 .SBTTL SENSE DEVICE MODE AND CHARACTERISTICS FUNCTIONS 736 ;+ 737 ; EXE$SENSEMODE - SENSE DEVICE MODE AND CHARACTERISTICS FUNCTIONS 738 739 THIS ROUTINE OBTAINS THE CURRENT DEVICE MODE/CHARACTERISTICS FROM THE DEVICE 740 DEPENDENT CHARACTERISTICS LONGWORD IN THE UCB AND IMMEDIATELY COMPLETES THE 741 I/O OPERATION WITH THE SECOND LONGWORD OF THE FINAL I/O STATUS EQUAL TO THE 742 DEVICE DEPENDENT CHARACTERSITICS. 743 744 INPUTS: 745 746 RO = SCRATCH. 747 R1 = SCRATCH. 748 R2 = SCRATCH. 749 R3 =ADDRESS OF I/O REQUEST PACKET. 750 R4 = CURRENT PROCESS PCB ADDRESS. 751 RS = ASSIGNED DEVICE UCB ADDRESS. 752 R6 = ADDRESS OF CCB. 753 R7 = I/O FUNCTION CODE BIT NUMBER. 754 RS = FUNCTION DECISION TABLE DISPATCH ADDRESS. 755 756 = R9 = SCRATCH. R10 SCRATCH. 757 R11 =SCRATCH. 758 AP = ADDRESS OF FIRST FUNCTION DEPENDENT PARAMETER. 759 760 OUTPUTS: 761 762 THE DEVICE DEPENDENT CHARACTERISTICS ARE OBTAINED FROM THE UCB AND 763 THE I/O IS COMPLETED WITH THE SECOND I/O STATUS LONGWORD EQUAL TO THE 764 DEVICE CHARACTERISTICS. 765 · 766 767 EXE$SENSEMODE:: SENSE DEVICE MODE/CHARACTERISTICS 768 MOVL UCB$L DEVDEPEND(R5),R1 GET DEVICE DEPENDENT CHARACTERSITICS 769 20$: MOVZWL #SS$ NORMAL,RO SET NORMAL COMPLETION STATUS 770 BRW EXE$FINISHIO FINISH I/O OPERATION 771 .DSABL LSB SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE IIO FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 22 CARRIAGE CONTROL INTERPRETATION 24-APR-1982 15:51 :12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) OD 01 00 01 20 OD 01 00 02 30 OD 01 QC 01 31 OD 01 00 00 2B 00 00 00 01 24 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 023C 0240 0241 0245 0246 024A 0248 024F 0250 0254 773 .SBTTL CARRIAGE CONTROL INTERPRETATION 774 ;+ 775 EXE$CARRIAGE - INTERPRET CARRIAGE CONTROL SPECIFIER 776 777 FUNCTIONAL DESCRIPTION: 778 779 THIS ROUTINE IS USED BY THE LINE PRINTER DRIVER AND THE TERMINAL 780 DRIVER TO INTERPRET THE tARRIAGE CONTROL SPECIFIER IN IRP$B CARCON 781 NOTE THAT IRP$B_CARCON IS USED AS A LONGWORD! 782 783 THE SPECIFIER IS AS FOLLOWS: 784 785 .BYTE 1 FORTRAN CARRIAGE CONTROL CHARACTER IF NOT 0 786 .BYTE 2 ***** IGNORED ***** 787 .BYTE 3 PREFIX CARRIAGE CONTROL 788 .BYTE 4 SUFFIX CARRIAGE CONTROL 789 790 THE PREISUF FIELDS ARE AS FOLLOWS 791 792 IF BIT 7=0 THEN BITS 6-0 ARE THE NUMBER OF NEWLINES TO INSERT. 793 IF BIT 7=1 AND BIT 6=0 THEN BITS 4-0 ARE THE ASCII CHARACTER TO 794 OUTPUT. ASCII SET CO OR C1 IS SPECIFIED BY BIT 5. 795 IF BIT 7=1 AND BIT 6=1 THEN BITS 5-0 ARE THE PRINTER CHANNEL NUMBER 796 797 ASCII SET CO IS ASSUMED AND BIT 6 IS IGNORED IF BIT 7=0. 798 799 INPUTS: 800 801 R3 = ADDRESS OF THE IIO PACKET 802 RS = ADDRESS OF THE UCB 803 804 OUTPUTS: 805 806 IRP$B_CARCON IS SET UP TO REFLECT THE PREISUF CHARACTERS TO SEND. 807 808 BYTE 0 = NUMBER OF CHARACTERS TO SEND 809 BYTE 1 = CHARACTER, IF 0 THEN NEWLINE 810 811 IRP$B_CARCON+2 HAS THE SUFFIX CONTROL. 812 813 RO,R1 ARE USED. 814 815 816 817 ; LOCAL DATA TABLE 818 819 C' CTABLE: CARRIAGE CONTROL TO FORTRAN MATCH TABLE 820 .BYTE 1,0'1'13 SPACE => 1 NL, 1 CR 821 .ASCII I I 822 .BYTE 2,0' 1' 13 "O" => 2 NL, 1 CR 823 .ASCII IOI 824 .BYTE 1'12: 1' 13 "1" => 1 FF, 1 CR 825 .ASCII I 1I 826 .BYTE 0 ,0' 1'13 "+" => NOTHING, 1 CR 827 .ASCII l+I 828 .BYTE 1,0,0 ,0 "$" => 1 NL, NOTHING 829 .ASCII 1$1 SYSQIOFDT V03-009 - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-19B4 15:36:44 VAX-11 Macro V03-0l Page 23 CARRIAGE CONTROL INTERPRETATION 24-APR-19B2 15: 51: 12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) OD 01 00 01 00 51 3C A3 9A 12 13 50 D9 AF 9E 3C A3 BO DO 60 95 05 13 51 80 91 F3 12 05 51 3E A3 9A 02 13 19 10 3C A3 51 90 3D A3 50 90 51 3F A3 9A 02 13 09 10 3E A3 51 90 3F A3 50 90 05 50 D4 08 51 07 E 1 51 EO BF BB 50 51 01 9A 05 0255 0259 025A 025A 025A 025A 025A 025E 0260 0264. 0268 026A 026C 026F 0271 0272 0272 0272 0272 0276 0278 027A 027E 0282 0286 0288 028A 028E 0292 0293 0293 0293 0293 0295 0299 029D 029E 02Al 02A2 02A2 B30 .BYTE 1,0,1'13 ; DEFAULT => 1 NL, 1 CR B31 .BYTE 0 ; TABLE END B32 833 834 835 E' XE$CARRIAGE:: ; INTERPRET CARRIAGE CONTROL 836 MOVZBL IRP$B_CARCON(R3),Rl ; GET FORTRAN SPECIFIER 837 BEQL 20$ ; IF EQL THEN TRY PRE/SUF 838 MOVAB BACCTABLE,RO ; ADDRESS MATCH TABLE B39 10$: MOVL (RO)+,IRP$B_CARCON(R3) ; ASSUME MATCH 840 TSTB (RO) ; END OF TABLE? 841 BEQL 15$ ; IF EQL THEN YES 842 CMPB (RO)+,Rl ; MATCH? 843 BNEQ 10$ ; NO THEN SEARCH 844 15$: RSB ; ELSE RETURN 845 ; 846 ; PRE/SUF CARRIAGE CONTROL B47 B48 2' 0$: MOVZBL IRP$B_CARCON+2(R3),Rl ; GET PREFIX SPECIFIER 849 BEQL 30$ ; IF EQL THEN NONE 850 BSBB 100$ ; INTERPRET THE SPECIFIER 851 30$: MOVB Rl,IRP$B CARCON(R3) ; INSERT NUMBER 852 MOVB RO,IRP$B-CARCON+l(R3) ; INSERT CHARACTER 853 MOVZBL IRP$B_CARCON+3(R3),R1 ; GET SUFFIX SPECIFIER 854 BEQL 40$ ; IF EQL THEN NONE 855 BSBB 100$ ; CONVERT THE SPECIFIER 856 40$: MOVB R1,IRP$B CARCON+2(R3) ; INSERT NUMBER 857 MOVB RO,IRP$B_CARCON+3(R3) ; INSERT CHARACTER B58 RSB ; RETURN B59 ; 860 ; SUBROUTINE TO INTERPRET PRE/SUF SPECIFIER 861 862 100$: CLRL RO ; ASSUME NEWLINE B63 BBC #7, R1, 110$ ; IF BIT 7 CLEAR THEN DONE 864 BICB3 #AXOEO, R1 , RO : REMOVE OTHER BITS B65 B66 110$: 867 868 MOVZBL #1,R1 RSB .END ; SET ONE CHARACTER ; RETURN SYSQIOFDT Symbo 1 tab 1e AC8$V QUOTA ACCV IO ACCVI01 8ACKOUT QIO CC8$W IOC CCTA8LE CHECK SET DC$ DlSK "EXESA80RTI 0 EXE$CARRIAGE EXE$C CMSTKSZ EXESDEANONPAGED EXE$FINISHIO EXE$FINISHIOC EXE$ IOR SNWA IT EXE$LCLDSKVALI D EXE$MODIFY EXE$MODIFVLOCK EXE$MODIFYLOCKR EXESONEPARM EXESQIODRVPKT EXE$READ EXE$'READCHK EXE$READCHKR EXE$READLOCK EXE$READLOCKR EXE$SENSEMODE EXE$SETCHAR EXE$SETMODE EXE$WRITE EXE$WRITECHK EXE$WRITECHKR EXE$WRITELOCK EXE$WRITELOCKR EXE$ZEROPARM IO$ PACKACK 10$-PHYSICAL I0$-READL8LK IO$-READP8LK 10$-SETMODE IPL$ SCS IPL$-SYNCH IRP$B CARCON IRP$8-RMOD IRP$L-8CNT IRP$L-DIAG8UF IRP$L-MEDIA IRP$L-SVAPTE IRP$M-FUNC IRP$S-FCODE IRP$V-8UFIO IRP$V-DIAGBUF IRP$V-FCODE IRP$V-FUNC IRP$W-80FF IRP$W-FUNC IRPsw:::sTS - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 24 24-APR-1982 15:51:12 DISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) 00000006 000001AO R 01 0000019C R 01 OOOOOOFF R 01 OOOOOOOA 0000023C R 01 = 00000215 R 00000001 01 ******** x 01 0000025A RG 01 ******** x 01 ******** ******** x x 01 01 ******** x 01 00000000 RG 01 00000035 RG 01 00000069 RG 01 OOOOOOAl RG 01 OOOOOOA4 RG 01 00000029 RG 01 ******** x 01 0000006F RG 01 00000132 RG 01 00000146 RG 01 00000098 RG 01 OOOOOOAE RG 01 00000232 RG 01 000001F5 RG 01 0000020C RG 01 00000078 RG 01 00000138 RG 01 000001A4 RG 01 0000009E RG 01 00000085 RG 01 0000002F RG 01 00000008 = OOOOOOlF 00000021 oooooooc 00000023 00000008 00000008 0000003C 00000008 00000032 = 0000004C = 00000038 0000002C 00000002 00000006 00000000 00000007 00000000 00000001 = 00000030 = 00000020 0000002A MMG$IOLOCK Pl P2 P3 P4 P5 P6 PCB$L EFWM PC8$L-STS PCB$V-SSRWAIT PCB$W-ASTCNT PC8$W-BIOCNT PCB$W-DIOCNT PMS$ABORT_RQ PR$ IPL SCHSGL RESMASK SCH$GQ-MWAIT SCH$WAIT SF$L SAVE AP SS$ ACCVIO SSS-I LLIOFUNC SSS-NORMAL UC8$8 DEVCLASS UCB$B-ONLCNT UCB$L-DEVDEPEND UCB$L-STS UCB$V-LCL VALID UCB$V-VALlD UCB$W-DEVBUFSIZ VA$M_BYTE = = ******** 00000000 00000004 x 01 = = 00000008 oooooooc = 00000010 = 00000014 = = = = = 0000004C 00000024 OOOOOOOA 00000038 0000003A = 0000003E ******** x 01 = 00000012 ******** x 01 ******** x 01 = ******** 00000008 x 01 = oooooooc = OOOOOOF4 = = 00000001 00000040 = OOOOOOAE = = 00000044 00000064 = = 00000011 00000008 = = 00000042 OOOOOlFF SYSQIOFDT Psect synopsis - SYSTEM SERVICE QUEUE I/O FDT SUBROUTIN 3-JUN-1984 15:36:44 VAX-11 Macro V03-01 Page 25 24-APR-1982 15:51:12 OISK$VMSMASTER:[SYS.SRC]SYSQIOFDT.(2) +----~--~--------+ ! Psect synopsis ! +------~---------+ PSECT name Allocation PSECT No. Attributes ABS BLANK $ABS$ 00000000 000002A2 00000000 0.) 00 674.) 01 0.) 02 0.) NOP IC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE 1.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 2.) NOP IC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE +-----------------------~+ ! Performance indicators ! +------------------------+ Phase Page faults CPU Time Elapsed Time Initialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals 15 00:00:00.07 00:00:02.88 91 00:00:00.73 00:00:09.00 454 00:00:18.08 00:01:39.32 0 00:00:02.73 00:00: 14. 75 168 00:00:04.66 00:00:30.16 10 00:00:00.11 00:00:00.36 2 00:00:00.03 00:00:00.04 0 00:00:00.00 00:00:00.00 743 00:00:26.42 00:02:36.51 The working set limit was 1650 pages. 98202 bytes (192 pages) of virtual memory were used to buffer the intermediate code. There were 100 pages of symbol table space allocated to hold 1840 non-local and 44 local 969 source lines were read in Pass 1, producing 15 object records in Pass 2. 23 pages of virtual memory were used to define 22 macros. symbols. ! Macro library statistics ! +--------------------------+ Macro library name Macros defined $255$DUA28:[SYS.OBJ]LIB.MLB;1 10 -$255$DUA28: [SYSLIB]STARLET.MLB;2 9 fOTALS (all libraries) 19 1922 GETS were required to define 19 macros. There were no errors, warnings or information messages. MACRO/LIS=LIS$:SVSQIOFDT/OBJ=OBJ$:SVSQIOFDT MSRC$:SVSQIOFDT/UPDATE=(ENH$:SYSQIOFDT)+EXECML$/LIB IOSUBNPAG IOSUBNPAG Table of contents (3) (4) (5) (6) (7) (8) (9) (10) ( 11) ( 12) ( 14) (15) (16) ( 17) ( 18) ( 19) ( 21 ) (23) (24) (25) (26) (27) (28) (29) (30) ( 31 ) (32) (33) (34) (35) (36) 172 204.2 276 307 362 422 470 560 593 631 718 778 817.2 862 967 1074 1197 1397 1416 1450 1486 1521 1623 1734.2 1734.62 1734.133 1734. 198 1734.277 1734.458 1734.622 1734.672 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 CANCEL I/0 ON CHANNEL Handle Last Channel Deassign FILL DIAGNOSTIC BUFFER RELEASE I/O CHANNEL REQUEST I/O CHANNEL I/O Request Completion Processing for Class Drivers I/O REQUEST COMPLETION PROCESSING MOUNT VERIFICATION HELPER INITIATE I/O FUNCTION ON DEVICE Allocate Buffered Data Path Release Buffered Data Path REQUEST AND ALLOCATE UNIBUS MAP REGISTERS FOR CLASS DRIVER REQUEST UNIBUS MAP REGISTERS ALLOCATE UNIBUS MAP REGISTERS Allocate a specific set of UNIBUS Map Registers Permanently Allocate UNIBUS Map Registers Release UNIBUS Map Registers RETURN TO CALLER WAITFOR INTERRUPT OR TIMEOUT AND KEEP CHANNEL WAITFOR INTERRUPT OR TIMEOUT AND RELEASE CHANNEL ALLOCATE SYSTEM PAGE TABLE CONVERT DEVICE NAME AND UNIT BROADCAST TO A TERMINAL SCAN THE I/O DATA BASE SCAN THE I/0 DATA BASE BOTH PRIMARY & SECONDARY PATHS IOC$CTRLINIT - Call driver controller init. routine IOC$UNITINIT - Cal 1 driver unit init. routine Parse Device Name String Search I/O Database for Device Continue I/O Database Search Check UCB Against Search Rules Page 0 IOSUBNPAG V03-033 ;WMC0002 ;WMC0002 -1 ;ACG0399 ;ACG0399 ;WMC0002 ;WMC0002 ;WMC0002 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;TMK0001 ;TMK0001 ;TMK0001 ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0406 ;ACG0406 ;ACG0406 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11;33;30 VAX-11 Macro V03-01 Page 1 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC)IOSUBNPAG.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1 . TITLE IOSUBNPAG - NONPAGED I/O RELATED SUBROUTINES .1 . I DENT 'V03-033' . 2 3 ;**************************************************************************** 4 ;* 5 ;* 6 7 ' · ; * * 8 ;* COPYRIGHT (c) 1978, 1980, 1982 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. ALL RIGHTS RESERVED. * * * * * 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ;* ; ; * * ; * ; * ; * ; * ; * ; * ; * ; * ;* ; ; * * ; * ;*** THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED. * * * * * * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION. * * * * DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT WHICH· IS NOT SUPPLIED BY DIGITAL. * * * * ************************************************************************** 25 26 D. N. CUTLER 13-JUN-76 27 28 29 NONPAGED I/O RELATED SUBROUTINES 30 .1 MODIFIED BY: . 2 . 3 V03-033 WMC0002 Wayne Cardoza 03-May-1984 .4 Add support for MNTVERPND bit. . 5 .6 V03-032 RAS0300 Ron Schaefer 2-May-1984 . 7 Change IOC$CVT DEVNAM to only prefix cluster node names if .8 the DEV$V NNM device characteristic is set in UCB$L DEVCHAR2. .9 Add additional itemcode (4) to IOC$CVT DEVNAM to provide . 10 the device name string sans unit number. .11 . 12 V03-031 TMKOOOl Todd M. Katz 23-Apr-1984 . 13 Remove the $LOGDEF data definitions. .14 . 15 V03-030 RLRPDTADP Robert L. Rappaport 9-Apr-1984 . 16 Modify entrypoints used for allocating and deallocating · 17 Buffered Data Paths and UNIBUS Map Registers for UQPORTS (UDA), . 18 to pickup pointer for ADP from PDT$L_ADP(R4). .19 .20 V03-029 ACG0414 Andrew C. Goldstein, 30-Mar-1984 15:49 . 21 Minor parse and searching fixes in IOC$SEARCH ... .22 add IOC$V_ALLOC to force allocation .23 .24 V03-028 ACG0406 Andrew C. Goldstein, 16-Mar-1984 15:42 .25 Fix bugs in searching for al location class .26 IOSUBNPAG V03-033 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;RLRMAPSP .;RLRMAPSP ;RLRMAPSP ;·RLRMAPSP ;RLRMAPSP ;ROW0292 ;ROW0292 ;ROW0292 ;ROW0292 ;KPLOOOl ;KPLOOOl ;KPL0001 ;ROW0244 ;ROW0244 ;ROW0244 ;ROW0244 ;ROW0244 ;ROW0244 ;ROW0239 ;ROW0239 ;ROW0239 ;ROW0239 ;ROW0239 ;ROW0234 ;ROW0234 ;ROW0234 ;ROW.0234 ;ROW0234 ;ROW0234 ;ROW0234 ;TCMOOOS ;TCMOOOS ;TCM0005 ;TCMOOOS ;TCM0005 ;KDM0084 ;KDM0084 ;KDM0084 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0203 ;ROW020-3 ;ROW0203 ;,ROW0203 ;ROW0203 ;ROW0203 ;TCM0004 ;TCM0004 ;TCM0004 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 2 12-MAR-1982 17:12:23 DISK$VMSMASTER: [SYS.SRC)IOSUBNPAG.(1) 0000 .27 0000 .28 0000 .29 0000 .30 0000 . 31 0000 .32 0000 .33 0000 .34 0000 .35 0000 .36 0000 .37 0000 .38 0000 .39 0000 .40 0000 .41 0000 .42 0000 .43 0000 .44 0000 .45 0000 .46 0000 .47 0000 .48 0000 .49 0000 .50 0000 . 51 0000 .52 0000 .53 0000 .54 0000 .55 0000 .56 0000 .57 0000 .58 0000 .59 0000 .60 0000 .61 0000 .62 0000 .63 0000 .64 0000 .65 0000 .66 0000 .67 0000 .68 0000 .69 0000 .70 0000 . 71 0000 .72 0000 .73 0000 .74 0000 .75 0000 .76 0000 .77 0000 .78 0000 .79 0000 .80 0000 . 81 0000 .82 0000 .83 V03-027 ACG0399 Andrew C. Goldstein, 24-Feb-1984 22:28 Add IOC$LAST CHAN subroutine, and move in internal I/O database parse and search routines, so they can be called by IPC. V03-026 RLRMAPSP Robert L. Rappaport 15-Feb-1984 Correct bug in BEQL destination in IOC$ALOUBAMAPSP that is only triggered if the range specified, coincides with the exact end of an extent of map registers. V03-025 ROW0292 Ralph 0. Weber 4-FEB-1984 Fix branch displacements broken by movement of EXE$MOUNTVER to SYSLOAxxx. V03-024 KPLOOOl Peter Lieberwirth 7-Nov-1983 Add paths for new processors to CPUDlSP invocation. V-03-023 ROW0244 Ralph 0. Weber 17-0CT-1983 Change the IOC$CVT DEVNAM name string formation rules ~o eliminate $1$TTAO~ and other al location class based names for devices which can never be dual pathed. See routine comments for details of current operation mode. V03-022 ROW0239 Ralph 0. Weber 11-0CT-1983 Fix IOC$CVT DEVNAM to not insert node name or trailing dol Jar sign when n~de name is nul 1. Also correct comments describing the R4 argument to IOC$CVT DEVNAM. V03-021 ROW0234 Ralph 0. Weber 5-0CT-1983 Change IOC$CVT DEVNAM to produce $al location-class$device strings completely in ASCII, when allocation class output requested. In the process rip up the whole thing because was the only way to get something that worked and didn't occupy al 1 non-page memory is that V03-020 TCM0005 Trudy C. Matthews 5-0CT~1983 Add IOC$SCAN IODB 2P which is functionally the same as IOC$SCAN IOCB except that both primary and secondary paths to a device-are scanned. V03-019 KDM0084 Kathleen D. Morse 26-Sep-1983 Added MicroVAX I support to CPUDISP macros. V03-018 ROW0221 Ralph 0. Weber 8-SEP-1983 Change IOC$UNITINIT to look for a unit initialization routine in the DDT before looking in the CRB. See the note in the routine's header for details. V03-017 ROW0203 Ralph 0. Weber 5-AUG-1983 Add two new routines IOC$CTRLINIT and IOC$UNITINIT. These are the proscribed mechanism for cal ling device driver controller 0 and unit initialization routines. These routines correctly setup for, locate, and cal 1 the appropriate driver routines. V03-016 TCM0004 Trudy C. Matthews 26-Jul-1983 Change IOC$CVT <devnam> form oDf EVdNeAvMiceto return name if the <allocation R4 > 0. class>+ IOSUBNPAG V03-033 ;TCM0004 ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;LMPBUILD ;LMPBUILD ;LMPBUILD ;TCM0003 ;TCM0003 ;TCM0003 ;TCMQ003 ;TCM0003 ;TCM0003 ;TCM0002 ;TCM0002 ;TCM0002 ;TCM0001 ;TCMOOOl ;TCMOOOl ;TCM0001 ;TCM0001 ;ROW0188 ;ROW0188 ;ROW0188 ;KTA3022 ;KTA3022 ;KTA3022 ;KTA3022 ·; ROWO 140 ;ROW0140 ;ROW0140 ;ROW0140 ;ROW0140 ;MLJ0101 ;MLJ0101 ;MLJ0101 ;KTA3018 ;KTA3018 ;KTA3018 ;ROW0130 ;ROW0l30 ;ROW0130 ;ROW0130 ;KDM0002 ;KDM0002 ;KDM0002 ;RLR0003 ;RLR0003 ;RLR0003 ;RLR0003 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 3 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 .84 .85 .86 .87 .88 .89 .90 .91 .92 .93 .94 .95 .96 .97 .98 .99 . 100 . 101 . 102 . 103 . 104 . 105 . 106 . 107 . 108 . 109 . 110 . 111 . 112 . 113 . 114 . 115 . 116 . 117 . 118 . 119 . 120 . 121 . 122 . 123 . 124 . , 25 . , 26 . , 27 . 128 . 129 . 130 . 131 . 132 . 133 . 134 . 135 . 136 . 137 . 138 . 139 . 140 V03-015 RLRBYTEOFF Robert L. Rappaport 27-Jun-1983 Correct error in IOC$REQDATAPUDA. Error is that this routine has operated in a NOWAIT mode, that is, if no Buffered Datapath was available, we just used the Direct Datapath. Unfortunately, this doesn't work on 780's and 790's if the user buffer is located at an odd byte address since Byte Offset doesn't work on the Direct Datapath for the UNIBUS Adapters on these processors. V03-014 LMPBUILD L. Mark Pilant, 26-Jun-1983 23:11 Change references from TTY$K_WB_HDRLEN to TTY$K_WB LENGTH. V03-013 TCM0003 Trudy C. Matthews 17-Jun-1983 Change the way cluster-style device names are conditionally returned, such that cluster-style names are returned for local disk devices if the system is participating in a cluster (routine IOC$CVT DEVNAM). V03-012 TCM0002 Trudy C. Matthews Fix bug in TCMOOOl. 09-Jun-1983 V03-011 TCM0001 Trudy C. Matthews 21-Apr-1983 Add new parameter to IOC$CVT DEVNAM that al lows caller to specify whether he wants Ihe node name returned tor local devices or not. V03-010 ROW0188 Ralph 0. Weber Fix broken branches to PMS$ routines. 30-APR-1983 V03-009 KTA3022 Kerbey T. Altmann 29-Dec-1982 Enhance KTA3018. Add new routine to scan the IO data base and return the blocks. V03-008 ROW0140 Ralph 0. Weber 18-NOV-1982 Cause IOC$DALOCUBAMAP to give non-fatal INCONSTATE, "I neons is tant UBA data base'' bugcheck if nurnbe r of map registers to deal locate is zero. V03-007 MLJ0101 Add $SBDEF. Martin L. Jack 11-Nov-1982 V03-006 KTA3018 Ker·bey T. Al trnarrn 0 1 -- Nov - 1 9 8 2 Modify CVT DEVNAME for new IO database. V03-005 ROW0130 Ralph 0. Weber 5-0CT-1982 Remove IOC$DELMBX whose functionality is replaced by new routines in module UCBCREDEL. V03-004 KDM0002 Added $DCDEF. Kathleen D. Morse 28-Jun-1982 V03-003 RLR0003 Robert L. Rappaport 1-June-1982 Correct errors in UNIBUS map register al location and deallocation that occur when the number of active descriptors is zero. Errors were in IOC$ALOUBAMAPSP IOSUBNPAG V03-033 ;RLR0003 ;RLR0003 ;RLR0003 ;RLR0003 ;RLR0002 ;RLR0002 ;RLR0002 ;RLROOOl ;RLROOOl ;RLROOOl ;RLROOOl ;RLROOOl ;RLROOOl - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-0l Page 4 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000. 0000 0000 0000 .141 . 142 . 143 .144 . 145 . 146 . 147 . 148 · 149 . 150 . 151 . 152 . 153 (allocation error), IOC$ALOUBAPRM (allocation error), and IOC$DALOCUBAMAP (deallocation error). The error in IOC$DALOCUBAMAP is corrected in a patch to V3.1. V03-002 RLR0002 Robert L. Rappaport 22-May-1982 Remove IOC$REQMAPREGN and all comments that reference it. V03-001 RLROOOl Robert L. Rappaport 22-May-1982 Correct error in UNIBUS map register allocation that doubly allocated registers when the number of active descriptors was zero. This bug corrected in patch to V3.1. IOSUBNPAG V03-033 -114 ;_ACG0399 ;ACG0399 ;ACG0399 ;KDM0002 -2 ;TMKOOOl ;TMKOOOl ;TMKOOOl ;TMKOOOl ;TMKOOOl ;TMK0001 ;TMK0001 ;TMKOOOl ;TMKOOOl ;TMKOOOl ;MLJ0101 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 - NONPAGED I/O RELATED SUBROUTINES 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 145 146 147 ; MACRO LIBRARY CALLS 148 149 150 $ADPDEF 151 $CA DEF .1 $CANDEF . 2 $CDRPDEF . 3 $CRBDEF .4 $DC DEF 154 $DOB DEF 155 $DDTDEF 156 $DEVDEF 157 $DYNDEF 158 $EMBDEF 159 $IDBDEF .1 $IOCDEF . 2 $IPLDEF .3 $IRPDEF .4 $JIBDEF .5 $LCKDEF .6 $MSCPDEF . 7 $PCBDEF .8 $PDTDEF .9 $PRDEF . 10 $PRVDEF . 11 $SBDEF . 12 $SSDEF . 13 $TTVDEF . 14 $UBMDDEF .15 $UCBDEF . 16 $VECDEF 3-JUN-1984 11; 33; 30 VAX-11 Macro V03-01 Page 5 12-MAR-1982 17; 12; 23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG.(2) ;DEFINE ADP OFFSETS ;DEFINE CONDITIONAL ASSEMBLY PARAMETERS ;DEFINE CANCEL I/O REASON CODES ;DEFINE CLASS DRIVER I/O REQUEST PACKET ;DEFINE CRB OFFSETS ;DEFINE DEVICE CLASSES ;DEFINE DOB OFFSETS ;DEFINE DDT OFFSETS ;DEFINE DEVICE CHARACTERISTICS FLAGS ;DEFINE DYNAMIC POOL BLOCK TYPES ;DEFINE EMB OFFSETS ;DEFINE IDB OFFSETS ;DEFINE IOC$SEARCHxxx FLAGS ;DEFINE INTERRUPT PRIORITY LEVELS :DEFINE !RP OFFSETS :DEFINE JIB OFFSETS ;DEFINE LOCK MANAGER SYMBOLS ;DEFINE MSCP STRUCTURES ;DEFINE PCB OFFSETS ;Define PDT offsets ;DEFINE PROCESSOR REGISTERS ;DEFINE PRIVILEGE BITS ;' DEDFeIfNiEne system SYSTEM block STATUS offsets CODES ;DEFINE TERMINAL WRIT~ PACKET OFFSETS ;Define UNIBUS Map Descriptor structure ;DEFINE UCB OFFSETS ;DEFINE CRB VE~TOR OFFSETS IOSUBNPAG V03-033 -12 - NONPAGED I/O RELATED SUBROUTINES CANCEL I/O ON CHANNEL 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 6 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG.(3) 11 64 A5 08 60 A4 OC A3 OA 28 A3 52 04 64 A5 08 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 00000000 0000 El 0000 D1 0005 12 OOOA 91 oooc 12 0010 AS 0012 05 0016 172 .SBTTL CANCEL I/O ON CHANNEL 173 ;+ 174 IOC$CANCELIO - CANCEL I/O ON CHANNEL 175 176 THIS ROUTINE IS A DEVICE INDEPENDENT CANCEL I/O ROUTINE THAT CONDITIONALLY 177 MARKS THE UCB SUCH THAT THE CURRENT I/O REQUEST WILL BE CANCELED IF CONDITIONS 178 WARRANT SUCH A ACTION. 179 180 INPUTS: 181 182 R2 = NEGATIVE OF THE CHANNEL NUMBER. 183 R3 = CURRENT IO PACKET. 184 R4 = PCB ADDRESS. 185 R5 = UCB ADDRESS. 186 187 OUTPUTS: 188 189 IF THE DEVICE IS BUSY, THE REQUEST IS FOR THE CURRENT PROCESS, AND 190 THE I/O WAS ISSUED FROM THE DESIGNATED CHANNEL, THEN THE CANCEL I/O 191 BIT IS SET IN THE CORRESPONDING UCB. 192 193 R2, R3, R4, AND R5 ARE PRESERVED ACROSS CALL. 194 ' 195 196 .PSECT WIONONPAGED 197 I OC$CANCELI 0: : ;CANCEL I/O ON CHANNEL 198 BBC #UC8$V BSY,UCB$W STS(R5),10$ ;IF CLR, DEVICE NOT BUSY 199 CMPL IRP$L PID(R3),PCB$L PID(R4) ;PROCESS ID MATCH? 200 BNEQ 10$ - - ;IF NEQ NO 201 CMPW R2,IRP$W CHAN(R3) ;CHANNEL NUMBER MATCH 202 BNEQ 10$ - ;IF NEQ NO 203 BISW #UCB$M_CANCEL,UCB$W_STS(R5) ;SET CANCEL PENDING 204 10$: RSB IOSUBNPAG V03-033 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACGB399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ACG0399 ACG0399 ACG0399 - NONPAGED I/O RELATED SUBROUTINES Handle Last Channel Deassign 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 7 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SVS.SRC]IOSUBNPAG.(4) 52 58 02 07 53 58 A5 58 01 50 0088 C5 DC BO lA 38 A5 17 00100004 SF 38 A5 05 00 38 A5 07 10 06 64 A5 FFBO' FFAD' 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 0017 7C 0017 9A 0019 1 1 001C 001E 001E DO 001E 9A 0022 0025 DO 0025 002A 16 002E 0031 EO 0034 0039 D3 0039 003F 0041 13 0041 E4 0043 0048 El 0048 004A 30 004D 30 0050 05 0053 0054 0054 . 2 .SBTTL Handle Last Channel Deassign .3 .4 ;+ .5 IOC$LAST CHAN - Last Channel Deassign Specific .6 IOC$LAST-CHAN AMBX - Last Assoc. MBX Channel Deassign Specific .7 .8 Functional Description: .9 . 10 Common functions dorie on last channel deassignment are handled. The .11 driver's cancel I/O routine is cal led with an appropriate reason code . 12 (CAN$C DASSGN for regular deassign, or CAN$C AMBXDGN for associated . 13 mailboxes). If after the cancel routine finished UCB$V DELETEUCB is . 14 set, the UCB is credited and deleted . . 15 .16 Inputs: . 17 . 18 R5 UCB address . 19 R2 Channel index (LAST CHAN only) .20 . 21 Outputs: .22 .23 RO thru R3 destroyed. .24 If appropriate, UCB is deal located. .25 .26 .27 .28 .ENABLE LSB .29 .30 IOC$LAST CHAN AMBX:: . 31 CLRQ R2 Clear unused cancel inputs. .32 MOVZBL #CAN$C AMBXDGN, RB Set cancel reason code. .33 BRB 10$ .34 .35 IOC$LAST CHAN:: . 36 MOVL UCB$L IRP(R5), R3 Get active packet address. .37 MOVZBL #CAN$C DASSGN, R8 Set cancel reason code. .38 .39 10$: MOVL UCB$L DDT(R5), RO Get DDT address. .40 SETI PL UCB$B-FIPL(R5) Raise to fork IPL. .41 JSB @DDT$L CANCEL(RO) Call driver's cancel I/O routine. .42 SETI PL #IPL$ ASTDEL Lower IPL. .43 BBS #DEV$V ALL, - Branch if still allocated .44 UCB$L DEVCHAR(R5),30$ .45 BITL #DEV$M TRM!DEV$M_MBX, - Is this a terminal, remote terminal .46 .47 .48 .49 .50 20$: .51 .52 .53 .54 30$: .55 .56 BEQL BBSC BBC BSBW BSBW RSB UCB$L DEVCHAR(R5) 20$ - #DEV$V OPR, UCB$L DEVCHAR(R5), 20$ #UCB$V DELETEUCB,UCB$L STS(R5), 30$ IOC$CREDIT UCB IOC$DELETE-UCB .DISABLE LSB or mailbox? Branch if not. Else, clear OPR bit. This is an implicit operator disable. Branch if UCB not to be deleted. Else credit UCB quotas, and delete the UCB. IOSUBNPAG V03-033 -71 53 58 A5 18 2A A3 07 50 4C 63 50 08 OOOOOOOO'EF 80 80 0080 C5 52 0088 C5 10 62 - NONPAGED I/O RELATED SUBROUTINES FILL DIAGNOSTIC BUFFER 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 8 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SVS.SRC]IOSUBNPAG.(5) 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 0054 DO 0054 E1 0058 DO 005D co 0061 7D 0064 006A 3C 0066 DO 0070 16 0075 05 0078 276 .SBTTL FILL DIAGNOSTIC BUFFER 277 ;+ 278 ; IOC$DIAGBUFILL - FILL DIAGNOSTIC BUFFER 279 280 THIS ROUTINE IS CALLED AT THE END OF AN I/O OPERATION, BUT BEFORE RELEASING 281 THE I/O CHANNEL, TO FILL THE FINAL DEVICE PARAMETERS INTO AN INTERNAL DIAG- 282 NOSTIC BUFFER IF ONE IS SPECIFIED. 283 284 INPUTS: 285 286 R4 ADDRESS OF DEVICE CSR REGISTER. 287 R5 DEVICE UNIT UCB ADDRESS. 288 289 OUTPUTS: 290 291 IF A DIAGNOSTIC BUFFER WAS SPECIFIED IN THE ORIGINAL REQUEST, THEN 292 THE COMPLETION TIME, FINAL ERROR COUNTERS, AND DEVICE REGISTERS ARE 293 FILLED INTO THE DIAGNOSTIC BUFFER. 294 295 296 IOC$DIAGBUFILL:: ;FILL DIAGNOSTIC BUFFER 297 MOVL UCB$L IRP(R5),R3 ;GET ADDRESS OF I/O PACKET 298 BBC #IRP$V DIAGBUF,IRP$W STS(R3),10$ ;IF CLR, NO DIAGNOSTIC BUFFER 299 MOVL @IRP$L-DIAGBUF(R3),RO ;GET ADDRESS OF INTERNAL BUFFER DATA AREA 300 ADDL #8,RO - ;POINT PAST START TIME 301 MOVQ EXE$GQ_SVSTIME,(RO)+ ;INSERT COMPLETION TIME 302 303 304 305 10$: MOVZWL MOVL JSB RSB UCB$B ERTCNT(R5),(RO)+ UCB$L-DDT(R5),R2 @DDT$L_REGDUMP(R2) INSERT FINAL ERROR COUNTERS GET ADDRESS OF DDT CALL DEVICE SPECIFIC REGISTER DUMP ROUTINE IOSUBNPAG V03-033 -1 - NONPAGED I/O RELATED SUBROUTINES RELEASE I/O CHANNEL 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 9 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG.(6) 50 24 A5 50 20 AO 10 50 24 A5 50 20 AO 02 04 50 24 AS 25 OE AO 00 51 2C AO 04 A1 55 1B 52 00 BO 16 38 55 52 53 10 AS 54 61 04 Al SS OC BS 38 04 Al OE AO 01 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 0079 DO 0079 DO 007D 11 0081 0083 DO 0083 DO 0087 13 008B 10 008D DO 008F El 0093 DO 0098 01 009C 12 OOAO OF OOA2 10 OOA6 BB OOA8 DO OOAA DO OOAD DO 0081 DO 0084 16 DOBB BA DOBB 05 OOBD 04 008E SA OOCl OS DOCS OOC6 307 .S8TTL RELEASE I/O CHANNEL 308 + 309 IOC$RELCHAN - RELEASE ALL I/O CHANNELS 310 IOC$RELSCHAN - RELEASE SECONDARY I/O CHANNEL 311 312 THIS ROUTINE IS CALLED AT THE END OF AN I/0 OPERATION TO RELEASE ALL 313 CHANNELS THE I/0 WAS BEING PERFORMED ON. 314 315 INPUTS: 316 317 R5 UCB ADDRESS OF DEVICE UNIT. 318 319 OUTPUTS: 320 321 THE CHANNELS ARE RELEASED AND AN ATTEMPT IS MADE TO REMOVE THE NEXT 322 WAITING DRIVER PROCESS FROM EACH CHANNEL QUEUE. IF A DRIVER PROCESS 323 IS WAITING, THEN THE CHANNEL IS ASSIGNED TO THAT DRIVER PROCESS AND 324 IT IS CALLED VIA A JS8 TO ITS CHANNEL WAIT RETURN ADDRESS. WHEN THE 325 CALLED DRIVER PROCESS RETURNS, A RETURN IS MADE TO THE DRIVER PROCESS 326 THAT RELEASED THE CHANNEL. IF THERE IS NO DRIVER PROCESS WAITING FOR 327 THE CHANNEL, THEN THE CHANNEL STATUS IS SET TO IDLE. 328 329 R3 AND R4 ARE PRESERVED ACROSS CALL. 330 ' 331 332 .ENABL LSB 333 IOC$RELSCHAN:: RELEASE SECONDARY I/O CHANNEL 334 MOVL UCB$L CRB(R5),RO GET ADDRESS OF PRIMARY CRB 335 MOVL CRB$L-LINK(RO),RO GET ADDRESS OF SECONARY CRB 336 BRB 20$ - 337 I OC$RELCHAN: : ;RELEASE I/O CHANNEL 338 MOVL UCB$L CRB(R5),RO ;GET ADDRESS OF PRIMARY CRB 339 MOVL CRB$L-LINK(RO),RO ;GET ADDRESS OF SECONDARY CRB 340 BEQL 10$ - ;IF EQL NONE 341 BSBB 20$ ;RELEASE SECONDARY ~HANNEL 342 10$: 343 20$: MOVL BBC UCB$L CRB(R5),RO ;GET ADDRESS OF PRIMARY CRB ~CR8$V 8SY,CRB$B MASK(R0),30$ ;IF CLR, THEN CHANNEL NOT BUSY 344 MOVL CRB$L YNTD+VEC$L-IDB(RO),R1 ;GET ADDRESS OF IDB 345 CMPL R5,IDB$L OWNER(Rl) ;DRIVER PROCESS OWN CHANNEL? 346 BNEQ 30$ - ;IF NEQ NO 347 REMQUE @CRB$L WQFL(RO),R2 ;GET ADDRESS OF NEXT DRIVER FORK BLOCK 348 BVS 40$ - ;IF VS NO DRIVER PROCESS WAITING 349 PUSHR #AM<R3,R4,R5> ;SAVE CONTEXT OF CURRENT DRIVER PROCESS 350 MOVL R2,R5 ;COPY ADDRESS OF DRIVER PROCESS FORK BLOCK 351 MOVL UC8$L FR3(R5),R3 ;LOAD WAITING DRIVER PROCESS CONTEXT 352 MOVL IDB$L-CSR(R1),R4 ;SET ASSIGNED CHANNEL CSR ADDRESS 353 MOVL R5,IDB$L OWNER(Rl) ;SET ADDRESS OF OWNER PROCESS UCB 3S4 JSB @UCB$L FPC(R5) ;CALL DRIVER AT CHANNEL WAIT RETURN ADDRESS 355 356 30$: POPR RSB #AM<R3:R4,R5> .;RESTORE PREVIOUS DRIVER PROCESS CONTEXT 357 40$: CLRL IDB$L OWNER(Rl) ;CLEAR OWNER UNIT UCB ADDRESS 358 8ICB #CRB$M_BSY,CRB$B_MASK(RO) ;CLEAR CHANNEL BUSY 359 RSB 360 .DSA8L LSB IOSUBNPAG V03-033 -1 - NONPAGED I/O RELATED SUBROUTINES REQUEST I/O CHANNEL 3-JUN-1984 11:33:30 VAX-11 Macro V03-0l Page 10 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG.(7) 50 24 A5 DO 50 20 AO DO OE 11 50 24 A5 DO 50 20 AO DO OD 11 50 24 A5 DO 52 50 DO 08 11 50 24 A5 DO 52 04 AO DO 51 2C AO DO 08 OE AO 00 E2 54 61 DO 04 A1 55 DO 05 10 A5 53 DO OC A5 8EDO 62 65 OE 04 A 1 55 01 03 12 FF73 31 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOC6 OOCA OOCE GODO GODO OOD4 OOD8 OODA OODA OODE OOE1 OOE3 OOE3 OOE7 OOEB OOEF OOF4 OOF7 OOFB OOFC 0100 0104 0107 010B 010D 0110 362 .SBTTL REQUEST I/O CHANNEL 363 + 364 IOC$REQPCHANH - REQUEST PRIMARY I/O CHANNEL HIGH PRIORITY 365 IOC$REQSCHANH - REQUEST SECONDARY I/O CHANNEL HIGH PRIORITY 366 IOC$REQPCHANL - REQUEST PRIMARY I/O CHANNEL LOW PRIORITY 367 IOC$REQSCHANL - REQUEST SECONDARY I/O CHANNEL LOW PRIORITY 368 369 THESE ROUTINES ARE CALLED TO REQUEST AN I/0 CHANNEL TO PERFORM AN I/O 370 OPERATION ON. 371 372 INPUTS: 373 374 R5 = UCB ADDRESS OF DEVICE UNIT. 375 04(SP) =RETURN ADDRESS OF CALLER'S CALLER. 376 377 OUTPUTS: 378 379 IF THE SPECIFIED I/O CHANNEL IS IDLE, THEN IT IS IMMEDIATELY 380 ASSIGNED TO THE CURRENT DRIVER PROCESS. ELSE THE DRIVER PROCESS 381 CONTEXT IS SAVED IN ITS FORK BLOCK, THE FORK BLOCK IS INSERTED 382 IN THE CHANNEL WAIT QUEUE, AND A RETURN TO THE DRIVER PROCESS' 383 CALLER IS EXECUTED. 384 385 WHEN THE CHANNEL IS ASSIGNED, THE CSR ADDRESS OF THE ASSIGNED 386 CONTROLLER IS RETURNED TO THE CALLER IN REGISTER R4. 387 388 R3 IS PRESERVED ACROSS CALL. 389 390 391 .ENABL LSB 392 I OC$REQSCHANH: : REQUEST SECONDARY I/0 CHANNEL HIGH PRIORITY 393 MOVL UCB$L CRB(R5),RO GET ADDRESS OF PRIMARY CRB 394 MOVL CRB$L-LINK(RO),RO GET ADDRESS OF SECONDARY CRB 395 BRB 10$ 396 IOC$REQSCHANL:: REQUEST SECONDARY I/O CHANNEL LOW PRIORITY 397 MOVL UCB$L CRB(R5),RO GET ADDRESS OF PRIMARY CRB 398 MOVL CRB$L-LINK(RO),RO GET ADDRESS OF SECONDARY CRB 399 BRB 20$ - 400 IOC$REQPCHANH:: REQUEST PRIMARY I/O CHANNEL HIGH PRIORITY 401 MOVL UCB$L CRB(R5),RO GET ADDRESS OF PRIMARY CRB 402 10$: MOVL RO,R2- SET ADDDRESS OF WAIT QUEUE LISTHEAD 403 BRB 30$ 404 IOC$REQPCHANL:: REQUEST PRIMARY I/O CHANNEL LOW PRIORITY 405 MOVL UCB$L CRB(R5),RO GET ADDRESS OF PRIMARY CRB 406 20$: MOVL CRB$L-WQBL(RO),R2 GET ADDRESS OF LAST ENTRY IN QUEUE 407 30$: MOVL CRB$L-INTD+VEC$L IDB(RO),Rl ;GET ADDRESS OF IDB 408 BBSS #CRB$V BSY,CRB$B-MASK(R0),40$ ;IF SET, THEN CHANNEL BUSY 409 MOVL IDB$L CSR(R1),R4- ;SET ASSIGNED CHANNEL CSR ADDRESS 410 MOVL R5,IDB$L_OWNER(Rl) ;SET OWNER UCB ADDRESS 411 RSB ; 412 40$: MOVL R3,UCB$L FR3(R5) ;SAVE R3 IN FORK BLOCK 413 POPL UCB$L FPC(R5) ;SAVE CHANNEL WAIT RETURN ADDRESS 414 INSQUE UCB$L-FQFL(R5),CRB$L WQFL(R2) ;INSERT DRIVER PROCESS IN CHANNEL WAIT 415 CMPL R5,IDB$L OWNER(Rl) - CURRENT DRIVER PROCESS OWNER? 416 BNEQ 50$ - IF NEQ, BRANCH TO RETURN 417 BRW IOC$RELCHAN IF EQL BRW TO RELEASE CHANNELS 418 50$: IOSUBNPAG V03-033 - NONPAGED I/O RELATED SUBROUTINES REQUEST I/O CHANNEL 05 0110 0111 419 420 RSB .DSABL LSB 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 11 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRCJIOSUBNPAG.(7) IOSUBNPAG V03-033 -1 ;ROW0188 -1 ;ROW0292 ;ACG0399 - NONPAGED I/O RELATED SUBROUTINES 3-JuN~1984 11:33:30 VAX-11 Macro V03-01 Page 12 I/0 Request Completion Processing for Cl 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG.(8) 53 AO A5 55 1C A3 70 A5 15 50 38 A3 50 OOOOOOOO'GF 63 OOOOOOOO'FF OOOOOOOO'GF E3 0111 0111 0111 0111 0111 0111 0111 0 l 11 0111 0111 0111 0111 0111 0111 0111 0111 0111 0111 0111 0111 0111 0111 0111 0111 9E 0111 0115 0115 DO 0115 D6 0119 01 lC E9 01 lC 011 F 011 F 70 011 F 0123 0123 0123 16 0123 0129 0129 0129 OE 0129 012B 0130 05 0133 0134 16 0134 11 013A 422 .SBTTL I/O Request Completion Processing for Class Drivers 423 424 ;+ 425 ; IOC$ALTREQCOM - I/O Request Complete Alternate Entry. 426 427 This routine is entered when an I/O operation is completed on one 428 one of the devices using the disk or tape class drivers. 429 The packet is inserted in the I/O finish queue for I/O post 430 processing. 431 432 INPUTS: 433 434 RO First longword of I/O status 435 Rl Second longword of I/O status 436 R5 CORP address 437 438 OUTPUTS: 439 440 The I/O packet is inserted in the I/O Post Processing Queue, 441 a Software interrupt is requested to initiate I/O Post 442 Processing. 443 · 444 445 IOC$ALTREQCOM:: 446 MOVAB CDRP$L IOQFL(R5),R3 R3 => IRP section of CORP. This is 447 for compatibility with rest of QIO 448 logic. 449 MOVL IRP$L UCB ( R3) , R5 R5 => UCB. 450 INCL UCB$L=OPCNT(R5) Increment operations completed 451 452 BLBC R0,20$ LBC implies I/O error, so goto call 453 MOUNT VERIFICATION just in case. 454 10$: 455 MOVQ RO,IRP$L_MEDIA(R3) Save final I/O status in IRP. 456 457 . IF OF CA$_MEASURE IOT 458 .1 JSB G/\PMS$END IO Insert end of I/O transaction message 460 461 .ENDC 462 463 INSQUE (R3),@L/\IQC$GL PSBL Insert packet in POST process queue 464 465 466 20$: · 1 . 2 SOFTINT #IPL$ IOPOST RSB JSB G/\EXE$MOUNTVER BRB 10$ Initiate SOFTWARE INTERRUPT If LBC, call MOUNT VERIFICATION . Go back to normal flow. IOSUBNPAG V03-033 -3 - NONPAGED I/O RELATED SUBROUTINES I/O REQUEST COMPLETION PROCESSING 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 13 12-MAR-1982 17:12:23 DISK$VMSMASTER: [SYS.SRC]IOSUBNPAG.(9) lC 64 A5 02 E5 52 0094 cs DO 1A A2 64 A5 BO 0080 C5 BO 10 A2 12 A'J so 70 50 DD FEA6' 30 SO BEDO 53 58 AS DO 70 A5 06 2A 50 E9 38 A3 so 7D 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 013C 0141 0146 014B 014F 01S1 01SS 01S7 01SA 01SD 0161 0164 0167 0167 0167 0167 0167 0167 016B 0168 016B 470 .SBTTL I/O REQUEST COMPLETION PROCESSING 471 ;+ 472 IOC$REQCOM - I/O REQUEST COMPLETE 473 474 THIS ROUTINE IS ENTERED WHEN AN I/O OPERATION IS COMPLETED ON A 475 DEVICE UNIT. THE FINAL I/O STATUS IS STORED IN THE ASSOCIATED I/O 476 PACKET AND THE PACKET IS INSERTED IN THE I/O FINISH QUEUE FOR 477 I/O POST PROCESSING. DEVICE UNIT BUSY IS CLEARED AND AN ATTEMPT 478 IS MADE TO START ANOTHER I/O REQUEST ON THE DEVICE UNIT. 479 480 IF THE I/0 REQUEST COMPLETED WITH AN ERROR, AND THE DEVICE IS 481 A DISK, THEN BRANCH TO THE MOUNT VERIFICATION CODE, WHICH WILL 482 DETERMINE IF THE SITUATION REQUIRES MOUNT VERIFICATION. 483 484 IF MOUNT VERIFICATION IS IN PROGRESS, NO FURTHER I/O REQUESTS WILL 485 BE INITIATED. THIS HAS A SIDE EFFECT OF KEEPING THE 'BSY' BIT IN 486 WHATEVER STATE IT IS CURRENTLY IN. FOR CONVENTIONAL DISK DRIVERS, 487 THE BSY BIT WILL BE LEFT ON, WHICH WILL BLOCK $QIO FROM INITIATING 488 ANY NEW I/0 ON THE DEVICE. FOR THE DISK CLASS DRIVER, THE BUSY 489 BIT WILL BE OFF, WHICH WILL ALLOW $QIO TO INITIATE NEW I/O. 490 491 INPUTS: 492 493 RO FIRST LONGWORD OF I/O STATUS. 494 Rl SECOND LONGWORD OF I/O STATUS. 495 R5 UCB ADDRESS OF DEVICE UNIT. 496 497 OUTPUTS: 498 499 THE I/0 PACKET IS INSERTED IN THE I/O POST PROCESSING QUEUE 500 AND DEVICE UNIT BUSY rs CLEARED. A SOFTWARE INTERRUPT rs 501 REQUESTED TO INITIATE I/O POST PROCESSING. 502 · 503 504 .ENABL LSB 505 IOC$REQCOM:: ;I/O DONE PROCESSING 506 BBCC #UCB$V ERLOGIP,UCB$W STS(R5),10$ ;IF CLR, ERROR LOG NOT IN PROGRESS 507 MOVL UCB$L EMB(R5),R2 - ;GET ADDRESS Of ERROR MESSAGE BUFFER 508 MOVW UCB$W-STS(R5),EMB$W DV STS(R2) ;INSERT FINAL DEVICE STATUS 509 MOVW UCB$B=ERTCNT(R5),EMB$B=DV_ERTCNT(R2) ;INSERT FINAL ERROR COUNTERS 510 MOVQ RO,EMB$Q DV IOSB(R2) ;INSERT FINAL I/O STATUS 511 PUSHL RO -- ;SAVE RO 512 BSBW ERL$RELEASEMB ;RELEASE ERROR MESSAGE BUFFER 513 POPL RO ;RESTORE RO 514 10$: MOVL UCB$L IRP(R5),R3 ;GET ADDRESS OF I/O PACKET 515 INCL UCB$L-OPCNT(R5) ;INCREMENT OPERATIONS COMPLETED 516 BLBC RO,DISKCHK ;IF I/O ERROR, CHECK FOR DISK DEVICE 517 518 DO NOT SAVE THE I/O STATUS IN THE IRP UNTIL IT HAS BEEN DECIDED THAT S19 MOUNT VERIFICATION IS NOT NECESSARY. THIS rs TO AVOID OVERWRITING THE . S20 PHYSICAL DISK ADDRESS STORED IN THE !RP AT OFFSET IRP$L_MEDIA. 521 522 20$: MOVQ RO,IRP$L_MEDIA(R3) ;STORE FINAL I/O STATUS 523 524 .IF OF CA$_MEASURE_IOT 525 IOSUBNPAG V03-033 ;WMC0002 -1 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;RLRMAPSP ;RLRMAPSP ;RLRMAPSP ;RLRMAPSP ;ROW0188 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 ;WMC0002 - NONPAGED I/O RELATED SUBROUTINES I/O REQUEST COMPLETION PROCESSING 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 14 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG.(9) OOOOOOOO'EF 36 63 OOOOOOOO'FF OE 2F 64 A5 53 4C B5 4C 0100 SF 64 A5 FEF2 01 40 A5 DO 13 05 64 A5 OE 00 64 A5 OOOOOOOO'GF BE OOOOOOOO'GF C2 13 D8 64 A5 01 40 A5 D2 OE 00 64 A5 53 OOOOOOOO'GF B7 D5 016B 12 0171 0173 0173 0173 OE 0173 0175 017A EO 017D 017F OF 0182 1C 0186 AA 0188 018C 018E 31 018E 0191 0191 0191 0191 0191 0191 91 0191 0193 12 0195 E5 0197 0199 E5 019C 019E 16 01A1 11 01A7 01A9 01A9 01A9 16 01A9 11 01AF 01B1 01B1 01Bl 01B1 01B1 01B1 01B1 01B1 E5 01B1 01B3 91 01B6 01B8 12 OlBA E5 01BC 01BE 04 OlCl 16 01C3 11 01C9 01CB 01CB 526 TSTL 527 BNEQ 528 529 :ENDC 530 531 PMSEND: INSQUE LAPMS$GL IOPFMPDB DO PMS (R3),@LAIOC$GL PSBL ;DATA COLLECTION ENABLED? ;BRANCH IF YES ;INSERT PACKET IN POST PROCESS QUEUE 532 SOFTINT #IPL$ IOPOST ;INITIATE SOFTWARE INTERRUPT 533 BBS #UCB$V MNTVERIP,- ;BRANCH IF MOUNT VERIFICATION IN PROGRESS .1 UCB$W STS(R5),MNTVERPNDCHK ;(NOTE THIS LEAVES 'BSY' AS IS) 535 NXTIRP: REMQUE @UCB$L IOQFL(R5),R3 ;REMOVE I/O PACKET FROM DEVICE UNIT QUEUE 536 BVC IOC$INITIATE ;IF VC INITIATE NEXT FUNCTION 537 BICW #UCB$M_BSY,UCB$W_STS(R5) ;CLEAR UNIT BUSY 538 RELEASE: ;RELEASE ALL CHANNELS 539 BRW IOC$RELCHAN 540 541 IF THIS IS A DISK DEVICE, CALL THE MOUNT VERIFICATION ROUTINE 542 TO DETERMINE IF MOUNT VERIFICATION IS NECESSARY. IF NOT, CONTROL 543 WILL RETURN, AND THE REQUEST WILL BE COMPLETED IN THE NORMAL MANNER. 544 545 D' ISKCHK: 546 CMPB #DC$ DISK,- ;IS THIS DEVICE A DISK? 547 548 BNEQ UCB$B DEVCLASS(R5) 20$ ;'BRANCH IF NOT · 1 BBCC #UCB$V MNTVERPND,- ;CHECK FOR MOUNT VERIFICATION PENDING . 2 UCB$L STS(R5),30$ ;IF NOT, JUST ENTER MOUNT VERIFICATION .3 BBCC #UCB$V MNTVERIP,- ;CLEAR IN-PROGRESS BIT BEFORE CALL .4 UCB$L STS(R5),30$ ; SO IT WILL REALLY START . 5 30$: , JSB GAEXE$MOUNTVER ;START MOUNT VERIFICATION .6 BRB 20$ ;COMPLETE I/O REQUEST . 7 .8 .IF OF CA$_MEASURE_IOT .9 . 10 DO PMS: JSB GAPMS$END IO ;INSERT END OF I/O TRANSACTION MESSAGE .11 BRB PMS END - ;REJOIN COMMON CODE . 12 . 13 .ENDC . 14 . 15 THE MOUNT-VERIFICATION-PENDING BIT IS USED TO INDICATE THAT A DISK SHOULD GO . 16 INTO MOUNT VERIFICATION AS SOON AS THE CURRENT I/O IS DONE. THIS IS INTENDED . . 17 FOR USE IN A CLUSTER TO STALL I/O WHEN QUORUM IS LOST. . 18 . 19 MNTVERPNDCHK: .20 BBCC #UCB$V MNTVERPND,- CHECK FOR MOUNT VERIFICATION PENDING . 21 UCB$L STS(R5),RELEASE IF NOT, JUST CLEAN UP .22 CMPB #DC$ DI SK, -- IS THIS DEVICE A DISK? .23 UCB$B DEVCLASS(R5) .24 BNEQ RELEASE BRANCH IF NOT .25 BBCC #UCB$V MNTVERIP,- CLEAR IN-PROGRESS BIT BEFORE CALL .26 .27 40$: CLRL UCB$L STS(R5),40$ R3 - NO IRP PASSED TO MOUNT VERIFICATION .28 JSB GAEXE$MOUNTVER TRY TO START MOUNT VERIFICATION .29 BRB NXTI RP WASN'T NECESSARY .30 .31 .DSABL LSB IOSUBNPAG V03-033 -11 - NONPAGED I/O RELATED SUBROUTINES MOUNT VERIFICATION HELPER 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 15 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(10) 53 B3 63 4C A5 OlCB OlCB 01CB OlCB OlCB 01CB 01CB 01CB OlCB 01CB OlCB 01CB OlCB OlCB OlCB OlCB OlCB OlCB OlCB OlCB OlCB OlCB OlCB OlCB OlCB 01CB OlCB D5 OlCB 13 OlCD OE OlCF OlDl 05 01D3 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 .SBTTL ;++ IOC$MNTVER MOUNT VERIFICATION HELPER - Assist driver with mount verification. This routine is cal led by EXE$MOUNTVER to perform some driver-specific actions necessary for mount verification. This routine is used by nonCLASS drivers, and is cal led by default if EXE$MOUNTVER finds the address of IOC$RETURN in DDT$L MNTVER. Inputs: R3 !RP address or 0 R5 UCB address Outputs: None. Side effects: If R3 contains an !RP address, the !RP will be queued to the head of the UCB's IRP work queue. If R3 contains is zero, then remove the IRP from the head of the UCB's work queue and attempt to initiate the I/O. IOC$MNTVER:: TSTL BEQL INSQUE RSB R3 NXTIRP IRP$L IOQFL(R3),UCB$L--IOQFL ( R5) ;Driver-specific mount ;Check !RP address ;Branch if none ;Requeue the IRP verification ;Return code IOSUBNPAG V03-033 -1 ;ROW0188 -1 - NONPAGED I/O RELATED SUBROUTINES INITIATE I/O FUNCTION ON DEVICE 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 16 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC)IOSUBNPAG(11) 58 A5 53 OOOOOOOO'GF 78 A5 2C A3 0048 BF 64 A5 OB 2A A3 07 50 4C 83 OOOOOOOO'EF 60 50 0088 C5 00 BO 01D4 01D4 0104 0104 01D4 0104 0104 0104 0104 0104 01D4 01D4 0104 01D4 0104 0104 01D4 0104 0104 01D4 01D4 01D4 DO 0104 01D8 01D8 0108 16 01D8 OlDE OlDE OlDE 70 0 lDE AA 01E3 01E7 El 01E9 DO 01EE 7D 01F2 01F8 DO 01F9 17 OlFE 593 .SBTTL INITIATE I/0 FUNCTION ON DEVICE 594 ;+ 595 ; IOC$INITIATE - INITIATE NEXT FUNCTION ON DEVICE ' 596 597 THIS ROUTINE IS CALLED TO INITIATE THE NEXT FUNCTION ON A DEVICE BY CLEARING 598 STATUS BITS, SETTING THE OPERATION START TIME IF A DIAGNOSTIC BUFFER rs 599 SPECIFIED, AND CALLING THE DRIVER AT ITS START I/O ENTRY POINT. 600 601 INPUTS: 602 603 R3 ADDRESS OF I/O REQUEST PACKET. 604 R5 DEVICE UNIT UCB ADDRESS. 605 606 OUTPUTS: 607 608 CANCEL I/O, POWERFAIL, AND TIME OUT STATUS BITS ARE CLEARED, THS 609 CURRENT SYSTEM TIME IS FILLED INTO THE INTERNAL DIAGNOSTIC BUFFER 610 IF ONE IS SPECIFIED, AND THE DRIVER IS CALLED AT ITS START I/0 ENTRY 611 POINT. 612 ; - 613 614 IOC$INITIATE:: ;INITIATE I/O FUNCTION 615 MOVL R3,UCB$L_IRP(R5) ;SAVE I/0 PACKET ADDRESS 616 617 . IF OF CA$_MEASURE !OT 618 .1 JSB GAPMS$START IO ;INSERT START OF I/O TRANSACTION MESSAGE 620 621 .ENDC 622 623 MOVQ IRP$L SVAPTE(R3),UCB$L SVAPTE(R5) ;COPY TRANSFER PARAMETERS 624 BICW #UCB$M_CANCEL!UCB$M TIMOUT,UCB$W_STS(R5) ;CLEAR CANCEL AND TIME OUT 625 BBC #IRP$V DIAGBUF,IRP$W STS(R3),10$ ;IF CLR, NO DIAGNOSTIC BUFFER 626 MOVL @IRP$L-DIAGBUF(R3),R5 ;GET ADDRESS OF DIAGNOSTIC BUFFER DATA AREA 627 MOVQ EXE$GQ=SVSTIME,(RO) ;INSERT I/0 OPERATION START TIME 628 10$: 629 MOVL JMP UCB$L DDT(R5),RO @DDT$L_START(RO) ;GET ADDRESS OF DRIVER DISPATCH TABLE ;START I/O OPERATION IOSUBNPAG V03-033 -1 .. ;RLRPOTADP ;RLRPDTAOP ;RLRPOTAOP ;RLRPOTAOP ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBVTEOFF ;RLRBVTEOFF ;RLRBVTEOFF ;RLRBVTEOFF ;RLRBYTEOFF ;KPLOOOl - NONPAGED 1/0 RELATED SUBROUTINES Allocate Buffered Data Path 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 17 12-MAR-1982 17:12:23 DISK$VMSMASTER: [SVS.SRC]IOSUBNPAG(12) 10 10 QC 50 EB 10 A5 53 7D OC A5 8EDO 65 OE 18 Bl 05 50 24 A5 DO 51 38 AO DO 52 34 AO 9E 40 11 51 OOEO C4 DO 52 3C A5 9E 35 10 20 50 ES 29 00 A5 E9 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0201 0203 0206 0206 020A 020E 0210 0212 0213 0213 0213 0217 0216 021F 021F 0221 0221 0221 0226 022A 022A 022C 022F 0233 0233 0233 0233 0233 0233 0233 0233 0233 631 .SBTTL Allocate Buffered Data Path 632 ;+ 633 ALLOCATE BUFFERED DATA PATH CODE - 634 635 IOC$REQDATAP - Entrypoint (called from traditional drivers) where caller 636 wishes to be queued (using UCB fork block) if no buffered data path 637 is available at the time of the call. 638 INPUT: 639 R5 => UCB. 640 641 IOC$REQDATAPNW - Entrypoint to call when caller does not want to wait for 642 unavailable data path. 643 INPUT: 644 R5 => UCB 645 646 IOC$REQDATAPUDA - Entrypoint (cal led from UDA port driver) where CORP 647 is used as the source of information about the request and where 648 the caller does not want to wait for unavailable datapath. 649 650 INPUT: .1 R4 => PDT 651 R5 => CORP 652 653 654 IOC$REQDATAP:: 655 BSBB IOC$REQDATAPNW Try to al lac. and get control after. 656 BLBS RO, 10$ LBS implies al location success. 657 658 MOVQ R3,UCB$L FR3(R5) Save driver context in UCB fork block. 659 POPL UCB$L FPC(R5) Save caller's return point. 660 INSQUE UCB$L-FQFL(R5),- Queue fork block to resource wait queue. 661 @ADP$L DPQBL(Rl) Assumes IOC$ALODATAP saves R1=>ADP. 662 10$: RSB Return to caller or caller's caller. 663 664 IOC$REQDATAPNW:: 665 MOVL UCB$L CRB(R5),RO RO=>CRB. 666 MOVL CRB$L-INTD+VEC$L ADP(RO),Rl Rl=>ADP (pass to IOC$ALODATAP) 667 MOVAB CRB$L-INTD+VEC$W=MAPREG(RO),R2 R2=>UBMD 668 669 BRB IOC$ALODATAP NOWAIT, RSB from IOC$ALODATAP 670 returns to our caller. 671 IOC$REQDATAPUDA:: .1 MOVL PDT$L ADP(R4),R1 R1=>ADP (pass to IOC$ALODATAP) . 2 MOVAB CDRP$L_UBARSRCE(R5),R2 R2=>UBMD . 3 .4 BSBB IOC$ALODATAP Cal 1 to allocate a data path. .5 BLBS R0,20$ LBS means we got one. .6 BLBC CDRP$W_BOFF(R5),20$ LBC means, user buffer is on an . 7 even byte address so we can use .8 the Direct Data Path. .9 .10 Here we have a transfer to a user buffer located at an odd byte address. .11 On those processors which support Byte Offset on the Direct Datapath, we . 12 can continue processing. On other processors, we must wait for a buffered . 13 datapath. .14 . 15 CPUDISP <<780,10$>,- On 11-780 we wait. IOSUBNPAG V03-033 ;KPLOOOl ;KPLOOOl ;KPLOOOl ;KPLOOOl ;KPLOOOl ;KPLOOOl ;KPLOOOl ;KPL0001 ;RLRBVTEOFF ;RLR8VTEOFF ;RLR8VTEOFF ;RLR8VTEOFF ;RLR8VTEOFF ;RLR8VTEOFF ;RLRBVTEOFF ;KDM0084 - NONPAGED I/O RELATED SUBROUTINES Al locate Buffered Data Path 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 18 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SVS.SRC]IOSUBNPAG(12) 10 A5 53 70 OC A5 8EDO 28 85 86 65 OE 18 Bl 05 0233 0233 0233 0233 0233 0233 024D 024D 0251 0255 0258 025A 025C 025C 025D 025D . 16 . 17 . 18 . 19 .20 . 21 .22 .23 10$: .24 .25 .26 .27 .28 20$: .29 .30 . 31 30$: <750,20$>,<730,20$>,- <790' 10$>, <8SS,10$>,<8NN,10$>,<UV1, 30$>> ; On 11-750 we continue. ; On 11-730 we continue. ; On 11-790 we wait. ; On SCORPIO we wait. ; On NAUTILUS we wait. ; On MicroVAX we bugcheck. MOVQ POPL INCW INSQUE R3,CDRP$L FR3(R5) CDRP$L FPC(R5) @CDRP$L RWCPTR(R5) CDRP$L FQFL(R5),@ADP$L-DPQBL(R1) ; Save driver context in CORP fork block. ; Save caller's return point. ; Increment RWAITCNT. ; Queue fork block to resource wait queue. ; Assumes IOC$ALODATAP saves Rl=>ADP. RSB ; Return to caller or caller's caller. BUG CHECK IVBVTEALGN,FATAL IOSUBNPAG V03-033 -9 - NONPAGED I/O RELATED SUBROUTINES Allocate Buffered Data Path 3-JUN-1984 1 1 : 33: 30 VAX-11 Macro V03-0l Page 19 12-MAR-1982 17:12:23 DISK$VMSMASTER: [SYS.SRC)IOSUBNPAG(13) 07 17 03 A2 00 10 60 Al 50 , 2 50 05 00 03 A2 04 60 Al 50 50 01 0261 0261 0261 0261 0261 0261 0261 0261 0261 0261 0261 0261 0261 0261 0261 0261 ED 0261 0263 0266 0266 EA 0266 0268 0269 026B 13 026C 026E FO 026E 0270 0270 0272 0274 E4 0274 0279 027D DO 027D 05 0280 681 IOC$ALODATAP - Common subroutine cal led by above routines to al locate 682 a UNIBUS buffered datapath. 683 684 INPUTS: 685 Rl => ADP wherein the datapath al location bit map is stored. 686 R2 => UBA mapping descriptor in user's data structure. 687 688 OUTPUTS: 689 RO LBS - implies al location success 690 datapath field in R2 => UBA mapping descriptor is set to the 691 number of the datapath al located. 692 appropriate bit in datapath al location bit map is cleared. 693 RO LBC - implies al location failure. 694 695 696 IOC$ALODATAP: 697 BBS #VEC$V PATHLOCK,- If this user has a permanently allocated 698 UBMD$B-DATAPATH(R2), 10$ datapath, branch around to success. 699 700 ASSUME ADP$C NUMDATAP EQ 16 701 FFS #0,- - Find first available datapath, 702 #ADP$C NUMDATAP,- according to bit map. Note failure 703 ADP$W DPBITMAP(Rl),- leaves RO with the value "16", an 704 RO - even number with the low bit clear. 705 BEQL 20$ EQL implies failure. 706 707 INSV RO,- Upon success, RO has number of the 708 #VEC$V OATAPATH,- available datapath to al locate. 709 #VEC$S DATAPATH,- So we update the user's datapath 710 UBMD$B-DATAPATH(R2) descriptor pointed at by R2. 711 712 BBSC RO,ADP$W DPBITMAP(Rl),10$; And we update the bit map. 713 BUG CHECK INCONSTATE We shouldn't be here obviously. 714 715 10$: MOVL SA#SS$ NORMAL,RO Indicate al location success. 716 20$: RSB And we return to our caller. IOSUBNPAG V03-033 -1 ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP -9 ;RLRBVTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBVTEOFF ;RLRBVTEOFF ;RLRBVTEOFF ;RLRBVTEOFF ;RLRBVTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBVTEOFF ;RLR6VTEOFF ;RLR6VTEOFF ;RLR6YTEOFF - NONPAGED I/O RELATED SUBROUTINES Release Buffered Data Path 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 20 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SVS.SRC]IOSUBNPAG( 14) 51 OOEO C4 52 3C A5 oc 50 24 A5 52 34 AO 51 38 AO 50 03 A2 36 00 05 00 03 A2 00 52 50 05 50 14 Bl 26 7E 53 55 55 50 10 OA AS 22 51 24 A5 52 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 0281 DO 0281 9E 0286 11 028A 028C DO 028C 9E 0290 DO 0294 0298 98 0298 15 029C 029E 029E FO 029E 02AO 02A2 EF 02A4 02A6 OF 02A9 10 02AD 02AF 70 02AF DD 0262 DO 0264 91 0267 0289 12 0266 0280 0280 0280 DO 0260 02Cl FO 02C1 718 .SBTTL Release Buffered Data Path 719 ;+ 720 : RELEASE BUFFERED DATA PATH CODE - 721 722 ; IOC$RELDATAPUDA - Entry point cal led from UDA port driver in response 723 ; to an UNMAP cal 1. Here the data as to the buffered data path 724 : is in the CORP. 725 726 ; INPUTS: .1 ; R4 => PDT 727 ; R5 => CORP 728 ; 729 ; IOC$RELDATAP - Entry point cal led from traditional drivers to release 730 ; the buffered datapath described in CRB$L INTD+VEC$B DATAPATH. 731 ; 732 ; INPUTS: 733 : R5 => UCB 734 735 ; OUTPUTS: 736 ; Datapath re-al located (if any waiters). RO, R 1, and R2 modified. 737 ; NOTE: Since cal Is to IOC$REQDATAPUDA are NOWAIT, fork blocks dequeued 738 ; here from ADP$L_DPQFL are guaranteed to be UCB's. 739 740 741 IOC$RELDATAPUDA:: .1 MOVL PDT$L ADP(R4),R1 ; Rl => ADP. . 2 MOVAB CDRP$L UBARSRCE(R5),R2 : R2 => UBMD. .3 BRB RELDATAP COMMON .4 IOC$RELDATAP:: . 5 MOVL UCB$L CRB(R5),RO ; RO => CRB. .6 MOVAB CRB$L-INTD+VEC$W MAPREG(RO),R2 ; R2 => UBMD. . 7 MOVL CRB$L=INTD+VEC$L_ADP(RO),R1 : Rl => ADP. .8 RELDATAP COMMON: 751 CVTBL UBMD$B_DATAPATH(R2),RO ; Get datapath designator. 752 BLEQ 10$ ; If LSS permanent assignment. 753 ; If EQL we had NO datapath to 754 ; release. 755 INSV #0,- ; Zero datapath number. 756 #VEC$V DATAPATH,#VEC$S DATAPATH,- 757 UBMD$B-DATAPATH(R2) - .1 EXTZV #VEC$V-DATAPATH,- ; Extract datapath number. . 2 #VEC$S-DATAPATH,RO,R2 ; . 3 REMQUE @ADP$L=DPQFL(R1),RO ; RO => next driver fork block .4 BVS 20$ ; If VS no driver process waiting .5 .6 MOVQ R3,-(SP) ; Save R3, R4, R5 . 7 PUSHL RS .8 MOVL RO.RS ; R5 => driver fork block. .9 CMPB #DYN$C UCB,- ; Seii! if we dequeued a UCB or a CORP. . 10 UCB$B_TVPE(RS) . 11 BNEQ 30$ ; NEQ implies a CORP . . 12 . 13 ; Here we have R5 => UCB. . 14 . 15 MOVL UCB$L_CRB(RS),R1 : Rl => CRB. . 16 . 17 INSV R2,- ; Store assigned datapath # IOSUBNPAG V03-033 ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBVTEOFF :-RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBVTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBVTEOFF ;RLRBYTEOFF ;RLRBYTEOFF ;RLRBYTEO~F ;RLRBYTEOFF ;RLRBYTEOFF - NONPAGED I/O RELATED SUBROUTINES Release Buffered Data Path 3-JUN-1984 11: 33: 30 VAX-11 Macro V03-01 Page 21 12-MAR-1982 17: 12: 23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(14) 05 00 37 Al 53 10 AS 70 QC BS 16 53 FA 60 Al 55 BEDO SE 70 05 52 E3 05 S2 FO 05 00 3F AS OOOOOOOO'EF 16 El 1 1 02C3 02C3 02C5 02C7 02C7 02CB 02CE 02CE 0201 0204 02DS 02DA 02DA 02DE 02DF 02DF 02DF 02DF 02DF 02E1 02E1 02E3 02E5 02E5 02EB 02EB 02ED . 18 #VEC$V_DATAPATH,- ; in CRB . .19 #VEC$S DATAPATH,- .20 CRB$L_INTD+VEC$B_DATAPATH(R1) . 21 .22 MOVQ UCB$L FR3(R5),R3 ; Restore driver context. .23 JSB @UCB$L_FPC(R5) ; Ca 11 back waiting driver. .24 5$: .25 POPL RS ; Restore deal locator's R5,R4,R3 .26 MOVQ (SP)+,R3 .27 10$: RSB ; Return to deallocator. .28 20$: BBCS R2,- .29 ADP$W DPBITMAP(Rl) ,10$ ; Set datapath bit and exit .30 BUG_CHECK INCONSTATE : Inconsistent state. .31 RSB .32 .33 ; Here we have RS => CORP. .34 .35 30$: .36 INSV R2,- ; Store assigned datapath # .37 #VEC$V DATAPATH,- ; in CORP field. .38 #VEC$S-DATAPATH,- .39 CDRP$L=UBARSRCE+UBMD$B DATAPATH(RS) .40 .41 JSB SCS$RESUMEWA ITR Resume waiting thread and any backed .42 up IRP's . . 43 BRB 5$ Branch back to resume deallocator's .44 thread. IOSUBNPAG V03-033 -20 - NONPAGED I/0 RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 22 REQUEST AND ALLOCATE UNIBUS MAP REGISTER 12-MAR-1982 17:12:23 DISK$VMSMASTER:(SYS.SRC]IOSUBNPAG(15) 25 10 OF 50 EB 10 A5 53 70 28 B5 B6 DC A5 8EDO 65 OE 34 B2 05 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02ED 02EF 02Ef 02EF 02EF 02EF 02EF 02F2 02F6 02F9 02F9 02FD 02FF 0301 778 .SBTTL REQUEST AND ALLOCATE UNIBUS MAP REGISTERS FOR CLASS DRIVER 779 ;+ 780 ; IOC$REQMAPUDA - REQUEST AND ALLOCATE UNIBUS MAP REGISTERS FOR CLASS DRIVER 781 782 THIS ROUTINE IS CALLED TO ALLOCATE UBA MAP REGISTERS AND TO MARK THE ALLOCATION 783 IN THE UBA MAP REGISTER ALLOCATION DATA STRUCTURES. 784 785 INPUTS: 786 787 R4 ADDRESS OF PORT DESCRIPTOR TABLE. 788 R5 ADDRESS OF CLASS DRIVER REQUEST PiCKET (CORP). 789 790 OUTPUTS: 791 792 IF MAP REGISTERS ARE ALLOCATED FOR THE CORP, THE APPROPRIATE FIELDS 793 IN THE CORP ARE MODIFIED TO INDICATE WHICH REGISTERS, AND THE NUMBER 794 OF REGISTERS THAT HAVE BEEN ALLOCATED. ALSO THE ALLOCATION DATA 795 STRUCTURE IN THE ADP IS MODIFIED. 796 797 IF MAP REGISTERS CANNOT BE ALLOCATED AT THIS TIME, THE CORP IS 798 QUEUED ONTO THE RESOURCE WAIT LIST AND THE UCB$W RWAITCNT IS 799 INCREMENTED. - 800 801 ;- 802 803 IOC$REQMAPUDA:: Al locate UBA map registers for class drive 804 BSBB IOC$ALOMAPUDA Cal 1 to allocate map registers if avai labl 805 Returns R2 => ADP. 806 807 If here, low bit of RO tel ls us whether we were successful in the al location 808 attempt. 809 810 BLBS RO, 10$ Branch around if successful. 811 MOVQ R3,CDRP$L FR3(R5) Save driver process context 812 INCW @CDRP$L RWCPTR(R5) One more CORP, on this UCB, awaiting 813 resources. 814 POPL CDRP$L FPC(R5) Save map register wait return address 815 INSQUE CDRP$L-FQFL(R5),- 816 @ADP$L=MRQBL(R2) Insert process in map register wait queue 817 10$: RSB IOSUBNPAG V03-033 ACG0399 ACG0399 ACG0399 5 -1 KTA3018 KTA3018 KTA3018 KTA3018 KTA3018 KTA3018 KTA3018 - NONPAGED I/O RELATED SUBROUTINES REQUEST UNIBUS MAP REGISTERS 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 23 12-MAR-1982 17: 12:23 DISK$VMSMASTER: [SYS.SRC]IOSUBNPAG(16) 3A 10 oc 50 EB 10 A5 53 7D OC A5 8EDO 34 82 65 OE 05 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0302 0304 0307 030B 030F 0313 . 2 3 ·+ .SBTTL REQUEST UNIBUS MAP REGISTERS .4 ; IOC$REQMAPREG - REQUEST UNIBUS MAP REGISTERS 823 824 THIS ROUTINE IS CALLED TO REQUEST UNIBUS MAP REGISTERS TO PERFORM AN 825 I/O TRANSFER. 826 827 INPUTS: 828 830 R5 =UCB ADDRESS OF DEVICE UNIT. 831 04(SP) = RETURN ADDRESS OF CALLER'S CALLER. 832 833 IT IS ASSUMED THAT THE CALLER OWNS THE I/O CHANNEL ON WHICH THE 834 TRANSFER IS TO OCCUR ON. 835 836 OUTPUTS: 837 838 IF MAP REGISTERS HAVE BEEN PERMANENTLY ASSIGNED TO THE ASSOCIATED 839 I/O CHANNEL, THEN CONTROL IS IMMEDIATELY RETURNED TO THE CALLER. 840 ELSE A~ ATTEMPT IS MADE TO ALLOCATE THE REQUESTED NUMBER OF MAP REG- 841 ISTERS. IF SUFFICIENT CONTIGUOUS MAP REGISTERS ARE FOUND, THEN THEY 842 ARE ASSIGNED TO THE ASSOCIATED I/O CHANNEL AND CONTROL IS RETURNED 843 TO THE CALLER. ELSE THE DRIVER PROCESS CONTEXT IS SAVED IN ITS FORK 844 BLOCK, THE FORK BLOCK IS INSERTED IN THE MAP REGISTER WAIT QUEUE, 845 AND A RETURN TO THE DRIVER PROCESS' CALLER IS EXECUTED. 846 ' 847 .1 IOC$REQMAPREG:: ;REQUEST UNIBUS MAP REGISTERS . 2 BSBB IOC$ALOLJBAMAP ; ALLOCATE UBA MAP REGISTER . 3 BLBS R0,10$ ;IF LBS SUCCESSFUL ALLOCATION .4 MOVQ R3,UCB$L FR3(R5) ;SAVE DRIVER PROCESS CONTEXT .5 POPL UCB$L FPC(R5) ;SAVE MAP REGISTER WAIT RETURN ADDRESS .6 INSQUE UCB$L-FQFL(R5),~ADP$L MRQBL(R2) ;INSERT PROCESS IN MAP REGISTER WAIT .7 10$: RSB IOSUBNPAG V03-033 -14 ;RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP -8 - NONPAGED I/O RELATED SUBROUTINES ALLOCATE UNIBUS MAP REGISTERS 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 24 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SVS.SRC]IOSUBNPAG(17) 7E 53 55 52 OOEO C4 53 02 A5 54 DO A5 53 03FF C344 53 F7 BF 53 51 3C A5 2F 7E 53 55 18 7E 53 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 0314 7D 0314 DD 0317 0319 DO 0319 031E DO 031E 3C 0322 9E 0326 78 032C 0330 0331 9E 0331 11 0335 0337 0337 7D 0337 DD 033A 11 033C 033E 033E 7D 033E 862 .SBTTL ALLOCATE UNIBUS MAP REGISTERS 863 ;+ 864 IOC$ALOUBAMAP - ALLOCATE UBA MAP REGISTERS (CRB DATABASE SPECIFIED) 865 IOC$ALOUBAMAPN - ALLOCATE USA MAP REGISTERS (ARGUMENT SPECIFIED) 866 IOC$ALOMAPUDA - ALLOCATE UBA MAP REGISTERS (FOR CLASS DRIVER(S)) 867 868 This routine is called to al locate uba map registers and to mark the allocation 869 in the map register allocation structure located in the ADP. The state 870 of the f1NIBUS map registers is maintained in a set of descriptors 871 that describe contiguous extents of allocatable (i.e. free) map 872 registers. A map register descriptor consists of the 873 corresponding elements of two distinct arrays (of one word items) 874 located in the ADP. These arrays, ADP$W MRNREGARV and ADP$W MRFREGARV, 875 contain the number of map registers and the first map register in each 876 contiguous extent of free map registers. These arrays are each 877 preceeded by a one word field containing al 1 l's (-1) so that compares 878 made against the "previous" descriptor fail when the current desciptor 879 is the one whose index is zero. 880 881 ADP$L MRACTMDRS maintains the number of active descriptors, i.e. the 882 number of elements of each array which contain valid data. 883 884 INPUTS: (FOR IOC$ALOUSAMAP AND ALOUSAMAPN) 885 R3 =NUMBER OF MAP REGISTERS TO ALLOCATE (IOC$ALOUBAMAPN only). 886 R5 = DEVICE UNIT UCB ADDRESS. 887 888 INPUT: (FOR IOC$ALOMAPUDA) . 1 R4 => PDT 889 R5 => CORP 890 891 OUTPUTS: 892 RO = SUCCESS INDICATION. 893 R2 => ADP 894 895 .enabl lsb 896 IOC$ALOMAPUDA: 897 MOVQ R3,-(SP) Save R3,R4,R5 898 PUSHL R5 899 .1 MOVL PDT$L ADP(R4),R2 R2 => ADP before we modify R4. . 2 . 3 MOVL CDRP$L SCNT(R5),R3 Get transfer byte count .4 MOVZWL CDRP$W-BOFF(R5),R4 Get byte offset in page . 5 MOVAS AX3FF(R3) [R4] ,R3 Calculate highest relative byte and round . 6 ASHL #-9,R3,R3 Calculate number of map registers required 908 909 MOVAB CDRP$L UBARSRCE(R5),Rl 910 BRS COMMON-ALOUBAMAP 911 912 IOC$ALOUBAMAPN:: 913 MOVQ R3,-(SP) 914 PUSHL R5 915 BRB 5$ 916 917 I OC$ALOUBAMAP: : 918 MOVQ R3,-(SP) Rl => UBMD. Branch to common code. ;ALLOCATE USA MAP REGISTERS ARGUMENT SPECIF! Save R3,R4,R5 ;ALLOCATE UBA MAP REGISTERS CRB SPECIFIED ; Save R3,R4,R5 IOSUBNPAG V03-033 ;RLROOOl ;RLR0001 ;RLROOOl - NONPAGED I/O RELATED SUBROUTINES ALLOCATE UNIBUS MAP REGISTERS 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 25 12-MAR-1982 17:12:23 DISK$VMSMASTER: [SVS.SRC]IOSUBNPAG(17) 55 DD 53 7E A5 3C 54 7C A5 3G 53 03FF C344 9E 53 F7 SF 78 53 51 24 AS DO 52 3S A1 DO 51 34 A1 9E OF EO 3S 61 5C A2 D5 13 13 53 D6 53 01 SA 55 04 64 A245 53 81 09 15 F4 55 5C A2 F2 50 04 1 F 11 61 015E C245 BO 02 Al 53 90 64 A245 53 A2 05 12 0129 30 06 11 015E C245 53 AO 50 01 DO 55 8EOO 53 BE 70 05 0341 0343 0343 0347 0348 0351 0355 0356 0356 035A 035E 0362 0364 0366 0366 0366 0366 0366 0366 0366 0366 0366 0369 0368 0360 0370 0372 0372 0377 0379 0379 037E 037E 03SO 03S2 03S2 03SS 03S8 03SC 0391 0393 0393 0396 039S 0398 039E 039E 03A1 03A4 03A7 03AS 919 PUSHL RS 920 921 MOVZWL UCB$W BCNT(R5),R3 GET TRANSFER BYTE COUNT 922 MOVZWL UCB$W-BOFF(R5),R4 GET BYTE OFFSET IN PAGE 923 MOVAB AX3FF(R3)[R4],R3 CALCULATE HIGHEST RELATIVE BYTE AND ROUND 924 ASHL #-9,R3,R3 CALCULATE NUMBER OF MAP REGISTERS REQUIRED 925 5$: 926 MOVL UCB$L CRB(R5),R1 Rl => CRB. 927 MOVL CRB$L-INTD+VEC$L ADP(R1),R2 R2 => ADP. 92S MOVAB CRB$L-INTD+VEC$W-MAPREG(R1),R1 Rl => UBMD. 929 BBS #VEC$V MAPLOCK,-- If SET, already permanently 930 UBMD$W=MAPREG(R1) ,40$ al located, so branch around. 931 932 Here: 933 Rl => UBMD - caller's structure where we record registers al located 934 935 = R2 => ADP R3 number of map registers to al locate 936 937 938 COMMON ALOUBAMAP: .1 - TSTL ADP$L MRACTMDRS(R2) Test for zero active descriptors. · 2 BEQL 15$ - EQL implies no registers available. 939 INCL R3 Round up request to next multiple 940 BICB #1 ,R3 of 2. 941 CLRL R5 Establish loop variable. 942 10$: 943 CMPW R3,ADP$W MRNREGARV(R2)lR5] See if enough regs described here. 944 BLEQ 20$ - LE Q i mp 1 i es VE S . 945 946 .1 15$: AOBLSS ADP$L_MRACTMDRS(R2),R5,10$ Else branch back and continue 947 CLRL RO If here, al location failure. 94S BRB 50$ Branch around to return. 949 20$: 950 MOVW ADP$W MRFREGARV(R2)lR5] ,- Allocate from low end of extent 951 UBMD$W MAPREG(Rl) by copying 1st map reg. #. 952 MOVB R3,UBMD$B NUMREG(Rl) Set# of map regs allocated. 953 SUBW R3,ADP$W MRNREGARY(R2)[R5] Subtract out# regs allocated. 954 BNEQ 30$ - NEQ implies extent not empty, 955 956 BSBW DEALLOC DESCRIP 957 BRB 40$ - branch around deallocate. Cal 1 to deallocate descriptor. And branch back to return. 95S 30$: 959 AOOW R3,ADP$W_MRFREGARV(R2)[R5] Bump descriptor past 960 al located registers. 961 40$: 962 50$: MOVL POPL $A#SS$ NORMAL,RO RS - Indicate success. Restore R5,R4,R3 963 MOVQ (SP)+,R3 964 RSB 965 . dsab 1 1sb IOSUBNPAG V03-033 -1 ;RLR0003 ;RLR0003 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 26 Allocate a specific set of UNIBUS Map Re 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SVS.SRC]IOSUBNPAG(18) 7E 53 55 50 24 A5 52 38 AO 51 34 AO 5C A2 2C 05 54 54 01 53 53 53 01 55 015E C245 54 15 46 015E C245 50 64 A245 50 54 09 E3 55 5C A2 50 52 03AS 967 .SBTTL Al locate a specific set of UNIBUS Map Registers 03A8 968 ;+ 03AS 969 ; IOC$ALOUBAMAPSP 03AS 970 03AS 971 This routine is cal led to al locate a specific set of UNIBUS Map Registers. 03A8 972 03A8 973 INPUTS: 03A8 974 R3 #of map registers to allocate 03A8 975 R4 # of first map register to al locate 03A8 976 R5 => UCB 03A8 977 03A8 978 OUTPUTS: 03A8 979 RO Success or failure indication 03A8 980 Note RO, Rl and R2 modified. 03A8 981 ' 03A8 982 03A8 983 IOC$ALOU8AMAPSP:: 7D 03A8 9S4 MOVQ R3,-(SP) Save R3,R4,R5 DD 03AB 985 PUSHL R5 03AD 986 DO 03AD 987 MOVL UC8$L CR8(R5),RO RO => CRB. DO 0381 988 MOVL CR8$L-INTD+VEC$L ADP(RO),R2 R2 => ADP. 9E 0385 989 MOVA8 CRB$L-INTD+VEC$W=MAPREG(RO),Rl R 1 => UBA mapping d e s c r i p t o r . 0389 990 D5 0389 · 1 13 03BC . 2 TSTL BEQL ADP$L MRACTMDRS(R2) 30$ - Test for zero active descriptors. EQL impli~s no registers available. E9 03BE 991 BLBC R4, 10$ Prepare to round DOWN to even boundary. SA 03C1 992 BICB #1, R4 Clear low bit if set and D6 03C4 993 INCL R3 then increment# of registers to allocate 03C6 994 10$: 06 03C6 995 INCL R3 Prepare to round UP to even # of registers SA 03C8 996 8IC8 #1, R3 03C8 997 D4 03CB 998 CLRL R5 R5 will be index register. 03CD 999 20$: Bl 03CD 1000 CMPW R4,ADP$W MRFREGARV(R2)[R5] Are registers we want in 03D3 1001 , current extent? 19 03D3 1002 8LSS 30$ LSS means current extent is beyond the 03D5 1003 desired registers. Therefore they are 03D5 1004 not availiable and we have failed. 13 03D5 1005 8EQL 50$ EQL means they are at the beginning 03D7 1006 of the current extent. 03D7 1007 03D7 100S Here the registers we want are either within the middle of the current 0307 1009 extent or else beyond the current extent. 03D7 1010 Al 03D7 1011 ADDW3 ADP$W_MRFREGARV(R2)[R5],- RO = 1st register beyond 03DC 03EO 1012 ADP$W MRNREGARV(R2)[R5] ,RO current extent. Bl 03EO 1013 CMPW R4,R0- Are we in current extent? 19 03E3 1014 8LSS 40$ LSS means YES, in current. F2 03E5 1015 AOBLSS ADP$L_MRACTMDRS(R2),R5,20$ Loop thru all extents. 03EA 1016 30$: Failure if we fall thru. D4 03EA 1017 CLRL RO Set failure code. 11 03EC 101S BRB 80$ And branch to return. 03EE 1019 40$: 03EE 1020 IOSUBNPAG V03-033 ;RLRMAPSP -1 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 27 Al locate a specific set of UNIBUS Map Re 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SVS.SRC]IOSUBNPAG(1S) 50 54 A2 53 50 B1 F4 19 61 54 BO 02 A1 53 90 64 A245 50 A2 50 53 A2 36 13 55 06 7E 50 BO OOC9 30 53 54 Al 015E C245 64 A245 SE BO 20 11 64 A245 53 Bl C6 14 61 54 BO 02 A 1 53 BO 64 A245 53 A2 OS 13 015E C245 53 AO 03 11 OOS2 30 50 01 DO 55 SEDO 53 SE 7D 05 03EE 03EE 03EE 03EE 03EE 03EE 03EE 03EE 03F1 03F4 03F6 03F6 03F9 03FD 03FD 03FD 03FD 0402 0402 0405 0407 0407 0409 040C 040F 040F 0412 0416 041B 0410 0410 041D 041D 0410 0410 041D 041D 0422 0424 0424 0427 042B 042B 0430 0432 0432 0438 043A 043A 043D 0440 0443 0446 1021 1022 1023 1024 1025 1026 1027 102S 1029 1030 1031 1032 1033 1034 1035 1036 1037 103S 1039 .1 1041 1042 1043 1044 1045 1046 Here the first register we want is greater than the first register of current extent (defined by R5 = index) and is less than or equal to the last register of the extent. RO contains the# of the register just beyond the current extent. In other words, AOP$W_MRFREGARV(R2)[R5] < R4 <RO SUBW CMPW BLSS R4,RO RO,R3 30$ RO = length of subextent based at R4. Compare to # of registers needed. LSS means failure. MOVW MOVB R4,UBMD$W MAPREG(Rl) R3,UBMD$B=NUMREG(Rl) Success. Fill in user's descriptor with base register and # of registers. SUBW3 SUBW AOP$W MRFREGARY(R2)[R5] ,R4,ADP$W-MRNREGARV(R2)[R5] RO,ADP$W MRNREGARV(R2)[R5] Distance from beginning of extent to R4 is new length. Equivalent result. SUBW BEQL INCL MOVW BSBW R3,RO 70$ R5 RO,-(SP) ALLOC OESCRIP RO=# regs. left in sub-extent. EQL means we do not have to al locate and fill a new extent descriptor. R5 = index of new extent descriptor. Save length of new extent. Call to allocate a new descriptor. ADDW3 R4,R3,ADP$W_MRFREGARY(R2)[R5] Fill in new descriptor with 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 50$: Here 60$: 70$: 80$: MOVW BRB (SP)+,ADP$W MRNREGARY(R2)[R5] 70$ - 1st register and # registers. Branch around to success. the first register we want is equal to the first register of the current extent (defined by index register R5). In other words, R4 = ADP$W MRFREGARY(R2)[R5] CMPW BGTR R3,AOP$W MRNREGARY(R2)[R5] 30$ - See if we have enough registers. GTR implies failure. MOVW MOVW R4,UBMO$W MAPREG(Rl) R3,UBMD$B-NUMREG(R1) Success. Fill in user's descr-iptorwith 1st register and# allocated. SUBW BEQL ADDW BRB R3,ADP$W MRNREGARY(R2)[R5J 60$ - R3,ADP$W MRFREGARY(R2)[R5] 70$ Update current descriptor. EQL means current extent now empty. Go to deallocate. If not empty, update 1st register. Branch around deal locate. BSBW MOVL POPL MOVQ RSB DEALLOC DESCRIP SA#SS$ NORMAL.RO R5 - (SP)+,R3 ; Deal locate system descriptor. Set success indicator. Restore R5,R4,R3 And return to caller. IOSUBNPAG V03-033 -1 ;RLR0003 ;RLR0002 ;RLR0002 ;RLR0002 ;RLR0002 ;RLR0002 ;RLR0003 -5 - NONPAGED 1/0 RELATED SUBROUTINES 3-JUN-19B4 11:33:30 VAX-11 Macro V03-01 Page 28 Permanently Allocate UNIBUS Map Register 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(19) 7E 53 55 lB 7E 53 55 53 7E A5 54 7C A5 53 03FF C344 53 F7 BF 53 51 24 A5 52 3B Al 51 34 Al OF 3B 61 53 53 01 55 5C A2 OA 62 A245 53 07 F6 55 50 22 015C C245 50 62 A245 50 53 0447 1074 .SBTTL Permanently Allocate UNIBUS Map Registers 0447 1075 ; + 0447 1076 IOC$ALOUBAMAPRM - Permanently Allocate USA Map Registers (CRB Database Specified) 0447 1077 IOC$ALOUBAMAPRMN - Permanently Allocate UBA Map Registers (Argument Specified) 0447 107B 0447 1079 This routine is cal led to permanently allocate UNIBUS map registers. 0447 lOBO Here we al locate the map registers from the highest numbered 0447 lOBl available registers. 0447 10B2 0447 10B3 INPUTS: 0447 10B4 R3 = # Registers to al locate (IOC$ALOUBAMAPRMN only) 0447 10B5 R5 => UCB 0447 10B6 0447 1057 0447 10B8 OUTPUTS: RO = Success indication 0447 1089 0447 1090 0447 1091 0447 1092 . enab l LSB 0447 1093 IOC$ALOUBMAPRMN:: ;ALLOCATE UBA MAP REGISTERS ARGUMENT SPECIF! 7D 0447 1094 MOVQ R3,-(SP) Save R3,R4,R5 DD 044A 1095 PUSHL R5 044C 1096 11 044C 1097 BRB 5$ 044E 109B IOC$ALOUBMAPRM: : ;ALLOCATE UBA MAP REGISTERS CRB SPECIFIED 7D 044E 1099 MOVQ R3,-(SP) ; Save R3,R4,R5 DD 0451 1100 PUSHL R5 0453 1101 3C 0453 1102 MOVZWL UCB$W BCNT(R5),R3 GET TRANSFER BYTE COUNT 3C 0457 1103 MOVZWL UCB$W-BOFF(R5),R4 GET BYTE OFFSET IN PAGE 9E 045B 1104 MOVAB AX3FF(R3)[R4) ,R3 CALCULATE HIGHEST RELATIVE BYTE AND ROUND 78 0461 1105 ASHL #-9,R3,R3 CALCULATE NUMBER OF MAP REGISTERS REQUIRED 0465 0466 1106 5$: DO 0466 1107 MOVL UCB$L CRB(R5),Rl Rl => CRB DO 046A 1108 MOVL CRB$L-INTD+VEC$L ADP(Rl),R2 R2 => ADP 9E 046E 1109 MOVAB CRB$L-INTD+VEC$W-MAPREG(Rl),Rl Rl => UBMD. EO 0472 1110 BBS #VEC$V MAPLOCK,- If SET, already permanently 0474 1111 UBMD$W=MAPREG(Rl) ,30$ al located, so branch around. 0476 1112 D6 0476 1113 INCL R3 Round up request to next multiple BA 0478 1114 DO 047B 1115 BICB MOVL #1 ,R3 ADP$L MRACTMDRS(R2),R5 of 2. R5 = index beyond last MRD. 13 047F .1 BEQL 15$ - EQL implies no registers available. 0481 . 2 10$: Bl 0481 .3 CMPW R3,ADP$W MRNREGARV-2(R2)[R5] See if enough regs described here. 15 0486 .4 BLEQ 20$ - LEO implies YES. 04B8 .5 F5 0488 .6 SOBGTR R5,10$ Else branch back and continue 048B . 7 15$: D4 048B 1121 CLRL RO If here, al location failure. 11 048D 1122 BRB 40$ Branch around to return. 048F 1123 20$: Al 048F 1124 ADDW3 ADP$W_MRFREGARV-2(R2)[R5] ,- Calculate register # beyond 0494 0498 11 25 ADP$W MRNREGARY-2(R2)[R5],RO last extent. A2 0498 '1126 SUBW R3,RO- We al locate from high end .. RO IOSUBNPAG V03-033 - NONPAGED I/O RELATED SUBROUTINES 3-JLJN-1984 11: 33: 30 VAX-11 Macro V03-01 Page 29 Permanently Al locate UNIBUS Map Register 12-MAR-1982 17: 12: 23 DISK$VMSMASTER:[SVS.SRC]IOSUBNPAG(19) 61 50 BO 61 SOOO SF AS 02 Al 53 90 62 A245 53 A2 OA 13 50 01 DO 55 SEDO 53 SE 70 05 55 07 0002 30 EF 11 049B 0498 049E 04A3 04A7 04AC 04AE 04AE 04AE 0481 0481 0484 0487 0488 0488 048A 0480 048F 1127 1128 1129 1130 1131 1132 1133 1134 30$: 1135 1136 40$: 1137 113S 1139 1140 50$: 1141 1142 1143 1144 MOVW 8ISW MOVB SUBW BEQL MOVL POPL MOVQ RS8 DECL BSBW 8RB .dsabl ; RO,U8MD$W MAPREG(R1) ; #VEC$M MAPLOCK,UBMD$W MAPREG(Rl); R3,U8M5$8 NUMREG(R1) - ; R3,ADP$W_MRNREGARV-2(R2)[R5] ; 50$ ; ; contains 1st reg. to alloc. Record 1st register allocated. and mark it pe_rmanent. Set# of map regs allocated. Subtract out# regs allocated. EQL implies descriptor not va 1 id; branch to deallocate. $A#$S$_NORMAL,RO : Indicate success. R5 (SP)+,R3 ; Restore R5,R4,R3 R5 DEALLOC DESCRIP 30$ lsb RS = index of descriptor to deal loc. Ca 11 to deal locate descriptor. And branch back to return. IOSUBNPAG V03-033 -1 5C A2 66 A245 64 A245 0160 C245 015E C245 EB 55 5C A2 50 5C A2 55 50 13 62 A240 64 A240 015C C240 015E C240 E8 50 5C A2 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 30 Permanently Al locate UNIBUS Map Register 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(20) 04BF 1146 + 04BF 1147 DEALLOC DESCRIP - Common internal subroutine called to deallocate 04BF 1148 a UBA Map Register descriptor. 04BF 1149 04BF 1150 INPUTS: 04BF 1151 R2 => ADP 04BF 1152 R5 index of descriptor to deallocate. 04BF 1153 OUTPUTS: 04BF 1154 The UBA Map Al location structures are updated by contracting 04BF 1155 descriptors over the deallocated one. 04BF 1156 Register R5 is modified. 04BF 1157 ' 04BF 1158 04BF 1159 DEALLOC DESCRIP: 07 04BF 1160 -DECL ADP$L_MRACTMDRS(R2) ; Decrement # active descriptors. 04C2 1161 10$: BO 04C2 1162 MOVW ADP$W_MRNREGARV+2{R2)[R5],- Move data towards lower index 04C6 04C9 1163 ADP$W MRNREGARY(R2)[R5] to fill up hole. BO 04C9 1164 MOVW ADP$W-MRFREGARV+2(R2)[R5],- 04CE 04D2 1165 ADP$W MRFREGARY(R2)lR5] F2 0402 1166 AOBLSS ADP$L=MRACTMDRS(R2),R5,10$ Loop thru rest of active MORS. 05 0407 1167 RSB 0408 1168 0408 1169 + 0408 1170 ALLOC DESCRIP - Common internal subroutine to allocate a UBA map register 0408 1171 -descriptor in the middle of the range of descriptors. 0408 1172 0408 1173 INPUTS: 0408 1174 R2 => ADP 0408 1175 R5 index of where we must allocate descriptor 0408 1176 OUTPUTS: 0408 1177 Al location is accomplished by creating a hole in each of the arrays 0408 1178 by moving descriptor items to the next higher element. 04D8 1179 Note RO is modified. 0408 1180 ' 0408 1181 0408 1182 ALLOC DESCRIP: DO 0408 1183 MOVL ADP$L MRACTMDRS(R2),RO RO = # active descriptors. 04DC 1184 10$: 01 040C 1185 CMPL RO,R5 Have we finished? 15 04DF 1186 BLEQ 20$ LEO implies YES. BO 04E1 1187 MOVW ADP$W_MRNREGARV-2(R2)[RO] ,- Starting from ends of arrays, 04E5 04E8 1188 ADP$W_MRNREGARV(R2)[RO] copy # register items. 04E8 1189 BO 04E8 1190 MOVW ADP$W_MRFREGARY-2(R2)[RO] ,- 04ED 04F1 1191 ADP$W MRFREGARV(R2)[RO] F5 04F1 1192 SOBGTR RO, 10$ And loop back until we reach 04F4 1193 the hole we have created. 06 04F4 1194 20$: 05 04F7 1195 INCL RSB ADP$L MRACTMDRS(R2) - Increment # active descriptors. Return to caller IOSUBNPAG V03-033 -1 ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP -4 - NONPAGED I/O RELATED SUBROUTINES Release UNIBUS Map Registers 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 31 12-MAR-1982 17: 12:23 DISK$VMSMASTER: [SVS.SRC]IOSUBNPAG(21) 7E 53 7E 55 52 OOEO C4 56 52 53 3C A5 54 63 53 02 A3 1 E 51 24 A5 OF 3D 34 Al 04F8 1197 .SBTTL Release UNIBUS Map Registers 04F8 1198 ;+ 04F8 1199 IOC$RELMAPUDA - RELEASE UNIBUS MAP REGISTERS (CALLED FROM UDA PORT DRIVER) 04F8 1200 IOC$RELMAPREG - RELEASE UNIBUS MAP REGISTERS 04F8 1201 04F8 1202 This routine is cal led to release UNIBUS map registers that were previously 04F8 1203 assigned for an I/O transfer. 04F8 1204 04F8 1205 INPUTS: 04F8 1206 (For IOC$RELMAPUDA only) 04F8 1207 04F8 . 1 R4 :::> PDT 04F8 1208 R5 => CORP 04F8 1209 04F8 1210 (For IOC$RELMAPREG call only) 04F8 1211 04F8 121 2 = R5 UCB ADDRESS OF DEVICE UNIT. 04F8 121 3 04F8 1214 It is assumed that the caller stil 1 owns the I/O channel on which 04F8 1215 the transfer took place. 04F8 1216 04F8 1217 OUTPUTS: 04F8 1218 04F8 1219 If the mapping registers have been permanently assigned to the asso- 04F8 1220 ciated I/O channel (only possible for IOC$RELMAPREG), then control 04F8 1221 is immediately returned to the caller. Else the mapping registers are 04F8 1222 released (via a call to IOC$DALOCUBAMAP) and we then go into a loop 04F8 1223 removing waiting driver processes from the Map Register Wait Queue 04F8 1224 until either the Queue is completely drained or we run out of map 04F8 1225 registers to satisfy the needs of a given waiting driver process. 04F8 1226 Driver processes waiting here have their context stored in either 04F8 1227 a UCB fork block or a CORP fork block and the processing required to 04F8 1228 resume each of tt1ese types of driver process is slightly different. 04F8 1229 What is done for each is to al locate the required map registers 04F8 1230 (via a call to IOC$ALOUBAMPA for UCB threads and via a call to 04F8 1231 IOC$ALOUBAMAP for CDRP threads) and to resume the waiting driver 04F8 1232 process. Resuming a UCB thread is done by restoring register 04F8 1233 context and JSB'ing to the saved PC. Resuming a CORP thread is 04F8 1234 accomplished by cal ling SCS$RESUMEWAITR. 04F8 1235 04F8 1236 .enabl lsb 04F8 1237 IOC$RELMAPUDA:: 7D 04F8 1238 MOVQ R3,-(SP) Save R3-R6 7D 04FB 1239 MOVQ R5,-(SP) 04FE 1240 DO 04FE .1 MOVL PDT$L ADP(R4),R2 R2 => ADP. DO 0503 . 2 MOVL R2,R6- R6 => ADP also. 0506 1245 9E 0506 1246 MOVAB CDRP$L UBARSRCE(R5),R3 R3 => UBMD. 3C 050A 1247 MOVZWL UBMD$W-MAPREG(R3),R4 R4 has 1st map reg #. 9A 0500 1248 11 0511 1249 MOVZBL UBMD$B-NUMREG(R3),R3 BRB 10$ - R3 has # of mapregs. Branch to common code. 0513 1250 0513 1251 I OC$RELMAPREG: : Release unibus map registers DO 0513 1252 EO 0517 1253 MOVL BBS UCB$L CRB(R5),R1 #VEC$~ MAPLOCK,- ; R1 => CRB. ; If SET, permanent al location so branch. 0519 1254 CRB$L INTD+VEC$W MAPREG(Rl),50$ IOSUBNPAG V03-033 - NONPAGED I/O RELATED SUBROUTINES Release UNIBUS Map Registers 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 32 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(21) 7E 53 7E 55 52 38 Al 56 52 54 34 Al 53 36 Al 0034 55 30 B6 19 10 OA A5 1A FDFB 09 50 53 10 A5 OC B5 E5 30 A6 65 55 SE 53 SE FDB7 EF 50 OOOOOOOO'EF cc 70 051C 1255 MOVQ R3,-(SP) ; Save R3-R6 70 051F 1256 MOVQ R5,-(SP) 0522 1257 DO 0522 1258 MOVL CRB$L INTD+VEC$L ADP(R1),R2 ;GET ADDRESS OF ADP DO 0526 1259 MOVL R2,R6- - ;SAVE ADDRESS OF ADP 3C 0529 1260 MOVZWL CRB$L INTD+VEC$W MAPREG(R1),R4 ;GET STARTING MAP REGISTER NUMBER 9A 052D 1261 MOVZBL CRB$L=INTD+VEC$B-NUMREG(R1),R3 ;GET NUMBER OF REGISTERS TO DEALLOC 0531 1262 10$: 30 0531 1263 BSBW IOC$DALOCUBAMAP ; Free up UBA map resources. 0534 1264 20$: OF 0534 1265 REMQUE @ADP$L MRQFL(R6),R5 ;GET ADDRESS OF NEXT DRIVER FORK BLOCK lD 0538 1266 BVS 40$ - ;IF VS NO DRIVER PROCESS WAITING 053A 1267 91 053A 1268 CMPB #DVN$C UCB,- See if we dequeued a UCB or a CORP. 053C 1269 UCB$B TVPE(R5) 12 053E 1270 BNEQ REALLOC CD MAPREGS NEQ implies a CORP. 0540 1271 30 0540 1272 BSBW IOC$ALOUBAMAP SEARCH MAP REGISTER BITMAP AND ALLOCATE E9 0543 1273 BLBC R0,30$ IF LBC ALLOCATION FAILURE 7D 0546 1274 MOVQ UCB$L FR3(R5),R3 RESTORE DRIVE PROCESS CONTEXT 16 054A 1275 JSB @UCB$L FPC(R5) CALL DRIVER AT MAP REGISTER WAIT RETURN ADD 11 0540 1276 BRB 20$ - OE 054F 1277 30$: 7D 0553 1278 40$: INSQUE UCB$L FQFL(R5),ADP$L MRQFL(R6) ;REINSERT DRIVER PROCESS AT FRONT OF MOVQ (SP)+~R5 - : Restore R3-R6 70 0556 1279 MOVQ (SP)+,R3 05 0559 1280 50$: RSB 055A 1281 055A 1282 REALLOC CD MAPREGS: Real locate mapregs to a class driver 055A 1283 process. 30 055A 1284 BSBW IOC$ALOMAPUDA Al locate map registers if we can. E9 0550 1285 BLBC R0,30$ LBC implies allocation failure, branch 0560 1286 16 0560 1287 JSB SCS$RESUMEWAITR Resume waiting thread and any backed 0566 1288 up IRP's. 11 0566 1289 BRB 20$ Branch back to try and allocate more 0568 1290 UNIBUS map registers. 0568 1291 . dsab 1 l sb IOSUBNPAG V03-033 -1 ROW0140 ROW0140 RLR0003 RLR0003 - NONPAGED I/O RELATED SUBROUTINES Release UNIBUS Map Registers 3-JUN-1984 11 :33:30 VAX-11 Macro V03-0l Page 33 12-MAR-1982 17; 12;23 DISK$VMSMASTER;[SYS.SRC]IOSUBNPAG(22) 55 51 53 54 53 62 SC A2 4E 015E C245 51 F3 55 07 5C A2 28 29 62 A245 50 015C C245 54 50 oc 015E C245 54 0568 1293 + 0568 1294 IOC$DALOCUBAMAP - Common internal subroutine to update the UBA Map allocation 0568 1295 structures to include the map registers specified here among the 0568 1296 available map registers. 0568 1297 0568 1298 INPUTS: 0568 1299 R2 => ADP 0568 1300 R3 # map registers to free. 0568 1301 R4 first map register to free. 0568 1302 0568 1303 OUTPUTS: 0568 1304 The UBA Map Al location structures are updated. 0568 1305 0568 1306 Registers RO, Rl and RS are modified. 0568 1307 0568 1308 ' 0568 1309 0568 1310 IOC$0ALOCUBAMAP: 04 0568 1311 CLRL RS Initialize loop variable. Cl 056A 1312 AODL3 R4,R3,R1 Rl =map register beyond extent. 05 056E .1 TSTL R3 Is the# of regs. to deallocate zero? 13 0570 . 2 BEQL 90$ Branch to bugcheck if zero . 05 0572 .3 TSTL ADP$L MRACTMORS(R2) Test for zero active descriptors. 13 0575 . 4 BEQL 50$ - EQL implies no registers available . 0577 1313 10$: Bl 0577 1314 CMPW R1,ADP$W_MRFREGARY(R2)[R5] See if map registers to free 0570 1315 are before those described 0570 1316 by current descriptor. 15 0570 1317 BLEQ 20$ LEQ implies yes. 057F 1318 F2 057F 1319 AOBLSS AOP$L MRACTMDRS(R2),R5,10$ Else branch back and try next. 11 0584 1320 BRB 40$ If here, registers to free 0586 1321 beyond those described by 0586 1322 last descriptor. So branch 0586 1323 to try and absorb at end of 0586 1324 last descriptor. 0586 1325 20$: 12 0586 1326 BNEQ 40$ NEQ implies that althoug~ we al loca- 0588 1327 registers before the current des- 0588 1328 criptor, we are not contiguous with 0588 1329 it. So we branch to try and absorb 0588 1330 these registers in the previous one. 0588 1331 0588 1332 Here we can absorb the registers in the current descriptor. 0588 1333 Al 0588 1334 ADOW3 AOP$W_MRNREGARY-2(R2)[R5],- Calculate end of previous 058C 0591 1335 AOP$W MRFREGARY-2(R2)[R5],RO extent and move to RO. Bl 0591 1336 CMPW RO,R4- Does it coincide with start 0594 1337 of this extent? 13 0594 1338 BEQL 30$ EQL implies yes. 0596 1339 0596 1340 Here we have the most likely case. The map registers that we are freeing can 0596 1341 be absorbed into the top of the current descriptor but not also in the 0596 1342 previous descriptor. 0596 1343 BO 0596 1344 MOVW R4,AOP$W_MRFREGARY(R2)[R5J First register freed becomes IOSUBNPAG V03-033 ROW0140 ROW0140 ROW0140 ROW0140 - NONPAGED I/0 RELATED SUBROUTINES Release UNIBUS Map Registers 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 34 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(22) 64 A245 53 62 A245 53 64 A245 62 A245 FFOE 62 A245 50 015C C245 54 50 06 62 A245 53 FF10 64 A245 53 015E C245 54 059C 1345 first register of current 059C 1346 descriptor. AO 059C 1347 AOOW R3,ADP$W MRNREGARY(R2)[R5] Number of registers is sum of 05A1 1348 registers freed and registers 05A1 1349 previously described here. 05 05A1 1350 RSB 05A2 1351 05A2 1352 Here we have the case where the map registers being freed fal 1 between two 05A2 1353 discohtiguous blocks and exactly span the difference. We then can 05A2 1354 describe the entire group with one descriptor, and so we also 05A2 1355 deal locate the current descriptor. Note new combined descriptor 05A2 1356 wil 1 still begin at same map register number so we do NOT alter 05A2 1357 this item. 05A2 1358 05A2 1359 30$: AO 05A2 1360 ADDW R3,ADP$W_MRNREGARV-2(R2)[R5] Partial sum of registers 05A7 1361 being freed and previous ones. AO 05A7 1362 AODW ADP$W_MRNREGARV(R2)[R5],- Now add in registers described 05AB 05AE 1363 ADP$W_MRNREGARY-2(R2)[R5] in current descriptor. 05AE 1364 31 05AE 1365 BRW DEALLOC_DESCRIP BRW to subroutine and let it 0581 1366 return to our caller. 0581 1367 0581 1368 Here we cannot absorb the freed map registers in the current descriptor. 05B1 1369 We test to see if we can absorb them in the previous descriptor. 05B1 1370 0561 1371 40$: Al 0581 1372 AOOW3 ADP$W_MRNREGARY-2(R2)[R5] ,- Calculate end of previous 0565 058A 1373 ADP$W MRFREGARY-2(R2)[R5],RO extent and move to RO. 81 058A 1374 CMPW RO,R4- See if contigous with previous. 12 05BO 1375 BNEQ 50$ NEQ implies NO. 05BF 1376 AO 058F 1377 AODW R3,AOP$W_MRNREGARY-2(R2)[R5] Sum# of registers in extent. 05 05C4 1378 RSB 05C5 1379 05C5 1380 Here we must allocate a new descriptor to describe the map registers we 05C5 1381 are freeing. Conditions at this time are as fol lows: 05C5 1382 05C5 1383 R2 => ADP 05C5 1384 R3 # registers to free 05C5 1385 R4 first register to free 05C5 1386 R5 index of where we must allocate descriptor 05C5 1387 05C5 1388 Al location is accomplished by calling subroutine ALLOC_OESCRIP 05C5 1389 05C5 1390 05.C5 1391 50$: 30 05C5 1392 BSBW ALLOC DESCRIP Allee R5 =index of descriptor. BO 05C8 1393 MOVW R3,ADP$W MRNREGARV(R2)[R5] Fill in allocated descriptor. BO 05CD 1394 MOVW R4,ADP$W=MRFREGARV(R2)[R5] 05 0503 1395 RSB 0504 .1 0504 · 2 90$: BUG CHECK INCONSTATE Non-fatal bugcheck on zero map 0508 .3 registers deallocation attempts. 05 0508 .4 RSB Then ignore deallocate request. I IOSUBNPAG V03-033 -1 - NONPAGED I/O RELATED SUBROUTINES RETURN TO CALLER 3-JUN-1984 11 :33:30 VAX-11 Macro V03-0l Page 35 12-MAR-1982 17: 12:23 DISK$VMSMASTER: [SVS.SRC]IOSUBNPAG(23) 05D9 1397 .SBTTL RETURN TO CALLER 05D9 1398 + 05D9 1399 IOC$RETURN - RETURN TO CALLER 0509 1400 0509 1401 THIS ROUTINE IS CALLED AS A RESULT OF A DDT DISPATCH TO A NULL ENTRY. ITS 05D9 1402 FUNCTION IS MERELY TO RETURN TO ITS CALLER. 05D9 1403 05D9 1404 ; INPUTS: 0509 1405 0509 1406 ; NONE. 0509 1407 ; 0509 1408 ; OUTPUTS: 0509 1409 . 0509 1410 ; 0509 1411 NONE. 0509 1412 0509 1413 IOC$RETURN:: ;RETURN TO CALLER 05 0509 1414 RSB IOSUBNPAG V03-033 -1 - NONPAGED I/0 RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 36 WAITFOR INTERRUPT OR TIMEOUT AND KEEP CH 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(24) 6E 02 co 10 A5 53 7D oc A5 8EDO 64 AS 03 AB BE C1 OOOOOOOO'EF 6C A5 0040 BF AA 64 A5 05 05DA 05DA OSDA OSDA OSDA 05DA OSDA 05DA 05DA OSDA OSDA OSDA 05DA 05DA 05DA 05DA OSDA OSDA OSDA 05DA OSDA 05DA 05DA OSDA 05DA 05DA 05DD 05E1 05E5 05E9 OSEB OSFO 05F2 05F6 05F8 OSFB 1416 .SBTTL WAITFOR INTERRUPT OR TIMEOUT AND KEEP CHANNEL 14H ;+ 1418 ; IOC$WFIKPCH - WAITFOR INTERRUPT OR TIMEOUT AND KEEP CHANNEL 1419 1420 THIS ROUTINE IS CALLED TO SOFTWARE ENABLE INTERRUPTS AND TIMEOUT ON 1421 A DEVICE UNIT AND TO KEEP THE CHANNEL. THIS ROUTINE CAN BE CALLED AT 1422 EITHER FORK OR DEVICE INTERRUPT LEVEL. 1423 1424 INPUTS: 1425 1426 OO(SP) RETURN ADDRESS OF CALLER. 1427 04(SP) TIMEOUT VALUE IN SECONDS. 1428 08(SP) IPL TO LOWER TO AFTER SETTING WAIT. 1429 12(SP) RETURN ADDRESS OF CALLER'S CALLER. 1430 1431 R5 = UCB ADDRESS OF DEVICE UNIT. 1432 1433 OUTPUTS: 1434 1435 THE TIMEOUT VALUE IS COMPUTED AND STORED IN DUE TIME, REGISTERS R3 AND 1436 R4 ALONG WITH THE RETURN PC ARE SAVED IN THE FORK BLOCK, INTERRUPTS AND 1437 TIMEOUT ARE ENABLED, AND A RETURN TO THE CALLER'S CALLER IS EXECUTED. 1438 1439 1440 I OC$WF I KPCH: : ;WAITFOR INTERRUPT/TIMEOUT AND KEEP CHANNEL 1441 ADDL #2,(SP) ;CALCULATE OFFSET TO NORMAL RETURN 1442 MOVQ R3,UCB$L FR3(R5) ;SAVE REGISTERS R3 AND R4 1443 POPL UCB$L FPC(RS) ;SAVE INTERRUPT RETURN ADDRESS 1444 BISW #UCB$M INT!UCB$M TIM,UCB$W STS(R5) ;ENABLE INTERRUPT AND TIMEOUT 1445 ADDL3 (SP)+,LAEXE$GL_ABSTIM,UCB$L_DUETIM(R5) ;SET TIMEOUT TIME 1446 1447 1448 BICW #UCB$M_TIMOUT,UCB$W_STS(R5) ;CLEAR UNIT TIMED OUT ENBINT RSB ;ENABLE INTERRUPTS IOSUBNPAG V03-033 -1 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-0l Page 37 WAITFOR INTERRUPT OR TIMEOUT AND RELEASE 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(25) 6E 02 co 10 A!: 53 7D QC A5 8EDO 64 A5 03 AB SE Cl OOOOOOOO'EF 6C A5 0040 SF AA 64 A5 FA63 31 05FC 05FC OSFC 05FC 05FC 05FC OSFC 05FC 05FC 05FC 05FC OSFC 05FC OSFC 05FC 05FC 05FC 05FC OSFC OSFC 05FC OSFC OSFC OSFC OSFC OSFC OSFF 0603 0607 0608 060D 0612 0614 0618 061A 061D 0620 0620 1450 .SBTTL WAITFOR INTERRUPT OR TIMEOUT AND RELEASE CHANNEL 1451 ;+ 1452 ; IOC$WFIRLCH - WAITFOR INTERRUPT OR TIMEOUT AND RELEASE CHANNEL 1453 1454 THIS ROUTINE IS CALLED TO SOFTWARE ENABLE INTERRUPTS AND TIMEOUT ON A DEVICE 1455 UNIT AND TO RELEASE THE CHANNEL. THIS ROUTINE CAN ONLY BE CALLED AT FORK LEVEL. 1456 1457 INPUTS: 1458 1459 = OO(SP) RETURN ADDRESS OF CALLER. 1460 04(SP) TIMEOUT VALUE IN SECONDS. 1461 OS(SP) IPL TO LOWER TO AFTER SETTING WAIT. 1462 12(SP) RETURN ADDRESS OF CALLER'S CALLER. 1463 1464 = RS UCB ADDRESS OF DEVICE UNIT. 1465 1466 OUTPUTS: 1467 1468 THE TIMEOUT VALUE IS COMPUTED AND STORED IN DUE TIME, REGISTERS,R3 AND 1469 R4 ALONG WITH THE RETURN PC ARE SAVED IN THE FORK BLOCK, INTERRUPTS AND 1470 TIMEOUT ARE ENABLED, THE CHANNEL IS RELEASED, AND A RETURN TO THE CALLER'S 1471 CALLER IS EXECUTED. 1472 ' 1473 1474 IOC$WFIRLCH:: ;WAITFOR INTERRUPT/TIMEOUT AND RELEASE CHANN 1475 ADDL #2,(SP) ;CALCULATE OFFSET TO NORMAL RETURN 1476 MOVQ R3,UCB$L FR3(R5) ;SAVE REGISTERS R3 AND R4 1477 POPL UCB$L FPC(R5) ;SAVE INTERRUPT RETURN ADDRESS 1478 BISW #UCB$M INT!UCB$M TIM,UCB$W STS(RS) ;ENABLE INTERRUPT AND TIMEOUT 1479 ADDL3 (SP)+,LAEXE$GL_ABSTIM,UCB$L_DUETIM(RS) ;SET TI,MEOUT TIME 1480 1481 1482 1483 1484 BICW #UCB$M_TIMOUT,UCB$W_STS(R5) ;CLEAR UNIT TIMED OUT ENBINT BRW IOC$RELCHAN ;ENABLE INTERRUPTS ;RELEASE ALL CHANNELS AND RETURN TO CALLER IOSUBNPAG V03-033 -1 50 OOOOOOOO'EF 52 53 52 51 53 OOOOOOOO'EF 10 53 OOOOOOOO'EF OOOOOOOO'EF 53 50 - NONPAGED I/O RELATED SUBROUTINES ALLOCATE SYSTEM PAGE TABLE 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 38 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(26) 0620 1486 .SBTTL ALLOCATE SYSTEM PAGE TABLE 0620 1487 ;+ 0620 1488 ; IOC$ALLOSPT - ALLOCATE SYSTEM PAGE TABLE 0620 1489 0620 1490 THIS ROUTINE ALLOCATES SYSTEM PAGE TABLE (SPT) ENTRIES. 0620 1491 0620 1492 INPUTS: 0620 1493 0620 1494 = Rl NUMBER OF SPT ENTRIES TO BE ALLOCATED 0620 1495 0620 1496 BOO$GL SPTFREL = LOWEST FREE VPN 0620 1497 BOO$GL=SPTFREH = HIGHEST FREE VPN 0620 1498 0620 1499 IT IS ASSUMED THAT THE CALLER IS RUNNING AT IPL$_SYNCH. 0620 1500 0620 1501 OUTPUTS: 0620 1502 0620 1503 RO SUCCESS INDICATION. 0620 1504 R2 STARTING PAGE NUMBER ALLOCATED (SVPN). 0620 1505 R3 ADDRESS OF BASE OF SYSTEM PAGE TABLE (MMG$GL_SPTBASE). 0620 1506 0620 1507 Rl IS PRESERVED ACROSS CALL. 0620 1508 ' 0620 1509 IOC$ALLOSPT:: ALLOCATE SYSTEM PAGE TABLE 04 0620 1510 CLRL RO ASSUME FAILURE DO 0622 1511 MOVL LAB00$GL_SPTFREL,R2 GET NEXT AVAILABLE SYSTEM VPN 0628 Cl 0629 1512 ADDL3 R1,R2,R3 ;COMPUTE NEXT WITH THIS ALLOCATION Dl 062D 1513 CMPL R3,LAB00$GL_SPTFREH ;ARE THERE ENOUGH AVAILABLE? 062F lE 0634 1514 BGEQU 10$ ;BR IF NO DO 0636 1515 MOVL R3,LA800$GL SPTFREL ;MARK THE ENTRIES ALLOCATED 0638 DO 063D 1516 MOVL LAMMG$GL_SPTBASE,R3 ;GET ADDR OF BASE OF SPT 0643 D6 0644 1517 INCL RO ;SET SUCCESS 0646 1518 10$: 05 0646 1519 RSB IOSUBNPAG V03-033 -1 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ; RA.50300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;ROW0234 ;ROW0234 ;ROW0234 ;ROW0234 ;ROW0234 ;ROW0234 ;KPL0001 ;KPL0001 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 - NONPAGED I/O RELATED SUBROUTINES CONVERT DEVICE NAME AND UNIT 3-JUN-1984 11 :33:30 VAX-11 Macro V03-0l Page 39 12-MAR-1982 17:12:23 DISK$VMSMASTER: [SVS.SRC]IOSUBNPAG(27) 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 0647 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 .1 . 2 . 3 .4 .5 .6 .7 .8 .9 . 10 .11 . 12 . 13 .14 . 15 .16 . 17 . 18 . 19 .20 1536 1537 1538 1539 1540 1541 1542 1543 .1 . 2 . 3 .4 .5 .6 . 7 .8 .9 . 10 .11 . 12 . 13 .14 .SBTTL CONVERT DEVICE NAME AND UNIT ;+ IOC$CVT_DEVNAM - Convert device name and unit This routine is cal led to convert a device name and unit number to a physical device name string. Inputs: The caller is assumed to have PROBEd the output buffer for write access. The I/O data base is locked for read access. This means that the caller owns the I/O data base mutex and/or is at IPL SYNCH or higher. RO = length of output buffer. Rl = address of output buffer. R4 =name string formation mode, one of: -1 (DVI$ DEVNAM) -- a name suitable for displays for non-local devices, return node$ddcn for local devices: if in cluster and file oriented device, return node$ddcn otherwise, return ddcn 0 (DVI$ FULLDEVNAM) -- a name with appropriate node information if allocation class not zero and file oriented device, return $al loclass$ddcn otherwise, return node$ddcn 1 (DVI$ ALLDEVNAM) -- a name with al location class information if allocation class not zero, return $alloclass$ddcn otherwise, return node$ddcn 2 (no GETDVI item code) -- an old fashioned name return ddcn 3 (no GETDVI item code) -- a secondary path name for displays same as -1 except secondary path name returned 4 (no GETDVI item code) -- path controller name for displays same as -1 except no unit number is appended Note: if the node name string is nul 1, node$ is not returned. R5 = address of device UCB. Outputs: The device name and unit number are converted and stored in the specified output buffer. The following register values are returned: RO = Final conversion status. SS$ NORMAL or SS$-BUFFEROVF (an alternate success status which - indicates that the supplied buffer could not hold the device name string) Rl = Length of conversion string. Rl = 0 if the alternate path name was requested but none exists. Working storage (offsets from R7) $OFFSET O,POSITIVE,< - <BINNUM,8>, - ;Binary value to convert to ASCII ; add new working storage eel ls before this line IOSUBNPAG V03-033 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ; RAS03,QO ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;ROW0244 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;ROW0244 ;ROW0244 ;ROW0244 - NONPAGED I/O RELATED SUBROUTINES CONVERT DEVICE NAME AND UNIT 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 40 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(27) OOFC BF 7E 01 7E 57 5E 53 5F BF OOB4 56 28 A5 52 34 A6 5D 09 58 3C A5 5B 33 38 A5 OE 0647 0647 0647 0647 0647 0647 0647 0000 0008 oooc. 0010 0010 0014 0018 0647 0647 0647 BB 0647 064B 0648 0648 0648 064B 064B 7D 064B 7C 064E 0650 DO 0650 0653 0653 0653 0653 9A 0653 30 0657 065A 065A 065A 065A DO 065A DO 065E 13 0662 El 0664 0666 0669 0669 0669 0669 0669 0669 0669 0669 0669 11 067B 067D 067D El 0670 0682 . 15 <RESRO>, - ;Result RO . 16 <RESRl>, - ;Result Rl . 17 <SCRLEN,O> - ;amount of working storage . 18 <RESR2>, - ;saved R2 . 19 <RESR3>, - ;saved R3 .20 <RESR4>, - ;saved R4 . 21 > BINNUM: RESRO: RESR 1: SCRLEN: RESR2: RESR3: RESR4: .22 .23 IOC$CVT_DEVNAM:: ;Convert device name and unit .24 .25 PUSHR #AM<R2,R3,R4,R5,R6,R7> ;Save registers .26 .27 Push a quadword onto the stack. The quadword will land .28 on the stack so that when the POPR at the end of the routine .29 is executed, RO will contain the routine value, and R1 will .30 contain the length of the formatted device name. . 31 .32 MOVQ #SS$ NORMAL,-(SP) ;Put a 1 and a 0 on the stack .33 CLRQ -(SP) ;!nit binary number working area. .34 ASSUME SCRLEN EQ 16 .35 MOVL SP, R7 ;Setup result RO and Rl pointer in R7. .36 .37 Precede the device name with a " " (underscore character) to .38 indicate that this is a physical-device name. .39 .40 MOVZBL #AA/ /,R3 ;Put underscore character in R3 .41 BSBW PUT CHAR ;Put it in the output buffer .42 .43 Check for a possible nodename. If it exists, determine which format . 44 of name was requested by the caller . .45 .46 MOVL UCB$L DDB(R5),R6 Get DOB address .47 MOVL DDB$L-SB(R6),R2 Get System Block address .48 BEQL LOCAL-NAME None, leave .49 BBC #DEV$V NNM,- Branch if nodename not wanted .50 UCB$L DEVCHAR2(R5),LOCAL NAME . 51 CASE R4, -- ~Dispatch on type of output requested: .52 limit=#-1, displist=< - .53 DISPLAY NAME, - -1 ==> node$dev: for disks, else dev: .54 FULL NAME, - 0 ==> $allocls$dev: or node$dev: .55 ALLOC NAME, - 1 ==> $allocls$dev: or node$dev: .56 LOCAL-NAME, - 2 ==> just dev: .57 SECONDARY NAME, - 3 ==> secondary path .5B DISPLAY NAME - 4 ==> same as -1 sans unit number .59 > .60 BRB EXDVNM Al I others are NOPs. .61 .62 FULL NAME: .63 BBC #DEV$V FOO, - ;A file oriented device? .64 UCB$L DEVCHAR(R5), - IOSUBNPAG V03-033 ;ROW0244 ;ROW0244 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 :RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;ROW0244 ;ROW0244 ;ROW0244 ;ROW0234 ;ROW0234 0 ROW0234 ;ROW0234 ;ROW0234 ;ROW0234 ;ROW0234 ;ROW0234 ;ROW0239 ;ROW0239 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 - NONPAGED I/0 RELATED SUBROUTINES CONVERT DEVICE NAME AND UNIT 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 41 12-MAR-1982 17:12:23 DISK$VMSMASTER: [SVS.SRC]IOSUBNPAG(27) 67 3C A6 20 0080 58 30 04 3C A5 4C 56 OOAO C5 45 52 34 AG 52 00000000'8F OD OC 38 A5 OE 52 44 A2 62 04 3E 4A 52 14 A6 36 04 18 A7 OB 6"1 54 A5 12 53 3A 0682 .65 ADD NODE ;Branch if not file oriented device. 0682 .66 0682 .67 ALLOC_NAME: 0682 .68 9A 0682 .69 MOVZBL DDB$L ALLOCLS(R6), - ;Setup al location class value 0686 .70 BINNUM(R7) ; for conversion. 13 0686 . 71 BEQL ADD NODE ;If none return node+device name. 30 0688 .72 BSBW PUTDOLLAR ;Prepend al location class with a '$' 10 0688 .73 BSBB PUTNUM ;Convert al location class number to 068D .74 ;ASCII and put it in the buffer 11 068D .75 BRB ADD DOLLAR ;Append dollar sign to alloc. class 068F .76 ; and add device name to buffer. 068F .77 068F .78 SECONDARY NAME: El 068F .79 BBC #DEV$V 2P,- ;Branch if device not dual-pathed. 0691 .80 UCB$L DEVCHAR2(R5),- ; (I.E. there is no secondary path to 0693 .81 NO SECONDARY ; return.) DO 0694 .82 MOVL UCB$L DP DDB(R5),R6 ;Get secondary DOB. 13 0699 .83 BEQL NO SECONDARY ;Branch to no sec. path if none. DO 0698 .84 MOVL DDB$L SB(R6),R2 ;Get alternate SB. 069F .85 069F .86 DISPLAY NAME: Dl 069F .87 -CMPL R2,#SCS$GA LOCALSB ;Is it the perm local system block? 06A1 12 06A6 .88 BNEQ ADD NODE ;Return node+devnam for non-local devs. 06A8 .89 IFNOCLSTR LOCAL NAME ;Return devnam if not part of a cluster. El 0680 .90 BBC #DEV$V FOO, - ;A file oriented device? 0685 .91 UCB$L DEVCHAR(R5), - 0685 .92 LOCAL=NAME ;Branch if not a file oriented device. 0685 .93 ;Its a local disk in a cluster: return 0685 .94 ;node+device name format. 0685 .95 0665 .96 Return node name plus device name. Copy node name to buffer and 0685 .97 suffix with a "$" before moving in rest of device name. 0685 .98 ; 0685 .99 ADD NODE: 9E 0685 . 100 - MOVAB SB$T NODENAME(R2),R2 ;Point to name field 95 0689 . 101 TSTB (R2)- ;Is the node name null? 13 0688 . 102 BEQL LOCAL NAME ;Skip inserting node name, if its null. 10 06BD . 103 BSBB PUTASCIC ;Copy counted ASCII str. to output buf. 06BF . 104 ADD DOLLAR: 10 06BF . 105 - BSBB PUTDOLLAR ;Append dollar sign to node name 06C1 06C1 .106 . 107 ; ' Copy device name to buffer. 06C1 06C1 . 108 . 109 L' OCAL NAME: 9E 06C1 .110 - MOVAB DDB$T NAME(R6),R2 ;Get address of ASCIC device name. 10 06C5 · 1 1 1 BSBB PUTASCIC ;Copy counted ASCII str. to output buf. 81 06C7 · 112 CMPW RESR4(R7),#4 ;Do we want the unit number? 13 06C8 · 113 BEQL EXDVNM ;Nope 3C 06CD . 114 MOVZWL UCB$W UNIT(R5), - ;Setup device unit number for 06D1 · 115 BINNUM(R7) ; converstion to ASCII. 10 0601 · 116 BSB8 PUTNUM ;Convert unit number to ASCII. 06D3 . 117 0603 · 118 Terminate the device name with a":" (colon). 0603 .119 9A 0603 .120 MOVZBL #AA/:/,R3 ;,Put a ":" in R3 IOSUBNPAG V03-033 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 - NONPAGED I/0 RELATED SUBROUTINES CONVERT DEVICE NAME AND UNIT 3-JUN-19B4 11 :33:30 VAX-11 Macro V03-0l Page 42 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(27) 36 10 0606 . 121 BSBB PUTCHAR ;Put the ":" in output buffer 06D8 . 122 0608 . 123 Clean up the stack and exit. The stack has been set up so that 0608 . 124 the proper values will be stored in RO and R1 by the POPR. 0608 . 125 ; 5E OB co 06DB . 126 EXDVNM: ADDL #RESRO,SP ;Remove everything upto result RO 06DB . 127 ;from the stack DOFF BF BA 06DB . 128 POPR #AM<RO,Rl ,R2,R3,R4,R5,R6,R7> ;Restore registers 05 06DF . 129 RSB ;Return 06EO . 130 06EO . 131 . 06EO . 132 06EO . 133 Come here when the secondary device name was requested but none exists . 06EO . 134 NO SECONDARY: OC A7 D4 06EO . 135 - CLRL RESR1(R7) ;Clear count of characters F3 11 06E3 . 136 BRB EXDVNM ;and return. 06E5 . 137 06E5 . 13B 06E5 · 139 ;++ 06E5 . 140 The following code is a local subroutine to convert binary to ASCII and 06E5 .141 put the ASCII equivalent in the output name buffer. 06E5 . 142 06E5 . 143 Inputs: 06E5 .144 06E5 .145 BINNUM(R7) binary number to be converted (a quadword with high 06E5 . 146 longword zeroed 06E5 . 147 06E5 . 14B Outputs: 06E5 . 149 The number at BINNUM(R7) is converted to ASCII and stored in the 06E5 . 150 device name buffer. 06E5 . 151 06E5 . 152 PUTNUM: 53 01 SE 06E5 . 153 MNEGB #1, R3 Get end-of-number marker. 7E 53 90 06E8 . 154 10$: MOVB R3, -(SP) Move digit/marker to scratch. 67 67 OA 76 06EB . 155 EDIV #10, BINNUM(R7), - Divide number by 10, overwrite number 53 06EF 06FO . 156 BINNUM(R7), R3 ;with quotient, put remainder in R3. F6 12 06FO . 157 BNEQ 10$ ;If quotient not zero, go save this 06F2 . 158 ; digit and get the next one. 06F2 . 159 06F2 . 160 Get digits -- most significant first (then saved ones), convert them to . 06F2 . 161 ASCII, and put them in the output buffer 06F2 . 162 53 30 80 06F2 .163 50$: ADDB #AA/0/, R3 ;Convert binary ~igit to ASCII 17 10 06F5 · 164 BSBB PUT CHAR ;Copy digit to output buffer 53 BE 90 06F7 . 165 MOVB (SP)+, R3 ;Get another digit F6 18 06FA .166 BGEQ 50$ ;Branch if the end 05 06FC . 167 RSB 06FD . 168 06FD . 169 ;++ 06FD . 170 The following code is a local subroutine to copy a counted ASCII string 06FD . 171 to the output name buffer. 06FD . 172 06FD . 173 Inputs: 06FD . 174 06FD .175 R2 Beginning address of a counted ASCII string 06FD . 176 IOSUBNPAG V03-033 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 ;RAS0300 -59 ;KPL.0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPLOOOl ;KPLOOOl ;KPLOOOl ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPL0001 ;KPLOOOl - NONPAGED I/O RELATED SUBROUTINES CONVERT DEVICE NAME AND UNIT 3-JUN-1984 11:33:30 VAX-11 Macro V03-0l Page 43 12-MAR-1982 17: 12:23 DISK$VMSMASTER: [SVS.SRC]IOSU6NPAG(27) 54 82 08 53 82 07 F8 54 53 24 50 07 81 53 OC A7 06FD . 177 Outputs: 06FD . 178 The counted ASCII string pointed to by R2 is copied to the device 06FD .179 name buffer. 06FD . 180 06FD . 181 PUTASCIC: 9A 06FD . 182 MOVZ8L (R2)+, R4 ;Get counted string length. 13 0700 . 183 8EQL 90$ ;If no characters, leave. 90 0702 . 184 5$: MOV8 (R2)+, R3 ;Move one byte to output buffer. 10 0705 . 185 8$88 PUTCHAR ;Put the character in the output buffer. F5 0707 . 186 S08GTR R4, 5$ ;Branch if more to copy. 05 070A . 187 90$: RS8 ;Al 1 done, return. 0706 1603 0706 1604 ;++ 0706 1605 070B 1606 The fol lowing code is a local subroutine to place a given 0706 1607 byte in the output buffer. A count is kept of al 1 characters 070B 1608 placed in the output buffer. If the output buffer is ful 1, 0706 .1 the byte is not copied, the count is not increased, and the 0706 . 2 return status for IOC$CVT DEVNAM is changed to SS$ 6UFFEROVF 0708 .3 (an alternate success status). 0706 .4 0706 .5 Inputs: 0706 .6 RO Count of unstored character slots remaining in output buffer 0706 .7 R1 Address of next unused character slot in output buffer 070B . 8 R3 Character to be placed in the buffer 0706 .9 0706 . 10 I mp 1 i c i t i n puts : 0706 .11 RESRO(R7) longword holding final IOC$CVT DEVNAM status 0708 . 12 RESR1(R7) longword holding final IOC$CVT-DEVNAM count of 0708 . 13 characters stored in the buffer (to be 0708 . 14 returned in Rl 0706 . 15 0708 . 16 Outputs: 0708 . 17 None. 0706 . 18 0706 . 19 Implicit outputs: 0706 .20 0708 . 21 0708 .22 0708 .23 0708 .24 If RO >= zero: RO ( R 1) R1 RESRl (R7) <== RO <== R3 <== R 1 + 1 <== RESR1(R7) + 1 0706 .25 0708 .26 otherwise: RESRO(R7) <== SS$_BUFFEROVF 0708 .27 ;++ 0708 .28 PUTDOLLAR is an internal routine which is the equivalent of: 0706 .29 0708 .30 MOV8 #AA/$/, R3 0708 . 31 8$88 PUT CHAR 0708 .32 0708 .33 PUTDOLLAR: 90 0708 .34 MOVB #AA/$/, R3 ;Setup to put "$" in output buffer. 070E .35 PUTCHAR: 07 070E .36 DECL RO ;Decrease characters remaining count. 19 0710 .37 BLSS 90$ ;Branch if no more characters remaining. 90 0712 .38 MOV8 R3, (Rl )+ ;Copy character to output buffer 06 0715 .39 INCL RESRl (R7) ;Count characters stored 05 0718 .40 RS8 ;Return IOSUBNPAG V03-033 ;KPLOOOl ;KPLOOOl ;KPL0001 ;KPL0001 - NONPAGED I/O RELATED SUBROUTINES CONVERT DEVICE NAME ANO UNIT 3-JUN~1984 11:33:30 VAX-11 Macro V03-01 Page 44 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(27) 0601 BF 08 A7 0719 3C 0719 0710 071F 05 071F .41 .42 90$: .43 .44 MOVZWL #SS$_BUFFEROVF, - RESRO(R7) RSB ;Set buffer overflow status IOSUBNPAG V03-033 -14 ;TCM0003 -1 - NONPAGED I/O RELATED SUBROUTINES BROADCAST TO A TERMINAL 3-JUN-1984 11 :33:30 VAX-11 Macro V03-0l Page 45 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(28) 0720 1623 .SBTTL BROADCAST TO A TERMINAL 0720 1624 ;++ 0720 1625 IOC$BROADCAST 0720 1626 0720 1627 This routine will allow driver fork processes to broadcast a 0720 1628 given message to given terminal. The broadcast request is 0720 1629 dispatched to the proper terminal and control returns immediately 0720 1630 to the caller. Some time later the broadcast will complete, and 0720 1631 at that time all the necessary post-processing will be done. 0720 1632 0720 1633 This routine does not implement all the features of the $BRDCST system 0720 1634 service, but only the bare minimum necessary to send a message to a 0720 1635 single terminal. For more information about the terminal broadcast 0720 1636 mechanism, see the module SVSBRDCST. 0720 1637 0720 1638 Input: 0720 1639 0720 1640 Rl = Message length 0720 1641 R2 = Message address 0720 1642 R5 = Address of target terminal's UCB 0720 1643 0720 1644 Implicit input: 0720 1645 0720 1646 IPL$_ASTDEL <= CURRENT IPL <= UCB$B FIPL(R5) 0720 1647 0720 1648 Output: 0720 1649 0720 1650 None. The contents of Rl .. R5 are preserved across the cal 1. 0720 1651 0720 1652 Routine value: 0720 1653 0720 1654 SS$ NORMAL - The broadcast completed successfully. 0720 1655 SS$-INSFMEM - Insufficient dynamic nonpaged pool for the request. 0720 1656 SS$-DEVOFFLINE - The target terminal has rejected the request. 0720 1657 ss() LLIOFUNC - The specified UCB does not belong to a terminal. 0720 1658 (Therefore a BROADCAST is an illegal I/O function.) 0720 1659 ;-- 0720 1660 00000000 0720 1661 SAVED RO 0 00000004 0720 1662 SAVED-Rl 4 00000008 0720 1663 SAVED-R2 8 oooooooc 0720 1664 SAVED-R3 12 Symbolic offsets to saved registers 00000010 0720 1665 SAVED-R4 16 00000014 0720 1666 SAVED::)5 20 0720 1667 0720 1668 IOC$BROADCAST:: Broadcast to a terminal 50 OOF4 BF 3C 0720 1669 MOVZWL #SS$ ILLIOFUNC,RO Assume device not a terminal 02 El 0725 1670 BBC #DEV$V TRM,- Branch if not a terminal 56 38 A5 0727 1671 UCB$L 5EVCHAR(R5),14$ 3F BB 072A 1672 51 30 co 072C .1 PUSHR #AM<RO,Rl,R2,R3,R4,R5> ; Save RO .. RS ADDL2 #TTV$K WB LENGTH,Rl ; Calculate the total pool required 6E 0124 BF 3C 072F 1674 MOVZWL #SS$ INSFMEM,SAVED RO(SP); Assume allocation failure F8C9' 30 0734 1675 BSBW EXE$ALONONPAGED - ; Allocate the pool 44 50 E9 0737 1676 BLBC R0,13$ ; Exit if error 073A 1677 073A 1678 Fill in the Terminal Write Packet (TWP). 073A 1679 Note that EXE$ALONONPAGED the pool size IOSUBNPAG V03-033 - NONPAGED I/O RELATED SUBROUTINES BROADCAST TO A TERMINAL 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 46 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(28) 08 A2 51 BO 30 90 OA A2 06 90 OB A2 10 A2 01 DO 30 A2 9E 1C A2 04 AE Cl 1C A2 20 A2 8B'AF 9E 2C A2 24 A2 D4 52 DD 08 AE 28 OC BE 30 A2 53 6E DO 55 18 AE DO F88F' 30 50 8EDO 6E 01 3C 20 AO D5 05 13 08 14 3F BA 05 0084 SF 3C 6E F877' 30 F3 11 50 55 DO F86F' 31 073A 073A 073A 073E 0740 0742 0744 0746 074A 074D 074F 0752 0754 0756 0759 075B 075E 0760 0763 0765 0767 0767 0767 0767 0767 0767 0767 0767 0767 0767 0767 0767 0767 076A 076E 0771 0774 0777 077A 077C 077E 0780 0781 0785 0786 0789 078B 078B 018B 078B 078B 078B 0788 078B 078E 1680 in R1 and the pool address in R2. 1681 ; 1682 MOVW R1,TTY$W WB SIZE(R2) Set TWP size 1683 MOVB #DVN$C TWP,= Set TWP structure type 1684 TTV$B WB TVPE(R2) 1685 MOVB #IPL$-QUEUEAST,- Set the TWP fork IPL (for later use) 1686 TTV$B-WB FIPL(R2) 1687 MOVL #1,TTY$L-WB FR3(R2) Request refresh of read prompt 1688 MOVAB TTV$L WB-DATA(R2),- Set address of message start 1689 TTV$L-WB-NEXT(R2) 1690 ADDL3 SAVED-R1(SP),- Set address of message end 1691 1692 TTV$L-WB NEXT(R2),TTV$L-WB-END(R2) 1693 MOVAB BAEND-BROADCAST,- Set callback address 1694 1695 1696 CLRL PUSHL TTY$L-WB RETADDR(R2) TTV$L-WB-IRP ( R2) R2 - - Clear pointer to associated IRP Save TWP address 1697 1698 MOVC3 4+SAVED R1(SP),~4+SAVED R2(SP),- Copy ~he message text to the TWP (note the stack depth changed) 1699 TTV$L_WB=DATA(R2) 1700 1701 Queue the broadcast request to the terminal. 1702 The disposition of the broadcast request will be determined 1703 by the contents of TTV$L WB END. Note that if the request is 1704 accepted by a remote terminal, or is rejected outright, the 1705 TWP is no longer needed, and may be deallocated. The TTV$L WB END 1706 field of the TWP will contain one of the following values: - 1707 1708 System address: request accepted by TTDRIVER 1709 1: request accepted by RTTDRIVER 1710 2: request rejected 1711 1712 MOVL (SP) ,R3 Put TWP address in R3 1713 MOVL 4+SAVED R5(SP),R5 Restore UCB address 1714 BSBW EXE$ALTQUEPKT Queue the request to the terminal 1715 POPL RO Remove TWP address from the stack 1716 MOVZWL #SS$ NORMAL,SAVED RO(SP); Assume success 1717 TSTL TTY$L WB END(RO) Check for rejection 1718 BEQL 69$ - Branch if request rejected 1719 BGTR 80$ Branch if remote terminal accepted 1720 13$: POPR #AM<RO,R1,R2,R3,R4,R5> Restore the registers 1721 14$: RSB Return 1722 69$: MOVZWL #SS$ DEVOFFLINE,- Set broadcast rejection status 1723 SAVED RO(SP) 1724 80$: BSBW COM$DRVDEALMEM Deallocate the TWP 1725 BRB 13$ Take common exit path 1726 1727 1728 The fol lowing code performs all of the necessary broadcast post-processing. 1729 This entry point is FORKed to at IPL IPL$ QUEUEAST from the terminal driver~ 1730 The fork block is the TWP. - 1731 1732 END BROADCAST: Post-processor for broadcast requests 1733 MOVL R5,RO Copy TWP address 1734 BRW EXE$DEANONPAGED Deal locate the TWP and return IOSUBNPAG V03-033 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ; ACG0·399 ;ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ;ACG0399 - NONPAGED I/0 RELATED SUBROUTINES SCAN THE I/0 DATA BASE 3-JUN-1984 11 :33:30 VAX-11 Macro V03-0l Page 47 12-MAR-1982 17:12:23 DISK$VMSMASTER: [SVS.SRC]IOSUBNPAG(29) 50 01 5B 2C 5A 07 5A 30 AA 01 6B QA 5B 6B 5A 04 AB F3 5B 34 AB 5B 68 5B 00000000'8F QA 50 00000000'9F 58 54 AB 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 0791 DO 0791 D5 0794 13 0796 05 0798 13 079A DO 079C 13 07AO 05 07A2 07A3 05 07A3 13 07A5 DO 07A7 DO 07AA 13 07AE 05 0780 07B1 DO 07B1 DO 07B5 Dl 0788 07BA 12 07BF 07 07C1 05 07C3 07C4 DO 07C4 07CA 05 07CB . 2 .SBTTL SCAN THE I/O DATA BASE . 3 ;+ .4 .5 ; ; IOC$SCAN- IODB - Scan the I/O data base and return next block. . 6 ; This routine is cal led to scan the device lists in the IO data base and .7 ; return a pointer to the next block in the list. Context is kept in R11 . 8 ; and by using back pointers . .9 ; . 10 ; Inputs: .11 ; . 12 ; The I/O data base is locked for read access. This means that the caller . 13 ; owns the I/O data base mutex and/or is at IPL SYNCH or higher. .14 ; .15 ; Rl 1 = 0 implies fir-st call . 16 ; Rl 1 <> 0 indicates that R11 is pointer to current DOB . 17 ; RlO = 0 implies end of UCB chain . 18 ; R10 <> 0 indicates that R10 is pointer to current UCB . 19 ; .20 ; Outputs: . 21 ; . 22 ; RO = Success status . .23 ; R10 = Pointer to UCB .24 ; R11 = Pointer to DOB .25 ; .26 ; A11 other registers preserved. .27 .28 .29 .30 IOC$SCAN IODB:: .31 .32 MOVL #1 ,RO ; Success .33 TSTL R 11 ; Initial condition? .34 BEQL 50$ ; Yes .35 TSTL RlO ; End of chain? .36 BEQL 10$ ; Yes .37 MOVL UCB$L_LINK(R10),R10 ; Get next UCB .38 BEQL 10$ : None .39 RSB .40 .41 10$: TSTL DDB$L LINK(Rl 1) ; At end of DOB chain? .42 BEQL 30$ ; Yes .43 MOVL DDB$L LINK(R11),R11 ; No, get next one .44 20$: MOVL DDB$L-UCB(R11),R10 ; Pick up first UCB .45 BEQL 10$ ; None, get next DOB .46 RSB .47 .48 30$: MOVL DDB$L SB(R11),Rll ; Get back to parent system block .49 40$: MOVL SB$L FLINK(R11),R11 ; Get next system block .50 CMPL R11 ,#SCS$GQ CONFIG ; End of chain? .51 .52 .53 .54 .55 50$: BNEQ DECL RSB MOVL 60$ RO @#SCS$GQ_CONFIG,R11 : No ; Pick up first system block .56 60$: TSTL SB$L DDB(Rl 1) ; Is there a DOB chain? IOSUBNPAG V03-033 ACG0399 ACG0399 ACG0399 ACG0399 - NONPAGED I/O RELATED SUBROUTINES SCAN THE I/O DATA BASE 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 48 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(29) E5 13 07CE .57 5B 54 AB DO 0700 .58 04 11 0704 .59 0706 .60 BEQL MOVL BRB 40$ SB$L DDB(R11),R11 20$ - ; No, go try next SB ; Yes, get the first DOB IOSUBNPAG V03-033 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 1ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACC.0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ACG0399 ACG0,399 ACG0399 50 01 SB 41 SA lC SB 28 AA 07 5A 30 AA 09 5A 00A4 CA 08 5A 40 AB 01 68 QA SB 68 SA 04 AB EC - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11: 33: 30 VAX-11 Macro V03-0l Page 49 SCAN THE I/O DATA BASE BOTH PRIMARY & SE 12-MAR-1982 17: 12: 23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(30) 0706 .62 .SBTTL SCAN THE I/O DATA BASE BOTH PRIMARY & SECONDARY PATHS 0706 .63 ;++ 0706 .64 ; IOC$SCAN_IODB_2P 0706 .65 ; 0706 .66 ; This routine is called to scan the device lists in the IO data base and 0706 .67 ; return a pointer to the next block in the 1 is t. Context is kept in R10 0706 . 68 ; and Rl 1 and by using back pointers . 0706 .69 ; 0706 .70 ; SCAN IODB 2P differs from SCAN IODB in that it wi 11 scan both the primary 0706 .71 ; and secondary UCB chain for each DOB. This means that if a device is 0706 .72 ; dual-pathed, SCAN IODB 2P will return the address of its UCB twice, once in 0706 .73 ; the context of the primary controller and once in the context of the 0706 .74 ; secondary. 0706 0706 0706 .75 ; . .76 ; Inputs and Outputs are identical to IOC$SCAN_IODB. .77 0706 . 78 0706 .79 IOC$SCAN_IODB_2P:: 0706 .80 DO 0706 .81 MOVL #1 ,RO ; Success DS 0709 .82 TSTL R 11 ; Initial condition? 13 07DB .83 BEQL 60$ ; Yes 05 0700 .84 TSTL RlO ; Caller signal led end of chain? 13 07DF .85 BEQL 30$ ; Yes, done with this DOB 07E1 .86 ; 07E1 .87 ; At this point we must decide if we're fol lowing the primary or secondary 07El .88 : chain of UCBs on this DOB. 07E1 .89 01 07E1 .90 CMPL UCB$L_DDB(R10),R11 ; Are we traversing the primary chain? 12 07ES .91 BNEQ 10$ ; Branch if we're following secondary DO 07E7 .92 MOVL UCB$L_LINK(R10),R10 ; Get next UCB on primary chain 13 07EB .93 BEQL 20$ ; Branch if none to try secondary chain 05 07EO .94 RSB ; Else return UCB address to caller 07EE .95 ; 07EE .96 ; Get next UCB on secondary chain. 07EE DO 07EE .97 .98 1' 0$: MOVL UCB$L_DP_LINK(R10),R10 ; Get next UCB on secondary chain 13 07F3 .99 BEQL 30$ ; Branch if none left 05 07F5 . 100 RSB ; Else return UCB address to caller 07F6 . 101 ; 07F6 . 102 ; No UCBs left on primary chain; traverse secondary chain if present. 07F6 . 103 ; DO 07F6 . 104 20$: MOVL DDB$L_DP_UCB(R11),R10 Get first UCB on secondary chain 13 07FA . 105 BEQL 30$ Branch if none to try next DOB 05 07FC .106 RSB Else return UCB address to caller 07FD . 107 ; 07FD . 108 ; Step to next DOB. ,,, 05 13 07FD 07FD 07FF ·.109 ..110 3' 0$: TSTL BEQL DDB$L_LI NK ( R1 1) 40$ At end of DOB chain? Yes, try next system block DO 0801 . , 12 MOVL DDB$L LINK(R11),R11 No, get next one DO 0804 .113 35$: MOVL DDB$L=UCB(R11),R10 Pick up first UCB on primary chain 13 0808 . 114 BEQL 20$ None, try for UCB on secondary chain 05 080A . 115 RSB Else return UCB address to caller 0808 .116 0808 . 117 0808 . l 18 ; Step to next system block . IOSUBNPAG V03-033 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 - NONPAGED I/0 RELATED SUBROUTINES 3-JUN-1984 11: 33: 30 VAX-11 Macro V03-0l Page 50 SCAN THE I/O DATA BASE BOTH PRIMARY & SE 12-MAR-1982 17: 12: 23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(30) 5B 34 AB 5B 6B 5B 00000000'8F OA 50 00000000'9F 58 54 AB E5 58 54 AB 04 080B . 119 , DO 080B . 120 40$: DO 080F . 121 50$: 01 0812 . 122 0814 12 0819 . 123 07 0816 .124 05 0810 .125 081E . 126 DO 081E .127 60$: 0824 05 0825 . 128 70$: 13 0828 .129 DO 082A . 130 11 082E . 131 MOVL MOVL CMPL BNEQ DECL RSB MOVL TSTL BEQL MOVL BRB OOB$L SB ( R 1 1 ) , R 1 1 SB$L FLINK(R11),R11 R11,#SCS$GQ_CONFIG 70$ RO @#SCS$GQ_CONFIG,R11 SB$L_OOB(R11) 50$ SB$L_OOB(R11),R11 35$ ; Get back to parent system block ; Get next system block : End of chain? ; No ; Signal end of IO scan ; Pick up first system block Is there a DOB chain? No, go try next SB Yes, get the first DOB Try for UCB on primary chain IOSUBNPAG V03-033 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACCi0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 . ; ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11 :33:30 VAX-11 Macro V03-0l Page 51 IOC$CTRLINIT - Call driver controller in 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(31) 55 2C AB 05 54 65 05 54 51 lB 56 14 A5 15 OE A6 01 OF 56 66 50 54 OOOOOOOO'GF OE 50 0830 . 133 .SBTTL IOC$CTRLINIT - Cal 1 driver cont~oller init. routine 0830 . 134 ;++ 0830 . 135 FUNCTIONAL DESCRIPTION: 0830 . 136 0830 . 137 For UNIBUS devices, the device CSR is tested for existance. If this 0830 . 138 test fails, a no routine call occurs and failure status is returned in 0830 . 139 RO. Input values for a device driver's controller initialization 0830 . 140 routine are loaded into the proper registers, the routine starting 0830 . 141 address is located, and if a routine exists, it is cal led . 0830 . 142 0830 . 143 INPUTS: 0830 . 144 Rl CSR address to use if IDB contains zero 0830 . 145 RS CRB address (primary) 0830 . 146 Rl 1 DOB address 0830 . 147 0830 . 148 OUTPUTS: 0830 . 149 RO Status (success, or failure==> UNIBUS CSR non-existant) 0830 . 150 Rl-R6 Destroyed 0830 . 151 0830 . 152 0830 . 153 ;++ 0830 . 154 Controller initialization routine parameters: 0830 . 155 0830 . 156 INPUTS: 0830 . 157 R4 CSR address (for UNIBUS and MASSBUS devices) 0830 . 158 SCSSYSTEMID address (for class drivers during SYSGEN driver 0830 . 159 loading) 0830 . 160 zero for al 1 others, including class drivers during power 0830 . 161 failure recovery 0830 . 162 R5 IDB address (or zero if none exists) 0830 . 163 R6 DDB address 0830 . 164 RB CRB address 0830 . 165 0830 . 166 OUTPUTS: 0830 . 167 Must preserve all registers except RO through R4. 0830 . 168 0830 . 169 0830 . 170 0830 . 171 0830 . 172 IOC$CTRLINIT:: 0830 . 173 DO 0830 . 174 MOVL CRB$L_INTD+VEC$L_IDB(R8), RS Get IDB address. 18 0834 . 175 BGEQ 10$ Branch if none. DO 0836 . 176 MOVL IDB$L CSR(R5), R4 Get CSR address. 19 0839 .177 BLSS 20$ Branch if really a CSR. DO 083B . 178 10$: MOVL R1, R4 Else, use supplied value, 11 083E . 179 BRB 40$ and skip CSR testing. 0840 . 180 DO 0840 . 181 20$: MOVL IDB$L_ADP(R5), R6 Get ADP address. 18 0844 . 182 BGEQ 40$ If none, skip CSR test. Bl 0846 . 183 CMPW #AT$_UBA, ADP$W ADPTYPE(R6) Is this a UBA? 12 084A . 184 BNEQ 40$ If not a UBA, skip CSR test. DO 084C . 185 MOVL ADP$L CSR(R6), R6 Get adapter config reg addr. DO 084F . 186 MOVL R4, RO Setup CSR for test. 16 0852 . 187 JSB GAEXE$TEST CSR Test UNIBUS CSR. E9 0858 . 188 BLBC RO, 90$ Branch if no CSR present. 085B . 189 IOSUBNPAG V03-033 ;ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 ACG0399 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 52 IOC$CTRLINIT - Call driver controller in 12-MAR-1982 17: 12: 23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(31) 50 30 AB 05 56 5B 60 50 01 DO 0858 . 190 40$: 18 085F . 191 DO 0861 . 192 16 0864 . 193 0866 . 194 DO 0866 . 195 80$: 05 0869 . 196 90$: MOVL BGEQ MOVL JSB MOVL RSB CRB$L_INTD+VEC$L_INITIAL(R8), RO ; Get ctrl in it rout addr:. 80$ ; Branch if none. Rl 1, R6 ; Get DOB address. (RO) : Ca 11 ctrl i nit routine. #1, RO ; Set success status . : Return w/ status . IOSUBNPAG V03-033 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ACG0399 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;R-OW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0221 - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 53 IOC$UNITINIT - Call driver unit init. ro 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SVS.SRC]IOSUBNPAG(32) 086A . 198 .SBTTL IOC$UNITINIT - Cal 1 driver unit init. routine 086A . 199 ;++ 086A .200 FUNCTIONAL DESCRIPTION: 086A .201 086A .202 Input values for a device driver's unit initialization routine are 086A .203 loaded into the proper registers, the routine starting address is 086A .204 located, and if a routine exists, it is cal led. 086A .205 086A .206 INPUTS: 086A .207 R5 UCB address 086A .208 RB CRB address (primary) 086A .209 086A .210 OUTPUTS: 086A . 211 RO-R4 Destroyed 086A . 212 086A .213 NOTES: 086A .214 086A .215 There are two unit initialization routine addresses in the I/O data 086A .216 base; CRB$L INTO VEC$L UNITINIT and DDT$L UNITINIT. Normally,.only 086A .217 one of these two-places should contain a unit initialization routine 086A .218 address. However, for the console block storage device, the both 086A .219 locations contain an address, and the DDT contains the address which 086A . 220 must be used. 086A . 221 086A .222 In this case, the CRB is shared by the console terminal and console 086A .223 block storage devices. The CRB contains the address of the unit 086A .224 initialization routine for the console terminal, and the console 086A .225 terminal DDT contains no unit initialization routine address. Thus 086A .226 the console terminal device "fits" the "normal" case. However, the 086A .227 console block storage device DDT contains a unit initialization 086A .228 routine which differs from the console terminal unit initialization 086A .229 routine and whose address is stored in the DDT. 086A .230 086A . 231 Since the CRB is shared and contains the wrong unit initialization 086A .232 routine address for the console block storage device, the DDT must be 086A .233 inspected first. Initialization for the console terminal wil 1 be 086A .234 ; accomplished correctly regardless of which address is checked first. 086A .235 086A .236 086A .237 086A .238 ;++ 086A .239 Unit initialization routine parameters: 086A .240 086A .241 INPUTS: 086A .242 R3 CSR address (primary) 086A .243 R4 CSR address (secondary, same as primary if no secondary exists) 086A .244 R_5 UCB address 086A -. 245 086A .246 OUTPUTS: 086A .247 Must preserve all registers except RO through R4. 086A .248 086A .249 086A .250 086A .251 086A .252 IOC$UNITINIT:: 086A .253 50 0088 C5 DO 086A .254 MOVL UC8$L_DDT(R5), RO Get DDT address. IOSUBNPAG V03-033 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0221 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0203 ;ROW0221 ;ROW0221 ;ROW0221 - NONPAGED I/0 RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-0l Page 54 IOC$UNITINIT - Cal 1 driver unit in it. ro 12-MAR-1982 17: 12: 23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(32) 50 18 AO 50 000005D9'8F 06 50 3C AS 1A 54 53 2C AS 10 53 63 54 53 51 20 AB 04 54 2C Bl 60 DO 086F .255 Dl 0873 .256 0875 12 087A .257 DO 087C .258 18 0880 .259 0882 .260 D4 0882 .261 10$: DO 0884 .262 18 0888 .263 DO OBBA . 264 DO 088D . 265 DO 0890 . 266 18 0894 .267 0896 .268 DO 0896 .269 089A .270 17 089A . 271 50$: 089C .272 089C .273 05 089C .274 90$: 089D .275 MOVL CMPL DDT$L UNITINIT(RO), RO RO, #IOC$RETURN ; Get DDT unit init rout addr. : Null unit init routine? BNEQ MOVL BGEQ 10$ ; Branch if real unit in it rout. CRB$L_INTD+VEC$L_UNITINIT(R8), RO ; Get CRB unit init rout addr. 90$ : Branch if no unit i nit rout. CLRL MOVL BGEQ MOVL MOVL MOVL BGEQ ASSUME MOVL R4 CRB$L_INTD+VEC$L_IDB(R8), R3 50$ IDB$L CSR ( R3), R3 R3, R4 CRB$L_LI NK ( R8) , Rl 50$ IDB$L CSR EQ 0 @CRB$L_INTD+VEC$L_IDB(R1), R4 ; Assume no IDB exists. ; Get IDB address. ; Branch if none. ; Get primary CSR . ; Assume no sec. CRB exists . ; Get secondary CRB addr . : Branch if none. ; Get secondary CSR addr. JMP (RO) ; Ca 11 unit i nit routine, and ; return to caller. RSB ; No unit in it routine to cal 1: : return to caller. IOSUBNPAG V03-033 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG.0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ACG0414 ACG0414 ACG0414 - NONPAGED I/O RELATED SUBROUTINES Parse Device Name String 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 55 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(33) 0070 BF 58 28 54 58 56 59 01 69 58 24 03 56 51 52 50 65 11 50 06 50 20 5A SF 50 77 41 BF 50 37 6F 089D 0890 0890 0890 0890 0890 0890 089D 089D 089D 0890 089D 0890 0890 0890 089D 089D 089D 089D 0890 0890 0890 0890 0890 0890 0890 OB9D 0890 0890 0890 OB9D 0890 0890 0890 0890 BB 0890 05 08A1 13 08A3 7D 08A5 C3 08A8 08AC 08AC 3A 08AC 13 0880 DO 08B2 7C 08B5 9A 08B7 E 1 08BA BA OBBE 91 08C1 lA 08C5 91 08C7 1E 08CB 11 OSCO 08CF 08CF 08CF . 277 .SBTTL Parse Device Name String .278 .279 ;+ .280 .281 IOC$PARSDEVNAM - parse device name string .282 .283 This routine parses a device name string, checking syntax and .284 extracting node name, allocation class number, and unit number. .285 If device type format is specified, it is converted into the internal .286 compressed format. .287 .288 INPUTS: .289 .290 .291 .292 RB = size of name string R9 = address of name string RlO = flags .293 .294 OUTPUTS: .295 .296 RO= SS$ NORMAL - valid name string .297 .298 .299 SS$-IVDEVNAM - invalid device name string R2 = unit number R3 = length of SCS node name at head of name string .300 or al location class number .301 .302 or device type code RB = size of name string .303 .304 = R9 = address of name string R10 flags .305 R4 - R7, R11 preserved .306 .307 .308 .309 .ENABLE LSB . 310 . 311 I OC$PARSOEVNAM: : . 312 PUSHR #AM<R4,R5,R6> save working registers . 313 TSTL RB check name string length .314 BEQL 30$ branch if null - error .315 MOVQ R8,R4 copy name string descriptor .316 SUBL3 #1,R9,R6 default is no node no allocation . 317 class, set pointer before beginning .318 of the string .319 LOCC #AA'$' ,R8, (R9) scan name for a "$" .320 BEQL 10$ failed to find one - no nodename .321 MOVL R1, R6 found it, save pointer .322 10$: CLRQ R2 init unit number and node name .323 20$: MOVZBL (R5) ,RO get next character .324 BBC #6,R0,40$ br if code O-AX3F - numeric or $ .325 BICB #/\X20,RO col lapse lower case to upper case .326 CMPB RO,#AA'Z' possible alphabetic? .327 BGTRU 150$ br if not .32B CMPB RO,#AA'A' possible alphabetic? .329 BGEQU 70$ branch if OK - store it .330 30$: BRB 150$ no - error .331 .332 Non alphabetic - may be numeric or "$" .333 IOSUBNPAG V03-033 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 _; ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0~14 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 - NONPAGED I/O RELATED SUBROUTINES Parse Device Name String 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 56 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(33) 56 55 OE 34 39 50 63 30 50 24 5C 53 55 59 1 c 55 54 6A 53 52 49 5A 04 50 24 43 58 54 54 B5 3A 85 50 AD 54 58 54 2F 56 55 56 09 25 5A 21 5A 06 OD 52 54 OB 5A 01 2E 54 54 OE 37 5A 01 50 01 0070 BF D1 08CF .334 40$: CMPL R5,R6 hit the "$" yet? 13 0802 .335 BEQL 50$ yes, deal with it 1A 08D4 .336 BGTRU 80$ past it, digits are unit number 91 0806 .337 CMPB R0,#AA'9 legal? lA 08D9 .338 BGTRU 150$ no, error 91 08DB .339 CMPB RQ,#AA'O' legal? 1 E OBOE .340 BGEQU 70$ yes, accept. it as alpha 11 08EO .341 BRB 150$ no, error 08E2 .342 08E2 .343 $in device name - either node name or allocation class. 08E2 .344 C3 08E2 .345 50$: SUBL3 R9,R5,R3 compute length of node name 12 08E6 .346 BNEQ 70$ branch if non-null - process the$ 08E8 .347 08E8 .348 Process allocation class number. 08E8 .349 ; 06 08E8 .350 60$: INCL R5 move over"$" to allocation 07 OBEA .351 DECL R4 class digits. 10 08EC .352 BSBB GETNUMBER convert allocation class. DO 08EE . 353 MOVL R2,R3 store requested allocation class . 15 08F1 .354 BLEQ 150$ leq zero is not legal. 88 08F3 .355 BISS #IOC$M CLASS, R 10 set allocation class flag 91 08F6 .356 CMPB #/\A'$'-:-Ro was terminator a "$"? 12 08F9 .357 BNEQ 150$ if not, i nva 1 id device name. 70 08FB .358 MOVQ R4,R8 reset device name - unit size. 05 08FE .359 TSTL R4 check remaining string count 14 0900 .360 BGTR 20$ if characters remain, process them. 11 0902 .361 BRB 150$ else, invalid device name. 0904 .362 90 0904 .363 70$: MOVB RO,(R5)+ store potentially upcased character F5 0907 .364 SOBGTR R4,20$ any more characters to scan? 090A .365 090A .366 End of alpha scan. Make sure we actually got a non-null device name. 090A .367 ; C2 090A .368 80$: SUBL R4,R8 subtract unit number from string 13 0900 .369 BEQL 150$ if eql no device name specified 06 090F .370 INCL R6 point past $ in node name 01 0911 .371 CMPL R6,R5 see if we've processed any more chars 1F 0914 .372 BLSSU 90$ branch if yes ES 0916 .373 BLBS Rl0, 150$ branch if physical - not valid El 0919 .374 BBC #IOC$V ANV,Rl0,150$ or if not generic search for any 11 0910 .375 BRB 100$ - node name only - verify end of string 091F .376 091F .377 Process unit number and make sure there's no trailing junk. 091F .378 04 091F .379 90$: CLRL R2 init unit number to 0 D5 0921 .380 TSTL R4 see if there's anything left 15 0923 .381 BLEQ 110$ branch if not 88 0925 .382 BISB #IOC$M PHY, R10 set physical flag 10 0928 .383 BSBB GETNUMBER convert unit number 06 092A .384 INCL R4 return terminator to string count 05 092C .385 100$: TSTL R4 reached end of string? 14 092E .386 BGTR 150$ branch if not - error EO 0930 .387 110$: BBS #IOC$V TYPE,R10, 190$ branch if name is a device type DO 0934 .388 120$: MOVL #SS$ NORMAL,RO successful parse BA 0937 .389 130$: POPR #AM<R4,R5,R6> restore registers 05 0936 .390 RSB and return IOSUBNPAG V03-033 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG.0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG04l-4 - NONPAGED I/O RELATED SUBROUTINES Parse Device Name String 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 57 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC)IOSUBNPAG(33) BE 50 0144 BF F2 50 85 50 30 10 09 50 OB 52 OA 52 50 EA 54 04 50 FF AS 52 OOOOBOOO SF 02 53 CF 50 55 59 50 58 02 50 C3 55 59 02 58 BB 85 40 8F 50 093C .391 093C .392 Invalid device name D'S 093C 093C .393 .394 1' 40$: TSTL (SP)+ pop GETNUMBER return address from stack 3C 093E .395 1SO$: MOVZWL #SS$ IVDEVNAM,RO set invalid device name 11 0943 .396 BRB 130$- 0945 .397 0945 .398 ;+ 0945 .399 Routine to convert ASCII to integer 0945 .400 0945 .401 Inputs: 0945 .402 0945 .403 R2 assumed zero 0945 .404 R4 size of string 0945 .405 RS starting address of string 0945 .406 0945 .407 Outputs: 0945 .40B 0945 .409 RO terminator character 0945 .410 R2 converted number 0945 .411 R4 size of string-with number and terminator character removed 0945 .412 RS address of first character after number terminator character 0945 .413 ' 0945 .414 9A 0945 .415 160$: MOVZBL (R5)+,RO get next character. 82 0948 .416 SUBB #/\A'O' ,RO base it at decimal digits. 1F 0948 .417 BLSSU 170$ branch if not a decimal digit. 91 0940 .418 CMPB R0,#9 is it a digit? 1A 0950 .419 BGTRU 170$ branch if not a decimal digit. C4 0952 .420 co 0955 .421 MULL ADDL #10,R2 RO,R2 scale current unit number by 10 add new digit to accumulation. 0958 .422 GETNUMBER: F4 0958 .423 SOBGEQ R4, 160$ count off a character 11 0958 .424 BRB 180$ branch if no more characters 0950 .425 9A 095D .426 170$: MOVZBL -1(R5),RO restore terminator character. D1 0961 .427 180$: CMPL R2,#32768 check number value 0963 lE 096B .428 BGEQU 140$ branch if not valid 05 096A .429 RSB return to caller. 0968 .430 0968 .431 0968 .432 Parse device type name. We do this last because all the regular device 0968 .433 name validation is necessary anyway. Now we just have to do the 0968 .434 additional checks and pack the characters. 0968 .43S ; 05 0968 .436 190$: TSTL R3 check if we saw node or alloc class 12 0960 .437 C3 096F .438 BNEQ 1SO$ SUBL3 R9,R5,RO branch if so - not valid compute total length of string C2 0973 .439 01 0976 .440 SUBL CMPL RB,RO R0,#2 compute length of unit number string must be two digits 12 0979 .441 BNEQ 150$ , branch if not - not valid DO 0978 .442 MOVL R9,R5 copy name address again D1 097E .443 CMPL R8,#2 check minimum name length lF 0981 .444 BLSSU 1S0$ too short - out 83 0983 .445 SUBB3 #AA'A'-1,(RS)+,RO get char and convert to compressed 0987 IOSUBNPAG V03-033 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ACG0414 ACG0414 ACG0414 - NONPAGED I/O RELATED SUBROUTINES Parse Device Name String 3-JUN-19S4 11:33:30 VAX-11 Macro V03-01 Page 58 12-MAR-19S2 17: 12: 23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(33) 05 11 50 53 S5 40 SF 50 05 DC 50 53 03 58 A2 OA 85 40 SF 50 05 07 50 53 53 52 SA 01 FF83 FO 09SS .446 098C S3 09SD .447 0991 FO 0992 .448 0996 01 0997 .449 lA 099A .450 lF 099C .451 83 099E .452 09A2 FO 09A3 .453 09A7 co 09A8 .454 200$: SA 09AB .455 31 09AE .456 INSV SUBB3 INSV CMPL BGTRU BLSSU SUBB3 INSV ADDL BICB BRW R0,#17,#5,R3 #AA'A'-1,(R5)+,RO R0,#12,#5,R3 R8,#3 150$ 200$ #AA'A'-1,(R5)+,RO R0,#7,#5,R3 R2,R3 #IOC$M_PHY, R10 120$ ; store compressed code ; get char and convert to compressed ; store compressed code ; check how many chars left ; string was longer than 5 - error ; short - don't take 3rd alpha ; get char and convert to compressed ; store compressed code add in unit number clear physical flag done IOSUBNPAG V03-033 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 - NONPAGED I/O RELATED SUBROUTINES Search I/O Database for Device 3-JUN-1984 11 :33:30 VAX-11 Macro V03-0l Page 59 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SVS.SRC]IOSUBNPAG(34) 00000000 00000004 00000008 oooooooc 00000010 09B1 09B1 09B1 0981 0981 09B1 0981 09Bl 0981 09B1 0981 0981 09B1 0981 0981 09B1 09B1 0981 09B1 09B1 09B1 09Bl 0981 0981 0981 09B1 0981 0981 09B1 0981 0981 0981 0981 0981 0981 0981 0981 09B1 0981 09Bl 09Bl 0981 09B1 09B1 0981 0981 0981 09B1 0981 09B1 09Bl 09B1 09B1 0981 09B1 0981 0981 .458 .SBTTL Search I/0 Database for Device .459 .460 ;+ .461 .462 IOC$SEARCHINT - internal I/O database search .463 .464 This routine searches the I/O database for the specified devic~. using .465 the specified search rules. Depending on the search, a lock may or may .466 not be taken out on the device when it is found. .467 .468 Note! While this routine is non-paged and therefore may be cal led at .469 elevated IPL, the device locking code it calls is not. Therefore, only .470 searches with IOC$V ANY may be cal led from elevated IPL. .471 .472 INPUTS: .473 .474 R2 unit number .475 R3 length of SCS node name at head of name string .476 or al location class number .477 or device type code .478 .479 RB = size of name string R9 = address of name string .480 .481 R10 = flags = R11 address to store lock value block .482 I/O database mutex held, IPL 2 .483 .484 OUTPUTS: .485 .486 RO SS$ NORMAL - device found .487 SS$-NOSUCHDEV - device not found .488 SS$-NODEVAVL - device exists but not available according to rules .489 SS$-DEVALLOC - device al located to other user .490 SS$-NOPRIV - failed device protection .491 SS$-TEMPLATEDEV - can't al locate template device .492 SS$-DEVMOUNT - device already mounted .493 .494 .495 .496 R5 = SS$-DEVOFFLINE UCB- - device marked offline R6 = DOB R7 = system block .497 RlO - R4, RB - R11 preserved .498 .499 Note: If failure, R5 - R7 point to the last structures looked at. .500 .501 .502 .503 .504 Stack use: .505 .506 SAVR2 0 .507 SAVR3 4 .508 SAVR4 B .509 SAVR8 12 .510 SAVR9 16 . 511 . 512 .513 .ENABLE LSB .514 IOSUBNPAG V03-033 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ACG0414 ACG0414 ACG0414 ACG0414 ACG0414 ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 - NONPAGED I/O RELATED SUBROUTINES Search I/O Database for Device 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 60 12-MAR-19B2 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(34) 031C BF OOOOOOOO'EF 57 50 67 50 00000000'8F 7B 57 50 56 54 A7 55 56 5A 06 27 5B OC AE 53 04 AE 10 44 A7 53 05 45 A7 53 69 CE 50 01 04 AE 01 53 59 53 5B 53 52 50 66 5A 56 50 55 04 A6 5A 20 5E 5A 01 07 5A 02 3C A6 04 AE E2 69 58 15 A6 DB 50 14 A6 50 5B 43 50 50 58 CB 39 5A 09B1 . 515 IOC$SEARCHINT:: BB 09B1 . 516 PUSHR #AM<R2,R3,R4,R8,R9> save registers 09B5 .517 09B5 . 518 Search the system blocks for a suitable node. If we are doing a search 09B5 .519 by allocation class, generic device type, or no node name is given, 09B5 . 520 al 1 system blocks qualify . 09B5 .521 DE 09B5 .522 MOVAL SCS$GQ_CONFIG,R7 get head of SCS SB list 09BB DO 09BC .523 10$: 01 09BF .524 MOVL CMPL SB$L FLINK(R7),RO RO,#SCS$GQ_CONFIG get next system block are we back at list head? 09C1 13 09C6 .525 BEQL 50$ branch if yes - all done 09C8 .526 DO 09C8 .527 MOVL RO,R7 DE 09CB .528 MOVAL SB$L DDB-DDB$L LINK(R7),R6 ; pick up DOB listhead DO 09CF .529 MOVL R6,R5 ; make sure UCB is non-zero 0902 .530 ; if allocation class or generic dev, 93 0902 .531 BITB #IOC$M CLASS!IOC$M TYPE,R10 12 0905 .532 BNEQ 30$ - - ; check every system block 70 0907 .533 MOVQ SAVRB(SP),R8 ; get orig dev name descriptor DO 09DB .534 MOVL SAVR3(SP),R3 ; get node name length 13 09DF .535 BEQL 30$ ; branch if none - go ahead 91 09E 1 .536 CMPB R3,SB$T NODENAME(R7) ; check node name length 12 09E5 .537 BNEQ 10$ - ; branch if not 29 09E7 .53B CMPC3 R3,SB$T NODENAME+1(R7),(R9) ; node names match? 09EB 12 09EC .539 BNEQ 10$ ; branch if not 09EE .540 09EE .541 ; Found a suitable system block. Search its DDB list. 09EE .542 ; 3C 09EE .543 20$: MOVZWL #SS$ NORMAL,RO Cl 09F 1 .544 ADDL3 #1,SAVR3(SP),R3 ; include the"$" 09F5 CO 09F6 .545 ADDL R3,R9 skip over the nodename C2 09F9 .546 SUBL R3,R8 adjust the length 15 09FC .547 BLEQ 60$ if no device name, just return SB 09FE .548 DO 09FE .549 30$: 13 OAOl .550 MOVL BEQL DDB$L LINK(R6),RO 80$ - get address of next DOB if eql end of list DO OA03 .551 MOVL RO,R6 DE 0A06 .552 MOVAL <DDB$L UCB-UCB$L LINK>(R6),R5 ; initialize primary UCB address BA OAOA .553 BICB #IOC$M-2P,R10 - ; new DOB - clear secondary flag EO OAOD .554 BBS #IOC$V-TYPE,Rl0,100$ ; branch if generic type search El OA 11 .555 BBC #IOC$V-CLASS,Rl0,40$ ; branch if no class to check Dl 0A15 .556 CMPL SAVR3(SP),DDB$L ALLOCLS(R6) ; else, is al lo. class right? 12 OAlA .557 BNEQ 30$ - ; branch if not, try next DOB 29 0A1C .558 40$: CMPC3 RB,(R9),DDB$T NAME+1(R6) ; check device name OA1F 12 0A21 .559 BNEQ 30$ if no match, try next DOB 9A OA23 .560 MOVZBL DDB$T NAME(R6),RO get length of name in DOB 01 OA27 .561 CMPL R8,RO check name lengths 13 OA2A .562 BEQL 100$ if they match - OK 07 OA2C .563 DECL RO try subtracting out controller letter Dl OA2E .564 CMPL RB.RO and see if this matches 12 0A31 .565 BNEQ 30$ if not, keep trying E9 0A33 .566 BLBC R10, 100$ branch if not physical search - OK IOSUBNPAG V03-033 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ; ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG04l4 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 - NONPAGED 1/0 RELATED SUBROUTINES Search I/0 Database for Device 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 61 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(34) 15 A640 41 BF 31 BE 50 0908 SF 4D SA 04 50 0980 SF 46 S6 66 5S 04 A6 3D Al SA 01 SA 06 QA SA 09 D9 04 AE D4 FF4D 52 6E OOOOOOOO'EF 54 07 SA 05 55 OOA4 C5 04 55 30 AS 11 28 07 50 E6 SA 04 E3 5A 031C BF BA SA 05 5S 9C A6 D4 91 OA36 OA3A 13 OA3C 1-1 OA3E OA40 OA40 OA40 3C OA40 El OA45 3C OA49 11 OA4E OA50 DASO 0A50 ,,DO OA50 DO OA53 OA57 OA59 OA59 OA59 EO OA59 OA5D OASD OA5D 93 OA5D 12 OA60 93 OA62 12 OA65 05 OA67 12 OA6A 31 OA6C OA6F 0A6F OA6F 7D OA6F DO OA72 0A78 OA79 El OA79 DO OA7D 11 OA82 DO OA84 13 OA88 10 OA8A EB OA8C El OA8F E9 OA93 BA OA96 05 OA9A OA9B E2 OA9B DE OA9F 0AA3 11 0AA3 OAAS OAAS .567 CMPB DDB$T_NAME+1(R6)[RO] ,#AA'A' ; is this controller A? .568 BEQL 100$ ; if so, search it .569 BRB 30$ ; if not, keep looking .570 . .571 End of search - no suitable device has been found .572 .573 50$: MOVZWL #SS$ NOSUCHDEV,RO no device found .S74 BBC #IOC$V EXISTS,Rl0,140$ branch if not seen .575 .S76 MOVZWL #SS$ NODEVAVL,RO BRB 140$- otherwise status is not available .577 .S78 To here if we're just returning a system block, with no device specified. .579 ; .S80 60$: MOVL (R6),R6 get first DOB .S81 MOVL DDB$L UCB(R6),R5 and first UCB .S82 BRB 140$ - and return .583 .584 To here when all UCB's on a DOB have been searched. .S8S .586 7' 0$: BBS #IOC$V_TVPE,R10,30$ : if generic type search, try next DOB .587 ; . .588 ; To here when all DDB's on a system block have been searched. .589 .590 80$: BITB #IOC$M CLASS!IOC$M TYPE,RlO ; if generic type or alloc class .591 BNEQ 90$ - - ; keep searching system blocks .592 BITB #IOC$M PHY!IOC$M LOCAL,RlO ; if physical or local only .593 BNEQ 50$ - - ; we're done .594 TSTL SAVR3(SP) ; if there was an explicit node .595 BNEQ 50$ ; we're done . .596 90$: .597 BRW 10$ : else go try next system block .598 ; Found a suitable DOB. Search both its UCB lists for the right UCB. .S99 ; .600 10-0$: MOVQ SAVR2(SP),R2 get unit number and device type .601 MOVL SCH$GL CURPCB,R4 get PCB address .602 NEXTUCB: .603 110$: .604 BBC MOVL #IOC$V 2P,R10,120$ UCB$L 2P LINK(R5),R5 .605 BRB 130$ - - .606 120$: MOVL UCB$l LINK(R5),R5 .607 130$: BEQL 150$ - .608 BSBB IOC$TESTUNIT .609 BLBS R0, 140$ .610 BBC #IOC$V EXISTS,Rl0,110$ .61, BLBC Rl0, 110$ .612 140$: POPR #AM<R2,R3,R4,R8,R9> .613 RSB .614 .615 150$: BBSS #IOC$V 2P,R10,70$ .616 MOVAL <DDB$L-2P UCB - .617 -UCB$L-2P-LINK>{R6),R5 .618 BRB 110$ - - .619 .620 .DISABLE LSB re-entry for next UCB branch if on primary path link to next secondary ~nit. link to next primary unit. branch if no more units. is this unit ok? branch if successful keep going if we haven't seen it yet or if not physical search restore registers and return branch if secondary path already searched initialize secondary UCB address. go search secondary path IOSUBNPAG V03-033 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 031C BF 05 5A 08 55 OOAB C5 C5 - NONPAGED I/O RELATED SUBROUTINES Continue I/O Database Search 3-JUN-1984 11:33:30 VAX-11 Macro V03-0l Page 62 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC)IOSUBNPAG(35) OAA5 .622 .SBTTL Continue I/O Database Search OAA5 .623 OAA5 .624 ;+ OAA5 .625 OAA5 .626 IOC$SEARCHCONT - internal I/O database search OAA5 .627 OAA5 .628 This routine continues a search started with a cal 1 to IOC$SEARCHINT. OAA5 .629 It uses IOC$SEARCHINT's outputs as the starting point at which to OAA5 .630 resume. OAA5 .631 OAA5 .632 INPUTS: OAA5 OAA5 OAA5 .633 .634 .635 R2 = unit number R3 = length of SCS node name at head of name string 0AA5 .636 or al location class number OAA5 .637 or device type code OAA5 .638 R5 = last UCB OAA5 OAA5 OAA5 OAA5 OAA5 .639 .640 .641 .642 .643 = R6 = last DOB R7 last system block = RB = size of name string R9 address of name string RlO = flags OAA5 .644 Rll =address to store lock value block OAA5 .645 IIO database mutex held, IPL 2 OAA5 .646 OAA5 .647 OUTPUTS: OAA5 .648 0AA5 .649 RO = SS$ NORMAL - device found OAA5 .650 SS$-NOSUCHDEV - device not found OAA5 .651 SS$-NODEVAVL - device exists but not available according to rules OAA5 .652 SS$-DEVALLOC - device allocated to other user OAA5 .653 SS$-NOPRIV - failed device protection 0AA5 .654 SS$-TEMPLATEDEV - can't allocate template device OAA5 .655 SS$-DEVMOUNT - device already mounted OAA5 .656 SS$-DEVOFFLINE - device marked offline OAA5 .657 OAA5 .658 = R5 = UCB- R6 DOB OAA5 .659 R7 = system block OAA5 .660, RlO - R4, RB - Rll preserved OAA5 .661 OAA5 .662 Note: If failure, R5 - R7 point to the last structures looked at. OAA5 .663 OAA5 .664 0AA5 .665 OAA5 .666 IOC$SEARCHCONT: : BB OAA5 .667 PUSHR #AM<R2,R3,R4,R8,R9> save registers E5 OAA9 .668 DO OAAD .669 BBCC MOVL #IOC$V ALT,Rl0,10$ UCB$L DP ALTUCB(R5),R5 check if alternate UCB in use link back to·other to continue 11 OAB2 .670 10$: BRB NEXTUCB - continue search IOSUBNPAG V03-033 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 - NONPAGED 1/0 RELATED SUBROUTINES Check UCB Against Search Rules 3-JUN-1984 11 :33:30 VAX-11 Macro V03-01 Page 63 12-MAR-1982 17:12:23 DISK$VMSMASTER: [SYS.SRC]IOSUBNPAG(36) 50 090B BF 06 5A 54 A5 52 5B 09 5A 01 00 16 53 OOBC C5 4E 5A 10 DA 3C A5 03 55 OOA8 C5 5A 0100 BF 03 5A 06 OOB5 50 006C BF 7F 38 A5 13 50 0840 BF 75 64 A5 09 5C A5 1 E OB 5A 07 OA 5A OA 11 38 A5 17 08 OAB4 .672 .SBTTL Check UCB Against Search Rules OAB4 .673 OAB4 .674 ;+ OAB4 .675 OAB4 .676 IOC$TESTUNIT - Check UCB Against Search Rules OAB4 .677 OAB4 .67B INPUTS: OAB4 .679 OAB4 .6BO OAB4 .6B1 = R2 = unit number R3 device type code OAB4 .6B2 R4 = PCB address OAB4 .6B3 OAB4 .6B4 = R5 = UCB address R10 flags OAB4 .6B5 R11= address of lock value block OAB4 .6B6 OAB4 .6B7 OUTPUTS: OAB4 .6BB OAB4 .6B9 RO= SS$ NORMAL - eligible for use according to flags OAB4 .690 SS$-NOSUCHDEV - wrong unit number OAB4 .691 SS$-DEVALLOC - device al located to other user OAB4 .692 SS$-NOPRIV - failed device protection OAB4 .693 SS$-IEMPLATEDEV - can't al locate template device OAB4 .694 SS$-DEVMOUNT - device already mounted OAB4 .695 SS$-DEVOFFLINE - device marked offline OAB4 .696 OAB4 .697 ; - OAB4 .698 OAB4 .699 IOC$TESTUNIT:: 3C OAB4 .700 MOVZWL #SS$ NOSUCHDEV,RO assume wrong device E9 OAB9 .701 BLBC R10,l0$ branch if not physical search Bl OABC .702 CMPW R2,UCB$W UNIT(R5) is the unit number exactly right? 12 OACO .703 BNEQ 80$ branch to error if not right. OAC2 .704 E1 OAC2 .705 10$: BBC #IOC$V TVPE,R10,20$ branch if not searching for dev type ED OAC6 .706 CMPZV #MSCP$V MTYP N,- OACB .707 #MSCP$V-MTVP~Dl ,- OAC9 .70B UCB$L MEDIA ID(R5),R3 ; is this the requested type? 12 OACD .709 BNEQ 80$ - ; branch if not BS OACF .710 20$: BISB #IOC$M EXISIS,RlO ; note eligible device seen E1 OAD2 . 711 BBC #DEV$V-CDP,UCB$L DEVCHAR2(R5),30$ ; is this served path to a local d DO OAD7 . 712 MOVL UCB$L DP ALTUCB(R5),R5 yes, get local path UCB address. AB OADC .713 BISW #IOC$M ALT,R10 note alternate UCB in use E1 OAE1 . 714 30$: BBC #IOC$V-ANY,R10,40$ if SEARCHALL, finish with success. 31 OAE5 .715 BRW 120$ 0AE8 .716 . OAEB . 717 OAE8 .718 Check the device reference count and al location status. 3C OAE8 .719 40$: MOVZWL #SS$ DEVMOUNT,RO ; check if device is already mounted EO OAED . 720 BBS #DEviv MNT,UCB$L DEVCHAR(R5), 130$ 3C OAF2 . 721 MOVZWL #SS$ DEVALLOC,RO EO OAF7 . 722 BBS #UCBiV MOUNTING,UCB$W STS(R5), 130$ ; branch if mount in progress B5 OAFC .723 TSTW UCB$W REFC(R5) - ; is reference count zero? 13 OAFF . 724 BEQL 90$ - ; branch it reference count is zero. E1 OBOl .725 BBC #IOC$V MOUNT,Rl0,50$ ; if mounting ... EO OB05 .726 BBS #IOC$V-ALLOC,R10,60$ ; if shared mount El OB09 .727 BBC #OEV$V-ALL,UCB$L DEVCHAR(R5),90$ ; OK if not al located 11 OBOE .728 BRB 70$ - ; otherwise check al location IOSUBNPAG V03-033 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ; ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0414 ;ACG0-414 ;ACG0414 ;ACG0414 ;ACG0414 ;AC~0414 ;ACG0414 ;ACG0414 ;ACG0414 - NONPAGED I/O RELATED SUBROUTINES Check UCB Against Search Rules 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 64 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(36) OB10 .729 5E 5A E9 OB10 .730 50$: BLBC Rl0,130$ ; allocate: error ff not phy 59 38 A5 17 El OB13 . 731 60$: BBC #OEV$V ALL,UCB$L DEVCHAR(R5),130$ ; err if dev. not allocated. 60 A4 2C A5 01 OB18 .732 70$: CMPL UCB$L PID(R5),PCB$L PID(R4) ; does this process own the device? 52 12 OB1D .733 80$: BNEQ 130$ - - ; branch to error if not our device. OB1F .734 OB1F .735 ; Check all the other miscellaneous junk that can make a device not OB1F .736 ; available. OB1F .737 50 24 3C OBlF .738 90$: MOVZWL #SS$ NOPRIV,RO ; check if device is spooled 06 38 A5 06 El OB22 .739 BBC #DEV$V SPL,UCB$L DEVCHAR(R5),100$ ; branch if not OB27 .740 IFNPRIV ALLSPOOL,130$,R4- ; else, process must have ALLSPOOL priv. 50 0084 BF 3C 0820 .741 100$: MOVZWL #SS$ DEVOFFLINE,RO ; check if device is available 3A 38 A5 12 El OB32 .742 BBC #OEV$V AVL,UCB$L DEVCHAR(R5),130$ 35 64 A5 04 El OB37 .743 BBC #UC8$V-ONLINE,UCB$W STS(R5),130$ 50 21DC SF 3C OB3C .744 MOVZWL #SS$ TEMPLATEDEV,RO- ; check if device is a template 2B 64 A5 OD EO OB41 .745 BBS #UCB$V TEMPLATE,UCB$W STS(R5),130$ F4B7' 30 OB46 .746 BSBW EXE$CHKRDACCES - ; check device protection 25 50 E9 OB49 .747 BLBC R0,130$ ; out if not accessible OB4C .748 OB4C .749 We've passed al I the local tests. Now try to take out the appropriate OB4C .750 lock on the device. 084C .751 lC 3C A5 00 El OB4C .752 BBC #DEV$V CLU,UCB$L DEVCHAR2(R5),120$ ; br. if not cluster visible 17 38 A5 17 EO 0851 .753 BBS #OEV$V-ALL,UCB$L-DEVCHAR(R5),120$ ; br. if allocated 51 5B DO 0856 .754 MOVL R11, R1 value block address 50 05 DO OB59 .755 MOVL #LCK$K EXMODE,RO assume exclusive lock 07 5A OA EO OB5C .756 BBS #IOC$V-ALLOC,R10, 110$ branch if allocation requested 03 5A 07 El OB60 .757 BBC #IOC$V-MOUNT,R10, 110$ branch if not mount mode 50 04 DO OB64 .758 MOVL #LCK$K-PWMODE,RO which uses PW F496' 30 OB67 .759 110$: BSBW IOC$LOCK DEV and try to take device lock 04 50 E9 OB6A .760 BLBC RO, 130$ 50 01 DO OB6D .761 120$: MOVL #SS$ NORMAL,RO indicate success 05 OB70 .762 RSB OB71 .763 OB71 .764 To here on any error. OB71 .765 ; 05 5A 08 E5 OB71 .766 130$: BBCC #!OC$V ALT,Rl0,140$ check if alternate UCB in use 55 OOA8 C5 DO OB75 .767 MOVL UCB$L DP ALTUCB(R5),R5 link back to other to continue 05 OB7A .768 140$: RSB return OB78 .769 OB78 .770 OB7B . 771 OB7B 1735 .END IOSUBNPAG Symbol table $$BASE $$DISPL $$GEN SW $$HIGH $$LIMIT $$LOW $$MNSW $$MXSW "ADD DOLLAR ADD-NODE ADP$C NUMDATAP ADP$L-CSR ADP$L-DPQBL ADP$L-DPQFL ADP$L-MRACTMDRS ADP$L-MRQBL ADP$L-MRQFL ADP$W-ADPTVPE ADP$W-DPBITMAP ADP$W-MRFREGARV ADP$W-MRNREGARV ALLOC-DESCRIP ALLO'C-NAME AT$ UBA BINNUM BOO$GL SPTFREH BOO$GL-SPTFREL BUG$ INCONSTATE BUG$-IVBVTEALGN BUG$-UNSUPRTCPU CAN$C AMBXDGN CAN$C-DASSGN CDRP$L BCNT CDRP$L-FPC CDRP$L-FQFL CDRP$L-FR3 CDRP$L-IOQFL CDRP$L-RWCPTR CDRP$L-UBARSRCE CDRP$W-BOFF CLU$GL-CLUB COM$DRVDEALMEM COMMON ALOUBAMAP CRB$B MASK CRB$L-INTD CRB$L-LINK CRB$L-WQBL CRB$L-WQFL CRB$M-BSV CRB$V-esv ocs·oYsK DDB$L 2P'UCB DDB$L-ALLOCLS DDB$L-DP UCB DDB$L-LINK DDB$L-S8 DDB$L=UCB - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 65 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(36) = = = = 00000001 00000008 00000001 00000007 = 00000006 = 00000001 = 00000001 = 00000001 000006BF R 02 00000685 R = 00000010 = 00000000 = 00000018 = 00000014 = 0000005C = 00000034 = = = = 00000030 OOOOOOOE 00000060 0000015E = 00000064 02 00000408 R 02 = 00000682 R 00000001 02 00000000 ******** ******** x x 02 02 ******** x 02 ******** x 02 = = ******** 00000002 00000001 x 02 = = = = FFFFFFD2 oooooooc 00000000 00000010 = FFFFFFAO = 00000028 = 0000003C = FFFFFFDO ******** x 02 ******** x 02 00000366 R = OOOOOOOE = = 00000024 00000020 == 00000004 00000000 = 00000001 = 00000000 = 00000001 = 00000040 = 0000003C = 00000040 = 00000000 = 00000034 02 = 00000004 DDB$T NAME DDT$L-CANCEL DDT$L-REGDUMP DDT$L-START DDT$L-UNITINIT DEALLOC DESCRIP DEV$M MBX DEV$M-TRM DEV$V-2P DEV$V-ALL DEV$V-AVL DEV$V-COP DEV$V-CLU DEV$V-FOD DEV$V-MNT DEV$V-NNM DEV$V-OPR DEV$V-SPL DEV$V-:-TRM DIR .. ~ DISKCHK DISPLAY_NAME DO PMS DVN$C TWP DVN$C-UCB EMB$B-DV ERTCNT EMB$Q-DV-IOSB EMB$W-DV-STS END BROADCAST ERL$RELEASEMB EXDVNM EXE$ALONONPAGED EXE$ALTQUEPKT EXE$CHKRDACCES EXE$DEANONPAGED EXE$GB CPUTVPE EXE$GL -ABSTIM EXE$GQ...,.SYSTIME EXE$MOUNTVER EXE$TEST CSR FULL NAME GETNUMBER IDB$L ADP IDB$L-CSR IDB$L-OWNER IOC$ALLOSPT IOC$ALODATAP IOC$ALOMAPUDA IOC$ALOUBAMAP IOC$ALOUBAMAPN IOC$ALOUBAMAPSP IOC$ALOUBMAPRM IOC$ALOUBMAPRMN IOC$ALTREQCOM IOC$BROADCAST I OC$CANCELI 0 IOC$CREDIT _UCB = = 00000014 oooooooc = = = 00000010 00000000 00000018 000004BF R 02 = = = 00100000 00000004 = = 00000004 00000017 00000012 = 00000003 = = 00000000 OOOOOOOE = = = = = = 00000013 00000009 00000007 00000006 00000002 00000001 00000191 R 02 0000069F R 02 000001A9 R 02 = 00000030 = = 00000010 00000010 = 00000012 = 0000001A 00000788 R 02 ******** x 02 000006D8 R 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 0000067D R 02 = 00000958 00000014 R 02 = 00000000 = 00000004 00000620 RG 02 00000261 R 02 00000314 R 02 0000033E RG 02 00000337 RG 02 000003A8 RG 02 0000044E RG 02 00000447 RG 02 00000111 RG 02 00000720 RG 02 00000000 RG 02 ******** x 02 IOSUBNPAG Symbol table IOC$CTR LIN IT IOC$CVT DEVNAM IOC$DALOCUBAMAP IOC$DELETE UCB IOC$DIAGBUFILL IOC$GL PSBL IOC$INITIATE IOC$LAST CHAN IOC$LAST-CHAN AMBX IOC$LOCK-DEV IOC$MNTVER IOC$M 2P IOC$M-ALT IOC$M-CLASS IOC$M-EXISTS IOC$M-LOCAL IOC$M-PHY IOC$M-TYPE IOC$PARSDEVNAM IOC$RELCHAN IOC$RELDATAP IOC$RELDATAPUDA IOC$RELMAPREG IOC$RELMAPUDA IOC$RELSCHAN IOC$REQCOM IOC$REQDATAP IOC$REQOATAPNW IOC$REQDATAPUDA IOC$REQMAPREG IOC$REQMAPUDA IOC$REQPCHANH IOC$REQPCHANL IOC$REQSCHANH IOC$REQSCHANL IOC$RETURN IOC$SCAN IODB IOC$SCAN-IOOB 2P IOC$SEARCHCONT IOC$SEARCHINT IOC$TESTUN IT IOC$UNI TI NIT IOC$V 2P IOC$V-ALLOC IOC$V-ALT IOC$V-ANY IOC$V-CLASS IOC$V-EXISTS IOC$V-MOUNT IOC$V-TYPE IOC$WFIKPCH IOC$WFIRLCH IPL$ ASTOEL I PL$-IOPOST IPL$-QUEUEAST IRP$L OIAGBUF IRP$L=IOQFL - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-0l Page 66 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(36) 00000830 RG 02 00000647 RG 02 00000568 R 02 ******** x 02 00000054 RG 02 ******** x 02 00000104 RG 02 OOOOOOlE RG 02 00000017 RG 02 ******** x 02 OOOOOlCB RG 02 00000020 00000100 00000004 00000010 00000008 00000001 00000002 00000890 RG 02 00000083 RG 02 0000028C RG 02 00000281 RG 02 00000513 RG 02 000004F8 RG 02 00000079 RG 02 0000013C RG 02 00000201 RG 02 00000213 RG 02 00000221 RG 02 00000302 RG 02 000002ED RG 02 OOOOOOOA RG 02 OOOOOOE3 RG 02 OOOOOOC6 RG 02 00000000 RG 02 00000509 RG 02 00000791 RG 02 00000706 RG 02 OOOOOAA5 RG 02 000009Bl RG 02 OOOOOAB4 RG 02 0000086A RG 02 00000005 OOOOOOOA 00000008 00000006 00000002 00000004 00000007 00000001 0000050A RG 02 OOOOOSFC RG 02 00000002 00000004 00000006 0000004C 00000000 IRP$L MEDIA IRP$L-PID IRP$L-SVAPTE IRP$L-UCB IRP$V-DIAGBUF IRP$W-CHAN IRP$W-STS LCK$K-EXMODE LCK$K-PWMODE LOCAL-NAME MMG$GL SPTBASE MNTVERPNDCHK MSCP$V MTYP Dl MSCP$V-MTYP-N NEXTUCB NO SECONDARY NXTIRP PCB$L PIO PCB$Q-PRIV PDT$L-ADP PMS$END IO PMS$GL IOPFMPDB PMS$START IO PM SEND PR$ IPL PR$-SID TYP730 PR$-SID-TYP750 PR$-SID-TYP780 PR$-SID-TYP790 PR$-SID-TYP8NN PR$-SID-TYP8SS PR$-SID-TYPUV1 PR$-SIRR PRV$V ALLSPOOL PUTASCIC PUT CHAR PUTDOLLAR PUTNUM REALLOC CD MAPREGS RELDATAP COMMON RELEASE - RESRO RESR1 RESR2 RESR3 RESR4 SAVABS ... SAVED RO SAVED-R1 SAVED-R2 SAVED-R3 SAVED-R4 SAVED-RS SAVR2- SAVR3 SAVR4 SAVR8 00000038 oooooooc 0000002C OOOOOOlC 00000007 00000028 0000002A 00000005 00000004 000006Cl R 02 ******** x 02 00000181 R 02 00000016 00000000 OOOOOA79 R 02 000006EO R 02 00000182 R 02 00000060 00000084 OOOOOOEO ******** x 02 ******** x 02 ******** x 02 00000173 R 02 00000012 00000003 00000002 00000001 00000004 00000006 00000005 00000007 00000014 00000004 000006FD R 02 0000070E R 02 00000708 R 02 000006E5 R 02 0000055A R 02 00000298 R 02 0000018E R 02 00000008 oooooooc 00000010 00000014 00000018 OOOOOOlC 00000000 00000004 00000008 oooooooc 00000010 00000014 00000000 00000004 00000008 oooooooc IOSUBNPAG Symbo 1 tab 1e SAVR9 SB$L DOB SB$L-FLINK .SB$T-NODENAME SCH$GL CURPCB SCRLEN SCS$GA LOCALSB SCS$GQ-CONFIG SCS$RESUMEWAITR SECONDARY NAME SS$ BUFFEROVF SS$-DEVALLOC SS$-DEVMOUNT SS$-DEVOFFLI NE SS$-I LLIOFUNC SS$-INSFMEM SS$-IVDEVNAM SS$=NODEVAVL SS$ NOPRIV SS$-NORMAL SS$-NOSUCHDEV SS$-TEMPLATEDEV TTY$B WB FIPL TTY$B-WB-TYPE TTY$K-WB-LENGTH TTY$L-WB-DATA TTY$L-WB-END TTY$L-WB-FR3 TTY$L-WB-IRP TTV$L-WB-NEXT TTY$L-WB-RETADDR TTY$W-WB-SIZE UBMD$B DATAPATH UBMD$B-NUMREG UBMD$W-MAPREG UCB$B DEVCLASS UCB$B-ERTCNT UCB$B-FIPL UCB$B-TYPE UCB$L-2P LINK UCB$L-CRB UCB$L-DDB UCB$L-DDT UCB$L-DEVCHAR UCB$L-DEVCHAR2 UCB$L-DP ALTUCB UCB$L-DP-DDB UCB$L-DP-LINK UCB$L -DUE TIM UCB$L-EMB UCB$L-FPC UCB$L-FQFL UCB$L-FR3 UCB$L -IOQFL UCB$L-IRP UCB$L ~LINK UCB$L=MEDIA ID - NONPAGED 1/0 RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-01 Page 67 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SVS.SRC)IOSUBNPAG(36) 00000010 00000054 00000000 00000044 ******** x 02 00000010 ******** x 02 ******** x 02 ******** x 02 0000068F R 02 00000601 00000840 0000006C 00000084 OOOOOOF4 00000124 00000144 00000980 00000024 00000001 00000908 000021DC OOOOOOOB OOOOOOOA 00000030 00000030 00000020 00000010 00000024 0000001C 0000002C 00000008 00000003 00000002 00000000 00000040 = 00000080 00000008 OOOOOOOA OOOOOOA4 00000024 00000028 00000088 00000038 0000003C OOOOOOA8 OOOOOOAO OOOOOOA4 0000006( 00000094 oooooooc 00000000 00000010 0000004( 00000058 00000030 0000008C UCB$L OPCNT UCB$L-PIO UCB$L-STS UCB$L-SVAPTE UCB$M-BSY UCB$M-CANCEL UCB$M-INT UCB$M-TIM UCB$M-TIMOUT UCB$V-BSY UCB$V-DELETEUCB UCB$V-ERLOGIP UCB$V-MNTVERIP UCB$V-MNTVERPND UCB$V-MOUNTING UCB$V-ONLI NE UCB$V-TEMPLATE UCB$W-BCNT UCB$W-BOFF UCB$W-REFC UCB$W-STS UCB$W-UNIT VEC$8-DATAPATH VEC$B-NUMREG VEC$L-ADP VEC$L-IDB VEC$L-INITIAL VEC$L - U N I T I N I T VEC$M-MAPLOCK VEC$S-DATAPATH VEC$V-DATAPATH VEC$V-MAPLOCK VEC$V-PATHLOCK VEC$W=MAPREG 00000070 0000002C 00000064 00000078 00000100 00000008 00000002 00000001 00000040 00000008 00000010 00000002 OOOOOOOE 00000013 00000009 00000004 OOOOOOOD 0000007E 0000007C 0000005( 00000064 00000054 00000013 00000012 00000014 00000008 oooooooc 00000018 00008000 00000005 00000000 OOOOOOOF 00000007 00000010 IOSUBNPAG Psect synopsis - NONPAGED I/O RELATED SUBROUTINES 3-JUN-1984 11:33:30 VAX-11 Macro V03-0l Page 68 12-MAR-1982 17:12:23 DISK$VMSMASTER:[SYS.SRC]IOSUBNPAG(36) Psect synopsis PSECT name ABS $ABS$ WIONONPAGED Allocation PSECT No. Attributes 00000000 OOOOOOlC OOOOOB7B. 0.) 00 28.) 01 2939.) 02 0. ) NOPIC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE 1 · ) NOP IC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE 2.) NOPIC USR CON REL LCL NOSHR EXE RO WRT NOVEC BYTE Performance indicators Phase Page faults CPU Time Elapsed Time Initialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals 9 73 676 0 408 0 1 0 1170 00:00:00.05 00:00:00.67 00:00:36.81 00:00:04.17 00:00:12.25 00:00:00.24 00:00:00.02 00:00:00.00 00:00:54.21 00:00:03.03 00:00:05.51 00:02:30.72 00:00:16.52 00:00:52.03 00:00:00.47 00:00:00.02 00:00:00.00 00:03:48.30 The working set limit was 2250 pages. 176206 bytes (345 pages) of virtual memory were used to buffer the intermediate There were 150 pages of symbol table space allocated to hold 2680 non-local and 2794 source lines were read in Pass 1, producing 24 object records in Pass 2. 59 pages of virtual memory were used to define 55 macros. code. 162 local symbols. ! Macro library statistics Macro library name Macros defined $255$DUA28: [SYS.OBJ]LIB.MLB;l 35 -$255$DUA28: [SYSLIBJSTARLET.MLB;2 12 fOTALS (all libraries) 47 2923 GETS were required to define 47 macros. There were no errors, warnings or information messages. MACRO/LIS=LIS$:IOSUBNPAG/OBJ=OBJ$:IOSUBNPAG MSRC$:IOSUBNPAG/UPDATE=(ENH$:IO$UBNPAG)+EXECML$/LIB FORKCNTRL FORKCNTRL Table of contents ( 1) 66.1 ( 1) 67 (2) 90 (3) 117 (4) 165 - FORK PROCESS CONTROL CREATE FORK-AND-WAIT PROCESS CREATE I/0 DRIVER FORK PROCESS CREATE FORK PROCESS SOFTWARE INTERRUPT ENTRY POINTS SOFTWARE INTERRUPT FORK DISPATCHER 3-JUN-1984 11 :20:55 VAX-11 Macro V03-01 Page 0 FORKCNTRL V03-002 ;DWT0158 -1 ;ROW0176 ;ROW0176 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;ROW0176 ;ROW0176 ;ROW0176 ;ROW0176 -29 - FORK PROCESS CONTROL 3-JUN~1984 11:20:55 VAX-11 Macro V03-01 Page 1 12-MAR-1982 17:11:47 DISK$VMSMASTER: [SYS.SRC]FORKCNTRL.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1 . TITLE FORKCNTRL - FORK PROCESS CONTROL .1 . I DENT 'V03-002' 3 4 · 5 ;**************************************************************************** * 6 7 8 9 10 11 1 2 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ;* * . ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; * COPYRIGHT (c) 1978, 1980, 1982 BY * DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. * ALL RIGHTS RESERVED. * * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * TRANSFERRED. * * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * CORPORATION. * * DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOi SUPPLIED BY DIGITAL. * * ************************************************************************** * * * * * * * * * * * * * * * * * * *** 27 28 D. N. CUTLER 9-AUG-76 29 .1 MODIFIED BY: . 2 .3 V03-002 DWT0158 David W. Thiel 27-DEC-1983 .4 Speed up fork processing a bit by doing fewer interrupts .5 and REMQUE's. .6 .7 V03-001 ROW0176 Ralph 0. Weber 4-APR-1983 . 8 Add EXE$FORK WAIT, the entry fork-and-wait routine which is .9 the object o7 the FORK WAIT macro. . 10 59 60 MACRO LIBRARY CALLS 61 62 63 $FKBDEF DEFINE FKB OFFSETS 64 $PRDEF DEFINE PROCESSOR REGISTERS 65 $UCBDEF DEFINE UCB OFFSETS FORKCNTRL V03-002 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ; OW.TO 158 ;DWT0158 ;OWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ; DWTO 1~8 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 - FORK PROCESS CONTROL CREATE FORK-AND-WAIT PROCESS 3-JUN-1984 11:20:55 VAX-11 Macro V03-01 Page 2 12-MAR-1982 17:11:47 DISK$VMSMASTER:[SYS.SRC]FORKCNTRL.(1) 10 A5 53 7D OC A5 8EDO OOOO'DF 65 OE 05 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000. 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0004 0008 OOOD .1 .SBTTL CREATE FORK-AND-WAIT PROCESS . 2 ;+ . 3 EXE$FORK WAIT - CREATE FORK-AND-WAIT PROCESS .4 .5 FUNCTIONAL DESCRIPTION: .6 .7 This routine is cal led to fold a fork context into a fork block and .8 place that block on the fork-and-wait work queue, EXE$GL FKWAITFL. .9 From zero to one seconds later, EXE$TIMEOUT will remove all entries in . 10 the fork-and-wait work queue and restart the fork thread saved here. . 11 . 12 INPUTS: . 13 . 14 OO(SP) Return address of the caller . 15 04(SP) Return address of the caller's caller . 16 . 17 R5 Address of a fork block . 18 R3 & R4 Saved fork context registers . 19 .20 IPL >= IPL$_SYNCH . 21 .22 .23 OUTPUTS (to caller's caller): .24 .25 All registers and IPL are returned as they were when this routine was .26 cal led. Depending upon actions taken by the caller this may be .27 equivalent to destroying RO through R5 and altering IPL. .28 .29 OUTPUTS (to caller after fork-and-wait completed): .30 . 31 R3 through R5 p~eserved. .32 All other registers destroyed. .33 IPL = FKB$B FIPL(R5) .34 .35 .36 EXE$FORK WAIT:: .37 .38 ASSUME FKB$L FR4 EQ <FKB$L FR3 + 4> .39 MOVQ R3, FKB$L FR3(R5) - Save fork context registers. .40 POPL FKB$L FPc(R5) Save fork context PC. .41 INSQUE (R5),-@WAEXE$GL FKWAITBL Put fork block on work queue. .42 RSB Return to caller's caller. FORKCNTRL V03-002 64 A5 - FORK PROCESS CONTROL CREATE I/O DRIVER FORK PROCESS 3-JUN-1984 11:20:55 VAX-11 Macro V03-01 Page 3 12-MAR-1982 17:11 :47 DISK$VMSMASTER: [SVS.SRC]FORKCNTRL.(1) OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE OOOE 00000000 0000 01 AA 0000 0004 67 .SBTTL CREATE I/O DRIVER FORK PROCESS 68 ;+ 69 EXE$IOFORK - CREATE I/0 DRIVER FORK PROCESS 70 71 THIS ROUTINE IS CALLED BY AN I/O DRIVER TO CREATE A FORK PROCESS. 72 73 INPUTS: 74 75 OO(SP) RETURN ADDRESS OF CALLER. 76 04(SP) RETURN ADDRESS OF CALLER'S CALLER. 77 78 = R5 UCB ADDRESS OF DEVICE UNIT. 79 80 OUTPUTS: 81 82 ***TBS*** 83 84 85 .PSECT A$EXENONPAGED,LONG 86 EXE$IOFORK:: CREATE I/O DRIVER FORK PROCESS 87 BICW #UCB$M TIM,UCB$W STS(R5);DISABLE TIMEOUT AND FALL THROUGH 88 - TO EXE$FORK FORKCNTRL V03-002 DWT0158 DWT0158 DWT0158 - FORK PROCESS CONTROL CREATE FORK PROCESS 3-JUN-1984 11:20:55 VAX-11 Macro V03-01 Page 4 12-MAR-1982 17:11:47 DISK$VMSMASTER:[SYS.SRC]FORKCNTRL.(2) 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 10 A5 53 7D 0004 QC A5 8EDO 0008 54 OB A5 9A oooc 53 FFDO'CF44 7E 0010 04 B3 65 OE 0016 03 12 OOlA 001C 05 001F 90 .SBTTL CREATE FORK PROCESS 91 ;+ 92 EXE$FORK - CREATE FORK PROCESS 93 94 THIS ROUTINE IS CALLED TO CREAIE A FORK PROCESS. 95 96 INPUTS: 97 98 OO(SP) = RETURN ADDRESS OF CALLER. 99 04(SP) =RETURN ADDRESS OF CALLER'S CALLER. 100 101 R5 = ADDRESS OF FORK BLOCK. 102 103 OUTPUTS: 104 105 ***TBS*** 106 107 108 EXE$FORK:: ;CREATE FORK PROCESS 109 MOVQ R3,FKB$L FR3(R5) ;SAVE REGISTERS R3 AND R4 110 POPL FKB$L FP~(R5) ;SET FORK PROCESS PC 111 MOVZBL FKB$B-FIPL(R5),R4 ;GET FORK IPL 112 MOVAQ WASWI$GL FQFL-<6*8>[R4] ,R3 ;GET ADDRESS OF FORK QUEUE LISTHEAD 113 INSQUE (R5),@4(R3) INSERT FORK B~OCK IN FORK QUEUE .1 BNEQ 10$ IF QUEUE ALREADY POPULATED AVOID EXTRA INTE . 2 SOFTI NT R4 INITIATE SOFTWARE INTERRUPT .3 10$: RSB AND RETURN FORKCNTRL V03-002 - FORK PROCESS CONTROL SOFTWARE INTERRUPT ENTRY POINTS 3-JUN-1984 11:20:55 VAX-11 Macro V03-01 Page 5 12-MAR-1982 17:11:47 DISK$VMSMASTER:[SYS.SRC]FORKCNTRL.(3) 0020 117 .SBTTL SOFTWARE INTERRUPT ENTRY POINTS 0020 118 ;+ 0020 119 THE APPROPRIATE ENTRY POINT IS AUTOMATICALLY VECTORED TO WHEN THE SOFTWARE 0020 120 INTERRUPT PRIORITY ARBITRATION LOGIC IN THE CENTRAL PROCESSOR DETECTS A 0020 121 PENDING INTERRUPT AT LEVEL 6, 8, 9, 10, OR 11 AND THE CURRENT PRIORITY LEVEL 0020 122 IS LOWER THAN THE PENDING LEVEL. THE STATE OF THE STACK ON ENTRY IS: 0020 123 0020 124 0020 125 OO(SP) = INTERRUPT PC. 04(SP) = INTERRUPT PSL. 0020 126 0020 127 THERE IS AN ENTRY POINT FOR EACH FORK LEVEL SO THAT THE HARDWARE IPL REGISTER 0020 128 WILL NOT HAVE TO BE READ TO DETERMINE THE CURRENT PROCESSOR IPL. READING THE 0020 129 IPL REGISTER IS SLOW ENOUGH TO WARRANT THE ADDITIONAL CODE. 0020 130 0020 131 0020 132 .ALIGN LONG ENTRY POINT MUST BE LONGWORD ALIGNED 0020 133 EXE$FRKIPL6DSP:: FORK IPL 6 ENTRY POINT 56 DD 0020 134 PUSHL R6 SAVE R6. 56 OOOO'CF 7E 0022 135 MOVAQ WASWI$GL FQFL,R6 GET ADDRESS OF FORK QUEUE LISTHEAD 2F 11 0027 136 BRB EXE$FORKDSPTH BRANCH TO COMMON CODE 0029 137 0029 ooze 138 . ALIGN LONG 139 EXE$FRKIPL9DSP:: ENTRY POINT MUST BE LONGWORD ALIGNED FORK IPL 9 ENTRY POINT 56 DD 002C 140 56 0018'CF 7E 002E 141 23 11 0033 142 PUSHL MOVAQ BRB R6 WASWI$GL FQFL+24,R6 EXE$FORKDSPTH SAVE R6. GET ADDRESS OF' FORK QUEUE LI STHEAD BRANCH TO COMMON CODE 0035 143 0035 144 . ALIGN LONG ENTRY POINT MUST BE LONGWORD ALIGNED 0038 145 EXE$FRKIPL10DSP:: FORK IPL 10 ENTRY POINT 56 DD 0038 146 PUSHL R6 SAVE R6. 56 0020'CF 7E 003A 147 MOVAQ WASWI$GL FQFL+32,R6 GET ADDRESS OF FORK QUEUE LISTHEAD 17 11 003F 148 BRB EXE$FORKDSPTH BRANCH TO COMMON CODE 0041 149 0041 0044 150 . ALIGN LONG 151 EXE$FRKIPL11DSP:: ENTRY POINT MUST BE LONGWORD ALIGNED FORK IPL 11 ENTRY POINT 56 DD 0044 152 56 0028'CF 7E 0046 153 OB 11 004B 154 PUSHL MOVAQ BRB R6 WASWI$GL FQFL+40,R6 EXE$FORKDSPTH SAVE R6. GET ADDRESS OF FORK QUEUE LISTHEAD BRANCH TO COMMON CODE 004D 155 004D 156 .ALIGN LONG ENTRY POINT MUST BE LONGWORD ALIGNED 0050 157 EXE$FRKIPL8DSP:: 56 DD 0050 158 PUSHL R6 56 0010'CF 7E 0052 159 MOVAQ WASWI$GL FQFL+16,R6 01 0057 160 NOP - FORK IPL 8 ENTRY POINT SAVE R6. GET ADDRESS OF FORK QUEUE LISTHEAD PAD OUT TO LONGWORD BOUNDARY 0058 161 0058 162 DROP THROUGH TO COMMON CODE 0058 163 FORKCNTRL V03-002 DWT0158 DWTO 158 DWT0158 3 DWT0158 DWT0158 DWT0158 DWT0158 ;DWT0159 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 ;DWT0158 -3 - FORK PROCESS CONTROL SOFTWARE INTERRUPT FORK DISPATCHER 3-JUN-1984 11:20:55 VAX-11 Macro V03-01 Page 6 12-MAR-1982 17:11:47 DISK$VMSMASTER:[SYS.SRC]FORKCNTRL.(4) 55 54 53 52 51 50 07 53 10 A5 oc B5 55 00 B6 F3 07 53 10 A5 oc B5 007F BF 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 0058 DD 0058 DD 005A DD 005C DD 005E DD 0060 DD 0062 11 0064 0066 0066 0066 0066 0066 0066 0066 0066 7D 0066 16 006A OF 006D 12 0071 1D 0073 0075 0075 0075 0075 0075 0075 0075 0075 0075 7D 0075 16 0079 BA 007C 02 0080 0081 0081 165 .SBTTL SOFTWARE INTERRUPT FORK DISPATCHER 166 ;+ 167 ; EXE$FORKDSPTH - SOFTWARE INTERRUPT FORK DISPATCHER 168 169 FOR EACH OF THE LEVELS 6, 8, 9, 10, AND 11, THERE EXISTS A QUEUE OF FORK 170 BLOCKS WAITING TO BE PROCESSED. WHEN A FORK BLOCK IS ENTERED IN ITS 171 CORRESPONDING QUEUE AND IT IS THE FIRST TO BE ENTERED (I. E. THE QUEUE 172 WAS PREVIOUSLY EMPTY), A SOFTWARE INTERRUPT IS REQUESTED FOR THAT LEVEL. 173 THE FORK DISPATCHER GAINS CONTROL AND EMPTIES THE QUEUE ONE ENTRY AT A 174 TIME. AS EACH FORK IS DISPATCHED, REGISTERS R3 AND R4 ARE RESTORED FROM 175 THE FORK BLOCK AND THE FORK PROCESS IS CALLED VIA A JSB INSTRUCTION. 176 ON RETURN, THE FORK DISPATCHER RETRIEVES THE NEXT ENTRY FROM THE QUEUE 177 AND REPEATS THE DISPATCHING OPERATION. THIS PROCESS CONTINUES UNTIL 178 THERE ARE NO MORE FORKS TO DISPATCH AT WHICH TIME THE INTERRUPT IS 179 DISMISSED. 180 181 182 183 . ALIGN LONG 184 EXE$FORKDSPTH: : ;SOFTWARE INTERRUPT FORK DISPATCHER 185 PUSHL R5 ;SAVE RS 186 PUSHL R4 ;SAVE R4 187 PUSHL R3 ;SAVE R3 PUSHLS ARE FASTEST! 188 PUSHL R2 ;SAVE R2 189 PUSHL R1 ;SAVE R1 190 PUSHL RO ;SAVE RO. .1 BRB 20$ ;BRANCH TO BODY OF DISPATCHER . 2 . 3 DISPATCH FORK PROCESS WHEN QUEUE IS NOT VET EMPTY 194 DISPATCH FORK PROCESS WITH: 195 196 = RO THRU R2 SCRATCH REGISTERS. 197 R3 AND R4 = RESTORED FROM FORK BLOCK. 198 R5 = ADDRESS OF FORK BLOCK. 199 200 10$: MOVQ FKB$L FR3(R5) ,R3 RESTORE REGISTERS R3 AND R4 201 JSB @FKB$L FPC(R5) DISPATCH FORK .1 20$: REMQUE @(R6) ,R5 REMOVE NEXT ENTRY FROM FORK QUEUE . 2 BNEQ 10$ BRANCH IF QUEUE NOT VET EMPTY .3 BVS 30$ IF VS NO ENTRY REMOVED .4 HERE WHEN LAST ENTRY DEQUEUED .5 .6 DISPATCH LAST ENTRY IN THE QUEUE . 7 DISPATCH FORK PROCESS WITH: . 8 .9 . 10 RO THRU R2 = SCRATCH REGISTERS. = R3 AND R4 RESTORED FROM FORK BLOCK. . 11 R5 = ADDRESS OF FORK BLOCK . . 12 . 13 MOVQ FKB$L FR3(R5),R3 ;RESTORE REGISTERS R3 AND R4 . 14 . 15 30$: JSB POPR @FKB$L FPC(R5) ;DISPATCH FORK #AM<RO~R1 ,R2,R3,R4,R5,R6> ;RESTORE FORK PROCESS REGISTER SET 205 REI ;DISMISS INTERRUPT 206 207 .END FORKCNTRL Symbol table EXE$FORK EXE$FORKDSPTH EXE$FORK WAIT EXE$FRKIPL10DSP EXE$FRKIPL11DSP EXE$FRKIPL6DSP EXE$FRKIPL8DSP EXE$FRKIPL9DSP E'XE$GL FKWAITBL EXE$IOFORK FKB$B FIPL FKB$L-FPC FKB$L-FR3 FKB$L-FR4 PR$ SIRR SWI$GL FQFL UCB$M TIM UCB$W=STS - FORK PROCESS CONTROL 00000004 RG 03 00000058 RG 03 00000000 RG 01 00000038 RG 03 00000044 RG 03 00000020 RG 03 00000050 RG 03 0000002C RG 03 ******** x 01 = 00000000 RG 00000008 03 oooooooc 00000010 00000014 00000014 ******** x 03 00000001 00000064 3-JUN-1984 11 :20:55 VAX-11 Macro V03-0l Page 7 12-MAR-1982 17:11 :47 DISK$VMSMASTER:[SYS.SRC]FORKCNTRL.(4) ! Psect synopsis +----------------+ PSECT name ---------ABS BLANK . $ABS$ A$EXENONPAGED Allocation ---------- -PS-E-C-T---N-o-. Attributes 00000000 ( 0.) 00 ( 0.) NOP IC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE OOOOOOOE ( 14.) 01 ( 1.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 00000000 ( 0.) 02 ( 2.) NOPIC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE 00000081 ( 129.) 03 ( 3.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC LONG +------------------------+ +! -P-e-r-f-o-r-m-a-n-c-e---i-n-d-i-c-a-t-o-r-s-+! Phase Page faults CPU Time Elapsed Time Initialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis outpu~ Cross-reference output Assembler run totals 9 00:00:00.0.7 00:00:00.47 73 00:00:00.58 00:00:06.58 200 00:00:04.79 00:00:24.27 0 00:00:00.68 00:00:02.39 51 00:00:01.32 00:00:07.47 3 00:00:00.04 00:00:00.03 2 00:00:00.02 00:00:00.10 0 00:00:00.00 00:00:00.00 341 00:00:07.50 00:00:41.34 The working set limit was 900 pages. 22659 bytes (45 pages) of virtual memory were used to buffer the intermediate There were 30 pages of symbol table space allocated to hold 426 non-local and 244 source lines were read in Pass 1, producing 14 object records in Pass 2. 12 p~ges ~f virtual memory were used to define 11 macros. code. 4 local symbols. FORKCNTRL VAX-11 Macro Run Statistics - FORK PROCESS CONTROL 3-JUN-1984 11:20:55 VAX-11 Macro V03-0l Page 8 12-MAR-1982 17:11:47 DISK$VMSMASTER:[SYS.SRC]FORKCNTRL.(4) Macro library statistics Macro library name Macros defined $255$DUA28: [SYS.OBJ)LIB.MLB;l 3 $255$DUA28: [SYSLIB]STARLET.MLB;2 5 TOTALS (all 1ibraries) 8 491 GETS were required to define 8 macros. There were no errors, warnings or information messages. MACRO/LIS=LIS$:FORKCNTRL/OBJ=OBJ$:FORKCNTRL MSRC$:FORKCNTRL/UPDATE=(ENH$:FORKCNTRL)+EXECML$/LIB INITADP INIADP780 Table of contents (3) (4) (5) (6) ( 7) (8) (9) ( 10) ( 11) ( 13) ( 14) ( 14) (14) ( 14) ( 14) ( 14) ( 15) . ( 16) 168 220. 1 378 528 539 691 708 832 867 1016 1072 1503 1504 1505 1649.36 1650 1762 1905 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Macros to describe nexus configurations Adapter-specific data structures CPU-specific data structures Message strings INI$IOMAP, Initialize and map nexuses INITADP 780, 750, 730, and UVl CONFIG IOSPACE CREATE-ARRAYS MAP PAGES INI$UBSPACE INI$UBADP - BUILD ADP AND INITIALIZE UBA INI$MBADP - BUILD ADP AND INITIALIZE MBA INI$DRADP - BUILD ADP AND INITIALIZE DR32 INI$CIADP - BUILD ADP AND INITIALIZE CI INI$KDZ11 INI$CONSOLE, init data structures for console EXE$INI TIMWAIT - COMPUTE CORRECT TIMEWAIT LOOP VALUES EXE$INIT_TODR SET SYSTEM TIME TO CORRECT VALUE AT STARTUP Page 0 INIADP780 V03-·021 ; RLRSCORPIO ; RLRSCORPIO -1 ;KDM0100 ;KDM0100 ;KDM0100 ;KDM0100 ;KDM0099 ;KDM0099 ;KDM0099 ;KDM0099 ;KDM0099 ;KDM0099 ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 1 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 OQOO 0000 0000 0000 0000 0000 0000 0000 0000 1 . NLI ST CND 3 .TITLE INIADP780 - ADAPTER INITIALIZATION FOR VAX 11/780 5 9 13 17 21 .4 .5 . !DENT 'V03-021 ' 23 24 ;**************************************************************************** 25 ; * 26 ;* COPYRIGHT (c) 1978, 1980, 1982, 1983 BY * * 27 ;* DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. * 28 ;* ALL RIGHTS RESERVED. * 29 ;* 30 ;* 31 ;* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * * * 32 ;* INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * 33 ;* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY 34 ;* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * * 35 ;* TRANSFERRED. * 36 ; * * 37 ; * 38 ; * 39 ; * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION. * * * * 40 41 * DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS * * 42 * SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * 43 44 45 ;;;******************************************************************************** 46 47 Facility: System bootstrapping and initialization 48 49 Abstract: This module contains initialization routines that are loaded 50 during system initialization (rather than linked into the system). 51 = 52 _; Environment~ Mode KERNEL, Executing on INTERRUPT stack, IPL=31 53 54 Author: Trudy C. Matthews Creation date: 22-Jan-1981 55 56 Modification history: 57 . 1 V03-021 KDMOlOO Kathleen D. Morse 01-May-1984 . 2 Correct address of memory CSRs to be past the 8 missing . 3 Qbus adapter pages that do not exist. .4 .5 V03-020 KDM0099 Kathleen D. Morse 27-Apr-1984 .6 On a MicroVAX I, if the sysgen parameter TIMEDWAIT is set . 7 to request no time-prompting, then use the last recorded . 8 system time instead. This is found in EXE$GQ TODCBASE .9 which can be updated with a SET TIME command.- . 10 .11 V03-019 RLRSCORPIO Robert L. Rappaport 16-Mar-1984 . 12 Begin additions (to INI$IOMAP) for Scorpio support. . 13 Also move ADAPDESC to SYSMAR.MAR, changing it to remove INIADP780 V03-021 ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ·; RLRSCORPIO ;KPLOlOO ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPLOlOO ;KPLOlOO ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPLOOOl ;KPLOOOl ;KPLOOOl ;KPLOOOl ;TCM0009 ;TCM0009 ;TCM0009 ;TCM0009 ;TCM0009 ;TCM0009 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 2 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP.(1) 0000 .14 0000 . 15 0000 . 16 0000 . 17 0000 . 18 0000 . 19 0000 .20 0000 . 21 0000 .22 0000 .23 0000 .24 0000 .25 0000 .26 0000 .27 0000 .28 0000 .29 0000 .30 0000 . 31 0000 .32 0000 .33 0000 .34 0000 .35 0000 .36 0000 .37 0000 .38 0000 .39 0000 .40 0000 .41 0000 .42 0000 .43 0000 .44 0000 . 45 0000 .46 0000 58 0000 59 0000 60 0000 61 0000 62 0000 63 0000 64 0000 65 0000 66 0000 67 0000 68 0000 69 0000 70 0000 71 0000 72 0000 73 0000 74 0000 75 0000 76 0000 77 0000 78 0000 79 0000 80 0000 81 the ADAP_GENERAL array. V03-018 RLRINIADP Robert Rappaport 28-Feb-1984 Add refinements to previous update that introduces lonqword array CONFREG. Mainly add logic to allow for independently assembled invocations of ADAPDESC macro to be linked into this code. This provides possible support of BI as a public bus, with user defined nodes. V03-017 KPLOlOO Peter Lieberwirth 30-Jan-1984 Implement first step towards a longword-array CONFREG to replace current byte array CONFREG. INIADP wil 1 construct two confregs, CONFREG and CONFREGL. CONFREGL wil 1 be a longword array. The high byte wil I be a VMS-bus designation, and the low word will contain the 16-bit device type. The BI introduces 16 bit device types. When all references to CONFREG have been modified to touch CONFREGL, INIADP will be modified again to stop creating the byte array. While here, map 9 pages of CI register space, up from 8. V03-016 KPLOOOl Peter Lieberwirth 17-Jan-1984 Fix bug in V03-015 that caused a failure to boot on 750s. Specifically, add NDT$_MEM1664NI to ADAPDESC macro. V03-015 TCM0009 Trudy C. Matthews 12-Dec-1983 Add support for booting from VENUS console device to INI$CONSOLE. When mapping I/O space on VENUS, use the PAMM to determine if any adaptors are present on the ABUS . V03-014 KDM0081 Kathleen D. Morse Create version for Micro-VAX I. 13-Sep-1983 V03-013 DWT0126 David W. Thiel 30-Aug-1983 Modify EXE$INIT TOOR to set internal time without modifying the contents of the system disk. V03-012 KDM0062 Kathleen D. Morse 18-Jul-1983 Add loadable, cpu-dependent routine for initializing the time-wait loop data cells, EXE$INI TIMWAIT. V03-011 KDM0057 Kathleen D. Morse 15-Jul-1983 Added loadable, cpu-dependent routine for initializing the system time, EXE$INIT_TODR~ V03-010 KTA3071 Ker~ey T. Altmann 12-Jul-1983 Include CPU-specific console init code. V03-009 TCM0008 Trudy C. Matthews 10-Jan-1983 Change PSECT of 11/790 data that must stick around after INIADP is deleted. Build arrays ABUS VA, ABUS TYPE, and ABUS_INDEX that describe the 11/790 ABUS configuration. V03-008 MSH0002 Maryann Hinden 08-Dec-1982 INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 3 19-0CT-1983 11 :50:19 DISK$VMSMASTER:[SVSLOA.SRC]INIADP.(1) 0000 82 0000 83 0000 84 0000 85 0000 86 0000 87 0000 88 0000 89 0000 90 0000 91 0000 92 0000 93 0000 94 0000 95 0000 96 0000 97 0000 98 0000 99 0000 100 0000 101 0000 102 0000 103 0000 104 0000 105 0000 106 0000 107 0000 108 Add powerfail support for DW750. V03-007 ROW0142 Ralph 0. Weber 24-NOV-1982 Change UBA interrupt services routines prototype so that UBAERRADR is correctly computed as an offset from UBAINTBASE. V03-006 TCM0007 Trudy C. Matthews 10-Nov-1982 Add 11/790-specific initialization of SCB. V03-005 TCM0006 Trudy C. Matthews 8-Nov-1982 Initialize field ADP$L AVECTOR with the address of each adapter's first SCB vector. V03-004 KTA3018 Kerbey T. Altmann 30-0ct-1982 Move from INILOA facility, rename from INITADP, put in condi~ional assembly, rewrite some routines. V03-003 MSHOOOl Maryann Hinden 24-Sep-1982 Change EXE$DW780 INT to EXE$UBAERR INT. V03-002 TCM0005 Trudy C. Matthews Added support for 11/790 processor. 10-Aug-1982 V03-001 KDM0002 Added $DCDEF. Kathleen D. Morse 28-Jun-1982 INIADP780 V03-021 RLRSCORPIO RLRSCORPIO RLRSCORPIO 1 ;RLRSCORPIO - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 4 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP.(2) 0000 110 0000 111 MACRO LIBRARY CALLS 0000 112 0000 113 $ADPDEF 0000 .1 $BIICDEF 0000 · 2 $BTDDEF 0000 . 3 $BUA DEF 0000 115 $CRBDEF 0000 116 $DCDEF 0000. 117 $00BDEF 0000 118 $0YNDEF 0000 119 $IDBOEF 0000 125 $I0780DEF 0000 137 $MCHKDEF 0000 138 $NDTDEF 0000 139 $PRDEF 0000 140 0000 142 $PR780DEF 0000 144 0000 148 0000 152 0000 156 0000 160 0000 .4 0000 161 $PTEDEF 0000 162 $RPBDEF 0000 163 $UBADEF 0000 164 $UCBDEF 0000 165 $VADEF 0000 166 $VECDEF Define ADP offsets. Define BIIC offsets. Define boot devices Define BUA Register offsets. Define CRB offsets. Define adapter types Define DOB offsets Define data structure type codes. Define interrupt dispatcher offsets. Define 11/780 I/O space. Define machine check masks. Define nexus device types. Define IPR numbers. Define 11/780 specific IPR numbers. Define Page Table Entry bits. Define Restart Parameter Block fields. Define UBA register offsets. Define UCB offsets. Define virtual address fields. Define vec offsets. INIADP780 V03-021 ;KPL0100 ;KPL0100 ·; KPLO 100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPLOlOO ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPLOlOO ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 -5 ;KPLOlQO -1 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 5 Macros to describe nexus configurations 19-0CT-1983 11 :50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP.(3) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 168 .SBTTL Macros to describe nexus configurations 169 170 The macros FLOAT NEXUS and FIXED NEXUS add one or more entries to a 171 nexus descriptor-table. Each entry is of the form: 172 +-------------------------------+ 173 PFN of nexus I/O space .1 . 2 bus 0 type .3 +-------+-------+---------------+ .4 type 0 -> floating nexus .5 .6 = type = bus non-zero -> fixed nexus; type fixed adapter type 0, if SB!; %x80 if BI (this is a VMS-only designation) .7 .8 .9 device_type: SB! adapters have 8-bit device type codes. These . 10 device types are simple integers. .11 . 12 BI adapters have 16-bit device type codes, that are . 13 subject to the following interpretation: .14 . 15 - the MSB of the device-type field wil 1 be 0 for DEC . 16 devices and 1 for non-DEC devices, . 17 . 18 - DEC memory devices wil 1 have Os in the high-order . 19 byte of the device type, .20 . 21 - non-DEC supplied memory devices will have a 1 in the .22 MSB of the high-order byte, and the rest of the high .23 order byte will contain Os. .24 .25 · .26 .27 - The "al 1 Os" and "all ls" device-type codes are reserved for DEC. .28 ; If SB! type codes were simply expanded to a word for purposes of the routines .29 ; in this module, there would be possible conflicts between SB! devices and .30 ; BI memory adapters supplied by DEC. Voila: the bus type. 179 ;_ 180 ; Macro FLOAT NEXUS. 181 ; INPUTS: - 182 ; PHYSADR -- physical address of 1 or more contiguous floating nexus 183 ; 184 NUMNEX slots = number of contiguous floating nexuses, default 185 PERNEX amount of address space per nexus (does not have to be 186 specified if NUMNEX = 1) 187 188 .MACRO FLOAT NEXUS PHYSADR,NUMNEX=l ,PERNEX=O 189 PA = PHYSADR - 190 .REPEAT NUMNEX For each nexus ... 191 .LONG <PA/AX200> S~ore PFN. .1 193 = .LONG 0 PA PA + PERNEX 194 .ENDR Store floating nexus type. Increment to physical address of next nexus. 195 .ENDM FLOAT_NEXUS 196 197 198 Macro FIXED_NEXUS. 199 IN I ADP780 V03-021 ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 6 Macros to describe nexus configurations 19-0CT-1983 11:50: 19 DISK$VMSMASTER:[SVSLOA.SRC)INIADP.(3) 00000000 00000001 00000001 00000002 00000000 80000000 FFFFFFFB 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 200 INPUTS: 201 PHYSADR - physical address of 1 or more contiguous fixed nexus slots 202 PERNEX - amount of address space per nexus 203 NEXUSTYPES - a list of fixed nexus types, enclosed in<> 204 205 .MACRO FIXED NEXUS PHYSADR,PERNEX=O,NEXUSTYPES 206 PA = PHYSADR 207 .IRP TVPECODE,NEXUSTYPES ; For each fixed nexus type ... 208 .LONG <PA/AX200> Store PFN. .1 .LONG TYPECODE Store fixed nexus type. . 2 PA = PA + PERNEX Increment to address of next nexus. .3 .ENDR .4 .ENDM FIXED NEXUS .5 . 6 .7 Macro NEXUSDESC TABLE - declare the beginning of a NEXUS descriptor table .8 .9 1st byte in table (at offset -5 from label) contains length of . 10 adapter type code field in CSR's on this bus. [Note for SBI like .11 busses, this is 1.] The next longword (at offset -4) in the . 12 table contains the Software defined bus type byte defined in the . 13 high order byte of the longword. [Note for SBI like busses, this . 14 value is 0, for the BI it is Ax80.] . 15 . 16 . 17 Define parameters that may be specified or used in macro invocation. . 18 . 19 BI LI KE 0 BI like bus. .20 SBI LI KE SBI like bus. . 21 .22 SBI CSR LEN Length of type code field in adapter CSR's .23 on SBI, CMI, etc. .24 BI CSR LEN = 2 Length of type code field in adapter CSR's .25 on BI. .26 .27 SBI BUS CODE = 0 Software defined bus code for SBI like busses. .28 BI BUS CODE = Ax80000000 Software defined bus code for the BI. .29 .30 .MACRO NEXUSDESC TABLE LABEL,BUS TVPE=SBI LIKE . 31 .IF EQ,BUS TYPE-SB! LIKE - - .32 - -.BYTE SBI CSR LEN .33 .LONG SBI=BUS-CODE .34 . I FF .35 .IF EQ,BUS TYPE-BI LIKE .36 - .BYTE - BI CSR LEN .37 .LONG BI=BUS=CODE .38 .IFF .39 .ERROR ; UNRECOGNIZED BUS TYPE, NEXUSDESC_TABLE; .40 .ENDC .41 .ENDC .42 .43 LABEL: .44 .ENDM NEXUSDESC TABLE .45 .46 CSR LEN OFFSET = -5 Offset before nexus descriptor of .47 byte containing length of adapter .48 type field in adapter CSR. INIADP780 V03-021 RLRSCORPIO RLRSCORPIO RLRSCORPIO RLRSCORPIO 5 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 7 Macros to describe nexus configurations 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SVSLOA.SRC]INIADP.(3) FFFFFFFC 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 .49 BUS CODE OFFSET = -4 .50 .51 .52 214 215 Macro END_NEXUSDESC. 216 217 .MACRO END NEXUSDESC 218 .LONG 0 - 219 .ENDM END NEXUSDESC Offset before nexus descriptor table of longword containing software defined bus type to be or'ed with adapter type to produce NOT$ value. PFN=O -> end of nexus descriptors. INIADP780 V03-021 ; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO , ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO -65 ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO : RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 8 Adapter-specific data structures 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRCJINIADP.(4) 0000 0000 0000 0000 0000 00000000 0000 0000 00000000 0000 0000 0000 0000 OOQOOOOO - 0000 00000000 0000 0000 0000 00000000 0000 00000000 0000 0000 0000 0000 0000 0000 00000000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0088 0000 0070 0002 0004 0004 00 0004 0005 0005 0005 0005 0005 0005 0005 00000000 0005 0009 0009 0009 0009 .1 .SBTTL Adapter-specific data structures . 2 .3 Put a symbol for arrays built by macros in the correct psects. .4 .5 ';***************** ADAPTERS array ************* .6 .PSECT $$$INIT$DATAO . 7 ADAPTERS: : Build adapter type code arrays here. .8 .9 .PSECT $$$INIT$DATA1 ; User contributions in this .PSECT. . 10 ; End of ADAPTERS array. .11 :***************** End of ADAPTERS array ************* . 12 . 13 ;***************** NUM PAGES array ************* . 14 .PSECT $$$INIT$DATA2 . 15 NUM PAGES: ; Build "number of pages to map" array . . 16 - .PSECT $$$INIT$DATA3 ; User contributions in this .PSECT. . 17 ;***************** End of NUM_PAGESarray ************* . 18 . 19 ;***************** !NIT ROUTINES array ************* .20 .PSECT $$$INIT$DATA4 . 21 !NIT ROUTINES: ; Build "address of init routine" array . .22 - .PSECT $$$INIT$DATA5 ; User contributions in this .PSECT. .23 ;***************** End of INIT ROUTINES array ************* 286 287 288 To add a new adapter type: 289 1) Add a new ADAPDESC macro invocation to the end of this list. 290 291 .PSECT $$$INIT$DATA,LONG 292 293 294 Default interupt vectors for UNIBUS system devices 295 (This array is indexed by the RPB field RPB$B DEVTYP, if the RPB field 296 RPB$W ROUBVEC is zero. If RPB$W ROUBVEC is not zero, then RPB$W ROUBVEC 297 is used and this array is not referenced at al 1. RPB$W ROUBVEC Ts set up 298 by PQDRIVER. RPB$L BOOTRO is set by VMB to contain the-device name in 299 ASCII, not the vector number and device type, as it does on full 300 architecture VAX machines. 301 302 BOOTVECTOR: 303 .WORD AX88 RK06/7 Interrupt vector 304 .WORD AX70 RLOl/2 Interrupt vector 305 . 1 BUS CSR LEN: . 2 - BYTE 0 Static byte containing the length (in bytes) of the adapter type field in the CSR's of . 3 the bus currently being configured. The .4 proper value for the bus of interest is .5 copied here, from the current nexus .6 descriptor table, when we enter subroutine . 7 CONFIG_IOSPACE. .8 .9 SW BUS CODE: . 10 - - LONG 0 Static longword containing the software defined bus type, of the bus currently being .11 configured, in the high order byte. The . 12 proper value for the bus of current interest . 13 is copied here, from the nexus descriptor . 14 table, when we enter subroutine INIADP780 V03-021 ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ·; RLRSCORPI 0 ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO -8 _,;RLRSCORPIO ;KPL0100 ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO - ADAPTER INITIALIZATION FOR VAX 11/780 3-JuN-1984 14:53:36 VAX-11 Macro V03-0l Page 9 Adapter-specific data structures 19-0CT-1983 11 :50:19 DISK$VMSMASTER: [SYSLOA.SRC]INIADP.(4) 00000000 00000001 00000080 0009 0009 0009 0009 0009 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 OOOD 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 . 15 CONFIG IOSPACE . . 16 . 17 DIRECT_VEC_NOOE_CNT: Static longword that counts the number of . 18 direct vectoring adpater nodes that we have . 19 .LONG 0 run across so far. .20 . 21 $$$VMSDEFINED Define symbol that means VMS system software. .22 NUMUBAVEC = 128 ALLOW FOR 128 UNIBUS VECTORS .23 .24 ADAPDESC - ; Memory. ** MUST BE 1ST IN DESCRIPTOR LIST ** .25 AOPTYPES=<NDT$ MEM1664NI,NDT$ MEM4NI,NOT$ MEM4I,NDT$ MEM16NI, - .26 NOT$ MEM16I,NDT$ MEM64NIL,NDT$ MEM64EIL,NDT$-MEM64NIU, - .27 NDT$-MEM64EIU, NOT$ MEM64I, NOT$ SCORMEM> - - 314 NUMPAGES=1 - 315 316 ADAPDESC - ; MASSbus. 317 ADPTYPES=NDT$ MB, - 318 NUMPAGES=8, -- 319 INITRTN=INI$MBADP 320 321 ADAPDESC - ; UNibus. .1 ADPTYPES=<NDT$ UBO,NDT$ UB1 ,NOT$ UB2,NDT$ UB3,NDT$ BUA>, - 323 NUMPAGES=8, - - - - 324 INITRTN=INI$UBSPACE 325 326 ADAPDESC - ; Multi-port memory. 327 ADPTYPES=<NDT$ MPMO,NDT$ MPM1,NDT$ MPM2,NDT$ MPM3>, - 328 NUMPAGES=1, - - - - - 329 INITRTN=INI$MPMADP 330 331 ADAPDESC - ; DR32. 332 ADPTYPES=NDT$ DR32, - 333 NUMPAGES=4, -- 334 INITRTN=INI$DRADP 335 336 AOAPDESC - ; CI780 337 ADPTVPES=NDT$ CI, - .1 NUMPAGES=9, -- . 2 INITRTN=INI$CIADP .3 .4 ADAPDESC - ; KDZ11 Processor .5 ADPTVPES=NDT$ KDZ11, - .6 NUMPAGES=1, -- . 7 INITRTN=INI$KDZ11 .8 INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 10 Adapter-specific data structures 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC)INIAOP.(4) 00000001 00000003 00000004 08 0030 00 01 0030 02 01 0030 04 OOOD OOOD OOOD OOOD OOOD OOOD 0000 0000 0001 0003 0004 0004 0000 OOOD 0000 0000 OOOD OOOD OOOD OOOE 0010 0011 0011 0011 0012 0014 0015 0015 0015 0016 0018 0019 343 344 TABLES OF ADAPTER-DEPENDENT INFORMATION 345 346 THE TABLE OFFSETS ARE: 347 348 $DEFINI ADPTAB 349 350 ADPTAB IDBUNITS:.BLKB # UNITS TO SET IN IDB 351 ADPTAB-ADPLEN: .BLKW LENGTH OF ADP 352 ADPTAB-ATYPE: .BLKB ADP TYPE 353 354 $DEFEND ADPTAB 355 356 357 TABLES THEMSELVES: 358 359 360 MBA TAB: TABLE OF MBA CONSTANTS 361 .BYTE 8 # UNITS IN MBA IDB 362 .WORD ADP$C MBAADPLEN # BYTES IN MBA ADP 363 .BYTE AT$ MBA MBA ADAPTER TYPE 364 365 DRTAB: TABLE OF OR32 CONSTANTS 366 .BYTE 1 # UNITS IN DR IDB 367 .WORD ADP$C DRADPLEN # BYTES IN DR ADP 368 .BYTE AT$_DR DR A.DAPTER TYPE 369 370 CITAB: TABLE OF CI CONSTANTS 371 .BYTE 1 # UNITS IN CI IDB 372 .WORD ADP$C CIADPLEN # BYTES IN CI ADP 373 .BYTE AT$ CI CI ADAPTER TYPE 374 INIADP780 V03-021 ;KPL0100 ;KPL0100 ;KPL0100 ;KPL0100 ;KPLOlOO ; RLRSCORPIO ; RL~SCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO -7 ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;KPL0100 ;KPLOlOO ;KPLOlOO ;KPLOlOO ;KPLOlOO ; KPL0.100 ;KPL0100 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 11 CPU-specific data structures 19-0CT-1983 11:50:19 DISK$VMSMASTER: [SYSLOA.SRC]INIADP.(5) 04EC' 00000001 00000000 00000040 OOOOOOE4 000001E4 000002E4 0019 0019 0019 0019 0019 0019 0019 0019 0019 0019 0018 0018 0018 0018 0018 0018 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 OOAO OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 00A4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOA4 OOE4 OOE4 01E4 01E4 378 .SBTTL CPU-specific data structures 379 380 To add a new CPU type: 381 1) Create a new nexus descriptor table, using FLOAT NEXUS and 382 FIXED_NEXUS macros. Put an END NEXUSDESC macro at the end. 383 384 386 387 CPU ADPSIZE: 388 - . WORD ADP$C U8AADPLEN+UBINTSZ+<NUMUBAVEC*4> 389 .1 . 2 . 3 Declare the beginning of a nexus-descriptor table. .4 .5 NEXUSDESC TABLE LABEL=NEXUSDESC .6 . 7 .8 Describe al 1 possible nexuses on an 11/780. .9 . 10 S8I CPU = 1 .11 = BI CPU 0 397 FLOAT NEXUS - 398 - PHYSADR=I0780$AL IOBASE, - 3·99 NUMNEX=I0780$AL NNEX, - 400 PERNEX=I0780$AL-PERNEX 401 END NEXUSDESC 403 436 458 495 496 513 .24 .25 .26 Nexus "descriptor" arrays -- U1ese ar·r·ays hold the nexus-device type and .27 virtual address of every adapter on the system. The arrays, CONFREGL and .28 S8ICONF, are al located enough space to hold the maximum number of adapters .29 that can be attached to any CPU. When the code discovers how many adapters .30 actually exist on the system, it will al locate space from non-paged pool . 31 and move a permanent copy of these arrays into that space. .32 .33 MAXNEXUS = 64 .34 CONFREG: .35 .8LK8 MAXNEXUS Byte array of nexus-device type codes .. .36 SBICONF: .37 .BLKL .38 CON FR EGL: MAXNEXUS Longword array of VAs of adapter space. .39 .BLKL MAXNEXUS Longword array of nexus-device type codes INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11 /780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 12 Message strings 19-0CT-1983 11: 50: 19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP.(6) 00000000 OOOOOOOA 45 58 45 25 OA OD 20 54 49 4E 49 43 75 73 6E 49 20 46 65 69 63 69 66 66 54 50 53 20 74 6E 69 72 74 6E 65 20 00 OA OD 73 65 45 58 45 25 OA OD 2D 54 49 4E 49 43 42 49 4E 55 2D 46 60 65 60 20 53 55 6F 64 20 79 72 6F 74 6F 6E 20 73 65 74 72 61 74 73 20 OD 30 20 74 61 20 00 OA 02E4 02E4 02E4 02E4 02E4 02E4 02EA 02FO 02F6 02FC 0302 0308 030D 030D 0313 0319 031F 0325 032B 0331 0337 0330 528 .SBTTL 529 530 CR = 13 531 LF = 10 532 NOSPT: 533 .ASCIZ Message strings <CR><LF>/%EXECINIT-F-Insufficient SPT entries/<CR><LF> 535 BADUMR: 536 .ASCIZ <CR><LF>/%EXECINIT-f-UNIBUS memory does not start at O/<CR><LF> INIADP780 V03-021 ;RLR'SCORPIO ; RLRSCORPIO ; RLRSCORP0IO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO -4 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 13 INI$IOMAP, Initialize and map nexuses 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SVSLOA.SRC]INIADP.(7) OFFF BF OOOOOOOO'GF 52 OOOOOOOO'GF 53 53 6342 52 52 09 80000000 BF 52 54 OOOOOOOO'GF 59 SC A9 F7 SF 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 00000000 0000 0000 BB 0000 0004 0004 0004 DO 0004 OOOA DO OOOB 0011 DE 0012 78 0016 ca OOlA 0020 04 0021 DO 0023 0029 78 002A 539 .SBTTL INI$IOMAP, Initialize and map nexuses 540 ;++ 541 FUNCTIONAL DESCRIPTION: 542 This routine is executed only once, during system initialization. 543 It loops through al 1 nexuses on the system, testing for 544 adapters. When it finds an adapter, it maps its I/O space and 545 initializes it. 546 547 INPUTS: 548 800$GL SPTFREL - next free VPN 549 MMG$GL-SPTVASE - base of system page table 550 EXE$GL-RPB - address of reboot parameter block 552 RPB$L_ADPPHV(RPB) -· PFN of boot adapter space 554 555 OUTPUTS: 556 RO - SS$_NORMAL 557 558 For each adapter found, its accessible I/O space is mapped to virtual 559 addresses. An ADP (Adapter Control Block) is built, and the hardware 560 adapter is initialized. 561 562 The arrays CONFREG (a byte array of nexus-device type codes, defined .1 by NOT$ symbols) and SBICONF (a longword array of . 2 virtual-addresses that map adapter space) are initialized. Pointers .3 to these arrays are stored in EXE$GL CONFREG and .4 MMG$GL SBICONF. The number of entries in these two parallel arrays is .5 stored-in EXE$GL NUMNEXUS. . 6 . 7 Since BI devices have a 16-bit device type code, a new CONFREG array is .8 constructed. This is a longword array called CONFREGL. 567 568 Several locations in the RPB that describe the boot device are init'ed: 569 RPB$L BOOTRl - holds index into CONFREG and SBICONF for the boot 570 adapter 571 RPB$L ADPVIR - holds VA of boot device adapter's register space 572 RPB$L=CSRVIR - holds VA of boot device's register space 573 574 575 .PSECT $$$INIT$CODE,QUAD 576 INI$IOMAP:: 577 578 PUSHR #AM<RO,Rl ,R2,R3,R4,R5,R6,R7,R8,R9,Rl0,Rll> 579 580 Set up common inputs to CONFIG_IOSPACE subroutine for the CPU-specific code. 581 582 MOVL GA800$GL_SPTFREL,R2 Get next available VPN. 583 MOVL GAMMG$GL SPTBASE,R3 Get base of System Page Table. 584 MOVAL (R3)[R2],R3 585 ASHL #9,R2,R2 586 BISL #VA$M SVSTEM,R2 Compute SVASPT. Convert VPN to VA. Set system bit. 587 CLRL R4 588 MOVL GAEXE$GL_RPB,R9 Clear index into CONFREG and SBICONF. Get address of RPB. 590 ASHL #-9,RPB$L_ADPPHV(R9),Rl0; Get PFN of boot adapter space~ INIADP780 V03-021 ;KPL0100 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 14 INI$IOMAP, Initialize and map nexuses 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC)INIADP.(7) 5A 002F OOE4'CF DE 0030 592 OOOOOOOO'GF 0034 OOA4'CF DE 0039 593 OOOOOOOO'GF 003D 01E4'CF DE 0042 .1 OOOOOOOO'GF 0046 MOVAL MOVAL MOVAL WASBICONF,GAMMG$GL_SBICONF ; Set pointers to local copies WACONFREG,GAEXE$GL_CONFREG ; of these arrays for in it routines. WACONFREGL,GAEXE$GL_CONFREGL ; ... INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 15 INITADP_780, 750, 730, and UVl 19-0CT-1983 11:50:19 DISK$VMSMASTER: [SVSLOA.SRC]INIADP.(8) 004B 691 .SBTTL INITADP 780, 750, 730, and UVl 004B 692 004B 693 I/O address space for the 11/780, 11/750, 11/730, and Micro-VAX I cpus 0048 694 is statically defined in their respective nexus descriptor tables. 0048 695 56 0020'CF DE 0048 696 MOVAL W1'NEXUSDESC,R6 Get address of nexus table. 5B 04 0050 697 CLRL R 11 Signal use 1st page of SCB. OB 10 0052 698 BSBB CONFIG IOSPACE Configure processor I/O space. 0054 699 0054 701 OOC3 30 0054 702 OFFF 8F BA 0057 703 8SBW POPR CREATE ARRAYS ; Create CONFREG and S8ICONF arrays. #1'M<RO~R1 ,R2,R3,R4,R5,R6,R7,R8,R9,R10,R11> 50 01 DO 0058 704 MOVL #1 ,RO ; Set success status 05 005E 705 RSB ; Return. INIADP7BO V03-021 RLRSCORPIO RLRSCORPIO RLRSCORPIO RLRSCORPIO RLRSCORPIO RLRSCORPIO KPLOlOO KPL0100 KPLOlOO - ADAPTER INITIALIZATION FOR VAX ll/7BO 3-JUN-19B4 14:53:36 VAX-11 Macro V03-0l Page 16 CONF I G IOSPACE 19-0CT-19B3 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP.(9) F8 A6 0004'CF FC A6 0005'CF 5B B6 01 90000000 BF 63 5B 51 62 11 50 OOA4'CF44 01E4'CF44 55 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F. 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F 005F 90 005F 0062 DO 0065 0068 0068 006B DO 0068 12 006E 05 0070 0071 0071 0071 0071 0071 C9 0071 0077 0079 0079 DO OOB5 OOB8 0089 EB 008C OOBF 008F OOBF 94 008F 04 0094 04 0099 70B .SBTTL CONFIG_IOSPACE 709 710 CONF I G !OS PACE 711 Given a nexus descriptor table, which describes what "nexuses" or 712 "slots" are available on a system to hold I/O adapters, find and 713 initialize all adapters on the system. 714 715 Inputs: 716 R2 - next available virtual address, to be used for mapping I/O space 717 R3 - address of PTE associated with VA in R2 71B R4 - Current index into CONFREG and SBICONF arrays (should be 0 the 719 first time CONFIG IOSPACE is cal led) 720 R6 - address of nexus descriptor table 721 R9 - address of Restart Parameter Block (RPS) 722 R10 - PFN of boot adapter space 723 R11- page offset from beginning of SC8; tel ls which page of the SCB 724 to use for this set of nexuses (passed to routines that init ADP) 725 726 Outputs: 727 R2,R3,R4 - updated 72B R9,Rl0,Rll - preserved; all other registers potentially modified 729 CONFREG - initialized with adapter NOT$ code for each nexus 730 SBICONF - initialized with adapter space VA for each nexus 731 732 CONFIG IOSPACE: 734 735 Main loop. Map and initialize all adapters on system. 736 .1 . 2 MOVB CSR LEN OFFSET(R6),- Move length of adapter type field . 3 WABUS CSR LEN in CSR's to static location. .4 MOVL BUS CODE OFFSET(R6),- Move software defined bus type code .5 W/\$W BUS-CODE to static longword. .6 742 NXT NEXUS: For each nexus ... 743 MOVL (R6)+,R8 Get PFN of nexus. 745 8NEQ TEST NEXUS If PFN non-zero, go test the slot. ·746 RSB 747 If 0, we've found all nexuses. 74B Read configuration register to determine if anything is present at this 749 nexus. 750 751 TEST NEXUS: 752 BISL3 #PTE$M VALID!PTE$C KW,- ; Temporarily associate VA in R2 with 753 R8,(R3) - ; PFN in RB via SPTE in R3. 754 $PRTCTINI BA10$, - ; Protect fol lowing code from non- 755 #<MCHK$M NEXM!MCHK$M LOG>; existent memory machine checks. 756 MOVL (R2),R1 - - ; Read adapter configuration register. 757 $PRTCTEND 10$ End of protected code. 758 INVALID R2 759 BLBS RO,GET TYPE Clear TB of temporary mapping. Branch if no machine check occurred. 760 761 No adapter present at this nexus. 762 .1 CLRB W/\CONFREG[R4J Store "unknown" type in CONFREG .2 CLRL W/\CONFREGL[R4J .3 CLRL R5 and in CONFREGL also. Use general memory type to map INIADP780 V03-021 ;KPL0100 ;KPL0100 -4 ;RLRSCORPIO "; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLR'SCORPIO ; RLRSCORPIO ; RLRSCORP'IO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO -16 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 17 CONFIG_IOSPACE 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP.(9) 56 04 59 57 86 14 0004'CF 01 05 57 51 03 57 51 57 0005'CF OOA4'CF44 57 01E4'CF44 57 55 50 OOOO'CF45 OOOO'CF BE 50 3F 60 57 04 55 EB 5A 58 15 60 A9 52 20 AS 54 OD 00 51 54 A9 1000 C241 58 A9 0096 co 0096 11 DOSE OOAO OOAO OOAO OOAO DO OOAO 12 OOA3 OOA5 OOA5 OOA5 OOA5 OOA5 91 OOA5 OOAA 13 OOAA 3C OOAC 11 OOAF SA 0081 0084 ca 0084 0089 0069 0089 0089 008S so 0089 DO OOBF D4 OOC5 OOC7 DE OOC7 9F OOCO 01 0001 lE 0004 01 0006 13 OOD9 06 OOD6 1 1 ODDO OODF OODF OODF OODF OODF Dl OODF 12 OOE2 DO OOE4 DO OOEB EF OOEC OOEF OOF2 9E OOF2 OOF7 OOF9 OOF9 OOF9 OOF9 .4 one page of I/O space. .5 ADDL2 #4,R6 Step past type code in nexus table. 767 8R8 MAP NEXUS Go map I/O space for this nexus. 769 770 Execution continues here if adapter was present. 771 772 GET TYPE: .1 - MOVL (R6)+,R7 ; Get nexus-device type from nexus table. . 3 BNEQ GET GEN TYPE ; Branch if fixed slot. .4 . 5 Floating-type slot. Use type from configuration register . .6 Determine if type in configuration register is 8-bits or 16-bits. . 7 · 8 .9 CMPB #1,W/\BUS_CSR LEN Determine length of adapter type . 10 field in CSR contained in R7. . 11 BEQL 10$ EQL implies 1 byte (8-bit) field. . 12 MOVZWL R1 ,R7 BI LIKE, so use word instruction. . 13 8RB 20$ Skip byte instruction. . 14 10$: MOVZBL R1, R7 Use byte instruction to get type. . 15 20$: .16 BISL WASW_BUS CODE,R7 Or in software bus code. . 18 . lS Here R7 has hardware adapter code or'ed with software bus code. .20 Translate specific nexus device type code into general adapter type code. . 21 .22 G' ET GEN TYPE: .23 - -MOVB R7,WACONFREG[R4] Save nexus-device type in CONFREG. .24 MOVL R7,WACQNFREGL[R4] CONFREGL also filled in. .25 CLRL R5 Clear loop index. .26 30$: .27 MOVAL WAADAPTERS[R5],RO Get address of adapter type code. .28 PUSHAB WANUM PAGES Push addr of end of ADAPTERS array. .29 CMPL RO, (SP)+ See if we went beyond array. .30 BGEQU END NEXUS unrecognized adapter, do not map. .31 CMPL R7,(RO) Adapter type match~ .32 8EQL 40$ .33 INCL R5 .34 8R8 30$ If EQL yes, adapter type match. Increment loop index. Look at next adapter. .35 40$: 789 790 791 Store boot parameters. 792 794 CMPL R8,R10 795 BNEQ MAP NEXUS Does PFN match boot adapter's PFN? No; continue. 797 MOVL R2,RP8$L ADPVIR(R9) Store VA of boot adapter space. 798 7S9 MOVL EXTZV = R4,RPB$L-600TR1(R9) #0,#13, Store boot adapter nexus number. Get offset into UNI8US/Q6US I/O page. 800 RPB$L CSRPHY(R9),R1 801 MOVA8 <8*512>(R2)[R1], - Set VA of UNI8US/Q6US registers. 802 RPB$L_CSRVIR(R9) 803 804 605 INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 18 CONFIG IOSPACE 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SVSLOA.SRC]INIADP.(9) OOE4'CF44 52 51 OOOO'CF45 6C 51 OOOO'CF45 61 04 00 6141 54 FF51 OOF9 OOF9 OOF9 OOF9 OOF9 OOF9 DO OOF9 3C DOFF 10 0105 DE 0107 05 010D 13 010F 16 0111 0115 06 0115 31 0117 01 lA 806 ; R5/ general adapter type; index into "general" adapter arrays. 807 ; For each adapter - 808 ; Map the # of pages specified in ADAPDESC macro 809 ; JSB to in it i a 1 i za ti on routine specified in ADAPDESC macro 810 ; 811 MAP_NEXUS: 816 MOVL R2,WAS8ICONF[R4] ; Save VA of adapter space in SBICONF. 817 MOVZWL WANUM PAGES[R5] ,Rl ; Get number of pages to map. 818 BSBB MAP PAGES ; Map the I/0 pages. 819 MOVAL WA!NIT_ROUTINES[R5] ,Rl ; Get address of initialization routine. 820 TSTL ( R1) ; In it i a 1i za ti on routine specified? 821 BEQL END NEXUS ; Branch if none. 822 JSB @(Rl)[Rl] : Ca 11 in it i a 1 i za ti on routine. 823 END_NEXUS: 824 INCL R4 ; Increment CONFREG and SBICONF index. 826 BRW NXT NEXUS ; Go do next nexus. 830 INIADP7BO V03-021 KPL0100 KPL0100 KPL0100 KPL0100 KPL0100 KPL0100 ;KPL0100 ;KPLOlOO ;KPL0100 ;KPL0100 ;KPL0100 KPL0100 KPLOlOO KPL0100 KPLOlOO ;KPL0100 ;KPL0100 ;KPLOlOO ;KPL0100 -11 - ADAPTER INITIALIZATION FOR VAX 11/7BO 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 19 CREATE_ARRAYS 19-0CT-1983 11:50:19 DISK$VMSMASTER: [SYSLOA.SRC]INIADP(10) 54 OOOOOOOO'GF 51 QC A444 51 6144 02A7 82 B2 51 B2 0763 BF 62 OOOOOOOO'GF 51 6244 51 OOOOOOOO'GF 6144 OOOOOOOO'GF 14 OOA4'CF 54 62 14 51 54 04 7E 51 OOE4'CF 51 6244 51 BE 01E4'CF 51 63 011 A 011A 011A 011A 01 lA 01 lA 011A 01 lA 01 lA 01 lA 011A 011A 011A 01 lA 01 lA 01 lA 01 lA 011A DO 01 lA 011 c DE 0121 0126 DE 0126 30 012A 7C 012D BO 012F BO 0132 9E 0137 0139 9E 013E DO 0142 0144 DE 0149 014C BB 0151 2B 0153 015B BA 0159 C5 0158 DO 015F 2B 0162 0167 DO 0169 2B 016C 0171 0172 0172 0172 05 0172 B32 .SBTTL CREATE ARRAYS 833 834 CREATE ARRAYS B35 836 Move the local CONFREG and SBICONF arrays into non-paged pool. 837 838 Inputs: 839 R4 - Number of nexuses on the system. 840 CONFREG and SBICONF have been initialized. 841 842 Outputs: 843 RO - R5 destroyed 844 EXE$GL CONFREG points to a copy of the CONFREG ar·ray in non-paged pool 845 MMG$GL-SBICONF points to a copy of the SBICONF array in non-paged pool 846 EXE$GL=NUMNEXUS contains the number of nexuses on the system 847 848 849 CREATE ARRAYS: 850 - MOVL R4,GAEXE$GL NUMNEXUS Store number of nexuses on system. 851 MOVAL 12(R4) [R4] ,Rl Al locate n bytes for CONFREG plus 852 4n bytes for SBICONF + header .1 MOVAL ( R 1 ) [ R4 J , R 1 Another 4n bytes for CONFREGL. .2 BSBW ALON PA GD Get pool for CONFREG and SBICONF. . 3 CLRQ (R2)+ Clear out unused .4 MOVW Rl, (R2)+ Set in size . 5 MOVW #<DYN$C CONF@B>!DYN$C INIT,(R2)+ ; Set type and subtype .6 MOVAB (R2),GAEXE$GL CONFREG Store address of system CONFREG. .7 MOVAB (R2) [R4J ,Rl Two steps to CONFREGL, 1st, SBICONF, .8 MOVL Rl,GAMMG$GL SBICONF Store address of system SBICONF. .9 MOVAL (R1)[R4] ,GAEXE$GL CONFREGL ; And address of system CONFREGL. . ,0 PUSHR #AM<R2,R4> Save pool address and nexus count. .11 MOVC3 R4,WACONFREG,(R2) Copy CONFREG to pool. . 12 POPR #AM<R2,R4> Retrieve pool address and nexus count. . 13 MULL3 #4,R4,R1 Number of bytes in SBICONF. . 14 MOVL Rl ,-(SP) Save, SBICONF size = CONFREGL size . 15 MOVC3 Rl,WASBICONF,(R2)[R4J Copy SBICONF to pool. . 16 MOVL (SP)+,Rl Restore size of SBICONF and CONFREGL. . ,7 MOVC3 Rl,WACONFREGL,(R3) Copy CONFREGL to pool. R3 is output . 18 . 19 864 865 RSB from SBICONF MOVC3, so SBICONF and CONFREGL must be adjacent. INIADP7BO V03-021 - ADAPTER INITIALIZATION FOR VAX 11/7BO 3-JUN-19B4 14:53:36 VAX-11 Macro V03-0l Page 20 - MAP_PAGES 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(11) 90000000 BF 83 5B 58 52 0200 C2 OOOOOOOO'GF OOOOOOOO'GF OOOOOOOO'GF 04 DB 51 51 02E4'CF 5B OOOOOOOO'GF 0173 0173 0173 0173 0173 0173 0173 0173 0173 017~ 0173 0173 0173 0173 0173 C9 0173 0179 017B D6 017B 9E 0170 06 0182 01 0188 OlBE 0193 15 0193 F5 0195 05 0198 0199 0199 9E 0199 019E 04 019E 16 01AO 00 01A6 867 .SBTTL MAP PAGES 868 ;++ 869 INPUTS: 870 Rl/ Number of pages to map. 871 R2/ VA of page to map. 872 R3/ VA of system page table entry to be used. 873 RB/ PFN of page(s) to map. B74 875 OUTPUTS: 876 R2,R3 updated; Rl ,RS destroyed; all other registers preserved 877 878 879 880 MAP PAGES: 8Bl 882 BISL3 #<PTE$M_VALIO!PTE$C KW>,R8,(R3)+ 883 Map a page. 884 INCL RS Next PFN. 885 MOVAB 512(R2) ,R2 Next VA. 886 INCL GAB00$GL SPTFREL Next free entry. 887 CMPL GAB00$GL=SPTFREH, - Check for no more system page 888 889 BLEQ 890 SOBGTR 891 RSB 892 893 ERROR HALT: 894 - MOVAB 895 ERROR HALT 1: 896 - CLRL 897 JSB 898 HALT GAB00$GL SPTFREL ERROR HALT Rl,MAP PAGES WANOSPT,Rl Rl 1 GAEXE$0UTZSTRING table entries. Branch if out of SPTEs. Map another page. Al 1 done. Set error message. Indicate console terminal. Output error message. ***** FATAL ERROR ******* INIADP780 V03-021 ;KPL0100 -1 ;RLRSCORPIO ;RLRSCORPIO ; RLR.SCORPIO ;RLRSCORPIO -2 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 21 INI$UBSPACE 19-0CT-1983 11:50:19 DISK$VMSMASTER: [SYSLOA.SRC]INIADP(13) 58 01E4'CF44 69 02 00 58 58 58 09 001009FO BF 58 51 10 FFBO 01A7 1016 .SBTTL INI$UBSPACE 01A7 1017 ;++ 01A7 1019 Map UNIBUS space; ihitialize UNIBUS ADP. 01A7 1019 01A7 10.20 INPUTS: 01A7 1021 R2 - VA of next free system page 01A7 1022 R3 - VA of system page table entry to be used to map VA in R2 01A7 1023 R4 - nexus identification number of this adapter 01A7 .1 -8(R6) - PFN of this UNIBUS adapter's register space 01A7 1025 01A7 1026 OUTPUTS: 01A7 1027 UNIBUS space is mapped. 01A7 1028 INI$UBADP is called to build an ADP block and initialize UNIBUS 01A7 1029 adapter hardware. 01A7 1030 01A7 1031 01A7 1032 01A7 1033 INI$UBSPACE: 01A7 1034 DE 01A7 .3 MOVAL WACONFREGL[R4] ,RB RB => CONFREGL slot. EF OlAD .4 EXTZV #0,#2,(R8),R8 Get UBA number. 01B1 18 01a2 . 5 ASHL #9,R8,R8 Position UB number. 01B6 .8 01B6 1037 co 01B6 1039 ADDL #<I07B0$AL_UBOSP+A0760000/AX200>,R8 OlBC OlBO 1040 ; Get PFN of Ub I/0 page. 01BO 1042 01BO 1047 0180 1052 0180 1058 0180 1063 DO OlBD 1064 30 OlCO 1065 MOVL BSBW #16,Rl MAP PAGES Number of pages to map (UB/Qbus space). Map I/O pages. 01C3 1066 01C3 1067 Call adapter initialization routine. 01C3 1068 01C3 1069 BSBW INI$UBADP !nit ADP block. 01C3 1070 RSB INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 22 INI$UBADP - BUILD ADP AND INITIALIZE UBA 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC)INIADP(14) 01C3 1072 .SBTTL INI$UBADP - BUILD ADP AND INITIALIZE UBA 01C3 1073 ;+ 01C3 1074 INI$UBADP ALLOCATES AND FILLS IN AN ADAPTER CONTROL BLOCK, INTERRUPT 01C3 1075 DISPATCHER AND CONNECTS THEM TO THE PROPER SCB VECTORS. A CALL IS 01C3 1076 THEN MADE TO UBA$INITIAL TO INITIALIZE THE ADAPTER HARDWARE. 01C3 1077 01C3 1078 INPUT: 01C3 1079 R4 - nexus identification number of this adapter 01C3 1080 Rll- offset from beginning of SCB to correct SCB page for this adapter 01C3 1081 01C3 1082 01C3 1083 INI$UBADP: 01C3 1084 OlFF BF BB 01C3 1085 PUSHR #AM<RO,R1,R2,R3,R4,R5,R6,R7,R8> ; SAVE RO-RB 01C7 1086 01C7 1087 Al locate and initialize Adapter Control Block (ADP). 01C7 1088 51 0019'CF 3C 01C7 1089 MOVZWL WACPU ADPSIZE,Rl PICK UP LENGTH OF ADP 0205 30 OlCC 1090 BSBW ALONPAGD ALLOCATE SPACE FOR ADP 08 A2 51 BO OlCF 1091 MOVW Rl ,ADP$W SIZE(R2) SET SIZE INTO ADP BLOCK OA A2 01 90 0103 1092 MOVB #DYN$C ADP, - AND SET TYPE OF BLOCK 0107 1093 ADP$B TYPE(R2) OE A2 01 BO 0107 1094 MOVW #AT$ USA, - SET TYPE OF ADAPTER OlDB 1095 ADP$W ADPTYPE(R2) 62 OOE4'CF44 DO OlDB ·1096 MOVL WASBICONF[R4]. - SET VA OF CONFIGURATION REG OlEl 1097 ADP$L CSR(R2) OC A2 54 BO OlEl 1098 MOVW R4,ADP$W_TR(R2) SET TR NUMBER FOR ADAPTER 01E5 1099 50 14 A2 DE 01E5 1100 MOVAL ADP$L DPQFL(R2),RO ADDRESS OF DATA PATH WAIT QUEUE 60 50 DO 01E9 1101 MOVL RO,(RO) !NIT QUEUE HEADER 04 AO 50 DO OlEC 1102 MOVL R0,4(RO) OlFO 1103 50 30 A2 DE OlFO 1104 MOVAL ADP$L MRQFL(R2),RO ADDRESS OF MAP WAIT QUEUE 60 50 DO 01F4 1105 MOVL RO. (RO) !NIT QUEUE HEADER 04 AO 50 DO 01F7 1106 MOVL R0,4(RO) 04 A2 D4 OlFB 1107 CLRL ADP$L LINK ( R2) ZAP ADAPTER CHAIN LINK FDFF' 30 01FE 1108 BSBW ADPLINK LINK ADP TO END OF LIST 0201 1109 0201 1110 Initialize adapter interrupt vectors in System Control Block. 0201 11 1 1 OOOOOOOO'GF DO 0201 1112 MOVL GAEXE$GL_SCB,R8 GET SCB ADDRESS 58 0207 0208 1113 0208 1120 0208 1122 0208 1123 0208 1124 Following ASSUME breaks if the ADP length is not a multiple of 4, thereby 0208 1125 causing the vectors to NOT be long word aligned. 0208 1126 0208 1127 ASSUME ADP$C_UBAADPLEN/4*4 EQ ADP$C_UBAADPL:.EN 0208 1128 53 02EC'C2 9E 0208 1129 MOVAB ADP$C UBAADPLEN+UBINTSZ(R2)hRS ; LOCATE VECTORS 10 A2 53 DO 020D 1130 .MOVL R3, ADP$L VECTOR ( R2) ; AND 'RECORD IN ADP FFFE BF BO 0211 1131 MOVW #AXFFFE,ADP$W_DPBITMAP(R2) ; MARK DATAPATHS 1-15 AVAILABLE 60 A2 0215 53 FF6C'C3 9E 0217 1132 MOVAB -UBINTSZ(R3),R3 BASE OF INTERRUPT CODE 3F BB 021C 1133 PUS HR #AM<RO,Rl,R2,R3,R4,R5> SAVE MOVC REGISTERS INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 23 INI$UBADP - BUILD ADP AND INITIALIZE UBA 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(14) 0094·' 8F 63 0340'CF 3F 54 04 00 54 50 0100 C844 1C A2 50 60 01'A3 40 AO 21'A3 41 'A3 0080 co 61 'A3 ooco co 50 62 OA'A3 50 2A'A3 50 4A'A3 50 6A'A3 50 0089'C3 52 OOOO'CF 0090'C3 01 'A3 44 A2 21 'A3 48 A2 41 I A3 4C A2 61 'A3 50 A2 54 52 52 62 7COOOOOO BF 04 A2 OOOOOOOO'GF 54 A4 63 58 A4 20 A3 52 54 OOOOOOOO'GF 53 54 OOOO'CP: 50 10 A2 80 54 51 7F BF 80 53 FA 51 28 021E 1134 MOVC3 #UBINTSZ,WAUBAINTBASE,(R3) COPY INTERRUPT CODE 0222 BA 0226 1135 POPR #AM<RO,Rl ,R2,R3,R4,R5> RESTORE MOVC REGISTERS EF 0228 1136 EXTZV #0,#4,R4,R4 Use low 4 bits of nexus number. 022C DE 022D 1137 MOVAL AXlOO(RB) [R4J ,RO COMPUTE lST VECTOR ADDRESS DO 0233 1138 MOVL RO,AOP$L AVECTOR(R2) SAVE ADDR OF ADAPTER SCB VECTORS 9E 0237 1139 MOVAB BAUBAINT4+1(R3),(RO) STORE VECTOR FOR BR4 9E 0238 1140 MOVAB BAUBAINT5+1(R3),64(RO) STORE VECTOR FOR BR5 9E 0240 1141 MOVAB BAUBAINT6+1(R3),128(RO) STORE VECTOR FOR BR6 0243 9E 0246 1142 MOVAB BAUBAINT7+1(R3),192(RO) STORE VECTOR FOR BR7 0249 DO 024C 1143 co 024F 1144 co 0253 1145 co 0257 1146 co 0258 1147 MOVL ADDL ADDL ADDL ADDL ADP$L CSR(R2),RO R0,BALJBAINT4REL(R3) R0,BAUBAINT5REL(R3) R0,BAUBAINT6REL(R3) R0,BAUBAINT7REL(R3) GET UBACSR ADDRESS ADD CSR VA TO EACH OF THE BICL INSTRUCTIONS IN THE INTERRUPT DISPATCHERS DO 025F 1148 MOVL R2,UBAINTADP(R3) SET ADDRESS OF ADAPTOR CONTROL BLOCK 9E 0264 1149 MOVAB WAEXE$UBAERR INT,- 0268 1150 UBAERRADR(R3) : SET ADDRESS OF ERROR HANDLER 9E 026B 1151 MOVAB BAUBAINT4+1(R3),- 026E 1152 ADP$L UBASCB(R2) ; SAVE 4 SCB VECTOR CONTENTS 9E 0270 1153 MOVAB BAUBAINl5+1(R3),- 0273 1154 ADP$L UBASCB+4(R2) : DITTO 9E 0275 1155 MOVAB BAUBAINT6+1(R3),- 0278 1156 ADP$L UBASCB+B(R2) : DITTO 9E 027A 1157 MOVAB BAUBAINT7+1(R3),- 027D 1158 ADP$L UBASCB+12(R2) DITTO DO 027F 1159 MOVL R2,R4 - COPY ADP ADDRESS DO 0282 1160 MOVL ADP$L CSR(R2),R2 VIRTUAL ADDRESS OF ADAPTER DO 0285 1161 0288 MOVL #AX7C500000,UBA$L CR(R2) DISABLE ALL UMR'S 16 028D 1162 DO 0293 1163 DO 0297 1164 029C 1165 JSB MOVL' MOVL GAMMG$SVAPTECHK (R3),ADP$L UBASPTE(R4) <8*4>(R3),-- ADP$L UBASPTE+4(R4) ADDRESS OF SPTE THAT MAPS ADAPTER SAVE CONTENTS OF SPTE MAPPING ADAPTER CONTENTS OF SPTE MAPPING I/O SPACE DO 029C 1166 DE 029F 1167 02A5 MOVL MOVAL R4,R2GAUBA$UNEXINT ,R3 COPY ADP ADDRESS BACK TO R2 GET ADDR OF UNEXP INT SERVICE(IN EXEC) DE 02A6 1168 02AB 1169 MOVAL WAUBA$INTO,R4 GET ADDR OF SPECIAL VECTOR 0 ROUTINE 02AB 1170 02AB 1171 INIT UB VECTORS TO UNEXPECTED INTERRUPT SERVICE 02AB 1172 DO 02AB 1173 DO 02AF 1174 9A 0262 1175 DO 0286 1176 10$: F5 0289 1177 02BC , , 78 MOVL MOVL MOVZBL MOVL SOBGTR ADP$L VECTOR(R2),RO R4, (R5)+ #<NUMUBAVEC-1>,Rl R3,(R0)+ Rl, 10$ GET ADDRESS OF VECTORS SPECIAL CASE FOR VECTOR 0 REST OF VECTORS FILL VECTOR WITH UNEXP INT FILL ALL VECTORS 02BC , 180 02BC 1240 02BC 1241 02BC 1269 02BC 1270 02BC 1291 INIADP780 V03-021 RLRSCORPIO RLRSCORPIO RLRSCORPIO - ADAPTER INITIALIZATION FOR VAX 11/7BO 3-JUN-19B4 14:53:36 VAX-11 Macro V03-0l Page 24 INI$UBADP - BUILD ADP AND INITIALIZE UBA 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(t4) 56 62 DO 51 D4 00000200 BF C3 57 08 AE OC AE 04 C3 58 00000200 SF C3 54 20 AE 6B DD 53 54 DO 55 lF DO 90000000 BF C9 68 54 50 57 DO FDOF 30 OD 50 E9 54 53 Dl 04 13 51 D5 3A 13 51 10 A1 9E 54 10 A4 9E 08 55 F5 6B BEDO 0256 C2 51 BO 5C A2 01 DO OlFO BF 51 A3 64 A2 015E C2 51 BO 62 A2 01 AE 015C C2 01 AE 02BC 02BC 02BC 02BC 02BC 02BC 02BC 02BC 02BC 02BC. 02BC 02BC 02BC 02BF 02C1 02C7 02CA 02CE 02CF 02D5 02DB 020A 0200 02EO 02E3 02E9 02EB 02EE 02F1 02F4 02F7 02F9 02FB 02FD 0301 0305 030B 030B 030E 0313 0313 0313 0313 0313 0313 0313 0313 0313 0313 0317 031C 031E 0323 0327 032C 032C 032C .1 .43 .44 1340 1341 1342 1343 1344 1345 1346 1347 1348 1350 1351 1353 1354 1355 1356 1357 135B 1359 1360 1361 1362 1363 1364 1365 1366 1367 136B 1369 1370 1371 1372 1373 1375 1377 1378 1379 1380 1381 1382 13B3 13B4 13B5 13B6 13B7 1399 1400 1401 1402 1403 ·1404 Now check for any UNIBUS memory that may be on the adapter. First we must disable all the UNIBUS Map Registers so that there is no conflict in which memory will respond. Then we ch~ck all 248Kb of potential memory in 8Kb chunks, since each disable bit on the 780 UBA represents 16 UMR's or 8Kb of memory. The number of registers is stored in the ADP and the corresponding number withdrawn from the UMR map in the ADP. MOVL CLRL SUBL3 ADP$L CSR(R2),R6 Rl #512,8(SP),R7 Pick up adapter pointer Zero out number of UMR to disable R7 = VA of last page of UNIBUS SUBL3 #4, 12(SP) ,RB RS VA of SPTE mapping (R7) SUBL3 #512,32(SP),R4 R4 PFN of first page of UNIBUS 50$: 60$: 70$: PUSHL (RB) Save contents of SPTE MOVL R4,R3 Copy starting PFN MOVL #31 ,R5 31 8Kb chunks to test INVALID R7 Invalidate TB BISL3 #<PTE$M VALID!PTE$C KW>,- R4, (RB) Map each page of UNIBUS MOVL R7,RO Address to check BSBW EXE$TEST CSR Validate it BLBC R0,70$ Not there CMPL R3,R4 First time in? BEQL 60$ Yes, skip next test TSTL R 1 Any registers already? BEQL 80$ No, memory not start at 0 MOVAB 16(Rl) ,Rl Yes, up the count MOVAB 16(R4),R4 Map Next BKb (16*512) SOBGTR R5,50$ Loop until done POPL (RB) Restore old contents of SPTE INVALID R7 Invalidate TB MOVW R1,ADP$W_UMR DIS(R2) Record number disabled Initialize fields for new UBA map register allocation~ Make it appear that we have one contiguous array of 496 available map registers. To do this we set ADP$L MRACTMORS to one (the number of active map register descriptors for distinct contiguous areas), ADP$W MRNREGARV(O) to 496 (i .e the number of registers in this contiguous range) and ADP$FREGARV(O) to 0 (i.e. the first register in the range is register 0). MOVL SUBW3 #l,ADP$L MRACTMDRS(R2) ; 1 active map descriptor Rl,#496,ADP$W_MRNREGARY(R2); for a range of 496 registers MOVW MNEGW MNEGW Rl,AOP$W MRFREGARV(R2) #1,AOP$W-MRNFENCE(R2) #l,ADP$W=MRFFENCE(R2) starting at register zero. Also init "fences" which preceed the two descriptor arrays. Initialize adapter hardware. INIADP780 V03-021 - ADAPTER I~ITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 25 INI$UBADP - BUILD'ADP AND INITIALIZE UBA 19-0CT-1983 11:50:19 DISK$VMSMASTER: [SVSLOA.SRC]INIADP(14) 54 62 DO 032C 1405 MOVL ADP$L CSR(R2),R4 ; Get CSR address to init FCCE I 30 032F 1406 BSBW UBA$INITIAL ; And initialize adapter OlFF SF BA 0332 1407 POPR #AM<RO,R1,R2,R3,R4,R5,R6,R7,R8> ; Restore registers 05 0336 1408 RSB ; Return 0337 1409 0337 1411 0337 1412 ; Error if UNIBUS memory not start at location 0 51 030D'CF 9E 0337 0337 1413 1414 8' 0$: MOVAB WABADUMR,Rl Set error message FE5F 31 033C 1415 BRW ERROR HALT 1 Put it out 033F 1417 INIADP780 V03-021 RLRSCORPIO RLRSCORPIO RLRSCORPIO 2 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 26 INI$UBADP - BUILD ADP AND INITIALIZE UBA 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(14) 00000000 7E 54 7D 7FFFFE03 BF CB 00000030 9F 54 OOOOOOOA 7E 52 7D 55 D4'AF44 9E 65 18 7E 50 70 95 17 00000020 7E 54 7D 7FFFFE03 BF CB 00000034 9F 54 0000002A 7E 52 7D · 55 D4'AF44 9E 45 lB 7E 50 7D 95 17 00000040 7E 54 70 7FFFFE03 SF CB OQ00003B 9F 54 0000004A 7E 52 7D 55 D4'Af44 9E 25 18 7E 50 7D 95 17 00000060 7E 54 7D 7FFFFE03 BF CB 0000003C 9F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 033F 0340 0340 0340 0343 0349 034E 034F 034.F 0352 0357 0359 035C 035E 0360 0360 0363 0369 036E 036F 036F 0372 0377 0379 037C 037E 0380 03BO 0383 0389 038E 038F 038F 0392 0397 0399 039C 039E 03AO 03AO 03A3 03A9 1420 1421 UBA INTERRUPT SERVICE ROUTINES. ONE COPY OF THESE ROUTINES IS 1422 MOVED INTO NONPAGED POOL AND RELOCATED FOR EACH UBA. 1423 1424 **** NOTE **** THE CODING SEQUENCE FOR DISPATCHING ON UBA INTTERUPTS 1425 IS ASSUMED IN THE MODULE MCHECK780.MAR. THE ASSUMPTIONS ARE MADE SO 1426 THE MACHINE CHECK HANDLER CAN IDENTIFY A CPU TIMEOUT WHEN THE 1427 BICL3 INSTRUCTION IS READING THE UBA'S BRRVR REGISTER. 142B THE ASSUMPTIONS MADE ARE THAT THE VALUE Of THE VIRTUAL ADDRESS OF THE BRRVR .1 REGISTER IS AT AN OFFSET OF 10. BYTES PAST THE INTERRUPT VECTOR ENTRY POINT, . 2 THAT THE PC OF THE INSTRUCTION ACCESSING BRRVR IS 3 BYTES PAST THE INTERRUPT . 3 VECTOR ENTRY, AND THAT R4 AND R5 ARE SAVED ON THE STACK AT THAT POINT . 1431 1432 1433 .ENABL LSB 1434 .ALIGN QUAD 1435 UBAINTBASE: ; BASE OF UBA INTERRUPT DISPATCHERS 1436 UBAINT4=.-UBAINTBASE ; UBA 0 INTERRUPT DISPATCH LEVEL 4 1437 MOVQ R4,-(SP) ; SAVE REGISTERS 1438 BICL3 #AX7FFFFE03,@#UBA$L_BRRVR,R4 ; READ VECTOR REGISTER AND CLEAR BITS 1439 UBAINT4REL=.-UBAINTBASE-5 OFFSET TO ADD UBACSR VALUE 1440 MOVQ R2,-(SP) SAVE REGISTERS 1441 MOVAB BAVECTAB[R4],R5 GET ADDRESS OF INTERRUPT VECTOR 1442 B~EQ 10$ IF GEQ UBA INTERRUPTS 1443 MOVQ RO,-(SP) SAVE REGISTERS 1444 JMP @(R5)+ DISPATCH INTERRUPT 1445 .ALIGN QUAD 1446 UBAINT5=.-UBAINTBASE ; UBA 0 INTERRUPT DISPATCH LEVEL 5 1447 MOVQ R4,-(SP) ; SAVE REGISTERS 144B BICL3 #AX7FFFFE03,@#UBA$L_BRRVR+4,R4 ; READ VECTOR REGISTER AND CLEAR BITS 1449 UBAINT5REL=.-UBAINTBASE-5 OFFSET TO ADD UBACSR VALUE 1450 MOVQ R2,-(SP) SAVE REGISTERS 1451 MOVAB 8AVECTAB[R4] ,R5 GET ADDRESS OF INTERRUPT VECTOR 1452 BGEQ 10$ IF GEO UBA INTERRUPTS 1453 MOVQ RO,-(SP) SAVE REGISTERS 1454 JMP @(R5)+ DISPATCH INTERRUPT 1455 .ALIGN QUAD 1456 UBAINT6=.-UBAINTBASE ; UBA 0 INTERRUPT DISPATCH LEVEL 6 1457 MOVQ R4,-(SP) ; SAVE REGISTERS 1458 BICL3 #AX7FFFFE03,@#UBA$L_BRRVR+8,R4 ; READ VECTOR REGISTER AND CLEAR BITS 1459 UBAINT6REL=.~ueAINTBASE-5 OFFSET TO ADD UBACSR VALUE 1460 MOVQ R2,-(SP) SAVE REGISTERS 1461 MOVAB BAVECTAB[R4J ,RS GET ADDRESS Of INTERRUPT VECTOR 1462 BGEQ 10$ IF GEQ UBA INTERRUPTS 1463 MOVQ RO,-(SP) SAVE REGISTERS 1464 JMP @(R5)+ DISPATCH INTERRUPT 1465 .ALIGN QUAD 1466 UBAINT7=.-UBAINTBASE UBA 0 INTERRUPT DISPATCH LEVEL 7 1467 MOVQ R4,-(SP) ; SAVE REG1 STERS 1468 8ICL3 #AX7FFFFE03,@#UBA$L BRRVR+12,R4 ; READ VECTOR AND CLEAR BITS INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 27 INI$UBADP - BUILD ADP AND INITIALIZE UBA 19-0CT-1983 11 :50:19 DISK$VMSMASTER: [SYSLOA.SRC]INIADP(14) 54 0000006A 7E 52 7D 55 D4'AF44 9E 05 18 7E 50 7D 95 17 00 54 1F E5 55 D4'AF44 9E 00000000'8F DO 54 00000089 00000000 9F 17 00000090 00000094 03AE 03AF 03AF 0382 0387 0369 03BC 03BE 03C2 03C7 03CD 03CE 03CE 03D4 0304 03D4 0304 03D4 03D4 03D4 1469 UBAINT7REL=.-UBAINTBASE-5 1470 MOVQ R2,-(SP) 1471 MOVAB BAVECTAB[R4],R5 1472 BGEQ 10$ 1473 MOVQ RO,-(SP) 1474 JMP @(R5)+ 1475 10$: BBCC #31 , R4, 20$ 1476 20$: MOVAB 8AVECTAB[R4],R5 1477 MOVL IA#0,R4 1478 UBAINTADP=.-UBAINTBASE-5 1479 JMP @#0 1480 UBAERRADR=.-UBAINTBASE-4 1481 .DSABL LSB 1482 1483 . ALIGN LONG 1484 VECTAB: 1485 UBINTSZ=.-UBAINTBASE 1486 OFFSET TO ADD UBACSR VALUE SAVE REGISTERS GET ADDRESS OF INTERRUPT VECTOR IF GEQ UBA INTERRUPTS SAVE REGISTERS DISPATCH INTERRUPT CLEAR ADAPTER ERROR INTERRUPT FLAG (MSB) GET ADDRESS OF INTERRUPT VECTOR GET ADDRESS OF ADAPTOR CONTROL BLOCK ;OFFSET TO START OF LOADED CODE ;ERROR ROUTINE IN ADPERR780 LONGWORD ALIGN VECTORS END OF INTERRUPT CODE, START OF VECTORS SIZE OF UBA INTERRUPT CODE INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/7SO 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 28 INI$MBADP - BUILD ADP AND INITIALIZE MBA 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(14) OOOOOOOO'GF 07FF BF 5S 0011 'CF 59 OOOO'CF 5A OOOO'CF 28 07FF SF 5S 0015'CF 59 OOOO'CF 5A OOOO'CF 13 07FF BF 58 OOOD'CF 59 OOOO'CF SA OOOO'CF 51 004S SF B6 03D4 1503 .SBTTL INI$MBADP - BUILD ADP AND INITIALIZE MBA 03D4 1504 .SBTTL INI$DRADP - BUILD ADP AND INITIALIZE DR32 03D4 1505 .SBTTL INI$CIADP - BUILD ADP AND INITIALIZE CI 03D4 1506 + 03D4 1507 INI$MBADP IS CALLED AFTER MAPPING THE REGISTERS FOR A MASSBUS ADAPTER. 03D4 1508 AN ADAPTER CONTROL BLOCK IS ALLOCATED AND FILLED. A CRB AND IDB ARE 03D4 1509 ALSO ALLOCATED AND INITIALIZED. THE ADAPTER HARDWARE IS THEN INITIALIZED 03D4 1510 BY CALLING MBA$INITIAL. 03D4 1511 03D4 1512 INI$DRADP IS CALLED AFTER MAPPING THE REGISTERS FOR THE DR32 03D4 1513 ADAPTER. THE ADAPTER CONTROL BLOCK, CRB, AND IDB ARE ALLOCATED 03D4 1514 AND INITIALIZED. THE ADAPTER HARDWARE IS THEN INITIALIZED BY 03D4 1515 CALLING DR$INITIAL. 03D4 1516 03D4 1517 INI$MBADP AND INI$DRADP SHARE COMMON CODE AFTER THE TABLE OF ADAPTER 03D4 151 S SPECIFIC CONSTANTS IS SELECTED AND STORED IN RB. 03D4 1519 03D4 1520 INPUT: 03D4 1521 R4 - nexus identification number of this adapter 03D4 1522 Rll- offset from beginning of SCB to correct SCB page for this adapter 03D4 1523 03D4 1524 OUTPUTS: 03D4 1525 ALL REGISTERS PRESERVED 03D4 1526 03D4 1527 17 03D4 1528 ALONPAGD:JMP GAINI$ALONONPAGED 03DA 1529 03DA 1530 .ENABL LSB 03DA 1531 03DA 1532 INI$DRADP: ; INITIALIZE DR32 DATA STRUCTURES 03DA 1533 BB 03DA 1536 PUSHR #AM<RO,Rl ,R2,R3,R4,R5,R6 R7,R8,R9,R10> ; SAVE REGISTERS DE 03DE 1537 MOVAL WADRTAB,RS GET DR32 TAB~E OF CONSTANTS 9E 03E3 153S MOVAB WADR$INT,R9 ADDRESS OF INITERRUPT SERVICE ROUTINE 9E 03E8 1539 MOVAB WADR$INITIAL,R10 ADDRESS OF DEVICE INITIALIZATION 11 03ED 1540 BRB 10$ JOIN COMMON CODE 03EF 1543 03EF 1544 INI$CIADP: INITIALIZE CI DATA STRUCTURES 03EF 1545 BB 03EF 154S PUSHR #AM<RO,R1 ,R2,R3,R4,R5,R6 R7,RS,R9,R10> ; SAVE REGISTERS DE 03F3 1549 MO VAL WACITAB,R8 GET CI TABLE OF CONSTANTS 9E 03FS 1550 MOVAB WACI$INT,R9 ADDRESS OF INITERRUPT SERVICE ROUTINE 9E 03FD 1551 MOVAB WACI$INITIAL,R10 ADDRESS OF DEVICE INITIALIZATION 11 0402 1552 BRB 10$ JOIN COMMON CODE 0404 1555 0404 1556 INI$MBADP: !NIT MBA DATA STRUCTURES 0404 1557 BB 0404 1560 PUSHR #AM<RO,R1,R2,R3,R4,R5,R6 R7,R8,R9,R10> ; DE 040S 1561 MOVAL WAMBATAB,R8 GET MBA TABLE OF CONSTANTS 9E 040D 1562 MOVAB WAMBA$INT,R9 ADDRESS OF INITERRUPT ~ERVICE ROUTINE 9E 0412 1563 MOVAB WAMBA$INITIAL,R10 ADDRESS OF DEVICE INITIALIZATION 0417 1564 10$: 0417 1565 0417 1566 Al locate and initialize Channel Request Block. 0417 1567 3C 0417 156S MOVZWL #CRB$C LENGTH,Rl SET SIZE OF CRB 10 041C 1569 BSBB ALONPAGD ALLOCATE SPACE FOR CRB INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 29 INI$CIADP - BUILD ADP AND INITIALIZE CI 19-0CT-1983 11 :50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(14) OB A2 51 OA A2 05 62 62 04 A2 62 50 24 A2 9F163CBB BF BO 80 59 BO 60 5A 5A 52 51 68 00000038 9F41 51 B4 OB A2 51 OA A2 09 6B QC A2 62 OOE4'CF44 2C AA 52 59 52 51 01 AB FF64 OB A2 51 QA A2 01 62 69 DC A2 54 03 AB OE A2 10 A2 5A OOOOOOOO'GF 50 55 SB 09 50 55 54 04 00 54 50 0100 C044 lC A2 50 60 25 AA 40 AO 25 AA 25 AA 0080 co BO 041E 1570 90 0422 1571 DE 0426 1572 DE 0429 1573 9E 0420 1574 DO 0431 1575 0437 DO 0438 1576 04 043B 1577 DO 0430 1578 DO 0440 1579 0443 1580 0443 1581 0443 1582 9A 0443 1583 DE 0446 1584 044D 10 044E 1585 BO 0450 15B6 90 0454 1587 0458 15BB 9B 0458 15B9 045A 1590 DO 045C 1591 0462 1592 DO 0462 1593 0466 1594 DO 0466 1595 0469 1596 0469 1597 0469 1598 3C 0469 1599 30 046D 1600 BO 0470 1601 90 0474 1602 DO 0478 1603 BO 0478 1604 9B 047F 1605 0482 1606 DO 0484 1607 0488 1608 0488 1609 0488 1610 04B8 1611 048B 1612 DO 0488 1613 04BE 7B 04BF 1614 co 0493 1615 EF 0496 1616 049A DE 0498 1617 DO 04A1 1618 DE 04A5 1619 DE 04A9 1620 DE 04AE 1621 0481 MOVW MOVB MOVAL MOVAL MOVAB MOVL R1,CRB$W SIZE(R2) ; SET CORRECT SIZE #DYN$C CRB,CRB$B TYPE(R2) ; SET CORRECT TYPE CRB$L WQFL(R2),CRB$L WQFL(R2) ; INITIALIZE WAIT QUEUE HEADER CRB$L-WQFL(R2),CRB$L-WQBL(R2) ; FLINK AND BLINK CRB$L-INTD(R2),RO - ; SET ADDRESS OF INTO AREAD #AX9Fl63CBB,(RO)+ ; "PUSHR AM<R2,R3,R4,R5>,JSB @#" MOVL CLRL MOVL MOVL R9, (RO)+ (RO)+ RlO,(RO) R2,R10 ADDR OF XXX$INT ROUTINE CLEAR OUT UNNEEDED AREA ADDR OF XXX$INITIAL ROUTINE SAVE CRB ADDRESS Allocate and initialize Interrupt Dispatch Block. MOVZBL ADPTAB IDBUNITS(R8),R1 MOVAL @#IDB$C LENGTH[Rl] ,Rl GET # OF IDB UNITS GET TOTAL SIZE OF IDB BSBB MOVW MOVB MOVZBW MOVL MOVL MOVL ALON PAGO ALLOCATE SPACE FOR CRB R1,IDB$W SIZE(R2) SET STRUCTURE SIZE #DYN$C IDB' - AND TYPE CODE IDB$B TYPE(R2) ADPTAB IDBUNITS(R8),- SET COUNT OF UNITS IDB$W UNITS(R2) WASBICONF[R4]' - SET CSR ADDRESS TO IDB$L CSR(R2) START OF ADAPTER REG SPACE R2, -- ; SET ADDRESS OF IDB INTO CRB CRB$L INTD+VEC$L IDB(R10) R2,R9- - SAVE ADDRESS OF IDB Al locate and initialize Adapter Control Block (ADP). MOVZWL BSBW MOVW MOV8 MOVL MOVW MOVZBW MOVL CMPW BEQL ADPTAB ADPLEN(R8),R1 ; GET SIZE OF ADAPTER ALONPAGD ; ALLOCATE SPACE FOR CRB R1,ADP$W SIZE(R2) ; SET SIZE OF STRUCTURE #DYN$C ADP,ADP$B TYPE(R2); AND TYPE CODE IDB$L CSR(R9),ADP$L CSR(R2); SET ADDRESS OF CONFIGURATION REGISTER R4,ADP$W TR(R2) ; SET TR/SLOT-16 NUMBER OF ADAPTER ADPTAB ATYPE(RB),- : SET THE ADAPTER TYPE ADP$W ADPTYPE(R2) R10,ADP$L CRB(R2) ; POINT ADP TO CRB ADP$W ADPTYPE(R2),#AT$ CI ; CI? 20$ - - ; YES, DO NOT CONNECT UP VECTORS Initialize adapter interrupt vectors in System Control Block. MOVL GAEXE$GL_SCB,RO GET ADDRESS OF SCB ASHL ADDL EXTZV #9,R11,R5 R5,RO #0,#4,R4,R4 Turn SCB page offset into byte offset. set to beginning of correct SCB page. Use low 4 bits of nexus number. MOVAL MOVL MOVAL MOVAL MO VAL AX100(RO)[R4],RO ; COMPUTE ADDR OF 1ST VECTOR RO,ADP$L AVECTOR(R2) ; SAVE ADDR OF ADAPTER'S SCB VECTORS CRB$L INTD+1(R10),(RO) ; CONNECT VECTOR TO CRB CODE CRB$L-INTD+1(R10) ,64(RO); SAME FOR CRB$L=INTD+1(R10),128(RO); ALL FOUR INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 30 INI$CIADP - BUILD ADP AND INITIALIZE CI 19-0CT-1983 11 :50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(14) 25 AA ooco ccr 14 A2 25 AA OC 55 52 52 62 OOOOOOOO'GF 18 A5 63 OC 38 AA 52 14 A9 52 FB22' 55 59 54 65 30 BA 07FF BF DE 0484 0487 04BA 04BA 04BA DE 04BA 04BF BB 04BF DO 04Cl DO 04C4 16 04C7 DO 04CD BA 04Dl DO 04D3 DO 04D7 30 04DB 04DE 04DE 04DE DO 04DE DO 04El 16 04E4 BA 04E7 05 04EB 04EC 04EC 1622 MOVAL CRB$L_INTD+1(R10),192(RO); VECTORS 1623 1624 Continue with ADP initialization. 1625 1626 2' 0$: MOVAL CRB$L INTD+l(RlO), - : SAVE SCB VECTOR CONTENTS IN ADP 1627 ADP$L-MBASCB(R2) 1628 PUSHR #AM<R2,R3> ; SAVE SOME REGISTERS 1629 MOVL R2,R5 ; COPY ADP ADDRESS 1630 MOVL ADP$L CSR(R2),R2 ; VIRTUAL ADDRESS OF ADAPTER 1631 JSB GAMMG$SVAPTECHK ; ADDRESS OF SPTE THAT MAPS ADAPTER 1632 MOVL (R3),ADP$L MBASPTE(R5) ; SAVE CONTENTS OF SPTE 1633 POPR #AM<R2,R3>- ; RESTORE REGISTERS 1634 MOVL R2,CRB$L INTD+VEC$L ADP(R10) ; SET CRB POINTER TO ADP 1635 MOVL R2,IDB$L-ADP(R9) - ; AND INTO IDB 1636 BSBW ADPLINK - ; LINK ADP TO END OF CHAIN 1637 1638 Initialize adapter hardware. 1639 1640 MOVL R9,R5 ; ADDRESS OF IDB 1641 MOVL IDB$L CSR(R5),R4 ; ADDRESS OF CONFIGURATION REGISTER 0 1642 1643 JSB POPR @CRB$L INTD+VEC$L INITIAL(R10) ; !NIT ADAPTER #AM<RO~Rl ,R2,R3,R4,R5,R6,R7,R8,R9,R10>; RESTORE ALL REGISTERS 1644 RSB ; RETURN 1645 1646 .DSABL LSB INIADP780 V03-021 ; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO ;RLRSCORPIO ; RLRSCORPIO - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 31 INI$KDZ11 19-0CT-1983 11 :50:19 DISK$VMSMASTER: [SYSLOA.SRC]INIADP(14) 04EC 04EC 04EC 04EC 04EC 04EC 04EC 04EC 04EC 04EC 04EC 04EC 04EC 04EC 05 04EC .36 .SBTTL INI$KDZ11 .37 ;++ .38 .39 INPUTS: .40 R2 - VA of next free system page .41 R3 VA of system page table entry to be used to map VA in R2 .42 R4 - nexus identification number of this adapter .43 .44 OUTPUTS: .45 .46 ;-- .47 .48 INI$KDZ11: .49 .68 RSB Re-turn to call er. INIADP7BO V03-021 ;RLRSCORPIO ;RLRSCORPIO ;RLRSCORPIO -12 ;TCM0009 - ADAPTER INITIALIZATION FOR VAX 11/7BO 3-JUN-19B4 14:53:36 VAX-11 Macro V03-01 Page 32 INI$CONSOLE, init data structures for co 19-0CT-19B3 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(14) 66 A6 40 BF 12 41534303 BF 14 A3 00000000'9F 58 006B 5B 10 A7 OE A7 01 03 0058 00000000'9F 9F163FBB BF 24 A2 3B A2 57 5B 52 51 0058 8F 00000000'9F OB A2 51 OA A2 09 2C AB 52 04ED 04ED 04ED 04ED 04ED 04ED 04ED -04ED 04ED 04ED 04ED 04ED 04ED 04ED 04ED 04ED 04ED 04ED 04ED 04ED 04ED 04ED 04ED 04ED 91 04ED 04FO 12 04F2 DO 04F4 04FA 04FC DE 04FC 0502 31 0503 0506 0506 0506 0506 0506 0506 DO 0506 B1 050A 13 050E 31 0510 0513 0513 16 0513 DO 0519 051F 0521 DO 0521 DO 0525 3C 0528 16 052D BO 0533 90 0537 DO 0538 053F 1650 .SBTTL INI$CONSOLE, init data structures for console 1651 ;++ 1652 FUNCTIONAL DESCRIPTION: 1653 1654 This routine is executed only once, during system initialization. 1655 It initializes the CRB and IDB for boot/console device. 1656 1657 This routine is cal led from !NIT. 165B 1659 INPUTS: 1660 1661 R3 --> DISK [CLASS] DRIVER DDS 1662 R4 --> DISK [CLASS] DRIVER DPT 1663 R5 --> DISK [CLAS SJ DRIVER UCB 1664 R6 --> RPB 1665 R7 --> ADP FOR EITHER A REAL DISK OR A PORT 1666 R9 --> PORT DRIVER DPT (IF PRESENT) 1667 R10--> PORT DIRVER UCB (IF PRESENT) 1668 1669 1670 1671 INI$CONSOLE:: 1672 .ENABL LSB 1673 1675 CMPB RPB$8 DEVTYP(R6),- BOOTING FROM CONSOLE BLOCK 1676 #BTD$K CONSOLE STORAGE DEVICE? 1677 BNEQ BLD CRB NO 1678 MOVL #AAJCSA/@8+3,- YES, SET DEVICE NAME 1679 DDB$T NAME(R3) COUNTED STRING 1681 . 2 MOVAL @#OPA$CRB,R8 SET ADDRESS OF CRB . 3 BRW 100$ .5 1694 1695 1696 NOW BUILD THE AUXILIARY DATA BLOCKS (CRB,IDB) 1697 1698 BLD_CRB: 1699 MOVL ADP$L CRB(R7),R8 ; GET ADDRESS OF CRB IF IT EXISTS 1700 CMPW #AT$ UBA,ADP$W ADPTYPE(R7); IS THIS A UNIBUS ADAPTER? 1701 BEQL FILL-CRB - ; YES, ALLOCATE CRB 1702 BRW 100$- : NO, CRB/IDB ALREADY ALLOCATED 1703 1704 FILL CRB: 1705 1706 JSB MOVL @#INI$ALLOC CRB ; GO ALLOCATE AND SETUP CRB #AX9F163FBB~CRB$L INTD(R2) ; SET PUSHR #AM<RO, ... R5> 1707 170B 17D9 1710 1711 1712 1713 1714 .1 MOVL MOVL MOVZWL JSB MOVW MOVB MOVL ; JSB @#0 INTO INTERRUPT DISPATCH R7,CRB$L INTD+VEC$L ADP(R2) ; SET POINTER TO ADP R2,RB - - ; SAVE CRB POINTER #<IDB$C LENGTH+<B*4>>,R1; SIZE TO ALLOCATE FOR IDB @#INI$ALONONPAGED ; ALLOCATE IDB R1,IDB$W SIZE(R2) ; SET SIZE OF IDB #DYN$C IDB,IDB$B TYPE(R2); AND STRUCTURE TYPE CODE R2,CRBiL_1NTD+VEf$L_IDB(R8) ; SET IDB INTO CRB INIADP780 V03-021 -1 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 33 INI$CONSOLE, init data structures for co 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(14) G2 58 AG 11 66 AG 08 58 AG 00000000'9F 14 A2 57 50 lE AG OA 50 66 A6 50 FFFE'CF40 50 10 8740 60 26 AS 053F 173G DO 053F 1737 10$: 0543 1738 9-1 0543 1739 0545 1740 12 0547 1741 0549 1742 DO 0549 1743 054C 0551 1744 0551 1745 20$: DO 0551 1746 3C 0555 1747 12 0559 1748 SA 0558 1749 3C 055F 1750 9E 05G5 1751 30$: 9E 056A 1752 056E 1753 056E 1757 05GE 1758 100$: 05 056E 1759 056F 1760 MOVL CMPB BNEQ MOVL RPB$L CSRVIR(R6), - IDB$L-CSR(R2) #BTD$K_UDA,RPB$B_DEVTYP(R6) 20$ RPB$L_CSRVIR(RG), - ; SAVE BOOT DEVICE CSR ADDRESS ; IN INTERRUPT DISPATCH BLOCK ; LOW ORDER BYTE OF ORIGINAL RO TELLS ; BOOT DEVICE TYPE. ; IF NOT BOOTING FROM A UDA BRANCH ; AROUND. : COPY VIRTUAL ADDRESS OF UDA PORT CSR @#BOO$GB_SYSTEMID : TO LOW ORDER LONGWORD OF SYSTEMID MOVL MOVZWL BNEQ MOVZBL MOVZWL MOVAB MOVAB R7,IDB$L ADP(R2) ; RPB$W_ROUBVEC(R6),RO ; 30$ ; RPB$B DEVTYP(R6),RO ; WABOOTVECTOR-2[RO],RO ; @ADP$L VECTOR(R7)[RO),RO; CRB$L_INTD+2(R8), (RO) : POINT IDB TO ADP GET USER SPECIFIED VECTOR BRANCH IF VECTOR .SPECIFIED ELSE GET DEVICE TYPE CODE GET DEFAULT INTERRUPT VECTOR COMPUTE ADDRESS OF VECTOR SET ADDR OF INTERRUPT VECTOR RSB .DISABLE LSB : RETURN INIADP780 V03-021 19 00 00004E20 SF 7E 18 11 FD 6E - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 34 EXE$INI_TIMWAIT - COMPUTE CORRECT TIMEWA 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(15) 056F 1762 .SBTTL EXE$INI TIMWAIT - COMPUTE CORRECT TIMEWAIT LOOP VALUES 056F 1763 ;++ 056F 1764 FUNCTIONAL DESCRIPTION: 056F 1765 056F 1766 EXE$INI TIMWAIT initializes EXE$GL TENUSEC and EXE$GL UBDELAY, cells used 056F 1767 in the time-wait macros. The first data cell, EXE$GL-TENUSEC, is the number 056F 1768 of times the following loop will be executed in ten u=seconds. This is 056F 1769 done once here to calibrate the loop instead of reading the processor clock. 056F 1770 The resulting number is used in the system macros TIMEWAIT and TIMEDWAIT. 056F 1771 056F 1772 The first step is to initialize EXE$GL UBDELAY. If the bit test instruction 056F 1773 in the TIMEWAIT macro is executed too rapidly in a loop, it can saturate the 056F 1774 Unibus. EXE$GL UBDELAY is used to introduce a 3 microsecond delay loop into 056F 1775 the TIMEWAIT bit test loop. 056F 1776 056F 1777 This routine is called only once, from !NIT. 056F 1778 056F 1779 INPUT PARAMETERS: 056F 1780 056F 1781 NONE 056F 1782 056F 1783 IMPLICIT INPUTS: 056F 1784 056F 1785 Time-of-day processor clock. 056F 1786 Interval timers. 056F 1787 056F 1788 OUTPUT PARAMETERS: 056F 1789 056F 1790 RO - Destroyed. 056F 1791 056F 1792 IMPLICIT OUTPUTS: 056F 1793 056F 1794 EXE$GL TENUSEC - set to appropriate value to make TIMEWAIT and TIMEDWAIT 056F 1795 - macros loop for 10 micro-seconds. 056F 1796 056F 1797 EXE$GL UBDELAY - set to appropriate value to make TIMEWAIT and TIMEDWAIT 056F 1798 - macros loop for 3 micro-seconds in the unibus delay 056F 1799 loop. 056F 1800 056F 1801 056F 1802 056F 1803 EXE$INI TIMWAIT:: Initialize time-wait data cells 056F 1805 -.ENABLE LSB 056F 1806 DA 056F 1808 MTPR #O,#PR780$_NICR Initialize next interval count register. 0572 1810 0572 1814 0572 1818 0572 1822 DO 0572 1823 MOVL #20000,-(SP) # of times to execute timed loop. 0578 DA 0579 1824 MTPR #AX 11, #PR$_! CCS Start clock, no interrupts. 057C 1825 057C 1826 ; * * * start of loop to time * * * F5 057C 1827 10$: SOBGTR (SP),10$ 057F 1828 * * * end of loop to time * * * Delay loop. 057F 1829 INIADP7BO V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 35 EXE$INI_TIMWAIT - COMPUTE CORRECT TIMEWA 19-0CT-1983 11 :50:19 DISK$VMSMASTER:[SVSLOA.SRC]INIADP(15) 50 lA 18 00 50 OOOOEA60 BF OOOOOOOO'GF OOOOOOOO'GF 19 00 00004E20 8F 50 OOOOOOOO'GF 6E 18 11 8000 BF 00000589'EF 03 FD 6E EF 50 50 lA 18 00 BE 50 00030D40 BF OOOOOOOO'GF OOOOOOOO'GF DB 057F 1831 MFPR #PR780$_ICR,RO ; Read total time to execute loop. 05B2 1833 0582 1837 0582 1B41 0582 1845 DA 0582 1B46 MTPR #O,#PR$ ICCS ; Shut off clock. C7 0585 1847 DIVL3 R0,#60000,GAEXE$GL U8DELAV; Calculate number of times through 05B7 058C D6 0591 1B48 INCL GAEXE$GL U8DELAV loop to delay 3 microseconds. 0597 1B49 DA 0597 1B51 MTPR #O,#PR780$ NICR Initialize next interval count register. 059A 1B53 059A 1857 059A 1B61 059A 1B65 DO 059A 1866 MOVL #20000,RO Number of times to execute test loop 05AO DO 05A1 1867 MOVL GAEXE$GL UBDELAV,(SP) Get delay lo~p iteration count. 05A7 DA 05A8 1868 MTPR #AXll ,#PR$ recs Start clock, no interrupts 05AB 1B69 05AB 1B70 ; **** Start of loop to time 83 05AB 1B71 20$: BITW #AXB000,40$ Random BITx instruction to time 05AF 12 0584 1872 8NEQ 40$ Random conditional branch instruction F5 0586 1873 30$: SOBGTR (SP),30$ Delay 3 microseconds. F5 05B9 1B74 40$: SOBGTR R0,20$ 05BC 1875 . **** End of loop to time Loop 05BC 1876 DB 05BC 1B7B MFPR #PR7BO$ ICR,RO Read total time to execute loop. 05BF lBBO 05BF 18B4 05BF 18BB DA 058F 1892 MTPR #O,#PR$ ICCS ; Shut clock off D5 05C2 1B93 TSTL (SP)+ - ; Pop delay loop index off stack. C7 05C4 1B94 DIVL3 R0,#200000,GAEXE$GL TENUSEC ; Calculate number of times to 05C6 05CB D6 05DO 1B95 INCL GAEXE$GL TENUSEC execute the loop to kill 10 u-secs. 05 05D6 1B96 RSB Return 05D7 1897 .DISABLE LSB INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 36 EXE$INIT TOOR - SET SYSTEM TIME TO COR 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(l6) 00000000 00000004 oooooooc 00000014 OOOOOOlC 00000014 30 41 50 4F 00000004 6C 61 76 6E 69 00 74 61 64 20 64 69 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 05D7 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 05D7 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0507 0508 0508 05E1 1905 .S8TTL EXE$INIT TOOR SET SYSTEM TIME TO CORRECT VALUE AT STARTUP 1906 ;++ 1907 FUNCTIONAL DESCRIPTION: 1908 1909 EXE$INIT TOOR SOLICITS THE CORRECT TIME FROM THE OPERATOR IF NECESSARY, 1910 CONVERTS-THE ASCII RESPONSE TO BINARY FORMAT AND CALLS AN INTERNAL 1911 ENTRY POINT OF THE $SETIME SYSTEM SERVICE TO SET THE NEW SYSTEM TIME 1912 IN MEMORY WITHOUT MODIFYING THE CONTENTS OF THE SYSTEM DISK. 1913 1914 IF THE TIME WOULD NORMALLY BE SOLICITED FROM AN OPERATOR, BECAUSE 1915 THE HARDWARE TIME OF YEAR CLOCK IS ZERO, THEN THE SYSGEN PARAMETER 1916 "TPWAIT" IS CHECKED. IF IT IS ZERO, THEN IT IS ASSUMED THAT NO 1917 OPERATOR IS PRESENT AND THE SYSTEM IS BOOTED USING THE LAST TIME 1918 RECORDED IN THE SYSTEM IMAGE. IF THE PARAMETER IS NON ZERO THEN 1919 THAT TIME IS USED AS THE MAXIMUM TIME TO WAIT BEFOR ASSUMING THAT 1920 THERE IS NO OPERATOR AND BOOTING ANY WAY. IF THE PARAMETER IS 1921 NEGATIVE, THE SYSTEM WILL WAIT FOREVER. 1922 1923 THIS ROUTINE IS CALLED ONLY ONCE, FROM SYSINIT OR STASYSGEN. 1924 1925 INPUT PARAMETERS: 1926 1927 NONE 1928 1929 IMPLICIT INPUTS: 1930 1931 TIME-OF-DAV PROCESSOR CLOCK. 1932 1933 OUTPUT PARAMETERS: 1934 1935 RO,Rl - DESTROYED 1936 1937 IMPLICIT OUTPUTS: 1938 1939 EXE$GQ SYSTIME - SET TO CURRENT TIME IN 100 NANOSECOND UNITS SINCE 1940 - 17-NOV-1858 00:00:00. 1941 1942 1943 1944 1945 Stack storage offsets: 1946 = 1947 TTCHAN = 1948 TTNAME AXOO AX04 CHANNEL FOR TERMINAL (LONGWORD) STRING DESCRIPTOR FOR OPERATOR'S TERM 1949 TMPDESC = AXOC 1950 INTIME = AX14 1951 LINBUF = AXlC 1952 LINBUFSIZ = AX14 TEMPORY STRING DESCRIPTOR (QUADWORD) INPUT TIME VALUE (QUADWORD) INPUT LINE BUFFER (5 LONGWORDS) (LENGTH OF LINE BUFFER IN BYTES) 1953 1954 1955 PURE DATA 1956 1957 TERM NAMADR: 1958 .ASCII \OPAO\ 1959 TERM NAMSIZ = . - TERM NAMADR DEVICE NAME FOR OPERATOR'S TERMINAL 1960 TIME~R: .ASCIC \invalid date/time\ INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 37 EXE$INIT_TODR - SET SYSTEM TIME TO COR 19-0CT-1983 11:50: 19 DISK$VMSMASTER:[SYSLOA.SRC)INIADP(16) 65 60 69 74 2F 65 1 l 3.3' 41 45 4C 50 OA OD 54 4E 45 20 45 53 54 41 44 20 52 45 20 44 4E 41 20 45 28 20 45 40 49 54 40 40 40 20 44 44 20 59 59 59 59 20 4D 40 3A 48 48 20 20 20 29 00000033 077C SF BB 5E 30 C2 56 5E DO 04 A6 04 9A FFA4 CF 9E 08 A6 00' ED 1C OOOOOOOO'GF 50 lB DB 50 C3 OOOOOOOO'GF 59 09 1B 59 D1 0083D600 BF 06 1E 14 A6 7C OOC7 31 59 D4 OOOOOOOO'GF 32 58 14 14 OD 19 01 Cl OOOOOOOO'GF 50 18 50 DA 05E7 05DB 05ED 05ED 05EE 05F4 05FA 0600 0606 060C 0612 0618 061E 0621 0621 0621 0621 0621 0621 0625 0628 062B 062F 0633 0635 0637 0630 0630 0630 0640 0640 0640 0640 0640 0642 0647 0648 064A 064C 0651 0653 0656 0659 0659 0659 065B 0661 0662 0664 0666 0666 0668 0660 066E 066E 0671 0671 1961 TI MEPROMPT: 1962 .BYTE NPROMPT 1963 .ASCII <13><10>/PLEASE ENTER DATE AND TIME (DD-MMM-YYYY HH:MM) I 1964 NPROMPT=.-TIMEPROMPT-1 1965 1966 1967 EXE$INIT TOOR:: ; SET CORRECT TIME 1968 -:-ENABLE LSB 1969 PUSHR #AM<R2,R3,R4,R5,R6,R8,R9,R10> ; SAVE REGISTERS 1970 SUBL #4*12,SP ; SCRATCH STORAGE 1971 MOVL SP,R6 ; SAVE ADDRESS OF SCRATCH STORAGE 1972 MOVZBL #TERM NAMSIZ,TTNAME(R6) ; SET SIZE OF OPERATOR'S TERM NAME AND 1973 MOVAB WATERM_NAMADR,TTNAME+4(R6) ; PIC ADDRESS INTO TERM NAME DESC 1974 BBS SA#EXE$V SETTIME,GAEXE$GL_FLAGS,READTIME ; BR TO SOLICIT TIME 1975 1976 1978 1980 1984 1988 1992 1994 MFPR #PR780$ TODR,RO SUBL3 R0,GAEXE$GL_TODR,R9 GET TIME OF DAY CLOCK VALUE GET TOD DELTA TIME (10 MS UNITS) 1995 1996 BLEQU CMPL 1997 BGEQU 2002 5$: CLRQ 2003 BRW 2004 2005 READTIME: 2006 CLRL 2007 CVTWL 2008 2009 2010 6$: 2012 BGTR BLSS ADDL3 5$ R9,#24*60*60*100 READTIME INTIME(R6) 200$ R9 GASGN$GW_TPWAIT,R8 8$ 7$ #1,GAEXE$GL TODR,RO BRANCH IF TIME IS LATER CHECK FOR SETBACK OF ONE DAY MORE, MUST SOLICIT TIME NULL ARGUMENT FOR EXE$SETIME INT RETURN TO CALLER SOLICIT TIME CLEAR A FLAG PICK UP TIMEOUT WAIT INTERVAL POSITIVE, WAIT THAT PERIOD ONCE NEGATIVE IS WAIT FOREVER ZERO, SET TIME-OF-DAY CLOCK TO 2014 2016 2018 2022 MTPR RO,#PR780$_TODR KNOWN VALUE + 10 MSEC AND FINISH UP INIADP780 V03-021 ;KDM0099 ;KDM0099 -1 - ADAPTER INITIALIZATION FOR VAX ll/7BO 3-JUN-19B4 14:53:36 VAX-11 Macro V03-01 Page 38 EXE$INIT TOOR - SET SYSTEM TIME TO COR 19-0CT-19B3 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(16) EO 58 14 59 DD 50 52 FF60 CF 53 82 AD 50 54 OC A6 OD 54 A3 59 58 01 A848 5B 5B BC OC A6 OE A6 10 A6 lC A6 05 50 lB A6 2A 52 FEEB CF 53 82 FF73 14 A6 01 OOOOOOOO'GF OOOOOOOO'GF OOOOOOOO'GF 5E 30 077C SF 0671 2026 0671 2030 11 0671 . 2 BRB 5$ 0673 .4 0673 2032 DO 0673 2033 7$: MOVL #20,RB ; STARTING WAIT 06 0676 2034 067B 2035 B$: INCL R9 $ASSIGNS ; NEGATIVE - WAIT FOREVER TTNAME(R6),TTCHAN(R6) ; AND ASSIGN TO INPUT DEVICE E9 06B6 2036 BLBC -R0,6$ ; ERROR - FALL BACK TO STORED TIME 9E 06B9 2037 10$: MOVAB WATIMEPROMPT,R2 ; GET ADDRESS OF PROMPT STRING 9A 06BE 203B MOVZBL (R2)+,R3 ; AND LENGTH 0691 2039 $QIOW S #0,WATTCHAN(R6),- ; PROMPT AND READ TIME 0691 2040 - #<10$ READPROMPT!IO$M PURGE!I0$M TIMED!I0$M CVTLOW>,- 0691 2041 TMPDESC(R6), ,,- - ; I/0 STATUS BLOCK-, NO AST OR PARAM 0691 2042 LINBUF(R6),#LINBUFSIZ,- ; BUFFER ADDRESS AND SIZE 0691 2043 RB,#0,- ; TIME OUT 0691 2044 R2,R3 ; PROMPT ADDRESS AND SIZE E9 06B6 2045 BLBC R0,6$ ; ERROR - FALL BACK TO STORED TIME 70 06B9 2046 MOVQ TMPDESC(R6),R4 ; GET COMPLETION STATUS EB 06BD 2047 BLBS R4,20$ ; CONTINUE IF SUCCESSFUL READ E9 06CO 204B BLBC R9,6$ ; FAILED ON ONE-TIME READ, RETURN 9E 06C3 2049 MOVAB 1 (RB) [RBJ ,RB ; (2 * TIMEOUT) + 1 3C 06CB 2050 MOVZWL RB,RB ; BOUND TIMEOUT 11 06CB 2051 BRB 10$ ; TRY AGAIN FOR TIME 06CD 2052 20$: ; SOMETHING WAS INPUT 3C 06CD 2053 MOVZWL TMPDESC+2(R6),TMPDESC(R6) ; FORM DESCRIPTOR FOR BUFFER 9E 06D2 2054 MOVAB LINBUF(R6),TMPDESC+4(R6) ; SET DESCRIPTOR ADDRESS 0607 2055 $BINTIM S TMPDESC(R6),INTIME(R6) ; CONVERT TO BINARY TIME E9 06E4 2056 BLBC -RO,B9$ INVALID TIME D5 06E7 2057 TSTL INTIME+4(R6) CHECK FOR DELTA TIME 14 06EA 205B BGTR 100$ BRANCH IF NOT - OK 06EC 2059 89$: INVALID TIME VALUE INPUT 9E 06EC 2060 MOVAB WATIMERR,R2 ADDRESS OF ERROR MESSAGE 9A 06F1 2061 MOVZBL (R2)+,R3 GET STRING LENGTH 06F4 2062 $QIOW S #O,TTCHAN(R6),- GIVE ERROR MESSAGE 06F4 2063 - #I0$_WRITEVBLK,- 06F4 2064 NO I/O STATUS,AST OR AST PARAM 06F4 2065 (R2),R3 BUFFER ADDRESS, LENGTH 06F4 2066 #0,#32 SET CARRIAGE CONTROL TO CR/LF 31 0713 2067 BRW 10$ AND TRY AGAIN 0716 2068 100$: EXIT 0716 2069 $DASSGN S TTCHAN(R6) DE-ASSIGN TERMINAL CHANNEL 7F 0720 2070 200$: PUSHAQ -INTIME(R6) SET NEW SYSTEM TIME FB 0723 2071 CALLS #l,GAEXE$SETIME INT USE TOOR CLOCK TO SET SYSTEM TIME 0725 7D 072A 2072 MOVQ GAEXE$GQ_TODCBASE,GAEXE$GQ_BOOTTIME ; SAVE BOOT TIME 0730 co 0735 2073 ADDL #12*4,SP ; CLEAN OFF SCRATCH STORAGE BA 013B 2074 POPR #AM<R2,R3,R4,R5,R6,RB,R9,R10> ; RESTORE REGISTERS 073C 2075 073C 2076 073C 2077 Fall through into the deallocate logic. 073C 207B 073C 2079 RSB *** This goes in if another piece of 073C 20BO *** init~alization code is added that 073C 20B1 *** is executed after EXE$INI_TIMWAIT. 073C 20B2 .DISABLE LSB INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-0l Page 39 EXE$INIT_TODR - SET SYSTEM TIME TO COR 19-0CT-1983 11:50:19 DISK$VMSMASTER: [SVSLOA.SRC]INIADP(16) 073C 2083 INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 40 EXE$INIT TOOR - SET SYSTEM TIME TO COR 19-0CT-1983 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(17) 073C 073C 073C 073C 073C 073C 073C 073C 073C 073C. 073C 073C 7E 52 70 073C 073F 073F 073F 073F 073F 50 OOOO'CF 9E 073F 00000000'8F Cl 0744 51 50 074A OOOOOOOO'GF 9E 074C 52 0752 OOOOOOOO'GF 9E 0753 53 0759 9F17 SF 62 Bl 075A 1B 13 075F BO BF 03 A2 91 0761 16 12 0766 50 62 Dl 0768 DC 1 F 076B 51 62 01 0760 07 1A 0770 OOOOOOOO'GF 9E 0772 62 0778 52 02 co 0779 52 06 077C 52 D6 077E 53 52 Dl 0780 05 1F 0783 0785 0785 0785 50 OOOO'CF 9E 0785 51 OOOO'BF 3C 078A F87A 31 078F 0792 00000000 0000 0000 00000000 00000000 0000 0000 0008 62 OOOA 00000000'9F 00 OOOB oooc 16 oooc 52 BE 70 0012 2085 DEAL !NIT CODE: ; DEALLOCATE THE INITIALIZATION CODE 2086 2087 It is the duty of the last-executed, loadable initialization 2088 2089 routine to make itself and all other such routines disappear, i.e., release the space they occupy to non-paged pool. Each routine's vector 2090 must be disconnected, e.g., be made to point to the symbol, EXE$LOAD_ERROR. 2091 2092 NOTE: This means that new initialization routines should be added 2093 to this module in a particular order, not necessarily at the 2094 end of the module! 2095 2096 .ENABLE LSB 2097 MOVQ R2,-(SP) Save some registers 2098 2099 2100 First find the vectors that point to these initialization routines 2101 and reset them to point to EXE$LOAD_ERROR. 2102 2103 MOVAB WASYSL$BEGIN,RO ; Compute bounds of releasable piece: 2104 ADDL3 #<STAY_HEADER-SYSL$BEGIN>,RO,Rl ; starting and ending addresses. 2105 MOVAB GAEXE$AL LOAVEC,R2 Get starting address of vectors. 2106 MOVAB GAEXE$LOAO ERROR,R3 Get end of vectors. 2107 10$: 210B 2109 2110 2111 211 2 2113 2114 2115 CMPW BEQL CMPB BNEQ CMPL BLSSU CMPL BGTRU MOVAB (R2),#AX9Fl7 30$ 3(R2),#AXB0 40$ (R2),RO 20$ (R2),R1 20$ GAEXE$LOAO ERROR,(R2) Is this JMP @# ? Br if yes, skip past it. Is this a system space address Br if no, assume it's a HALT instr. Is address before the releasable piece of memory? Br on yes. Is address after the releasable piece of memory? Br on yes. Reset this vector. 2116 20$: AOOL #2,R2 Point past this vector. 2117 30$: INCL R2 Come here to point past JMP @#. 2118 40$: INCL R2 Come here to point past HALT. 2119 CMPL R2,R3 Past the end of the vectors? 2120 BLSSU 10$ Keep searching vectors. 2121 2122 Now release the memory to non-paged pool. 2123 2124 MOVAB WASYSL$BEGIN,RO ; Point to start of module 2125 MOVZWL #<STAY HEAOER-SYSL$BEGIN>,R1 ; Length to vaporize 2126 BRW 50$ - : Br to code that is not released. 2127 212B PSECT $$$INIT END,PAGE 'PAGE' SINCE 16-BYTE ALIGN IS NOT 2129 2130 STAY HEADER: 2131 - .LONG 0,0 2132 .WORD <SYSL$ENO-STAY HEADER> 2133 .BYTE DYN$C LOADCODE 2134 .BYTE 0 2135 2136 50$: JSB @#EXE$DEANONPGDSIZ Just the smile on the Chesire cat ·2137 MOVQ (SP)+,R2 Restore INIADP780 V03-021 - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 41 EXE$INIT~TODR SET SYSTEM TIME TO COR 19-0CT-1983 11:50:19 DISK$VMSMASTER: [SVSLOA.SRC]INIADP(17) 05 0015 2138 0016 2139 0016 2140 0016 2141 RSB .DISABLE LSB .END ; Return. INIADP780 Symbol table $$$VMSDEFINED $$Tl ADAPTERS ADP$B TYPE ADP$C-CIADPLEN ADP$C-DRADPLEN ADP$C-MBAADPLEN ADP$C-UBAADPLEN ADP$L-AVECTOR ADP$L-CRB ADP$L-CSR ADP$L-DPQFL ADP$L-LINK ADP$L-MBASCB ADP$L-MBASPTE ADP$L-MRACTMDRS ADP$L-MRQFL ADP$L-UBASCB ADP$L-UBASPTE ADP$L-VECTOR ADP$W-ADPTVPE ADP$W-DPBITMAP ADP$W-MRFFENCE ADP$W-MRFREGARY ADP$W-MRNFENCE ADP$W-MRNREGARY ADP$W-SIZE ADP$W-TR ADP$W-UMR DIS ADPLINK - ADPTAB ADPLEN ADPTAB-ATYPE ADPTAB-IDBUNITS ALONPAGD AT$ CI AT$-DR AT$-MBA AT$-UBA BADUMR BI BI BI BI - - BUS CODE CPU CSR LEN LIKE BLD CRB BOO$GB SYSTEMID B00$GL-SPTFREH B00$GL-SPTFREL BOO TV ECTOR BTD$K CONSOLE BTD$K-UDA BUS CODE OFFSET BUS-CSR LEN CI$INITIAL CI$INT CIT AB CONF I G IOSPACE CONFREG - ADAPTER INITIALIZATION FOR VAX 11 /780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 42 19-0CT-1983 11: 50: 19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(17) = = 00000001 00000001 00000000 R = OOOOOOOA = = 00000030 00000030 02 = = 00000030 00000258 = 0000001C = 00000010 = 00000000 = 00000014 = = 00000004 00000014 = 00000018 = 0000005C = 00000030 = 00000044 = 00000054 = = = 00000010 OOOOOOOE 00000060 = 0000015C = 0000015E = 00000062 = 00000064 = 00000008 · = oooooooc = 00000256 ******** x 09 00000001 00000003 00000000 00000304 R 09 = 00000004 = 00000002 = 00000000 = 00000001 00000300 R 08 = 80000000 = 00000000 = 00000002 = 00000000 00000506 R 09 ******** x 09 ******** x 09 ******** x 09 = 00000000 R 00000040 08 = 00000011 = FFFFFFFC 00000004 R 08 ******** x 09 ******** x 09 00000015 R 08 0000005F R 09 OOOOOOA4 R 08 CONFREGL CPU ADPSIZE CPU-TYPE CR CRB$8 TYPE CRB$C-LENGTH CRB$L-INTD CRB$L-WQBL CRB$L-WQFL CRB$W-SIZE CREATE ARRAYS CSR LEN OFFSET DDB$T NAME DEAL INIT CODE DIRECT VEC NODE CNT DR$INITIAL- - DR$INT DRTAB DYN$C ADP DYN$C-CONF DYN$C-CRB DYN$c::::ros DYN$C !NIT DYN$C-LOADCODE END NEXUS ERROR HALT ERROR-HALT 1 EXE$AL LOAVEC EXE$DEANONPGDSIZ EXE$GL CONFREG EXE$GL-CONFREGL EXE$GL-FLAGS EXE$GL-NUMNEXUS EXE$GL-RPB EXE$GL-SCB EXE$GL-TENUSEC EXE$GL-TODR EXE$GL-UBDELAY EXE$GQ-BOOTTIME EXE$GQ-TODCBASE EXE$INIT TOOR EXE$INI TIMWAIT EXE$LOAD ERROR EXE$MCHK-PRTCT EXE$0UTZSTRING EXE$SETIME INT EXE$TEST CSR EXE$UBAERR INT EXE$V SETTIME FILL CRB GET GEN TYPE GET-TYPE 108$8 TYPE IDB$C-LENGTH IDB$L -ADP IDB$L-CSR IDB$W-SIZE 000001E4 R 08 00000019 R 08 = 00000001 = = OOOOOOOD OOOOOOOA = 00000048 = 00000024 = 00000004 = 00000000 = 00000008 OOOOOllA R 09 = FFFFFFFB = 00000014 0000073C R 09 00000009 R 08 ******** x 09 ******** x 09 00000011 R 08 = 00000001 = = 00000007 00000005 = = 00000009 00000063 = 00000062 00000115 R 09 00000199 R 09 0000019E R 09 ******** x 09 ******** x OA ******** x 09 ******** x 09 ******** x 09 ******** x 09 ******** x 09 ******** x 09 ******** x 09 ******** x 09 ******** x 09 ******** x 09 ******** x 09 00000621 RG 09 0000056F RG 09 ******** x 09 ******** ******** ******** ******** ******** ******** x 09 x 09 x 09 x 09 x 09 x 09 00000513 R 09 00000089 R 09 OOOOOOAO R 09 = OOOOOOOA = 00000038 = 00000014 = 00000000 = 00000008 INIADP780 Symbol table IDB$W UNITS INI$ALLOC CRB IN I $ALONONPAGED INI$CIADP INI$CONSOLE INI$DRADP I NI $IOMAP INI$KDZ11 INI$MBADP INI$MPMADP INI$UBADP INI$UBSPACE !NIT ROUTINES INTI ME IO$M CVTLOW I0$M-PURGE I0$M-TIMED IO$ READPROMPT !0$-WRITEVBLK I07B0$AL IOBASE I0780$AL-NNEX I0780$AL -PERNEX I0780$AL=UBOSP LF LINBUF LINBUFSIZ MAP NEXUS MAP-PAGES MAXNEXUS MBA$INITIAL MBA$INT MBA TAB MCHK$M LOG MCHK$M-NEXM MMG$GL-SBICONF MMG$GL-SPTBASE MMG$SVAPTECHK NOT$ BUA NDT$-CI NDT$-DR32 NDT$-KDZ 11 NDT$-MB NDT$-MEM1664NI NDT$-MEM16I NDT$-MEM16NI NDT$-MEM4I NDT$-MEM4NI NDT$-MEM64EIL NDT$-MEM64EIU NDT$-MEM64I NDT$-MEM64NIL NDT$-MEM64NIU NDT$-MPMO NDT$-MPM1 NDT$-MPM2 NDT$-MPM3 NDT$=SCORMEM - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 43 19-0CT-1983 11: 50: 19 DISK$VMSMASTER: [SYSLOA.SRC]INIADP(l7) = oooooooc ******** x 09 ******** x 09 000003EF R 09 000004ED RG 09 000003DA R 09 00000000 RG 09 000004EC R 09 00000404 R 09 ******** x 06 000001C3 R 09 000001A7 R 09 = 00000000 R 00000014 06 ******** x 09 ******** x 09 ******** x 09 ******** x 09 = ******** 20000000 x 09 = 00000010 = 00002000 = 20100000 = OOOOOOOA = OOOOOOlC = 00000014 OOOOOOF9 R 09 00000173 R 09 = 00000040 ******** x 09 ******** x 09 00000000 R = 00000001 08 = 00000004 ******** x 09 ******** x 09 = ******** 80000102 x 09 = 00000038 = = = 00000030 80000105 00000020 = 00000012 = 00000011 = 00000010 = 00000009 = = = = 00000008 00000069 0000006B 0000006C = 00000068 = 0000006A = 00000040 = 00000041 = 00000042 = 00000043 = 80000001 NOT$ USO NDT$-UB1 NDT$-UB2 NDT$-UB3 NEXUSDESC NOS PT NPROMPT NUMUBAVEC NUM PAGES NXT-NEXUS OPA$CRB PA PR$ ICCS PR$-SID TYP730 PR$-SID-TYP750 PR$-SID-TYP780 PR$-SID-TYP790 PR$-SID-TYP8NN PR$-SID-TYP8SS PR$-SID-TYPUV1 PR$-TBIS PR7BO$ I CR PR780$-NICR PR780$-TODR PTE$C KW PTE$M-VALI D READTIME RPB$B DEVTYP RPB$L-ADPPHY RPB$L-ADPVIR RPB$L-BOOTR1 RPB$L-CSRPHY RPB$L-CSRVIR RPB$W-ROUBVEC SBICONF SBI S8I SB! SBI - - - BUS CODE CPU CSR LEN LIKE SGN$GW TPWA IT STAY HEADER SW BUS CODE SYS$ASSIGN SYS$BINTIM SYS$DASSGN SYS$QIOW SYSL$BEGIN SYSL$END TERM NAMADR TERM-NAMSIZ TEST-NEXUS TIME PROMPT TIMERR TMPDESC TT CHAN TTNAME UBA$INITIAL = 00000028 = 00000029 = 0000002A = 00000028 00000020 R 08 000002E4 R 08 = 00000033 = 00000080 00000000 R 04 00000068 R 09 = ******** 20020000 x 09 = = 00000018 00000003 = 00000002 = 00000001 = 00000004 = 00000006 = 00000005 = 00000007 = 0000003A = 0000001A = 00000019 = 00000018 = = 10000000 80000000 00000659 R 09 = 00000066 = 0000005C = = = 00000060 00000020 00000054 = 00000058 = 0000001E OOOOOOE4 R 08 = 00000000 = 00000001 = 00000001 = 00000001 ******** x 09 00000000 R OA 00000005 R 08 ******** GX 09 ******** GX 09 ******** GX 09 ******** GX 09 ******** x 09 ******** x OA 00000507 R = 00000004 09 00000071 R 09 000005ED R 09 00000508 R = oooooooc 09 = 00000000 = 00000004 ******** x 09 INIADP780 Symbol table UBA$INTO UBA$L BRRVR UBA$L-CR UBA$UNEXINT UBAERRADR UBAINT4 UBAINT4REL UBAINT5 UBAINT5REL UBAINT6 UBAINT6REL UBAINT7 UBAINT7REL UBAINTADP UBAINTBASE UBINTSZ VA$M SYSTEM VEC$L ADP VEC$L-IDB VEC$L-INITIAL VECTAB - ADAPTER INITIALIZATION FOR VAX 11/780 ******** x 09 00000030 00000004 ******** x 09 00000090 00000000 OOOOOOOA 00000020 0000002A 00000040 0000004A 00000060 0000006A 00000089 00000340 R 09 00000094 80000000 00000014 00000008 oooooooc 000003D4 R 09 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 44 19-0CT-1~83 11:50:19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(17) PSECT name ABS $ABS$ $$$INIT$DATAO $$$INIT$DATA 1 $$$INIT$DATA2 $$$INIT$DATA3 $$$IN IT$DATA4 $$$IN I'r$DATA5 $$$INIT$DATA $$$IN IT$CODE $$$INIT END Psect synopsis ------------+ Al location ---------- PSECT No. Attributes 00000000 ( 0.) 00 ( 0.) NOPIC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE 00000004 ( 4.) 01 ( 1.) NOPIC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE 00000060 ( 96.) 02 ( 2.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 00000000 ( 0. ) 03 ( 3. ) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 00000030 ( 48.) 04 ( 4.) NOPIC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 00000000 ( 0. ) 05 ( 5.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 00000060 ( 96.) 06 ( 6.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 00000000 ( 0. ) 07 ( 7.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 0000033F ( 831 . ) 08 ( 8.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC LONG 00000792 ( 1938.) 09 ( 9. ) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC QUAD 00000016 ( 2 2. ) OA ( 10.) NOPIC USR CON REL LCL NOSHR EXE RD WRT NOVEC PAGE --+ Performance indicators ! Phase Page faults Initialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals 31 124 530 0 313 32 7 0 1040 The working set limit was 1950 pages. CPU Time 00~00:00.07 00:00:00.50 00:00:16.59 00:00:01.67 00:00:06.56 00:00:00. 16 00:00:00.06 00:00:00.00 00:00:25.63 Elapsed Time 00:00:00.34 00:00:01 .88 00:01:02.39 00:00:04.91 00:00:33.79 00:00:00.66 00:00:00.21 00:00:00.00 00:01 :44.18 INIADP780 VAX-11 Macro Run Statistics - ADAPTER INITIALIZATION FOR VAX 11/780 3-JUN-1984 14:53:36 VAX-11 Macro V03-01 Page 45 19-0CT-1983 11:50: 19 DISK$VMSMASTER:[SYSLOA.SRC]INIADP(17) 134197 bytes (263 pages) of virtual memory were used to buffer the intermediate code. There were 90 pages of symbol table space allocated to hold 1618 non-local and 36 local symbols. 2489 source lines were read in Pass 1, producing 39 object records in Pass 2. 46 pages of virtual memory were used to define 44 macros. +--------------------------+ ! Macro library statistics ! Macro library name Macros defined $255$DUA28:[SYS.OBJ]LIB.MLB;1 21 -$255$DUA28:[SYSLIB]STARLET.ML8;2 15 fOTALS (all librarie~) 36 1755 GETS were required to define 36 macros. There were no errors, warnings or information messages. MACRO/LIS=LIS$:INIADP780/0BJ=OBJ$:INIADP780 MSRC$:CPUSW780/UPDATE=(ENH$:CPUSW780)+MSRC$:INIADP/UPDATE=(ENH$:INIADP)+EXECML$/LIB LIOSUB780 LIOSUB780 Table of contents (3) 137 - LOADABLE I/0 SUBROUTINES PURGE DATAPATH 3-JUN-1984 14:57:17 VAX-11 Macro V03-01 Page 0 LIOSUB780 V03-012 - LOADABLE I/O SUBROUTINES 3-JUN-1984 14:57: 17 VAX-11 Macro V03-01 Page 1 6-APR-1984 16:16:35 DISK$VMSMASTER:[SYSLOA.SRC]LIOSUB.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1 .NOSHOW CONDITIONALS 3 .TITLE LIOSUB780 - LOADABLE I/O SUBROUTINES 5 9 13 17 21 22 . I DENT 'V03-0l2' 23 24 25 ;**************************************************************************** 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 ; ; * * COPYRIGHT (c) 1978, 1980, 1982, 1983, 1984 BY ; * DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. ;* ALL RIGHTS RESERVED. * * * * ;* ; * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ; * ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE ;* INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER ;* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY ;* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY ;* TRANSFERRED. ; * ;* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE ;* AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT ;* CORPORATION. ; * ; * DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS ;* SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * * * * * * * * * * * * * * ;* ;* ;**** ** *** ** *** ** *** ** *** ** *** ** *** ** *** ***** ***** ***** ***** ***** ***** ***** * *** 47 48 ;++ 49 50 FACILITY: 51 52 EXECUTIVE, I/O CONTROL ROUTINES 53 54 ABSTRACT: 55 56 I/O SUBROUTINES WHICH CONTAIN PROCESSOR DEPENDENCIES. 57 58 AUTHOR: 59 60 N. KRONENBERG, JANUARY 12, 1979. 61 62 MODIFIED BY: 63 64 V03-012 KDM0096 Kathleen D. Morse 27-Mar-1984 65 Add memory CSR scanning to IOC$PURGDATAP for MicroVAX I. 66 (All OMA MicroVAX I drive~s should cal 1 this routine, just 67 before calling IOC$REQCOM.) 68 69 V03-011 KDM0081 Kathleen D. Morse 13-Sep-1983 70 Create a version for Micro-VAX I. 71 LIOSUB780 V03-012 - LOADABLE I/O SUBROUTINES 3~JuN-1984 14:57:17 VAX-11 Macro V03-0l Page 2 6-APR-1984 16:16:35 DISK$VMSMASTER:[SYSLOA.SRC]LIOSUB.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000. 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 ;-- V03-010 TCM0004 Trudy C. Matthews 4-Jan-1982 Added 11/790-specific path to IOC$PURGDATAP. V09 TCM0003 Trudy C. Matthews 9-Nov-1982 Added a .TITLE statement for LIOSUB790. VOS TCM0002 Trudy C. Mathews Changed all "7ZZ"s to "730"s. 29-Jul-1981 V07 TCMOOOl Trudy C Matthews 28-Feb-1980 Changed IOC$PURGDATAP for NEBULA so that it logs the Unibus Error Summary register itself when there are Unibus errors reported. V06 NPK0002 N. KRONENBERG REPLACED IOC$PURGDATAP FOR NEBULA 4-DEC-1979 V05 NPKOOOl N. KRONENBERG 23-AUG-1979 CORRECTED 11/750 CHECK FOR PURGE DONE. V04 TCMOOOl Trudy C. Matthews Modified IOC$PURGDATAP for NEBULA. 3-Jul-1979 LIOSUB780 V03-012 - LOADABLE I/O SUBROUTINES 00000001 00000000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 97 98 ; MACRO LIBRARY CALLS: 99 ; 100 $ADPDEF 101 $CRBDEF 102 $EMBETDEF 103 $EMBUEDEF 104 $IDBDEF 105 $PRDEF 106 $UBADEF 107 $UBIDEF 108 $UCBDEF 109 $VECDEF 110 112 C780 LIKE = 1 113 C750=LI KE = 0 115 120 125 130 135 3-JUN-1984 14:57:17 VAX-11 Macro V03-0l Page 3 6-APR-1984 16:16:35 DISK$VMSMASTER:[SVSLOA.SRC]LIOSUB.(2) Define ADP offsets Define CRB offsets Define error types. Define Unibus Error buffer. Define IDB offsets Define IPR'S Define UBA offsets Define UBI offsets Define UCB offsets Define CRB/VEC offsets LIOSUB780 V03-012 - LOADABLE I/O SUBROUTINES PURGE DATAPATH 3-JUN-1984 14:57: 17 VAX-11 Macro V03-01 Page 4 6-APR-1984 16:16:35 DISK$VMSMASTER:[SVSLOA.SRC]LIOSUB.(3) 10 53 24 A5 52 38 B3 00 05 51 37 A3 54 40 A241 64 01 1F 51 64 08 51 1E 64 01 1E 50 03 50 01 52 0800 C2 10 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 00000000 0000 0000 0000 0000 BB 0000 DO 0002 DO 0006 OOOA EF OOOA oooc OOOD DE 0010 78 0015 DO 0019 E1 001C 78 0020 D4 0024 11 0026 9A 0028 DE 002B 0030 BA 0030 05 0032 0033 0033 0033 0033 0033 0033 0033 0033 137 .SBTTL PURGE DATAPATH 138 ;+ 139 IOC$PURGDATAP - PURGE DATAPATH 140 141 This routine purges the caller's buffered datapath, and clears any 142 datapath errors. if there was a datapath error, this fact is 143 returned to the caller. 144 145 INPUTS: 146 147 RS = UCB address 148 149 OUTPUTS: 150 151 RO-R3 altered 152153 = Other registers preserved RO low bit clear/set if transmission error/success 154 R1 = DPR contents after purge (for register dump by caller) 155 R2 =address of start of adapter map registers (tor reg dump by caller) 156 R3 = CRB address 157 158 159 .PSECT WIONONPAGED 160 161 .ENABL LSB 162 163 IOC$PURGDATAP:: 165 PUSHR #AM<R4> ; Save register 166 MOVL UCB$L CRB(R5),R3 ; Get CRB address 167 MOVL @CRB$L INTD+VEC$L ADP(R3),R2 ; Get start of adapter register space 168 169 EXTZV #VEC$V DATAPATH,- ; Extract datapath # 170 #VEC$S-DATAPATH,- ; from CRB 171 CRB$L lNTD+VEC$8 DATAPATH(R3),R1 172 MOVAL UBA$L-DPR(R2)[RlJ,R4 ; Get address of DPR 173 ASHL #UBA$V DPR BNE,#1,(R4) ; Purge datapath 174 MOVL (R4),RT - ; Get DPR contents 175 BBC #UBA$V DPR XMTER,R1 ,20$ ; Branch if no error 176 ASHL #UBA$V-DPR-XMTER,#1,(R4) ; Clear error in DPR 177 CLRL RO -- ; Set to return transfer error 178 BRB 30$ ; Join common code 179 20$: MOVZBL #1,RO ; Set to return transfer success 180 30$: MOVAL UBA$L MAP(R2),R2 ; Return addr of 1st map register 181 182 POPR #AM<R4> Restore register 183 RSB Return 185 186 214 263 297 298 .DSABL LSB 299 300 .END LIOSUB780 Symbol table C750 LI KE C780-LI KE CPU TYPE CRB$L INTO IOC$PURGDATAP PR$ SID TYP730 PR$-SID-TYP750 PR$-SID-TYP780 PR$-SID-TYP790 PR$-SID-TYPUV1 UBA$L DPR UBA$L-MAP UBA$V-DPR BNE UBA$V-DPR-XMTER UCB$L-CRBVEC$B-DATAPATH VEC$L-ADP VEC$S-DATAPATH VEC$V=DATAPATH - LOADABLE I/O SUBROUTINES 00000000 00000001 00000001 00000024 00000000 RG 02 00000003 00000002 00000001 00000004 0000000~ 00000040 00000800 0000001F 0000001E 00000024 00000013 00000014 00000005 00000000 3-JUN-1984 14:57:17 VAX-11 Macro V03-01 Page 5 6-APR-1984 16:16:35 DISK$VMSMASTER:[SYSLOA.SRC]LIOSUB.(3) Psect synopsis PSECT name Allocation PSECT No. Attributes ABS $ABS$ WIONONPAGED 00000000 00000000 00000033 0. ) 00 0. ) 01 5 1 . ) 02 0. ) NOP IC USR CON ABS LCL NOSHR NOEXE NORD 1 . ) NOP IC USR CON ABS LCL NOSHR EXE RD 2. ) NOPIC USR CON REL LCL NOSHR EXE RD +-- ! Performance indicators ! ---+ Phase Page faults CPU Time Elapsed Time Initialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals 25 00:00:00.04 00:00:00.24 121 00:00:00.49 00:00:02.65 273 00:00:04.90 00:00: 10.47 0 00:00:00.77 00:00:01.25 31 00:00:00.97 00:00:02.58 3 00:00:00.03 00:00:00.03 3 00:00:00.01 00:00:00.01 0 00:00:00.00 00:00:00.00 459 00:00:07.21 00: 00: 17. 23 The working set limit was 1350 pages. 43453 bytes (85 pages) of virtual memory were used to buffer the intermediate code. There were 40 pages of symbol table space allocated to hold 754 non-local and 2 local 304 source lines were read in Pass 1, producing 13 object records in Pass 2. 17 pages of virtual memory were used to define 16 macros. symbols. NOWRT NOVEC BYTE WRT NOVEC BYTE WRT NOVEC BYTE LIOSUB780 VAX-11 Macro Run Statistics - LOADABLE I/O SUBROUTINES 3-JUN-1984 14:57:17 VAX-11 Macro V03-0l Page 6 6-APR-1984 16:16:35 DISK$VMSMASTER:[SYSLOA.SRC)LIOSUB.(3) ---+ Macro library statistics ! Macro library name Macros defined $255$DUA28:[SYS.OBJ)LIB.MLB;l 9 $255$DUA28:[SYSLIB)STARLET.MLB;2 4 TOTALS (all libraries) 13 845 GETS were required to define 13 macros. There were no errors, warnings or information messages. MACRO/LIS=LIS$:LIOSUB780/0BJ=OBJ$:LIOSUB780 MSRC$:CPUSW780/UPDATE=(ENH$:CPUSW780)+MSRC$:LIOSUB/UPDATE=(ENH$:LIOSUB)+EXECML$/LIB LOADMREG LOADMREG Table of contents ( 1) 74 ( 1) 120 ( 1) 197 ( 1) 230 ( 1) 276 - LOAD MBA AND UBA MAP REGISTERS LOAD MASSBUS ADAPTER MAP REGISTERS LOAD UNIBUS ADAPTER MAP REGISTERS GET PFN FROM INVALID PTE Load UBA map registers LOAD UNIBUS ADAPTER MAP REGISTERS FOR UDA PORT 3-JUN-1984 11 :45:48 VAX-11 Macro V03-01 Page 0 LOADMREG V03-002 ;RLRPDTADP -1 ;RLRPDTADP ;RLRPDTADP ;RLRPDtADP ;RLRPDTADP ;KDM0002 ;KDM0002 -24 - LOAD MBA AND UBA MAP REGISTERS 3-JUN-1984 11 :45:48 VAX-11 Macro V03-01 Page 1 12-MAR-1982 17:12:47 DISK$VMSMASTER: [SYS.SRC]LOADMREG.M(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1 .TITLE LOADMREG - LOAD MBA AND UBA MAP REGISTERS 1 .IDENT 'V03-002' 3 4 5 ;**************************************************************************** 6 ;* * 7 8 ; ; "' * 9 ; *. 10 ; * 11 ;* COPYRIGHT (c) 1978, 1980, 1982 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. ALL RIGHTS RESERVED. THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * * * * * 12 ;* 13 ;* 14 ;* 15 16 ;;** ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED. * * * * * 17 ;* 18 ;* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * * 19 ;* AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * 20 * CORPORATION. * 21 22 23 * * * DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * * * 24 25 26 ;;;******************************************************************************** 27 28 D. N. CUTLER 1-NOV-77 29 30 LOAD MBA MAP REGISTERS 31 32 MODIFIED BY: 33 .1 V03-002 RLRPDTADP Robert L. Rappaport 9-Apr-1984 .2 Modify IOC$LUBAUDAMAP so as to pickup the pointer to the .3 ADP from PDT$L ADP(R4). .4 . 5 V03-001 KDM0002 Kathleen D. Morse 28-Jun-1982 .6 Add $VADEF. 58 LOADMREG V03-002 ;.RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;RLRPDTADP ;KDM0002 -4 - LOAD MBA AND UBA MAP REGISTERS 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 60 61 ; MACRO LIBRARY CALLS 62 63 64 $ADPDEF 65 $CDRPDEF 66 $CRBDEF 67 $MBA DEF .1 $PDTDEF . 2 $PTEDEF . 3 $UBADEF .4 $UBMDDEF .5 $UCBDEF . 6 $VADEF 72 $VECDEF 3-JUN-1984 11 :45 :48 VAX-11 Macro V03-01 Page 2 12-MAR-1982 17: 12 :47 DISK$VMSMASTER:[SYS.SRC]LOADMREG.M(1) ;DEFINE ADP OFFSETS ;DEFINE CORP OFFSETS ;DEFINE CRB OFFSETS ;DEFINE MBA REGISTER OFFSET DEFINITIONS ;DEFINE PDT OFFSETS ;DEFINE PAGE TABLE ENTRY FIELDS ;DEFINE UCB OFFSETS ;DEFINE UBMD OFFSETS ;DEFINE UCB OFFSETS ;DEFINE VIRTUAL ADDRESS FIELDS ;DEFINE CRB TRANSFER VECTOR OFFSETS LOADMREG V03-002 - LOAD MBA AND USA MAP REGISTERS LOAD MASSBUS ADAPTER MAP REGISTERS 3-JUN-1984 11 :45:48 VAX-11 Macro V03-01 Page 3 12-MAR-19B2 17:12:47 DISK$VMSMASTER:(SYS.SRC]LOADMREG.M(1) 53 52 7E A5 10 A4 52 51 7C A5 OC A4 51 OC A4 51 52 OlFF C241 52 F7 BF 52 51 OBOO C4 50 7B A5 81 80 09 FB 52 61 53 BE 53 FC AO 0095 BOOOOOOO BF FC A1 53 E5 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 00000000 0000 DD 0000 3C 0002 CE 0006 3C OOOA DO OOOE DO 0012 9E 0016 7B 001C 0020 DE 0021 DO 0026 DO 002A 18 002D F5 002F D4 0032 DO 0034 05 0037 ob 0039 30 003C C9 003F 0045 11 0048 74 .SBTTL LOAD MASSBUS ADAPTER MAP REGISTERS 75 ;+ 76 IOC$LOADMBAMAP - LOAD MASSBUS ADAPTER MAP REGISTERS 77 78 THIS ROUTINE IS CALLED TO LOAD THE MASSBUS ADAPTER MAP REGISTERS, THE 79 BYTE COUNT REGISTER, AND THE VIRTUAL ADDRESS REGISTER. 80 81 INPUTS: 82 83 84 == R4 ADDRESS OF MBA CONFIGURATION STATUS REGISTER. R5 UCB ADDRESS OF UNIT TRANSFER IS TO OCCUR ON. 85 86 OUTPUTS: 87 88 THE TRANSFER BYTE COUNT, STARTING PAGE OFFSET, AND ADDRESS OF THE 89 PAGE TABLE ENTIRES THAT DESCRIBE THE TRANSFER ARE RETRIEVED FROM 90 THE SPECIFED UCB AND USED TO LOAD THE MBA BYTE COUNT, VIRTUAL ADDRESS, 91 AND MAP REGISTERS. ONE ADDITIONAL MAP REGISTER IS LOADED AS INVALID 92 TO STOP THE TRANSFER IF A HARDWARE FAILURE SHOULD OCCUR. 93 94 R3 IS PRESERVED ACROSS CALL. 95 96 97 .PSECT WIONONPAGED 98 IOC$LOADMBAMAP:: ;LOAD MASSBUS ADAPTER MAP REGISTERS 99 PUSHL R3 ;SAVE REGISTERS 100 MOVZWL UCB$W BCNT(R5) ,R2 ;GET TRANSFER BYTE COUNT 101 MNEGL R2,MBA$L BCR(R4) ;LOAD BYTE COUNT REGISTER 102 MOVZWL UCB$W BOFF(R5),R1 ;GET BYTE OFFSET IN PAGE 103 MOVL R1,MBA$L VAR(R4) ;LOAD STARTING VIRTUAL ADDRESS 104 MOVL R1,MBA$L-VAR(R4) ;*****TEMP UNTIL MBA ECO ****** 105 MOVAB AX1FF(R2)[R1],R2 ;CALCULATE HIGHEST RELATIVE BYTE AND ROUND 106 ASHL #-9,R2,R2 ;CALCULATE NUMBER OF MAP REGISTERS TO LOAD 107 10B 109 10$: 110 111 20$: 112 113 114 115 30$: 116 117 MOVAL MOVL MOVL BGEQ SO BG TR CLRL MOVL RSB MOVL BSBW BISL3 MBA$L MAP(R4),R1 UCB$L-SVAPTE(R5),RO (RO)+-;- ( R1 ) + 30$ R2, 10$ ( R1) (SP)+,R3 -4(RO),R3 IOC$PTETOPFN #AX80000000,R3,-4(R1) ;GET ADDRESS OF MBA MAP REGISTERS ;GET ADDRESS OF PAGE TABLE ;LOAD MAP REGISTER ;IF GEQ PTE INVALID ;ANY MORE TO LOAD? ;LOAD INVALID MAP ENTRY ;RESTORE REGISTER ;GET THE PTE (NOT FROM MAP REGISTER!) ;GET PFN FROM INVALID PTE ;AND LOAD THE MAP REGISTER 118 BRB 20$ LOADMREG V03-002 - LOAD MBA AND UBA MAP REGISTERS LOAD UNIBUS ADAPTER MAP REGISTERS 3-JUN-1984 11:45:48 VAX-11 Macro V03-01 Page 4 12-MAR-1982 17:12:47 DISK$VMSMASTER: [SYS.SRC]LOADMREG.M(l) 7E 53 51 7C A5 52 7E A5 53 24 A5 00 05 54 37 A3 lB 7E 53 51 7C A5 52 7E A5 53 24 A5 00 05 54 37 A3 03 51 54 10 54 0400 BF 05 03 37 A3 54 20 52 OlFF C241 52 F7 8F 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 004A 7D 004A 3C 004D 3C 0051 DO 0055 EF 0059 0058 005C 11 005F 0061 7D 0061 3C 0064 3C 0068 DO 006C EF 0070 0072 0073 E9 0076 88 0079 AS 007C E 1 0081 0083 88 0086 9E 0089 78 008F 120 .SBTTL LOAD UNIBUS ADAPTER MAP REGISTERS 121 ;+ 122 IOC$LOADUBAMAP - LOAD UNIBUS ADAPTER MAP REGISTERS 123 IOC$LOADUBAMAPA - LOAD UNIBUS ADAPTER MAP REGISTERS ALTERNATE ENTRY FOR 124 BYTE ALIGNED UNIBUS DMA DEVICES WHICH NEVER WISH TO SET THE BYTE 125 OFFSET BIT IN MAP REGISTERS. IN ALL OTHER RESPECTS THESE TWO 126 ENTRYPOINTS PRODUCE IDENTICAL RESULTS. 127 128 THIS ROUTINE IS CALLED TO LOAD THE UNIBUS ADAPTER MAP REGISTERS. 129 130 INPUTS: 131 132 = R5 UCB ADDRESS OF UNIT TRANSFER IS TO OCCUR ON. 133 134 IT IS ASSUMED THAT THE DATAPATH AND MAP REGISTERS HAVE BEEN PREVIOUSLY 135 ASSIGNED. 136 137 OUTPUTS: 138 139 EACH MAP REGISTER IS LOADED WITH THE APPROPRIATE PAGE FRAME NUMBER 140 MERGED WITH THE DATAPATH DESIGNATOR AND BYTE OFFSET BIT. ONE ADDITIONAL 141 MAP REGISTER IS LOADED AS INVALID TO STOP THE TRANSFER IF A HARDWARE 142 FAILURE SHOULD OCCUR. 143 144 R3 IS PRESERVED ACROSS CALL. 145 ; - 146 147 .ENABL LSB 148 IOC$LOADUBAMAPA:: ;LOAD UNIBUS ADAPTER MAP REGISTERS - ALTERNATE 149 HERE WE DUPLICATE THE CODE IN THE OTHER ENTRY 150 EXCEPT THAT WE DO NOT CHECK WHETHER THE BYTE 151 OFFSET IS ODD. INSTEAD WE BRANCH DIRECTLY 152 PAST THE SETTING OF THE BYTE OFFSET BIT. 153 MOVQ R3,-(SP) ;SAVE REGISTERS 154 MOVZWL UCB$W BOFF(R5),R1 ;GET BYTE OFFSET IN PAGE 155 MOVZWL UCB$W-BCNT(R5),R2 ;GET TRANSFER BYTE COUNT 156 MOVL UCB$L-CRB(R5),R3 ;GET ADDRESS OF CRB 157 EXTZV #VEC$V DATAPATH,- ;GET DATAPATH 158 #VEC$S DATAPATH,- ; NUMBER 159 CRB$L INTD+VEC$B DATAPATH(R3),R4 160 BRB 10$ - ; BRANCH AROUND TO JOIN COMMON CODE 161 IOC$LOAOUBAMAP:: ;LOAD UNIBUS ADAPTER MAP REGISTERS 162 MOVQ R3,-(SP) ;SAVE REGISTERS 163 MOVZWL UCB$W BOFF(R5),R1 ;GET BYTE OFFSET IN PAGE 164 MOVZWL UCB$W-BCNT(R5) ,R2 ;GET TRANSFER BYTE COUNT 165 MOVL UCB$L-CRB(R5),R3 ;GET ADDRESS OF CRB 166 EXTZV #VEC$V DATAPATH,- ;GET DATAPATH 167 #VEC$S-DATAPATH,- ; NUMBER 168 CRB$L INTD+VEC$B DATAPATH(R3),R4 169 BLBC R1,10i ;IF LBC WORD ALIGNED TRANSFER 170 BISS #AX10,R4 ;SET BYTE OFFSET BIT 171 10$: BISW #AX400,R4 ;MERGE VALID WITH BYTE OFFSET AND DATAPATH 172 BBC #VEC$V LWAE,- ;BRANCH IF LONGWORD ACCESS NOT ENABLED 173 CRB$L INTD+VEC$B DATAPAfH(R3), 15$ 174 BISB #AX20~R4 - ELSE SET LWAE FOR MAP REG 175 15$: MOVAB AX1FF(R2)[Rl j ,R2 CALCULATE HIG~EST RELATIVE BYTE AND ROUND 176 ASHL #-9,R2,R2 CALCULATE NUMBER OF MAP REGISTERS TO LOAD LOADMREG V03-002 - LOAD MBA AND UBA MAP REGISTERS LOAD UNIBUS ADAPTER MAP REGISTERS 3-JUN-1984 11:45:48 VAX-11 Macro V03-01 Page 5 12-MAR-1982 17:12:47 DISK$VMSMASTER:[SYS.SRC]LOADMREG.M(1) 52 36 A3 52 2C 51 38 B3 00 OF 50 34 A3 51 0800 C140 50 78 A5 53 80 02 1 F OB 15 54 53 81 53 EE 52 61 53 BE 0093 91 0094 1E 0098 DO 009A EF 009E OOAO OOA1 DE OOA4 DO OOAA DO OOAE 19 OOB1 10 OOB3 FO 0085 0089 DO OOBA F5 OOBD 04 ooco 7D OOC2 05 OOC5 OOC6 OOCA 177 178 179 180 181 182 183 184 185 20$: 186 187 188 30$: 189 190 191 192 193 194 40$: 195 CMPB BGEQU MOVL EXTZV MOVAL MOVL MOVL BLSS BSBB INSV R2,CRB$L_INTD+VEC$B_NUMREG(R3) ;ENOUGH MAP REGISTERS ASSIGNED? 40$ ;IF GEQU NO @CRB$L INTD+VEC$L ADP(R3),R1 ;GET ADDRESS OF CONFIGURATION REGISTER #VEC$V-MAPREG,- - ;GET STARTING REGISTER #VEC$S-MAPREG,- CRB$L INTD+VEC$W MAPREG(R3),RO UBA$L-MAP(R1)[ROJ,R1 ;GET ADDRESS OF FIRST MAP REGISTER TO LOAD UCB$L-SVAPTE(R5),RO ;GET ADDRESS OF PAGE TABLE (RO)+-:-R3 ;GET NEXT PAGE TABLE ENTRY 30$ ;IF LSS VALID PAGE TABLE ENTRY IOC$PTETOPFN ;GET PFN FROM INVALID PTE R4,#21,#11 ,R3 ;INSERT VALID, BYTE OFFSET, AND DATAPATH MOVL R3,(R1)+ SO BG TR R2,20$ CLRL ( R1) MOVQ (SP)+,R3 RSB BUG CHECK UBMAPEXCED,FATAL .DSABL LSB ;LOAD UBA MAP REGISTER ;ANY MORE TO LOAD? ;LOAD INVALID MAP ENTRY :RESTORE REGISTERS ;UNIBUS MAP REGISTER ALLOCATION EXCEEDED LOADMREG V03-002 - LOAD MBA AND UBA MAP REGISTERS GET PFN FROM INVALID PTE 3-JUN-1984 11:45:48 VAX-11 Macro V03-0l Page 6 12-MAR-1982 17:12:47 DISK$VMSMASTER:[SYS.SRC]LOADMREG.M(l) OOOOOOQO'FF43 53 OF FB800000 SF 53 05 53 1A E7 53 16 OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA OOCA DO OOCA OOD1 19 OOD2 OOD4 CA 0004 OODA OODB EO OODB E4 OODF 05 OOE3 OOE4 OOE8 OOE8 197 .SBTTL GET PFN FROM INVALID PTE 198 + 199 IOC$PTETOPFN - GET PFN FROM INVALID PTE 200 201 THIS ROUTINE IS CALLED TO RETURN THE PAGE FRAME NUMBER FROM A 202 PAGE TABLE ENTRY WHICH HAS ALREADY BEEN DETERMINED TO BE NOT VALID. 203 204 ; INPUTS: 205 206 ; R3 = PAGE TABLE ENTRY 207 ; 208 ; OUTPUTS: 209 ; 210 ; = R3 PAGE FRAME NUMBER AND MAY INCLUDE THE FOLLOWING FIELDS 211 ; VALID BIT, MODIFY BIT, PROTECTION FIELD, OWNER FIELD 212 ; 213 ; ALL OTHER REGISTERS PRESERVED 214 ;- 215 216 .ENABL LSB 217 GLOBAL: 218 MOVL @MMG$GL GPTBASE[R3] ,R3 ;GLOBAL PAGE TABLE ENTRY 219 BLSS 220 IOC$PTETOPFN:: 221 BICL 10$ ;BRANCH IF VALID #AC<PTE$M TYPl ! PTE$M TYPO !- ;PTE TYPE BITS 222 223 224 225 i 0$: 226 20$: 227 228 PTE$M GPTX>,R3 BBS #PTE$V TYPl ,R3,20$ BBSC #PTE$V=TYPO,R3,GLOBAL RSB BUG CHECK INVPTEFMT,FATAL .DSABL LSB AND GPTX/PFN BRANCH IF BAD PTE FOR I/O BRANCH IF GLOBAL PAGE ;INVALID PAGE TABLE ENTRY FORMAT LOADMREG V03-002 - LOAD MBA AND UBA MAP REGISTERS Load UBA map registers 3-JUN-19S4 11 :45:4S VAX-11 Macro V03-01 Page 7 12-MAR-19S2 17:12:47 DISK$VMSMASTER: [SYS.SRC]LOADMREG.M(l) 54 51 15 09 51 OOOOOOOO'GF 54 50 6441 54 24 A5 54 3S B4 51 OSOO C443 00000400 BF 54 BE 52 53 so 02 BB 15 54 53 OB S 1 53 EE 52 61 ODES DOES DOES DOES OOES OOES ODES DOES DOES DOES ODES ODES ODES ODES ODES ODES ODES DOES DOES GOES ODES DOES ODES ODES DOES ODES DD DOES EF OOEA OOEE DO OOEF OOF5 DE OOF6 DO OOFA DO OOFE DE 0102 C9 0108 OlOE D7 0110 DO 0112 19 0115 10 0117 FD 0119 011 c DO 011 E F5 0121 D4 0124 05 0126 230 .SBTTL Load UBA map registers 231 ;++ 232 IOC$LOADUBAMAPN - Load UBA map registers 233 234 Functional description: 235 236 This routine is cal led to load the UNIBUS adapter map registers. 237 It differs from IOC$LOADUBAMAPN in that it does not o~,ain its 23S variant inputs from the UCB and CRB (which are normally synchronized 239 at fork IPL). Also, the byte offset and longword aligned 240 capabilities are not supported. 241 242 Inputs: 243 244 Rl = buffer address 245 R2 = number of map registers al located 246 (last one should be extra one for wild transfer stopper) 247 R3 = starting map register al located 24S 249 = R4 datapath number = R5 UCB address 250 251 Outputs: 252 253 RO-R4 destroyed. R5 preserved. 254 255 IOC$LOADUBAMAPN:: 256 PUSHL R4 ; Save datapath number 257 EXTZV SA#VA$V VPN,$A#VA$S VPN,R1 ,Rl ; Get buffer virtual page number 258 MOVL GAMMG$GL_SPTBASE,R4 Get system page table addres 259 260 261 262 263 264 265 266 20$: 267 26S 269 30$: 270 271 272 273 274 MOVAL MOVL MOVL MOVAL BISL3 DECL MOVL BLSS BSBB INSV MOVL SOBGTR CLRL RSB (R4)[Rl],RO ; Get first PTE address UCB$L CRB(R5),R4 ; Get CRB address @CRB$L INTD+VEC$L ADP(R4),R4 ; Get first UBA register address UBA$L MAP(R4)[R3]~Rl ; Get address of first map register #1@<UBA$V MAP VALID-UBA$V MAP DPD>,- ; Get datapath number (SP)+,R4 ;-and-set map register valid bit R2 ; Subtract last register from count (RO)+,R3 ; Get next page table entry 30$ ; Br if valid page IOC$PTETOPFN ; Get PFN from invalid (global) page R4,#UBA$V MAP DPD,- ; Insert datapath and valid bit, #32-UBA$V-MAP-DPD,R3 ; clearing other PTE flags R3,(R1)+ - - ; Load the map register R2,20$ ; Loop through all registers (Rl) ; Invalidate last one to stop wild xfer LOADMREG V03-002 ;RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP RLRPDTADP 9 - LOAD MBA AND UBA MAP REGISTERS 3-JUN-19B4 11:45:4B VAX-11 Macro V03-01 Page B LOAD UNIBUS ADAPTER MAP REGISTERS FOR UD 12-MAR-19B2 17:12:47 DISK$VMSMASTER: [SYS.SRC]LOADMREG.M(1) 7E 53 7D OOEO D4 DD 51 DO A5 3C 52 D2 A5 3C 50 3C A5 9E 00 EF 05 54 03 AO 03 51 E9 54 10 BB 54 0400 BF AB 52 01FF C241 9E 52 F7 BF 7B 52 02 AO 51 8EDO 52 91 2B 1E 00 EF OF 50 60 51 0800 C140 DE 50 CC A5 DO 53 80 DO 03 19 FF5E 30 OB 15 54 FO 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 0127 012A 012A 012A 012E 012E 0132 0136 013A 013C 013D 0140 0140 0143 0146 0148 0151 0155 0156 0156 0159 0150 015F 015F 0161 0162 0164 0164 016A 016E 0171 0173 0176 276 .SBTTL LOAD UNIBUS ADAPTER MAP REGISTERS FOR UDA PORT 277 ;+ 278 ; IOC$LUBAUDAMAP - LOAD UNIBUS ADAPTER MAP REGISTERS FOR UDA PORT 279 2BO INPUTS: 2B1 · 1 R4 => PDT . 2B2 R5 => CORP OF I/0 REQUEST. 283 284 IT IS ASSUMED THAT THE DATAPATH AND MAP REGISTERS HAVE BEEN PREVIOUSLY 285 ASSIGNED. 2B6 2B7 OUTPUTS: 2B8 289 EACH MAP REGISTER IS LOADED WITH THE APPROPRIATE PAGE FRAME NUMBER 290 MERGED WITH THE DATAPATH DESIGNATOR AND BYTE OFFSET BIT. ONE ADDITIONAL 291 MAP REGISTER IS LOADED AS INVALID TO STOP THE TRANSFER IF A HARDWARE 292 FAILURE SHOULD OCCUR. 293 294 R3 IS PRESERVED ACROSS CALL. 295 ' 296 297 IOC$LUBAUDAMAP:: ;LOAD UNIBUS ADAPTER MAP REGISTERS 298 299 MOVQ R3,-(SP) ;SAVE REGISTERS .1 ; 2 ASSUME ADP$L CSR EQ 0 .3 PUSHL @PDT$L_ADP(R4) Push UBA CSR address on stack. .4 300 MOVZWL CDRP$W BOFF(R5),Rl Rl=BYTE OFFSET IN PAGE 301 MOVZWL CDRP$W-BCNT(R5),R2 R2=TRANSFER BYTE COUNT 302 MOVAB CDRP$L-UBARSRCE(R5),RO RO => MAPPING RESOURCE DESCRIPTOR 303 EXTZV #VEC$V-DATAPATH,- GET DATAPATH 304 #VEC$S-DATAPATH,- NUMBER 305 UBMD$B-DATAPATH(RO),R4 306 307 BLBC Rl, 10$ 308 BISS #AX10,R4 IF LBC WORD ALIGNED TRANSFER SET BYTE OFFSET BIT 309 10$: 310 311 BISW MOVAB ASHL #AX400,R4 AX1FF(R2) fR1 J ,R2 #-9,R2,R2 MERGE VALID WITH BYTE OFFSET AND DATAPATH CALCULATE HIGHEST RELATIVE BYTE AND ROUND CALCULATE NUMBER OF MAP REGISTERS TO LOAD 312 · 1 . 2 .3 .4 .5 322 323 324 325 326 327 20$: 328 329 330 30$: POPL CMPB BGEQU EXTZV MOVAL MOVL MOVL BLSS BSBW INSV Rl R2,UBMD$B NUMREG(RO) 40$ #VEC$V MAPREG,#VEC$S-MAPREG,UBMD$W=MAPREG(RO),RO UBA$L MAP(Rl) [RO] ,R1 CDRP$L SVAPTE(R5),RO (RO)+,R3 30$ IOC$PTETOPFN R4,#21,#11 ,R3 Rl => UBA CSR. ENOUGH MAP REGISTERS ASSIGNED? IF GEQU NO ; GET STARTING REGISTER GET ADDRESS OF FIRST MAP REGISTER TO LOAD GET ADDRESS OF PAGE TABLE GET NEXT PAGE TABLE ENTRY IF LSS VALID PAGE TABLE ENTRY GET PFN FROM INVALID PTE INSERT VALID, BYTE OFFSET, AND DATAPATH LOADMREG V03-002 - LOAD MBA AND UBA MAP REGISTERS 3-JUN-1984 11:45:48 VAX-11 Macro V03-01 Page 9 LOAD UNIBUS ADAPTER MAP REGISTERS FOR UD 12-MAR-1982 17:12:47 DISK$VMSMASTER:{SYS.SRC]LOADMREG.M(1) 53 81 53 ED 52 61 53 BE 017A DO 017B F5 017E D4 0181 7D 0183 05 0186 0187 0188 331 332 333 334 335 336 40$: 337 MOVL R3, (Rl )+ SOBGTR R2,20$ CLRL ( R1) MOVQ (SP)+,R3 RSB BUG CHECK UBMAPEXCED,FATAL .END LOAD UBA MAP REGISTER ANY MORE TO LOAD? LOAD INVALID MAP ENTRY RESTORE REGISTERS UNIBUS MAP REGISTER ALLOCATION EXCEEDED LOADMREG Symbol table ADP$L CSR BUG$ INVPTEFMT BUG$-UBMAPEXCED CDRPSL SVAPTE CDRP$L-UBARSRCE CDRP$W-BCNT CDRP$W-BOFF CRB$L INTO G0 LOBAL IOC$LOADMBAMAP IOC$LOADUBAMAP IOC$LOADUBAMAPA IOC$LOADUBAMAPN IOC$LUBAUDAMAP IOC$PTETOPFN MBA$L BCR MBA$L-MAP MBA$L-VAR MMG$GL GPTBASE MMG$GL-SPTBASE PDT$L ADP PTE$M-GPTX PTE$M-TYPO PTE$M=TYP 1. PTE$V TYPO PTE$V-TYP1 UBA$L-MAP UBA$V-MAP DPD UBA.$V-MAP-VALI D UBMD$B DATAPATH UBMD$B-NUMREG UBMD$W-MAPREG UCB$L CRB UCB$L-SVAPTE UCB$W-BCNT UCB$W-BOFF VA$S VPN VA$V-VPN VEC$B DATAPATH VEC$B-NUMREG VEC$L-ADP VEC$S-DATAPATH VEC$S-MAPREG VEC$V-DATAPATH VEC$V-t,_WAE VEC$V-MAPREG VEC$W=MAPREG PSECT name ABS $ABS$ WIONONPAGED - LOAD MBA AND UBA MAP REGISTERS 3-JUN-1984 11 :45:48 VAX-11 Macro V03-01 Page 10 12-MAR-1982 17:12:47 DISK$VMSMASTER:[SYS.SRC]LOADMREG.M(1) 00000000 ******** x ******** x FPFFFFCC 0000003C FFFFFFD2 FFFFFFDO 00000024 OOOOOOCA R 00000000 RG 00000061 RG 0000004A RG OOOOOOE8 RG 00000127 RG 00000004 RG 00000010 = o0o0o0o0o0o8o0c0 ******** x O*O*O**O*O*O*EO* x 003FFFFF 00400000 04000000 00000016 OOOOOOlA 00000800 00000015 0000001F 00000003 00000002 00000000 00000024 00000078 0000007E = 0000007C 00000015 00000009 00000013 00000012 00000014 00000005 OOOOOOOF 00000000 00000005 = 00000000 = 00000010 02 02 02 02 02 02 02 02 02 02 02 +----------------+ ! Psect synopsis ! +----------------+ Allocation PSECT No. Attributes 00000000 00000000 00000188 0.) 00 0.) 01 395.) 02 0.) NOPIC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE 1 . ) NOPIC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE 2. ) NOPIC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE LOADMREG VAX-11 Macro Run Statistics - LOAD MBA AND UBA ~AP REGISTERS 3-JUN-1984 11:45:48 VAX-11 Macro V03-0l Page 11 12-MAR-1982 17:12:47 DISK$VMSMASTER:[SVS.SRC]LOADMREG.M(l) Performance indicators Phase Page faults CPU Time Elapsed Time Initialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals 9 00:00:00.08 00:00:00.77 75 00:00:00.61 00:00:06.93 285 00:00:09.21 00:00:38.62 0 00:00:01 .35 00:00:06.01 67 00:00:01.95 00:00:07.61 5 00:00:00.06 00:00:00.06 2 00:00:00.02 00:00:00.02 0 00:00:00.00 00:00:00.00 446 oo : oo': 13 · 2 s 00:01:00.03 The working set limit was 1050 pages. 48842 bytes (96 pages) of virtual memory were used to buffer the intermediate There were 50 pages of symbol table space al located to hold 892 non-local and 322 source lines were read in Pass 1, producing 14 object records in Pass 2. 20 pages of virtual memory were used to define 19 macros. code. 16 local symbols. Macro library statistics Macro library name Macros defined $255$DUA28:[SVS.OBJ]LIB.MLB;l 1 2 $255$DUA28:[SYSLIB]STARLET.MLB;2 4 TOTALS (all 1 ibraries) 16 991 GETS were required to define 16 macros. There were no errors, warnings or information messages. MACRO/LIS=LIS$:LOADMREG/OBJ=OBJ$:LOADMREG MSRC$:LOADMREG/UPDATE=(ENH$:LOADMREG)+EXECML$/LIB IOCIOPOST IOCLOPOST Table of contents ( 1) ( 2) ( 3) (4) (5) (6) (7) (8) (9) ( 10) ( 11) 43 79 115 315 644.2 734 856 948 1036. 1 1037 1054 - I/O COMPLETION POSTING HISTORY ; DETAILED DECLARATIONS I/O COMPLETION POSTING PAGIO - PAGE I/O COMPLETION VIRTUAL (OR LOGICAL) I/O COMPLETION QUEUE NEXT SEGMENT BUFFERED READ COMPLETION AST ROUTINE DIRECT I/O COMPLETION AST ROUTINE ERASE I/O HELPER ROUTINES MOVE DATA TO USER BUFFER UNLOCK AREAS IN IRPE'S 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 0 IOCIOPOST V03-024 ;ACG0422 -1 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0421 ;ACG0421 ;ACG0421 ;EMD0076 ;EMD0076 ;EMD0076 - IIO COMPLETION POSTING 3-JUN-1984 11 :26:47 VAX-11 Macro V03-01 Page 1 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 oooq 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1 .TITLE IOCIOPOST - I/O COMPLETION POSTING .1 .IDENT 'V03-024' 3 4 5 ;' **************************************************************************** 6 7 ; ** 8 * 9 * 10 11 ; ** COPYRIGHT (c) 1978, 1980, 1982 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. ALL RIGHTS RESERVED. THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * * * * * * 12 13 14 15 16 * * * * * ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER / COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED. * * * * * 17 18 ; ** THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * * 19 * AND SROULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * 20 * CORPORATION. * 21 ; * 22 ;* DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS 23 ;* SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * * * 24 25 26 ;;;******************************************************************************** 27 28 ;++ 29 FACILITY: EXECUTIVE, I/O SYSTEM 30 31 ABSTRACT: 32 IOCIOPOST IMPLEMENTS THE DEVICE INDEPENDENT COMPLETION PROCESSING FOR 33 I/0 PACKETS. IT IS INVOKED BY QUEUEING THE PACKET ON THE I/O POST QUEUE 34 AND TRIGGERING THE IPL$ IOPOST SOFTWARE INTERRUPT. SOME OF THE IOPOST 35 OPERATIONS SUCH AS SETTING EVENT FLAGS, UNLOCKING BUFFER PAGES, 36 RELEASING BUFFERS AND PAGING I/0 COMPLETION ARE PERFORMED IN THE IOPOST 37 INTERRUPT SERVICE ROUTINE, WHILE OTHER OPERATIONS THAT REQUIRE ACCESS 38 TO PROCESS ADDRESS SPACE ARE PERFORMED BY SENDING A SPECIAL KERNEL AST. 39 40 ENVIRONMENT: MODE = KERNEL, RESIDENT 41 42 43 .SBTTL HISTORY ; DETAILED 44 45 AUTHOR: R. HUSTVEDT, CREATION DATE: 26-AUG-76 46 47 MODIFIED BY: 48 . 1 V03-024 ACG0422 Andrew C. Goldstein, 1-May-1984 19:35 .2 Fix use of RO in ACG0421 .3 .4 V03-023 ACG0421 Andrew C. Goldstein, 20-Apr-1984 14:19 .5 Fix segment byte count limiting in erase QIO's .6 .7 V03-022 EM00076 Ellen M. Dusseault 05-Apr-1984 .8 Modify IOPOST to check for a valid status bit for .9 encryption. If valid, deal locate nonpaged pool buffer IOCIOPOST V03-024 ;EMD0076 ;EMD0076 ;SSA0021 ;SSA0021 ;SSA0021 ;WMC0020 ;WMC0020 ;WMC0020 ;WMC0020 ;WMC0019 ;WMC0019 ;WMC0019 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;ROW49597C ;ROW49597C ;ROW49597C ;ROW49597C ;ROW49597C ;ROW49597C ;ROW0218 ;ROW0218 ;ROW0218 ;ROW0218 ;ADE9005 ;ADE9005 ;ADE9005 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3085 ;STJ3085 ;STJ3085 ;STJ3085 ;STJ3085 ;STJ3085 ;ROW49597B ;ROW49597B ;ROW49597B ;ROW49597B ;ROW49597B ;RLRMXBCNTC ;RLRMXBCNTC ;RLRMXBCNTC ;RLRMXBCNTC ;RLRMXBCNTC ;RLRMXBCNTC RLRMXBCNTC RLRMXBCNTA RLRMXBCNTA - I/0 COMPLETION POSTING HISTORY : DETAILED 3-JUN-1984 11:26:47 VAX-11 Macro V03-0l Page 2 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(1) 0000 . 10 0000 . 11 0000 . 12 0000 . 13 0000 . 14 0000 . 15 0000 . 16 0000 . 17 0000 . 18 0000 . 19 0000 .20 0000 . 21 0000 .22 0000 .23 0000 .24 0000 .25 0000 .26 0000 . 27 0000 .28 0000 .29 0000 .30 0000 . 31 0000 .32 0000 .33 0000 .34 0000 .35 0000 .36 0000 .37 0000 .38 0000 .39 0000 .40 0000 .41 0000 .42 0000 .43 0000 .44 0000 .45 0000 .46 0000 .47 0000 .48 0000 .49 booo .50 0000 . 51 0000 .52 0000 .53 0000 .54 0000 .55 0000 .56 0000 .57 0000 .58 0000 .59 0000 .60 0000 .61 0000 .62 0000 .63 0000 .64 0000 .65 0000 .66 which contains the encryption key. V03-021 SSA0021 Stan Amway Decrement device queue length in UCB. 22-Mar-1984 V03-020 WMC0020 Wayne Cardoza 07-Mar-1984 Move POSTEF to fork context to regain optimization which avoids reexecution of WAITFR . V03-019 WMC0019 Wayne Cardoza 28-Dec-1983 Erase QIOs can be physical, logical, or virtual. V03-018 CDS0003 Christian D. Saether 14-Dec-1983 Add IOC$BUFPOST entry point. This is used to perform the iopost level part of i/o posting to be executed as a subroutine cal 1 directly and avoid the iopost software interrupt entirely. The FllBXQP is the initial user of this feature . V03-017 ROW49597C Ralph 0. Weber 21-SEP-1983 Change PAGEIO OR SWAPIO patch (from ROW49597B and ROW49597) to zero bytes transfered count in the IOSB when status~is not successful and bytes transfered is greater than or equal to bytes requested. V03-016 ROW0218 Ralph 0. Weber 7-SEP-1983 Change maximum byte count, UCB$L MAXBCNT, tests to be unsigned. - V03-015 ADE9005 Alan D. Eldridge 30-May-1983 Changed BSBW to JSB for cal ls to IOC$MAPVBLK and IOC$CVTLOGPHY. V03-014 STJ3100 Steven T. Jeffreys, 03-May-1983 -Added local subroutine CHECK ERASE. -Do not update IRP$L SVAPTE for ALL erase I/O's. This is an extention of STJ3085. V03-013 STJ3085 Steven T. Jeffreys, 13-Apr-1983 -Do not update IRP$L SVAPTE for erase I/O segmented requests if using the specail erase PPT. -After segmentation complete, resore original SVAPTE address to IRP$L SVAPTE. V03-012 ROW49597B Ralph 0. Weber 9-APR-1983 Change PAGEIO OR SWAPIO from ROW49597 to zero bytes transfered count-when status is not successful and bytes transfered is greater than or equal to bytes requested. V03-011 RLRMXBCNTc Robert L. Rappaport 28-Mar-1983 Verify IRP$L DIAGBUF is non-zero before assuming that it contains the original value of IRP$L SVAPTE in VIRTUAL LOGIO. V03-010 RLRMXBCNTb Robert L. Rappaport 22-Mar-1983 Check for file oriented device before going to VIRTUAL LOGIO. V03-009 RLRMXBCNTa Robert L. Rappaport 22-Mar-1983 CLRL the byte count ln the I/O status before queueing IOCIOPOST V03-024 ;RLRMXBCNTA ;RLRMXBCNTA ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;ROW49597 ;ROW49597 ;ROW49597 ;ROW49597 ;ROW49597 ;ROW49597 ;ROW49597 ;ROW49597 ;ROW49597 ;ROW49597 ;ROW49597 ;STJ3049 ;STJ.3049 ;STJ3049 ;CDS0002 ;CDS0002 ;CDS0002 ;CDS0002 ;CDS0001 ;CDS0001 ;CDSOOOl ;KDM0002 ;KDM0002 ;KDM0002 ; LJK45299 ;LJK45299 ; LJK45299 -27 - I/0 COMPLETION POSTING HISTORY : DETAILED 3-JUN-1984 11 :26:47 VAX-11 Macro V03-01 Page 3 24-APR-1982 15:46:59 DISK$VMSMASTER: [SYS.SRC]IOCIOPOST.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 .67 .68 .69 .70 . 71 .72 .73 .74 .75 .76 .77 .78 .79 .80 .81 . 82 .83 .84 -.85 .86 .87 .88 .89 .90 .91 .92 .93 .94 .95 .96 .97 .98 . .99 76 77 ;** an !RP back to the ACP in VIRTUAL LOGIO. V03-008 RLRMXBCNT Robert L. Rappaport 11-Mar-1983 Allow for segmentation of Logical I/O (and Virtual) based on the UCB$L_MAXBCNT field. V03-007 ROW49597 Ralph 0. Weber 26-JAN-1983 Change both VIRTUAL and PAGEIO OR SWAPIO to guarantee an error status in IRP$L IOSTl whenever-the bytes transfered is less than the bytes requested. For V3.x, the error wil 1 be SS$ CTRLERR. After that, it wil 1 be SS$ INCSEGTRA. The check and-error status are required to detect and gracefully revcover from the instance where a driver returns success status but bytes transfered is less than bytes requested. The segmented transfer logic goes berserk when this happens and eventually crashes the system. V03-006 STJ3049 Steven T. Jeffreys Add support for the erase qio. 06-Jan-1983 V03-005 CDS0002 C Saether 12-0ct-1982 Fix bug where R5 was not preserved when queuing packet to xqp. V03-004 CDS0001 C Saether Changes to accomodate XQP mechanism. 18-Jul-1982 V03-003 KDM0002 Kathleen D. Morse Added $DEVDEF and $SSDEF. 28-Jun-1982 V03-002 LJK45299 Lawrence J. Kenah 2-Jun-1982 Fix deaccess-pending-on-spooled-device logic. IOCIOPOST V03-024 ;STJ3049 ;KDM0002 ;STJ3049 ;KDM0002 - I/O COMPLETION POSTING DECLARATIONS 3-JUN-1984 11: 26:47 VAX-11 Macro V03-01 Page 4 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(2) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000. 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 00000000 0000 01 0000 03 0001 01 0002 04 0003 79 .SBTTL DECLARATIONS 80 81 INCLUDE FILES: 82 83 $ACBDEF 84 $A QB DEF 85 $CA DEF 86 $CCBDEF 87 $CXBDEF .1 $DC DEF .2 $DEVDEF .3 $IODEF 88 $IPLDEF 89 $IRPDEF 90 $IRPEDEF 91 $JIBDEF 92 $PCBDEF 93 $PFNDEF 94 $PHDDEF 95 $PR DEF 96 $PRIDEF 97 $PTEDEF 98 $RSNDEF .1 $SSDEF 99 $UCBDEF 100 $VADEF 101 $VCBDEF 102 $WCBDEF 103 $WQHDEF 104 105 106 ; OWN STORAGE: 107 ; 108 .PSECT $AEXENONPAGED,LONG 109 PRITBL: 110 .BYTE PRI$ IOCOM 111 .BYTE PRI$-TOCOM 112 .BYTE PRI$-IOCOM 113 .BYTE PRI$=TICOM ; AST CONTROL BLOCK DEFINITIONS ; DEFINE AQB OFFSETS ; CONDITIONAL ASSEMBLY PARAMETERS ; CCB DEFINITIONS ; DEFINE CXB OFFSETS ; DEVICE TYPE CODES ; DEVICE TYPE DEFINITIONS ; I/O REQUEST CODES ; I PL DEFINITIONS ; IRP DEFINITIONS ; IRPE DEFINITIONS ; JIB DEFINITIONS ; PCB DEFINITIONS ; PFN DATA BASE DEFINITIONS ; PROCESS HEADER DEFINITIONS ; PROCESSOR REGISTER DEFINITIONS ; PRIORITY INCREMENT DEFS ; PAGE TABLE ENTRY DEFINITIONS ; DEFINE RESOURCE WAIT NUMBERS ; DEFINE SYSTEM STATUS CODES ; DEFINE UCB OFFSETS ; DEFINE VIRTUAL ADDRESS FIELDS ; DEFINE VCB OFFSETS ; DEFINE WCB OFFSETS ; WAIT QUEUE HEADER DEFINITIONS TABLE OF PRIORITY INCR CLASSES 0 => DIRECT WRITE 1 => BUFFERED WRITE 2 => DIRECT READ 3 => BUFFERED READ IOCIOPOST V03-024 ;RLRMXBCNT ;SSA0021 ;SSA0021 ;SSA0021 ;SSA0021 ;SSA0021 ;SSA0021 -4 EMD0076 EMD007'6 EMD0076 - I/O COMPLETION POSTING I/0 COMPLETION POSTING 3-JUN-1984 11 :26:47 VAX-11 Macro V03-01 Page 5 24-APR-1982 15:46:59 DISK$VMSMASTER:[SVS.SRC]IOCIOPOST.(3) 7E 54 7E 52 7E 50 55 OOOO'DF 16 50 BE 52 BE 54 BE 0386 61 EB 6A AO lB 51 QC AS Fl 51 51 54 OOOO'DF41 50 lC A5 6A AO E3 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 70 0004 70 0007 70 OOOA OF OOOD lC 0012 7D 0014 7D 0017 7D 001A 02 0010 001E 31 001E 0021 16 0021 11 0023 0025 B4 0025 11 002B 002A DO 002A 19 002E 0030 3C 0030 DO 0033 DO 0039 B7 003D 19 0040 115 .SBTTL I/O COMPLETION POSTING 116 ;++ 117 FUNCTIONAL DESCRIPTION: 118 119 IOC$IOPOST IS INITIATED BY TRIGGERING AN IPL$ IOPOST SOFTWARE 120 INTERRUPT AFTER PLACING A COMPLETED I/O PACKET IN THE IOPOST 121 QUEUE. IOC$IOPOST PERFORMS ALL APPROPRIATE COMPLETION ACTIVITY 122 REQUIRED FOR THE PACKET EITHER DIRECTLY OR BY QUEUEING KERNEL 123 ASTS TO CONCLUDE PROCESSING IN THE CONTEXT OF THE PROCESS 124 WHEN REQUIRED. 125 126 CALLING SEQUENCE: 127 128 SOFTINT #IPL$ IOPOST 129 130 INPUT PARAMETERS: 131 132 NONE 133 134 IMPLICIT INPUTS: 135 136 IOC$GL_PSFL - IOPOSTING QUEUE 137 138 OUTPUT PARAMETERS: 139 140 NONE 141 142 143 144 .ENABL LSB 145 IOC$IOPOST:: I/O POSTING INTERRUPT 146 MOVQ R4,-(SP) SAVE 147 MOVQ R2,-(SP) NORMAL 148 MOVQ RO,-(SP) REGISTERS 149 IOPOST: REMQUE @WAIOC$GL PSFL,R5 150 BVC 10$ - GET HEAD Of POST QUEUE QUEUE NOT VET EMPTY 151 MOVQ (SP)+,RO RESTORE 152 MOVQ (SP)+,R2 REGISTERS 153 MOVQ (SP)+,R4 AND EXIT 154 REI IF QUEUE EMPTY 155 .1 5$: BRW VIRTUAL LOGIO PROCESS VIRTUAL (OR LOGICAL) I/O COMPLETIO . 2 .3 7$: JSB ( R1) CALL END ACTION ROUTINE .4 BRB IOPOST .5 .6 8$: CLRW UCB$W_QLEN(RO) Device queue length went negative .7 BRB 11$ Reset queue length and continue 160 161 10$: MOVL IRP$L_PID(R5) ,Rl GET PIO/END ACTION ADDRESS 162 BLSS 7$ BR IF END ACTION ADDRESS 163 (SYSTEM SPACE ADDRESSES ARE NEGATIVE) 164 MOVZWL R1,R1 GET PROCESS INDEX 165 MOVL @WA$CH$GL PCBVEC[R1] ,R4 AND TRANSLATE TO PCB ADDRESS .1 MOVL IRP$L UCB(R5),RO RO => UCB. (Presets UCB for DIO path) .2 DECW UCB$W=QLEN(RO) Decrement device queue length .3 BLSS B$ Length went negative, so go adjust IOCIOPOST V03-024 ;EMD0076 ;EMD0076 ;EMD0076 ;EMD0076 ;EMD0076 ;EMD0076 -3 SSA0021 SSA0021 SSA0021 SSA0021 SSA0021 2 STJ3100 STJ3100 STJ3100 STJ3100 STJ3100 1 - I/O COMPLETION POSTING I/O COMPLETION POSTING 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 6 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(3) 07 2A A5 OF 50 5C A5 FFB2 03 2A A5 00 OOC6 3E A4 53 2C A5 2A A5 44 BF 50 53 42 51 32 A5 52 30 A5 08 1 C ·2A A5 OE 17 38 AO AO 38 A5 46 A5 07 3A A5 44 A5 05 3A A5 44 A5 BO 51 OlFF C142 51 F7 BF 51 OA 06 20 A5 066C OB 50 FF56 OB 03 2A A5 06B3 FF4B' El 0042 DO 0047 30 004B El 004E 31 0053 B6 0056 DO 0059 005D 0050 005P 93 0050 12 0062 0064 0064 0064 0064 0064 05 0064 13 0066 DO 006B 3C 006C EO 0070 0072 El 0075 0077 E9 007A 85 007E 13 0081 Dl 0083 0086 0088 11 0088 OOBA Bl 008A 008D 008F OOBF 12 OOBF 9E 0091 78 0097 009B El 009C 009E 30 OOAl EB OOA4 30 OOA7 El OOAA OOAC 30 OOAF OOB2 0082 OOB2 0082 30 OOB2 0085 0085 0065 .4 11 $: BBC #IRP$V KEY,IRP$W STS(R5),12$ ; set, buffer al loc for encryption .5 MOVL IRP$L KEYDESC(R5T, RO ; rO contains address of alloc buffer .6 BSBW EXE$DEANONPAGED ; deal locate this buffer . 7 12$: BBC #IRP$V BUFIO,IRP$W STS(R5),13$ ; IF CLEAR, DIRECT I/0 .B BRW BUFIO - BUFFERED I/O .9 13$: INCW PCB$W DIOCNT(R4) UPDATE DIRECT I/O COUNT 169 MOVL IRP$L=SVAPTE(R5),R3 GET ADDRESS OF FIRST PTE 170 171 ASSUME I RP$V PAGIO LE 7 172 ASSUME IRP$V-SWAPIO LE 7 173 BITB #<IRP$M PAGIO ! IRP$M SWAPIO>,IRP$W STS(R5) PAGIO OR SWAPIO? 174 BNEQ PAGIO OR SWAPIO - - 175 176 177 DIRECT I/O COMPLETION 178 179 180 DIRIO: TSTL R3 PTE ADDRESS VALID? lBl BEQL 18$ IF EQL NO PAGES TO UNLOCK 1B2 MOVL IRP$L BCNT(R5),R1 GET REQUESTED TRANSFER BYTE COUNT 1B3 MOVZWL IRP$W BOFF(R5),R2 GET BYTE OFFSET IN PAGE .1 BBS #IRP$V PHYSIO,- . 2 IRP$W STS(R5),UNLOCK BRANCH IF PHYSICAL I/O . 3 BBC #OEV$V FOO,- ; If NOT file oriented, go to UNLOCK. .4 UCB$L DEVCHAR(RO),UNLOCK; (RO preloaded in common DIO/BIO path) .5 BLBC IRP$L-IOSTl(R5),5$ BRANCH IF ERROR IN VIRT. OR LOG. REQUEST 186 TSTW IRP$L-OBCNT+2(R5) WAS ORIGINAL COUNT > 64K? 187 BEQL 14$ EQL IMPLIES NO 188 CMPL IRP$L IOST1+2(R5),- LONGWORD COMPARE FOR > 64K OBCNT 1B9 IRP$L-OBCNT ( R5) IF COMPLETED ORIGINAL BYTE COUNT 190 THEN NO SPECIAL VIRTUAL PROCESSING 191 BRB 16$ BRANCH AROUND TO COMMON 'BNEQ' 192 14$: 193 CMPW IRP$L IOST1+2(R5),- *NOTE 'CMPW' DUE TO CODE PATH FOR <64K BCN 194 IRP$L=OBCNT ( R5) IF COMPLETED ORIGINAL BYTE COUNT 195 THEN NO SPECIAL VIRTUAL PROCESSING 196 16$; 197 BNEQ 5$ OTHERWISE DO THE SEGMENTED COMPLETION 198 UNLOCK: MOVAB 511 (Rl) [R2] ,Rl COMBINE OFFSET AND COUNT AND ROUND 199 ASHL #-VA$S BYTE,Rl,Rl CONVERT TO NUMBER OF PAGES .1 · 2 . 3 .4 . 5 17$: 201 18$: 202 203 204 19$: 205 206 207 208 209 210 211 BBC BSBW BLBS BSBW BBC BSBW #I0$V ERASE,IRP$W-FUNC(R5), 17$ CHECK-ERASE RO, 19$ MMG$UNLOCK #IRP$V EXTEND,IRP$W STS(R5),19$ UNLOCK MORE . IF OF CA$_MEASURE IOT BSBW PMS$END_RQ ENDC BRANCH IF DEFINITELY NOT AN ERASE IS THIS AN ERASE FUNCTION? BRANCH IF IT IS AN ERASE UNLOCK PAGES BRANCH IF NO IRPE'S ATTACHED UNLOCK AREAS DESCRIBED IN IRPE'S REFERENCE LABEL INSERT END OF I/O REQUEST MESSAGE IOCIOPOST V03-024 ;CDS0003 ;CDS0003 ;CDS0003 ;WMC0020 ;WMC0020 ;WMC0020 -2 ;ROW49597 ;ROW49597B ;ROW49597B ;ROW495978 ;ROW49597B ;ROW49597B ;ROW49597B ROW49597B ROW49597B ROW49597B ROW49597B ROW49597B ROW49597C ROW49597 ROW49597 ;ROW49597 -18 - I/O COMPLETION POSTING I/O COMPLETION POSTING 3-JUN-1984 11 :26:47 VAX-11 Macro V03-0l Page 7 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(3) 0648'CF 18 A5 009A 034A 51 3A A5 12 38 A5 44 A5 51 3E 32 A5 51 11 2234 BF 38 A5 32 A5 51 05 51 3A A5 40 A5 51 51 17 09 51 48 A5 51 09 38 A5 40 A5 44 A5 32 A5 BE 40 A5 3A A5 53 4C A5 2C A5 53 FEFO' 9E OOB5 OOB9 31 DOBB OOBE OOBE 31 OOBE OOC1 OOC1 OOC1 OOCl OOC1 OOC1 OOC1 OOC1 OOC1 OOCl OOC1 OOC1 OOC1 OOC1 OOCl DO OOCl E9 OOC5 D 1 OOC9 13 OOCD D1 OOCF 13 0003 BO 0005 0009 OODB OODB Dl OODB lF OODF 04 OOEl D4 OOE3 CO OOE6 EF ODEA ODEE OOEF CO OOEF E9 OOF3 C3 OOF7 OOFA OOFC 12 OOFE 0100 0100 0100 0100 DO 0100 0103 DO 0105 DO 0109 0100 OlOD OlOD 30 OlOD .1 MOVAB WADIRPOST,ACB$L KAST(R5) ; SET SPECIAL KERNEL AST ADDRESS . 2 BRW 40$ .3 .4 BRW QNXTSEG: . 5 - BRW QNXTSEG . 6 214 215 PAGE I/O OR SWAP I/O COMPLETION 216 217 218 PAGIO OR SWAPIO: 219 220 221 222 223 224 225 226 227 . 1 MOVL IRP$L IOST1+2(R5), Rl .2 BLBC IRP$L-IOST 1 ( R5) , 21 $ . 3 CMPL Rl, IRP$L OBCNT(R5) .4 BEQL 26$ .5 CMPL Rl, IRP$L BCNT(R5) .6 BEQL 23$ . 7 MOVW #SS$ INCSEGTRA, - GO DO THE NEXT VIRTUAL SEGMENT HERE WE ASSUME DISK I/0 FOR PAGING AND SWAPPING AND WE FURTHER RELY ON THE FACT THAT ALL DISK DRIVERS TRADITIONALLY RETURN ZERO IN THE 2ND LONGWORD OF THE I/O STATUS BLOCK FOR DATA TRANSFER OPERATIONS. THEREFORE THIS IS COMPATIBLE WITH DISK CLASS DRIVER WHICH GROWS THE # OF BYTES TRANSFERRED FIELD IN THE IOSB TO A FULL LONGWORD. Get bytes transfered . Branch if transfer not successful. If completed whole transfer, skip al 1 this segmenting junk. Bytes transfered = bytes requested? Branch if equal. Else, change success status .8 .9 .10 21$: .11 . 12 . 13 . 14 23$: . 15 CMPL BLSSU CLRL CLRL ADDL EXTZV IRP$L IOST 1 ( R5) R1, IRP$L BCNT(R5) 23$ - R 1 IRP$L IOST1+2(R5) R1, IRP$L ABCNT ( R5) #VA$V_VPN-:- - to error status. For the error cases: Bytes transfered < bytes requested? Branch if less than. Else, assume no bytes transfered. Clear bytes transfered in IRP too. Update accumulated byte count. Convert bytes transfered to .16 #<32-VA$V VPN>, Rl, Rl 246 ADDL Rl,IRP$L SEGVBN(R5) 247 BLBC IRP$L IOST1(R5),24$ 248 SUBL3 IRP$L-ABCNT(R5),- 249 IRP$L-OBCNT(R5) ,- 250 IRP$L-BCNT(R5) 251 BNEQ BRW_QNXTSEG 252 253 LAST SEGMENT COMPLETED OR ERROR 254 ; 255 24$: 256 MOVL IRP$L ABCNT(R5),- 257 IRP$L-IOST1+2(R5) 258 MOVL IRP$L-DIAGBUF(R5) ,R3 259 MOVL R3,IRP$L SVAPTE(R5) 260 26$: 261 IF OF CA$_MEASURE_IOT 262 263 BSBW PMS$END RQ pages transfered. NEXT STARTING VBN (OR ERROR VBN) BRANCH IF ERROR CALCULATE REMAINING BYTE COUNT TO BE TRANSFERRED BRANCH IF ANOTHER SEGMENT TO DO SET BYTES TRANSFERRED GET SAVED SVAPTE AND PUT IT BACK INSERT END OF I/O REQUEST MESSAGE IOCIOPOST V03-024 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ; CDS0(}03 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 -1 - I/O COMPLETION POSTING I/O COMPLETION POSTING 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 8 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(3) 76 2A A5 02 18 A5 14 A5 3C 00000158'EF 3A A4 03 2A A5 OC 3E A4 FEDD' 50 0080 C4 0110 0110 0110 EO 0110 0115 0115 0115 0115 0115 DO 0115. 11 011A 011 c 011 c 011 c 011 c 011 c 9F 011 c 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 0122 B6 0122 E1 0125 B6 012A 012D 012D 0120 0120 30 0120 0130 0130 0130 DO 0130 264 265 .ENDC 266 267 BBS #IRP$V PAGIO,IRP$W STS(R5),PAGIO BRANCH IF PAGE 1/0 268 269 270 SWAP I/0 COMPLETION 271 272 273 MOVL IRP$L ASTPRM(R5),ACB$L KAST(R5) ; SET KERNEL AST ADDRESS 274 BRB 40$ - - ; AND ENQUEUE AST 275 276 277 BUFFERED I/O COMPLETION 278 279 . 1 BUFIO: PUSHAB 40$ ; 'INLINE' SUBROUTINE CALL. . 2 .3 .4 THE FOLLOWING PIECE OF CODE MAY BE CALLED AS A SUBROUTINE DIRECTLY .5 TO DO THE PART OF BUFFERED 1/0 COMPLETION THAT NORMALLY EXECUTES . 6 AS A RESULT OF AN IOPOST SOFTWARE INTERRUPT . . 7 . 8 THE F11BXQP, FOR EXAMPLE, EXECUTES VIRTUAL FILE SYSTEM FUNCTIONS .9 IN PROCESS CONTEXT. THERE IS NO NEED FOR THE IOPOST INTERRUPT . 10 AND SPECIAL KERNEL AST TO POST I/O COMPLETION. AFTER RETURNING . 11 FROM THIS SUBROUTINE, THE F11BXQP WILL DO A . 12 . 13 JSB @ACB$L KAST (R5) . 14 . 15 TO COMPLETE POSTING THE I/O COMPLETION . . 16 BOTH THE IOPOST SOFTWARE INTERRUPT AND THE SPECIAL KERNEL COMPLETION . 17 AST ARE AVOIDED . . 18 . 19 THE CALLER SHOULD TEST IRP$L PIO AND POST A NORMAL IOPOST INTERRUPT .20 IF IT IS NEGATIVE, AS THAT CASE IS NOT HANDLED HERE. . 21 .22 THE F11BXQP CODE THAT USES THIS ROUTINE IS IN [F11X.SRC]IODONE.MAR. .23 .24 IPL= IPL$ ASTDEL TO BLOCK PROCESS DELETION (PREVENT LOSS OF IRP). .25 R4 = PCB ADDRESS .26 R5 = IRP ADDRESS .27 .28 .29 IOC$BUFPOST:: .30 INCW PCB$W BIOCNT(R4) ; UPDATE BUFFERED I/0 COUNT 281 BBC #IRP$V FILACP,IRP$W STS(R5),NOTACP ; BR IF NOT ACP I/O 282 INCW PCB$W_DIOCNT(R4) ; RESTORE DIRECT I/O COUNT 283 NOTACP: 284 285 .IF OF CA$_MEASURE IOT 286 287 BSBW PMS$END RQ INSERT END OF I/O REQUEST MESSAGE 288 289 .ENDC 290 291 MOVL PCB$L JIB(R4),RO GET JIB ADDRESS IOCIOPOST V03-024 ;CDS0003 ·; CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 ;CDS0003 -3 ;WMC0020 ;WMC0020 ;WMC0020 ;WMC0020 ;WMC0020 ;WMC0020 ;WMC0020 ;WMC0020 - I/0 COMPLETION POSTING I/O COMPLETION POSiING 3-JUN-1984 11: 26:47 VAX-11 Macro V03-0l Page 9 24-APR-1982 15:46:59 DISK$VMSMASTER: [SVS.SRC]IOCIOPOST.(3) 51 30 A5 20 AO S1 so 2C AS 3C 0135 co 0139 DO 013D OE 13 0141 0566'CF 9E 0143 18 AS 0147 09 2A AS 01 EO 0149 FEAF' 30 014E 0648'CF 9E 0151 18 AS 01S5 05 01S7 0158 0158 02 00 EF 01S8 so 2A AS 0156 03 2A AS 09 EO 015E 50 01 AA 0163 0166 51 OC AS DO 0166 52 FE91 CF40 9A 016A 53 22 A5 9A 0170 0174 FE83' 30 017A OB AS 80 SF 88 017D FE7B' 30 0182 0185 FE92 31 0188 0186 292 293 294 295 296 .1 . 2 .3 30$: .4 35$: . 5 .6 300 40$: 301 302 303 50$: 304 305 .1 . 2 . 3 .4 .5 .6 .7 .8 MOVZWL ADDL MOVL BEQL MOVAB IRP$W BOFF(R5),R1 ; Convert I/O byte count to a R1 ,JIB$L BVTCNT(RO) ; Update Byte Count Quota. IRP$L_SVAPTE(R5),RO ; ANY BUFFER SPECIFIED? 30$ ; IF EQL NO WABUFPOST,ACB$L_KAST(R5) ; ASSUME READ FUNCTION longword. BBS BSBW MOVAB #IRP$V_FUNC,IRP$W~STS(R5),35$ IF SET, READ FUNCTION EXE$DEANONPAGED ; DEALLOCATE WRITE BUFFER WAD!RPOST,ACB$L_KAST(R5) ; SET SPECIAL KERNEL AST ADDRESS RSB EXTZV ; RETURN TO PROCESS CONTEXT IOPOSTING ; PROCESS, OR CONTINUE INLINE IF THIS ; IS NORMAL IOPOST SOFTWARE INTERRUPT. #IRP$V_BUFI0,#2,IRP$W_STS(R5),RO ; GET PACKET TYPE BBS BICW MOVL MOVZBL MOVZBL DSBINT BSBW BISB BSBW ENBINT BRW .DSABL #IRP$V_TERMIO,IRP$W_STS(R5),50$ ; BR IF TERMINAL I/O #1 ,RO ; ELSE TREAT AS NORMAL I/O COMPLETION ; FOR PRIORITY INCREMENT SELECTION IRP$L_PID ( R5), R1 ; PROCESS IDENTIFICATION PRITBL[RO] ,R2 ; SET PRIORITY INCREMENT CLASS IRP$B EFN(R5) ,R3 ; GET EVENT FLAG NUMBER #IPL$-SYNCH ; PREVENT INTERRUPT FROM MP SECONDARY SCH$POSTEF ; AND POST IT #AX80,ACB$B_RMOD(R5) ; SET INTERNAL AST FLAG SCH$QAST ; NOW QUEUE THE KERNEL AST IOPOST LSB ; GET NEXT PACKET TO POST IOCIOPOST V03-024 - I/O COMPLETION POSTING PAGIO - PAGE I/O COMPLETION 3-JUN-1984 11 :26:47 VAX-11 Macro V03-01 Page 10 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(4) 7E 56 56 55 55 6C A4 09 17 57 3A A6 33 2A A6 01 1 F 63 15 00 50 50 OOOOOOOO'EF 11 53 01C3 03 FE43' 018B 018B 018B 018B 018B 018B 018B 018B 018B 0188 0-188 0188 0188 0188 018B 0188 0186 018B 0188 0188 0188 0188 0188 0188 0188 0188 0186 0188 0188 0188 0188 7D 0188 DO 018E 0191 0191 DO 0194 EF 0198 019A 0198 EO 019E 01A3 01A3 01A3 01A3 13 01A3 EF 01A5 01A9 Dl 01AA 01AC 1A 0181 DD 0183 30 0185 01B8 01B8 01B8 14 01B8 30 OlBA 315 SBTTL PAGIO - PAGE I/O COMPLETION 316 317 PAGING I/O COMPLETION 318 319 INPUTS: 320 321 R3 = SYSTEM VIRTUAL ADDRESS OF PAGE TABLE ENTRY 322 323 = R4 = PROCESS CONTROL BLOCK ADDRESS R5 I/0 REQUEST PACKET ADDRESS 324 325 FOR PAGE READ COMPLETION, THE FOLLOWING LOCATIONS IN THE 326 I/O REQUEST PACKET HAVE SPECIAL SIGNIFICANCE. 327 328 IRP$L_ASTPRM ORIGINAL PROCESS PAGE TABLE ENTRY BACKING STORE 329 ADDRESS IF PAGE WAS A COPY ON REFERENCE PAGE. 330 PFN$V GBLBAK SET IF IT WAS GLOBAL CRF 331 0 IF NOT A COPY ON REFERENCE PAGE 332 IRP$L AST MASTER PTE CONTENTS IF GLOBAL CRF (>O) 333 SLAVE PTE ADDRESS IF GLOBAL NOT CRF (<O) 334 0 IF NOT GLOBAL 335 336 FOR PAGE WRITE COMPLETION, THE FOLLOWING LOCATIONS IN 337 THE I/O REQUEST PACKET HAVE SIGNIFICANCE. 338 339 IRP$B RMOD REQUEST MODE ! ACB$V QUOTA. IF ACB$V QUOTA IS SET, 340 PROCESS REQUESTED AN-AST ON PAGE WRITE COMPLETION 341 IRP$L AST AST ADDRESS IF REQUESTED 342 IRP$L -ASTPRM AST PARAMETER IF SPECIFIED 343 IRP$L-IOSB ADDRESS OF I/O STATUS BLOCK IF SPECIFIED. IF 344 NON-ZERO, THEN PROCESS EXPECTS I/O STATUS RETURNED. 345 ; 346 PAGIO: MOVQ R6,-(SP) SAVE SOME MORE REGISTERS 347 MOVL R5,R6 USE R6 FOR !RP ADDRESS 348 349 SETI PL #IPL$ SYNCH ; SYNCHRONIZE ACCESS TO SYSTEM DATA BASE 350 MOVL PCB$L-PHD(R4),R5 ; USE R5 FOR PROCESS HEADER ADR 351 EXTZV #VA$V-VPN,- 352 #<32-VA$V VPN>,- ; FORM PAGE COUNT 353 IRP$L IOST1+2(R6),R7 ; OF THE DATA TRANSFERRED 354 BBS #IRP$V_FUNC,IRP$W_STS(R6),PAGRD_DONE ; BRANCH IF PAGE READ 355 356 = PAGE WRITE COMPLETE - R7 NUMBER OF PAGES 357 CONDITION CODES SET FROM LOAD OF R7 358 359 BEQL 60$ ; BRANCH IF NO PAGES SUCCESSFULLY TRANSFERRE 360 EXTZV #PTE$V_PFN,#PTE$S PFN,(R3),RO ;GET PFN FROM PTE 361 CMPL RO,MMG$GL_MAXPFN ;IS THIS PAGE IN SHARED MEMORY? 362 BGTRU 60$ 363 20$: PUSHL R3 364 BSBW PFN IO DONE 365 366 CONDITION CODES SET FROM DECREF 367 368 BGTR 40$ 369 BSBW MMG$RELPFN ;BR IF PAGE IN SH MEM, NO PFN DATABASE SAVE SVAPTE ; SET PFN DATA BASE BRANCH IF REFCNT NOT 0 RELEASE THE PAGE IOCIOPOST V03-024 - I/O COMPLETION POSTING PAGIO - PAGE I/O COMPLETION 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 11 24-APR-1982 15:46:59 DISK$VMSMASTER: [SYS.SRC]IOCIOPOST.(4) 53 BE 04 C1 OlBD EF 57 F5 01Cl OOC4 SF A3 01C4 57 OS A6 01CS 01CB OlCB 04 3S A6 E9 OlCB 01CF 01CF 01CF OlCF 6S 13 01CF 60 11 010·1 0103 0150 31 0103 0106 0106 0106 0106 0106 3C 13 0106 OlAO 30 0108 0108 OlDB OlDB 11 14 OlDB 0100 0100 0100 04 A3 OF 0100 FElD' 30 01EO OS BA 01E3 10 A6 04 Cl 01E5 51 01E9 25 1S 01EA 1F 11 OlEC OOOO'Df40 07 SB 01EE 00 50 1F E2 01F4 83 50 ca 01FS 01FB 51 10 A6 DO 01FB 10 18 01FF 0201 0201 0201 S67FFFFF SF CB 0201 52 61 0207 s 1 52 50 C9 0209 10 A6 51 DO 0200 C4 57 F5 0211 7F 3S A6 E9 0214 021S 021S 0218 0218 021S 51 14 A6 DO 021S 370 40$: 371 372 60$: ADDL3 #4,(SP)+,R3 ; GET NEXT PTE ADDRESS SOBGTR R7,20$ ; DO THE NEXT PAGE IF ANV SUBW3 #IRP$C LENGTH,IRP$W_SIZE(R6),R7 ; IF EXTENDED I/0 PACKET 373 ; THEN COMPLETION IS DONE BV 374 ; SPECIAL UPDATE SECTION KERNEL AST 375 BLBC IRP$L IOST1(R6),PAGWRT ERR ; BRANCH IF PAGE WRITE ERROR 376 377 CONDITION CODES SET FROM LOAD OF R7 378 379 PAGWRT ERR DONE: 3SO BEQL PAGIO DONEl BRANCH IF NOT, COMPLETE THE I/O HERE 381 BRB PAGIO-DONE2 COMPLETE I/O IN PROCESS CONTEXT 382 PAGWRT ERR: - 3S3 BRW PAGWRT ERRl 3S4 ; 385 ; PAGE READ COMPLETE - R7 = NUMBER OF PAGES 386 CONDITION CODES SET FROM LOAD OF R7 387 388 PAGRD DONE: 3S9 - BEQL 100$ BRANCH IF NO PAGES SUCCESSFULLY TRANSFERRE 390 20$: BSBW PFN IO DONE RECORD PAGE READ DONE 391 392 CONDITION CODES SET FROM DECREF 393 394 BGTR 30$ BRANCH IF REFCNT NOT ZERO 395 396 NO MORE REFERENCES FOR THIS PAGE, DON'T MAKE IT VALID, RELEASE IT 397 398 PUSHAL 4(R3) SAVE PTE ADR FOR NEXT PTE 399 BSBW MMG$RELPFN RELEASE THE PFN 400 POPR #AM<R3> RECOVER PTE FOR NEXT PAGE IN CLUSTER 401 ADDL3 #4,IRP$L_AST(R6),Rl GLOBAL PAGE? 402 403 404 30$: BGEQ BRB BISB SO$ BRANCH IF IT ISN'T 60$ VES, SET CONTEXT FOR NEXT PAGE IN CLUSTER #PFN$C ACTIVE,@WAPfN$AB STATE[RO] ; PAGE IS NOW ACTIVE 405 BBSS #PTE$V-VALID,R0,40$ TURN VALID ON WITH PFN 406 40$: BISL RO,(R3)+ SET VALID IN PTE 407 NEXT PTE ADDRESS IN R3 408 MOVL IRP$L AST(R6) ,Rl 409 BGEQ 80$ - 410 GLOBAL PAGE? BRANCH IF NOT 411 PAGE IS A GLOBAL PAGE, Rl = PROCESS PTE, MUST MAKE IT VALID TOO 412 413 BICL3 #AC<PTE$M_PROT ! PTE$M_OWN>,(Rl),R2 ; PROTECTION AND OWNER FIELDS 414 BISL3 RO,R2,(Rl)+ ; MAKE PROCESS PTE VALID 415 60$: MOVL R1,IRP$L AST(R6) ; SET UP FOR NEXT PAGE IN CLUSTER 416 80$: SOBGTR R7,20$ - ; DO THE NEXT PAGE IF ANV . 417 100$: 418 BLBC IRP$L IOST1(R6),PAGRD ERR ; BRANCH IF PAGE READ ERROR 419 ; LAST PAGE IN CLUSTER HAS BEEN PROCESSED, COMPLETE THE PROCESSING . 420 ; ASSOCIATED WITH THE TRANSFER AS A WHOLE. 421 422 PAGIO DONE: 423 - MOVL IRP$L ASTPRM(R6),Rl ; COPY ON REFERENCE SECTION? IOCIOPOST V03-024 - I/0 COMPLETION POSTING PAGIO - PAGE I/O COMPLETION 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 12 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(4) lB OB 51 17 OOOOOOOO'FF 55 51 10 A6 51 51 09 17 50 3A A6 FDC7' 52 00 30 A6 15 54 0008'CF OB 54 OOOO'CF EF 10 57 16 7E 38 A6 50 56 56 BE FD92' 50 01 FD8C' 13 021C El 021E DE 0222 0228 DO 0229 32 022D EF 0230 0232 0233 30 0236 0239 0239 0239 0239 0239 0239 0239 0239 0239 0239 0239 0239 0239 0239 0239 9A 0239 023C 0240 0240 0240 0240 0240 0240 0240 0240 B5 0240 13 0243 DD 0245 B5 0247 15 024B DO 024D 0252 11 0256 BA 0258 025A D5 025D 12 025F E9 0261 DO 0265 7D 0268 0268 0268 026B 026B 30 026B 3C 026E 30 0271 424 8EQL 20$ BRANCH IF NOT 425 BBC #PFN$V GBLBAK,Rl,10$ BRANCH IF NOT GBL CRF 426 MOVAL @MMG$GL SYSPHD,R5 SYSTEM HDR FOR GBL CRF PAGE 427 MOVL IRP$L AST(R6),R1 CONTENTS OF GBL PTE FOR GBL CRF 428 10$: CVTWL Rl ,R1- SECT! ON INDEX 429 EXTZV #VA$V VPN,- 430 #<32-VA$V VPN>,- PAGE COUNT FROM 431 IRP$L IOST1+2(R6),RO BYTE COUNT TRANSFERRED 432 BSBW MMG$SUBSECREF SUBTRACT RO FROM SECTION REFERENC COUNT 433 434 REPORT THAT PAGE I/O HAS COMPLETED. 435 436 NORMALLY IT IS ONLY NECESSARY TO REPORT "PAGE FAULT COMPLETE" 437 TO THE PROCESS THAT INITIATED THE I/O, BUT FOR SYSTEM PAGES 438 AND FOR GLOBAL PAGES, MULTIPLE FAULTS CAN OCCUR FOR THE SAME 439 PAGE WHILE IT IS ON ITS WAY INTO MEMORY. ALL PROCESSES WHICH 440 FAULT THE PAGE WHILE ITS STATE IS "READ IN PROGRESS" GET QUEUED 441 ON IHE COLLISION PAGE QUEUE, AND THE COLLISION BIT IS SET IN THE 442 TYPE BYTE OF THE PFN DATA BASE. THIS ROUTINE ALSO REPORTS THE 443 COLLISION PAGE AVAILABLE EVENT TO ALL PROCESSES ON THE COLLISION 444 QUEUE, IF THE COLLISION BIT IS SET. 445 446 20$: 447 PAGIO DONE1: 448 - MOVZBL #PRI$ NULL,R2 ; SET FOR NULL PRIORITY INCREMENT 449 RPTEVT PF COM- ; REPORT PAGE FAULT COMPLETE 450 451 IRP$W BOFF WAS INCREMENTED IF ANY OF THE PAGES HAD THE COLLISION BIT SET 452 453 R7 = NON ZERO IF SUPPOSED TO ISSUE KERNEL AST 454 USED ONLY FOR PAGE WRITE COMPLETION 455 BUT MUST BE ZERO FOR PAGE READ COMPLETION 456 457 PAGIO DONE2: 458 TSTW IRP$W BOFF(R6) ; ANY PAGES WITH COLLISION BIT SET? 459 BEQL 60$ - ; BRANCH If NOT 460 461 40$; PUSHL R4 ; SAVE PCB ADDRESS TSTW WASCH$GQ COLPGWQ+WQH$W WQCNT ; ANYONE WAITING? 462 BLEQ 50$ - - ; BRANCH IF NOT . 463 MOVL WASCH$GQ COLPGWQ,R4 ; GET NEXT PCB 464 RPTEVT COLPGA - ; REPORT "COLLISION PAGE AVAILABLE" 465 BRB 40$ ; REPEAT UNTIL QUEUE IS EMPTY 466 50$: POPR #AM<R4> ; RESTORE SAVED PCB ADDRESS 467 60$: SETI PL #IPL$ IOPOST ; LOWER TO I/O POST LEVEL 468 TSTL R7 469 BNEQ PAGIO KAST ; EXHAUSTED PAGE COUNT NON-ZERO? ; BRANCH IF YES, COMPLETE 1/0 IN PROCESS 470 BLBC IRP$L-IOST1(R6),PAGIO ERR ; BRANCH IF MORE ERROR PROCESSING TO DO 471 MOVL R6,RO- - ; GET PACKET ADDRESS FOR RELEASE 472 MOVQ (SP)+,R6 : RESTORE SAVED REGISTERS 473 = 474 RO 1/0 REQUEST PACKET ADDRESS 475 ; 476 PAG!O ERR DONE: 477 - BSBW EXE$DEANONPAGED AND RELEASE IT 478 MOVZWL #RSN$ ASTWAIT,RO 479 BSBW SCH$RAVAIL SET AST WAIT RESOURCE WAIT NUMBER SET RESOURCE AVAILABLE IOCIOPOST V03-024 WMC0020 WMC0020 WMC0020 1 - I/O COMPLETION POSTING PAGIO - PAGE I/O COMPLETION 3-JUN-1984 11 :26:47 VAX-11 Macro V03-01 Page 13 24-APR-1982 15:46:59 DISK$VMSMASTER: [SYS.SRC]IOCIOPOST.(4) FD96 31 0274 0277 0277 0277 0277 55 56 DO 0277 56 BE 7D 027A 51 DC A5 DO 0270 OOOOOOOO'EF 9E 0281 18 A5 0287 52 01 9A 0289 OB A5 BO BF 88 028C FD6C' 30 0291 FD76 31 0294 0297 0297 0297 0297 0297 0297 0297 0297 0297 0297 0297 0297 OOEl 30 0297 14 90 029A OOOO'DF40 029C 51 14 A6 DO 02AO lB 13 02A4 OE 51 17 El 02A6 09 EF 02AA 17 02AC 52 3A A6 02AD 51 52 co 0280 51 01 Cl 0283 14 A6 0286 OOOO'DF40 51 DO 0288 10 A6 D5 028E 04 18 02C1 10 AG 04 co 02C3 OOOO'DF40 85 02C7 12 14 02CC OOOO'DF40 85 02CE OB 13 0203 52 02 9A 0205 FD25' 30 0208 03 11 02DB FD20' 30 02DD FF35 31 02EO 02E3 02E3 02E3 02E3 02E3 02E3 480 BRW IO POST ; CONTINUE TO PROCESS POST QUEUE 481 482 COMPLETE THE PAGE WRITE IN THE PROCESS CONTEXT 483 484 P' AGIO KAST: 485 - MOVL R6,R5 ; I/O PACKET ADDRESS BACK TO NORMAL REG 486 MOVQ (SP)+,R6 ; RESTORE SAVED REGISTERS 487 MOVL IRP$L PID(R5),R1 ; PROCESS ID FOR ISSUING KERNEL AST 488 MOVA8 MMG$UPDSECAST,ACB$L_KAST(R5) ; ADDRESS TO START KERNEL AST 489 MOVZ8L #PR I$ IO COM, R2 PRIORITY INCREMENT · 1 BISB #AX80:ACB$B RMOD(R5) SET INTERNAL AST FLAG · 2 8S8W SCH$QAST - NOW QUEUE THE XERNEL AST .3 8RW IO POST GET NEXT PACKET TO POST 491 492 PAGE READ ERROR - CLEAN UP LOGIC 493 494 R3 = PTE ADDRESS OF BAD PAGE 495 R4 = PCB ADDRESS 496 R5 = PROCESS HEADER ADDRESS 497 498 = R6 = I/0 REQUEST PACKET ADDRESS R7 0 AND MUST BE PRESERVED 499 . 500 501 IRP$L AST(R6) = PROCESS PTE ADR OF BAD PAGE IF GLOBAL PAGE = IRP$L=ASTPRM(R6) GPTX FOR START OF TRANSFER IF GLOBAL CRF 502 PAGRD ERR: 503 BSBW PFN IO DONE ; COMPLETE THE I/O FOR ERR PAGE 504 MOVB #<PFN$M DELCON ! PFN$C RDERR>,- ; SET PAGE TO 505 @WAPFN$AB STATE[RO) READ ERROR STATE 506 MOVL IRP$L ASTPRM(R6),R1 GET BACKING STORE ADR IF CRF 507 BEQL 120$ - BRANCH IF NOT COPY ON REFERENCE 508 BBC #PFN$V GBLBAK,Rl,100$ BRANCH IF NOT GLOBAL CRF 509 EXTZV #VA$V VPN,- 510 #<32-VA$V VPN>,- ADJUST GPTX BY 511 IRP$L IOST1+2(R6),R2 TRANSFERRED PAGE COUNT 512 ADDL R2,R1- TO GET CORRECT GPTX FOR BAD PAGE 513 ADDL3 #1,R1, IRP$L_ASTPRM(R6) SET GPTX FOR START OF NEXT TRANSFER 514 100$: MOVL R1,@WAPFN$AL BAK[RO] FIX BACKING STORE ADDRESS 515 120$: TSTL IRP$L AST(R6) IF GLOBAL PAGE (NOT CRF) 516 8GEQ 140$ - 517 ADDL #4,IRP$L AST(R6) THEN SKIP OVER PROCESS PTE ADR 518 140$: TSTW @WAPFN$AW REFCNT[RO) IS THIS THE LAST REFERENCE? 519 BGTR 160$ - BRANCH IF NOT 520 TSTW @WAPFN$AW SWPVBN[RO] IF THIS PROCESS HAS BEEN SWAPPED OUT 521 8EQL 150$ - 522 MOVZBL #PFN$C BADPAGLST,R2 THEN PUT THIS PAGE IN LIMBO 523 BSBW MMG$INSPFNT ON THE BAD PAGE LIST 524 BRB 160$ 525 150$: BSBW MMG$RELPFN OTHERWISE RELEASE THE PAGE 526 160$: 8RW PAGIO_DONE COMPLETE THIS PORTION OF THE PAGE READ 527 528 DO THE REMAINING SEGMENT OF THE I/O FOR A PAGE READ OR WRITE ERROR 529 SKIP OVER THE PORTION THAT WAS TRANSFERRED SUCCESSFULLY AND SKIP OVER 530 THE PAGE IN ERROR WHICH WAS DEALT WITH BV EITHER PAGRD ERR OR 531 PAGWRT ERR AND SET UP TO TRANSFER THE REMAINING PAGES IF ANY. 532 NOTE THAT FOR PAGE WRITE ERRORS THE REST OF THE TRANSFER IS NOT DONE IOCIOPOST V03-024 - I/0 COMPLETION POSTING PAGIO - PAGE I/0 COMPLETION 3-JUN-1984 11:26:47 VAX-11 Macro VQ3-01 Page 14 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(4) 55 56 DO 56 SE 7D 09 EF 17 51 3A A5 51 D6 50 51 09 9C 44 A5 50 C2 25 13 40 A5 D4 30 A5 B4 44 A5 DO 32 A5 48 A5 D6 53 4C A5 DO 4C A5 6341 DE 53 DD 53 55 DO FCE6' 30 53 8EDO OOEB 31 50 55 DO FF45 31 57 DD 09 EF 17 50 3A A6 09 EF 17 57 44 A6 57 50 C2 6E 05 03 12 57 01 DO 7E D4 63 15 00 EF 02E3 02E3 02E3 02E3 02E6 02E9 02-EB 02EC 02EF 02F1 02F5 02F9 02FB 02FE 02FE 0301 0304 0306 0309 030D 0312 0312 0312 0314 0317 031A 031D 031D 031D 0320 0323 0326 0326 0326 0326 0326 0326 0326 0326 0326 0326 0326 0326 0326 0328 032A 0328 032E 0~30 0331 0334 0337 0339 0338 033E 033E 0340 533 ; IF I/0 COMPLETION STATUS IS RETURNED TO THE PROCESS. 534 535 PAGIO ERR: 536 - MOVL R6,R5 IRP ADDRESS 537 MOVQ {SP)+,R6 RESTORE ADDITIONAL SAVED REGISTERS 538 EXTZV #VA$V VPN,- 539 #<32-VA$V VPN>,- GET PAGE COUNT TRANSFERRED 540 IRP$L IOST1+2(R5),R1 541 INCL Rl - COUNT THE ERROR PAGE AS DONE 542 ROTL #9,Rl ,RO BYTE COUNT COMPLETED 543 SUBL RO,IRP$L OBCNT(R5) BYTE COUNT REMAINING 544 BEQL 40$ - BRANCH IF NOTHING LEFT TO DO 545 CLRL IRP$L ABCNT(R5) ZERO ACCUMULATED BYTE COUNT 546 547 CLRW IRP$W BOFF(R5) ZERO BOFF AND 548 MOVL IRP$L-OBCNT(R5) 549 IRP$L-BCNT(R5) ; SET NEW BYTE COUNT 550 INCL IRP$L-SEGVBN(R5) ; SEGMENT VBN WAS POINTING AT ERROR VBN 551 MOVL IRP$L-DIAGBUF(R5) ,R3 ; STARTING SVAPTE OF ENTIRE TRANSFER 552 MO VAL (R3) [Rl], IRP$L DIAGBUF(R5) ; STARTING 'PTE ADDRESS OF THIS SEGMENT 553 554 . IF DF,CA$ MEASURE IOT 555 PUSHL R3 - - REMEMBER SVAPTE 556 MOVL R5,R3 SET ADR OF IRP 557 BSBW PMS$START RQ 558 POPL R3 - INSERT START OF I/O REQUEST MESSAGE RESTORE SVAPTE 559 .ENDC 560 561 BRW QNXTSEG QUEUE THIS SEGMENT AND RETURN TO IOPOST 562 40$: MOVL R5,RO I/O PACKET ADDRESS 563 BRW PAGIO ERR_DONE 564 565 PAGE WRITE ERROR - CLEAN UP LOGIC 566 567 R3 PTE ADDRESS FOR ERROR PAGE 568 R4 PCB ADDRESS 569 R5 PROCESS HEADER ADDRESS 570 R6 I/O REQUEST PACKET ADDRESS 571 ; 572 ' R7 0 IF ALL COMPLETION LOGIC IS DONE IN IOPOST NON-ZERO IF COMPLETION (AND ERROR REPORT) ARE TO BE . 573 574 RETURNED TO THE PROCESS. 575 PAGWRT ERR 1 : 576 PUSHL R7 SAVE KERNEL AST FLAG 577 EXTZV #VA$V VPN,- 578 #<32-VA$V VPN>,- PAGE COUNT TRANSFERRED 579 IRP$L IOST1+2(R6),RO 580 EXTZV #VA$V-VPN,- 581 #<32~VA$V VPN>,- ORIGINAL PAGE COUNT 582 IRP$L OBCNT(R6),R7 583 SUBL RO,R7- COUNT OF REMAINING PAGES 584 TSTL (SP) IF NOT REPORTING ERROR TO PROCESS 585 _BNEQ 20$ 586 MOVL #1 ,R7 ONLY CLEAN UP THE ERROR PAGE HERE 587 REST OF TRANSFER WILL BE DONE BY PAGIO ERR 588 20$: CLRL -(SP) ; !NIT "ERROR PAGE" FLAG - 589 EXTZV #PTE$V_PFN,#PTE$S_PFN,(R3),RO ;GET PFN FROM PTE IOCIOPOST V03-024 - I/O COMPLETION POSTING PAGIO - PAGE I/O COMPLETION 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 15 24-APR-1982 15:46:59 DISK$VMSMASTER,[SYS.SRC]IOCIOPOST.(4) 50 50 OOOOOOOO'EF 25 53 0028 OOOO'DF40 07 10 08 04 AE 00 52 02 FC99' 03 FC94' 53 BE 04 DB 57 03 57 51 FE54 63 15 00 50 EB BF 51 OOOO'DF40 09 51 04 OOOO'DF40 10 30 A6 04 51 07 51 42 A5 FC5F' 0344 D1 0345 0347 lA 034C DD 034E 30 0350 E2 0353 00 0359 035A 035A 035A 035A 14 035A E2 035C 0361 0361 0361 DO 0361 30 0364 11 0367 30 0369 C1 036C F5 0370 BA 0373 0375 DO 0375 31 0378 0378 037B 037B 037B 0378 037B 0378 037B 0378 037B 0378 037B 037B 0378 0378 0378 0378 0378 EF 0378 037F BB 03BO 0383 E5 03BB SA 038C B6 0392 91 0395 12 0398 3C 039A 30 039E 03A1 590 CMPL RO,MMG$GL_MAXPFN ;IS THIS PAGE IN SHARED MEMORY? 591 592 70$: 593 594 BGTRU PUSHL BS8W BBSS 130$ ;BR IF PAGE IN SH MEM, NO PFN DATABASE R3 ; SAVE SVAPTE PFN IO DONE ; COMPLETE I/0 FOR THIS PAGE #PFN$V=MODIFY,@WAPFN$AB STATE[R0],80$ ; FORCE MODIFY BIT 595 80$: 596 597 CONDITION CODES STILL SET FROM DECREF AT END OF PFN IO DONE 598 599 BGTR 120$ ; BRANCH IF NOT THE LAST REFERENCE 600 B8SS #0,4(SP), 100$ ; BRANCH IF NOT ERROR PAGE 601 602 THIS IS THE PAGE THAT HAD THE WRITE ERROR 603 604 MOVL #PFN$C BADPAGLST,R2 PUT IT ON THE BAD PAGE LIST 605 BSBW MMG$INSPFNT WITH "MODIFY" SET AND "BAD" CLEAR 606 BRB 120$ 607 100$: BSBW MMG$RELPFN NO MORE REFERENCES, RELEASE THE PAGE 608 120$: ADDL3 #4,(SP)+,R3 NEXT PTE ADDRESS 609 SOBGTR R7,70$ 610 130$: 611 POPR #AM<RO,Rl> CLEAN OFF BAD PAGE FLAG Rl = SAVED KERNEL AST INDICATOR 612 MOVL R1, R7 PUT IT IN R7, SET CONDITION CODES 613 BRW PAGWRT ERR DONE 614 615 PFN IO DONE 616 617 INPUTS: 618 619 = R3 SVAPTE 620 621 622 R4 = PROCESS CONTROL BLOCK ADDRESS OF PROCESS THAT REQUESTED THE I/O = R5 PROCESS HEADER OF THE PROCESS THAT REQUESTED THIS I/O = R6 I/0 REQUEST PACKET ADDRESS 623 624 OUTPUTS: 625 626 RO = PFN 627 R3 PRESERVED 628 IRP$W BOFF(R6) INCREMENTED IF THIS WAS A COLLISION PAGE 629 CONDITION CODES SET FROM DECW @WAPfN$AW_REFCNT[RO] 630 631 PFN IO DONE: 632 - EXTZV #PTE$V PFN,#PTE$S PFN,(R3),RO ; GET PAGE FRAME NUMBER 633 634 635 636 637 638 20$: 639 640 641 642 40$: BICB3 BBCC BICB INCW CMPB BNEQ MOVZWL 8SBW DECREF #AC<PFN$M COLLISION ! PFN$M PAGTYP>,- ; FETCH THESE @WAPFN$AB-TYPE[RO] ,Rl ; BITS FROM PFN TYPE BYTE #PFN$V COLLISION,Rl ,20$ ; CLEAR COLLISION BIT, BRANCH IF WAS CLEAR #PFN$M-COLLISION,@WAPfN$AB TVPE[ROJ ; CLEAR IT IN PFN DATA IRP$W BOFF(R6) ; MUST EMPTY THE COLLISION QUEUE Rl,#PFN$C PPGTBL 40$ - ; IF PROCESS PAGE TABLE PAGE PHD$W PHVINDEX(R5),Rl MMG$DECPHDREF1 MUST COUNT ONE LESS PROCESS HEADER REFERENCE ONE LESS REFERENCE FOR THE PAGE IOCIOPOST V03-024 - I/O COMPLETION POSTING PAGIO - PAGE I/O COMPLETION 05 03AB 643 RSB 03AC 644 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 16 24-APR-1982 15:46:59 DISK$VMSMASTER:[SVS.SRC)IOCIOPOST.(4) ; RETURN WITH CONDITION CODES SET ; TO NEW STATE OF THE REFCNT IOCIOPOST V03-024 RLRMXBCNT RLRMXBCNT RLRMXBCNT 6 ;ROW49597 ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRM~BCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT ;RLRMXBCNT -20 - I/O COMPLETION POSTING VIRTUAL (OR LOGICAL) I/0 COMPLETION 3-JUN-1984 11;26:47 VAX-11 Macro V03-01 Page 17 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(5) 46 A5 OF 50 3A A5 40 A5 50 3A A5 40 A5 OD 50 3A A5 40 A5 50 3A A5 40 A5 50 51 50 13 50 1C A5 05 OA 38 AO 06 38 A5 2234 BF 38 A5 BE F7 8F 50 48 A5 50 4C 38 A5 50 1c A5 2E 38 AO 05 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC. 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 03AC 85 03AC 13 03AF 03Bl DO 03B1 co 03B5 DO 03B9 03BE 11 03BE 03CO 3C 03CO CO 03C4 BO 03C8 03CD 03CD 03CD DD 03CD D1 03CF 13 03D2 DO 03D4 EO 03D8 03DA E9 0300 BO 03E1 03E5 03E7 78 03E7 03EB CO 03EC E9 03FO DO 03F4 EO 03F8 . 2 .SBTTL VIRTUAL (OR LOGICAL) I/O COMPLETION .3 .4 VIRTUAL (OR LOGICAL) I/O COMPLETION 651 652 CALLING SEQUENCE: 653 654 BRW VIRTUAL 655 656 INPUTS: 657 658 = Rl REQUESTED BYTE COUNT, POSSIBLY DIFFERENT FROM TRANSFERRED 659 BYTE COUNT FOR MAGTAPE 660 R2 = IRP$W BOFF CONTENTS 661 R3 = SVAPTE OF START OF TRANSFER · 1 R4 = PCB ADDRESS ASSOCIATED WITH THE PID IN THE PACKET . 2 R5 = !RP ADDRESS 662 663 OUTPUTS: 664 665 BRANCHES TO UNLOCK, PRESERVING Rl ,R2,R3 666 OR BRANCHES TO IOPOST 667 668 669 .ENABL LSB 670 . 1 VIRTUAL LOGIO: VIRTUAL (OR LOGICAL) I/0 FUNCTION .2 -TSTW IRP$L OBCNT+2(R5) .3 BEQL 1$ - SEE IF BYTE COUNT > 64K EQL IMPLIES NO, BRANCH TO OLD CODE .4 .5 MOVL IRP$L IOST1+2(R5), RO Else pickup new, 1anger count. .6 ADDL RO, IRP$L ABCNT(R5) Accumulate total bytes transfered. .7 MOVL IRP$L ABCNT(R5), - Set accumulated bytes transfered. .8 IRP$L-IOST1+2(R5) .9 BRB 3$ - Rejoin common code. . 10 . 11 1$: MOVZWL IRP$L I0ST1+2(R5), RO Get old bytes transfered count. . 12 ADDL RO, IRP$L ABCNT(R5) Accumulate total bytes transfered. . 13 MOVW IRP$L ABCNT(R5), - Set accumulated bytes transfered. . 14 IRP$L-IOST1+2(R5) (Note movw due to code path that . 15 insures< 64K byt~ transfer.) . 16 . 17 3$: PUSHL RO Save # bytes ,transferred. . 18 CMPL RO, R 1 . 19 BEQL 9$ .20 MOVL IRP$L UCB(R5),RO Do bytes xfered and requested match? Branch if they match. RO => UCB. . 21 BBS SA#DEV$V SQD,- .22 UCB$L DEVCHAR(R0),9$ If SET, sequential device .23 BLBC IRP$L-IOST1(R5), 9$ If xfer count wrong, guarantee .24 MOVW #SS$ INCSEGTRA, - that final status is an error .25 .26 9$: ASHL IRP$L IOST 1 ( R5) #-VA$S BVTE,(SP)+, RO (either the driver's or ours). Calculate number of blocks transfered. .27 ADDL RO, IRP$L SEGVBN(R5) ; Calculate next disk segment address. 691 BLBC IRP$L IOST1(R5),20$ ; IF LBC I/O ERROR 692 MOVL IRP$L-UCB(R5),RO ; GET ADDRESS OF DEVICE UCB 693 BBS SA#DEV$V SQD,UCB$L_DEVCHAR(R0),10$ ; IF SET, SEQUENTIAL DEVICE IOCIOPOST V03-024 ;STJ3100 ; ST J3100 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3100 ;STJ3100 -4 ;STJ3085 ;STJ3085 ;STJ3085 ;STJ3085 ;STJ3085 ;STJ3085 ;STJ3085 ;STJ3085 ;STJ3085 -4 ;RLRMXBCNTA ;RLRMXBCNTA ;RLRMXBCNTA ;RLRMXBCNTA ;RLRMXBCNTA ;RLRMXBCNTA ;RLRMXBCNTA ;RLRMXBCNTA ;RLRMXBCNTA ;RLRMXBCNTA ;ACG0421 ; ACG0421 - I/0 COMPLETION POSTING VIRTUAL (OR LOGICAL) I/O COMPLETION 3-JUN-1984 11 :26:47 VAX-11 Macro V03-01 Page 18 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(5) 40 A5 44 A5 32 A5 25 51 F7 BF 51 OOOO'CF QA 06 20 A5 02F9 05 so 2C A5 6341 53 55 55 1C A3 47 FBE2 51 44 A5 53 4C A5 04 53 2C A5 2C AS 53 FC51 04 E6 2A A5 46 A5 05 3A A5 03 3A AS 53 55 3E A4 2A A3 10 C3 03FD 0400 0402 13 0404 78 0406 040A 040B 040B 040B 040B 040B 040B D6 040B E1 040F 0411 30 0414 EB 0417 DE 041A DO 041F DO 0422 10 0426 31 0428 042B 042B 0428 0428 DO 042B DO 042F 12 0433 DO 0435 DO 0439 31 043D 0440 0440 0440 0440 0440 0440 0440 0440 0440 0440 0440 0440 0440 El 0440 0442 85 0445 13 0448 D4 044A 11 044D 044F B4 044F 0452 DO 0452 B7 0455 AA 0458 694 SUBL3 IRP$L ABCNT(R5),- 695 IRP$L-OBCNT(R5),- CALCULATE BYTES REMAINING 696 IRP$L-BCNT(R5) 697 BEQL 10$ IF EQL NONE 698 ASHL #-VA$S BYTE,R1 ,R1 C~LCULATE NUMBER OF PAGES REQUESTED 699 QNXTSEG: .1 · 2 ADVANCE THE SVAPTE TO POINT TO THE PORTION OF THE PAGE TABLES THAT MAP THE .3 BUFFER FOR THIS SEGMENT. IF THIS IS AN ERASE I/O, DO NOT ADVANCE THE .4 SVAPTE, AS THE ENTIRE TRANSFER IS MAPPED BY A SINGLE PAGE TABLE PAGE. .5 .6 .7 . 8 .9 . 10 .11 13$: . 12 69$: INCL BBC BSBW BLBS MOVAL MOVL WAPMS$GL SPLIT #I0$V ERASE,IRP$W-FUNC(R5), 13$ CHECK-ERASE R0,69$ (R3) [R1], IRP$L SVAPTE(R5) R5,R3 COUNT A SPLIT TRANSFER BRANCH IF NOT ERASE - UPDATE SVAPTE IS THIS AN ERASE J/0 REQUEST BRANCH IF YES - DO NOT ADVANCE SVAPTE ; SET ADDRESS OF NEXT PTE ENTRY COPY I/0 REQUEST PACKET ADDRESS . 13 MOVL IRP$L UCB(R3),R5 704 BSBB IOC$QNXTSEG COPY UCB ADDRESS QUEUE THE NEXT VIRTUAL SEGMNET 705 5$: BRW IO POST 706 7.07 ; ALL SEGMENTS OF THIS TRANSFER ARE COMPLETE 708 709 10$: 710 711 · 1 . 2 .3 15$: MOVL MOVL BNEQ MOVL MOVL IRP$L OBCNT(R5),R1 IRP$L-DIAGBUF(R5),R3 15$ - IRP$L SVAPTE(R5),R3 R3,IRP$L SVAPTE(R5) GET ORIGINAL BYTE COUNT GET ORIGINAL PAGE TABLE ADDRESS NEQ implies IRP$L DIAGBUF was valid. If not valid, then IRP$L SVAPTE is. SVAPTE MUST BE CORRECT - .4 BRW UNLOCK . 5 · 6 .7 I/0 OPERATION ENDED WITH AN UNSUCCESSFUL STATUS .8 .9 IF THE REQUEST IS LOGICAL I/O, BRANCH BACK TO UNLOCK. (10$) 716 717 '; 718 719 IF THE DEVICE IS A SEQUENTIAL DEVICE, THEN THE I/O PACKET IS MERELY SENT TO THE ACP FOR NOTIFICATIO~, OF THE ERROR. 720 IF THE DEVICE IS A RANDOM DEVICE, THEN THE VIRTUAL BLOCK NUMBER 721 STORED IN IRP$L_SEGVBN IS THE BLOCK THAT HAS AN ERROR. 722 723 .1 20$: BBC #IRP$V VIRTUAL,- . 2 IRP$W STS(R5),10$ Branch IF Logical I/O .3 TSTW IRP$L-OBCNT+2(R5) SEE IF BYTE COUNT > 64K . 4 BEQL 30$ - EQL implies< 64K . .5 .6 .7 30$: CLRL BRB IRP$L IOST1+2(R5) 40$ - Zero byte count before recycleing IRP Branch around .8 CLRW IRP$L IOST1+2(R5) Zero byte count before recycleing IRP .9 40$: . 10 MOVL R5,R3 ; COPY IRP ADDRESS . 11 DECW PCB$W DIOCNT(R4) ; ADJUST DIRECT I/O COUNT . 12 BICW #IRP$M_VIRTUAL,IRP$W_STS(R3) ; CLEAR VIRTUAL I/O FLAG IOCIOPOST V03-024 ACG0421 ACG0421 ACG0421 6 2C A3 52 - I/O COMPLETION POSTING VIRTUAL (OR LOGICAL) I/O COMPLETION 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 19 24-APR-1982 t5:46:59 DISK$VMSMASTER: [SYS.SRC]IOCIOPOST.(5) 4C A3 DO 045C . 13 44 A3 DO 0461 . 14 009F 30 0465 . 15 BE 11 0468 730 046A 731 046A 732 MOVL MOVL BSBW BRB IRP$L DIAGBUF(R3),IRP$L SVAPTE(R3) RESET PAGE TABLE ADDRESS IRP$L-OBCNT(R3),R2 - ; GET ORIGINAL BYTE COUNT IOC$QTOACP ; QUEUE PACKET TO ACP 5$ .DSABL LSB IOCIOPOST V03-024 ;ACG0421 ;ACG0421 ;ACG0421 ;ACG0421 ;ACG0421 ;ACG0421 ;ACG0421 ;ACG0421 ;ADE9005 ;ADE9005 ;ADE9005 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 - I/O COMPLETION POSTING QUEUE NEXT SEGMENT 3~JLJN-1984 11:26:47 VAX-11 Macro V03-01 Page 20 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(6) 51 50 24 52 18 A3 51 32 A3 50 48 A3 3E A4 04 E7 2A A3 OOOOOOOO'GF lC A3 55 32 A3 52 74 52 0084 C5 05 52 FEOO BF OA 046A 046A 046A 046A 046A 046A 046A 046A 046A 046~ 046A 046A 046A 046A 046A 046A 046A 046A 046A 046A 046A 046A 046A 046A 046A 046A 046A DO 046A 11 046D 046F 046F DO 046F DO 0473 DO 0477 047B 047B 0478 047B 0478 047B 047B 0478 047B 047B 0478 0478 87 0478 El 047E 0480 16 0483 DO 0489 C2 048D 13 0491 DO 0493 12 0498 3C 049A El 049F 734 .SBTTL QUEUE NEXT SEGMENT 735 736 FUNCTIONAL DESCRIPTION: 737 738 IOC$QNXTSEG PERFORMS THE FUNCTION OF QUEUEING THE NEXT 739 SEGMENT OF A VIRTUAL I/O REQUEST THAT DID NOT MAP TO A 740 SINGLE CONTIGUOUS I/O REQUEST. 741 742 CALLING SEQUENCE: 743 744 BSBW IOC$QNXTSEG 745 746 INPUTS: 747 748 749 = R3 = I/O REQUEST PACKET ADDRESS R4 PCB ADDRESS ASSOCIATED WITH THE PIO IN THE PACKET 750 R5 = UCB ADDRESS OF THE ASSOCIATED DEVICE 751 752 OUTPUTS: 753 754 R4 NOT PRESERVED 755 . 1 . 2 .ENABLE LSB . 3 Out of line code for Logical I/O. .4 This code mimics results of .5 .6 5$: MOVL RO,R1 IOC$MAPVBLK for Logical I/O. Namely Rl = LBN. . 7 BRB 10$ Branch back to common code. .8 756 IOC$QNXTSEG:: 757 MOVL IRP$L WIND(R3),R2 GET ADDRESS OF MAPPING WINDOW 758 MOVL IRP$L-BCNT(R3),R1 GET SIZE OF NEXT SEGMENT 759 MOVL IRP$L-SEGVBN(R3),RO GET STARTING VIRTUAL BLOCK NUMBER 760 761 ALTERNATE ENTRY TO IOC$QNXTSEG: 762 763 BS8W IOC$QNXTSEG1 764 765 ADDITIONAL INPUTS: 766 767 = RO VIRTUAL BLOCK NUMBER OF START OF NEXT SEGMENT 768 Rl = DESIRED BYTE COUNT OF NEXT SEGMENT 769 R2 = WINDOW ADDRESS 770 771 I OC$QNXTSEG 1 : : 772 DECW PCB$W DIOCNT(R4) ADJUST THE DIRECT I/0 COUNT . 1 BBC #IRP$V VIRTUAL,- Branch to out of line code if this . 2 !RP$W STS(R3) '5$ is Logical I/O. . 3 JSB GAIOC$MAPVBLK MAP VIRTUAL TO LOGICAL BLOCK .4 MOVL R5, IRP$L UCB ( R3) STORE POSSIBLY MODIFIED UCB ADDRESS .5 SUBL R2,IRP$L-BCNT(R3) CALCULATE SIZE OF NEXT SEGMENT .6 . 7 10$: . 8 BEQL MOVL BNl::Q 30$ UCB$L MAXBCNT(R5),R2 15$ - IF EQL TOTAL MAP FAILURE R2 = 0 or Max. permissible BCNT. NEQ implies Max. permissible BCNT in RO. .9 MOVZWL #512*127,R2 If 0, use default Max. permissible. . 10 15$: BBC #I0$V ERASE,- BRANCH IF DEFINITELY NOT AN ERASE IOCIOPOST V03-024 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 "; ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 ;ACG0422 ;ROW0218 ;RLRMXBCNT ;RLRMXBCNT -5 ;ACG0421 ;AOE9005 -1 ;ACG0421 - I/O COMPLETION POSTING QUEUE NEXT SEGMENT 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 21 24-APR-1982 15:46:S9 DISK$VMSMASTER:[SYS.SRC)IOCIOPOST.(6) 20 20 A3 SS DD SS S3 DO 0264 30 SS BEDO 12 50 E9 2C A3 D5 OD 13 SO FEOO SF 3C 50 52 Dl 03 lB 52 50 DO 32 A3 S2 Dl 04 1E 32 A3 S2 DO 52 32 A3 DO 52 D7 52 F7 SF 78 52 S2 51 co 13 1F OOBO CS 52 01 oc 1E 50 51 DO OOOOOOOO'GF 16 F~OF' 31 OODC BF 3C 38 A3 3C A3 04 63 OE; OOOOOOOO'FF 03 12 OS 04A1 04A4 04A6 04A9 04AC 04AF 0482 04B5 04B7 04BC 04BF 04C1 04C4 04C4 04C8 04CA 04CE 04CE 04D2 04D4 0408 04D9 04DC 04DE 04E3 04E5 04E8 04EE 04F1 04F1 04F1 04F1 04F1 04F1 04F1 04F5 04F7 04FA 04FC OS01 OS03 OS06 OS07 0507 0507 0507 0507 0507 0507 0507 OS07 0507 0507 0507 0507 OS07 OS07 . 11 . 12 . 13 . 14 . 1S . 16 . 17 . 18 . 19 .20 . 21 .22 .23 .24 17$: .2S .26 .27 20$: 778 779 780 PUSHL MOVL BSBW POPL BLBC TSTL BEQL MOVZWL CMPL BLEQU MOVL IRP$W FUNC(R3),17$ RS - R3,R5 CHECK ERASE R5 - RO, 17$ IRP$L SVAPTE ( R3) 17$ - #512*127,RO R2,RO 17$ RO,R2 CMPL BGEQU MOVL R2,IRP$L BCNT(R3) 20$ - R2,IRP$L_BCNT(R3) MOVL DECL ASHL IRP$L BCNT(R3),R2 R2 #-VA$S BYTE,R2,R2 SAVE UCB ADDRESS COPY IRP ADDRESS IS THIS AN ERASE FUNCTION? RESTORE UCB ADDRESS BRANCH IF IT IS NOT AN ERASE ARE WE USING A DUMMY PAGE TABLE? BRANCH IF NOT GET MAX BYTE COUNT FOR PPT CHECK LIMIT AGAINST MAX BRANCH IF OK LIMIT TRANSFER TO PPT SIZE See if BCNT too large. GEQU implies we are OK. Eise scale down to maximum allowed. GET TRANSFER BYTE COUNT ROUND DOWN AND ... SHIFT DOWN FOR BLOCK COUNT - 781 ADDL R1, R2 COMPUTE ENDING BLOCK NUMBER 782 BCS 25$ BRANCH ON OVERFLOW 783 CMPL R2,UCB$L MAXBLOCK(R5) AND CHECK AGAINST DEVICE SIZE 784 BGEQU 25$ BRANCH IF NOT LEGAL .1 MOVL R 1, RO COPY STARTING LOGICAL BLOCK NUMBER . 2 JSB GAIOC$CVTLOGPHV CONVERT LOGICAL TO PHYSICAL BLOCK 786 BRW EXE$INSIOQ INSERT I/O PACKET IN DEVICE QUEUE 787 AND RETURN 788 789 TO HERE IF THE VIRTUAL BLOCKS MAP OFF THE END OF THE VOLUME. COMPLETE THE 790 I/0 WITH AN ERROR. WE QUEUE THE PACKET FOR PROCESSING, RATHER THAN WANDERING 791 OFF INTO THE COMPLETION CODE BECAUSE THIS IS A GENERALLY CALLABLE ROUTINE. 792 793 2' 5$: MOVZWL #SS$_ILLBLKNUM,IRP$L IOST1(R3) SET ILLEGAL BLOCK NUMBER STATUS 794 CLRL IRP$L IOST2(R3) ZERO 2ND I/O STATUS LONGWORD 795 INSQUE (R3),@IOC$GL PSBL INSERT AT TAIL OF I/O POST QUEUE 796 BNEQ 26$ BRANCH IF NOT EMPTY 797 798 26$: SOFTINT #IPL$ IOPOST RSB - WAKE UP 1/0 COMPLETION 799 800 30$: .1 .DISABLE LSB 801 802 ALTERNATE ENTRY TO IOC$WAKACP: 803 804 BSBW IOC$QTOACP 80S 806 INPUTS: 807 808 809 = R2 DESIRED BYTE COUNT = R3 !RP ADDRESS . 810 811 PCB$W_DIOCNT(R4) ALREADY DECREMENTED 812 IOC$QTOACP: IOCIOPOST V03-024 ;CDSOOOl ;CDSOOOl ;CDSOOOl ;CDSOOOl ;CDS0001 ;CDSOOOl ;CDS0001 -4 ;CDS0002 ;CDS0002 ;CDS0002 ;CDS0002 ;CDS0002 ;CDS0002 ; CDS0002 ;CDS0002 ;CDS0002 ;CDS0002 ;CDS0002 CDS0002 CDS0002 CDS0002 CDS0002 CDS0002 - I/0 COMPLETION POSTING QUEUE NEXT SEGMENT 3-JUN-1984 11:26:47 VAX-11 Macro V03-0l Page 22 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(6} 32 A3 52 DO 52 1S A3 DO OB A2 02 EO 4E 52 1C A3 DO 52 34 A2 DO 52 10 A2 DO OC A2 05 17 13 FAD2' 30 OE 12 51 OC A2 DO FAC9' 30 04 50 ES 05 55 DD 55 60 A3 9E OB A5 SO SF 90 OC A5 OC A3 DO OOOO'CF 9E 18 A5 52 D4 FAA3' 30 55 8EDO DC 11 0507 050B 050F 0513 0514 051S 0518 051S 0518 0518 0518 0518 0518 0518 0518 0518 0518 0518 0518 0518 0518 0518 0518 0518 0518 0518 0518 051E 0522 0526 0529 052B 052E 0530 0534 0537 053A 053E 0541 0542 0542 0542 0542 0542 0542 0542 0542 0544 054S 0540 0552 0556 0558 055A 055D 0560 0562 813 MOVL R2,IRP$L BCNT(R3) ; SET REMAINING BYTES TO TRANSFER S14 MOVL IRP$L WIND(R3),R2 ; GET WINDOW ADDRESS 815 BBS #WCB$V NOTFCP,WC8$B ACCESS(R2),- ; IF SET THEN 816 NOTFCPWCB - ; NOT FCP WINDOW 817 MOVL IRP$L UCB(R3),R2 ; GET ADDRESS OF DEVICE UCB 818 819 FUNCTIONAL DESCRIPTION: 820 821 SUBROUTINE TO QUEUE AN I/O PACKET FOR AN ACP PROCESS AND WAKE 822 THE PROCESS IF ITS QUEUE WAS PREVIOUSLY EMPTY. 823 824 CALLING SEQUENCE: 825 826 BSBW IOC$WAKACP 827 828 INPUTS: 829 830 R2 DEVICE UCB ADDRESS 831 R3 I/O REQUEST PACKET ADDRESS 832 833 OUTPUTS: 834 835 R4 ALTERED 836 .. .1 .ENABL LSB · 2 IOC$WAKACP:: QUEUE I/O PACKET AND WAKE ACP PROCESS .3 DSBINT #IPL$ SYNCH SYNCHRONIZE ACCESS TO SYSTEM DATA BASE .4 MOVL UCB$L-VCB(R2),R2 GET ASSOCIATED VCB ADDRESS .5 MOVL VCB$L-AQB(R2),R2 GET ACP QUEUE BLOCK ADDRESS .6 TSTL AQB$L-ACPPID(R2) PROCEDURE BASED? NO PID IF SO . 7 BEQL XQP - EQL THEN IS NOT AN ACP 841 BSBW EXE$INSERTIRP INSERT I/O PACKET IN ACP QUEUE 842 BNEQ 10$ IF NEQ NOT FIRST IN QUEUE 843 MOVL AQB$L ACPPID(R2),Rl GET ACP PROCESS ID 844 BSBW SCH$WAKE WAKE ACP PROCESS 845 BLBS R0,10$ IF LBS ACP STILL PRESENT 846 BUG CHECK NONEXSTACP NONEXISTENT ACP PROCESS 847 10$: ENBINT RESTORE SAVED IPL 848 RSB 849 .1 THIS VOLUME IS BEING HANDLED BY AN XQP INSTEAD OF AN ACP. CALL THE . 2 XQP QUEUEING ROUTINE AS A SPECIAL KERNEL AST TO GET IN THE CONTEXT . 3 OF THE PROCESS THAT INITIATED THIS REQUEST TO HANDLE IT . .4 .5 .6 XQP: .7 PUSHL R5 ; PRESERVE R5. . s MOVAB IRP$L FQFL(R3), R5 ; GET TEMP ACB ADDR INTO R5 . .9 MOVB #ACB$M KAST, ACB$8 RMOD(R5) ; NOTE AS SPECIAL KERNEL AST . 10 MOVL IRP$L PID(R3), ACB$L PID(R5) ; COPY PIO OF PROCESS. .11 MOVAB WAEXE$QXQPFKT, ACB$L=KAST(R5) ; ADDR OF QUEUEING ROUTINE. . 12 .CLRL R2 . 13 BSBW SCH$QAST . 14 POPL R5 . 15 BRB 10$ . 16 NO PRIORITY INCREMENT. QUEUE THE AST . RESTORE R5. BRANCH TO EXIT . IOCIOPOST V03-024 ;CDS0002 ;CDS0002 - I/O COMPLETION POSTING QUEUE NEXT SEGMENT 3-JUN-1984 11:26:47 VAX-11 Macro V03-0l Page 23 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(6) 0562 0562 0562 0562 0562 0562 0562 .17 .DSABL LSB . 18 ; 850 ; WINDOW IS NOT AN FCP WINDOW, ONLY USED FOR BOOT TIME INTIALIZED WINDOWS 851 ; FOR CONTIGUOUS FILES. IT IS NOT POSSIBLE TO NEED TO TURN SUCH A WINDOW. 852 ; 853 NOTFCPWCB: 854 BUG_CHECK NOTFCPWCB,FATAL IOCIOPOST V03-024 - 1/0 COMPLETION POSTING BUFFERED READ COMPLETION AST ROUTINE 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 24 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(7) OOEO SF 56 2C A5 57 32 A5 4B 2A A5 03 59 2A A5 05 56 66 50 02 A6 32 51 04 A6 50 51 51 OlFF BF 50 51 54 66 53 FEOO BF 51 53 50 6043 FO 02 A6 01 A644 04 B6 55 6E 56 08 C2 57 007D 78 017E 55 6E 70 2A A5 OA 50 02 FA2D 6B 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 0566 BB 0566 DO 056A DO 056E E 1 0572 EO 0577 DO 057C 3C 057F 13 0583 DO 0585 co 0589 AA 05BC C2 0591 3C 0594 32 0597 059C C2 05A3 3E 05A6 14 05AA 28 05AC 05AF 05B2 DO 05B4 co 05B7 F5 05BA 31 05BD 11 05CO 30 05C2 DO 05C5 El 05C8 9A 05CD 30 05DO 11 05D3 05D5 05D5 B56 .SBTTL BUFFERED READ COMPLETION AST ROUTINE 857 ;++ 858 FUNCTIONAL DESCRIPTION: B59 860 BUFPOST PERFORMS ALL NECESSARY COMPLETION OPERATIONS REQUIRED 861 FOR A BUFFERED READ OPERATION IN THE CONTEXT OF THE PROCESS B62 ISSUING THE I/O REQUEST. 863 864 CALLING SEQUENCE: 865 866 JSB BUFPOST 867 868 INPUT PARAMETERS: B69 B70 B71 R4 = CURRENT PROCESS PCB ADDRESS. R5 = !RP/AST CONTROL BLOCK. 872 B73 IMPLICIT INPUTS: 874 875 SCH$GL CURPCB - POINTER TO PCB OF CURRENT PROCESS 876 877 878 BUFPOST: BUFFERED READ COMPLETION 879 PUSHR #AM<R5,R6,R7> ; SAVE REGISTERS BBO MOVL IRP$L SVAPTE(R5),R6 ; GET ADDRESS OF I/0 BUFFER BBl MOVL IRP$L-BCNT(R5),R7 ; GET COUNT OF BYTES OR DESCRIPTORS 882 BBC #IRP$V COMPLX,IRP$W STS(R5),40$ ;IF CLR, NOT COMPLEX BUFFER FORMAT BB3 BBS #IRP$V-CHAINED,IRP$W STS(R5),50$ ;IF SET ,CHAINED BUFFERS 884 MOVL (R6),R6 - ; GET ADDRESS OF FIRST BUFFER DESCRIPTOR 885 10$: MOVZWL 2(R6),RO ; GET COUNT OF BYTES TO TRANSFER 8B6 BEQL 30$ ; IF EQL NONE THIS DESCRIPTOR 887 MOVL 4(R6),R1 ; GET ADDRESS OF USER BUFFER 888 ADDL Rl,RO ; CALCULATE ENDING ADDRESS OF BUFFER B89 BICW #VA$M BYTE,Rl ; TRUNCATE ADDRESS TO PAGE BOUNDARY 890 SUBL Rl,RO- ; COMPUTE NUMBER OF BYTES TO PROBE 891 MOVZWL (R6),R4 ; GET OFFSET TO DATA AREA B92 CVTWL #-AX200,R3 ; SET ADDITION CONSTANT B93 20$: I FNOWRT RO,(Rl) ,35$, (R6)[R4] ; CAN BUFFER BE WRJTTEN? 894 SUBL R3,R1 ;/UPDATE ADDRESS OF BUFFER 895 MOVAW (RO)[R3] ,RO ; UPDATE REMAINING LENGTH 896 BGTR 20$ ; IF GEQ MORE TO CHECK 897 MOVC 2(R6),1(R6)[R4],@4(R6) : MOVE DATA TO USER BUFFER 89B B99 30$: 900 901 902 35$: 903 40$: 904 905 906 907 90B 909 910 MOVL ADDL SOBGTR BRW BRB BSBW MOVL BBC MOVZBL BSBW BRB (SP) ,R5 RESTORE ADDRESS OF I/O PACKET #B,R6 ADVANCE TO NEXT BUFFER DESCRIPTOR R7, 10$ ANY MORE DESCRIPTORS TO PROCESS? 130$ 120$ CONTINUE MOVBUF MOVE BUFFER TO USER (SP) ,R5 RETRIEVE ADDRESS OF I/O PACKET #IRP$V MBXIO,IRP$W STS(R5),130$; BR IF NOT MAILBOX READ #RSN$ MAILBOX,RO SET UP RESOURCE RELEASE SCH$RAVAIL DECLARE MAILBOX RESOURCE AVAILABLE 130$ IOCIOPOST V03-024 - I/O COMPLETION POSTING BUFFERED READ COMPLETION AST ROUTINE 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 25 24-APR-1982 15:46:59 DISK$VMSMASTER: [SYS.SRC]IOCIOPOST.(7) 50 57 51 04 A6 50 51 51 01ff Sf 50 51 02 00 52 OB A5 53 FEOO Bf 51 53 50 6043 F 1 53 04 A6 OC A6 57 04 OC A6 57 96 OC A6 63 55 6E 57 08 A6 OB 56 OC A6 E2 03 013S 50 2C A5 56 10 AO OF F9CB' 50 56 F2 0123 50 2C A5 f9BC' OOEO Sf 05D5 05D5 05D5 DO 05D5 DO 05D8 co 05DC AA 05DF C2 05E4 EF 05E7 05EA 32 05ED 05F2 C2 05F8 3E 05f B 14 05FF DO 0601 Bl 0605 1E 0609 BO 060B 28 060F 0613 DO 0614 A2 0617 13 061B DO 061D 12 0621 11 0623 30 0625 DO 0628 DO 062C 13 0630 30 0632 DO 0635 11 0638 30 063A DO 0630 30 0641 BA 0644 911 ; NB: THE FOLLOWING SECTION OF CODE USES A WORD-SIZE BUFFER LENGTH 912 (ALTHOUGH IRP$L BCNT WAS EXPANDED TO BE A LONGWORD). 913 914 50$: MOVL R7,RO SET LENGTH OF USER BUFFER 915 MOVL 4(R6) ,Rl SET ADDRESS OF USER BUFFER 916 ADDL Rl, RO CALCULATE END OF USER BUFFER 917 BICW #VA$M BYTE,Rl TRUNCATE TO PAGE BOUNDARY 91S SUBL Rl, R0- COMPUTE NUMBER OF BYTES TO PROBE 919 EXTZV #0 ,#2, IRP$B RMOD(R5),R2 GET REQUEST ACCESS MODE 920 921 60$: 922 923 924 925 926 70$: 927 928 929 80$: CVTWL #-AX200,R3 ; SET ADDITION CONSTANT IFNOWRT RO,(R1),90$,R2 ; CAN BUFFER BE WRITTEN? SUBL R3,R1 ; UPDATE ADDRESS OF BUFFER MOVAW (RO)[R3] ,RO ; CALCULATE NEW LENGTH BGTR 60$ ; IF GEO MORE TO PROBE MOVL 4(R6),R3 ; GET STARTING ADDRESS OF USER BUFFER CMPW R7,CXB$W LENGTH(R6) ; REMAINING LENGTH LARGER THAN DATA AREA? BGEQU 80$ ; IF GEQU YES MOVW R7,CXB$W LENGTH(R6) ; TRUNCATE LENGTH OF DATA AREA MOVC CXB$W_LENGTH(R6),@(R6)+,(R3) ; MOVE DATA TO USER BUFFER 930 931 932 933 934 935 936 90$: 937 100$: 938 110$: 939 940 941 942 943 120$: 944 130$: 945 140$: 946 MOVL SUBW BEQL MOVL BNEQ BRB BSBW MOVL MOVL BEQL BSBW MOVL BRB BSBW MOVL BSBW POPR (SP),R5 CXB$W LENGTH-4(R6),R7 100$ - CXB$L LINK-4(R6),R6 70$ - 100$ ACCVIO IRP$L SVAPTE(R5),RO CXB$L-LINK(RO),R6 140$ EXE$DEANONPAGED R6,RO 110$ AC CV IO IRP$L SVAPTE(R5) ,RO EXE$DEANONPAGED #AM<R5,R6,R7> RETRIEVE ADDRESS OF I/O PACKET REDUCE REMAINING BYTES TO TRANSFER IF EQL DONE GET ADDRESS OF NEXT BUFFER IN CHAIN IF NEQ MORE TO GO SET ACCESS VIOLATION GET ADDRESS OF FIRST BUFFER GET ADDRESS OF NEXT BUFFER If EQL NONE DEALLOCATE BUFFER SET ADDRESS OF NEXT BUFFER SET ACCESS VIOLATION STATUS GET ADDRESS OF BUFFER TO RELEASE DEALLOCATE BUFFER RESTORE REGISTERS IOCIOPOST V03-024 ;LJK45299 -1 - I/O COMPLETION POSTING DIRECT I/O COMPLETION AST ROUTINE 3-JUN-19S4 11:26:47 VAX-11 Macro V03-0l Page 26 24-APR-19S2 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(8) 01 00 EF 50 2A A5 00000000'9F DO 51 54 Al40 06 00000002 OOOOOOOO'Ef40 D6 lD 2A A5 07 E1 OOEO SF BB 56 4C A5 DO 57 08 A6 3C 57 oc C2 oocc 30 OOEO SF BA 50 4C A5 DO F97E' 30 50 28 A5 32 OOOOOOOO'FF40 9E 51 OA Al B7 13 12 53 OC Al DO OD 13 OC Al D4 OA Al B6 52 lC A3 DO FE72 30 064S 064S 064S 064S 0648 0648 0648 0648 064S 064S 0648 0648 064S 0648 0648 0648 0648 0648 0648 0648 0648 0648 0648 0648 0648 0648 064B 064E 0654 0655 0659 0659 0659 0660 0660 0660 0665 0669 066D 0671 0674 0677 067B 067F 0682 0686 068D 068E 0691 0693 0697 0699 069C 069F 06A3 06A6 06A6 948 .SBTTL DIRECT I/O COMPLETION AST ROUTINE 949 ;++ 950 FUNCTIONAL DESCRIPTION: 951 952 DIRPOST PERFORMS ALL GENERAL I/O COMPLETION ACTIVITIES WHICH 953 MUST BE DONE IN THE CONTEXT OF THE PROCESS. THESE INCLUDE 954 I/O STATUS POSTING IF AN IOSB WAS SPECIFIED, CHANNEL CONTROL 955 BLOCK ACTIVITY COUNT DECREMENTING, QUEUEING OF ANY REQUESTED 956 AST OR RELEASE OF THE I/0 REQUEST PACKET. 957 958 CALLING SEQUENCE: 959 960 JSB DIRPOST 961 962 INPUT PARAMETERS: 963 964 965 R4 = CURRENT PROCESS PCB ADDRESS. R5 = IRP/AST CONTROL BLOCK ADDRESS. 966 967 IMPLICIT INPUTS: 968 969 SCH$GL CURPCB - POINTER TO CURRENT PCB 970 971 972 DIRPOST: ; DIRECT I/O POSTING AST 973 EXTZV #IRP$V_BUFI0,#1 ,IRP$W STS(R5),RO ; GET INDEX TO ACCOUNTING ENTRY 974 MOVL @#CTL$GL PHD,R1 GET PROCESS HEADER ADDRESS 975 976 977 978 979 9SO 9S1 982 983 984 985 986 987 988 989 990 10$: 991 INCL PHD$L DIOCNT(Rl)[ROJ ACCOUNT FOR BUFFERED OR DIRECT I/O .IF NE CA$ MEASURE INCL PMS$GL DIRIO[RO] .ENDC - CHECK FOR MEASUREMENT ENABLED UPDATE MEASUREMENT I/O COUNTER BBC PUS HR MOVL MOVZWL SUBL BSBW POPR MOVL BSBW CVTWL MOVAB #IRP$V DIAGBUF,IRP$W STS(R5),10$ ; IF CLR, NO DIAGNOSTIC BUFFER #AM<R5~R6,R7> - ; SAVE REGISTERS IRP$L DIAGBUF(R5),R6 ; GET ADDRESS OF DIAGNOSTIC BUFFER IRP$W-SIZE(R6),R7 ; GET SIZE OF DIAGNOSTIC BUFFER #12,R1 ; REDUCE BY SIZE OF BUFFER HEADER MOVBUF ; MOVE DIAGNOSTIC INFORMATION TO USER #AM<R5,R6,R7> ; RESTORE REGISTERS IRP$L DIAGBUF(R5),RO ; RETRIEVE ADDRESS OF DIAGNOSTIC BUFFER EXE$DEANONPAGED ; DEALLOCATE DIAGNOSTIC BUFFER IRP$W CHAN(R5),RO ; GET CHANNEL NUMBER (NEGATED) @CTL$GL CCBBASE[RO],Rl : SET CCB BASE ADDRESS 992 993 994 995 996 997 · 1 999 1000 1001 30$: DEC\\' BNEQ MOVL BEQL CLRL .INCW MOVL BSBW CCB$W roe (R1) 30$ - CCB$L DIRP(R1),R3 30$ - CCB$L DIRP(Rl) CCB$W-IOC ( R1) IRP$L-UCB(R3) ,R2 IOC$WAKACP DECREMENT I/O COUNT FOR CHANNEL NOT IDLE YET GET ADDRESS OF DEACCESS PACKET IF EQL NONE CLEAR ADDRESS OF DEACCESS PACKET ACCOUNT FOR DEACCESS GET ASSIGNED DEVICE UCB ADDRESS QUEUE I/O PACKET AND WAKE ACP R4 ALTERERED IOCIOPOST V03-024 ;WMC0020 ;WMC0020 ;WMC0020 ;WMC0020 ;STJ3049 ;STJ3049 ;STJ3049 ;STJ3049 ;STJ3049 ;STJ3049 -11 - I/O COMPLETION POSTING DIRECT I/O COMPLETION AST ROUTINE 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 27 24-APR-1982 15:46:59 DISK$VMSMASTER: [SVS.SRC]IOCIOPOST.(8) 50 24 A5 10 02 00 51 OB A5 60 38 A5 51 oc A5 17 2A A5 OB 05 OB A5 06 52 F931' OA 02 20 A5 1 F 50 55 F924' 50 54 A5 54 04 2A AO OB 54 54 AO F912' 50 54 ED DO 06A6 06A6 06A6 06A6 DO 06A6 13 06AA EF 06AC 06AF 06B2 7D 06B8 DO 06BC EO 06CO El 06C5 D4 06CA 31 06CC E1 06CF 06Dl 10 06D4 DO 06D6 31 06D9 06DC 06DC 06DC 06DC 06DC DO 06DC 06EO D4 06EO E1 06E2 DO 06E7 30 06EB DO 06EE 12 06Fl 11 06F3 1002 1003 ; R4 DOES NOT NECESSARILY HAVE CURRENT PCB ADDRESS IN IT AT THIS POINT 1004 ; 1005 IOC$DIRPOST1:: 1006 1007 MOVL BEQL IRP$L IOSB(R5),RO 35$ - GET IOSB ADDRESS IF EQL NONE SPECIFIED 1008 EXTZV #0,#2,IRP$B RMOD(R5),Rl GET REQUEST ACCESS MODE 1009 1010 1011 35$: · 1 .2 37$: . 3 .4 .5 40$: .6 . 7 .8 42$: .9 . 10 1023 1024 1025 1026 1027 50$: 1028 1029 60$: 1030 1031 1032 70$: 1033 1034 1035 IFNOWRT #8,(R0),35$,Rl ; CAN I/O STATUS BE WRITTEN? MOVQ IRP$L IOST1(R5) ,(RO) ; MOVE STATUS INTO IOSB MOVL IRP$L-PID(R5),R1 ; PROCESS IDENTIFICATION BBS #IRP$V EXTEND,IRP$W STS(R5),50$ ; BRANCH TO DEALLOCATE IRPE'S BBC #ACB$V-QUOTA,IRP$B RMOD(R5),40$ ; IF CLR, NO AST SPECIFIED CLRL R2 - - SET NULL PRIORITY INCREMENT BRW SCH$QAST QUEUE AST FOR REQUESTOR BBC #I0$V ERASE,- BRANCH IF NOT AN ERASE REQUEST IRP$W-FUNC(R5),42$ BSBB MOVL CLEANUP ERASE R5,RO - CLEAN UP AFTER AN ERASE REQUEST SETUP ADDRESS FOR DEALLOCATE BRW EXE$DEANONPAGED AND RELEASE I/O PACKET DEALLOCATE IRPE'S MOVL CLRL BBC MOVL BSBW MOVL BNEQ BRB IRP$L_EXTEND(R5) ,RO ; GET ADDRESS OF FIRST IRPE R4 WILL HOLD ADDRESS OF NEXT IRPE #IRPE$V EXTEND,IRPE$W STS(R0),70$ ; BR. IF NO MORE IRPE'S IRPE$L EXTEND(RO) ,R4 SAVE ADDRESS OF NEXT IRPE EXE$DEANONPAGED DEALLOCATE IRPE POINTED TO BY RO R4,RO PUT ADDRESS OF NEXT IRPE IN RO 60$ BR. IF THERE IS ANOTHER IRPE 37$ DONE DEALLOCATING IRPE'S IOCIOPOST V03-024 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0~19 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 ;WMC0019 - I/0 COMPLETION POSTING ERASE I/0 HELPER ROUTINES 3-JUN-1984 11:26:47 VAX-11 Macro V03-0l Page 28 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST.(9) 19 15 50 50 2C A5 OF OOOOOOOO'GF 50 06 50 oc F8F 1' 50 1C A5 OA 29 20 A5 00 06 15 20 A5 lE 01 40 AO 18 00 06 20 A5 OB 10 00 06 20 A5 06F5 06F5 06F5 06F5 06F5 06F5 06F5 06F5 06F5 06F5 06F5 06F5 06F5 06F5 10 06F5 E9 06F7 DO 06f A 13 06FE Dl 0700 0706 13 0707 C2 0709 30 070C 05 070F 0710 0710 0710 0710 0710 0710 0710 0710 0710 0710 0710 0710 0710 0710 0710 DO 0710 El 0714 0716 ED 0719 0718 071C 13 071F 91 0721 0723 12 0725 ED 0727 0729 072A 072C 13 072D ED 072f 0731 0732 .1 .SBTTL ERASE I/0 HELPER ROUTINES . 2 ;++ .3 CLEANUP ERASE .4 .5 LOCAL SUBROUTINE TO FINISH PROCESSING AN ERASE REQUEST · 6 THE CLEANUP WILL VARY WITH THE TYPE Of ERASE REQUEST. . 7 SEE THE ROUT! NE HEADER OF THE SUBROUTINE "SETUP ERASE" .8 IN SYSACPFDT FOR DETAILS. .9 . 10 INPUT: = R5 IRP ADDRESS . 11 OUTPUT: NONE. . 12 . 13 . 14 CLEANUP ERASE: . 15 -BSBB CHECK ERASE FINISH UP AFTER AN ERASE REQUEST IS THIS AN ERASE I/O? . 16 BLBC R0,69$ BRANCH If NOT . 17 MOVL IRP$L SVAPTE(R5),RO GET ADDRESS Of PPT . 18 BEQL 69$ - BRANCH IF NONE . 19 CMPL G~EXE$GL ERASEPPT,RO IS THIS THE SYSTEM PPT? .20 BEQL 69$ BRANCH IF YES' . 21 SUBL2 #12,RO CALC ADDRESS OF HEADER .22 BSBW EXE$DEANONPAGED RETURN THE POOL TO THE SYSTEM .23 69$: RSB RETURN .24 .25 .26 ;++ .27 CHECK ERASE .28 .29 LOCAL SUBROUTINE TO DETERMINE IF THIS IRP IS FOR AN ERASE I/O REQUEST. .30 THIS LEVEL OF PARANOIA IS NECESSARY TO PREVENT THE TOTAL CHAOS THAT . 31 WOULD ARISE SHOULD AN IRP THAT 'LOOKS' LIKE AN ERASE IRP BE TREATED . 32 INCORRECTLY . .33 .34 INPUT: R5 IRP ADDRESS .35 OUTPUT: RO STATUS; LOW BIT SET IMPLIES THIS IS AN ERASE IRP .36 .37 .38 CHECK ERASE: CHECK FOR ERASE I/O REQUEST .39 - MOVL IRP$L UCB(R5) ,RO GET UCB ADDRESS. NOTE: LOW BIT CLEAR .40 BBC #I0$V-ERASE,- BRANCH IF ERASE MODIFIER NOT SET . 41 IRP$W-FUNC(R5), 13$ .42 CMPZV # IRP$V fCODE, - CHECK FUNCTION CODE .43 #IRP$S-fCODE,- ONLY DISKS AND TAPES SUPPORT DSE .44 IRP$W FUNC(R5) ,#IO$ DSE .45 BEQL 11$ - BRANCH IF SO .46 CMPB #DC$ DISK,- IS THIS A DISK DEVICE? .47 UCB$B DEVCLASS(RO) .48 BNEQ 13$ - NO - THEREFORE NOT AN ERASE .49 CMPZV #IRP$V FCODE,- CHECK FUNCTION CODE .50 #IRP$S-fCODE,- ONLY DISKS SUPPORT THE, MODIFIED~ .51 IRP$W FuNC ( R5), - WRITE TYPE OF ERASE REbUEST .52 #I 0$ WR ITEPBLK .53 BEQL 11 $ .54 CMPZV #IRP$V fCODE, - .55 #IRP$S-FCODE, - .56 IRP$W_FUNC(R5),- IOCIOPOST V03-024 WMC0019 WMC0019 WMC0019 WMC0019 WMC0019 WMC0019 WMC0019 WMC0019 WMC0019 - I/0 COMPLETION POSTING ERASE I/O HELPER ROUTINES 20 08 00 06 20 A5 30 03 50 01 0734 13 0735 ED 0737 0739 073A 073C 12 0730 88 073F 05 0742 .57 .58 .59 .60 .61 .62 .63 .64 11$: .65 13$: BEQL CMPZV BNEQ BISB2 RSB 3-JUN-1984 11: 26:47 VAX-11 Macro V03-01 Page 29 24-APR-1982 15:46:59 DISK$VMSMASTER:[SVS.SRC]IOCIOPOST.(9) #I0$_WRITELBLK 11$ # IRP$V FCODE, #IRP$S-FCODE, - IRP$W FUNC ( R5) ' #I0$_WRITEVBLK 13$ #1, RO NOT A WRITE - THEREFORE NOT AN ERASE SET LOW BIT IN RO TO INDICATE ERASE RETURN STATUS VALUE IOCIOPOST V03-024 - I/O COMPLETION POSTING MOVE DATA TO USER BUFFER 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 30 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST(10) 51 57 17 50 04 A6 02 00 53 OB A5 OOOOOOOO'EF 05 50 96 96 57 38 A5 DC 0743 1037 .SBTTL MOVE DATA TO USER BUFFER 0743 1038 0743 1039 SUBROUTINE TO MOVE DATA FROM A SIMPLE BUFFERED I/O BUFFER TO A USER BUFFER 0743 1040 0743 1041 0743 1042 MOVBUF: MOVE BUFFER DO 0743 1043 MOVL R7,R1 SET LENGTH OF USER BUFFER 13 0746 1044 BEQL 5$ BR IF NULL STRING DO 0748 1045 MOVL 4(R6) ,RO GET ADDRESS OF USER BUFFER EF 074C 1046 EXTZV #0,#2,IRP$B RMOD(R5),R3 GET REQUEST ACCESS MODE 074F 16 0752 1047 JSB EXE$PROBEW CHECK ACCESS E9 0758 1048 BLBC RO, ACCV IO IF LBC, NO ACCESS 28 075B 1049 MOVC R7,@(R6)+,@(R6)+ MOVE DATA TO USER BUFFER 05 075F 1050 5$: RSB ; RETURN BO 0760 1051 ACCVIO: MOVW #SS$_ACCVIO,IRP$L IOST1(R5) ; SET FINAL TRANSFER STATUS 05 0764 1052 RSB IOCIOPOST V03-024 - I/O COMPLETION POSTING UNLOCK AREAS IN IRPE'S 3-JUN-1984 11:26:47 VAX-11 Macro V03-0l Page 31 24-APR-1982 15:46:59 DISK$VMSMASTER: [SYS.SRC)IOCIOPOST(ll) 55 DD 55 54 A5 DO 53 2C A5 DO OA 13 52 30 A5 3C 51 34 A5 DO 19 10 53 38 A5 DO OA 13 52 3C A5 3C 51 40 A5 DO 09 10 D7 2A A5 OB ED 55 BEDO 05 51 01FF C142 9E 51 F7 BF 78 51 F85E 30 05 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0765 0767 0767 0767 0767 076B 076F 0771 0775 0779 077B 077B 077F 0781 0785 0789 078B 078B 0790 0793 0794 0794 0794 0794 0794 0794 0794 0794 0794 0794 079A 079E 079F 07A2 1054 SBTTL UNLOCK AREAS IN IRPE'S 1055 ;++ 1056 FUNCTIONAL DESCRIPTION: 1057 1058 THIS ROUTINE UNLOCKS THE AREAS DESCRIBED BY FIELDS IN THE IRPE'S. EACh 1059 IRPE HAS SPACE TO HOLD TWO AREA DESCRIPTIONS. 1060 1061 CALLING SEQUENCE: 1062 1063 BSBW UNLOCK MORE 1064 1065 INPUT PARAMETERS: 1066 1067 R5 = I/O REQUEST PACKET ADDRESS 1068 1069 SIDE EFFECTS: 1070 1071 RO - R3 ARE NOT PRESERVED 1072 ;-- 1073 1074 ASSUME IRP$L EXTEND EQ IRPE$L EXTEND 1075 1076 UNLOCK MORE: 1077 PUSHL R5 ; SAVE IRP ADDRESS 1078 1079 10$: ; UNLOCK AREAS SPECIFIED IN NEXT IRPE 1080 1081 MOVL IRPE$L EXTEND(R5) ,R5 GET ADDRESS OF NEXT IRPE 1082 MOVL IRPE$L-SVAPTEl(R5),R3 GET SVAPTE OF FIRST AREA 1083 BEQL 20$ - BR. IF NOTHING TO UNLOCK 1084 MOVZWL IRPE$W BOFFl(R5),R2 GET BYTE OFFSET IN PAGE 1085 MOVL IRPE$L-BCNT1(R5),R1 GET SIZE OF AREA 1086 BSBB UNLK - UNLOCK FIRST AREA 1087 1088 20$: MOVL IRPE$L SVAPTE2(R5) ,R3 . ; GET SVAPTE OF SECOND AREA 1089 BEQL 30$ - BR. IF NOTHING TO UNLOCK 1090 MOVZWL IRPE$W BOFF2(R5),R2 GET BYTE OFFSET IN PAGE 1091 MOVL IRPE$L-BCNT2(R5),R1 GET SIZE OF AREA 1092 BSBB UNLK - UNLOCK SECOND AREA 1093 1094 30$: BBS #IRPE$V EXTEND,IRPE$W STS(R5) ,10$ ; BR. IF THERE'S ANOTHER IRPE 1095 POPL R5 - ; RESTORE R5 1096 RSB 1097 1098 1099 LOCAL SUBROUTINE TO UNLOCK PAGES 1100 1101 Rl = BYTE COUNT (OR SIZE OF AREA) 1102 1103 = R2 = BYTE OFFSET IN PAGE R3 SVAPTE OF START OF AREA 1104 1105 1106 UNLK: MOVAB 511 (Rl) lR2J ,Rl COMBINE OFFSET AND SIZE AND ROUND 1107 ASHL #-VA$S BYTE,Rl ,Rl CONVERT TO NUMBER OF PAGES TO UNLOCK 1108 1109 BSBW RSB MMG$UNLOCK UNLOCK PAGES IOCIOPOST V03-024 - I/O COMPLETION POSTING UNLOCK AREAS IN IRPE'S 07A3 07A3 07A3 1110 1111 1112 .END 3-JUN-1984 11:26:47 VAX-11 Macro V03-01 Page 32 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST(11) IOCIOPOST Symbol table ACB$B RMOD ACB$L-KAST ACB$L-PID AC8$M-KAST AC8$V-QUOTA ACCV IO AQB$L ACPPID BRW QNXTSEG BUFIO BUFPOST BUG$ NONEXSTACP 8UG$-NOTFCPWC8 CA$ MEASURE CCB$L DIRP CCB$W-IOC CHECK-ERASE CLEANUP ERASE CTL$GL CC8BASE CTL$GL-PHD CXB$L LINK CXB$W-LENGTH DC$ DISK DEV$V FOO oEv$v:=soo DIR IO DIRPOST EVT$ COLPGA EVT$-PFCOM EXE$DEANONPAGED EXE$GL ERASEPPT EXE$! NS ER TI RP EXE$INSIOQ EXE$PROBEW EXE$QXQPPKT I0$V ERASE IO$ DSE 10$-WRITELBLK I0$-WRITEP8LK I 0$-WR ITEVBLK IOC$8UFPOST IOC$CVTLOGPHY I OC$DI RPOSTl IOC$GL PSBL IOC$GL-PSFL IOC$IOPOST IOC$MAPVBLK IOC$QNXTSEG IOC$QNXTSEG1 IOC$QTOACP IOC$WAKACP IOPOST I PL$ IOPOST IPL$-SYNCH IRP$B EFN IRP$8-RMOD IRP$C-LENGTH IRP$L-ABCNT - I/O COMPLETION POSTING = OOOOOOOB = = 00000018 oooooooc = = 00000080 00000006 00000760 R 02 = oooooooc OOOOOOBE R 02 0000011( R 02 00000566 R 02 ******** x 02 = ******** 00000002 x 02 = oooooooc = OOOOOOOA 00000710 R 02 000006F5 R 02 ******** x 02 = ******** 00000010 x 02 = oooooooc = 00000001 = OOOOOOOE = 00000005 00000064 R 02 00000648 R 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 = ******** OOOOOOOA x 02 = 00000015 = 00000020 = 00000008 = 00000030 00000122 RG 02 ******** x 02 000006A6 RG 02 ******** x 02 ******** x 02 00000004 RG 02 ******** x 02 0000046F RG 02 00000478 RG 02 00000507 .R 02 00000518 RG 02 00000000 R 02 = 00000004 = 00000008 = 00000022 = 00000008 = OOOOOOC4 = 00000040 3-JUN-1984 11: 26:47 VAX-11 Macro V03-01 Page 33 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST(11) IRP$L AST IRP$L-ASTPRM IRP$L-8CNT IRP$L-DIAG8UF IRP$L-EXTEND IRP$L-FQFL IRP$L-I OSB IRP$L-IOST1 IRP$L -IOST2 IRP$L-KEVDESC IRP$L-OBCNT IRP$L-PID IRP$L-SEGVBN IRP$L -SVAPTE IRP$L-UCB IRP$L-WIND IRP$M-PAGIO IRP$M-SWAPIO IRP$M-VIRTUAL IRP$S-FCODE IRP$V-BUFIO IRP$V-CHAINED IRP$V-COMPLX IRP$V-DIAGBUF IRP$V-EXTEND IRP$V-FCODE IRP$V-FILACP IRP$V-FUNC IRP$V-KEV IRP$V-MBXIO IRP$V-PAGIO IRP$V-PHVSIO IRP$V-SWAPIO I RP$V-TERMIO IRP$V-VIRTUAL IRP$W-BOFF IRP$W-CHAN IRP$W-FUNC IRP$W-SIZE IRP$W-STS IRPE$L BCNTl IRPE$L-BCNT2 I R P E $ L -EXTEND IRPE$L-SVAPTE1 IRPE$L-SVAPTE2 IRPE$V-EXTEND IRPE$W-BOFF 1 IRPE$W-80FF2 IRPE$W-STS JIB$L BYTCNT MMG$DECPHDREF1 MMG$GL MAXPFN MMG$GL-SYSPHD MMG$INSPFNT MMG$REFCNTNEG MMG$RELPFN MMG$SUBSECREF = 00000010 = 00000014 = 00000032 = 0000004C = 00000054 = 00000060 = 00000024 = 00000038 = 0000003C = 0000005C = 00000044 = oooooooc = 00000048 = 0000002C = OOOOOOlC = 00000018 = 00000004 = 00000040 = 00000010 = 00000006 = 00000000 = 00000005 = 00000003 = 00000007 = OOOOOOOB = 00000000 = oooooooc = 00000001 = OOOOOOOF = 000000.0A = 00000002 = 00000008 = 00000006 = 00000009 = 00000004 = 00000030 = 00000028 = 00000020 = 00000008 = 0000002A = 00000034 = 00000040 = 00000054 = 0000002C = 00000038 = 00000008 = 00000030 = 0000003C = 0000002A = 00000020 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 IOCIOPOST Symbol table MMG$UNLOCK MMG$UPDSECAST MOVBUF NOTACP NOTFCPWCB PAGIO PAGIO DONE PAGIO-DONE 1 PAGIO-DONE2 PAGIO-ERR PAGIO-ERR DONE PAGIO-KAST PAGIO-OR SWAPIO PAGRO-DONE PAGRD-ERR PAGWRT ERR PAGWRT-ERR1 PAGWRT-ERR DONE. PCB$L JIB PCB$L-PHD PCB$W-BIOCNT PCB$W-DIOCNT PFN$AB STATE PFN$AB-TVPE PFN$AL-BAK PFN$AW-REFCNT PFN$AW-SWPVBN PFN$C ACTIVE PFN$C-BADPAGLST PFN$C-PPGTBL PFN$C-RDERR PFN$M-COLLI SION PFN$M-DELCON PFN$M-PAGTVP PFN$V-COLLI S ION PFN$V-GBLBAK PFN$V-MODIFV PFN IO DONE PHD$L DIOCNT PHD$W-PHVINDEX PMS$END RQ PMS$GL DIRIO PMS$GL -SPLIT PMS$START_RQ PR$ IPL PR$-SIRR PRI$ IOCOM PRI$-NULL PRI$-TICOM PRI$-TOCOM PRITBL PTE$M OWN PTE$M-PROT PTE$S-PFN PTE$V-PFN PTE$V-VALID QNXTSEG - I/O COMPLETION POSTING ******** x 02 ******** x 02 00000743 R 02 00000120 R 02 00000562 R 02 00000188 R 02 00000218 R 02 00000239 R 02 00000240 R 02 000002E3 R 02 00000268 R 02 00000277 R 02 OOOOOOCl R 02 00000106 R 02 00000297 R 02 00000103 R 02 00000326 R 02 000001CF R 02 = 00000080 = = = 0000006C 0000003A 0000003E ******** x 02 ******** x 02 ******** x 02 ******** x 02 = = = = ******** 00000007 00000002 00000004 00000004 x 02 = 00000010 = = = = = 00000010 00000007 00000004 00000017 00000007 00000378 R 02 = 00000054 = 00000042 ******** x 02 ******** x 02 ******** x 02 = ******** 00000012 x 02 = = 00000014 00000001 = = 000000.00 00000004 = 00000003 = = 00000000 01800000 78000000 R 02 = = = 00000015 00000000 OOOOOOlF 00000408 R 02 3-JUN-1984 11:26:47 VAX-11 Macro V03-0l Page 34 24-APR-1982 15:46:59 DISK$VMSMASTER:[SVS.SRC]IOCIOPOST(ll) RSN$ ASTWAIT RSN$-MAILBOX SCH$GL PCBVEC SCH$GQ-COLPGWQ SCH$POSTEF SCH$QAST SCH$RAVAIL SCH$RSE SCH$WAKE SS$ ACCVIO SS$-ILLBLKNUM SS$-INCSEGTRA TMP~ .. UCB$B DEVCLASS UCB$L-DEVCHAR UCB$L-MAXBCNT UCB$L-MAXBLOCK UCB$L-VCB UCB$W=QLEN UNLK UNLOCK UNLOCK MORE VA$M BYTE VA$S-BYTE VA$V-VPN VCB$L AQB VIRTUAL LOGIO WCB$B ACCESS WCB$V-NOTFCP WQH$W=WQCNT XQP = = 00000001 00000002 ******** x 02 ******** ******** ******** ******** ******** = ******** oooooooc = = = = = = = OOOOOODC 00002234 00000000 00000040 00000038 00000084 00000060 = = 00000034 0000006A x 02 x 02 x 02 x 02 x 02 x· 02 00000794 R 02 00000091 R 02 == 00000765 R 000001FF = 00000009 00000009 02 = 00000010 = = = 000003AC 00000008 00000002 00000008 R 02 00000542 R 02 IOCIOPOST Psect synopsis - I/O COMPLETION POSTING 3-JUN-1984 11 :26:47 VAX-11 Macro V03-0l Page 35 24-APR-1982 15:46:59 DISK$VMSMASTER:[SYS.SRC]IOCIOPOST(ll) Psect synopsis PSECT name ·ABS $ABS$ $AEXENONPAGED Allocation PSECT No. Attributes 00000000 00000000 000007A3 0. ) 00 0. ) 01 1955.) 02 0. ) NOP IC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE 1. ) NOP IC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE 2. ) NOPIC USR CON REL LCL NOSHR EXE RD WRT NOVEC LONG Performance indicators + Phase Ini~ialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals Page faults 9 74 568 0 250 23 3 0 930 CPU Time ----- 00:00:00.09 00:00:00.57 00:00:27.01 00:00:03.89 00:00:07.44 00:00:00.20 00:00:00.03 00:00:00.00 00:00:39.24 Elapsed Time ----------- 00:00:02.62 00:00:04.90 00:01:48.68 00:00:13.26 00:00:51 .36 00:00:00.73 00:00:00.20 00:00:00.00 00:03:01 .76 The working set limit was 1950 pages. 141145 bytes (276 pages) of virtual memory were used to buffer the intermediate There were 130 pages of symbol table space allocated to hold 2474 non-local and 1388 source lines were read in Pass 1, producing 20 object records in Pass 2. 41 pages of virtual memory were used to define 40 macros. code. 100 local symbols. Macro library statistics Macro library name Macros defined $255$DUA28:[SYS.OBJJLIB.MLB;1 28 $255$DUA28:[SYSLIB]STARLET.MLB;2 9 TOTALS (all libraries) 37 2625 GETS were required to define 37 macros. There were no errors, warnings or information messages. MACRO/LIS=LIS$:IOCIOPOST/OBJ=OBJ$:IOCIOPQST MSRC$:IOCIOPOST/UPDATE=(ENH$:IOCIOPOST)+EXECML$/LIB COMDRVSUB COMDRVSUB Table of contents (2) (3) (4) (5) (6) (7) (8) (9) ( 10) ( 11 ) 93 131 174 204 249 332.6 413 465 602 691 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-0l COM$DELATTNAST - DELIVER ATTENTION ASTS COM$FLUSHATTNS - FLUSH ATTENTION AST LIST COM$POST - POST I.O COMPLETION INDEPENDENT OF UNIT STATUS COM$DRVDEA~MEM - DEALLOCATE DRIVER MEMORY COM$SETATTNAST - SET UP ATTENTION AST COM$DELCTRLAST - DELIVER CONTROL ASTS COM$FLUSHCTRLS - FLUSH CONTROL AST LIST COM$SETCTRLAST - SET UP CONTROL AST COM$BLDCTRLAST - BUILD CONTROL AST COM$FILLCTRLAST - FILLIN A CONTROL AST CONTROL BLOCK Page 0 COMDRVSUB V03-007 ;MHB0137 -1 ;MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 RKS006 RKS006 RKS006 ;DWT0157 ;DWT0157 ;DWT0157 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-0l Page 1 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 ODDO 0000 0000 0000 0000 0000 0000 0000 0000 .TITLE COMDRVSUB - COMMUNUCATION DRIVERS SUBROUTINES 1 .IDENT 'V03-007' 3 4 ;**************************************************************************** 5 ;* * 6 ;* 7 ;* 8 ;* COPYRIGHT (c) 1978, 1980, 1982 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. ALL RIGHTS RESERVED. * * * 9 ;* 10 ;* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * * 11 ;* ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * 12 ;* INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * 13 ;* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * 14 ;* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * 15 ;* TRANSFERRED. * 16 ; * 17 ;* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE 18 ;* AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * * * 19 ;* CORPORATION. * 20 ;* 21 ;* DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS * * 22 ;* SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * 23 ; * * 24 ; * * 25 ;**************************************************************************** 26 27 ;++ 28 FACILITY: 29 30 VAX/VMS I/O DRIVERS 31 32 ABSTRACT: 33 34 THIS MODULE CONTAINS SUBROUTINES FOR THE TERMINAL,MAILBOX AND DMC11 DRIVERS. 35 36 AUTHOR: 37 38 R.HEINEN 8-SEPT~1977 39 40 REVISION HISTORY: 41 . 1 V03-007 MHB0137 Mark Bramhal 1 12-Apr-1984 . 2 Define minimum deal locatable block size as FKB$C LENGTH . . 3 Restore stacked register after BADDALRQSZ bug check. .4 .5 V03-006 RKS006 RICK SPITZ 2-MAR-1984 .6 Make sure that TAST is removed from UCB queue when .7 TAST replaced and currently busy. . 8 .9 V03-005 DWT0157 David W. Thiel 30-DEC-1983 . 10 Modify COM$DRVDEALMEM to avoid unnecessary forks . . 11 . 12 V03-004 JLV0272 Jake VanNoy 14-JUN-1983 . 13 Add abort 1/0 flag to out of band logic. Also . 14 add new entry points for checking PIDs to qualify . 15 AST delivery . . 16 COMDRVSUB V03-007 ;RKS0003 ;RKS0003 ;RKS0003 ;RKS0003 ;RKS0003 ;KDM0002 ;KDM0002 -20 ;MHB0137 ;KDMD002 ;KDM0002 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-0l Page 2 24-APR-1982 15:46:24 DISK$VMSMASTER: [SYS.SRC]COMDRVSUB.(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 00000000 0000 00000004 0000 00000008 0000 oooooooc 0000 00000010 0000 00000014 0000 0000 00000000 . 17 V03-003 RKS0003 RICK SPITZ 23-SEP-1982 . 18 INSURE THAT TAST IS NOT BUSY WHEN A REPLACE CURRENT . 19 BLOCK OPERATION OCCURS. IF SO, FLAG THE CURRENT BLOCK .20 FOR DELETE AND BUILD A NEW BLOCK. . 21 .22 V03-002 KDM0002 Kathleen D. Morse 28-Jun-1982 .23 Added $IODEF and $SSDEF. 62 63 64 65 66 EXTERNAL SYMBOLS 67 68 $ACBDEF 69 $CCBDEF 70 $DYNDEF .1 $FKBDEF . 2 $IODEF 71 $IPLDEF 72 $IRPDEF 73 $PCBDEF 74 $PRDEF 75 $PRIDEF 76 $PRVDEF 77 $PSLDEF 78 $RSNDEF .1 $SSDEF 79 $TASTDEF 80 $UCBDEF 81 82 LOCAL DEFINITIONS DEFINE AST CONTROL BLOCK DEFINE CCB DEFINE DYNAMIC MEMORY BLOCKS DEFINE FORK BLOCK DEFINE 1/0 FUNCTION CODES DEFINE IPL LEVELS DEFINE I/O PACKET DEFINE PCB DEFINE PROCESSOR REGISTERS DEFINE NEW PRIORITIES DEFINE PRIVELEGE BITS DEFINE PSL DEFINE RESOURCES DEFINE SYSTEM STATUS CODES DEFINE TERMINAL AST BLOCK DEFINE UCB 83 ' 84 Pl= 0 85 P2= 4 86 P3= 8 87 P4= 12 88 P5= 16 89 P6= 20 90 91 .PSECT WIONONPAGED COMDRVSUB V03-007 ;JLV0272 ;JLV0272 -1 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV02"!2 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 -4 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-0l Page 3 COM$DELATTNAST - DELIVER ATTENTION ASTS 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB.(2) OOF8 BF 56 04 OOFB BF 57 54 55 67 36 56 OB 56 24 A5 05 57 55 EC 67 65 E6 AF 10 A5 18 A5 OB A5 20 A5 QC A5 24 A5 18 AS 52 01 OOOOOOOO'GF 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 BB 0000 04 0004 11 0006 0008 0008 BB 0008 oooc DO oooc OOOF DO OOOF 13 0012 D5 0014 13 0016 D1 0018 13 001C OOlE 001E OOlE DO 001E 11 0021 0023 0023 0023 DO 0023 9F 0026 0029 002F 002F 002F 70 002F 90 0034 DO 0039 D4 003E 9A 0041 17 0044 93 .SBTTL COM$DELATTNAST - DELIVER ATTENTION ASTS 94 ;++ . 1 COM$DELATTNAST - DELIVER ATTENION ASTS . 2 COM$DELATTNASTP - DELIVER ATTENION ASTS BY PIO 96 97 FUNCTIONAL DESCRIPTION: 98 99 THIS ROUTINE IS USED BY THE TERMINAL AND MAILBOX DRIVERS TO DELIVER 100 ALL OF THE ASTS AWAITING ATTENTION. THE CONTROL BLOCKS ARE USED AS FORK BLOCKS 101 TO IPL$_QUEUEAST. 102 103 INPUTS: 104 105 = R4 ADDRESS OF LIST HEAD OF AST CONTROL BLOCKS 106 .1 = R5 = UCB OF UNIT R6 ACTIVE PIO (AT ENTRY POINT COM$DELATTNASTP) 107 108 OUTPUTS: 109 110 R2,R3,R4,R5 ARE PRESERVED. 111 112 COM$DELATTNAST:: DELIVER ATTENTION ASTS .1 PUSHR #AM<R3,R4,R5,R6,R7> SAVE . 2 CLRL R6 CLEAR SO ALL ASTs WILL BE DELIVERED .3 BRB ATTN2 continue .4 .5 COM$DELATTNASTP:: DELIVER ATTENTION ASTS BY PIO .6 PUSHR #AM<R3,R4,R5,R6,R7> SAVE .7 ATTN2: · 8 MOVL R4,R7 R7 WILL TRACK LIST .9 . 10 10$: MOVL (R7) ,R5 GET NEXT ENTRY .11 BEQL 50$ IF EQL THEN NONE . 12 TSTL R6 CHECKING PIDS? . 13 BEQL 30$ NOT IF ZERO .14 CMPL ACB$L KAST+12(R5),R6 COMPARE PIDS . 15 BEQL 30$ EQUAL, DELIVER AST . 16 . 17 ; PIDS NOT EQUAL, SKIP THIS ENTRY AND LEAVE IT IN QUEUE . 18 ; . 19 MOVL R5,R7 NEXT .20 BRB 10$ LOOP . 21 .22 ; DELIVER AST AND CLOSE UP LIST .23 .24 30$: MOVL (R5),(R7) CLOSE LI ST 117 PUSHAB BA10$ SET UP RETURN ADDRESS 118 FORK CREATE FORK PROCESS 119 120 AST QUEUE FORK PROCESS 121 122 MOVQ ACB$L KAST(R5),ACB$L AST(R5); REARRANGE ENTRIES 123 MOVB ACB$L-KAST+8(R5),ACB$B RMOD(R5); 124 MOVL ACB$L-KAST+l2(R5) ,ACB$L PID(R5); 125 CLRL ACB$L-KAST(R5) - 126 MOVZBL #PRI$-IOCOM,R2 SET UP PRIORITY INCREMENT 127 JMP GASCH$QA$T QUEUE THE AST COMDRVSUB V03-007 ;JLV0272 -1 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 4 COM$DELATTNAST - DELIVER ATTENTION ASTS 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB.(2) OOF8 SF BA 004A 05 004E .1 50$: 129 POPR RSB #AM<R3,R4,R5,R6,R7> COMDRVSUB V03-007 COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-0l Page 5 COM$FLUSHATTNS - FLUSH ATTENTION AST LIS 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB.(3) 50 67 1 F 24 AO 60 A4 13 22 AO 56 OD 67 60 38 A4 1 c DA 57 50 DC 50 01 004F 004F 004F 004F 004F 004F 004F 004F 004F 004F 004F 004F 004F 004F 004f 004F 004F 004F 004F 004F 004F 004F 004F 004F 004F 004F DO 0056 13 0059 01 0058 12 0060 Bl 0062 12 0066 DO 0068 0068 86 006E 10 0071 11 0073 DO 0075 11 0078 007A 9A 0070 05 0080 131 .SBTTL COM$FLUSHATTNS - FLUSH ATTENTION AST LIST 132 ;++ 133 j COM$FLUSHATTNS - FLUNS ATTENTION AST LIST 134 ; 135 j THIS ROUTINE IS USED BY THE TERMINAL AND MAILBOX DRIVERS TO FLUSH 136 ; AN ATTENTION AST LIST. THIS IS DONE AT CANCEL I/O TIME AND WHEN A 137 ; QIO SPECIFIES A 0 AST ADDRESS ON A SET ATTENTION AST FUNCTION. 138 ; IF THE AST CONTROL BLOCK OWNER IS NO LONGER IN THE SYSTEM THE AST IS ALSO 139 j FLUSHED. 140 141 142 ; INPUTS: 143 144 ; 145 ; 146 ; 147 j = R4 PCB ADDRESS = R5 UCB ADDRESS OF RELATED UNIT = R6 CHANNEL NUMBER = R7 LI ST HEAD 148 ; 149 j OUTPUTS: 150 j 151 ; = RO SS$ NORMAL 152 ; Rl ,R2,R7-ARE DISTROVED. 153 154 155 COM$FLUSHATTNS:: ; FLUSH ATTENTION AST LIST 156 DSBINT UCB$B DIPL(R5) ; DISABLE INTERRUPTS 157 10$: MOVL (R7) ,RO ; GET LI ST ENTRY 158 BEQL 50$ IF EQL THEN DONE 159 CMPL PCB$L PID(R4),ACB$L_KAST+12(RO); PIO MATCH? 160 BNEQ 40$ ; IF NEQ THEN NO 161 CMPW R6,ACB$L_KAST+lO(RO) ; CHANNEL MATCH? 162 BNEQ 40$ ; IF NEQ THEN NO 163 MOVL (RO),(R7) j CLOSE UP LIST TO REMOVE ENTRY 164 ENBINT ; REENABLE INTERRUPTS 165 INCW PCB$W ASTCNT(R4) ; RESTORE AST QUOTA 166 BSBB COM$DRVDEALMEM ; DEALLOCATE THE BLOCK 167 BRB COM$FLUSHATTNS ; CONTINUE 168 40$: MOVL RO,R7 ; LOOK TO NEXT ENTRY 169 BRB 10$ ; CONTINUE 170 50$: ENBINT ; REENABLE INTERRUPTS 171 MOVZBL #SS$_NORMAL,RO : SET NORMAL RETURN 172 RSB COMDRVSUB V03-007 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 6 COM$POST - POST I.O COMPLETION INDEPENDE 24-APR-1982 15:46:24 DISK$VMSMASTER: [SVS.SRC]COMDRVSUB.(4) 70 A5 63 OOOOOOOO'FF 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 0081 D6 0081 OE 0084 0086 DOBB 05 DOSE 174 .SBTTL COM$POST - POST I.O COMPLETION INDEPENDENT OF UNIT STATUS 175 ;++ 176 COM$POST - POST I/0 COMPLETION INDEPENDENT OF UNIT STATUS 177 178 FUNCTIONAL DESCRIPTION: 179 180 THIS ROUTINE IS USED BV THE TERMINAL, MAILBOX AND D~C DRIVER TO COMPLETE 181 I/O OPERATIONS INDEPENDENT OF THE STATUS OF THE UNIT. NO ATTEMPT IS MADE 182 TO DE-QUEUE ANOTHER PACKET OR CHANGE THE BUSY STATUS OF THE UNIT. 183 184 INPUTS: 185 186 R3 = I/O PACKET ADDRESS 187 R5 = UCB ADDRESS 188 189 IMPLICIT INPUTS: 190 191 CALLER AT DRIVER FORK IPL OR GREATER. 192 IRP$L_MEDIA AND IRP$L_MEDIA+4 ARE THE IOSB QUAD WORD. 193 194 OUTPUTS: 195 196 RO,Rl ARE DISTROYED. 197 198 COM$POST:: COMPLETE I/O 199 INCL UCB$L OPCNT ( R5) INCREMENT OPERATION COUNT 200 INSQUE (R3),@IOC$GL_PSBL INSERT PACKET ON QUEUE 201 SOFTINT #IPL$ IOPOST 202 RSB REQUEST FORK RETURN COMDRVSUB V03-007 MHB0137 MHB0137 MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 ; MHBO 1~7 ;MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 ;MHB0137 -4 MHB0137 MHB0137 MHB0137 MHB0137 MHB0137 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 7 COM$DRVDEALMEM - DEALLOCATE DRIVER MEMOR 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB.(5) 53 DD 08 53 D1 OB 14 07 BB OOOOOOOO'GF 16 OF BA 05 08 AO 18 B1 25 1A 7E 54 7D BO 0608 BF OA AO 55 50 DO C8'AF 9F OOOOOOOO'GF 16 50 55 DO OOOOOOOO'GF 17 54 SE 7D 53 BEDO 05 OOBF OOBF 008F OOSF OOSF 008F OOSF 008F OOSF OOSF OOBF 008F OOBF OOBF OOBF OOSF OOSF 008F 008F OOBF 008F OOSF OOSF OOBF OOBF OOBF OOBF OOBF 0091 0094 0097 0099 009B OOA1 OOA3 OOA4 OOA4 OOAB OOAA OOAD OOAE OOAE 0081 OOB3 OOB3 OOB6 OOB9 OOBF OOBF OOBF OOBF OOC2 OOC8 OOCB OOCE OOCF OOCF 204 .SBTTL COM$DRVDEALMEM - DEALLOCATE DRIVER MEMORY 205 ;++ 206 COM$DRVDEALMEM - DEALLOCATE DRIVER MEMORY 207 208 FUNCTIONAL DESCRIPTION: 209 210 THIS ROUTINE IS USED BY DRIVERS TO DEALLOCATE SYSTEM DYNAMIC MEMORY. 211 212 IT CAN BE CALLED AT ANY IPL. 213 214 INPUTS: 215 216 RO = ADDRESS OF THE BLOCK TO DEALLOCATE 217 218 ;' ****************************************************** 219 .1 THE BUFFER MUST BE AT LEAST "FKB$C LENGTH" BYTES LONG . 2 IF A FORK IS REQUIRED. THIS IS BECAUSE WE TURN THE .3 BUFFER INTO A FORK BLOCK FOR THE DELAYED DEALLOCATION. 221 ; 222 ;****************************************************** 223 224 OUTPUTS: 225 226 RO-R5 ARE PRESERVED. 227 228 COM$DRVDEALMEM: : DEALLOCATE DRIVER MEMORY · 1 PUSHL R3 SAVE A REGISTER .2 SAVIPL R3 FETCH CURRENT IPL LEVEL . 3 CMPL R3,#IPL$ SYNCH COMPARE CURRENT IPL TO SYNCH .4 BGTR 10$ BRANCH IF IPL LEVEL > SYNCH . 5 PUSHR #AM<RO,Rl ,R2> SAVE MORE REGISTERS .6 JSB GAEXE$DEANONPAGED DEALLOCATE MEMORY . 7 POPR #AM<RO,Rl ,R2,R3> RESTORE REGISTERS . 8 RSB RETURN, ALL REGISTERS PRESERVED .9 . 10 10$: CMPW #FKB$C LENGTH,FKB$W SIZE(RO) ; BIG ENOUGH FOR A FORK BLOCK? . 11 BGTRU 30$ - - ; IF GTRU THEN NO - ERROR . 12 MOVQ R4,-(SP) ; SAVE FORKING REGS . 13 MOVW #<DYN$C FRK!- ; INSERT STRUCTURE TYPE . 14 <IPL$ QUEUEAST@8>>,- ; AND PROPER IPL . 15 FKB$B-TYPE(RO) ; FOR THIS TO BE A FORK BLOCK . 16 ASSUME FKB$B FIPL EQ FKB$B TYPE+l 233 MOVL RO,R5- - COPY ADDRESS 234 PUSHAB BA20$ SET UP RETURN ADDRESS 235 JSB GAEXE$FORK CREATE FORK 236 237 IPL$ QUEUEAST FORK ROUTINE 238 239 MOVL R5,RO DEALLOCATE THE BLOCK 240 JMP GAEXE$DEANONPAGED .1 20$: MOVQ (SP)+,R4 RESTORE REGISTERS . 2 25$: POPL R3 RESTORE R3 . 3 RSB .4 . 5 BUGCHECK ON TOO SMALL A BUFFER COMDRVSUB V03-007 MHB0137 MHB0137 MHB0137 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 8 COM$DRVDEALMEM - DEALLOCATE DRIVER MEMOR 24-APR-1982 15:46:24 DISK$VMSMASTER:[SVS.SRC]COMDRVSUB.(5) OOCF OOCF F6 11 OOD3 .6 ' .7 30$: .8 BUG CHECK BADDALRQSZ BRB- 25$ BUGCHECK CONTINUE COMDRVSUB V03-007 ;OWT0157 -1 - COMMUNUCATION DRIVERS SUBROUTINES COM$SETATTNAST - SEi UP ATTENTION AST 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 9 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB.(6) 56 28 A3 58 6C 5B OOD5 OOD5 OOD5 OOD5 0005 OOD5 OOD5 0005 0005 OOD5 OOD5 0005 0005 OOD5 0005 0005 0005 0005 OOD5 0005 OOD5 0005 OOD5 OOD5 0005 0005 0005 OOD5 OOD5 OOD5 OOD5 OOD5 OOD5 OOD5 0005 OOD5 0005 OOD5 OOD5 OOD5 OOD5 OOD5 OOD5 OOD5 OOD5 OOD5 OOD5 0005 OOD5 3C 0005. DO OOD9 13 OODC DODE OODE DODE OODE OODE 249 .SBTTL COM$SETATTNAST - SET UP ATTENTION AST 250 ;++ 251 COM$SETATTNAST - SET UP ATTENTION AST 252 253 FUNCTIONAL DESCRIPTION: 254 255 THIS ROUTINE IS A SUBROUTINE USED BY THE TERMINAL AND MAILBOX DRIVERS 256 257 = TO PROCESS REQUESTS FOR ENABLE OR DISABLE OF ATTENTION ASTS. Pl IS THE ADDRESS OF THE AST SERVICE FOR ENABLES. Pl 0 FOR DISABLE. 258 FOR DISABLES, THE SPECIFIED LIST IS SEARCHED AND THE ENTRY EXTRACTED AND 259 DEALLOCATED. 260 FOR ENABLES, A CONTROL BLOCK IS SET UP THAT WILL DOUBLE AS THE AST CONTROL 261 BLOCK WHEN THE AST IS DELIVERED. THE BLOCK IS FORMATTED AS FOLLOWS: 262 263 = ACB$B RMOD IPR$ QUEUEAST 264 ACB$L-KAST = AST PC 265 ACB$L-KAST+4 = AST PARAMETER (P2) 266 ACB$L-KAST+8 = ACCESS MODE OF REQUEST 267 ACB$L-KAST+10 = CHANNEL NUMBER 268 ACB$L-KAST+12 = PID OF REQUEST 269 270 THE NEW BLOCK IS PLACED AT THE HEAD OF THE CURRENT LIST. 271 272 IN BOTH CASES THE I/O IS COMPLETED. 273 274 INPUTS: 275 276 277 = R3 = I/O PACKET ADDRESS R4 CURRENT PCB 278 279 = R5 = UCB ADDRESS R6 ASSIGNED CCB 280 R7 = ADDRESS OF THE CONTROL AST LIST HEAD TO CHANGE 281 AP = ADDRESS OF THE QIO ARGLIST 282 283 OUTPUTS: 284 285 RO = STATUS OF THE I/O 286 287 R3 R5 = = PACKET ADDRESS UCB ADDRESS 288 289 NO OTHER REGISTERS ARE PRESERVED. 290 291 COMPLETION CODES: 292 293 SS$ NORMAL 294 SS$-EXQUOTA BUFFERED I/O OR AST QUOTA FAILURE 295 SS$=INSUFMEM DYNAMIC MEMORY FAILURE 296 297 COM$SETATTNAST:: SET UP ATTENTION AST 298 MOVZWL IRP$W CHAN(R3),R6' GET PACKET CHANNEL NUMBER 299 MOVL P1(AP),R8 GET USER AST ADDRESS .1 BEQL 10$ IF EQL THEN DISABLE FUNCTION 301 302 REQUEST TO ENABLE AST 303 304 SET UP AST BLOCK 305 COMDRVSUB V03-007 DWT0157 DWT0157 DWTOl 57 DWT0157 - COMMUNUCATION DRIVERS SUBROUTINES COM$SETATTNAST - SET UP ATTENTION AST 3-JUN-1984 10:56:56 VAX-11 Macro V03-0l Page 10 24-APR-1982 15:46:24 DISK$VMSMASTER:[SVS.SRC]COMDRVSUB.(6) 50 lC 3C 38 A4 85 56 15 38 A4 87 51 28 9A 53 DD OOOOOOOO'GF 16 53 8EDO 42 50 E9 OB A2 06 90 18 A2 58 DO lC A2 04 AC DO 02 00 EF 50 08 AC OOOOOOOO'GF 16 20 A2 50 9A 20 A2 40 SF 88 22 A2 56 BO 24 A2 60 A4 DO 62 67 DO 67 52 DO 50 01 9A 05 FF13 31 OOOOOOOO'GF 17 OODE OOEl OOE4 OOE6 OOE9 OOEC ODEE OOF4 OOF7 OOFA OOFE 0102 0107 OlOA 010D 0113 0117 OllC 0120 0125 0125 0125 0125 012C 012F 0132 0135 0138 0139 0139 013C 013C 306 MOVZWL #SS$ EXQUOTA,RO ; ASSUME AST QUOTA EXCEEDED 307 TSTW PCB$W_ASTCNT(R4) ; AST QUOTA ALLOW CONTINUE? 308 BLEQ 20$ IF LEQ THEN NO 309 DECW PCB$W ASTCNT(R4) ; ADJUST QUOTA 310 MOVZBL #ACB$L_KAST+16,Rl ; SET SIZE OF NEEDED BLOCK 311 PUSHL R3 ; SAVE PACKET ADDRESS 312 JSB G.AEXE$ALLOCBUF ALLOCATE THE BUFFERED BLOCK 313 POPL R3 ; RESTORE PACKET ADDRESS 314 BLBC R0,20$ ; IF LOW SET THEN ALLOCATED 315 MOVB #IPL$ QUEUEAST,ACB$B RMOD(R2); INSERT FORK IPL 316 MOVL R8,ACB$L KAST(R2) - ; INSERT AST ROUTINE ADDRESS 317 318 MOVL EXTZV P2(AP),ACB$L KAST+4(R2) #0,#2,P3(AP)-:-Ro ; ' INSERT PARAMETER FOR AST GET REQUEST ACCESS MODE 319 JSB GAEXE$MAXACMODE ; MAXIMIZE ACCESS MODE 320 MOVZBL RO,ACB$L KAST+8(R2) ; INSERT IN CONTROL BLOCK 321 BISB #ACB$M QUOTA,ACB$L KAST+B(R2); INSERT TARGET ACCESS MODE 322 MOVW R6,ACBiL KAST+lO(R~) ; SAVE CHANNEL 323 MOVL PCB$L~PID(R4),ACB$L_KAST+12(R2); INSERT PIO ADDRESS OF REQUESTOR 324 325 LOCK OUT INTERRUPTS TO ENTER BLOCK ON UCB 326 327 DSBINT UCB$B DIPL(R5) ; LOCK OUT INTERRUPTS 328 MOVL (R7) ,(R2) ; MERGE WITH CURRENT ENTRY 329 MOVL R2,(R7) ; INSERT NEW ENTRY VALUE 330 ENBINT ; LOWER IPL 331 MOVZBL #SS$_NORMAL,RO ; SET NORMAL RETURN 332 RSB ; RETURN VIA CALLER .1 .2 10$: BRW COM$FLUSHATTNS ; DI SABLE FUN CTI ON . 3 .4 20$: JMP GAEXE$ABORTIO : ABORT THE I/O COMDRVSUB V03-007 DWT0157 DWT0157 JLV0272 JLV0272 5 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ~J·JLLVV00227722 ;JLV0272 ;JLV0272 ~L ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 - COMMUNUCATION DRIVERS SUBROUTINES COM$DELCTRLAST - DELIVER CONTROL ASTS 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 11 24-APR-1982 15:46:24 DISK$VMSMASTER: [SYS.SRC]COMDRVSUB.(7) 006C SF 56 04 006C SF 52 51 54 51 61 69 55 51 lC 30 A5 04 AE 56 06 56 28 A5 E7 05 OB 2D A5 52 04 AE 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 0142 BB 0142 04 0146 11 0148 014A 014A BB 014A 014E 04 014E DO 0150 0153 DO 0153 13 0156 C3 0158 E1 015C F 1 0161 0162 0162 0162 D5 0162 13 0164 01 0166 12 016A 016C 016C 016C 016C E1 016C 016E 9A 0171 .6 .SBTTL COM$DELCTRLAST - DELIVER CONTROL ASTS . 7 ;++ . 8 ;COM$DELCTRLAST - DELIVER CONTROL ASTS .9 ;COM$DELCTRLASTP - DELIVER CONTROL ASTS AND CHECK PIDS 338 339 FUNCTIONAL DESCRIPTION: 340 341 THIS ROUTINE IS USED BV THE TERMINAL SERVICES TO DELIVER 342 ALL OF THE ASTS AWAITING ATTENTION WHICH MATCH THE CONDITION. 343 THE AST BLOCK IS NOT DELETED AND IS REUSED. 344 345 INPUTS.: 346 347 R3 = MATCH CHARACTER 348 349 = R4 = ADDRESS OF LIST HEAD OF AST CONTROL BLOCKS RS UCB OF UNIT · 1 R6 = ACTIVE PID (AT ENTRY POINT COM$DELCTRLASTP) . 2 . 3 OUTPUTS: .4 .5 R3 = (low byte) CHARACTER TO INCLUDE IN DATA STREAM OR NULL .6 TAST$V ABO - set to signal driver to abort I/O in progress .7 TAST$V-INC - set to include this character in datastream . 8 .9 Rl ,R4 DESTROYED . 10 . 11 . 12 COM$DELCTRLAST:: DELIVER CONTROL ASTS . 13 PUSHR #AM<R2,R3,R5,R6> SAVE Rl:.GISTERS . 14 CLRL R6 CLEAR SO ALL ASTs WILL BE DELIVERED . 15 BRB CTRL2 continue . 16 . 17 COM$DELCTRLASTP:: DELIVER CONTROL ASTS BV PIO . 18 PUSHR #AM<R2,R3,R5,R6> . 19 CTRL2: 361 CLRL R2 !NIT RETURN CHARACTER 362 MOVL R4,R1 LIST HEAD ADDRESS 363 10$: 364 MOVL (R1),R1 ; ADDRESS FIRST BLOCK 365 BEQL 50$ ; NO MORE 366 SUBL3 #TAST$L FLINK,Rl ,R5 ; ADDRESS START OF BLOCK 367 BBC 4(SP) ,TAST$L~MASK(R5),10$ ; SKIP IF CHARACTER NOT IN MASK · 1 . 2 . 3 .4 .5 . 6 .7 .8 11 $: .9 . 10 .11 . 12 . 13 . 14 Check PIO TSTL BEQL CMPL BNEQ R6 11$ TAST$L PID(R5),R6 10$ - checking pids? Branch it not compare skip it not equal This one matches, check include and abort B' BC MOVZBL #TAST$V ABORT,TAST$B CTRL(R5),12$ 4(SP),R2 BRANCH IF NOT ABORT FETCH CHARACTER COMDRVSUB V03-007 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 -5 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 -11 - COMMUNUCATION DRIVERS SUBROUTINES COM$DELCTRLAST - DELIVER CONTROL ASTS 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 12 24-APR-19B2 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB.(7) 52 4000 SF OD 01 08 2D A5 52 04 AE 00 52 OF 03 C5 20 A5 24 A5 04 AE OB A5 06 B9 AF 10 A5 20 A5 30 2C A5 OB A5 2C A5 QC A5 28 A5 1B A5 CA'AF 52 01 OOOOOOOO'GF 04 AE 52 006C BF 2D A5 OB 15 2D A5 04 50 2B A5 OOOOOOOO'FF40 50 3B AO 50 55 FElB' AB 0175 11 017A 017C E1 017C 017E 9A 01B1 E2 01B5 01B9 E2 01B9 01BB 9A 018E 0193 90 0193 0197 9F 0197 019A OlAO 01AO 01AO 01AO 01AO 7D 01AO BB 01A5 01A7 90 01A9 DO 01AE DE 01B3 9A 01BB 17 01BB 01C1 DO 01C1 BA 01C5 05 01C9 01CA 01CA 01CA 01CA OlCA 01CA 01CA BA 01CA El OlCE 01D3 3C 0103 DO 0107 01DE 86 0 lDF DO 01E2 30 01E5 05 01EB . 15 BISW #TAST$M ABO,R2 SET ABORT . 16 BRB 15$ - . 17 12$: · 1B BBC #TAST$V INCLUDE,- . 19 TAST$B CTRL(R5),15$ SKIP IF STRIP CHARACTER .20 MOVZBL 4(SP) ,R2 CHARACTER NOT STRIPPED . 21 BBSS #TAST$V_INC,R2,15$ MARK CHARACTER PRESENT .22 15$: .23 BBSS #TAST$V BUSY,- .24 TAST$B CTRL(R5),10$ SKIP IF IN USE/ MARK IN USE 373 MOVZBL 4(SP),TAST$L_ASTPRM(R5) RETURN CHARACTER TO USER 374 20$: 375 MOVB #IPL$_QUEUEAST,ACB$B RMOD(R5) INSERT FORK IPL, TO ALLOW USE AS 376 FORK BLOCK 377 PUSHAB BJ\10$ SET UP RETURN ADDRESS 378 FORK CREATE FORK PROCESS 379 3BO AST QUEUE FORK PROCESS 381 3B2 ASSUME TAST$L ASTPRM EQ <TAST$L AST + 4> 3B3 ASSUME ACB$L ASTPRM EQ <ACB$L AST + 4> . 1 22$: MOVQ TAST$I AST(R5),ACB$L AST(R5) REARRANGE ENTRIES . 2 BISB #<ACB$M NODELETE!ACB$M PKAST>,- . 3 TAST$B RMOD(R5) - PK AST, NODELETE .4 MOVB TAST$B-RMOD(R5),ACB$B RMOD(R5) MODE .5 MOVL TAST$L-PID(R5),ACB$L PID(R5) PIO .6 MOVAL BAASTACNTNG,ACB$L KAST(R5) ADDRESS OF PIGGY-BACK KERNEL ROUT! . 7 MOVZBL #PR!$ IOCOM,R2 - SET UP PRIORITY INCREMENT .B JMP GASCH$QAST QUEUE THE AST .9 50$: . 10 MOVL R2,4(SP) RETURN ANY CHARACTER .11 POPR #AM<R2,R3,R5,R6> RESTORE REGISTERS 395 RSB 396 397 PIGGY-BACK KERNEL MODE ROUTINE TO: 398 1. MARK TAST AVAILABLE FOR USE 399 2. DEALLOCATE "LOST" BLOCK(S) AND RETURN THEIR QUOTA 400 401 402 ASTACNTNG: 403 BICB #TAST$M BUSY, TAST$B CTRL(R5) ; Mark block available. 404 BBC #TAST$V-LOST, - - Branch if still using this block. 405 TAST$B CTRL(R5), 150$ Otherwise, 406 MOVZWL TAST$L-PID(R5), RO use PIO index to locate PCB for 407 MOVL @LASCH$GL_PCBVEC[RO], RO ; this process. 40B 409 410 411 150$: INCW MOVL BSBW RSB PCB$W ASTCNT(RO) R5,RO- EXE$DEANONPAGED Then return AST quota for and deal locate this block. That completes piggy-back accounting. COMDRVSUB V03-007 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 13 COM$FLUSHCTRLS - FLUSH CONTROL AST LIST 24-APR-1982 15:46:24 DISK$VMSMASTER: [SYS.SRC]COMDRVSUB.(8) 51 50 67 34 50 1c 28 AO 60 A4 20 2E AO 56 1A 67 1C AO 06 2D AO 03 20 AO 10 DC 0000008F'GF 38 A4 01 51 30 AO 57 1C AO C7 62 51 50 01 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 01E9 D4 01FO DO 01F2 13 01F5 C2 01F7 01 OlFA 12 01FF 81 0201 12 0205 DO 0207 020B El 020B 88 0210 11 0214 0216 16 0216 86 021C 11 021F 0221 ca 0221 DE 0225 11 0229 0228 DO 0228 02·2E 9A 0231 05 0234 413 .SBTTL COM$FLUSHCTRLS - FLUSH CONTROL AST LIST 414 ;++ 415 COM$FLUSHCTRLS - FLUSH CONTROL AST LIST 416 417 THIS ROUTINE IS USED BY .THE TERMINAL SERVICES TO FLUSH 418 THE CONTROL AST LIST. THIS IS DONE AT CANCEL 1/0 TIME AND WHEN A 419 QIO SPECIFIES A 0 AST ADDRESS ON A SET AST FUNCTION. 420 THE SUMMARY MASK POINTED TO BY R2 IS UPDATED. 421 422 INPUTS: 423 424 R2 = ADDRESS OF SUMMARY MASK 425 R4 = PCB ADDRESS 426 427 = R5 = UCB ADDRESS OF RELATED UNIT R6 CHANNEL NUMBER 428 R7 = LI ST HEAD 429 430 OUTPUTS: 431 432 RO = SS$ NORMAL 433 Rl AND RI ARE DESTROYED. 434 435 436 COM$FLUSHCTRLS:: FLUSH CONTROL AST LIST 437 DSBINT UCB$B DIPL(R5) DISABLE INTERRUPTS 438 CLRL R1 - !NIT RETURN MASK 439 5$: MOVL (R7),RO GET LIST ENTRY 440 BEQL 50$ IF EQL THEN DONE 441 SUBL #TAST$L FLINK,RO , COMPUTE START OF BLOCK 442 CMPL PCB$L PID(R4),TAST$L PID(RO); PIO MATCH? 443 BNEQ 40$ - IF NEQ THEN NO 444 CMPW R6,TAST$W CHAN(RO) CHANNEL MATCH? 445 BNEQ 40$ - IF NEQ THEN NO 446 MOVL TAST$L FLINK(RO),(R7) CLOSE UP LIST TO REMOVE ENTRY 447 448 BBC #TAST$V BUSY,TAST$B CTRL(R0),20$; BLOCK CAN BE DELETED NOW? 449 BISB #TAST$M-LOST,TAST$B-CTRL(RO) ; NO, FLAG IT FOR LATER DELETION 450 BRB 5$ - - ; THAT'S ALL WE CAN DO RIGHT NOW 451 452 20$: JSB GACOM$DRVDEALMEM DEALLOCATE THE BLOCK 453 INCW PCB$W ASTCNT(R4) 454 BRB 5$ - RESTORE AST QUOTA CONTINUE 455 456 40$: BISL TAST$L MASK(RO),Rl OR IN ACTIVE CONTROL CHARACTERS 457 MOVAL TAST$L-FLINK(RO),R7 LOOK TO NEXT ENTRY 458 BRB 5$ - CONTINUE 459 460 50$: MOVL R1,(R2) UPDATE SUMMARY MASK 461 ENBINT REENABLE INTERRUPTS 462 MOVZBL #SS$_NORMAL,RO SET NORMAL RETURN 463 RSB COMDRVSUB V03-007 ;JLV0272 - COMMUNUCATION DRIVERS SUBROUTINES COM$SETCTRLAST - SET UP CONTROL AST 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 14 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB.(9) 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 465 .SBTTL COM$SETCTRLAST - SET UP CONTROL AST 466 ;++ 467 COM$SETCTRLAST - SET CONTROL AST 468 469 FUNCTIONAL DESCRIPTION: 470 471 This routine is used by the terminal services FDT routines during the 472 processing of requests to enable out-of-band ASTs. The current list is 473 scanned for a block with a requester matching that of the request being 474 processed. If a match is found, the specified mask and AST routine address 475 in the matching block are replaced. If no match is found, COM$BLDCTRLAST is 476 called to create a new block. The summary mask pointed to by R2 is updated 477 to be the inclusive or of all masks in the control AST list pointed to by R7. 478 479 If either the AST routine address or the out-of-band enable mask -- 480 @<P2(AP)+4> -- is zero, all out-of-band AST requests entered by this 481 requester are flushed from queue pointed to by R7. 482 483 INPUTS: 484 485 R2 = CURRENT SUMMARY MASK ADDRESS 486 R3 = I/O PACKET ADDRESS 487 R4 = CURRENT PCB 488 R5 = UCB ADDRESS 489 R7 = ADDRESS OF THE CONTROL AST LIST HEAD TO CHANGE 490 AP = ADDRESS OF THE QIO ARGLIST 491 492 Pl(AP) ADDRESS OF AST ROUTINE TO CALL WHEN OUT-OF-BAND CHARATER IS 493 TYPED (0 ==> FLUSH QUEUE) 494 P2(AP) ADDRESS OF SHORT FORM TERMINATOR MASK GIVING WHICH OUT-OF- 495 BAND CHARACTERS WILL PRECIPATATE DELIVERY OF AN AST 496 (0 MASK VALUE==> FLUSH QUEUE: This address will be passed 497 as th~ AST parameter when the AST is delivered) 498 P3(AP) ACCESS MODE IN WHICH THE AST IS TO BE DELIVERED 499 (This is maximized against the caller's access mode) 500 501 IPL at entry is assumed to be IPL$ ASTDEL. 502 503 OUIPUTS: 504 505 RO = STATUS OF THE I/O 506 (SS$ NORMAL only; all others return via EXE$ABORTIO) .1 R2 = ADDRESS OF TAST BLOCK 507 R3 = I/0 PACKET ADDRESS 508 R4 = CURRENT PCB ADDRESS 509 R5 = UCB ADDRESS 510 NO OTHER REGISTERS ARE PRESERVED. 511 512 IPL at exit is the same as IPL at entry. 513 514 The summary mask pointed to by R2 is updated to be the inclusive or of 515 all masks in the control AST list pointed to by R7. 516 517 The control AST list pointed to by R7 is flushed, extended, or an 518 entry in the list is updated. 519 520 COMPLETION CODES: COMDRVSUB V03-007 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 -10 COMMUNUCATION DRIVERS SUBROUTINES COM$SETCTRLAST - SET UP CONTROL AST 3-JUN-1984 10:56:56 VAX-11 Macro V03-0l Page 15 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB.(9) 56 28 A3 58 6C AB 59 04 AC 50 oc 50 14 69 08 04 A9 09 FF8F OOOOOOOO'GF 5E FO AE 5B 5E 6B 58 08 AB 04 A9 OC AB 52 58 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0235 0000 0004 0008 oooc 0010 0235 0235 0235 0235 3C 0235 DO 0239 13 023C DO 023E 3C 0242 0245 3C 024B D5 024E 12 0250 05 0252 12 0255 31 0257 17 025A 0260 0260 0260 0260 0260 0260 0260 9E 0260 DO 0264 70 0267 DE 026A DO 026F 7C 0273 0275 521 522 SS$_NORMAL 523 524 The fol lowing return codes are reported by a JMP to EXE$ABORTIO: 525 SS$ ACCVIO -- spBcified mask not accessable 526 SS$-EXQUOTA -- buffered I/O or AST quota failure 527 SS$=INSUFMEM -- dynamic memory failure 528 529 530 COM$SETCTRLAST, COM$BLDCTRLAST, and COM$FILLCTRLAST build and use the 531 following information block. COM$SETCTRLAST builds the block on the stack 532 and points R11 to it. COM$BLDCTRLAST and COM$FILLCTRLAST use infomation 533 stored to build or update a TAST control block. 534 535 $OFFSET 0,POSITIVE,<- 536 ASTROUT ,- User's AST routine address 537 ASTPARM,- AST routine parameter 538 USRMSKADR,- Pointer to user's OOB mask 539 CURMSKADR,- Pointer to current summary mask 540 <TINFOSIZE,O>- Size of the block 541 > ASTROUT: ASTPARM: USRMSKADR: CURMSKADR: TINFOSIZE: 542 543 544 COM$SETCTRLAST:: SET UP CONTROL AST 545 546 MOVZWL IRP$W CHAN(R3), R6 Get packet channel number. 547 MOVL Pl (AP), RB Get user AST address. 548 BEQL COM$FLUSHCTRLS If its ~ero, flush OOB requests. 549 MOVL P2(AP), R9 Get address of user OOB mask. .1 MOVZWL #SS$ ACCV IO, RO Assume no access . 2 IFNORD #8, (R9), 5$ Probe for read access. . 3 MOVZWL #SS$ BADPARAM, RO Assume invalid mask format .4 TSTL (R9)- Verify short form terminator .5 BNEQ 5$ mask format. .6 TSTL 4(R9) Any OOB characters specified? . 7 BNEQ 7$ If there are some, proceed. .8 BRW COM$FLUSHCTRLS Otherwise, flush OOB requests. .9 5$: JMP GAEXE$ABORTIO I/O failed, abort request 560 7$: 561 562 563 We are now holding a valid request of enable an out-of-band character AST 564 565 566 ASSUME ASTPARM EQ <ASTROUT + 4> 567 MOVAB -TINFOSIZE(SP), SP Al locate info. block on the stack. 568 MOVL SP, R 11 Save info. block address. 569 MOVQ RB, ASTROUT(Rll) Save AST routine and parameter info. 570 MOVAL 4(R9), USRMSKADR(R11) Save address of user 008 mask. 571 MOVL R2, CURMSKADR(Rl1) Save current summary mask address. 572 CLRQ R8 Clear accumulation summary mask and 573 a local flags longword. COMORVSUB V03-007 ;JLV0272 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 RKS006 - COMMUNUCATION DRIVERS SUBROUTINES COM$SETCTRLAST - SET UP CONTROL AST 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 16 24-APR-1982 15:46:24 DISK$VMSMASTER:[SVS.SRC]COMDRVSUB.(9) 5A 52 67 36 52 E4 A2 2a A2 60 A4 21 2E A2 56 18 OD 2D A2 03 20 A2 10 67 1C A2 59 02 13 5A 52 0060 59 01 5a 30 A2 57 1C A2 C5 QC BB 58 50 01 52 5A 02 59 OE 5E 10 AE 01 50 OOOOOOOO'GF 04 0275 0277 027E DG 027E 13 02a1 9E 02a3 Dl 02a1 12 02aC Bl 02aE 12 0292 0294 El 0294 aa 0299 DO 0290 ca 02A1 11 02A4 02A6 02A6 DO 02A6 30 02A9 ca 02AC 02AF ca 02AF DE 0283 11 02B7 02B9 DO 0289 0280 0280 3C 02CO DO 02C3 ES 02C6 10 02C9 9E 02CB E9 02CF 05 0202 0203 17 0203 0209 .1 574 575 576 10$: 577 57a 579 5aO 5a1 582 583 .1 · 2 . 3 .4 .5 . 6 · 7 .8 12$: 584 585 5a6 587 15$: 5a8 589 590 591 20$: 592 593 594 .1 . 2 . 3 .4 30$: . 5 .6 .7 50$: .8 .9 CLRL R10 DSBINT UCB$B DIPL(R5) TAST address Interlock queue access. MOVL BEQL MOVAB CMPL BNEQ CMPW BNEQ (R7), R2 Get list entry. 20$ Branch if no more entries in list. -TAST$L FLINK(R2), RZ , Compute start of block. PtB$L PfD(R4), TAST$L PID(R2) ; Do the PIDs match? 15$ - Branch if PIDs don't match. R6, TAST$W CHAN(R2) Is the channel right? 15$ - Branch if not the right channel. BBC BISB MOVL BISL BRB MOVL BSBW BISL #TAST$V BUSV,TAST$B CTRL(R2),12$; Block can be reused now #TAST$M-LOST,TAST$B-CTRL(R2) j No, flag it for later deletion TAST$L FLINK(R2),(R7) Remove the entry from the queue #2, R9- Indicate that a match was found 20$ And build a new one, since the old one is busy and will be deleted when the AST is delivered. R2,R10 Save TAST address COM$FILLCTRLAST Update matching TAST control block. #1, R9 Indicate that an update was done. BISL MOVAL BRB TAST$L MASK(R2), RS TAST$L-FLINK(R2), R7 10$ - Accumulate OOB mask data for queue. Advance to next queue entry. Loop until entire queue processed. MOVL RB, @CURMSKADR(Rll) ENBINT MOVZWL MOVL BLBS BSBB MOVAB BLBC RSB #SS$ NORMAL, RO R10,R2 R9, 30$ COM$BLDCTRLAST TINFOSIZE(SP), SP RO, 50$ Make accumulated 008 mask for queue the current 008 mask for the queue. Return to caller's IPL. Assume work completed successfully. Valid only if R9 LBS If no blocks in the queue were updated, build a new block. Restore stack. Was COM$BLDCTRLAST successful? if so, return to caller. JMP GAEXE$ABORTIO If it failed, abort 1/0 request. COMDRVSUB V03-007 - COMMUNUCATION DRIVERS SUBROUTINES COM$BLDCTRLAST - BUILD CONTROL AST 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 17 24-APR-1982 15:46:24 DISK$VMSMASTER: [SYS.SRC)COMDRVSUB(10) 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 0209 02D9 02D9 0209 02D9 0209 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 0209 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 02D9 602 .SBTTL COM$BLDCTRLAST - BUILD CONTROL AST 603 ;++ 604 COM$BLDCTRLAST - BUILD NEW CONTROL AST PACKET 605 606 FUNCTIONAL DESCRIPTION: 607 608 This routine builds a new terminal AST control block and inserts it after 609 the TAST entry pointed to by R7. The control block will double as an AST 610 control block when a AST fs delivered. The block will be reused until the 611 out-of-band AST request is canceled. The summary mask pointed to by 612 CURMSKADR(Rll) is inclusively or'ed with the user out-of-band mask pointed 613 to by USRMSKADR(Rll). 614 615 INPUTS: 616 617 R~ = I/O pACKET ADDRESS 618 R4 = CURRENT PCB 619 R5 = UCB ADDRESS 620 621 = R6 = CHANNEL ON WHICH OOB REQUEST IS BEING MADE R7 ADDRESS OF THE CONTROL AST LIST ENTRY PRECEDING THE POINT WHERE 622 THE NEW ENTRY IS TO BE ADDED. 623 Rll= THE ADDRESS OF A TAST INFORMATION LIST (SEE COM$SETCTRLAST) 624 AP = ADDRESS OF THE QIO ARGLIST 625 626 P3(AP) = ACCESS MODE IN WHICH THE AST IS TO BE DELIVERED 627 (This is maximized against the caller's access mode) 628 629 ASTROUT(Rll) =ADDRESS OF AST ROUTINE TO CALL WHEN OUT-OF-BAND 630 CHARACTER IS TYPED 631 ASTPARM(Rll) =AST PARAMETER VALUE TO BE PASSED TO AST ROUTINE WHEN 632 OUT-OF-BAND AST IS DELIVERED 633 CURMSKADR(Rll)= ADDRESS OF THE CURRENT OUT-OF-BAND SUMMARY MASK 634 USRMSKADR(Rll)= ADDRESS OF OUT-OF-BAND MASK SPECIFIED BY USER FOR 635 THIS AST ENABLE 636 637 IPL at entry is assumed to be IPL$_ASTDEL. 638 639 OUTPUTS: 640 641 RO = STATUS OF THE I/O 642 Rl & R2 DESTROYED 643 ALL OTHER REGISTERS PRESERVED 644 645 IPL at entry is assumed to be IPL$_ASTDEL. 646 647 A TAST control block is allocated, filled in, and linked after the 648 entry pointed to by R7 649 650 COMPLETION CODES: 651 652 SS$ NORMAL 653 SS$-EXQUOTA BUFFERED I/0 OR AST QUOTA FAILURE 654 SS$=INSUFMEM DYNAMIC MEMORY FAILURE 655 656 657 COM$BLDCTRLAST: 658 COMDRVSUB V03-007 - COMMUNUCATION DRIVERS SUBROUTINES COM$BLDCTRLAST - BUILD CONTROL AST 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 18 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB(10) 38 A4 B5 31 15 38 A4 B7 53 DD 51 34 9A OOOOOOOO'GF 16 53 8EDO 21 50 E9 25 10 1C A2 67 DO 67 1C A2 DE OC BB 30 A2 CB 50 01 3C 05 50 lC 3C 05 50 0124 BF 3C 05 0209 02DC 02DE 02El 02E3 02E6 02EC 02EF 02F2 02F4 02F4 02F4 02F4 02F4 02F4 02FB 02FF 0303 0308 030B 030E 030F 030F 030F 030F 030F 030F 0312 0313 0313 0318 659 TSTW PCB$W ASTCNT(R4) 660 BLEQ 91$ - Is there enough AST quota? Branch if insufficient AST quota. 661 DECW PCB$W ASTCNT(R4) 662 PUSHL R3 - Deduct from AST quota. Save reg. destroyed by EXE$ALLOCBUF. 663 MOVZBL #TAST$C LENGTH, Rl Set size of TAST block. 664 JSB GAEXE$ALLOCBUF Al locate for the TAST control block. 665 POPL R3 Restore saved register. 666 BLBC RO, 93$ Branch if al location failed. 667 BSBB COM$FILLCTRLAST Fil 1 in newly al located block. 668 669 670 INSERT NEWLY BUILD TAST CONTROL BLOCK 671 672 673 DSBINT UCB$B DIPL(R5) ; Interlock access to queue links. 674 MOVL (R7),-TAST$L FLINK(R2) ; Move list for. pointer to new entry. 675 MOVAL TAST$L FLINKTR2), (R7) ; Link new entry to current list. 676 BISL TAST$L-MASK(R2), @CURMSKADR(Rll) ; Update summary mask. 677 ENBINT Restore previous IPL. 678 MOVZWL #SS$ NORMAL, RO ; Indicate that build succeeded. 679 RSB Return to caller. 680 681 682 ERROR RETURNS: 683 684 685 91$: 686 MOVZWL #SS$ EXQUOTA, RO RSB - AST quota exceeded. 687 688 93$: 689 MOVZWL #SS$ INSFMEM, RO RSB - Insufficient dynamic memory. COMDRVSUB V03-007 JLV0272 JLV0272 JLV0272 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 19 COM$FILLCTRLAST - FILLIN A CONTROL AST C 24-APR-1992 15:46:24 DISK$VMSMASTER:[SVS.SRC]COMDRVSUB(11) 20 A2 6B 30 A2 08 BB 50 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 0319 7D 0319 031D DO 031D 0322 04 0322 691 .SBTTL COM$FILLCTRLAST - FILLIN A CONTROL AST CONTROL BLOCK 692 ;++ 693 COM$FILLCTRLAST - FILLIN A CONTROL AST CONTROL BLOCK 694 695 FUNCTIONAL DESCRIPTION: 696 697 This routine fills in the terminal AST control block pointed to by R2. The 698 block may be either a previously al located block which is already linked to 699 a control AST queue, or a newly allocated block which is being filled in for 700 the first time. 701 702 INPUTS: 703 704 R2 ADDRESS OF TAST CONTROL BLOCK TO BE FILLED IN 705 R3 I/O PACKET ADDRESS 706 R4 CURRENT PCB 707 R6 CHANNEL ON WHICH OOB AST REQUEST IS BEING MADE 708 R 11 = THE ADDRESS OF A TAST INFORMATION LIST (SEE COM$SETCTRLAST) 709 AP = ADDRESS OF THE QIO ARGLIST 710 711 = P3(AP) ACCESS MODE IN WHICH THE AST IS TO BE DELIVERED 712 (This is maximized against the caller's access mode) 713 714 ASTROUT(Rll) =ADDRESS OF AST ROUTINE TO CALL WHEN OUT-OF-BAND 715 CHARACTER IS TYPED 716 ASTPARM(Rll) =AST PARAMETER VALUE TO BE PASSED TO AST ROUTINE WHEN 717 OUT-OF-BAND AST IS DELIVERED 718 USRMSKADR(Rl1)= ADDRESS OF OUT-OF-BAND MASK SPECIFIED BY USER FOR 719 THIS AST ENABLE 720 721 If this routine is called to operate on a TAST block which is already 722 linked to a control queue, it should be cal led at device IPL. 723 Otherwise, it can be cal led at IPL$_ASTDEL. 724 725 OUTPUTS: 726 727 RO & Rl ARE DESTROYED. 728 ALL OTHER REGISTERS ARE PRESERVED. 729 730 IPL at exit is the same as IPL at entry. 731 732 The TAST control block pointed to by R2 is filled in. 733 734 COMPLETION CODES: 735 736 There is no completion status. This routine is always successful. 737 738 739 COM$FILLCTRLAST: 740 741 ASSUME TAST$L ASTPRM EQ <TAST$L AST + 4> 742 ASSUME ASTPARM EQ <ASTROUT + 4>- 743 MOVQ ASTROUT(Rll), - ; Plant AST routine and 744 TAST$L AST(R2) ; parameter addresses. .1 MOVL @USRMSKADR(R11), - . 2 TAST$L_MASK(R2) ; Plant OOB mask. . 3 CLRL RO : Assume no flags COMDRVSUB V03-007 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;-JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 ;JLV0272 -5 - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-~ 1 Macro V03-0l Page 20 COM$FILLCTRLAST - FILLIN A CONTROL AST C 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB(11) 05 20 A3 DC 50 20 08 03 20 A3 OB 50 02 20 A2 50 02 00 50 08 AC 51 51 02 16 51 51 50 03 50 51 2C A2 50 2E A2 56 28 A2 60 A4 0324 0324 0324 El 0324 0329 88 0329 11 032C 032E 032E 032E El 032E 0333 88 0333 0336 90 0336 EF 033A 0330 DC 0340 EF 0342 0346 91 0347 18 034A 90 034C 90 034F BO 0353 DO 0357 05 035C 0350 035D .4 .5 .6 . 7 .8 .9 . 10 . 11 . 12 . 13 .14 5$: . 15 . 16 . 17 . 18 10$: · 19 750 751 752 753 754 755 20$: 756 757 758 759 760 ; Check for ABORT ; BBC #IO$V TT ABORT, - IRP$W-FUNC(R3),5$ BISS #TAST$M_ABORT,RO BRB 10$ ; ; Check for INCLUDE B' BC BISS #l0$V INCLUDE, I RP$W-FUNC ( R3) , 10$ #TAST$M_INCLUDE,RO ; Branch if not abort ; Else set abort flag. ; Ignore INCLUDE ; BR if striping OOB chars . ; Else set no-strip flag. MOVB EXTZV MOVPSL EXTZV RO,TAST$B CTRL(R2) #0, #2, P3°(AP), RO \ ; Set TAST control field. ; Get requested delivery access mode. Rl Get access mode of requestor. #PSL$V_PRVMOD, #PSL$S_PRVMOD, Rl, Rl ; If requestor's access CMPB BGEQ MOVB MOVB MOVW MOVL RSB RO, Rl ; mode is bigger than delivery access 20$ ; mode, then delivery AST in Rl, RO ; requester's access mode. RO, TAST$B RMOD(R2) ; Plant delivery access mode. RPC6,B$TLA_SPTI$DW(R-C4H),ANT(AR2S)T$L_PID' ( Plan R2) t ; requester's channel. Plant requester's PIO. ; Return to caller. .END COMDRVSUB Symbo 1 tab 1e ACB$B RMOD ACB$L-AST ACB$L-ASTPRM ACB$L-KAST ACB$L -PIO ACB$M-NODELETE ACB$M-PKAST ACB$M-QUOTA ASTACNTNG ASTPARM ASTROUT ATTN2 BUG$ BADDALRQSZ COM$BLDCTRLAST COM$DELATTNAST COM$DELATTNASTP COM$DELCTRLAST COM$DELCTRLASTP COM$DRVDEALMEM COM$FILLCTRLAST COM$FLUSHATTNS COM$FLUSHCTRLS COM$POST COM$SETATTNAST COM$SETCTRLAST CTRL2 CURMSKADR DIR ... DYN$C FRK EXE$ABORTIO EXE$ALLOCBUF EXE$DEANONPAGED EXE$FORK EXE$MAXACMODE FKB$B FIPL FKB$B-TYPE FKB$C-LENGTH FKB$W-SIZE IO$V INCLUDE IO$V-TT ABORT IOC$GL PSBL IPL$ IOPOST IPL$-QUEUEAST IPL$-SVNCH IRP$W CHAN IRP$W-FUNC Pl - P2 P3 P4 P5 P6 PCB$L PID PCB$W-ASTCNT PR$ IPL PR$-SIRR PRI$_IOCOM - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-01 Page 21 24-APR-1982 15:46:24 DISK$VMSMASTER:[SVS.SRC]COMDRVSUB(11) 00000008 00000010 00000014 00000018 oooooooc 00000020 00000010 00000040 OOOOOlCA R 02 00000004 00000000 OOOOOOOC R 02 ******** x 02 00000209 R 02 00000000 RG 02 00000008 RG 02 00000142 RG 02 0000014A RG 02 0000008F RG 02 00000319 R 02 0000004F RG 02 000001E9 RG 02 00000081 RG 02 00000005 RG 02 00000235 RG 02 0000014E R 02 oooooooc 00000001 00000008 ******** x 02 ******** x 02 ******** x 02 ******** x 02 ******** x 02 00000008 OOOOOOOA 00000018 00000008 00000008 oooooooc ******** x 02 00000004 00000006 00000008 00000028 00000020 00000000 00000004 000000.08 oooooooc 00000010 00000014 00000060 00000038 00000012 00000014 00000001 PSL$S PRVMOD PSL$V-PRVMOD SAVABS ... SCH$GL PCBVEC SCH$QAST SS$ ACCVIO SS$-BADPARAM SS$-EXQUOTA SS$-INSFMEM SS$-NORMAL TAST$B CTRL TAST$B-RMOD TAST$C-LENGTH TAST$L-AST TAST$L-ASTPRM TAST$L -FLINK TAST$L-MASK TAST$L -PIO TAST$M-ABO TAST$M-ABORT TAST$M-BUSY TAST$M-INCLUDE TAST$M-LOST TAST$V-ABORT TAST$V-BUSY TAST$V-INC TAST$V-INCLUDE TAST$V-LOST TAST$W-CHAN TINFOSIZ.E UCB$B DIPL UCB$L-OPCNT USRMSKADR 00000002 00000016 00000010 ******** x 02 ******** x 02 oooooooc 00000014 OOOOOOlC 00000124 00000001 0000002D 0000002C 00000034 00000020 00000024 0000001C 00000030 00000028 00004000 00000020 00000008 00000002 ::: 00000010 00000005 00000003 OOOOOOOF 00000001 00000004 0000002E 00000010 0000005E 00000070 00000008 COMDRVSUB Psect synopsis - COMMUNUCATION DRIVERS SUBROUTINES 3-JUN-1984 10:56:56 VAX-11 Macro V03-0l Page 22 24-APR-1982 15:46:24 DISK$VMSMASTER:[SYS.SRC]COMDRVSUB(11) +----------------+ Psect synopsis ! PSECT name ABS $ABS$ WIONONPAGED Al location PSECT No. Attributes 00000000 00000010 00000350 0.) 00 16.) 01 861.) 02 0.) NOP IC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE 1 . ) NOPIC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE 2. ) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE Performance indicators Phase Page faults CPU Time Elapsed Time Initjal ization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals 28 00:00:00.07 00:00:01.22 99 00:00:00.52 00:00:06.81 457 00:00:19.68 00:01:34.99 0 00:00:02.98 00:00:10.33 150 00:00:05.11 00:00:26.99 11 00:00:00.10 00:00:00.10 2 00:00:00.03 00:00:00.73 0 00:00:00.00 00:00:00.00 750 00:00:28.49 00:02:21.17 The working set limit was 1650 pages. 102023 bytes (200 pages) of virtual memory were used to buffer the intermediate code. There were 100 pages of symbol table space al located to hold 1859 non-local and 37 local 860 source lines were read in Pass 1, producing 15 object records in Pass 2. 34 pages of virtual memory were used to define 32 macros. symbols. ! Macro library statistics Macro library name Macros defined $255$DUA28:[SYS.OBJ]LIB.MLB;l 18 $255$DUA28:[SYSLIB]STARLET.MLB;2 11 fOTALS (all libraries) 29 2032 GETS were required to define 29 macros. There were no errors, warnings or information messages. MACRO/LIS=LIS$:COMDRVSUB/OBJ=OBJ$:COMDRVSUB MSRC$:COMDRVSUB/UPDATE=(ENH$:COMDRVSUB)+EXECML$/LIB PCDRIVER. LIS PCDRIVER.COM PCDRIVER.OPT LOADER.COM READY.FOR RANDWV.FOR MODE.FOR PCDRIVER Table of contents ( 1) 85 ( 1) 202 ( 1) 312 { 1 ) 341 ( 1) 389 ( 1) 471 ( 1) 527 ( 1) 543 ( 1) 603 ( 1) 647 ( 1) 905 ( 1) 1012 ( 1) ( 1) 1l01 6se8 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 External and local symbol definitions Standard tables PT CONTROL INIT, Controller initialization PT-UNIT IN1T, Unit initialization routine PT-FDT ROUTINE, Punch FDT routine ACP FDT ACP $QIO FDT Routine NULL BYTES FDT Routines for header/trailer PR FDT ROUTINE Reader FDT Routine PT-START, Start I/O routine PT-PUNCH, Start a punch operation PR-START, Start I/O routine (Reader) PT-INTERRUPT, Interrupt service routine PT-CANCEL, Cancel I/O routine PT=REG_DUMP, Device register dump routine routine Page 0 PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-0l Page 1 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(l) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1 . TITLE PCDRIVER - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 2 . !DENT /V06/ 3 4 5 COPYRIGHT (C) 1979 6 DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 7 8 THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT 9 NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 10 EQUIPMENT CORPORATION. 11 12 DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS 13 SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DEC. 14 15 ;++ 16 17 FACILITY: 18 19 VAX/VMS Paper Tape Reader/Punch Driver 20 21 ; ABSTRACT: 22 23 ; This driver controls the PC11 paper tape reader/punch. READ and 24 ; WRITE $QIOs are accepted (VBLK, LBLK, AND PBLK), as are MOUNT, 25 ; ACPCONTROL, and WRITEOF $QIOs (which call on the ACP -- PCACP). 26 ; MODIFY, DELETE, and DEACCESS $QIOs are valid for the punch, 27 ; 28 ; as are CREATE and READPROMPT $QIOs (valid for both reader/punch). 29 ; 30 ; 31 ; READVBLK and READLBLK cause characters to be read from the reader with leading nu! l bytes ignored (for the first read request); READPBLK is the same, except that leading null bytes 32 ; are treated as data characters. An EOF byte is recognized if 33 ; 34 ; the user requested looking for EOF (default if not physical). 35 ; WRITEVBLK and WRITELBLK cause characters to be,punched (a 36 ; 37 ; header and trailer of nul 1 bytes is punched--default is to punch NULL BYTES null bytes in the header and trailer tape). 38 ; WRITEPBLK Ts the same, except that no header/trailer is punched. 39 ; 40 ; If first $QIO wasn't physical, an EOF is punched before trailer. 41 ; The MOUNT $QIO is used to synchronize with the ACPMNT program 42 ; which loads the paper tape punch ACP (PCACP). The ACPCONTROL 43 ; 44 ; 45 ; $QIO is a no-op function which serves to awaken the ACP if it is hibernating. The WRITEOF $QIO is turned into an equivalent WRITEVBLK $QIO by the ACP. 46 ; 47 ; 48 ; The MODIFY $QIO changes the default (NULL BYTES) number of null bytes to punch in the header/trailer tape~ P2 specifies the 49 ; new number of null bytes to be punched. 50 ; 51 ; The DELETE $QIO restores the default (NULL BYTES) number of null 52 ; bytes to punch in the header/trailer tape. 53 ; 54 ; The DEACCESS $QIO returns the current number of null bytes which 55 ; are to be punched for the header/trailer tape in the high order 56 ; 57 longword of the IOSB specified in the $QIO call. PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 2 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 58 The CREATE $QIO is used to enable searching for an EOF byte (for 59 the reader), or to enable the punching of an EOF byte (for the 60 punch). 61 62 The READPROMPT $QIO is used to disable searching for an EOF byte 63 (for the reader), or to disable the punching of an EOF byte (for 64 the punch). 65 66 When used, Pl is the starting address of the buffer, and P2 is 67 the buffer length. The driver performs buffered I/O. 68 69 An EOF character is equal to a decimal 26 (control-Z). 70 71 Note that the ACP (PCACP) is not required for the driver to 72 work. PCDRIVER may be loaded and used independent of the ACP. 73 The ACP's main function is to serve as an instructional tool 74 showing how ACPs are written; the ACP does not provide any 75 added functionality for either the reader or punch. 76 77 AUTHOR: 78 79 Vik Muiznieks July 1979 80 81 HISTORY 82 Fred Marsh 83 Added $DYNDEF $PRVDEF and $PCBDEF to external symbol definitions 84 85 .SBTTL External and local symbol definitions PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-0l Page 3 External and local symbol definitions 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 00000000 00000004 00000008 oooooooc 00000010 00000014 OOOOOOOF 00000002 oooooooc OOOOOOOA 00000002 00000064 00000064 oooooooc 00000000 0000001A 00000032 00000001 00000004 00000010 00000008 00000020 00000007 00000006 00000001 0000 0000 0000 0000 0000 0000 0000 0000 0000 OOOQ 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000· 0000 0000 0000 0000 0000 0000 0000 0000 87 88 External symbols 89 90 $CRBDEF Channel request block 91 $VCBDEF Volume control block 92 $DCDEF Device classes and types 93 $DDBDEF Device data block 94 $DEVDEF Device characteristics 95 $EMBDEF Error logging fields(not in template) 96 $IDBDEF Interrupt data block 97 $IODEF I/O function codes 98 $IPLDEF Hardware IPL definitions 99 $IRPDEF I/O request packet 100 $JIBDEF Job Information Block 101 $SSDEF System status codes 102 $UCBDEF Unit control block 103 $VECDEF Interrupt vector block 104 $DVNDEF 105 $PCBDEF 106 $PRVDEF 107 108 109 110 Argument list (AP) offsets for device-dependent $QIO parameters 111 (Only Pl and P2 are used in this driver) 112 113 114 Pl 0 First $QIO parameter 115 P2 4 Second $QIO parameter 116 P3 8 Third $QIO parameter 11'7 P4 12 Fourth $QIO Rprameter 118 P5 16 Fifth $QIO parameter 119 P6 20 120 ; Sixth $QIO parameter 121 ; Other constants 122 123 124 LOOP CNT=15 before issuing off-line msg. 125 SHORT WAIT=2 #sec for device to go online 126 BUF OVR HD=12 system buff er overhead 127 PT TIMEOUT SEC=lO 10 second device timeout 128 PT-NUM REGS=2 129 MV-CLASS=lOO 130 MV-TYPE=lOO Each device has 2 registers My own device class number My own device type number 131 ERBFSIZE=12 132 NULL=O Size of err. log buf. in bytes null byte 133 EOF=26 EOF byte = control-Z 134 NULL BVTES=50 for header/trailer 135 PUNCH HOR=l bit pos. flagging 136 header/trailer punched 137 START=4 mask for punch. hdr. 138 END=16 mask for punch. trail. 139 PNCH=8 f 1ag-->punch op. pe rf. (mask) 140 RD HDR=32 flag-->read hdr. tape (mask) 141 STARTING=7 bit pas.--> 1st operation 142 FRST QI0=6 143 BIT0;-1 flag-->read 1st header (pos.) mask-->EOF byte handling PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 4 External and local symbol definitions 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 00000100 0000 00000200 0000 144 BIT8=256 145 BIT9=512 ; mask-->EOF byte handling ; mask-->EOF byte handling PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-0l Page 5 External and local symbol definitions 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(l) OOOOOOAO 00000002 00000004 00000006 00000008 0000 0000 0000 0000 0000 0000 OOAO OOAO OOA4 OOA4 OOA6 OOA6 OOA7 OOA7 OOA8 OOA8 OOAA OOAA OOAA OOAA 0000 0000 0000 0000 0000 0000 0000 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0002 0004 0004 0006 0006 0006 0006 0006 0006 0006 0006 0006 0008 0000 0000 147 148 Definitions that fol low the standard UCB fields 149 150 $DEFINI UCB Start of UCB definitions 151 152 .=UCB$L DPC+4 Position at end of error log 153 extension to UCB 154 $DEF UCB$L_SAV R4 .BLKL copy of R4 for CANCEL routine 155 156 $DEF UCB$W_PT PPS .BLKW copy of status reg. (err. log) 157 158 $DEF UCB$B PT OFLCNT .BLKB Off-line counter 159 160 $DEF UCB$B PT_PPB .BLKB Copy of data reg. for err. log 161 162 $DEF UCB$W_MY_REFCNT .BLKW Counter for channels assigned 163 164 $DEF UCB$K_PT UCBLEN Length of extended UCB 165 166 $DEFEND UCB End of UCB definitions 167 168 Device register offsets from CSR address 169 170 $DEFINI PT Start of status definitions 171 172 $DEF PT PRS reader Control/status register 173 .BLKW 174 175 Bit positions for device control/status registers 176 177 VIELD PT CSR,O,<- Control/status register 178 <RDENA, , M>, - Reader enable bit 179 <,5>,- Skip five bits 180 < IE, , M>, - Reader interrupt enable bit 181 <DONE, ,M>,- Reader done bit 182 <,3>,- Skip three bits 183 <BUSY, , M>, - Reader busy bit 184 <,3>,- Skip three bits 185 <ERROR, ,M>,- Reader error bit 186 > 187 $DEF PT PRB reader data register 188 .BLKW 189 $DEF PT PPS Punch Control/status register 190 .BLKW 191 VI ELD PT STS,0,<- 192 < ,6> ,- Control/status register disregard bits 193 <IE,, M>, - interrupt enable 194 <READY, , M>, - device ready bit 195 <,7>,- disregard bits 196 <ERROR, , M>, - device error bit 197 > 198 $DEF PT PPB Punch data register 199 .BLKW 200 $DEFEND PT End of device register 201 definitions. 202 .SBTTL Standard tables PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 6 Standard tables 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0038 0038 0038 003C 0040 0040 0040 0040 0040 0040 0047 0046 004F 0054 0059 0059 0059 0059 005E 005E 0063 0063 0068 0068 0068 006D 006D 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0038 0038 0038 0038 0038 0038 204 205 206 Driver prologue table 207 208 209 DPT AB DPT-creation macro 210 END=PT END,- End of driver label 211 ADAPTER=UBA, - Adapter type 212 UCBSIZE=<UCB$K PT UCBLEN>,- Length of UCB 213 NAME=PCDRIVER - Driver name 214 DPT STORE !NIT Start of load 215 initialization table 216 DPT STORE UCB,UCB$B FIPL,B,8 ; Device fork IPL 217 DPT-STORE UCB,UCB$B-DIPL,B,20 ; Device int. IPL (BR4) 218 DPT-STORE UCB,UCB$L-DEVCHAR,L,<- ; Device characteristics 219 - DEV$M AVL!-- ; e.g., dev. available 220 DEV$M-ELG!- ; error logging enabled 221 DEV$M-REC!- ; record oriented 222 DEV$M-IDV!- ; input device-reader 223 DEV$M-ODV> ; output device-punch 224 DPT STORE UCB~UCB$B DEVCLASS,B,MV CLASS ; store my device class 225 DPT-STORE UCB,UCB$8-DEVTVPE,B,MV TYPE ; Store my device type 226 DPT-STORE UCB,UCB$W-DEVSTS,W,O ; Clear all flags 227 DPT=STORE UCB,UCB$W=DEVBUFSIZ,W,NULL_BVTES ; init. #null bytes 228 229 DPT STORE REINIT Start of reload 230 initialization table 231 DPT STORE DDB,DDB$L DDT,D,PC$DDT Address of DDT 232 DPT-STORE CRB,CRB$L-INTD+4,D,- Address of reader int. 233 PR INTERRUPT service routine 234 DPT STORE CRB,CRB$L INTD2+4,D,- Address of punch int. 235 PT INTERRUPT service routine 236 DPT STORE CRB,- Address of controller 237 CRB$L INTD+VEC$L INITIAL,- initialization routine 238 D,PT CONTROL !NIT 239 240 DPT STORE END 241 End of initialization tables 242 243 244 Driver dispatch table 245 246 247 DDT AB DDT-creation macro 248 DEVNAM=PC,- Name of device 249 START=PT START,- Start I/O routine 250 FUNCTB=PT FUNCTABLE,- FDT address 251 CANCEL=PT-CANCEL,- Cancel I /0 routine 252 REGDMP=PT-REG DUMP,- Register dump routine 253 UNITINIT=PT UNIT INIT,- Unit init. routine 254 ERLGBF=ERBFSIZE+EMB$L DV REGSAV Size of err. log. buf. 255 (plus system overhead) 256 257 Function dispatch table 258 259 P' T FUNCTABLE: 260 - FUNCTAB FDT for driver Valid I/O functions PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 7 Standard tables 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 0038 261 0038 262 0038 263 0038 264 0038 265 0038 266 0038 267 0038 268 0038 269 003& 270 0038 271 0038 272 0038 273 0038 274 0040 275 0040 276 0040 277 0040 278 0040 279 0040 280 0040 281 0040 282 0040 283 0040 284 0040 285 0040 286 0040 287 0040 288 0040 289 0048 290 0048 291 0048 292 0048 293 0054 294 0054 295 0054 296 0054 297 0060 298 006C 299 006C 300 006C 301 0078 302 0078 303 0078 304 0078 305 0084 306 0090 307 0090 308 0090" 309 0090 310 0090 311 009C 312 FUN CT AB FUNCTAB FUNCTAB FUNCTAB FUNCTAB FUNCTAB FUNCTAB FUNCTAB .SBTTL <READVBLK,READLBLK,READPBLK,MOUNT,CREATE,READPROMPT,ACPCONTROL,MODIFY,DELETE,DEACCESS,WRITEOF,WRITEVBLK,WRITELBLK, WRITEPBLK> - <READVBLK,READLBLK,READPBLK,MOUNT,CREATE,READPROMPT,ACPCONTROL,MODIFY,DELETE,DEACCESS,WRITEOF,WR ITEVBLK, WRITELBLK,WRITEPBLK> PT FDT ROUTINE,<WRITEVBLK,WRITELBLK, WRITEPBLK> PR FDT ROUTINE,<READVBLK,READLBLK,READPBLK> ACP FDT,<MOUNT> Q TO ACP,<ACPCONTROL,WRITEOF> FOR PNCH,<MODIFY,DELETE,DEACCESS> SET FOT,<MODIFY> +EXE$QIODRVPKT,<DELETE,- CREATE,READPROMPT,DEACCESS> PT CONTROL INIT, Controller ; READ virtual ; READ logical ; READ physical ; MOUNT ACP function ; CREATE function ; READPROMPT function ; ACPCONTROL function ; set # null bytes ; reset # nu 11 bytes ; read # nul 1 bytes ; write EOF function ; Write virtual ; Write logical ; Write physical ; Buffered functions ; READ virtual ; READ logical ; READ physical ; MOUNT ACP function ; CREATE function ; READPROMPT function ; ACPCONTROL function ; set~, null bytes ; reset # null bytes ; read # nu 11 bytes ; write EOF function ; Write virtual ; Write logical ; Write physical ; FDT write routine for ; write virtual, ; ' write 1ogi ·and write cal, physical. ; FDT READ routine for ; READ virtual, ; READ 1og i ca 1 , ; and READ physical. ; FDT ACP routines ; Check for ACP FDTs ; ACPCONTROL routine ; WRITE EOF routine ; Make sure for punch ; set # nu 1 1 bytes ; reset # null bytes ; read # nu 11 bytes ; set # nu l 1 bytes ; no more checking ; for nu l 1 byte reset or ; CREATE function or ; READPROMPT function or i n it i' a reading# lization null routi bytes ne PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 8 PT_CONTROL_INIT, Controller initializati 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 009C 05 009C 0090 314 315 ;++ 316 317 ; ; PT_CONTROL- INIT, Readies controller for I/O operations 318 ; Functional description: 319 ; 320 ; ·The operating system calls this routine in 3 places: 321 ; 322 ; at system startup 323 ; during driver loading and reloading 324 ; during recovery from a power failure 325 ; 326 ; Inputs: 327 ; 328 ; 329 ; R4 - address of the CSR (controller status register) RS - address of the IDB (interrupt data block) 330 ; R6 - address of the DDB (device data block) 331 ; RB - address of the CRB (channel request block) 332 ; 333 ; Outputs: 334 ; 335 : 336 The routine must preserve all registers except RO-R3. 337 338 339 PT CONTROL INIT: ; Initialize controller 340 341 RSB .SBTTL PT UNIT- INIT, Unit i n i t i a' l Return ization routine PCDRIVER V06 38 A5 38 A5 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP~1984 17:59:27 VAX-11 Macro V03-01 Page 9 PT_UNIT_INIT, Unit initialization routin 22-AUG-1984 20:06:00 WORK2: [COURSE.DRIVER]PCDRIVER.MAR;(l) 64 A5 10 50 54 A5 50 OA 04000000 SF 08 08000000 8F 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 0090 009D 0090 0090 0090 0090 0090 0090 0090 0090 009D 0090 0090 0090 0090 0090 0090 0090 0090 A8 0090 BO OOA1 85 OOA5 13 OOA7 CA OOA9 11 0081 CA 0083 05 OOBB OOBC 343 344 ·++ 345 ' PT UNIT_INIT, Readies unit for I/O operations 346 347 Functional description: 348 349 The operating system calls this routine after cal ling the 350 controller initialization routine: 351 352 at system startup 353 during driver loading 354 during recovery from a power failure 355 356 When using the SYSGEN CONNECT command, the reader is 357 connected first (as PCO:), and the punch is connected 358 second (as PC1 :). The initialization routine sets both 359 units on-line, and clears the appropriate device 360 characteristics bit (i.e., punch does only output oper- 361 ations, reader does only input operations). T~p UCBs 362 are used so that operations can be overlapped on the 363 reader and punch. No controller channel is ever requested 364 (with REQPCHAN) since the PC11 reader/punch is essentially 365 two independent devices in one box, and no controller is 366 really present. (Therefore operations may occur on both 367 the reader and the punch at the same time.) 368 369 Inputs: 370 371 R4 - address of the CSR (controller status register) 372 R5 - address of the UCB (unit control block) 373 374 Outputs: 375 376 The routine1 must preserve al 1 registers except RO-R3. 377 378 379 380 PT UNIT !NIT: ; Initialize unit 381 -BISW #UCB$M ONLINE,UCB$W STS(R5) ; Set unit online 382 MOVW UCB$W UNIT(R5),RO - ; Get unit# 383 TSTW RO - ; Is unit # O? 384 BEQL 10$ ; If so, reader 385 BICL #OEV$M !OV,UCB$L OEVCHAR(R5) ; No input if punch 386 BRB 20$ - - 387 10$: BICL #OEV$M OOV,UCB$L OEVCHAR(R5) No output if reader 388 20$: RSB - - ; Return 389 .SBTTL PT_FOT_ROUTINE, Punch FOT routine PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-0l Page 10 PT_FDT_ROUTINE, Punch FDT routine 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 50 OOOOOOF4 BF DO 06 38 A5 1B EO OOOOOOOO'GF 17 50 6C DO 51 04 AC 3C 5F 13 OOOOOOOO'GF 16 32 A3 51 BO 09 BB 51 oc co OOOOOOOO'GF 16 50 50 E9 OOOOOOOO'GF 16 47 50 E9 09 BA 2C A3 52 DO 30 A3 51 BO 50 DD 50 0080 C4 DO 20 AO 51 C2 50 BEDO OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOBC OOC3 OOC8 OOCE OODl OOD5 OOD7 OODD OODD OODD OOEl OOE3 OOE6 OOEC OOEF OOF5 OOF8 OOFA OOFE 0102 0104 0109 0100 391 392 ;++ 393 PT FDT_ROUTINE, Punch FDT routine 394 395 Functional description: 396 397 This FDT routine makes all the standard accessibility checks 398 for buffered I/O operations, allocates a buffer from system 399 pool, and copies the user data to be punched to the system 400 buffer. The standard !RP and PCB fields are updated. In the 401 case of a WRITEOF function code, the !RP is queued to the ACP. 402 The routine makes sure that the punch UCB is being 403 referenced by the user. 404 405 Inputs: 406 407 RO-R2 - scratch registers " 408 R3 - address of the !RP (I/O request packet) 409 R4 - address of the PCB (process control block) 410 R5 - address of the UCB (unit control block) 411 R6 - address of the CCB (channel control block) 412 R7 - bit number of the I/O function code 413 RB - address of the FDT table entry for this routine 414 R9-R 11 - scratch registers 415 AP - address of the 1st function dependent $QIO parameter 416 417 Outputs: 418 419 The routine must preserve al 1 registers except RO-R2, and 420 R9-Rll. 421 422 423 424 PT FDT ROUT! NE: ; Punch FDT routine ala CRDRIVER 425 MOVL #SS$ ILLIOFUNC,RO Assume wrong UCB 426 BBS #DEV$V ODV,UCB$L DEVCHAR(R5),5$ Check for purrch UCB 427 JMP GAEXE$ABORTIO - Error if not 428 5$: MOVL Pl(AP),RO Get add. of buffer 429 MOVZWL P2(AP) ,Rl Get length of buffer 430 BEQL 10$ Zero length transfer? 431 JSB GAEXE$WRITECHK Check access of user 432 buffer -- no return if 433 no accessibility 434 MOVW Rl ,IRP$W BCNT(R3) 435 PUSHR #AM<RO,R3> Save user buffer len. Save registers 436 ADDL2 #BUF OVR HD,R1 Account for overhead 437 JSB GAEXE$BUFFRQUOTA Check buffer quota 438 BLBC R0,20$ Abort if insufficient 439 JSB GAEXE$ALLOCBUF Al locate system buffer 440 BLBC R0,20$ Abort on failure 441 POPR #AM<RO,R3> Restore registers 442 MOVL R2,IRP$L SVAPTE(R3) 443 MOVW R1,IRP$W-BOFF(R3) 444 PUSHL RO - Store returned buf add And byte quota charged Save reg. 445 MOVL PCB$L JIB(R4),RO Get JIB address 446 SUBL Rl,JIB$L BVTCNT(RO) 447 POPL RO - Charge process for buf Restore reg. PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Mac~o V03-0l Page 11 PT_FDT ROUTINE, Punch FDT routine 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 38 BB 0110 448 53 52 oc Cl 0112 449 82 53 DO 0116 450 62 50 DO 0119 451 51 oc C2 011 C 452 63 60 51 28 011 F 453 0123 454 38 BA 0123 455 59 20 A3 BO 0125 456 28 59 06 00 ED 012~ 457 012E 458 43 13 012E 459 OOOOOOOO'GF 17 0130 460 0136 461 0136 462 0136 463 0136 464 0136 465 50 01 3C 0136 466 10$: OOOOOOOO'GF oc 17 0139 BA 013F 467 468 20$: OOOOOOOO'GF 17 0141 469 0147 470 0147 471 PUSHR ADDL3 MOVL MOVL SUBL2 MOVC3 POPR MOVW CMPZV BEQL JMP #AM<R3,R4,R5> #BUF OVR HD,R2,R3 R3, (R2)+- RO, (R2) #BUF OVR HD,Rl Rl, (RO) ,(R3) #/\M<R3,R4,R5> IRP$W FUNC(R3),R9 , SA#IO$V FCODE,SA#l0$S FCODE,R9,-; SA#I0$ WRITEOF - TO ACP- GAEXE$QIODRVPKT Save reg. 's for MOVC3 Find system data area Save its address Save user buffer add. Set transfer length Copy user buffer to system data buffer Restore reg. 's Get function code See if WRITEOF $QIO If so, Queue IRP to ACP Queue driver packet FDT routine done Entered on zero-length transfer or al location failure MOVZWL JMP POPR JMP #SS$ NORMAL,RO GAEXE$FINISHIOC #AM<R2,R3> GAEXE$ABORTIO .SBTTL ACP FDT ACP $QIO FDT Routine Normal completion Goto finish I/O Clean up stack Quota or buffer allocation failure PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-0l Page 12 ACP_FDT ACP $QIO FDT Routine 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(l) 50 24 02 64 A5 09 OB 50 007C BF OOOOOOOO'GF 50 34 A5 EF 06 00 28 20 A3 07 FF49 50 34 A5 OC AO OOOOOOOO'GF 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 0147 3C 0147 014A E5 0150 11 0155 3C 0157 17 015C 0162 DO 0162 13 0166 ED 0168 0168 12 Ol6E 31 0170 DO 0173 0177 B6 017A 17 0170 0183 473 ;++ 474 ACP FDT, ACP $QIO FDT routine 475 476 Functional description: 477 478 This FDT routine increments the transaction count in the VCB, 479 and queues the IRP to the paper tape ACP (PCACP). It is 480 used for the MOUNT $QIO. MOUNT privilege is required to 481 successfully issue the MOUNT $QIO request. 482 483 Entry point Q TO ACP is used to service both the WRITEOF and 484 ACPCONTROL $QI0s~ Control is re-transferred to TO ACP from 485 routine PT_FDT_ROUTINE in the case of a WRITEO~, $QIO. 486 487 No check is made on the punch or reader UCB, since 488 requests for ACP operation will find the errors. 489 490 Inputs: 491 492 RO-R2 - scratch registers 493 R3 - address of the IRP (I/O request packet) 494 R4 - address of the PCB (process control block) 495 R5 - address of the UCB (unit control block) 496 R6 - address of the CCB (channel control block) 497 R7 - bit number of the I/O function code 498 R8 - address of the FDT table entry for this routine 499 R9-R 11 - scratch registers 500 AP - address of the 1st function dependent $QIO parameter 501 502 Outputs: 503 504 The routine must preserve all registers except RO-R2, and 505 R9-R 11. 586 507 508 509 ACP FDT: MOUNT $QIO issued 510 - MOVZWL #SS$ NOPRIV,RO ; Assume insuf. priv. 511 IFNPRIV MOUNT,NO PRIV ; Have MOUNT privilege? 512 BBCC #UCB$V MOUNTING,UCB$W STS(R5),NT MNT ; If clr, not sync. 513 BRB Q TO ACP - ; Yes, continue 514 NT MNT: MOVZWL #SS$-DEVNOTMOUNT,RO ; Not mounting status 515 NO-PRIV:JMP GAEXE$ABORTIO ; Signal error 516 Q TO ACP: 517 - - MOVL UCB$L VCB(R5),RO IRP request okay Get VCB address 518 BEQL NT MNT Is ACP mounted? 519 CMPZV SA#IO$V FCODE,SA#IO$S FCODE,- Check for WRITEOF 520 IRP$W FUNC(R3),SA#I0$-WRITEOF Function code 521 BNEQ NT WRT - If neq, Q to ACP 522 BRW PT-FDT ROUT! NE If eq l , WR ITEOF 523 TO ACP: MOVL UCB$L VCB(R5),RO Restore VCB address 524 NT-WRT: SETI PL #IPL$-SYNCH Synch. access to VCB 525 INCW VCB$W-TRANS(RO) Increment trans. count 526 JMP GAEXE$QIOACPPKT , Queue IRP to ACP 527 .SBTTL NULL BYTES FDT Routines for header/trailer PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 13 NULL_BYTES FDT Routines for header/trail 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 50 OOOOOOF4 SF 06 38 A5 1B OOOOOOOO'GF 50 01 38 A3 04 AC OOOOOOOO'GF 0183 0183 0183 0183 0183 DO 0183 EO 018A 17 018F DO 0195 05 0198 0199 3C 0199 17 019E 01A4 01A4 529 530 ; FDT routines for processing MODIFY, DELETE, and DEACCESS 531 ; $QIOS. Very similar, and very simple. 532 533 F' OR_PNCH: ; Have punch UCB? 534 MOVL #SS$ ILLIOFUNC,RO ; Assume not 535 BBS #DEV$V ODV,UCB$L DEVCHAR(R5),5$ ; Check for punch 536 JMP GAEXE$ABORTIO - ; Not punch UCB 537 5$: MOVL #SS$_NORMAL,RO ; Have punch 538 RSB ; Return to FDT table 539 SET_FDT: ; Get ~, nul 1 bytes 540 MOVZWL P2(AP),IRP$L MEDIA(R3) ; Store # .of nu 11 bytes 541 JMP GAEXE$QIODRVPKT ; Synchronize with other 542 ; I/O requests for unit 543 . SBTTL PR_FDT ROUTINE Reader FDT Routine PCDRIVER V06 ~VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-0l Page 14 PR_FDT_ROUTINE Reader FDT Routine 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 50 OOOOOOF4 SF DO 06 36 A5 1A EO OOOOOOOO'GF 17 50 6C DO 51 04 AC 3C 46 13 OOOOOOOO'GF 16 32 A3 51 BO 09 BB 51 OC co OOOOOOOO'GF 16 37 50 E9 OOOOOOOO'GF 16 2E 50 E9 09 BA 2C A3 52 DO 30 A3 51 BO 50 DD 50 0080 C4 DO 20 AO 51 C2 50 BEDO 82 QC A2 9E 62 50 DO OOOOOOOO'GF 17 50 01 3C OOOOOOOO'GF 17 QC BA OOOOOOOO'GF 17 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4_ 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 01A4 OlAB 01BO 01B6 01B9 01BD 01BF 01C5 01C5 01C5 01C9 01CB 01CE 0104 0107 0100 01EO 01E2 01E6 01EA 01EC 01F1 01F5 01F8 OlFC 01FF 0205 0205 0208 020E 0210 545 ;++ 546 PR FDT_ROUTINE, READER FDT routine 547 548 Functional description: 549 550 This FDT routine makes all the standard accessibility checks 551 for buffered I/0 operations, and allocates a buffer from system 552 pool (into which the data will be read). 553 The standard IRP and PCB fields are updated. 554 A check is made to determine if the reader UCB is being 555 referenced. 556 Inputs: 557 RO-R2 - scratch registers 558 R3 - address of the IRP (I/O request packet) 559 R4 - address of the PCB (process control block) 560 RS - address of the UCB (unit control block) 561 R6 - address of the CCB (channel control block) 562 R7 - bit number of the I/O function code 563 RB - address of the FDT table entry for this routine 564 R9-R 11 - scratch registers 565 AP - address of the 1st function dependent $010 parameter 566 Outputs: 567 The routine must preserve all registers except RO-R2, and 568 R9-R 11. 569 570 PR FDT ROUTINE: ; reader FDTroutine ala CRDRIVER 571 MOVL #SS$ ILLIOFUNC,RO Assume wrong UCB 572 BBS #DEv$v IDV,UCB$L DEVCHAR(R5),5$ Test for reader UCB 573 JMP GAEXE$ABORTIO - Error if not 574 5$: MOVL Pl(AP),RO Get add. of buffer 575 MOVZWL P2(AP) ,Rl Get length of buffer 576 BEQL 10$ Zero length transfer? 577 JSB GAEXE$READCHK Check access of user 578 buffer -- no return if 579 no accessibility 580 MOVW R1,IRP$W BCNT(R3) Save user buffer len. 581 PUSHR #AM<RO,R3> Save registers 582 ADDL2 #BUF OVR HD,Rl Account for overhead 583 JSB GAEXE$BUFFRQUOTA Check buffer quota 584 BLBC R0,20$ Abort if insufficient 585 JSB GAEXE$ALLOCBUF Allocate system buffer 586 BLBC R0,20$ Abort on failure 587 POPR #AM<RO,R3> Restore registers 588 MOVL R2,IRP$L SVAPTE(R3) Store returned buf add 589 MOVW R1,IRP$W-BOFF(R3) 590 PUSHL RO - And byte quota charged Save reg. 591 MOVL PCB$L JIB(R4),RO 592 SUBL R1,JI~$L BVTCNT(RO) 593 POPL RO - Get JIB address Charge process for buf Restore reg. 594 MOVAB BUF OVR HD(R2),(R2)+ Save data area add. 595 MOVL RO,(R2)- Save user buffer add. 596 JMP GAEXE$QIODRVPKT Queue driver packet 597 Entered on zero-length transfer or al location failure 598 10$: MOVZWL #SS$ NORMAL,RO Normal completion 599 JMP GAEXE$FINISHIOC Goto finish I/O 600 20$: POPR #AM<R2,R3> Clean up stack 601 JMP GAEXE$ABORTI 0 Quota or buffer PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 15 PR_FDT_ROUTINE Reader FQT Routine 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 0216 602 0216 603 .SBTTL PT START, Start I/O routine ; al location failure PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-19S4 17:59:27 VAX-11 Macro V03-0l Page 16 PT_START, Start 1/0 routine 22-AUG-19S4 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 00 64 A5 05 009A C5 20 A3 06 00 36 20 A3 4D 06 00 34 20 A3 4C 06 00 35 20 A3 2E 06 00 33 20 A3 19 06 00 37 20 A3 3A 11 3S A5 lA 6S A5 01 6S A5 0100 SF 11 EF 38 A5 lA 68 A5 0201 8F 04 42 A5 32 51 50 01 42 A5 3S A3 EE 51 42 A5 EA 03 2A A3 01 024C 0216 0216 0216 0216 0216 0216 0216 E4 0216 BO 0218 0221. ED 0221 0224 13 0227 ED 0229 022C 13 022F ED 0231 0234 13 0237 ED 0239 023C 13 023F ED 0241 0244 12 0247 EO 0249 AA 024E AS 0252 11 0258 EO 025A A8 025F 11 0265 BO 0267 04 0268 DO 026D 0270 BO 0276 11 027B 3C 027D 11 0281 El 0283 31 02SS 02SB 605 606 607 Enter here at the start of an I/O operation. The first step 608 is to determine what I/O function code was specified in the 609 $QIO being serviced. 610 611 PT START: Det. func. req. 612 BBSC #UCB$V POWER,UCB$W STS(R5),1$ Make sure bit clear 613 1$: MOVW IRP$W_FUNC(R3),UCB$W_FUNC(R5) Allow inhibit of error 614 logging via modifiers 615 CMPZV #IRP$V FCODE,#IRP$S FCODE,- Look for MODIFY $QIO 616 IRP$W FUNC(R3),#IO$-MODIFY 617 BEQL 10$ - - Found if eql 618 CMPZV #IRP$V FCODE,#IRP$S FCODE,- Look for DEACCESS $QIO 619 IRP$W FUNC(R3),#IO$~DEACCESS 620 BEQL 20$ - - Found if eql 621 CMPZV #IRP$V FCODE,#IRP$S FCODE,- Look for DELETE $010 622 IRP$W FUNC(R3),#IO$-DELETE 623 BEQL 3$ - - Found if eql 624 CMPZV #IRP$V FCODE,#IRP$S FCODE,- Look for CREATE $QIO 625 IRP$W FUNC(R3),#IO$-CREATE 626 BEQL 30$ - Found if eql 627 CMPZV #IRP$V FCODE,#IRP$S FCODE,- Look for READPROMPT 628 IRP$W FUNC(R3),#IO$-READPROMPT $QIO 629 BNEQ 100$ - - Read/write if neq 630 BBS #DEV$V IDV,UCB$L DEVCHAR(R5),2$ Reader? dsable--> set 631 25$: BICW #BITO,UCB$W DEVSTS(R5) Enable function 632 BISW #BITS,UCB$W-DEVSTS(R5) Mark enable for read phys. 633 BRB 5$ - ' A11 done 634 30$: BBS #DEV$V IDV,UCB$L DEVCHAR(R5),25$; Reader? enable-->clr 635 2$: 636 BISW BRB #BITO!BIT9,UCB$W-DEVSTS(R5) 5$ - Disable function All done 637 3$: 638 5$: MOVW CLRL #NULL BYTES,UCB$W DEVBUFSIZ(R5) Rl - Reset# of null bytes No dev. dep. info. 639 7$: MOVL #SS$_NORMAL,RO Successful completion 640 REQCOM , All done 641 10$: MOVW IRP$L MEDIA(R3),UCB$W D~VBUFSIZ(R5) ; Set# null bytes 642 BRB 5$ - - ; And finish up 643 20$: MOVZWL UCB$W DEVBUFSIZ(R5),Rl ; Read# null bytes 644 BRB 7$ - ; And finish up 645 100$: BBC #IRP$V FUNC,IRP$W STS(R3),PT PUNCH ; Write if clear 646 BRW PR START - - ; Otherwise, read func 647 .SBTTL PT=PUNCH, Start a punch operation PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 17 PT_PUNCH, Start a punch operation 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 68 A5 10 78 A5 ~2c A3 78 A5 oc 50 24 A5 54 2C BO 04 A4 0040 SF 08 68 A5 01 OOA8 C5 5C A5 03 0084 68 A5 10 2A 50 20 A3 OB 50 06 00 0288 028B 0288 0288 02S8 028B 028B 0288 02SB 0288 0288 028B 028B 0288 028B 0288 028B 0288 0288 0288 028B 028B 0288 02S8 02S8 0288 0288 0288 0288 0288 028B 028B 0288 02SB 0288 0288 0288 0288 0288 AA 0288 70 028F 0294 co 0294 0298 0298 DO 0298 DO 029C AS 02.AO E2 02A6 BO 02A6 11 0281 31 0283 83 0286 12 028A BO 028C ED 02CO 02C5 649 ;++ 650 PT PUNCH - Start a punch operation 651 652 Functional description: 653 654 The punch interrupt enable bit is set. One character at a 655 time (from the system buffer pointed to by UC8$L SVAPTE) is 656 moved to the punch's data buffer, and an interrupt is awaited. 657 If powerfail occurs, the entire operation is retried (if it is 658 the first $QIO for the user); otherwise, the operation is aborted 659 (unless the powerfail occurs while punching the trailer, in 660 which case the entire trailer may not be punched). In the case 661 of an aborted punch, the high-order word of the first longword 662 in the IOS8 will contain the number of bytes punched before the 663 powerfail occurred (error code= SS$ TAPEPOSLOST). 664 665 A counter is kept on the number of bytes left to be punched 666 (UCB$W BCNT). When this counter goes to zero, the request 667 is complete. 668 669 In the case of a virtual or logical I/O operation 670 a header of UC8$W DEVBUFSIZ nul 1 bytes is punched 671 before the actual-data is punched; similarly a trailer 672 tape (of UCB$W DEV8UFSIZ null bytes) is punched when the 673 channel to the-punch is deassigned/deallocated by the 674 user (in the cancel I/O routine (PT CANCEL)). The user can 675 suppress the defaults and/or punchi;g an EOF byte (cntrl-Z). 676 677 Inputs: 678 R3 - address of the IRP (I/O request packet) 679 R5 - address of the UCB (unit control block) 680 Outputs: 681 RO - 1st longword of I/0 status: contains status code and 6S2 number of bytes transferred 683 R1 - 2nd longword of I/0 status: device-dependent 684 685 The routine must preserve all registers except RO-R2 and R4. 686 6S7 PT PUNCH: 688 . - BICW #END,UCB$W DEVSTS(R5) ; Process an I/O packet ; Not punching trailer 689 MOVQ IRP$L SVAPfE(R3),UC8$L SVAPTE(R5); Note quad transfer 690 - - ; for powerfail recovery 691 ADDL2 #BUF OVR HD,UCB$L SVAPTE(R5) ; Skip sys buf header 692 PNCH HOR: -- - Trailer punch entry pt 693 - .ENABL LSB 694 MOVL UCB$L CRB(R5),RO ; Get CRB 695 MOVL @CR8$L INTD+VEC$L IDB(RO),R4 ; Get CSR address 696 8ISW #PT ST~ M IE,PT P~S(R4) ; Set int. enable bit 697 8BSS #PUNCH HDR,UCB$W DEVSTS(R5),5$ ; Hdr already pnchd? 698 MOVW UCB$W REFC(R5),U~~$W MY REFCNT(R5) ; Save reference count 699 BR8 10$ - -- ; No - punch header 700 5$: BRW MAINLP ; Punch data 701 10$: BITW #ENO,UCB$W DEVSTS(R5) ; Punching trailer? 702 BNEQ 12$ - ; Yes, if neq 703 MOVW IRP$W FUNC(R3),RO ; Get function code 704 CMPZV $A#IO$v FCODE,SA#IO$S FCODE,RO,-; No header punched for 705 SA#l0$_WRITEPBLK - ; Physical I/O func. PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 18 PT_PUNCH, Start a punch operation 22-AUG-1984 20:06:00 WORK2: [COURSE.DRIVER]PCDRIVER.MAR;(1) OF 6B A5 0200 BF 04 6B A5 01 0094 68 A5 OD 68 A5 0100 BF 04 68 A5 01 44 A5 42 A5 68 A5 10 1F 68 A5 01 19 44 A5 OOA 7 C5 1 A 39 64 A5 05 06 A4 1A 14 OOA7 C5 00 23 64 A5 05 06 A4 00 0065 44 A5 DF 68 A5 04 68 A5 10 2A 0318 00 68 A5 01 68 A5 10 07 53 58 A5 FF40 008D 68 A5 10 01 00 68 A5 01 OOF5 03 64 A5 03 0152 OOA7 C5 78 85 5E 64 A5 05 12 02C5 83 02C7 13 02CD AB 02CF 31 02D3 AB 02D6 83 02DA 13 02EO AA 02E2 3C 02E6 83 02EB 13 02EF 83 02F1 13 02F5 D6 02F7 90 02FA 02FF E4 0305 90 030A 11 030E 90 0310 0315 E4 031B 90 0320 0324 032E 032E 032E 31 032E D7 0331 12 0334 AA 0336 B3 033A 13 033E 31 0340 0343 0343 E4 0346 B3 034B 13 034F DO 0351 31 0355 31 0358 035B B3 0358 13 035F 05 0361 E4 0362 31 0367 036A El 036A 31 036F 0372 90 0379 037F 037F E4 0382 706 BNEQ 11 $ ; Not phys. if neq 707 BITW #BIT9,UCB$W DEVSTS(R5) 70B BEQL B$ - ; Want trailer byte? ; No, if eql 709 BISW #BITO,UCB$W DEVSTS(R5) ; Mark want trailer 710 8$: BRW MAINLP - ; Skip header punching 711 11$: BISW #PNCH!BITO!START,UCB$W DEVSTS(R5) ; Set flag bits 712 BITW #BIT8,UCB$W DEVSTS(R5)- ; No EOF byte? 713 BEQL 12$ - ; No, if eql 714 BICW #BITO,UCB$W DEVSTS(R5) ; No EOF byte, if neq 715 12$: MOVZWL UCB$W DEVBUFSIZ(R5),UCB$L DEVDEPEND(R5); Set# nullbytes 716 BITW #END,TICB$W DEVSTS(R5) - ; Punching trailer? 717 BEQL NUL - ; No, if eql 718 BITW #BITO,UCB$W DEVSTS(R5) ; Punch EOF byte? 719 BEQL NUL - ; No if eql 720 INCL UCB$L DEVDEPEND(R5) ; One extra byte pnchd. 721 PUNEOF: MOV8 #EOF,TICB$B PT PP8(R5) 722 DSBINT - ; Save for error log. Raise to powerfail 723 B8SC #UCB$V POWER,UCB$W STS(R5),20$ Check for powerfail 724 MOV8 #EOF,PT PPB(R4) - Punch EOF byte 725 BRB WAIT - Wait for interrupt 726 NUL: MOVB #NULL,UCB$B PT PPB(R5) Save for err. log. 727 NULLP: DSBINT No interrupts 72B BBSC #UCB$V POWER,tlCB$W STS(R5),20$ Check for powerfail 729 MOVB #NULL,PT PPB(R4) - Punch nul 1 byte 730 WAIT: WFIKPCH 25$,#PT TIMEOUT SEC Wait for I/O comp. 731 732 Enter here after interrupt service routine 733 734 BRW AFT INT Check for errors 735 BACK: DECL UCB$L DEVDEPEND(R5) Dec null byte count 736 BNEQ NULLP- Loop if more to punch 737 BICW #START, UCB$W DEVSTS(R5) Clear hdr. punch flag 738 BITW #END,UCB$W DEVSTS(R5) Punching header? 739 BEQL MAIN LP Yes if eql 740 BRW INCAN Returri for trailer 741 20$: Powerfai l recovery 742 ENBINT Allow interrupts 743 BBSC #PUNCH HDR,UCB$W DEVSTS(R5),22$ Clear hdr. pnchd flag 744 22$: BITW #END,UCB$W DEVSTS(R5) Header or trailer? 745 BEQL 23$ - Header if eql 746 MOVL UCB$L IRP(R5),R3 Retrieve iRP address 747 BRW PNCH HOR Retry punching trailer 748 23$: BRW POW_FAIL Retry punching header 749 after powerfai 1 recov. 750 25$: 751 BITW BEQL #END,UCB$W DEVSTS(R5) 30$ - Header or trailer? Header if equal 752 RSB Return if trailer 753 30$: BBSC #PUNCH HDR,UCB$W DEVSTS(R5),35$ Report timeout 754 35$: BRW PT TIMEOUT - Make sure flag clear 755 .DSABL LSB 756 MAINLP: BBC #UCB$V CANCEL,UCB$W STS(R5),1$ Check for $CANCEL 757 8RW CANCEL- - $CANCEL if set 758 1$: DSBINT UCB$B DIPL(R5) No device interrupts 759 MOVB @UCB$L SVAPTE(R5),UCB$B PT PPB(R5) ; Save data for err. 760 ; log buf. dump routine 761 SETI PL #IPL$ POWER ; Raise to powerfail 762 BBSC #UCB$V_POWER,UCB$W_STS(R5),PT_RESTART ; Powerfail? PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 19 PT_PUNCH, Start a punch operation 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(l) 06 A4 78 95 OOA4 C5 04 A4 OOA4 C5 0080 SF 66 OOA4 C5 8000 BF 5D 68 A5 04 03 FF74 78 A5 7E A5 AS 04 A4 0040 SF 00 68 A5 07 10 32 A3 50 10 50 01 68 A5 20 51 OF 68 A5 07 53 58 A5 00 68 A5 01 FE92 0287 90 0387 038C 0396 0396 0396 BO 0396 039C 039C B3 03A2 13 03A~ 83 03AB 12 03B2 83 03B4 13 03B8 31 03BA D6 03BD 03CO B7 03CO 12 03C3 AA 03C5 E3 03CB 03DO 03DO FO 0300 0304 BO 03D6 0309 0309 03D9 03D9 AA 0309 D4 03DO 03DF 03E5 03E5 03E5 03E5 03E5 03E5 03E8 ED 03E8 03EO DO 03ED E4 03Fl 31 03F6 03F9 03F9 03F9 03F9 03F9 03F9 03FC 30 03FC 03FF 03FF 03FF 03FF 763 MOVB @UCB$L SVAPTE(R5),PT PPB(R4) Load punch data buffer 764 WFIKPCH PT_TIMEOUT,#PT_TIMEOUT_SEC 10 sec. timeout 765 766 Enter here from interrupt service routine (PT_INTERRUPT) 767 768 AFTINT: MOVW PT PPS(R4),UCB$W_PT_PPS(R5) Read CSR (save for 769 error logging later) 770 771 IO FORK BITW #PT STS M READY,UCB$W PT PPS(R5);' Return to fork level Punch ready again? 772 BEQL PT ERROR - -- ; If so, error 773 BITW #PT STS M ERROR,UCB$W PT PPS(R5); Error during punch? 774 BNEQ PT ERROR - -- Yes, report it 775 BITW #START,UCB$W DEVSTS(R5) 776 BEQL 10$ - Punching user data? Yes, if eql 777 BRW BACK Punching header/tralr 778 10$: INCL UCB$L SVAPTE(R5) Point to next byte to 779 be punched 780 OECW UCB$W BCNT(R5) Decrement byte count 781 BNEQ MAINLP Al 1 done? 782 BICW #PT STS M IE,PT PPS(R4) , Clear int. enable bit 783 BBCS #STARTING~UCB$W-DEVSTS(R5),FINISH ; Punched >= 1 aper. 784 ; After a transfer completes successfully, return the number of bytes 785 ; transferred and a success status code. 786 FINISH: INSV IRP$W BCNT(R3),#16,- Load number of bytes trans- 787 #16,RO ferred into high word of RO. 788 MOVW #SS$_NORMAL,RO Load a success code into RO. 789 790 Call I/0 postprocessing. 791 792 COMPLETE IO: , Driver processing is finished. 793 BICW #RD HDR,UCB$W DEVSTS(R5); Make sure reader flag clear 794 CLRL Rl - : No device dependent information 795 REQCOM Complete 1/0. 796 797 Recover from powerfail by retrying entire operation (for punch). 798 If powerfai 1 occurred on first $QIO request from user. 799 800 PT RESTART: ; Powerfail entry point 801 ENBINT ; Allow interrupts (POP IPL) 802 POW FAIL: 803 - BBS ; Enter after timeout #STARTING,UCB$W DEVSTS(R5),POWER FAIL ; No recovery if 804 - ; not punching 1st rec. 805 MOVL UCB$L IRP(R5),R3 ; Retrieve IRP address 806 BBSC #PUNCH HDR,UCB$W DEVSTS(R5),1$ ; Clear header punched bit 807 1$: BRW PT PUNCH - ; And retry operation 808 No recovery,possible from reader powerfail; tell user how many 809 bytes read before powerfail occurred. Also, no recovery from 810 punch if not punching 1st $QIO request for this user. Tell user 811 how many bytes were punched before powerfail occurred. 812 PR POWFAIL: ; Powerfail entry point 813 ENBINT ; Al low interrupts (POP IPL) 814 POWER FAIL: ; Enter after timeout 815 BSBW SETOFF ; Clear int. enable bit 816 Note that a BSB-RSB sequence can be used since 817 the subroutine wil 1 not cal 1 any system macros 818 or routines (which would cause unpredictable 819 results when control would be returned to the PCDRIVER V06 32 A3 7E A5 50 10 10 32 A3 50 0224 SF CB 0272 OOOOOOOO'GF 50 OOBC SF 32 A3 7E A5 50 10· 10 32 A3 AD 0257 32 A3 7E A5 50 10 10 32 A3 50 OB70 BF 00 6B A5 01 FF92 50 OOOOOB70 BF FF88 A2 64 A5 05 11 FFB9 3S 3S A5 1A EF 64 A5 05 52 64 A5 03 29 38 A5 16 BO 68 A5 07 0099 OOA6 C5 01 OF OOA6 C5 1S 54 00'8F 53 OOOOOOOO'GF OOOOOOOO'GF - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-19B4 17:59:27 VAX-11 Macro V03-0l Page 20 PT_PUNCH, Start a punch operation 22-AUG-1984 20:-06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 03FF A2 03FF FO 0404 BO D40A 11 040F 0411 0411 0411 0411 0411 30 04.11 16 0414 3C 041A A2 D41F FO D424 11 042A 042C 042C 042C 042C 042C 042C 042C 042C 042C 30 042C A2 042F FD 0434 BO 043A E3 043F 0444 0444 31 0444 DO 0447 31 044E 0451 0451 0451 0451 0451 D451 E4 0455 11 045A 31 045C 045F 045F ED 0463 E4 D46B EO 0460 EO 0472 EO 0477 9D 047C 94 0484 BB 0488 9A 048A 9E 048E 16 0495 82D caller's caller) 821 SUBW2 UCB$W BCNT(R5),IRP$W BCNT(R3) Record bytes read/pun. 822 INSV IRP$W-BCNT(R3),#16,#l6,RO For status return 823 MOVW #SS$ TAPEPOSLOST,RD B24 BRB COMPLETE IO Return status Complete I/O 825 826 Device error has occurred signal via SS$_DRVERR 827 error code 828 829 P' T ERROR: Error handling 830 BSBW SETOFF ; Clear interrupt enable bit 831 JSB GAERL$DEVICERR ; Report device error 832 MOVZWL #SS$ DRVERR,RD ; Return error status B33 SUBW2 UCB$W BCNT(R5),IRP$W BCNT(R3) ; Record bytes read/pun. 834 INSV IRP$W-BCNT(R3),#16,#l6,RD ; For status return 835 BRB COMPLETE IO ; Cal 1 I/O postprocessing 836 837 Assume that "no more tape in reader" is error generated, and 838 tell user how many bytes were read before error was encountered 839 in case P2 parameter specified more bytes than were read. 840 841 PR SPERR: Entered if no tape in reader, 842 reader off-line after at least 843 one previous character read, 844 or no power to reader 845 BSBW SETOFF Clear int. enable bit 846 SUBW2 UCB$W BCNT(R5),IRP$W BCNT(R3) Store num bytes read 847 INSV IRP$W-BCNT(R3),#16,#l6,RO In return status 84B MOVW #SS$ ENDOFFILE,RD Set return status code 849 BBCS #PUNCH_HDR,UCB$W_DEVSTS(R5),DON Special case for $COPY 85D so that reading will end on end B51 of file (COPY issues 2nd read) B52 DON: BRW COMPLETE IO Complete I/O B53 COPY: MOVL #SS$ ENDOFFILE,RD Fudge return to COPY B54 BRW COMPLETE IO Finish operation 855 856 Device timeout handling. Return an error status code for punch. B57 Send message to operator, and loop until reader is set Online. 858 B59 P' R TIMEOUT: B6D - SETI PL UCB$B FIPL(R5) ; Timeout handling ; Lower to fork first B61 BBSC #UCB$V POWER,UCB$W STS(R5),POWER FAiL ; Powerfail? B62 BRB COMMON- - ; Enter common timeout code B63 SKIP2: BRW POW FAIL ; Handle powerfail 864 PT TIMEOUT: ; Timeout handling 865 SETI PL UCB$B FIPL(R5) ; Lower to fork first 866 BBS #DEV$V IDV,UCB$L DEVCHAR(R5),PUN OT ; Reader timeout? 867 BBSC #UCB$V-POWER,UCB$W STS(R5),SKIP2; Powerfail? 868 COMMON: BBS #UC8$V-CANCEL,UC8$W STS(R5),CANCEL ; Cancel I/O? B69 BBS #DEV$V-ODV,UCB$L DEVCHAR(R5),PUN OT ; Punch timeout? 870 BBS #STARTING,UCB$W DEVSTS(R5),PR SPERR ; Reader EOF err? 871 ACBB #LOOP CNT,#1,UCB$B PT OFLCNT(R5),MAIN ; Rdr-wait 30 sec. 872 CLRB UCB$B-PT OFLCNT(R5) - 873 PUSHR #AM<R~.R~> ; Clear off-line counter ; Save registers 874 MOVZBL #MSG$ DEVOFFLIN,R4 ; Set message type ·975 MOVAB GASYS$GL OPRMBX,R3 ; Get opr. mbx. address 876 JSB GAEXE$SNDEVMSG ; Send rnsg. to opr. PCORIVER V06 so so - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 21 PT PUNCH, Start a punch operation 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 18 0070 03 64 AS OS FFS4 0108 OOOOOOOO'GF SO 022C SF 32 A3 7E AS 10 10 32 A3 FFlS 32 A3 7E AS 10 10 32 A3 so 0830 SF FF02 BA 0498 31 0490 04AO 04AO 04AO 04AO 04AO 04AO 04AO 04AO 04AO 04AO 04AO 04AO 04AO E5 04AO 31 04A5 30 04AS 16 04A8 3C 0481 A2 0486 FO 0488 31 04Cl 04C4 A2 04C4 FO 04C9 BO 04CF 31 0404 0407 877 POPR #AM<R3,R4> Restore registers 87S BRW MAIN Try again 879 880 Note that the punch is always assumed to be on-line, and 881 an error is recorded if it is not. Also, the I/O request 882 is terminated with an error code. (There is no on/off switch 8S3 for the punch unit on the PC11). The reader does have an 884 on/off switch, and the I/0 operation is retried until the 8S5 reader unit is set on-line, with a message being sent to 8S6 the operator's mailbox (console) every 30 seconds informing 887 the operator that the paper-tape reader (PCO:) is off-line. 888 If an error occurs after some data has been read, it is 889 assumed that the error is "no more tape in reader" rather 890 than "reader is off-1 ine". 891 892 P' UN OT: BBCC #UCB$V POWER,UCB$W STS(R5),1$ ; Reader powerfail? 893 BRW POWER FAIL - ; Yes, go report powerfail 894 1$: BSBW SETOFF ; Clear interrupt enable bit 89S JSB GAERL$DEVICTMO ; Report timeout error 896 MOVZWL #SS$ TIMEOUT,RO ; Return error status. 897 SUBW2 UCB$W BCNT(R5),IRP$W BCNT(R3) ; Record bytes read/pun. 898 INSV IRP$W-BCNT(R3),#16,#l6,RO ; For status return 899 BRW COMPLETE IO ; Call I/O postprocessing. 900 CANCEL: - ; Handle cancel I/0 901 SUBW2 UCB$W BCNT(R5),IRP$W BCNT(R3) ; Num bytes read/punch 902 INSV IRP$W-BCNT(R3),#16,#l6,RO ; In return status 903 MOVW #SS$ CANCEL,RO Return cancel error status 904 BRW COMP[ETE IO Call I/O postprocessing 905 .SBTTL PR START~ Start I/O rout ne (Reader) PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-0l Page 22 PR START, Start 1/0 routine (Reader) 22-AUG-1984 20:06:00 WORK2: [COURSE.DRIVER)PCDRIVER.MAR;(l) 03 6S A5 01 FF6S 78 A5 2C B3 7E A5 32 A3 OOA6 C5 50 20 A3 27 6S A5 06 OOAS C5 5C A5 06 00 oc 50 OE 6S A5 20 6S A5 0200 BF OE OS 6S A5 0100 SF 04 68 A5 01 50 24 A5 54 2C BO 64 8000 BF 12 D8 04D7 04D7 04D7 04D7 04D7 04D7 04D7 04D7 04D7 04D7 0407 0407 04D7 04D7 04D7 0407 04D7 04D7 04D7 04D7 0407 04D7 04D7 04D7 0407 04D7 04D7 04D7 0407 0407 04D7 E5 04D7 31 04DC DO 04DF DO 04E4 94 04E9 BO 04ED E2 04Fl BO 04F6 ED 04FC 04FF 13 0501 AB 0503 93 0507 13 050D 11 050F 93 0511 12 0517 AS 0519 0510 DO 0524 DO 0528 B3 052C 13 0531 0533 053D 11 0543 907 ;++ 90S PR START - Start a reader operation 909 910 Functional description: 911 912 One character at a time (from the system buffer pointed to 913 by UCB$L SVAPTE) is moved to the reader's data buffer. The 914 interrupt enable bit is then set, after which powerfail is 915 tested for, and an interrupt is awaited. (If powerfail 916 occurs, the entire operation is aborted.) 917 918 A counter is kept on the number of bytes left to be read 919 (UCB$W BCNT). When this counter goes to zero, the request 920 is complete. The request is also considered complete when an 921 EOF byte is read, if looking for EOF bytes is enabled. 922 923 Before the first character is read (in a virtual or 924 logical I/O operation), the tape is first scanned for 925 the first non-null character (i.e. the header part of 926 the tape is skipped). In the case of a physical I/O 927 function, the header nul 1 bytes are considered data. 928 Inputs: 929 R3 - address of the IRP (I/O request packet) 930 R5 - address of the UCB (unit control block) 931 Outputs: 932 RO - 1st longword of I/0 status: contains status code and 933 number of bytes transferred 934 Rl - 2nd longword of I/O status: device-dependent 935 The routine must preserve al 1 registers except RO-R2 and R4. 936 937 PR START: ; Process ~n I/O packet 93S 939 BBCC BRW #PUNCH HDR,UCB$W DEVSTS(R5),1$ ; Special case for $COPY? COPY - ~ ; Yes, if bit set 940 1$: MOVL @IRP$L SVAPTE(R3),UCB$L SVAPTE(R5); Get buffer address 941 MOVL IRP$W BCNT(R3),UCB$W BCNT(R5) ; Byte count, and offset 942 CLRB UCB$B-PT OFLCNT(R5) - ; Clear off-line counter 943 MOVW IRP$W-FUNC(R3),RO ; Get function code 944 BBSS #FRST-QIO,UCB$W DEVSTS(R5),MAIN ; First $010? 945 MOVW UCB$W-REFC(R5),UCB$W MY REFCNT(R5) ; Save reference count 946 CMPZV SA#IO$v FCODE,SA#IO$S FCODE,- ; No header read if 947 R0,SA#IO$ READPBLK ; Phys. I/O operation 948 BEQL FIX - ; Continue processing 949 BISW #RD HDR,UCB$W DEVSTS(R5) ; Update default flags 950 BITW #BIT9,UC8$W DEVSTS(R5) ; Disable EOF search? 951 BEQL MAIN ; No, if eql 952 BRB DSABL ; Yes, if neq 953 FIX: 954 BITW BNEQ #BITS,UCB$W DEVSTS(R5) MAIN ~ ; Look for EOF bytes? ; Look for EOF bytes if eql 955 DSABL: BISW #BITO,UCB$W DEVST$(R5) ; Update default 956 MAIN: DSBINT UCB$B DIPL(R5) ; No device interrupts 957 MOVL UCB$L-CRB(R5),RO ; Get CRB 958 MOVL @CRB$L INTD+VEC$L IDB(RO),R4 ; Get CSR address 959 BITW #PT CSR M ERROR,PT PRS(R4) ; Reader on-line? 960 BEQL READ - - - ; If eql, yes 961 WFIKPCH PR TIMEOUT,#SHORT WAIT ; No, see if now on 962 IO FORK ; Lower to fork IPL 963 BRB MAIN : Check if on-1 ine PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 23 PR START, Start I/O routine (Reader) 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) 02 64 A5 05 03 FEA7 41 SF 64 OOA4 C5 64 OOA7 C5 02 A4 OOA4 C5 8000 8F 6S OOA4 C5 OSOO SF 5C OOA4 C5 OOSO SF 53 00 68 A5 07 6S A5 20 OB OOA7 C5 00 2A 6S A5 20 6S A5 01 OA OOA7 C5 1A 03 FE7A 78 B5 OOA7 C5 7S A5 7E A5 12 03 64 A5 03 FEFC FF73 64 0040 8F 00 6S A5 07 FDF1 FE2F 03 68 A5 07 FE42 FEBO 0545 E4 0548 11 0540 31 054F 9B 0552 0555 0556 0560 BO 0560 056~ 90 0565 0568 056B B3 0571 12 0578 83 057A 12 0581 83 0583 13 058A E3 058C 83 0591 13 0595 91 0597 13 059C AA 059E 63 05A2 12 05A6 91 05A8 12 05AO 31 05AF 90 05B2 06 05BS 05BB 87 05BB 13 05BE E 1 05CO 31 05C5 05C8 31 05CF AA 0502 E4 0507 31 05DC 31 050F E1 05E2 05E7 31 05E7 05EA 31 05EA 05ED 964 READ: 965 966 967 30$: 968 GO: 969 970 971 972 973 974 975 976 977 978 979 9SO 9S1 9S2 9S3 9S4 5$: 985 986 987 988 989 10$: 990 991 992 993 994 13$: 995 996 997 99S 999 1000 1001 15$: 1002 1003 25$: 1004 1005 30$: 1006 SKIP: 1007 SKI Pl: 100S 1009 1010 1011 40$: 1012 SETI PL #IPL$ POWER Raise to powerfail BBSC BRB #UCB$V POWER,UCB$W STS(R5),30$ GO - - Powerfa i 1? No, try operation BRW PR POWFAIL Ves--abort operation MOVZBW #PT CSR M IE!PT CSR M RDENA,- Start reader and PT PRS(R4) -- Enable reader int. WFIKPCH PT-TIMEOUT,#PT TIMEOUT SEC ; 10 sec. timeout Enter here-from interrupt service routine (PR INTERRUPT) MOVW PT PRS(R4),UCB$W PT_PPS(R5) Read CSR (and store for error logging) MOVB PT PRB(R4),UCB$B PT PPB(R5) Get data read (also keep for err. log.) IO FORK Lower IPL BITW BNEQ #PT CSR M ERROR,UCB$W PT PPS(R5); Error during read? SKIP1 - - -- Yes, special case BITW BNEQ #PT CSR M BUSV,UCB$W PT PPS(R5) SKIP - - -- Busy bit set? If so, error BITW BEQL #PT CSR M DONE,UCB$W PT PPS(R5) SKIP - - -- Done bit set? If not, error BBCS #STARTING,UCB$W DEVSTS(R5),5$ Read >= 1 char. BITW BEQL #RD HDR,UCB$W DEVSTS(RS) 10$- - Reading tape header? No, if eql CMPB #NULL,UCB$B PT PPB(RS) See if null byte BEQL 15$ If eq l , null BICW #RD HDR,UCB$W OEVSTS(R5) Not reading header now BITW #BITO,UCB$W OEVSTS(R5) Looking for EOF byte? BNEQ 13$ - No, if neq CMPB #EOF,UCB$B PT PPB(R5) EOF byte found? BNEQ 13$ No, if neq BRW PR SPERR Report EOF condition MOVB INCL UCB$B PT PPB(R5);@UCB$L SVAPTE(R5) ; Record data read UC~$L=SVAPTE(R5) Point to where next byte is to be read OECW BEQL UCB$W BCNT(R5) 25$ - Decrement byte count All done? BBC #UCB$V CANCEL,UCB$W STS(R5),15$ Check for $CANCEL BRW CANCEL- - $CANCEL if set DSBINT UCB$B DIPL(R5) BRW READ - Put IPL on stack Read next character BICW BBSC #PT CSR M IE,PT PRS(R4) #STARTING~UCB$W-DEVSTS(R5),30$ Clear int. enable bit Clear bit for next $QIO BRW FINI SH - And finish up BRW PT ERROR Need word offsets BBC #STARTING,UCB$W_DEVSTS(R5),40$ Retry if assume reader off-1 ine BRW PR SPERR Otherwise, assume no more tape in reader BRW COMMON , Need word offset .SBTTL PT INTERRUPT, Interrupt service routine PCDRIVER V06 53 9E 55 lC A3 07 53 9E 55 lB A3 54 63 01 64 A5 07 53 10 A5 QC B5 50 BE 52 BE 54 8E - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-0l Page 24 PT_INTERRUPT, Interrupt service routine 22-AUG-19B4 20:06:00 WORK2:[COURSE.DRIVER)PCDRIVER.MAR;(l) 05ED 1014 ;++ 05ED 1015 PT_INTERRUPT, Analyzes interrupts, processes solicited interrupts 05ED 1016 05ED 1017 Functional description: 05ED 101B 05ED 1019 This driver is for a multiple-unit controller, and the 05ED 1020 two interrupt service routines (PR INTERRUPT and PT INTERRUPT) 05ED 1021 are used to distinguish which unit-caused the interrupt. 05ED 1022 Common checking for solicited interrupts occurs after 05ED 1023 entry point INTCOM, where control is returned back to the 05ED 1024 driver after the appropriate WFIKPCH macro. 05ED 1025 05ED 1026 Inputs: 05ED 1027 05ED 1028 O(SP) - pointer to the address of the IDB 05ED 1029 4(SP) - saved RO 05ED 1030 8(SP) - saved R1 05ED 1031 12(SP) - saved R2 05ED 1032 16(SP) - saved R3 05ED 1033 20(SP) - saved R4 05ED 1034 24(SP) - saved R5 05ED 1035 28(SP) - saved PSL (program status longword) 05ED 1036 32(SP) - saved PC 05ED 1037 05ED 103B The IDB contains the CSR address and the UCB address. 05ED 1039 05ED 1040 Outputs: 05ED 1041 05ED 1042 The routine must preserve al 1 registers except RO-R5. 05ED 1043 05ED 1044 05ED 1045 PT INTERRUPT: DO 05ED 1046 ~ MOVL @(SP)+,R3 Service punch interrupt Get address of IDB and remove 05FO 1047 pointer from stack. DO 05FO 104B MOVL IDB$L UCBLST+4(R3),R5 Punch is unit# 1 (PC1:) 11 05F4 1049 BRB INT COM Go to common code 05F6 1050 PR INTERRUPT: Service reader interrupt DO 05F6 1051 MOVL @(SP)+,R3 Get IDB address DO 05F9 1052 MOVL IDB$L UCBLST(R3),R5 Reader is unit# 0 (PCO:) DO 05FD 1053 INTCOM: MOVL IDB$L-CSR(R3) ,R4 Get CSR address E5 0600 1054 BBCC #UCB$V INT,- If device does not expect 0602 1055 UCB$W STS(R5),- interrupt, dismiss it. 0604 1056 UNSOL=INTERRUPT 0605 1057 ; This is a solicited interrupt. Restore control to the main driver. 0605 1058 RESTORE DRIVER: Jump to main driver code. DO 0605 1059 MOVL UCB$L FR3(R5),R3 Restore driver's R3 16 0609 1060 JSB @UCB$L FPC(R5) Cal 1 driver at interrupt 060C 1061 wait address. 060C 1062 , Dismiss the interrupt. 060C 1063 UNSOL INTERRUPT: Dismiss unsolicited interrupt. 70 060C 1064 MOVQ (SP)+ , R0 Restore RO-R5 7D 060F 1065 MOVQ (SP)+,R2 This is faster than a 7D 0612 1066 MOVQ (SP)+,R4 POPR #AM<RO,Rl ,R2,R3,R4,R5> 02 0615 1067 REI , Return from interrupt. 0616 106B .SBTTL PT CANCEL, Cancel I/O routine PCDRIVER V06 OOA8 C5 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 25 PT_CANCEL, Cancel I/O routine 22-AUG-1984 20:06:00 WORK2:[GOURSE.DRIVER]PCDRIVER.MAR;(1) 5C A5 50 0616 1070 0616 1071 ;++ 0616 1072 PT CANCEL, Cancels an I/O operation in progress 0616 1073 0616 1074 Functional description: 0616 1075 0616 1076 This routine tests to see if the punch is being deallocated 0616 1077 or deassigned by checking the reference count field in the 0616 1078 UCB. It checks to see if a trailer needs to be punched, 0616 1079 and if so, then a trailer is punched (possibly with an 0616 1080 EOF byte). Also, regardless of whether a 0616 1081 header has been punched, the default number of null bytes to 0616 1082 punch in a header/trailer is restored to NULL BYTES. The 0616 1083 flag indicating that a header has not been punched is cleared 0616 1084 for the next I/O operation, as is the bit indicating that 0616 1085 the current $010 is the first $010 for the user (since the 0616 1086 channel was assigned to the device). Other flags are 0616 1087 reset to their initial state for the next user. 0616 1088 0616 1089 This routine calls IOC$CANCELIO to set the cancel bit in the 0616 1090 UCB status word if: 0616 1091 0616 1092 the device is busy, 0616 1093 the IRP's process ID matches the cancel process ID, 0616 1094 the !RP channel matches the cancel channel. 0616 1095 0616 1096 The routine then does device-dependent cancel I/O fixups by 0616 1097 ciearing the interrupt enable bit for either the reader or 0616 1098 the punch, as appropriate. 0616 1099 0616 1100 Inputs: 0616 1101 0616 1102 R2 - negated value of the channel index number 0616 1103 R3 - address of the current !RP (I/O request packet) 0616 1104 R4 - address of the PCB (process control block) for the 0616 1105 process canceling I/O 0616 1106 R5 - address of the UCB (unit control block) 0616 1107 0616 1108 Outputs: 0616 1109 0616 1110 The routine must preserve all registers except RO-R3. 0616 1111 0616 1112 The routine sets the UCB$M_CANCEL bit in UCB$W STS. 0616 1113 0616 1114 The routine restores UCB fields to their original state. 0616 1115 0616 1116 0616 1117 0616 1118 PT CANCEL: ; Cancel an I/O operation 0616 1119 .ENABL LSB 81 0616 1120 CMPW UCB$W REFC(R5),UCB$W MY REFCNT(R5) ; Deal or deassgn? 13 061C 1121 BEQL 10$ - - -; No, if eql 061E 1122 Note that the count is not decremented .. 061E 1123 Therefore the user will not get two 061E 1124 trailers if he allocates the device and 061E 1125 assigns a channel; the deal locate will not 061E 1126 match the count field (like a $CANCEL). PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-0l Page 26 PT_CANCEL, Cancel I/O routine 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(l) OOAO C5 54 00 6B A5 06 6B A5 OB 24 34 38 A5 lA 68 A5 01 2E 44 A5 01 68 A5 14 50 24 A5 54 2C BO 04 A4 0040 8F FCA8 68 A5 14 00 68 A5 01 FC3A 68 A5 08 54 OOAO C5 00 68 A5 01 68 A5 0311 BF 42 A5 32 00 6B A5 07 OOOOOOOO'GF 1A 64 A5 03 51 24 A5 51 2C Bl 08 38 A5 1A 04 A1 0040 BF 05 61 0040 BF DO 061E 1127 MOVL R4,UCB$L SAV R4(R5) ; Save R4 since not CSR E4 0623 112B BBSC #FRST QIO,UCB$W DEVSTS(R5),3$ ; Clear read header bit B3 0628 1129 3$: BITW #PNCH:ucB$W DEVSTS(R5) ; Trailer needed? 12 062C 1130 BNEQ 4$ - ; Yes, if neq EO 062E 1131 BBS #DEV$V IDV,UCB$L DEVCHAR(R5),8$ ; Reader?, go away B3 0633 1132 BITW #BITO,UCB$W DEVSTS(R5) ; User want EOF byte? 13 0637 1133 BEQL 8$ - ; No, if eql 9A 0639 1134 MOVZBL #l,UCB$L DEVDEPEND(R5) ; Punching only EOF byte A8 063D 1135 BISW #END!START,UCB$W DEVSTS(R5) ; Flag punching trailer tape DO 0641 1136 MOVL UCB$L CRB(R5),RO- ; Get CRB DO 0645 1137 MOVL @CRB$L INTD+VEC$L IDB(RO),R4 ; Get CSR address AB 0649 1138 BISW #PT STS M IE,PT PPS(R4) ; Set int. enable bit 31 064F 1139 BRW PUNEOF - - - ; Punch EOF byte AB 0652 1140 4$: BISW #END!START,UCB$W DEVSTS(R5) ; Flag punching trailer tape E4 0656 1141 BBSC #PUNCH HDR,UCB$W-DEVSTS(R5),5$ ; Enable trailer punching 31 065B 1142 5$: BRW PNCH HOR - ; Punch trailer tape AA 065E 1143 INCAN: BICW #PNCH,UCB$W DEVSTS(R5) ; Clear flag for next operation DO 0662 1144 MOVL UCB$L SAV R4(R5),R4 ; Restore R4 if changed E4 0667 1145 8$: BBSC #PUNCH HDR,UCB$W DEVSTS(R5),9$ ; Clear for next op. AA 066C 1146 9$: BICW #BITO!BIT8!BIT9!END,UCB$W DEVSTS(R5) ; Clear for next user BO 0672 1147 MOVW #NULL BYTES,UCB$W DEVBUFSIZ(R5) ; Restore def nul lbytes E4 0676 114B BBSC #STARTING,UCB$W DEVSTS(R5),10$ ; Clear for next oper. 16 067B 1149 10$: JSB GAIOC$CANCELIO - ; Set cancel bit if appropriate. El 0681 1150 0686 1151 BBC #UCB$V CANCEL,UCB$W STS(R5),0KAY ; If clear, return .DSABL LSB - - 0686 1152 0686 1153 0686 1154 Device-dependent cancel operations go next. The appropriate int. ena. 0686 1155 bit is cleared. This subroutine is cal led from several timeout and 06B6 1156 po\'.-'erfai l recovery routines; it must be very careful NOT to issue 0686 1157 a macro (or call on a system routine) that returns control to the 0686 115B caller's caller (since the stack contains "local" return info). 0686 1159 DO 0686 1160 SETOFF: MOVL UCB$L CRB(R5),R1 ; Get address of CRB DO 068A 1161 MOVL @CRB$L INTO+VEC$L IDB(Rl),R1 ; Get address of CSR EO 068E 1162 BBS #OEV$V-IDV,UCB$L DEVCHAR(R5),5$ ; Test for reader AA 0693 1163 BICW #PT STS M IE,PT PPS(Rl) Turn off punch int. ena. bit 11 0699 1164 BRB OKAY - - - And finish up AA 069B 1165 5$: BICW #PT_CSR M IE,PT PRS(Rl) Turn off reader int. ena. bit 06AO 1166 OKAY: 05 06AO 1167 RSB ; Return 06Al 1168 .SBTTL PT REG DUMP, Device regis~er dump routine PCDRIVER V06 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 27 PT REG_DUMP, Device register dump routin 22-AUG-1984 20:06:00 WORK2: [COURSE.DRIVER]PCDRIVER.MAR;(l) 06A1 1170 06A1 1171 ;++ 06A1 1172 PT REG_DUMP, Dumps the contents of device registers to a buffer 06A1 1173 06A1 1174 Functional description: 06A1 1175 06A1 1176 Writes the number of device registers, and their current 06A1 1177 contents into a diagnostic or error buffer. Reader and 06A1 1178 punch both have two registers (a status register, and a 06A1 1179 data register). 06A1 1180 06A1 1181 Inputs: 06A1 1182 06A1 1183 RO - address of the output buffer 06A1 1184 R4 - address of the CSR (controller status register) 06A1 1185 R5 - address of the UCB (unit control block) 06A1 1186 06A1 1187 Outputs: 06A1 1188 06A1 1189 The routine must preserve all registers except Rl-R3. 06A1 1190 06Al 1191 The output buffer contains the current contents of the device 06A1 1192 registers. RO contains the address of the next empty longword in 06A1 1193 the output buffer. 06A1 1194 06A1 1195 06A1 1196 06A1 1197 PT REG DUMP: 80 02 9A 06A1 1198 - - MOVZBL #PT NUM REGS,(RO)+ Dump device registers Store device register count 80 OOA4 C5 3C 06A4 1199 80 OOA7 C5 9A 06A9 1200 MOVZWL UCB$W PT PPS(R5),(RO)+ MOVZBL UCB$B-PT-PPB(R5),(RO)+ Store status register Store data register 05 06AE 1201 RSB Return 06AF 1202 06AF 1203 ;++ 06AF 1204 ; Label that marks the end of the driver 06AF 1205 06AF 1206 06AF 1207 PT END: Last location in driver 06AF 1208 .END PCDRIVER Symbol table $$$ $$OP ACP FDT AFTINT AT$ UBA BACK BITO BITS BIT9 BUF OVR HD CANCEL - COMMON COMPLETE IO COPY CRB$L INTO CRB$L-INTD2 DDB$L-DDT DEV$M-AVL DEV$M-ELG DEV$M-IDV DEV$M-ODV DEV$M-REC DEV$V-IDV DEV$V-ODV DON DPT$C LENGTH DPT$C-VERS ION DPT$INITAB DPT$REINITAB DPT$TAB DSABL OVN$C CRB DVN$C-DDB DVN$C-DPT DVN$C-UCB EMB$L:=ov_REGSAV END EOF ERBFSIZE ERL$DEVICERR ERL$DEVICTMO EXE$ABORTI 0 EXE$ALLOCBUF EXE$BUFFRQUOTA EXE$FINISHIOC EXE$IOFORK EXE$QIOACPPKT EXE$QIODRVPKT EXE$READCHK EXE$SNDEVMSG EXE$WRITECHK FIN I SH FIX FOR PNCH FRST QIO FUNCTAB LEN GO - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 28 22-AUG-1984 20:06:00 WORK2:[COURSE.DRIVER]PCDRIVER.MAR;(1) = = 00000020 00000002 R 02 00000147 R 03 = 00000396 R 00000001 03 00000331 R 03 = 00000001 = 00000100 = 00000200 = 0000000~ 000004C4 R 03 0000046D R 03 000003D9 R 03 00000447 R 03 = 00000024 == 00000048 oooooooc = 00040000 = 00400000 = 04000000 = 08000000 = 00000001 = OOOOOOlA = 00000018 00000444 R 03 = 00000038 = 00000004 00000038 R 02 00000059 R 02 00000000 R 02 = = 00000519 00000005 00000006 R 03 == 0000001E 00000010 = 0000004E = 00000010 = 0000001A = oooooooc ******** x 03 ******** x 03 ******** x 03 ******** x 03 ******** x 03 ******** x 03 ******** x 03 ******** x 03 ******** x 03 ******** x 03 ******** ******** x x 03 03 000003DO R 03 00000511 R 03 00000183 R 03 = 00000006 = 00000064 00000552 R 03 IDB$L CSR IDB$L=UCBLST INCAN INTCOM IO$S FCODE IO$V-FCODE IO$ ACPCONTROL IO$-CREATE 10$-DEACCESS IO$-DELETE 10$-MODlFY IO$-MOUNT IO$-READLBLK !0$-READPBLK I0$-READPROMPT I0$-READVBLK IO$-VIRTUAL !0$-WR ITELBLK 10$-WRITEOF 10$-WRITEPBLK 10$-WRITEVBLK I oc$CANCELI 0 IOC$MNTVER IOC$REQCOM IOC$RETURN IOC$WFIKPCH IPL$ POWER IPL$-SYNCH IRP$L MEDIA IRP$L-SVAPTE IRP$S-FCODE IRP$V-FCODE IRP$V-FUNC IRP$W-BCNT IRP$W-BOFF IRP$W-FUNC IRP$W-STS JIB$L-BVTCNT LOOP CNT MAIN MAIN LP MASKH MAS KL MSG$ DEVOFFLIN MY CLASS MY-TYPE NO-PR IV NT-MNT NT-WRT NUL NULL NULLP NULL BYTES OKAY p 1 P2 P3 = = 00000000 00000018 0000065E R 03 000005FD R = 00000006 = 00000000 03 = 00000038 = 00000033 = = .00000034 00000035 = 00000036 = 00000039 = 00000021 = = oooooooc 00000037 == 00000031 0000003F = 00000020 = 00000028 = = OOOOOOOB 00000030 ******** x 03 ******** x 03 ******** x 03 ******** x 03 = ******** 0000001F x 03 = 00000008 = 00000038 = 0000002C = = 00000006 00000000 = 00000001 = 00000032 = = = = = 00000030 00000020 0000002A 00000020 OOOOOOOF 00000510 R 03 0000036A R 03 = OOBBOOOO = 00000000 = ******** 00000064 x 03 = 00000064 0000015C R 03 00000157 R 03 00000177 R 03 00000310 R 03 = 00000000 00000315 R 03 = 00000032 = 000006AO R 00000000 03 = 00000004 = 00000008 PCDRIVER Symbol table P4 P5 P6 PC$DDT PCB$L JIB PCB$Q=PRIV PNCH PNCH HOR POWER FAIL POW FAIL PR$-IPL PRV$V MOUNT PR FDT ROUT! NE PR-INTERRUPT PR-POWFAIL PR-SPERR PR-START PR-TIMEOUT PT=CANCEL PT CONTROL INIT PT-CSR M BUSY PT-CSR-M-DONE PT-CSR-M-ERROR PT-CSR-M-IE PT-CSR-M-RDENA PT-END- - PT-ERROR PT-FDT ROUTINE PT-FUNCTABLE PT-INTERRUPT PT-NUM REGS PT-PPB- PT-PPS PT-PRB PT-PRS PT-PUNCH PT-REG DUMP PT-RESTART PT-:- START PT-STS M ERROR PT-STS-M-IE PT-STS-M-READY PT-TIMEOUT PT-TIMEOUT SEC PT-UNIT !NIT PUNCH HOR PUNEOF PUN OT Q TO ACP RD HOR READ RESTORE DRIVER SETOFF SET FDT SHORT WAIT SIZ .. ~ SKIP - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 29 22-AUG-1984 20:06:00 WORK2: [COURSE.DRIVER]PCDRIVER.MAR;(l) = oooooooc = 00000010 = 00000014 00000000 RG 03 = 00000080 = = 00000084 00000008 00000298 R 03 000003FC R 03 000003E8 R 03 = ******** 00000011 x 03 000001A4 R 03 000005F6 R 03 000003F9 R 03 0000042C R 03 00000407 R 03 00000451 R 03 00000616 R 03 0000009C R 03 = 00000800 = 00000080 = 00008000 = = 00000040 00000001 000006AF R 03 00000411 R 03 OOOOOOBC R 03 00000038 R 03 000005ED R 03 = 00000002 00000006 00000004 00000002 00000000 00000286 R 03 000006Al R 03 000003E5 R 03 00000216 R 03 = = = 00008000 00000040 00000080 = 0000045F OOOOOOOA R 03 = 00000090 00000001 R 03 000002FA R 03 000004AO R 03 = 00000-162 00000020 R 03 00000545 R 03 00000605 R 03 00000686 R 03 00000199 R 03 = 00000002 = 00000001 000005DF R 03 SKI Pl SKIP2 SS$ CANCEL SS$-DEVNOTMOUNT SS$-DRVERR SS$-ENDOFFILE SS$-! LLIOFUNC SS$-NOPRIV SS$-NORMAL SS$-TAPEPOSLOST SS$-TIMEOUT START STARTING SYS$GL_OPRMBX TO ACP UCB$B DEVCLASS UCB$B-DEVTYPE UCB$B-DIPL UCB$B-FIPL UCB$B-PT OFLCNT UCB$B-PT-PPB UCB$K-PT-UCBLEN UCB$L-CRB UCB$L-DEVCHAR UCB$L-DEVDEPEND UCB$L-DPC UCB$L-FPC UCB$L-FR3 UCB$L-IRP UCB$L-SAV R4 UCB$L-SVAPTE UCB$L-VCB UCB$M-ONLINE UCB$V-CANCEL UCB$V-INT UCB$V-MOUNTI NG UCB$V-POWER UCB$W-BCNT UCB$W-DEVBUFSIZ UCB$W-DEVSTS UCB$W-FUNC UCB$W-MY REFCNT UCB$W-PT-PPS UCB$W-REFC UCB$W-STS UCB$W-UNIT UN SOL-INTERRUPT VCB$W-TRANS VEC$L - I D B VEC$L=INI TIAL WAIT 000005E2 R 03 0000045C R 03 = 00000830 = = 0000007C 0000008C = = 00000870 OOOOOOF4 = 00000024 = = 00000001 00000224 = 0000022C = = 00000004 00000007 ******** x 03 = = 00000173 00000040 00000041 R 03 = OOOOOOSE = 00000008 OOOOOOA6 OOOOOOA7 OOOOOOAA = = = 00000024 00000038 00000044 = 0000009C = oooooooc = 00000010 = 00000058 OOOOOOAO = 00000078 = = 00000034 00000010 = = 00000003 00000001 = 00000009 = 00000005 = 0000007E = 00000042 = = 00000068 0000009A OOOOOOA8 = = = OOOOOOA4 0000005( 00000064 00000054 0000060C R 03 = oooooooc = = 00000008 oooooooc 00000324 R 03 PCDRIVER Psect synopsis - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 17:59:27 VAX-11 Macro V03-01 Page 30 22-AUG-1984 20:06:00 WORK2: [~OURSE.DRIVER]PCDRIVER.MAR;(l) PSECT name ABS $ABS$ $$$105 PROLOGUE $$$1 15=DR I VER Psect synopsis +----------------+ Al location PSECT No. Attributes --------- --------- 00000000 ( 0.) 00 ( 0. ) NOPIC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE OOOOOOAA ( 170.) 01 ( 1 . ) NOPIC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE 0000006E ( 110.) 02 ( 2.) NOP IC USR CON REL LCL NOSHR EXE RO WRT NOVEC BYTE 000006AF ( 1711.) 03 ( 3. ) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC LONG Performance indicators Phase Page faults CPU Time Elapsed Time Initialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals 122 137 1976 82 819 31 7 0 3180 00:00:00.33 00:00:00.46 00:00:31 .64 00:00:03.71 00:00:05.70 00:00:00.24 00:00:00.03 00:00:00.00 00:00:42. 11 00:00:01.51 00:00:01 .04 00:00:38.03 00:00:03.81 00:00:06.79 00:00:00.37 00:00:00.03 00:00:00.00 00:00:51.58 The working set limit was 500 pages. 146981 bytes (288 pages) of virtual memory were used to buffer the intermediate code. There were 130 pages of symbol table space al located to hold 2469 non-local and 50 local 1208 source lines were read in Pass 1, producing 20 object records in Pass 2. 45 pages of virtual memory were used to define 42 macros. symbols. ! Macro library statistics Macro library name Macros defined SYS$SYSROOT:[SYSLIB]LIB.MLB;1 29 SVS$SVSROOT:[SVSLIB]STARLET.MLB;1 10 TOTALS (all 1 ibraries) 39 2705 GETS were required to define 39 macros. There were no errors, warnings or information messages. MAC/LIS PCDRIVER+SVS$LIBRARY:LIB/LIB 100 $! PCDRIVER.COM 200 $! 300 $SET VERIFY 400 $MAC/LIS PCDRIVER+SYS$LIBRARY:LIB/LIB 500 $LINK/NOTRACE/MAP PCDRIVER/OPT,PCDRIVER,SYS$SYSTEM:SYS.STB/SEL 600 $SET NOVERIFY 100 200 BASE=O PCDRIVER.OPT 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 $ ! $ ! $MCR SYSGEN LOAD SYS$SYSDISK:[COURSE.DRIVER]PCDRIVER CONNECT PCA0/ADAPTER=3/NUMVEC=2/VECTOR=%070/CSR=%0777550/DRIVER=PCDRIVER CONNECT PCA1/ADAPTER=3/VECTOR=%074/DRIVER=PCDRIVER SHO /DEV=PC EXIT LOADER.COM 100 c 200 c 300 400 500 600 700 800 10 900 20 1000 25 1100 30 1200 40 1300 50 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 100 2900 3000 200 3100 3200 3300 3400 300 3500 READY.FOR EXTERNAL IO$ READVBLK CHARACTER*36 ALPHA INTEGER*4 SYS$ASSIGN,SYS$QIOW,IOSB(2) INTEGER*2 IOSBW(4) EQUIVALENCE (IOSB(l),IOSBW(l)) FORMAT (' COMPLETED QIOW ' 'I 2,' -- I 'I 4, I BYTES READ I ) FORMAT(' ERROR ID= I ,I4, I FOR SS$ VALUE= I ,I4) FORMAT(' IOSBW(2) VALUE= ',I2) - FORMAT(' BEFORE ASSIGNMENT MADE') FORMAT(' ASSIGNMENT SUCCESSFUL') FORMAT(' DATA READ= ',A) WRITE (6,30) J=O II=SYS$ASSIGN('PCAO:' ,IC,,) IF(.NOT.II)GOTO 200 WRITE (6,40) DO 100 I=l,4 J=l II=SYS$QIOW(,%VAL(IC),I0$ READVBLK,IOSB,,,%REF(ALPHA), 1 %VAL ( 3 6 ) , , , , .) IF(.NOT.II)GOTO 200 J=2 IF(IOSBW(l).NE.l)GOTO 200 WRITE (6,10)I,IOSBW(2) WRITE (6,50)ALPHA CONTINUE GOTO 300 WRITE (6,20)J,II WRITE (6,25)IOSBW(2) IF(.NOT.II)CALL SYS$EXIT(%VAL(II)) CALL SYS$EXIT(%VAL(IOSBW(l))) STOP END 100 c 200 c 300 400 500 600 700 800 10 900 15 1000 20 1100 25 1200 30 1300 40 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 c 2700 2800 2900 95 3000 3100 3200 3300 3400 3500 98 3600 3700 3800 3900 99 4000 4100 4200 4300 4400 4500 4600 100 4700 4800 4900 5000 150 5100 5200 5300 200 5400 5500 5600 5700 300 5800 5900 RANDWV.FOR EXTERNAL IO$ WRITEVBLK,IO$ READVBLK CHARACTER*36 ALPHA,BETA,GAMMA(l8) INTEGER*4 SYS$ASSIGN,SYS$QIOW,IOSB(2),SYS$QIO,IOSB1(2) INTEGER*2 IOSBW(4),IOSBW1(4) EQUIVALENCE (IOSB(l),IOSBW(l)),(IOSBl(l),IOSBWl(l)) FORMAT(' IOSBW(2) AND IOSBW1(2) = ',I2,' ',!2) FORMAT(' COMPLETED READ ',I2) FORMAT(' ERROR ID= ',!4) FORMAT(' DATA READ= I ,A) FORMAT(' BEFORE ASSIGNMENTS MADE') FORMAT(' ASSIGNMENTS SUCCESSFUL') ALPHA='ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' WRITE (6,30) J=O, II=SYS$ASSIGN('PCAO:' ,IC,,) IF(.NOT.II)GOTO 200 J=5 II=SYS$ASSIGN('PCA1: I ,IC2,,) IF(.NOT.II)GOTO 200 WRITE (6,40) J=l IP=3 IR=l8 IF CHANGE IR, CHANGE GAMMA( IR) TOO IN CHAR STATEMENT IRINIT=IR K=O II=SYS$QIO(%VAL(l),%VAL(IC2),IO$ WRITEVBLK,IOSB,,,%REF(ALPHA), 1%VAL(36),,,,) - IF(.NOT.II)GOTO 200 J=2 IF (K .NE. 0) GOTO 99 K=l II=SYS$QIO(,%VAL(IC),IO$_READVBLK,IOSB1,,,%REF(BETA), 1 %VAL ( 3 6 ) ' I ' ' ) IF(.NOT.II) GOTO 200 J=4 IF (IOSBWl(l).NE.l)GOTO 100 INDX=IRINIT+l-IR GAMMA(INDX)=BETA IR=IR-1 IF(IR .GT. 0) GOTO 98 IOSBWl(l)=O GOTO 150 IF (IOSBW(l) .NE. 1) GOTO 99 IP=IP-1 IF (IP .GT. 0) GOTO 95 IOSBW(l)=O I F ( ( I P · EQ · 0 ) . AND · ( I R . EQ · 0 ) ) GOTO 3 0 0 IF ( ( IP . LT. 0) . OR. ( IR . LT. 0 ) ) GOTO 4 0 0 GOTO 99 WRITE (6,20)J WRITE (6,10)IOSBW(2),IOSBW1(2) IF(.NOT.II)CALL SYS$EXIT(%VAL(II)) CALL SYS$EXIT(%VAL(IOSBW(l))) DO 350 I=l,IRINIT-1 WR I TE ( 6 I 15 ) I WRITE (6,25) GAMMA(!) 6000 350 6100 6200 400 6300 6400 CONTINUE STOP WRITE (6,20) IP WR I TE ( 6 , 2 0 ) IR END 100 c 200 c 300 400 500 600 700 800 10 900 20 1000 25 1100 30 1200 40 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 100 3900 4000 4100 4200 4300 4400 4500 4600 4700 200 4800 4900 5000 300 5100 MODE.FOR EXTERNAL IO$ WRITEVBLK,IO$ MODIFY,IO$_DELETE,IO$ DEACCESS CHARACTER*36-ALPHA - INTEGER*4 SYS$ASSIGN,SYS$QIOW,IOSB(2) INTEGER*2 IOSBW(4) EQUIVALENCE (IOSB(l),IOSBW(l)) FORMAT(' COMPLETED QIOW ',I2,' -- ',I4,' BYTES PUNCHED') FORMAT(' ERROR ID= ',I4) FORMAT(' NEW MODE VALUE= ',I4) FORMAT(' BEFORE ASSIGNMENT MADE') FORMAT(' ASSIGNMENT SUCCESSFUL') ALPHA='ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' WRITE (6,30) J=O II=SYS$ASSIGN('PCA1:' ,IC,,) IF(.NOT.II)GOTO 200 WRITE (6,40) J=3 II=SYS$QIOW(,%VAL(IC),IO$_DEACCESS,IOSB,,,,,,,,) IF (.NOT. II) GOTO 200 WRITE (6,25) IOSB(2) J=4 II=SYS$QIOW(,%VAL(IC),IO$_MODIFY,,,,,%VAL(70),,,,) IF (.NOT. II) GOTO 200 J=5 II=SYS$QIOW(,%VAL(IC),IO$ DEACCESS,IOSB,,,,,,,,) IF (.NOT. II) GOTO 200 - WRITE (6,25) IOSB(2) DO 100 I=l,4 J=l II=SYS$QIOW(,%VAL(IC),IO$_WRITEVBLK,IOSB,,,%REF(ALPHA), 1 %VAL ( 3 6 ) I , , , ) IF(.NOT.II)GOTO 200 J=2 IF(IOSBW(l).NE.l)GOTO 200 WRITE (6,10)I,IOSBW(2) CONTINUE J=5 II=SYS$QIOW(,%VAL(IC),IO$_DELETE,,,,,,,,,) IF (.NOT. II) GOTO 200 J=6 II=SYS$QIOW( ,%VAL( IC) I IO$ DEACCESS, IOSB, I I I,,, I) IF (.NOT. II) GOTO 200 - WRITE (6,25) IOSB(2) GOTO 300 WRITE (6,20)J IF(.NOT.II)CALL SYS$EXIT(%VAL(II)) CALL SYS$EXIT(%VAL(IOSBW(l))) STOP END PCDRIVER.LIS PCDRIVER.COM PCDRIVER.OPT PCLOAD.COM ATTN.FOR PCDRIVER Table of contents ( 1) 40 ( 1) 96 ( 1) 165 ( 1) 194 ( 1) 231 ( 1) 268 ( 1) 312 ( 1) 356 ( 1) 366 ( 1) 419 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAX-11 Macro V03-0l External and local symbol definitions Standard tables PC CONTROL INIT, Controller initialization routine PC-UNIT !NIT, Unit initialization routine CSR FDT-ROUTINE, Return CSR Address SET-AST-FDT, Reader Attn. AST PUNC AST FDT, Punch Attn. AST PC START~ Start 1/0 Routine ASTINT, Interrupt service routines PC_END. End of driver Page 0 PCDRIVER V02 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAX-11 Macro V03-0l Page 1 22-AUG-1984 21:15:21 WORK2:[COURSE.DRIVER.RT)PCDRIVER.M(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1 .TITLE PCDRIVER - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 2 . IDENT /V02/ 3 4 ;++ 5 6 FACILITY: 7 8 VAX/VMS Paper Tape Reader/Punch driver 9 10 ABSTRACT: 11 12 This driver al lows the user to control the paper tape reader/ 13 punch by using the set attention AST scheme. The fol lowing 14 function codes are accepted: 15 16 IO$ SENSECHAR--takes no arguments, and returns the address 17 of the CSR in the high-order longword of the IOSB. 18 19 I0$_SETMODE----takes up to three parameters: 20 21 = Pl address of AST routine to be entered when the paper 22 23 = tape reader interrupts (Pl is required). P2 parameter to be passed to the AST routine 24 specified in Pl (P2 is optional). 25 P3 = access mode in which the AST routine specified in 26 Pl is to run (P3 is optional). 27 28 10$ SETCHAR----identical to 10$ SETMODE except that the AST 29 - routine specified in Pl will be entered if the punch 30 generates an interrupt (instead of the reader). 31 32 AUTHOR: 33 34 Vik Muiznieks July--1979 35 36 History 37 Fred Marsh August 1894 38 Added $DVNDEF to the symbol definitions 39 40 .SBTTL External and local symbol definitions PCDRIVER V02 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAX-11 Macro V03-01 Page 2 External and local symbol definitions 22-AUG-1984 21:15:21 WORK2:[COURSE.DRIVER.RT]PCDRIVER.M(1) 00000000 00000004 00000008 oooooooc 00000010 00000014 OOOOOOFC 00000090 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0090 0090 0094 0094 0098 0098 0098 0098 0000 42 43 44 External symbols 45 46 47 $CRBDEF Channel request block 48 $DCDEF Device classes and types 49 $DDBDEF Device data block 50 $DEVDEF Device characteristics 51 $IDBDEF Interrupt data block 52 $IODEF I/O function codes 53 $IPLDEF Hardware IPL definitions 54 $IRPDEF I/O request packet 55 $SSDEF System status codes 56 $UCBDEF Unit control block 57 $VECDEF Interrupt vector block 58 $DYNDEF 59 60 Local symbols 61 62 63 64 Argument list (AP) offsets for device-dependent $010 parameters 65 (Only Pl. P2, and P3 have meaning for this driver.) 66 67 68 Pl 0 First $QIO parameter 69 P2 4 Second $QIO parameter 70 P3 8 Third $QIO parameter 71 P4 12 Fourth $QIO parameter 72 P5 16 Fifth $QIO parameter 73 P6 20 Sixth $QIO parameter 74 75 76 Other constants 77 78 79 MY CLASS=252 ; My own device class number 80 81 82 Definitions that fol low the standard UCB fields 83 84 85 $DEF I NI UCB : Start of UCB definitions 86 87 .=UCB$K_LENGTH : Position to end of UCB 88 89 $DEF UCB$L_ASTHEAD .BLKL 1 : Listhead for reader attn. AST 90 91 $DEF UCB$L PUNCHD .BLKL 1 ; Listhead for punch attn. AST 92 93 $DEF 94 UCB$K- PC UCBLEN ; Length of extended UCB 95 $DEFEND UCB : End of UCB definitions 96 .SBTTL Standard tables PCDRIVER V02 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01 :38 VAX-11 Macro V03-0l Page 3 Standard tables 22-AUG-1984 21:15:21 WORK2:[COURSE.DRIVER.RT]PCDRIVER.M(1) 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0038 0038 0038 003C 0040 0040 0040 0040 0040 0047 0048 0048 0048 004B 0050 0050 0055 0055 005A 005A 005A 005F 005F 005F 0064 0064 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0038 0038 0038 0038 0038 0038 0038 0038 0038 0038 98 99 100 Driver prologue table 101 102 103 DPT AB 104 END=PC END,- 105 ADAPTER=UBA,- 106 UCBSIZE=<UCB$K PC UCBLEN>,- 107 NAME=PCDRIVER - 108 DPT STORE !NIT 109 110 DPT STORE UCB,UCB$B FIPL,B,8 111 DPT-STORE UCB,UCB$B-DIPL,B,20 112 DPT-STORE UCB,UCB$L-DEVCHAR,L,<- 113 - DEV$M AVL!-- 114 DEV$M-REC!- 115 DEV$M-IDV'- 116 DEV$M-ODV> 117 DPT STORE UCB~UCB$B DEVCLASS,B,MY CLASS 118 119 DPT STORE REINIT 120 121 DPT STORE DDB,DDB$L DDT,D,PC$DDT 122 DPT STORE CRB,CRB$L-INTD+4,D,- 123 ASTINT 124 DPT STORE CRB,CRB$L INTD2+4,D,- 125 PUNC I NT 126 DPT STORE CRB, - 127 ~ CRB$L INTD+VEC$L INITIAL,- 128 D,PC CONTROL INif 129 DPT STORE CRB,- 130 CRB$L INTD+VEC$L UNITINIT,- 131 D,PC UNIT INIT 132 133 DPT STORE END 134 135 136 137 Driver dispatch table 138 139 140 DDT AB 141 DEVNAM=PC,- 142 START=PC START,- 143 FUNCTB=PC FUNCTABLE,- 144 CANCEL=+IOC$CANCELIO 145 146 147 Function dispatch table 148 149 150 PC FUNCTABLE: 151 FUNCTAB 152 <SENSECHAR,- 153 SETCHAR,- 154 SETMODE> DPT-creation macro End of driver label Adapter type Length of UCB Driver name Start of load initialization table Device fork IPL Device int. IPL (BR4) Device characteristics e.g., dev. available record oriented input device output device store my device class Start of reload initialization table Address of DDT Address of reader int. service routine Address of punch int. ser·vice routine Addr·ess of controller initialization routine Address of device unit initialization routine End of initial i za ti on tables DDT-creation macro Name of device Start I/O routine FDT address Cancel I /0 routine FDT for driver Valid I/0 functions Get CSR address func. Punch attn. AST func. Reader attn. AST func PCDRIVER V02 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAX-11 Macro V03-0l Page 4 Standard tables 22-AUG-1984 21:15:21 WORK2:[COURSE.DRIVER.RT]PCDRIVER.M(1) 0040 155 0040 156 0040 157 0040 158 0048 159 0048 160 0054 161 0054 162 0060 163 0060 164 006C 165 FUNCTAB FUNCTAB FUNCTAB FUNCTAB .SBTTL <SENSECHAR,SETCHAR,SETMODE> CSR FDT ROUTINE,<SENSECHAR> PUNC AST FDT,<SETCHAR> SET AST FDT,<SETMODE> PC CONTROL INIT, Controller Buffered functions Get CSR address Punch attn. AST Reader attn. AST FDT get CSR routine FDT punch attn. AST routine FDT reader attn. ; AST rout1i ne initialization routine PCDRIVER V02 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAX-11 Macro V03-0l Page 5 PC_CONTROL_INIT, Controller initializati 22-AUG-1984 21:15:21 WORK2:[COURSE.DRIVER.RT]PCDRIVER.M(l) 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 006C 05 006C 0060 167 168 ;++ - 169 ; PC CONTROL !NIT, Readies controller for I/O operations 170 ; 171 ; Functional description: 172 ; 173 ; The operating system cal ls this routine in 3 places: 174 ; 175 ; at system startup 176 ; during driver loading and reloading 177 ; during recovery from a power failure 178 ; 179 ; Inputs: 180 ; 181 ; R4 - address of the CSR (controller status register) 182 ; R5 - address of the IDB (interrupt data block) 183 ; R6 - address of the DOB (device data block) 184 ; RB - address of the CRB (channel request block) 185 ; 186 ; Outputs: 187 ; 188 ; The routine must preserve all registers except RO-R3. 189 190 191 ' 192 PC CONTROL INIT: ; I n i t i a 1 i z e con t r· o l 1e r 193 RSB ; Return 194 .SBTTL PC UNIT INIT, Unit in i t i a 1 i za t i on routine PCDRIVER V02 ~VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP~l984 18:01:38 VAX-11 Macro V03-0l Page 6 PC UNIT INIT, Unit initialization routin 22-AUG-1984 21:15:21 WORK2: [COURSE.DRIVER.RT)PCDRIVER.M(1) 64 A5 10 50 24 A5 50 2C AO 04 AO 55 006D 006D 006D 006D 006D 006D 006D 006D 006D 006D 006D 0060 0060 0060 0060 0060 006D 006D 006D 006D 006D 006D 0060 006D 006D 006D 006D 006D AS 0060 DO 0071 DO 0075 DO 0079 0070 007D 05 0070 007E 196 197 ;++ 198 PC UNIT_INIT, Readies unit for I/O operations 199 200 Functional description: 201 202 The operating system cal ls this routine after cal ling the 203 controller initialization routine: 204 205 at system startup 206 during driver loading 207 during recovery from a power failure 208 209 This routine sets the on-line bit in· the UCB, and 210 loads the owner field of the IDB with the UCB address. 211 212 Inputs: 213 214 R4 - address of the CSR (controller status register) 215 R5 - address of the UCB (unit control block) 216 217 Outputs: 218 219 The routine must preserve all registers except RO-R3. 220 221 ;-- 222 223 PC UNIT !NIT: lnitialize unit 224 -BISW #UCB$M ONLINE,UCB$W ST$(R5) Set unit online 225 MOVL UCB$L CRB(R5),RO - Get address of CRB 226 MOVL CRB$L-INTD+VEC$L IDB(RO),RO Get address of IDB 227 MOVL R5,IDB$L_OWNER(RO) Set address of dev UCB 228 as OWNER--wil l not 229 change 230 RSB ; Return 231 .SBTTL CSR FDT ROUTINE, Return CSR Address PCDRIVER V02 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01 :38 VAX-11 Macro V03-01 Page 7 CSR_FDT_ROUTINE, Return CSR Address 22-AUG-1984 21 :15:21 WORK2: [COURSE.DRIVER.RT]PCDRIVER.M(l) 50 24 A5 51 2C BO 50 01 OOOOOOOO'GF 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E 007E DO 007E DO 0082 3C 0086 17 0089 008F 233 234 ;++ 235 CSR FDT ROUT! NE 236 237 Functional description: 238 239 This FDT routine returns the address of the device's CSR in 240 the high-order longword of the IOSB. The CSR is found in the 241 first longword of the IDB. R1 is placed into the high-order 242 longword of the IOSB by IOPOST. 243 244 Inputs: 245 246 RO-R2 - scratch registers 247 R3 - address of the !RP (I/O request packet) 248 R4 - address of the PCB (process control block) 249 R5 - address of the UCB (unit control block) 250 R6 - address of the CCB (channel control block) 251 R7 - bit number of the I/O function code 252 RS - address of the FDT table entry for this routine 253 R9-R 11 - scratch registers 254 AP - address of the 1st function dependent $QIO parameter 255 256 Outputs: 257 258 The routine must preserve al 1 registers except RO-R2, and 259 R9-R11. 260 261 262 263 CSR FDT ROUTINE: 264 MOVL UCB$L CRB(R5),RO Get CRB address 265 MOVL @CRB$L INTD+VEC$L IDB(RO),R1 Store CSR in IOSB(2) 266 MOVZWL #SS$_NORMAL,RO Return normal success 267 JMP GAEXE$FINISHIO All done 268 .SBTTL SET_AST_FDT, Reader Attn. AST PCDRIVER V02 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAX-11 Macro V03-0l Page 8 SET_AST FDT, Reader Attn. AST 22-AUG-1984 21:15:21 WORK2:[COURSE.DRIVER.RT]PCDRIVER.M(l) 50 6C 09 51 04 OOOOOOOO'GF 50 04 AC 06 OOOOOOOO'GF 57 0090 C5 OOOOOOOO'GF OOOOOOOO'GF 008F 008F 008F OOBF OOBF OOBF 008F OOBF 008F 008f 008F OOBF 008F 008F 008F 008F 008F 008F 008F 008F 008F 008F 008F 008F 008F 008F 008F 008F 008F 008F DO 008F 13 0092 9A 0094 16 0097 009D DO 009D 13 OOAl 16 OOA3 OOA9 DE OOA9 16 OOAE 17 0084 OOBA 270 271 ;++ 272 SET AST FDT 273 274 Functional description: 275 276 This FDT routine queues an attention AST for the process 277 issuing the SETMODE $QIO. Pl and P2 are checked for 278 accessibility. 279 280 Inputs: 281 282 RO-R2 - scratch registers 283 R3 - address of the IRP (I/O request packet) 284 R4 - address of the PCB (process control block) 285 R5 - address of the UCB (unit control block) 286 R6 - address of the CCB (channel control block) 287 R7 - bit number of the I/0 function code 288 RB - address of the fDT table entry for this routine 289 R9-R 11 - scratch registers 290 AP - address of the 1st function dependent $QIO parameter 291 292 Outputs: 293 294 The rou~ine must preserve al 1 registers except RO-R2, and 295 R9-Rll. 296 297 298 299 SET AST FDT: 300 -MOVL Pl(AP),RO Get ast address 301 BEQL NOP1 0 means disable ast 302 MOVZBL #4,Rl It's a longword 303 JSB GAEXE$WRITECHK Can user read it 304 No return on no access 305 NOPl: MOVL P2(AP),RO Get ast par. if there 306 BEQL NOP2 No P2 parameter if eql 307 JSB GAEXE$WRITECHK Can user read it? 308 No return on no access 309 NOP2: MOVAL UCB$L ASTHEAD(R5),R7 Get listhead 310 JSB GACOM$SETATTNAST Set up ast request 311 JMP GAEXE$FINISHIOC Complete SETMODE $QIO 312 .SBTTL PUNC AST FDT, Punch Attn. AST PCORIVER V02 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAX-11 Macro V03-01 Page 9 PUNC_AST_FOT, Punch Attn. AST 22-AUG-1984 21 :15:21 WORK2: [COURSE.DRIVER.RT]PCDRIVER.M(1) 50 6C 09 51 04 OOOOOOOO'Gf 50 04 AC 06 OOOOOOOO'Gf 57 0094 C5 OOOOOOOO'GF OOOOOOOO'GF OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA OOBA DO OOBA 13 OOBO 9A OOBF 16 OOC2 OOC8 DO OOCB 13 oocc 16 OOCE 0004 DE 0004 16 0009 17 OOOF ODES 314 315 ;++ 316 PUNC_AST_FDT 317 318 functional description: 319 320 This FDT routine queues an attention AST for the process 321 issuing the SETCHAR $QIO. Pl and P2 are checked for 322 accessibility. 323 324 Inputs: 325 326 RO-R2 - scratch registers 327 R3 - address of the IRP (I /0 request packet) 328 R4 - address of the PCB (process control block) 329 R5 - address of the UCB (unit control block) 330 R6 - address of the CCB (channel control block) 331 R7 - bit number of the I/O function code 332 RB - address of the FDT table entry for this routine 333 R9-R 11 - scratch registers 334 AP - address of the 1st function dependent $QIO parame~er 335 336 Outputs: 337 338 The routine must preserve all registers except RO-R2, and 339 R9-R11. 340 341 342 343 PUNC AST FDT: 344 - MOVL 345 BEQL 346 MOVZBL 347 JSB Pl(AP),RO NO Pl #4-:-Rl Gl\EXE$WRITECHK Get ast address 0 means disable ast It's a longword Can user read it 348 349 NO Pl: 350 351 352 353 NO_P2: 354 355 MOVL BEQL JSB MOVAL JSB JMP P2(AP),RO NO P2 Gl\EXE$WRITECHK UCB$L PUNCHD(R5),R7 Gl\CQM$SETATTNAST GAEXE$FINISHIOC No return on no access Get ast par. if there No P2 parameter if eql Can user read it? No return on no access Get l isthead Set up ast request Complete SETMODE $QIO 356 .SBTTL PC START, Start I/O Routine PCDRIVER V02 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01 :38 VAX-11 Macro V03-01 Page 10 PC START, Start I/O Routine 22-AUG-1984 21:15:21 WORK2: [COURSE.DRIVER.RT]PCDRIVER.M(l) OOE5 OOE5 OOE5 OOE5 OOE5 OOE5 OOE5 05 OOE5 OOE6 358 ; PC START 359 ; - 360 ; The driver really has no start I/O entry point. 361 ; This is a dummy routine which should never be 362 ; called by this driver. 363 ; 364 PC START: 365 - RSB 366 .SBTTL ASTINT, Interrupt service routines PCDRIVER V02 53 9E 55 04 A3 54 0090 C5 OOOOOOOO'GF 50 BE 52 SE 54 BE 53 9E 55 04 A3 54 0094 C5 E2 - VAX/VMS PAPER TAPe READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAx~11 Macro V03-01 Page 11 ASTINT, Interrupt service routines 22-AUG~1984 21:15:21 WORK2: [COURSE.DRIVER.RT]PCDRIVER.M(l) OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 OOE6 DO OOE6 DO OOE9 DE OOED 16 OOf 2 7D OOF8 70 OOFB 7D OOFE 02 0101 0102 DO 0102 DO 0105 DE 0109 11 010E 0110 368 ;++ 369 ASTINT 370 371 Functional description: 372 373 The driver is for a single-unit controller, and 374 the unit initialization code has stored the 375 address of the UCB in the owner field of the IDB. 376 377 These routines simply restore the address of the UCB 378 in RS, place the appropriate AST listhead in R4, and 379 cal 1 a system routine to queue pending AST's. Note 380 that no check is made to see if the UCB$V INT bit is 381 set (in UCB$W STS), since the routines th~t set up the 382 attention AST7 s do not set the bit. 383 384 Inputs: 385 386 O(SP) - pointer to the address of the IDB (interrupt data 387 block) 388 4(SP) - saved RO 389 8(SP) - saved Rl 390 12(SP) - saved R2 391 16(SP) - saved R3 392 20(SP) - saved R4 393 24(SP) - saved R5 394 28(SP) - saved PSL (program status longword) 395 32(SP) - saved PC 396 397 The IDB contains the CSR address and the UCB address. 398 399 Outputs: 400 401 The routine must preserve all registers except RO-R5. 402 403 404 405 ASTI NT: 406 MOVL 407 MOVL 408 MOVAL 409 DELIV: JSB 410 MOVQ 411 MOVQ 412 MOVQ 413 REI @(SP)+,R3 IDB$L OWNER(R3),R5 UCB$L-ASTHEAD(R5),R4 GACOM$DELATTNAST (SP)+,RO (SP)+,R2 (SP)+,R4 Reader interrupted Get I DB Get OWNER UCB Get reader listhead Deliver attn. ast's Dismiss interrupt After restoring Registers 414 PUNC INT: 415 MOVL @(SP)+,R3 Punch interrupted Get I DB 416 MOVL IDB$L OWNER(R3),R5 Get OWNER UCB 417 MOVAL UCB$L-PUNCHD(R5),R4 418 BRB DELIV- Get punch listhead Deliver attn. ast's 419 .SBTTL PC END, End of driver PCDRIVER V02 - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAX-11 Macro V03-01 Page 12 PC_END, End of driver 22-AUG-1984 21:15:21 WORK2: [COURSE.DRIVER.RT]PCDRIVER.M(1) 0110 0110 0110 0110 0110 0110 0110 421 422 ++ 423 Label that marks the end of the driver 424 -- 425 426 PC END: ; Last location in driver 427 - . END PCDRIVER Symbol table $$$ $$OP ASTINT AT$ UBA COM$DELATTNAST COM$SETATTNAST CRB$L INTO CRB$L-INTD2 CSR FDT ROUTINE DDB$L DDT DELIV- DEV$M AVL DEV$M-IDV DEV$M-ODV DEV$M-REC DPT$C-LENGTH DPT$C-VERSION DPT$INITAB DPT$REINITA8 DPT$TAB DVN$C CRB DVN$C-DDB DVN$C-DPT DVN$C-UCB EXE$FIN I SH IO EXE$FINISHIOC EXE$WRITECHK FUNCTAB LEN IDB$L OWNER 10$ SENSECHAR 10$-SETCHAR 10$-SETMODE 10$-VIRTUAL I OC$CANCELI 0 IOC$MNTVER IOC$RETURN MASKH MAS KL MY_CLASS NOPl NOP2 NO Pl NO-P2 P1- P2 P3 P4 P5 P6 PC$DDT PC CONTROL !NIT PC-END PC-FUNCTABLE PC-START PC-UNIT INIT PUNC AST FDT PUNC:~) NT - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAX-11 Macro V03-01 Page 13 22-AUG-1984 21:15:21 WORK2:[COURSE.DRIVER.RT]PCDRIVER.M(1) 00000020 R 02 00000002 OOOOOOE6 R 03 00000001 ******** x 03 ******** x 03 00000024 00000048 0000007E R 03 0000000~ OOOOOOF2 R 03 00040000 04000000 08000000 00000001 00000038 00000004 00000038 R 02 00000048 R 02 00000000 R 02 00000005 00000006 OOOOOOlE 00000010 ******** x 03 ******** x 03 ******** x 03 00000034 00000004 00000018 OOOOOOlA 00000023 0000003F ******** x 03 ******** x 03 ******** x 03 00000008 00000000 OOOOOOFC 00000090 R 03 OOOOOOA9 R 03 OOOOOOC8 R 03 00000004 R 03 00000000 00000004 00000008 oooooooc 00000010 00000014 00000000' RG 03 0000006C R 03 00000110 R 03 00000038 R 03 OOOOOOE5 R 03 00000060 R 03 OOOOOOBA R 03 00000102 'R 03 SET AST FDT SS$-NORMAL UCB$B DEVCLASS UCB$B-DlPL UCB$B-FlPL UCB$K-LENGTH UCB$K-PC UCBLEN UCB$L-ASTHEAD UCB$L-CRB UCB$L-DEVCHAR UCB$L-PUNCHO UCB$M-ONLI NE UCB$W-STS VEC$L-l08 VEC$L-INITIAL VEC$L-UNITINIT 0000008F R = 00000001 = 00000040 03 = 0000005E = = OOOOOOOB 00000090 00000098 00000090 = = 00000024 00000038 00000094 = 00000010 = 00000064 = 00000008 = oooooooc = 00000018 PCDRIVER Psect synopsis - VAX/VMS PAPER TAPE READER/PUNCH DRIVER 12-SEP-1984 18:01:38 VAX-11 Macro V03-01 Page 14 22-AUG-1984 21:15:21 WORK2:[COURSE.DRIVER.RT]PCDRIVER.M(1) PSECT name ABS $ABS$ $$$105 PROLOGUE $$$115-DRIVER ! Psect synopsis +----------------+ Allocation ---------- PSECT No. Attributes --------- 00000000 ( 0.) 00 ( 0.) NOPIC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE 00000098 ( 152.) 01 ( 1.) NOPIC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE 00000065 ( 101 . ) 02 ( 2.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 00000110 ( 272.) 03 ( 3.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC LONG Performance indicators Phase Page faults CPU Time Elapsed Time In it i a 1 i za ti on Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals 100 129 1101 29 418 12 7 0 1802 00:00:00.33 00:00:00.46 00:00:21 .36 00:00:02.85 00:00:03.19 00:00:00.11 00:00:00.05 00:00:00.00 00:00:28.37 00:00:01 .16 00:00:01.12 00:00:36.45 00:00:05.31 00:00:03.99 00:00:00.14 00: 00: 00. 19 00:00:00.00 00:00:48.37 The working set limit was 500 pages. 96378 bytes (189 pages) of virtual memory were used to buffer the intermediate code. There were 100 pages of symbol table space llocated to hold 1819 non-local and O local 427 source lines were read in Pass 1, produ ing 16 object records in Pass 2. 27 pages of virtual memory were used to def ne 24 macros. symbols. Macro library statistics Macro library name Macros defined SVS$SVSROOT:[SYSLIB]LIB.MLB;1 14 SYS$SYSROOT:[SYSLIB]STARLET.MLB;l 8 TOTALS (all 1 ibraries) 22 2058 GETS were required to define 22 macros. There were no errors, warnings or information messages. MAC/LIS PCDRIVER+SVS$Ll8RARV:LIB/LIB 100 $! PCDRIVER.COM 200 $! 300 $SET VERIFY 400 $MAC/LIS PCDRIVER+SYS$LIBRARY:LIB/LIB 500 $LINK/NOTRACE/MAP PCDRIVER/OPT,PCDRIVER,SYS$SYSTEM:SYS.STB/SEL 600 $SET NOVERIFY 100 200 BASE=O PCDRIVER.OPT 100 200 300 400 500 600 700 800 900 1000 1100 $ ! $ ! $MCR SYSGEN LOAD SYS$SYSDISK:[COURSE.DRIVER.RT]PCDRIVER CONNECT PCA0/ADAPTER=3/NUMVEC=2/VECTOR=%070/CSR=%0777550/DRIVER=PCDRIVER SHO /DEV=PC EXIT PCLOAD.COM 100 c 200 c 300 c 400 500 c 600 c 700 c 800 c 900 c 1000 c 1100 1200 1300 1400 1410 1500 1600 1610 1700 1800 c 1900 c 2000 c 2100 2110 2120 2130 30 2140 2150 40 2175 50 2200 c 2300 c 2400 c 2500 c 2600 2700 2710 2720 60 2800 2900 3000 c 3100 3200 3300 c 3400 c 3500 c 3600 c 3700 c 3800 c 3900 c 4000 c 4100 c 4200 4300 4400 c 4500 c 4600 c 4700 c 4800 c 4900 ATTN.FOR PROGRAM MAIN This program causes the subroutine SUB to entered in kernel mode. The subroutine will service interrupts from the paper tape reader, using the set attention ast mechanism. INTEGER*4 SYS$CMKRNL,SYS$EXIT EXTERNAL SUB,SUBTWO COMMON ICSR,K,L,ICHAN COMMON /CHAR/ ALPHA COMMON /DEBUG/ ICODE,ISTAT INTEGER*2 !CHAN CHARACTER*36 ALPHA ICODE=O I=SYS$CMKRNL(SUB,) Check for error in system service call IF (.NOT. I) CALL SYS$EXIT(%VAL(I)) IF (!CODE .EQ. O) GOTO 40 WRITE (6,30) !CODE FORMAT (' ERROR ID= ',14) CALL SYS$EXIT(%VAL(ISTAT)) WRITE (6,50) ALPHA(l:L) FORMAT(' AFTER HIBER, ALPHA= ',A) Now enter subroutine SUBTWO in kernel mode to punch some characters on paper tape I=SYS$CMKRNL(SUBTWO,) IF (.NOT. I) CALL SYS$EXIT(%VAL(I)) WRITE (6,60) FORMAT(' PUNCHING COMPLETE') END ******************* SUB ******************* SUBROUTINE SUB This routine assigns a channel to the paper tape reader, retrieves the address of the paper tape CSR in IOSB(2) (via a SENSECHAR QIO), and then requests an attention ast (when the paper tape reader interrupts) via a SETMODE QIO (in subroutine SETAST). The paper tape reader is actually started (and interrupts are enabled) by subroutine INTENA. IMPLICIT INTEGER*4(S) EXTERNAL READAST,SETAST,INTENA,IO$_SENSECHAR Note that integer values and character strings must be placed in separate common blocks (a FORTRAN restriction). COMMON ICSR,K,L,ICHAN 5000 5010 5100 5200 5300 5400 5500 c 5600 c 5700 c 5800 5900 c 6000 c 6100 c 6200 c 6300 6400 6500 6600 c 6700 c 6800 c 6900 c 7000 c 7100 c 7200 c 7300 c 7400 c 7500 c 7600 7700 7800 7900 8000 8100 8200 8300 c 8400 c 8500 c 8600 c 8700 c 8800 c 8900 c 9000 c 9100 c 9200 9300 c 9400 c 9500 c 9600 c 9700 9800 9900 c 10000 c 10100 c 10200 c 10300 10400 10600 10700 c 10800 c 10900 c COMMON /CHAR/ ALPHA COMMON /DEBUG/ ICODE,ISTAT INTEGER*4 IOSB(2) INTEGER*2 ICHAN,IOSBW(4) CHARACTER*36 ALPHA EQUIVALENCE (IOSB(l),IOSBW(l)) J is an error indicator flag J=O Assign a channel to the paper tape reader and check for system service error. · I=SYS$ASSIGN('PCAO:' ,ICHAN,,) IF (.NOT. I) GOTO 200 J=l K indicates position in character string for next character read L indicates number of characters to be read into the string (note that the character statements in the subroutines need to be changed to reflect the maximum size that L may take on (set to 36)). Also, byte array (BYTE) in subroutine READAST must be increased to the same size as L. K=l L=36 I=SYS$QIOW(,%VAL(ICHAN),IO$ SENSECHAR,IOSB,,,,,,,,) ICSR=IOSB(2) IF (.NOT. I) GOTO 200 J=2 IF ( I OSBW ( 1) · NE. 1 ) GOTO 2 0 0 Enable attention ast (which is actually handled by subroutine READAST). Note that the %VAL function is used to pass the address of the CSR. In the subroutine, the address of the subroutine parameter becomes the address of the CSR, and the subroutine can directly reference the CSR by referencing the subroutine parameter. CALL SETAST(O) Enable paper tape reader interrupts, and start the paper tape reader (to read the next character). CALL INTENA(%VAL(ICSR)) J=3 Wait for all characters to be read (determined by subroutine READAST, who issues the WAKE system service). I=SYS$HIBER() IF (.NOT. I) GOTO 200 RETURN Enter here if error condition occurs in a system service (J flags where error occurred). 11000 c 11100 200 11110 11120 11200 11600 11700 11800 c 11900 12000 12100 12200 12300 12400 12500 12600 12700 12800 c 12900 c 13000 c 13100 c 13200 13300 c 13400 c 13500 c 13600 c 13700 c 13800 c 13900 c 14000 14100 c 14200 c 14300 c 14400 c 14500 c 14600 14700 14800 c 14900 c i 5·000 c 15100 15200 15300 c 15400 c 15500 c 15600 c 15700 c 15800 c 15900 c 16000 c 16100 c 16200 75 16300 16400 16500 16600 16700 c 16800 16900 17000 !CODE = J !STAT = IOSBW(l) I F ( · NOT . I ) I STAT = I RETURN END ******************* READAST ******************* SUBROUTINE READAST(MYCSR) IMPLICIT INTEGER*4(S) CHARACTER*36 ALPHA EXTERNAL SETAST,INTENA INTEGER*2 ICHAN,MYCSR(4) BYTE DATA(36) COMMON ICSR,K,L,ICHAN COMMON /CHAR/ ALPHA Note that the only valid (FORTRAN) equivalence for a character string is to a BYTE variable. EQUIVALENCE (ALPHA(l:),DATA(l)) The data buffer register for the paper tape reader follows the paper tape reader CSR. Note that only the low order byte contains data. Note also, references to device registers must reference those locations as bytes or words only, not as longwords. DATA(K)=MYCSR(2) Increment index into string, and see if all done reading characters by comparing index to number of characters desired. K=K+l IF (K .LE. L) GOTO 75 If all done, awaken main subroutine (SUB). CALL SYS$WAKE ( , ) RETURN Must reenable attention ast for next character since attention ast only good for one interrupt. Note that a separate subroutine is required since the QIO is not allowed to specify the same ast routine address as the routine from which the QIO is being issued. Interrupts are also reenabled, and the next character is read from the paper tape reader (via subroutine INTENA). CALL SETAST(O) CALL INTENA(%VAL(ICSR)) RETURN END ******************* SETAST ******************* SUBROUTINE SETAST(ITYPE) IMPLICIT INTEGER*4(S) 17100 17200 17300 17400 17500 17600 17700 17800 c 17900 c 18000 c 18100 c 18200 18300 c 18400 c 18500 c 18600 c 18700 c 18800 18900 19000 19100 c 19200 c 19300 c 19400 c 19500 c 19600 98 19700 19800 c 19900 c 20000 c 20100 99 20200 20300 20400 20500 20600 c 20700 20800 20900 21000 c 21100 c 21200 c 21300 c 21400 c 21500 c 21600 c 21700 21800 c 21900 c 22000 c 22100 22200 22300 22400 22500 c 22600 22700 22800 22900 c 23000 c CHARACTER*36 ALPHA EXTERNAL IO$ SETMODE,READAST,!0$ SETCHAR,PNCHAST INTEGER*2 ICHAN,IOSBW(4) INTEGER*4 IOSB(2) COMMON ICSR,K,L,ICHAN COMMON /CHAR/ ALPHA EQUIVALENCE (IOSBW(l),IOSB(l)) Check to see if requesting a reader attention ast (ITYPE=O), or a punch attention ast (!TYPE .NE. 0). IF (!TYPE .NE. 0) GOTO 98 Request reader attention ast, specifying as the routine to service the ast subroutine READAST, and specifying as the ast parameter the CSR of the paper tape reader. I=SYS$QIOW(,%VAL(ICHAN),I0$ SETMODE,IOSB,,,READAST, 1%VAL(ICSR),,,,) - GOTO 99 Request punch attention ast, specifying as the routine to service the ast subroutine PNCHAST, and specifying as the ast parameter the CSR of the paper tape reader. I=SYS$QIOW(,%VAL(ICHAN),IO$ SETCHAR,IOSB,,,PNCHAST, 1%VAL( ICSR),,,,) Check on system service error IF (.NOT. I) CALL SYS$EXIT(%VAL(I)) IF (IOSBW(l) .NE. 1) CALL SYS$EXIT(%VAL(IOSBW(l))) RETURN END ******************* INTENA ******************* SUBROUTINE INTENA(MYCSR) INTEGER*2 GO,MYCSR(4) DECIMAL 65 = HEX 41 = BINARY 01000001 which corresponds to the READER and INTERRUPT ENABLE bits in the paper tape reader control and status register. These bits must be set to enable interrupts and to allow the reading of the next character on the paper tape. DATA GO /65/ Set the appropriate bits in the paper tape CSR MYCSR(l) = (MYCSR(l) .OR. GO) RETURN END ******************* PNCHENA ******************* SUBROUTINE PNCHENA(MYCSR) INTEGER*2 GO,MYCSR(4) DECIMAL 64 = HEX 40 = BINARY 01000000 which corresponds to thE n100 23200 23 3 0 0 23400 23500 23600 23700 23800 23900 24000 24100 24200 24300 24400 2450 0 ~4600 ~4 700 24800 ~4900 25000 ~ 510 0 25200 25300 ~5400 25500 25600 257 0 0 ~ 58 0 0 ~ 590 0 ~ 6 ffO 0 ~6100 2620 0 26300 26400 26500 26600 26700 26800 26900 27000 27100 27200 ~ 7300 27400 27500 27600 27700 27800 27900 28000 28100 28200 28300 28400 28500 28600 28700 28800 28900 29000 c c c c c c c c c c c c c c c c c c c c c c c c c c c c 650 c INTERRUPT ENABLE bit in the paper tape punch's control and status register. This bit must be set to allow the punching of characters. The bit needs to be set only once. DATA GO /64/ Set the appropriate bits in the punch's CSR MYCSR(3) = (MYCSR(3) .OR. GO) RETURN END ******************* PNCHDAT ******************* SUBROUTINE PNCHDAT(MYCSR) IMPLICIT INTEGER*4(S) CHARACTER*36 ALPHA CHARACTER*l NEXT EXTERNAL SETAST,I0$ SETCHAR INTEGER*2 ICHAN,MYCSR(4),IOSBW(4) INTEGER*4 IOSB(2) BYTE DATA COMMON ICSR,K,L,ICHAN COMMON /CHAR/ ALPHA Note that the only valid equivalence for a character string is to a BYTE variable. EQUIVALENCE (NEXT,DATA),(IOSBW(l),IOSB(l)) Reenable attention ast for next character. CALL SETAST(l) The paper tape punch is started by writing a character in the punch's data buffer (in this case, MYCSR(4)). Only the low order byte contains data. NEXT = ALPHA(K:K) MYCSR(4) = DATA Increment index into string, and see if all done punching characters by comparing index (K) to number desired (L). K=K+l IF (K .LE. L) GOTO 650 If all done, awaken main subroutine (SUBTWO) after disabling the last attention ast requested I=SYS$QIOW(,%VAL(ICHAN),IO$ SETCHAR,IOSB,,,,,,,,) IF (.NOT. I) CALL SYS$EXIT(%VAL(I)) IF (IOSBW(l) .NE. 1) CALL SYS$EXIT(%VAL(IOSBW(l))) CALL SYS$WAKE(,) RETURN END ******************* SUBTWO ******************* SUBROUTINE SUBTWO 29100 c 29200 c 29300 c 29400 c 29500 c 29600 c 29700 c 29800 29900 30000 30100 30200 30300 30400 c 30500 c 30600 c 30700 c 30800 c 30900 31000 31100 31200 c 31300 c 31400 c 31500 31600 c 31700 c 31800 c 31900 32000 c 32100 c 32200 c 32300 c 32400 32500 32700 32900 33000 33100 c 33200 33300 33400 33500 33600 33700 33800 33900 c 34000 c 34100 c 34200 c 34300 34400 34500 This subroutine will punch (L) characters from the character string alpha. K serves as an index into the string. If more than (36) characters are desired, the character statement! have to be edited to the appropriate maximum length in this subroutine, and all subroutines called by this subroutine. IMPLICIT INTEGER*4(S) EXTERNAL PNCHAST,SETAST,PNCHENA,PNCHDAT COMMON ICSR,K,L,ICHAN COMMON /CHAR/ ALPHA INTEGER*2 ICHAN CHARACTER*36 ALPHA It is assumed that a channel has already been assigned to the punch (as in subroutine SUB), and that the CSR address has beer placed into ICSR (via a SENSECHAR QIO -- see subroutine SUB). ALPHA='ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' K=l L=36 Enable punch interrupts CALL PNCHENA(%VAL(ICSR)) Punch first character (will set up attn. ast) CALL PNCHDAT(%VAL(ICSR)) Wait for all characters to be punched (determined by subroutine PNCHAST, who issues the WAKE system service). I=SYS$HIBER() IF (.NOT. I) CALL SYS$EXIT(%VAL(I)) RETURN END ******************* PNCHAST ******************* SUBROUTINE PNCHAST(MYCSR) EXTERNAL PNCHDAT COMMON ICSR,K,L,ICHAN COMMON /CHAR/ ALPHA INTEGER*2 ICHAN,MYCSR(4) CHARACTER*36 ALPHA This subroutine passes control to subroutine PNCHDAT. It is included so PNCHDAT doesn't specify itself as the ast routine. CALL PNCHDAT(%VAL(ICSR)) RETURN END PRINTER.LIS PRINTER.COM CINLOAD.COM PRINTER Table of contents ( 1) 2697 ( 1) 9402 ( 1) 10702 ( 1) 17102 ( 1) 27702 Local Data System Mapped Data System Mapped Routines Main Program AST Routine For Each Printer Interrupt 12-SEP-1984 18:02:55 VAX-11 Macro V03-01 Page 0 PRINTER V01 12-SEP-1984 18:02:55 VAX-11 Macro V03-01 Page 1 26-MAR-1980 08:10:58 WORK2:[COURSE.DRIVER.RT]PRINTER.MA(l) 0003FF4C 0000014C 001009FF 00000001 00000000 00000002 00000040 00000080 00008000 000001FB 00000020 00000000 OOOOOOOA 00000001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 opoo 0000 0000 100 . TITLE PRINTER 110 . ID ENT /VO 1I 120 130 CONNECT TO INTERRUPT EXAMPLE 140 200 300 400 This program controls the line printer using the connect 500 to interrupt system service scheme. The printer's CSR is 600 A0777514, it has two registers (CSR first, then data register). 700 The printer is activated by placing a value to be printed in the 800 data register. The printer generates an interrupt after the 900 character is printed if the interrupt enable bit in the CSR 1000 is set. The program wil 1 prompt the user for data, 1100 and then print the data (tel ling the user each character that 1200 was printed). 1300 1310 AUTHOR: Viktors J. Muiznieks 25-March-1980 1500 1600 System macros for defining offsets and symbols 1700 1800 1900 2000 2100 2200 2300 2400 $CINDEF $CRBDEF $IDBDEF $IODEF $I0780DEF $UCBDEF connect to interrupt channel request block interrupt data block I/O function codes 11-780 adapter codes unit control block 2500 2600 $VECDEF CRB vector fields 2605 2610 Local Symbol Definitions 2615 2620 2625 CSR = A0777514 2630 CSR PAGE OFFSET = <CSR&AXlFF> 2635 PFN-= <I0780$AL UBOSP+CSR>@-9 2640 2645 PAGE COUNT = 1 2650.STATUS = 0 2655 DATA = 2 2660 INT ENABLE = AX40 2665 READY = AX80 2670 ERR BIT = AX8000 2675 MAX-TT BYTES = 507 2680 LF BUFFER CR = 32 2685 CR-= 13 - 2690 LF = 10 2692 EXPECTED = 1 2695 printer CSR register page off set of CSR PFN for printer reg. 's @-9 divides by 512 reg. fit on 1 page status reg. offset data reg. offset int. enable bit printer ready bit printer error bit entered by user TT carriage control carriage return 1 ine feed int. expected bit 2697 .SBTTL Local Data PRINTER VOl Local Data 12-SEP-1984 18:02:55 VAX-11 Macro V03-01 Page 2 26-MAR-1980 08:10:58 WORK2:[COURSE.DRIVER.RT]PRINTER.MA(1) 0000 0000 0000 0000 3A 30 41 50 4C 5F 00000008'010EOOOO' 0000 OOOE 54 54 00000016'010EOOOO' OOOE 0018 0000 0018 001A 0000 001A 00000000 00000000 001C 0024 0024 0024 0024 00000200' 0024 00000200' 0028 002C 002C 002C 002C 002C 002C 70 20 65 62 20 6F 74 20 61 74 61 44 002C 3E 52 43 3C 28 20 64 65 74 6E 69 72 0038 20 3A 29 65 6E 6F 6E 20 72 6F 66 20 0044 00000024 0050 0050 69 72 70 20 64 65 68 73 69 6E 69 46 0050 63 61 72 61 68 63 20 67 6E 69 74 6E 005C 20 72 65 74 0068 006C 00 006C 0000001D 006D 006D 72 72 75 63 63 6F 20 72 6F 72 72 45 006D G9 74 GE 69 72 70 20 GE 69 20 64 G5 0079 72 70 20 2D 20 61 74 61 64 20 67 6E 0085 69 74 72 6F 62 61 20 6D 61 72 67 6F 0091 2E 67 6E 009D 00000033 OOAO OOAO OOAO OOAO OOAO OOAO OOAO 00000000 OOAO 00000000 OOA4 00000200' OOA8 0000022F' OOAC OOBO 0000023D' OOBO 00000000' OOB4 0088 2700 i2800 2900 3100 3200 3300 Parameters for $ASSIGN and $0IO system services EVICE NAME: - .ASCID I LPAO:/ T NAME: - ; printer descriptor ; terminal descriptor 3400 I - ~ASCID /TT/ 3500 tT CHAN: 3600 .WORD ; terminal channel # . 3700 DEVICE CHAN: ; printer channel # 3800 - .WORD 3900 IOSB: .QUAD ; IOSB for $0IO tails 4100 4200 Parameters for $CRMPSC system service to map the Unibus I/O page 4300 4500 M' AP ADR: for $CRMPSC 4600 - .ADDRESS AX200 start address (PO) 4700 .ADDRESS AX200 end address (PO) 4800 4900 5000 Messages sent to the terminal user 5100 5200 5300 PROMPT STRING: ; for terminal user 5400 .ASCII /Data to be printed (<CR> for none): I 5500 PROMPT LENGTH = . - PROMPT STRING 5600 AST STRING: - 5700 - .ASCII /Finished printing character I sent in AST routine 5800 CHARACTER: 5900 .BYTE 6000 AST LENGTH = - AST STRING 6100 ERROR STRING: ; if print error occurs 6200 .ASCII /Error occurred in printing data - program aborting./ 6300 ERR LENGTH ERROR STRING 6400 8200 8300 Parameters used by connect to.interrupt $0IO system service 8400 8500 8600 ROUTINE OFFSET LIST: 8700 -.LONG 0 ; powerfail recovery 8800 .LONG 0 ; start I/O 8900 .LONG LP INTERRUPT - SHARED BUFFER START ; interrupt service 9000 .LONG LP-CANCEL - SHARED BUFFER START ; cancel I/O 9100 SHARED BUFFER DESC~ 9200 .LONG- SHARED BUFFER END - SHARED BUFFER START ; buffer length 9300 .LONG SHARED-BUFFER-START - ;-buffer starting addr. 9402 .SBTTL System Mapped Data PRINTER VOl System Mapped Data 12-SEP-1984 18:02:55 VAX-11 Macro V03-01 Page 3 26-MAR-1980 08:10:58 WORK2: [COURSE.DRIVER.RT]PRINTER.MA(l) 0088 0088 0088 0088 0088 0088 0088 00000000 0000 0000 00 0000 000001FC 0001 000001FE OlFC 00 01FE 00 01FF 0200 0200 9500 9600 9700 9800 9900 10000 10100 10200 10300 10400 10500 10600 10640 10680 10690 10700 10702 Shared buffer for use by program and service routines. Note that the buffer is aligned to begin on a page boundary, and given write acce~s. Both the data area and the service routines are described by the shared buffer descriptor. .PSECT SHAREDBUF,PAGE,WRT SHARED BUFFER START: - .BYTE- 0 TTDATA: .BLKB MAX TT BYTES .BLK8 2 - CURRENT: .BYTE 0 FLAGS: . BYTE 0 .S8TTL System Mapped Routines used as index max. 507 bytes for <CR> <LF> data printed expected int. flag PRINTER V01 System Mapped Routines 12-SEP-1984 18:02:55 VAX-11 Macro V03-01 Page 4 26-MAR-1980 08:10:58 WORK2:[COURSE.DRIVER.RT]PRINTER.MA(1) 50 27 F9 AF 01 F4 AF 54 64 64 OOSO SF 15 64 SOOO SF OE 53 04 A2 54 63 53 54 05 AF 63 50 0000 8F 50 24 A5 50 2C BO 60 0040 SF 0200 10800 Note that since offsets must be specified in the routine 0200 10900 offset list above, the following service routines must be 0200 11000 placed immediately following the shared buffer data area. 0200 11100 0200 11400 The LP INTERRUPT routine is called (in kernel mode, in system 0200 11500 context) after the printer generates an interrupt. The inputs are 0200 11600 R2 - address of counted argument list 0200 11700 R4 - address of IDB 0200 11800 R5 - address of UCB 0200 11900 0200 12000 The counted argument list contains the following items: 0200 12100 O(R2) - count of arguments (4) 0200 12200 4(R2) - system mapped address of shared buffer 0200 12300 8(R2) - address of AST parameter 0200 12400 12(R2) - IDB address 0200 12500 16(R2) - UCB address 0200 12600 0200 12700 The routine will place the character printed into the CURRENT 0200 12800 location, and request that an AST be delivered (by placing 0200 12900 a 1 in RO before issuing an RSB). If any error occurred in 0200 13000 the print operation, a 0 is placed into CURRENT. If the 0200 13010 interrupt is unexpected, no AST is requested (RO cleared). 0200 13100 0200 13200 The routine must preserve all registers except RO-R4. 0200 13300 0200 13800 LP INTERRUPT: interrupt service 04 0200 13810 CLRL RO assume unexpected int. E5 0202 13820 BBCC #EXPECTED,FLAGS,NO AST dismiss if unexpected 94 0207 13900 CLRB CURRENT assume printer error DO 020A 14000 MOVL IDB$L CSR(R4),R4 get CSR address 83 0200 14100 BITW #READV,STATUS(R4) printer ready? 13 0212 14200 BEQL Q AST error if not 83 0214 14300 BITW #ERR BIT,STATUS(R4) printer error? 12 0219 14400 BNEQ Q AST yes if NEQ DO 0218 14500 MOVL 4(R2),R3 get buff er address 9A 021F 14600 co 0222 14700 MOVZBL (R3),R4 ADDL2 R4,R3 get index to char. point' to char'. 90 0225 14800 MOVB (R3),CURRENT specify current data 3C 0229 14900 Q AST: MOVZWL #SS$_NORMAL,RO request AST delivery 05 022E 15000 NO AST: RSB 022F 15200 022F 15300 The LP CANCEL routine is called (in kernel mode, in system 022F 15400 context) when the process is being disconnected from the 022F 15500 interrupt. This routine wil 1 disable printer interrupts. The 022F 15600 inputs to the routine are as follows: 022F 15800 R2 - negated value of channel index number 022F 15900 R3 - IRP address 022F 16000 R4 - PCB address for process cancelling I/O 022F 16100 R5 - UCB address 022F 16400 LP CANCEL: DO 022F 16500 MOVL DO 0233 16600 MOVL AA 0237 16700 BICW UCB$L CRB(R5),RO @CRB$L INTD+VEC$L IDB(RO),RO #INT ENABLE,STATUS(RO) cancel I/O routine get CRB get CSR address disable interrupts 05 023C 16800 RSB 0230 17000 SHARED BUFFER END: 0230 17102 .SBTTL Main Program PRINTER V01 Main Program 0230 17200 0230 17300 0230 17400 0230 17500 0230 17600 0230 17700 00000000 17800 0000 17900 0000 0000 18000 START: 0002 18100 0002 18200 0002 18300 0002 18400 03 50 EB 0017 18500 014C 31 001A 18600 0010 18700 10$: 03 50 EB 0032 18800 0131 31 0035 18900 0038 19000 0038 19100 0038 19200 0038 19300 0038 19400 0038 19500 0038 19600 0038 19700 0038 19800 0038 19900 0038 20000 0038 20100 0038 20200 003S 20300 003S 20400 0038 20500 0038 20600 20$: 003S 20700 0038 20800 003S 20900 003S 21000 03 50 ES 0066 21100 OOFD 31 0069 21200 006C 21300 006C 21400 006C 21500 006C 21600 30$: 006C 21700 006C 21900 006C 22000 006C 22100 006C 22200 006C 22300 006C 22400 03 50 ES 009F 22500 OOC4 31 00A2 22600 OOA5 22700 OOA5 22SOO OOA5 22900 12-SEP-1984 18:02:55 VAX-11 Macro V03-01 Page 5 26-MAR-19SO 08:10:5S WORK2:[COURSE.DRIVER.RT]PRINTER.MA(1) The start of the main routine that wil 1 actually control the printer, after mapping to the I/0 page and connecting to a printer interrupt. .PSECT CODE,EXE,NOWRT,PAGE .WORD 0 nul 1 entry mask Assign channels to terminal and printer $ASSIGN S DEVNAM=TT NAME,CHAN=TT CHAN BLBS -R0,10$ - BRW ERROR $ASSIGN S DEVNAM=DEVICE NAME,CHAN=DEVICE CHAN BLBS -R0,20$ - BRW ERROR Map Unibus I/O page ijnto process PO space so device registers are accessible. Flags indicate that section is to be mapped at end of PO region (which will be expanded to accomodate the new addresses since the SEC$M EXPREG bit is set); the PO region is identified because the INADR argument contains addresses in the PO range. The SEC$M PFNMAP bit indicates that the mapping should be done by a pfn Tn the VBN argument (rather than by the default virtual block number mapping scheme). The region mapped can be written to by the program since the SEC$M WRT bit is also set (i.e;, device registers can be written Io by the program). Note that only one page (PAGCNT parameter) is mapped. If the device registers 'straddle' a page boundary, then more than one page should be mapped. $CRMPSC_S BLBS BRW R0,30$ ERROR INADR = MAP ADR ,- ; map thto PO region RETADR= MAP-ADR ,- ; return actual addr. FLAGS = #$EC$M WRT!SEC$M PFNMAP!SEC$M EXPREG,- PAGCNT= #PAGE COUNT ,- ; only need 1-page VBN #PFN - ; pfn for mapped page Issue connect to interrupt $QIO $QIO S CHAN = DEVICE CHAN ,- ; specify printer chan - FUNC = #IO$ CONINTWRITE ,- ; al low write buffer Pl = SHARED-BUFFER DESC ,- ; shared buffer desc. P2 = #ROUTINE OFFSET LIST ,- ; routines provided P3=#<<3@16>!CIN$M EFN!CIN$M TSR!CIN$M CANCEL!CIN$M REPEAT>,- P4 = #LP AST ,- - P5 = #0 ~- - AST after interrupt no AST parameter used P6 = #1 AST count of 1 BLBS R0,40$ BRW ERROR Ask user for data to be printed ·r ,-,·, PRINTER V01 03 50 OOSD 0000001E'EF 5A 55 0000001E'EF 52 00000001'EF 52 55 62 OAOD SF 52 55 55 02 54 0000014C SF 00000024'EF 53 02 A4 OOOOOOOO'EF 64 0040 BF OOOOOOOO'EF 00 000001FF'EF 01 63 B2 E5 55 64 0040 BF FF67 lA 50 09 50 Main Program OOA5 23000 40$: OOA5 23100 ODA5 23200 ES OOD6 23300 31 OOD9 23400 OODC 23500 ; OODC 23600 ; OODC 23700 ; B5 OODC 23SOO 50$: 13 OOE2 23900 3C OOE4 24000 DE OOEB 24100 co OOF2 24110 BO OOF5 24120 C2 OOFA 24130 co OOFD 24140 Cl 0100 24200 3E 010C 24300 94 0110 24400 AB 0116 24500 96 0118 24600 60$: E3 0121 24610 90 0129 24700 70$: 012C 24SOO F5 0133 24900 AA 0136 25000 31 013B 25100 013E 25200 013E 25300 013E 25400 ; 013E 25500 ; 013E 25600 DONE: E9 014C 25700 014F 25SOO E9 015D 25900 0160 26000 0169 26100 0169 26200 0169 26300 ; 0169 0169 26400 26500 E' RROR: 0172 26600 0172 27702 12-SEP-1984 18:02:55 VAX-11 Macro V03-01 Page 6 26-MAR-1980 08:10:58 WORK2:[COURSE.DRIVER.RT)PRINTER.MA(1) $QIOW_S CHAN=TT_CHAN,FUNC=#I0$_READPROMPT,IOSB=IOSB,- P1=TTDATA,P2=#MAX_TT_BYTES,P5=#PROMPT_STRING,- P6=#PROMPT LENGTH BLBS R0,50$ BRW ERROR Print data user entered, or exit if no data to print TSTW IOSB+2 BEQL DONE MOVZWL IOSB+2,R5 MOVAL TTDATA,R2 ADDL2 R5,R2 MOVW #<CR>+<LF@8>,(R2) SUBL2 R5,R2 ADDL2 #2,RS ADDL3 MAP ADR,#CSR PAGE OFFSET,R4 MOVAW DATA(R4),R3 - CLRB SHARED BUFFER START BISW #INT ENABLE,STATUS(R4) INCB SHARED BUFFER START BBCS #EXPECTED,FLAGS,70$ MOVB (R2)+,(R3) $HI BER S SOBGTR R5,60$ BICW #INT ENABLE,STATUS(R4) BRW 40$ ; check byte count ; exit if zero ; save byte count ; point to data ; point to end of data ; insert <CR> <LF> ; restore pointer ; account for <CR> <LF> ; point to CSR ; point to data reg. ; initialize index ; set int. enable bit ; adjust byte index ; indicate int. expected ; print a character ; wait for AST to wake ; loop if more to print ; disable printer i '"t. ; get more user data User doesn't want any more data printed $DASSGN S CHAN=TT CHAN BLBC RO.ERROR $DASSGN S CHAN=DEVICE CHAN BLBC RO, ERROR $EXIT S ; clean up channels Error occurred -- report it to user $EXIT S CODE=RO .SBTTL AST Routine For Each Printer Interrupt PRINTER VOl AST Routine For Each Printer Interrupt 12-SEP-1984 18:02:55 VAX-11 Macro V03-01 Page 7 26-MAR-1980 08:10:58 WORK2:[COURSE.DRIVER.RT]PRINTER.MA(l) 0000 OOOOOlFE'EF OD 91 41 13 OOOOOlFE'Ef OA 91 38 13 000001FE'EF 95 3C 13 0000006C'EF 000001FE'EF 90 04 0172 0172 0172 0172 0172 0172 0172 0172 0172 0172 0172 0172 0174 0178 017D 0184 0186 018C 018E 0199 0199 0199 01BE 01C9 OlCA OlCA 01CA OlEF OlFC 01FC 27800 27900 28000 28100 28300 28400 28500 28600 28700 28800 28900 29000 29140 29180 29220 29260 29300 29400 29410 29500 29600 29700 29800 29900 30000 30100 30200 30300 30400 30500 LP_AST: 10$: ERR: This AST routine is entered whenever the device generates an interrupt, and the process-supplied AST routine places a success code in RO before issuing the RSB. The routine displays for the user the character printed, and awakens the main procedure to print the next character (unless there was an error in the printing of the character, indicated by CURRENT containing a 0, in which case an error message is displayed to the user, and the image exits). .WORD 0 ; null entry mask CMPB #CR.CURRENT ; was character a <CR>? BEQL 10$ ; if so, no message CMPB #LF,CURRENT ; was character a <Lf>? BEQL 10$ ; if so, no message TSTB CURRENT ; 0 ==> printer error BEQL ERR ; report error MOVB CURRENT,CHARACTER ; save char. printed $QIOW_S CHAN=TT CHAN,FUNC=#IO$ WRITEVBLK,- ; tell user that Pl=AST STRING,P2=#AST LENGTH,- ; character has been P4=#LF-BUFFER CR - ; printed $WAKE_S ; print next character RET $QIOW_S CHAN=TT CHAN,FUNC=#IO$ WRITEVBLK,- ; tell user that Pl=ERROR STRING,P2=#ERR LENGTH,-; error occurred in P4=#LF BUFFER CR ; printing $EXIT_S CODE=#SS$_DRVERR ; and stop .END START PRINTER Symbo 1 tab 1e $$Tl AST LENGTH AST-STRING CHARACTER CIN$M CANCEL CIN$M-EFN CIN$M-ISR CIN$M-REPEAT CR - CRB$L I NTD. CSR - CSR PAGE OFFSE;T CURRENT - DATA DEVICE CHAN DEVICE-NAME DONE - ERR ERROR ERROR STRING ERR BIT ERR-LENGTH EXPECTED FLAGS IDB$L CSR INT ENABLE !0$-CONINTWRITE IO$-READPROMPT 10$-WRITEVBLK I07SO$AL UBOSP IOSB LF LF BUFFER CR LP-AST LP-CANCEL LP-I N-TERRUPT MAP ADR MAX-TT BYTES NO AST PAGE COUNT PFN PROMPT LENGTH PROMPT-STRING Q AST - READY ROUTINE OFFSET LIST SEC$M EXPREG SEC$M-PFNMAP SEC$M-WRT SHARED BUFFER DESC SHARED-BUFFER-END SHARED-BUFFER-START SS$ DRVERR SS$-NORMAL START STATUS SYS$ASSIG'N 00000001 00000010 00000050 R 01 0000006C R 01 00000080 00000001 00000040 00000004 OOOOOOOD 0000002~ 0003FF4C 0000014C 000001FE R 03 00000002 OOOOOOlA R 01 00000000 R 01 0000013E R 04 000001CA R 04 00000169 R 04 00000060 R 01 00008000 00000033 00000001 OOOOOlFF R 03 00000000 00000040 00000030 00000037 00000030 20100000 OOOOOOlC R 01 OOOOOOOA 00000020 00000172 R 04 0000022F R 03 00000200 R 03 00000024 R 01 000001FB 0000022E R 03 00000001 001009FF 00000024 0000002C R 01 00000229 R 03 00000080 OOOOOOAO R 01 ******** x 04 ******** x 04 ******** x 04 OOOOOOBO' R 01 0000023D R 03 00000000 R 03 ******** x 04 ******** x 03 00000000 R 04 00000000 ******** GX 04 SYS$CRMPSC SYS$DASSGN SYS$EXIT SYS$HIBER SYS$QIO SYS$QIOW SYS$WAKE TTDATA TT CHAN TT-NAME UCB$L CRB VEC$L=IDB 12-SEP-1984 18:02:55 VAX-11 Macro V03-01 Page 8 26-MAR-1980 08:10:58 WORK2:[COURSE.DRIVER.RT]PRINTER.MA(1) ******** GX 04 ******** GX 04 ******** GX 04 ******** GX 04 ******** GX 04 ******** GX 04 ******** GX 04 00000001 R 03 00000018 R 01 OOOOOOOE R 01 00000024 00000008 PRINTER Psect synopsis 12-SEP-1984 18:02:55 VAX-11 Macro V03-01 Page 9 26-MAR-1980 08:10:58 WORK2:[COURSE.DRIVER.RT]PRINTER.MA(1) Psect synopsis ------------+ PSECT name ABS BLANK $ABS$ SHAREDBUF CODE Al location PSECT No. Attributes ----~---- ----'--- ...... --.......:. 00000000 0.) 00 ( 0.) NOPIC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE OOOOOOB8 184.) 01 ( 1.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE 00000000 0.) 02 ( 2.) NOPIC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE 00000230 573,) 03 ( 3.) NOP IC USR CON REL LCL NOSHR EXE RD WRT NOVEC PAGE 000001FC 508.) 04 ( 4.) NOP IC USR CON REL LCL NOSHR EXE RD NOWRT NOVEC PAGE ---------+ ! Performance indicators ! +------~-----------------+ Phase Page faults CPU Time Elapsed Time Initialization Command processing Pass 1 Symbol table sort Pass 2 Symbol table output Psect synopsis output Cross-reference output Assembler run totals 104 128 828 14 207 10 5 0 1299 00:00:00.31 00:00:00.50 00:00: 11.02 00:00:01.32 00:00:01 ;73 00:00:00.08 00:00:00.03 00:00:00.00 00:00:14.99 00:00:01.24 00:00:02.19 00:00: 14.03 00:00:01.33 00:00:01 .92 00:00:00.15 00:00 00.03 00:00 00.00 00:00 20.89 The working set limit was 500 pages. 48128 bytes (94 pages) of virtual memory were used to buffer the intermediate code. There were 50 pages of symbol table space allocated to hold 852 non-local and 8 local 307 source lines were read in Pass 1, producing 17 object records in Pass 2. 26 pages of virtual memory were used to define 25 macros. symbols. ! Macro ~ibrary statistics Macro library name Macros defined SVS$SVSROOT:(SYSLIB]LIB.MLB;1 6 SVS$SYSROOT:(SVSLIB]STARLET.MLB;1 16 TOTALS (al 1 1 ibraries) 22 996 GETS were required to define 22 macros. There were no errors, warnings or information messages. MACRO/LIS PRINTER+SYS$LIBRARY:LIB/LIB 100 $ ! 200 $ ! 300 $MACRO/LIS PRINTER+SYS$LIBRARY:LIB/LIB 400 $LINK PRINTER,SYS$SYSTEM:SYS.STB/SEL PRINTER.COM 100 200 300 400 500 600 700 800 900 1000 1100 $ ! $ ! $MCR SYSGEN CONNECT LPA0/ADAPTER=3/VECTOR=%0200/CSR=%0777514/DRIVER=CONINTERR SHO /DEV=CON USE CURRENT SHOW REALTIME SPTS EXIT CINLOAD.COMAcrobat 11.0.23 Paper Capture Plug-in