DU (MSCP) Handlers allowing TSX-Plus to use Large Discs DUCM Version 3, 23-Sep-86 Authors: Peter Miedecke Chester Wilson Webster Computer Charleville 4470 17 Malvern Street Australia Bayswater 3153 (074) 54 1244 Melbourne, Aust. (03) 729 8444 As with all DECUS software, these programmes are distributed on an "as is, where is" basis. The above are interested in any bugs or problems, but make no committment of any sort as to the maintenance of this product. This manual contains three parts: (1) Users' Guide (2) DUCM Manual (3) WA (D0, D1 etc) Manual The Users' Guide should be sufficient reading to use these handlers, or for non-technical readers. For fuller details, see parts (2) & (3). DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2 Table of Contents USERS' GUIDE 1.1 Introduction 1.2 Disc Usage 1.3 Changing Handler Settings 1.3.1 Examples 1.4 TSX-Plus System Generation 1.5 Creating More Handlers 1.6 Modifying TSX DUCM MANUAL ITSELF 2.1 Introduction 2.2 Update History 2.3 SET Commands 2.4 SPFUNs 2.4.1 Bypass 2.4.2 Error Code I/O 2.4.3 Partition Table I/O 2.4.4 Partition Size 2.4.5 Unit Size 2.4.6 Status Table 2.4.7 Physical I/O 2.5 TSMUNG - Modifying TSX 2.6 Assembly Options 2.7 Running DUCM as a Programme; 2.8 Error Messages WA - A MUNGING HANDLER FOR LARGE DISCS 3.1 Introduction 3.1 How it works 3.2 SET Commands 3.3 Running WA as a Programme 3.4 Restriction on /U & /P 3.5 Setting Up 3.6 Safety Precautions & Recommended Use 3.7 Example of Command File INDEX CHAPTER 1 Users' Guide 1.1 Introduction. These handlers allow large discs to be fully used under TSX-Plus. With the normal DEC or S & H DU handlers a maximum of 256 Megabytes can be used. Four handlers are supplied: DUCM.TSX, D1.TSX D2.TSX and D3.TSX. These enable discs with a total capacity of 1024 Megabytes to be supported. More disc capacity can be handled - see "Creating More Handlers". These handlers consist of a primary handler, DUCM.TSX, that manages the disc controller, and the first 256 Megabytes of storage, and the secondary handlers D1,D2 and D3.TSX that allow the user access to the storage beyond this. As you can see, having multiple handlers is the means of getting around the basic limitation of 8 units (32 Megabytes) per unit imposed on any device handler by RT-11/TSX-Plus. NOTE THAT DUCM.TSX IS NOT A COPY OF THE NORMAL TSX-Plus DU HANDLER SUPPLIED ___ BY S & H, DU.TSX. ONLY DUCM.TSX CAN BE USED WITH THESE "LARGE DISC" HANDLERS. It IS however designed to be used as a REPLACEMENT for DU.TSX. These handlers are delivered pre-configured for two 512 Megabyte drives. You may reconfigure them as shown below. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 1-2 Users' Guide 1.2 Disc Usage. RT-11 and TSX-Plus communicate with large MSCP discs by dividing them up into a number of "disc partitions". This is because the operating system refers to a disc by means of 16 bit blocks numbers - therefore 64K 512 byte blocks (32 Megabytes) is the maximum that can be referred to as a "physical unit". You use discs larger than 32 Megabytes by breaking them up into a number of 32 Megabyte "Partitions", each of which is referred to as a physical unit - i.e. DU0:, DU1:, DU7: etc. However, as their are only 8 units allowed per controller, with the present handlers you can only use a disc of 256 Megabytes (8 times 32 Megabytes), i.e.:- Drive Partition Addressing Range (Megabytes) (Octal) DU0: 0 0-31 DU1: 1 32-63 DU2: 2 64-95 DU3: 3 96-127 DU4: 4 128-159 DU5: 5 160-191 DU6: 6 192-223 DU7: 7 224-255 As you can see, each handler allows 256 megabytes of disc space to be used. This group of 256 megabytes may be on one physical drive or spread across a number of drives. For discs larger than 256 Megabytes, we add another handler (D1). Therefore D1 refers to:- Drive Partition Addressing Range (Megabytes) (Octal) D10: 10 256-287 D11: 11 288-319 D12: 12 320-351 D13: 13 352-383 D14: 14 384-415 D15: 15 416-447 D16: 16 448-479 D17: 17 480-511 In the examples below we have four disc handlers to cater for 1024 Megabytes on two physical drives. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 1-3 Users' Guide 1.3 Changing Handler Settings. We recommend that you change these setting by running the handler as a programme, and that you ONLY do this under RT-11. Doing it under TSX-Plus is a good recipe for chaos and disaster. DO NOT CHANGE THE SETTINGS FOR THE PRIMARY HANDLER DUCM.TSX. It is set up differently. (SET commands on the DUCM handler only return an error under TSX-plus.) .R D1.TSX (also D2.TSX, D3.TSX etc) The following options are available:- Option Description /H Type help text /L List the current values in internal tables (in the following switches, "unit" is one of the handlers logical units. It must be a single digit in the range 0 - 7.) unit/U:n Specify the PHYSICAL unit number to which this logical unit refers. unit/P:nn Specify the PARTITION to which this logical unit refers. Append a "." to make the partition number decimal rather than octal. /R If "/R" is included in any command line unit is set to be READ ONLY. More options exist, full details may be found in chapter 3, the "WA Handler" documentation. 1.3.1 Examples. .R D1.TSX Run the driver under RT-11 *4/U:3/P:1 Associate D14: with physical unit three partition 1 *0/P:2/R Associate D10: with physical unit zero partition 2 READ ONLY *1/P:10. Associate D11: with physical unit zero partion 10. (12 octal) DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 1-4 Users' Guide Here is an example of how to set up enough logical discs to be able to use the disc capacity of a controller with two Fujitsu Eagles - 2351's (400 Megabytes formatted each) The primary handler is set up so that the units D00: to D07: correspond to partitions 0 to 7. Do not alter these settings. Set up the second handler. .R D1.TSX Run the second handler *0/U:0/P:8. unit zero part 8 *1/U:0/P:9. unit one part 9 *2/U:0/P:10. unit two part ten *3/U:0/P:11. unit three part eleven *4/U:0/P:12. unit four part eleven (this last partition is not the full 32 megabytes - 64K blocks) *^C This covers the first Eagle - D00 through D07 and D10 through D14 now refer to the 13 (decimal) 32 Megabyte partitions on the disc. Now for the second Eagle. Set up the third handler:- .R D2.TSX Run the third handler *0/U:1/P:0 Start with unit zero part zero.... *1/U:1/P:1 now unit 1 part 1 *2/U:1/P:2 two ibid *3/U:1/P:3 three and so forth *4/U:1/P:4 four *5/U:1/P:5 five *6/U:1/P:6 six *7/U:1/P:7 seven *^C .R D3.TSX Run the fourth handler *0/U:1/P:8. unit zero part eight *1/U:1/P:9. unit one part nine *2/U:1/P:10. unit two part ten *3/U:1/P:11. unit three part eleven *4/U:1/P:12. unit four part twelve (this last partition is not the full 32 megabytes/64K blocks) *^C And this is it. We now have 26 (decimal) logical units. God Bless TSX-Plus and all who sail upon her in large discs! DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 1-5 Users' Guide 1.4 TSX-Plus System Generation Determine the number of 32 megabyte units you need for your configuration. As you can see from the example above, you need one handler per 8 units. Create enough handlers by copying D1.TSX. Remember DUCM.TSX is the handler that talks to the controller. You only have one of these per controller, but you can have as many "Large Disc Handlers" as you want. Edit TSGEN.MAC to include as many large disc handlers you require. They are specified as:- DEVDEF ,MAPH,DMA,HANBUF DEVDEF ,MAPH,DMA,HANBUF DEVDEF ,MAPH,DMA,HANBUF DEVDEF ,MAPH,DMA,HANBUF You must copy DUCM.TSX across to your system so that it becomes DU.TSX: .copy ducm.tsx sy:du.tsx 1.5 Creating More Handlers. The four handlers discussed above were copied as follows: Handler Created From Comments DU.TSX DUCM.TSX The actual MSCP handler D1.TSX WA.TSX Large disc Handler - first copy D2.TSX WA.TSX Large disc Handler - second copy D3.TSX WA.TSX Large disc Handler - third copy You may create more. There is a command file LGSET.COM. It creates the handlers as above, and then sets them up for two 512 Megabyte drives. You may wish to edit this file for your own use. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 1-6 Users' Guide 1.6 Modifying TSX It is possible to run the DUCM DU handler "mapped". This saves low memory space, allowing your system to handle more jobs. To do this you must use the TSMUNG programme on your TSX.SAV or it will not allow the DU handler to be mapped. This programme is provided on this distribution. .Run TSMUNG SY:TSX.SAV Successful TSX Modification . If you do this, you must NOT try to run using the DEC or S & H DU handlers (the system will fail to start TSX-plus). CHAPTER 2 DUCM Manual Itself 2.1 Introduction DUCM is designed to speed multi-user DU use, notably under TSX-plus. TSGEN.MAC should be set up to allow DU to be mapped into high memory, as this conserves almost 1k of low memory. [Problem: with V6.01 this requires munging of TSX.SAV due to a new restriction - see TSMUNG later in manual.] This document describes DUCM V2, 23-Sep-86. The use of versions earlier than V1g on TSX+ V6 or later can lead to system crashes on heavily loaded systems. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-2 DUCM Manual Itself 2.2 Update History Changes from V1 to V2 of DUCM: (1) SPFUNs 377 and 376 (read & write respectively, returning status) are now supported; (2) SPFUN 372 (DEC's partition table I/O) has been included - see details especially re RT V5.4 & later in manual. (3) SPFUNs 361 & 362 have been removed, being replaced by 372. (4) SETs are no longer allowed under TSX. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-3 DUCM Manual Itself 2.3 SET Commands This is a single-port handler only, but can cope with multiple units on that port. The DEC commands .SET DUx UNIT=n and .SET DUx PART=m are valid if used under RT-11. SETs are NOT permitted under TSX-plus on the DUCM handler itself, as TSX-plus conveniently rewrites that handler over itself. This is generally helpful, but with DUCM it causes loss of queue element information and kills the system. Unit and partition values may be altered under programme control. These values will not be retained across a reboot or other re-load of the handler. Under RT-11 any logical unit may have its logical unit or partition altered, but under TSX-plus this is restricted to DU6 and DU7. Separate parameters are kept under TSX-plus for units 6 & 7 for each job, the units DU0 through DU5 being common to all jobs. [They can only be set up by a SET command issued under RT-11]. If the handler is run as a job, it allows the user to examine the current partition table, and to alter the partition table as above. To perform SET commands upon the DUCM handler DU.TSX under RT-11, rename it XX.SYS (or some other unused handler name). Perform the SETs using "XX" instead of "DU", then rename it back to DU.TSX. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-4 DUCM Manual Itself 2.4 SPFUNs 2.4.1 Bypass SPFUN (SP.BYP 371) The DEC DU SPFUN SP.BYP (371) [bypass handler for direct MSCP request] has NOT been implemented, both from a point of view of safety in a multi-user environment, and technical difficulties with multi-request handler. 2.4.2 Error Code I/O (SP.RIO 377, SP.WIO 376) Read & write returning error codes (SPFUNs 377 & 376 respectively) have been implemented. These use the buffer address and word count as per normal I/O, but return a status word in the first word of the buffer (which therefore must be one word longer than the specified word count). This is used for bad block replacement purposes in RT-11 from version 5.4 on. Without it, DUP from the 5.4 release kit will not work. [Note that a negative word count causes either of these two SPFUNs to function as the other. This appears to be a feature... !] The error returns are: 100000 (& carry clear): no error - normal return 100002 (& carry clear): error which recovered upon retry 100200 (& carry set): BBR bit has been set for this block (no retries attempted) 177777 (& carry set): I/O error occurred on this request and did not recover on retry 2.4.3 Partition Table I/O (SP.DAT 372) SP.DAT (372) which reads or writes the partition table has been implemented, with variations. (1) Under TSX-plus, only units 6 & 7 may have their units or partitions changed by use of this request; (2) As this is a single-port handler, any value entered in the PORT byte will be taken as a high-order value for PARTITION. You will need a BIG disc to be able to use this! DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-5 DUCM Manual Itself (3) RT-11 changed the format of the partition table. From version 5.4 onward there are two additional words at the start of the partition table: <.rad50 /DU/> and <.word 8.>. The DUCM handler checks which version of RT it is being run under (or which version of RT that TSX appears to be) and returns (or uses) the appropriate partition table format. 2.4.4 Partition Size (SP.PSZ 373) The partition size SPFUN is the same as that for the DEC DU handler. 2.4.5 Unit Size (SP.USZ 300) This SPFUN returns unit size (rather than partition size) in two words in a manner analogous to SP.PSZ (373). The first word receives the high-order value of the size. 2.4.6 Status Table (SP.STS 363) This has been included as a primitive form of error logging. This returns a table in the form: 1 word (du.ver) Version Number (currently 200 octal) 1 word No. of init's performed successfully 1 word No. of retries performed in init'ing 1 word No. of bloody disasters (SA negative) 1 word No. of AVAIL errors 1 word No. of IO retries 1 word No. of IO errors This was included mainly for debugging, but has not been removed. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-6 DUCM Manual Itself 2.4.7 Physical I/O (SP.PIO 301) [For an alternative under TSX-plus, see associated WA handler and its documentation - chapter 3 of this manual.] Due to the restriction in RT-11 that normal I/O may only access 65565 blocks on any individual unit, and DU devices can extend rather dramatically beyond this limit, a means has been provided to allow simple access to a larger block number: SP.PIO is for physical rather than logical I/O. It allows a 24-bit block number, but only allows reading or writing whole blocks. This is done by using the Word Count word of the queue element as follows: High-order byte: number of blocks to transfer (negative if write, positive if read, zero seek [useless]); Low-order byte: high order eight bits of block address. [This byte does NOT change sign in a write!] Note that physical I/O, though it will use the UNIT parameter of whatever logical DU was selected, requires that the PARTITION parameter of that specified logical unit be zero. Thus: .SET DU3 UNIT=2,PART=0 will allow physical I/O on DU3, but .SET DU3 UNIT=0,PART=2 will cause any attempt at physical I/O to return an error. As an example of use of physical I/O, on the next page is a copy of the testing programme used with this handler: [Note: .SPFUN area,channel,function,buffer,wordcount,block] DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-7 DUCM Manual Itself .Title PIOTST - for testing physical I/O capability of DU: .Nlist bex,toc,sym .Enabl lc,gbl ; Must be assembled with CMAC, and linked with CVLLIB .mcall .csigen,.wait,.spfun sp.pio=301 ;Physical I/O SPFUN area: .blkw 7 ;General EMT area limit: .limit ;So we keep track of memory hlimit: 0 ;ibid (unused as yet) buffer: .blkw 256. ;I/O buffer defext: .rad50 / / ;Default extensions for CSIGEN Start:: .csigen limit+2,#defext ;Find which device we want to read. mov r0,hlimit ;New memory limit after handlers loaded. .wait #3 ;Did he specify a device? bcc s1 ;Yes - use it. type >;No - just tell him which version. br start s1: type > call rn2t ;Read double-precis number into R2/R3 ;(octal, decimal. or 0hex) tstb tlinb ;Check for null line in TT input buffer beq start ;If so, try for a different device. mov #<1 * 400>,r5 ;1 block to read - <.byte 0,1> bisb r2,r5 ;Add in high-order block number ;(R3 has low-order block number) .spfun #area,#3,#sp.pio,#buffer,r5,r3 bcc s2 type > br s1 s2: type > mov buffer,r0 ;Show him the first word call w8t ;(in octal, to the terminal) call tcrlf ;Append a type > ;(Probably folly to allow him to alter?) call rnt ;Read single-precision number tstb tlinb ;If null line, don't alter anything. bne s3 type > br s1 s3: mov r0,buffer ;If he means it, alter it mov #<-1 * 400>,r5 ;Write 1 block (negative = write) DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-8 DUCM Manual Itself bisb r2,r5 ;High-order block number again. ;(R3 still has low order) .spfun #area,#3,#sp.pio,#buffer,r5,r3 bcc s1 type > br s1 .end start DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-9 DUCM Manual Itself 2.5 TSMUNG - for modifying TSX plus With the advent of TSX-plus version 6, no matter what is specified in the TSGEN file (eg DEVDEF ,MAPH,HANBUF,DMA) TSX refuses to allow the DU (or the DY) handler to be mapped into high memory. This is fine to protect people trying to do this with DEC or S & H handlers, but is a nuisance when we have a legitimate handler capable of mapped performance. A programme TSMUNG is provided. This modifies the default values set up for the DU (and optionally the DY) device. It is run, using the name of the TSX.SAV file to be modified appropriately. To allow DU to be mapped, append /U to the filename. To allow DY to be mapped, append /Y to the filename. [No switches implies /U] .Run TSMUNG *sy:tsx.sav Successful TSX modification . or .Run TSMUNG sy:tsx.sav Successful TSX modification . If it should be desired to run the DY handler mapped in addition to the DU handler (WARNING - again, make sure your handler is capable of being run mapped and is not the standard DEC or S & H handler), append a /Y and a /U to the filename. For example: .Run TSMUNG du:tsx.sav/y/u Successful TSX modification . (Merely specifying DU:TSX.SAV/Y will allow the DY handler to be mapped but NOT the DU handler.) If TSMUNG cannot find the relevant string of device names in TSX, it will tell you so. If this is the case, you are probably trying to operate upon a version of TSX different from that for which TSMUNG was written (version 6.01). DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-10 DUCM Manual Itself 2.6 Assembly Options NUMBER OF JOBS: As TSX-plus now allows more than 32 jobs (and has a whole word set up in the queue element for the job number!), the number of jobs allowed for in the DUCM partition table is now an assembly parameter. The parameter is "ts$job", with a default value of 50 (decimal). It is defined such that a prefix file with a different value will override the definition within DUCM. UNIBUS SYSTEMS: Normally DUCM is set up to allow use of the WA handler to access multiple units and partitions of large discs. This can only be used under Q-bus systems (as under unibus systems the word used for passing partition and unit information across to DUCM is used for the unibus mapping register value). If you are using a unibus system, you will need to assemble DUCM with a prefix file containing $XLINK=0 for safety. This suppresses the WA code linkage. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-11 DUCM Manual Itself 2.7 Running DUCM as a Programme The handler may be run as a programme (R DU.TSX, or R DU.SYS). The format of this has been changed from earlier versions to allow multiple DU handlers on large systems. When run, it expects a normal CSI-style command string, with a device name (of a DU-type device - using the DUCM handler) and switches as necessary. Switches available are: /E type the error table /L type the current units and partitions /S type the size of the device by partitions /C:n change the partition/unit for logical unit n (6 or 7 only if TSX) used with one or both of the following switches: /P:n partition number /U:n physical unit number /H type this message An unknown switch types the following message: ?DU-E-Illegal switch /x. For help type /H To see the size of a particular DU device: .R DU.SYS *du:/s 2 partitions each of 65535 blocks 1 partition of 6951 blocks *^C To type the current units and partitions: .R DU.SYS *DU:/L Logical Physical Partition Unit Unit 0 0 0 1 0 1 2 0 2 3 0 3 4 0 4 5 0 5 6 0 6 7 0 7 *^C DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-12 DUCM Manual Itself To examine the error table: .R DU.SYS *du:/e Version Number: 200 Number of successful INIT's: 1 Number of retries on INIT's: 0 Number of bloody disasters: 0 Number of AVAILABLE errors: 2 Number of I/O retries: 2 Number of I/O errors: 0 *^C To get the HELP text: .R DU.SYS *du:/h DU.SYS Internally-Queueing Multi-Unit V2 23-Sep-86 Switches available are: /E type the error table /L type the current units and partitions /S type the size of the device by partitions /C:n change the partition/unit for logical unit n (6 or 7 only if TSX) used with one or both of the following switches: /P:n partition number /U:n physical unit number /H type this message *^C It is allowable to change a unit/partition for unit 6 or unit 7 under TSX, or those of any unit under RT-11 (at your own risk if you change those of the system device!). This is done using the /C switch, in conjunction with /P (for partition number) and /U (for physical unit number). For example, to change unit 6 to partition 3 on unit 2: .R DU.TSX *DU:/C:6/P:3/U:2 If the partition requested does not exist, the user will be informed. Under TSX-plus, only the DU unit for the particular job will be altered. [Under TSX-plus, the associated WA handler is recommended for safer and more consistent access in large systems.] DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 2-13 DUCM Manual Itself 2.8 Error Messages ?DU-E-Required Handler must be loaded ?DU-E-DU class device not specified ?DU-E-Handler version differs from that of programme being run ?DU-E-/C requires a value (6 or 7 only if TSX) ?DU-E-/C may only change units 6 or 7 under TSX-plus ?DU-E-/C can only change units 6 or 7 ?DU-E-/P must have a value specified ?DU-E-/U must have a value specified ?DU-E-Only one of any of /C, /P, or /U on any 1 line ?DU-E-/P requires /C to be of any use ?DU-E-/U requires /C to be of any use ?DU-E-/C requires /P &/or /U to effect a change ?DU-E-Non-existent unit/partition specified: unit u, partition p ?DU-E-Cannot read DU status table ?DU-E-Cannot read DU partition table ?DU-E-Cannot save status of input file ?DU-E-Cannot restore status of input file ?DU-E-Cannot Read Status Table ?DU-E-Cannot ascertain status of DU: ?DU-E-Device DU: not available ?DU-E-Cannot save status of DU: ?DU-E-Cannot restore status of DU: ?DU-E-Cannot Read Status Table ?DU-E-Partition table read failed ?DU-E-Failed to write partition table ?DU-E-Cannot determine size of DU CHAPTER 3 WA - a Munging Handler for LARGE Discs This section descibes WA version 2, of 27-Apr-86. The WA handler provides a fairly rigid way of accessing partitions on a DU disc under the TSX-plus operating system. Each copy of the WA handler installed allows access to a further eight partitions. Each of the WA units can be set up (either with SET commands, or by running the handler as a programme) to access any desired unit or partition within the disc. Additionally, it is possible to use WA to access individual disc image files (a la LD). Used sensibly, the WA handler can be a boon to a large disc system. Used without due caution, it suffers from the problem of putting a lot of power into careless hands. WA must be used with the internally-queueing DUCM DU: handler by the same author. Both the DU and the WA handler (and any copies of the WA handler used to access multiples of 8 units) should be mapped handlers under TSX-plus, though V2 of WA operates with unmapped handlers also. Use with the DEC handler will lead to disc errors or system crashes. It can only be used on Q-bus systems, NOT unibus systems. With the handlers mapped, the processor must be capable of executing the MARK instruction. It cannot be used under RT-11. The WA handler is distributed as three handlers: D1.TSX, D2.TSX, and D3.TSX (see the first chapter of this manual). DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 3-2 WA - a Munging Handler for LARGE Discs 3.1 How it works An I/O request passed to the WA handler is modified as appropriate then passed on to the DU handler for actual execution (similar to the LD handler under RT-11). Various details of the I/O request are modified, allowing access to physical units and partitions apart from those accessible by SET commands on the DU handler. [The TSX I/O queue element is longer than the RT-11 equivalent. There is a word in it for the address of a unibus mapping register table, q$umrx. This word is used for passing across the physical unit and partition number, one byte apiece. This limits the unit and partition number to a maximum of 255 (decimal), but with present disc hardware this does not appear to be a severe restriction! This is why this handler cannot be used on a unibus system, because this word is then used for its intended purposes.] Four pieces of information and a flag are stored within the WA handler for each unit. These are: PHYSICAL UNIT NUMBER - the physical disc unit the desired partition is residing upon. This may well be different from the logical DU units (DU0 through DU7), as these may be set to different units and partitions. PARTITION NUMBER - as RT-11/TSX can only access individual device units with a capacity of up to 65535 blocks (one 16-bit word), devices having more than this are broken up into "partitions", each 65535 blocks long. (There is a spare block between partitions, actually making each partition commence on a 16-bit boundary on the disc. This is necessary for the SIZE spfun to operate properly.) The lowest partition on a disc is partition zero, starting at physical block 0. The next partition, partition 1, commences on block 65536, and partition two on block 131072, et cetera. OFFSET - This defines a starting offset within the partition. It is for use with the "pseudo-LD" facility of WA, and will not normally be used by people who are merely using WA to access large discs. It allows a disc-image file to be used as an apparent physical WA unit. For example, suppose you have the file TSX.DSK sitting on your system disc commencing at block 12345. It would be possible to access that file, if the offset within the relevant partition were set to 12345. SIZE - Again, used with the "pseudo-LD" facility. If a file is to be used as an WA unit, its size should be put into this field. WRITE FLAG - Each unit may be set to be READ ONLY if desired. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 3-3 WA - a Munging Handler for LARGE Discs 3.2 SET Commands The SET commands available for WA are: SET WA HELP - types a list of available SET WA commands. SET WA DUVEC=oct - sets the vector assumed for the DU device (default 154) SET WAn UNIT=u - sets the physical unit associated with logical unit WAn to the value u (decimal). SET WAn PART=p - sets the partition associated with logical unit WAn to the value p (decimal). SET WAn OFFSET=o - sets the offset value associated with logical unit WAn to the value o (decimal). SET WAn SIZE=s - sets the size value associated with logical unit WAn to the value s (decimal). If this is not specified, device size spfun requests will be passed across to the DU handler. If size is specified, it will be used directly in response to these requests. SET WA (NO)WRITE - (disallow)/allow writing on this unit. SET WA TSX - allow SET WA commands from TSX-plus, and allow WA to be run as a user programme under TSX-plus. SET WA NO TSX - disallow the use of WA SET commands unless running under RT-11 (ibid for running WA as a user programme). Once this option has been set, it is necessary to return to RT-11 to use SET WA TSX to unset it. It is recommended that all values necessary for WA be set up in an RT-11 command file, with this as the last command. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 3-4 WA - a Munging Handler for LARGE Discs 3.3 Running WA as a Programme Due to two factors: (1) the danger of allowing access to the fields of WA while running TSX, and (2) the inconvenience of having to rename WA.TSX to WA.SYS before being able to perform SETs under RT-11, another means of setting up the WA tables has been provided. .R WA.TSX Run the WA handler as a user programme. It uses normal CSI-style commands, as detailed here: /H Type a help text. /L List the current values in the internal table. In the following switches, "unit" is one of the logical WA units. It must be specified as a single digit (0, 1, ..., 7). unit/U:n. Sets the physical unit value associated with the relevant unit to the value n. It is necessary to append a "." to make the number decimal (octal being assumed otherwise). unit/P:n. Sets the partition value associated with the relevant unit to the value n. (See comment under /U re decimal/octal values.) unit/O:n. Sets the offset value associated with the relevant unit to the value n. unit/S:n. Sets the size value associated with the relevant unit to the value n. unit/F,filename Accesses the "filename" file (the second file in the CSI string), and uses its starting block number as the offset value, and its size as the size value to be associated with the desired unit. It is still necessary to specify relevant physical units and partitions, as otherwise the handler DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 3-5 WA - a Munging Handler for LARGE Discs will assume physical unit zero, partition zero - despite the fact that the filename may be something like "DU2:MONITR.DSK". The default extension is ".DSK". /R If /R is included in any command line, that unit is set READ ONLY. An attempt to write to that unit will return an error. /T, /N /T allows running WA as a programme under TSX-plus. /N disallows it. (Analogous to the SET WA (NO) TSX command.) If a user tries to run WA under TSX after use of the /N switch, it will merely list the contents of its internal tables. A unit specified with no switches merely has its table entries cleared to zero. All the specifications for a particular logical unit should be performed on the one line, as switches unspecified are assumed to have the value zero (/F implies /O & /S). Examples: Associate WA4 with physical unit 3, partition 1: *4/U:3/P:1 Associate WA0 with physical unit zero, partition 2, read only: *0/P:2/R Associate WA7 with SY:TSX.DSK *7/f,sy:tsx.dsk This assumes that SY: is DU:, unit zero, partition zero. If instead DU1, through SET commands, were associated with unit 4, partition 1, and we wished to set WA6 to being UCL.DSK on that particular disc, we would need to enter the command *6/f,du1:ucl/u:4/p:1 At about this stage, you start to see why access to this facility should be restricted to the non-malevolent! DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 3-6 WA - a Munging Handler for LARGE Discs 3.4 Restriction on /U & /P If the unit and partition are both specified to be zero (/U:0/P:0), rather that using unit zero, partition zero, the disc area accessed will be the current unit and partition for DU0:. (This is unlikely to be a problem.) DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 3-7 WA - a Munging Handler for LARGE Discs 3.5 Setting Up (1) Determine the number of WA units required for your system. If you need more than eight, you may need several copies of the WA handler on your system under different names (eg WA, WB, WC, or D0, D1, D2, .... etc). (2) Edit TSGEN.MAC to include whichever WA units you will require. The DEVDEF parameters for each WA device will be DEVDEF ,MAPH,DMA,HANBUF (3) Build your TSX system in the normal way. (4) Hack your TSX.SAV so that the value associated with DU: is 501, not the default 201. [See TSMUNG, in chapter 2.] Note that this is no longer essential with WA V2, but is preferable if you wish to generate a reasonably large TSX system. (5) Build your DU handler: .macro tsxpre+ducm/obj, link/nobit ducm. (6) Build your WA handler: .macro wa, link/nobit wa. (7) Get back to RT-11 (8) Copy ducm.sav to sy:du.tsx (9) Copy wa.sav to sy:wa.tsx, (also sy:wb.tsx et cetera, pro re nata). (10) Set up a command file to run the WA handlers and enter the required values (sample below) (11) Run these command files to set the tables in the handlers. (12) Boot your TSX-plus system. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 3-8 WA - a Munging Handler for LARGE Discs 3.6 Safety Precautions & Recommended Use - Make sure you are running on a Q-bus system. - Make sure you are NOT trying to use the DEC or S & H DU handler for your TSX DU.TSX. - Make sure that unless you have some major reason for allowing it, access to the WA handlers is prohibited through the SET WA NO TSX command. - Set up your system so that if you are using pseudo-LD access, either there are no LD units mounted using the same files, or that there can be no cache controversy (eg make that WA handler NOMOUNT in TSGEN, or run with cache=0, or be bloody careful!). - If you alter WA, by running it as a programme under TSX, it is necessary then to type SET WA HELP to tell the operating system that modifications have been made so that it can re-load the handler with the new information. - To run WA as a programme under TSX you need to have privileges to write to .TSX files on the system disc. DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 3-9 WA - a Munging Handler for LARGE Discs 3.7 Example of Command File The SET Wx HELP commands are only necessary if these command files are to be fun under TSX-plus rather than RT-11. Set up WA to access the second group of eight partitions on the disc, with the last of these write protected: ------------------------------ r wa.tsx 0/p:8. 1/p:9. 2/p:10. 3/p:11. 4/p:12. 5/p:13. 6/p:14. 7/p:15./r /n ^C set wa help ------------------------------ Set up both an WA and WB (a copy of WA) to cover a few things: ------------------------------ r wa.tsx 0/p:8. 1/p:9. 2/p:10. 3/p:11. 4/p:12. 5/p:13. 6/p:14. 7/p:15. /n ^C set wa help r wb.tsx 0/p:16. 1/f,sy:tsx 2/f,sy:ucl 3/f,sy:monitr/r 4/f,sy:work1 5/f,du1:mordat/p:1/r 6/f,du5:again/u:1/p:2 7/p:23. ^C set wb help ------------------------------ DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 3-10 WA - a Munging Handler for LARGE Discs Index Absolute I/O SPFUN . . . . . . . . . . . . . . . . . . . . . 2-6 Bad Block Replacement Error . . . . . . . . . . . . . . . . 2-4 Bypass SPFUN . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Changing Partitions & Units . . . . . . . . . . . . . . . . 2-11 Current DU Partition Listing . . . . . . . . . . . . . . . . 2-11 Disc Usage . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 DUCM Error Messages . . . . . . . . . . . . . . . . . . . . 2-13 DUCM Help Text . . . . . . . . . . . . . . . . . . . . . . . 2-12 DUCM Manual . . . . . . . . . . . . . . . . . . . . . . . . 2-1 DUCM SET Commands . . . . . . . . . . . . . . . . . . . . . 2-3 DUCM Update History . . . . . . . . . . . . . . . . . . . . 2-2 Error Code SPFUNs . . . . . . . . . . . . . . . . . . . . . 2-4 Error Messages - DUCM . . . . . . . . . . . . . . . . . . . 2-13 Error Table - Examining . . . . . . . . . . . . . . . . . . 2-12 Examining Error Table . . . . . . . . . . . . . . . . . . . 2-12 Getting Size of DU Unit . . . . . . . . . . . . . . . . . . 2-11 Handler for LARGE Discs - WA . . . . . . . . . . . . . . . . 3-1 Help Text (DUCM) . . . . . . . . . . . . . . . . . . . . . . 2-12 Jobs under TSX . . . . . . . . . . . . . . . . . . . . . . . 2-10 Large Discs - WA Handler . . . . . . . . . . . . . . . . . . 3-1 Limitation on RT disc storage . . . . . . . . . . . . . . . 1-2 List Current DU Partitions . . . . . . . . . . . . . . . . . 2-11 Mapping DU Handler . . . . . . . . . . . . . . . . . . . . . 2-9 Mapping DY Handler . . . . . . . . . . . . . . . . . . . . . 2-9 Modifying TSX . . . . . . . . . . . . . . . . . . . . . . . 1-6, 2-9 Number of Jobs . . . . . . . . . . . . . . . . . . . . . . . 2-10 Partition Size SPFUN . . . . . . . . . . . . . . . . . . . . 2-5 Partition Table SPFUN . . . . . . . . . . . . . . . . . . . 2-4 Physical I/O SPFUN . . . . . . . . . . . . . . . . . . . . . 2-6 Precautions for WA . . . . . . . . . . . . . . . . . . . . . 3-8 Programme use of DUCM . . . . . . . . . . . . . . . . . . . 2-11 Programme use of WA . . . . . . . . . . . . . . . . . . . . 3-4 Q$UMRX Offset . . . . . . . . . . . . . . . . . . . . . . . 3-2 Queue Elements . . . . . . . . . . . . . . . . . . . . . . . 3-2 RT Partition Table . . . . . . . . . . . . . . . . . . . . . 2-5 Running DUCM as Programme . . . . . . . . . . . . . . . . . 2-11 SET Commands - DUCM . . . . . . . . . . . . . . . . . . . . 2-3 SET Commands - WA . . . . . . . . . . . . . . . . . . . . . 3-3 SETs for DUCM (under RT-11 only) . . . . . . . . . . . . . . 2-3 Setting up Handlers . . . . . . . . . . . . . . . . . . . . 1-3 DUCM - DU Multi-Unit Internally-Queueing Handler et alii Page 3-11 WA - a Munging Handler for LARGE Discs Setting up WA . . . . . . . . . . . . . . . . . . . . . . . 3-7 Size of DU Unit . . . . . . . . . . . . . . . . . . . . . . 2-11 Size of Partition SPFUN . . . . . . . . . . . . . . . . . . 2-5 Size of Unit SPFUN . . . . . . . . . . . . . . . . . . . . . 2-5 SP.BYP SPFUN . . . . . . . . . . . . . . . . . . . . . . . . 2-4 SP.DAT SPFUN . . . . . . . . . . . . . . . . . . . . . . . . 2-4 SP.PIO SPFUN . . . . . . . . . . . . . . . . . . . . . . . . 2-6 SP.PSZ SPFUN . . . . . . . . . . . . . . . . . . . . . . . . 2-5 SP.RIO SPFUN . . . . . . . . . . . . . . . . . . . . . . . . 2-4 SP.STS SPFUN . . . . . . . . . . . . . . . . . . . . . . . . 2-5 SP.USZ SPFUN . . . . . . . . . . . . . . . . . . . . . . . . 2-5 SP.WIO SPFUN . . . . . . . . . . . . . . . . . . . . . . . . 2-4 SPFUNs . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Status Table SPFUN . . . . . . . . . . . . . . . . . . . . . 2-5 TS$JOB . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 TSMUNG - For Modifying TSX . . . . . . . . . . . . . . . . . 2-9 TSX Modification . . . . . . . . . . . . . . . . . . . . . . 1-6 TSX Modifying . . . . . . . . . . . . . . . . . . . . . . . 2-9 TSX System Generation . . . . . . . . . . . . . . . . . . . 1-5 TSX TSGEN for WA . . . . . . . . . . . . . . . . . . . . . . 3-7 Unibus Mapping Register Pointer . . . . . . . . . . . . . . 3-2 Unibus System Restriction . . . . . . . . . . . . . . . . . 2-10 Unit Size SPFUN . . . . . . . . . . . . . . . . . . . . . . 2-5 User's Guide . . . . . . . . . . . . . . . . . . . . . . . . 1-1 V5.4 Partition Table . . . . . . . . . . . . . . . . . . . . 2-5 Version Number . . . . . . . . . . . . . . . . . . . . . . . 2-5, 2-12 WA - Munging Handler for LARGE Discs . . . . . . . . . . . . 3-1 WA - Precautions . . . . . . . . . . . . . . . . . . . . . . 3-8 WA - Programme Use . . . . . . . . . . . . . . . . . . . . . 3-4 WA - Setting up . . . . . . . . . . . . . . . . . . . . . . 3-7 WA Handler - Unibus Restriction . . . . . . . . . . . . . . 3-1 WA SET Commands . . . . . . . . . . . . . . . . . . . . . . 3-3