Subject: Part 4 of 22 /boot,/mdec,[T]MSCP updates Index: /sys/, /usr/src/etc/ 2.11BSD Description: Repeat-By: Fix: See part 0 (the README) for the Description, the Reason and the instructions on how update your system. This is part 4 of 22 ALL of the bootblocks in /sys/mdec were modified to use the unit and controller CSR passed in R0 and R1 by the boot roms. Also, all of the bootblocks had the "nop; br ." sequence added at the beginning, this is required by some of the DEC boot roms. The bootstraps also incorporate the major device number in them now and pass this information thru to 'boot' and the other standalone utilities. *** /usr/src/sys/mdec.old/bruboot.s Tue Jun 5 10:21:38 1990 --- /usr/src/sys/mdec/bruboot.s Wed Apr 24 10:08:03 1991 *************** *** 1,9 **** / BR bootstrap. supports the 32 sec/trk, 19 trk/cyl EATON 1537/1711 ! / Controller and 1538D drive. ! / NOTE: there isn't enough room at present to autoadapt ! / to the 22 sectored & 5 cylinder 1538A,B,C drive types. The ! / appropriate "div" instructions have to be modified to support ! / these drive types. / / disk boot program to load and transfer / to a unix entry. --- 1,7 ---- + MAJOR = 11. / major # from bdevsw[] + / BR bootstrap. supports the 32 sec/trk, 19 trk/cyl EATON 1537/1711 ! / Controller and 1538A/B/C/D drive. / / disk boot program to load and transfer / to a unix entry. *************** *** 12,19 **** / assembled size must be <= 512; if > 494, the 16-byte a.out header / must be removed - cyl = 0. / cylinder offset of filesys to read from - / options: none. all options of reading an alternate name or echoing to / the keyboard had to be removed to make room for the / code which understands the new directory structure on disc --- 10,15 ---- *************** *** 45,51 **** --- 41,52 ---- / establish sp, copy / program up to end of core. + + nop / These two lines must be present or DEC + br start / boot ROMs will refuse to run boot block! start: + movb r0,unit+1 / save the unit in high byte (for brcs) + mov r1,csr / and csr from the ROMs (not base addr!) mov $..,sp mov sp,r1 clr r0 *************** *** 57,65 **** / On error, restart from here. restart: - - / clear core to make things clean clr r0 2: clr (r0)+ cmp r0,sp --- 58,65 ---- / On error, restart from here. restart: clr r0 + / clear core to make things clean 2: clr (r0)+ cmp r0,sp *************** *** 66,72 **** blo 2b / initialize controller ! clr *$brcs / clr addr extension bits, sel drive 0 mov $bootnm, r1 mov $2,r0 / ROOTINO --- 66,86 ---- blo 2b / initialize controller ! mov csr,r1 ! mov unit,brcs(r1) / clr addr extension bits, select unit ! mov $32.,r0 / default # of sec/track ! bit $2400,brae(r1) / is this a 22 sec/track drive ! beq 9f ! mov $22.,r0 ! 9: ! mov $19.,r5 / default # of tracks/cyl ! bit $1400,brae(r1) / is this a 5 tr/cy drive? ! beq 9f / no - br ! mov $5,r5 ! 9: ! mov r0,sectors ! mul r0,r5 / sectors/cyl ! mov r5,seccyl mov $bootnm, r1 mov $2,r0 / ROOTINO *************** *** 154,163 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 ! br restart / read a mapped block / offset in file is in bno. --- 168,179 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! movb unit+1,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 ! jmp restart / read a mapped block / offset in file is in bno. *************** *** 199,208 **** read = 4 go = 1 ! brcs = 176714 ! brda = 176724 ! brca = 176722 ! brba = 176720 / br disk driver. / low order address in dno, / high order in r0. --- 215,228 ---- read = 4 go = 1 ! brds = -4 ! brer = -2 ! brcs = 0 / offset from base csr passed by ROMs ! brwc = 2 ! brba = 4 ! brca = 6 ! brda = 10 ! brae = 12 / br disk driver. / low order address in dno, / high order in r0. *************** *** 212,233 **** .if CLSIZE-1 ashc $CLSHFT,r0 / multiply by CLSIZE .endif ! div $32.*19.,r0 / was 20.*10. ! .if cyl ! add $cyl,r0 ! .endif ! mov r0,*$brca clr r0 ! div $32.,r0 / was 10. swab r0 bis r1,r0 ! mov r0,*$brda ! mov $brba,r1 ! mov $buf,(r1) ! mov $WC,-(r1) ! mov $read+go,-(r1) 1: ! tstb (r1) bge 1b mov (sp)+,r1 rts pc --- 232,252 ---- .if CLSIZE-1 ashc $CLSHFT,r0 / multiply by CLSIZE .endif ! div seccyl,r0 ! mov csr,r3 ! mov r0,brca(r3) clr r0 ! div sectors,r0 swab r0 bis r1,r0 ! mov r0,brda(r3) ! mov $buf,brba(r3) ! mov $WC,brwc(r3) ! mov unit,r0 ! bis $read+go,r0 ! mov r0,(r3) / brcs 1: ! tstb (r3) / brcs bge 1b mov (sp)+,r1 rts pc *************** *** 234,239 **** --- 253,262 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 + seccyl: 0 + sectors: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack *** /usr/src/sys/mdec.old/dvhpuboot.s Wed May 23 13:00:05 1990 --- /usr/src/sys/mdec/dvhpuboot.s Wed Apr 24 10:08:07 1991 *************** *** 1,3 **** --- 1,5 ---- + MAJOR = 10. / major # from bdevsw[] + / Bootstrap for Diva Comp. IV controller (33 sectors) / / disk boot program to load and transfer *************** *** 7,15 **** / assembled size must be <= 512; if > 494, the 16-byte a.out header / must be removed - drive = 0 / unit to boot from - cyl = 0. / cylinder offset of filesys to read from - / options: none. all options of reading an alternate name or echoing to / the keyboard had to be removed to make room for the / code which understands the new directory structure on disc --- 9,14 ---- *************** *** 41,47 **** --- 40,51 ---- / establish sp, copy / program up to end of core. + + nop / These two lines must be present or DEC + br start / boot ROMs will refuse to run boot block! start: + mov r0,unit + mov r1,csr mov $..,sp mov sp,r1 clr r0 *************** *** 62,70 **** blo 2b / initialize disk ! mov $drive,*$hpcs2 ! mov $preset+go,*$hpcs1 ! mov $fmt22,*$hpof mov $bootnm, r1 mov $2,r0 / ROOTINO --- 66,75 ---- blo 2b / initialize disk ! mov csr,r1 ! mov unit,hpcs2(r1) ! mov $preset+go,hpcs1(r1) ! mov $fmt22,hpof(r1) mov $bootnm, r1 mov $2,r0 / ROOTINO *************** *** 152,159 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 br restart --- 157,166 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov unit,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 br restart *************** *** 199,205 **** go = 1 fmt22 = 10000 ! hpcs1 = 176700 hpda = hpcs1+6 hpcs2 = hpcs1+10 hpds = hpcs1+12 --- 206,212 ---- go = 1 fmt22 = 10000 ! hpcs1 = 0 / offset from base csr hpda = hpcs1+6 hpcs2 = hpcs1+10 hpds = hpcs1+12 *************** *** 216,236 **** ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $33.*19.,r0 ! .if cyl ! add $cyl,r0 ! .endif ! mov r0,*$hpca clr r0 div $33.,r0 swab r0 bis r1,r0 ! mov $hpda,r1 ! mov r0,(r1) ! mov $buf,-(r1) ! mov $WC,-(r1) ! mov $read+go,-(r1) 1: ! tstb (r1) bge 1b mov (sp)+,r1 rts pc --- 223,242 ---- ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $33.*19.,r0 ! mov csr,r3 ! mov r0,hpca(r3) clr r0 div $33.,r0 swab r0 bis r1,r0 ! add $hpcs2,r3 ! mov unit,(r3) ! mov r0,-(r3) ! mov $buf,-(r3) ! mov $WC,-(r3) ! mov $read+go,-(r3) 1: ! tstb (r3) bge 1b mov (sp)+,r1 rts pc *************** *** 237,242 **** --- 243,250 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack *** /usr/src/sys/mdec.old/hkuboot.s Wed May 23 13:00:13 1990 --- /usr/src/sys/mdec/hkuboot.s Wed Apr 24 10:08:11 1991 *************** *** 1,3 **** --- 1,5 ---- + MAJOR = 4 / major # from bdevsw[] + / RK06/RK07 bootstrap / / disk boot program to load and transfer *************** *** 40,46 **** --- 42,53 ---- / establish sp, copy / program up to end of core. + + nop / These two lines must be present or DEC + br start / boot ROMs will refuse to run boot block! start: + mov r0,unit + mov r1,csr mov $..,sp mov sp,r1 clr r0 *************** *** 52,60 **** / On error, restart from here. restart: - - / clear core to make things clean clr r0 2: clr (r0)+ cmp r0,sp --- 59,66 ---- / On error, restart from here. restart: clr r0 + / clear core to make things clean 2: clr (r0)+ cmp r0,sp *************** *** 61,70 **** blo 2b / initialize hk ! mov $clear,*$hkcs2 ! mov $ack,*$hkcs1 0: ! tstb *$hkcs1 bpl 0b / wait for acknowledge to complete mov $bootnm, r1 --- 67,79 ---- blo 2b / initialize hk ! mov csr,r1 ! mov unit,r0 ! bis $clear,r0 ! mov r0,hkcs2(r1) ! mov $ack,hkcs1(r1) 0: ! tstb hkcs1(r1) bpl 0b / wait for acknowledge to complete mov $bootnm, r1 *************** *** 153,160 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 br restart --- 162,171 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov unit,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 br restart *************** *** 195,204 **** 1: rts pc ! hkcs1 = 177440 / control & status 1 ! hkda = 177446 / desired track/sector address ! hkcs2 = 177450 / control & status 2 ! hkca = 177460 / desired cylinder .if RK07 / RK07 constants --- 206,215 ---- 1: rts pc ! hkcs1 = 0 / control & status 1 ! hkda = 6 / desired track/sector address ! hkcs2 = 10 / control & status 2 ! hkca = 20 / desired cylinder .if RK07 / RK07 constants *************** *** 229,240 **** clr r0 div $3.,r0 / r0 = cylinder r1 = track bisb r1,1(sp) ! mov r0,*$hkca / cylinder wanted ! mov $hkda,r1 ! mov (sp)+,(r1) / track & sector wanted ! mov $buf,-(r1) / bus address ! mov $WC,-(r1) / word count ! mov $iocom,-(r1) 1: tstb (r1) bge 1b / wait for iocom to complete --- 240,253 ---- clr r0 div $3.,r0 / r0 = cylinder r1 = track bisb r1,1(sp) ! mov csr,r3 ! mov r0,hkca(r3) / cylinder wanted ! mov unit,hkcs2(r3) ! add $hkda,r3 ! mov (sp)+,(r3) / track & sector wanted ! mov $buf,-(r3) / bus address ! mov $WC,-(r3) / word count ! mov $iocom,-(r3) 1: tstb (r1) bge 1b / wait for iocom to complete *************** *** 243,248 **** --- 256,263 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack *** /usr/src/sys/mdec.old/hpuboot.s Wed May 23 13:00:20 1990 --- /usr/src/sys/mdec/hpuboot.s Wed Apr 24 10:08:15 1991 *************** *** 1,3 **** --- 1,5 ---- + MAJOR = 10. / major # from bdevsw[] + / RP04/05/06 bootstrap. / / disk boot program to load and transfer *************** *** 7,15 **** / assembled size must be <= 512; if > 494, the 16-byte a.out header / must be removed - drive = 0 / unit to boot from - cyl = 0. / cylinder offset of filesys to read from - / options: none. all options of reading an alternate name or echoing to / the keyboard had to be removed to make room for the / code which understands the new directory structure on disc --- 9,14 ---- *************** *** 41,47 **** --- 40,51 ---- / establish sp, copy / program up to end of core. + + nop / These two lines must be present or DEC + br start / boot ROMs will refuse to run boot block! start: + mov r0,unit + mov r1,csr mov $..,sp mov sp,r1 clr r0 *************** *** 53,61 **** / On error, restart from here. restart: - - / clear core to make things clean clr r0 2: clr (r0)+ cmp r0,sp --- 57,64 ---- / On error, restart from here. restart: clr r0 + / clear core to make things clean 2: clr (r0)+ cmp r0,sp *************** *** 62,70 **** blo 2b / initialize hp ! mov $drive,*$hpcs2 ! mov $preset+go,*$hpcs1 ! mov $fmt22,*$hpof mov $bootnm, r1 mov $2,r0 / ROOTINO --- 65,74 ---- blo 2b / initialize hp ! mov csr,r1 ! mov unit,hpcs2(r1) ! mov $preset+go,hpcs1(r1) ! mov $fmt22,hpof(r1) mov $bootnm, r1 mov $2,r0 / ROOTINO *************** *** 152,159 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 br restart --- 156,165 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov unit,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 br restart *************** *** 199,205 **** go = 1 fmt22 = 10000 ! hpcs1 = 176700 hpda = hpcs1+6 hpcs2 = hpcs1+10 hpds = hpcs1+12 --- 205,211 ---- go = 1 fmt22 = 10000 ! hpcs1 = 0 hpda = hpcs1+6 hpcs2 = hpcs1+10 hpds = hpcs1+12 *************** *** 216,236 **** ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $22.*19.,r0 ! .if cyl ! add $cyl,r0 ! .endif ! mov r0,*$hpca clr r0 div $22.,r0 swab r0 bis r1,r0 ! mov $hpda,r1 ! mov r0,(r1) ! mov $buf,-(r1) ! mov $WC,-(r1) ! mov $read+go,-(r1) 1: ! tstb (r1) bge 1b mov (sp)+,r1 rts pc --- 222,241 ---- ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $22.*19.,r0 ! mov csr,r3 ! mov r0,hpca(r3) clr r0 div $22.,r0 swab r0 bis r1,r0 ! mov $hpcs2,r3 ! mov unit,(r3) ! mov r0,-(r3) ! mov $buf,-(r3) ! mov $WC,-(r3) ! mov $read+go,-(r3) 1: ! tstb (r3) bge 1b mov (sp)+,r1 rts pc *************** *** 237,242 **** --- 242,249 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack *** /usr/src/sys/mdec.old/rauboot.s Wed May 23 13:00:28 1990 --- /usr/src/sys/mdec/rauboot.s Wed Apr 24 10:08:18 1991 *************** *** 1,15 **** / RA bootstrap. / / disk boot program to load and transfer to a unix entry. / for use with 1 KB byte blocks, CLSIZE is 2. / NDIRIN is the number of direct inode addresses (currently 4) - / assembled size must be <= 512; if > 494, the 16-byte a.out header - / must be removed / / Note: this is a complex boot, but then MSCP is complex!!!! / / a.out header must be removed from boot block! - / MSCPSIZE = 64. / One MSCP command packet is 64bytes long (need 2) --- 1,15 ---- + MAJOR = 5 / major # from bdevsw[] + / RA bootstrap. / / disk boot program to load and transfer to a unix entry. / for use with 1 KB byte blocks, CLSIZE is 2. / NDIRIN is the number of direct inode addresses (currently 4) / / Note: this is a complex boot, but then MSCP is complex!!!! / + / assembled size must be <= 512 / a.out header must be removed from boot block! MSCPSIZE = 64. / One MSCP command packet is 64bytes long (need 2) *************** *** 43,62 **** RALBNL = 112. / Logical block number low RALBNH = 114. / Logical block number high - raip = 172150 / initialization and polling register - rasa = 172152 / address and status register - - cyl = 0. / cylinder offset of filesys to read from - / options: none. all options of reading an alternate name or echoing to / the keyboard had to be removed to make room for the / code which understands the new directory structure on disc / also, this is the single largest boot around to begin with. - mxvboot = 1 / 0->normal, 1->adds check done by MXV11 boot ROMS - - unit = 0 / # of unit to load boot from - / / constants: / CLSIZE = 2. / physical disk blocks per logical block --- 43,53 ---- *************** *** 85,95 **** / establish sp, copy / program up to end of core. ! .if mxvboot ! 0240 / These two lines must be present or DEC br start / boot ROMs will refuse to run boot block! - .endif start: mov $..,sp mov sp,r1 clr r0 --- 76,87 ---- / establish sp, copy / program up to end of core. ! ! nop / These two lines must be present or DEC br start / boot ROMs will refuse to run boot block! start: + mov r0,unit / Save unit number passed by ROMs(and kernel) + mov r1,raip / save csr passed by ROMs (and kernel) mov $..,sp mov sp,r1 clr r0 *************** *** 101,107 **** / On error, restart from here. restart: ! / clear core to make things clean 2: clr (r0)+ --- 93,99 ---- / On error, restart from here. restart: ! clr r0 / clear core to make things clean 2: clr (r0)+ *************** *** 111,117 **** / RA initialize controller / mov $RASTEP1,r0 ! mov $raip,r1 clr (r1)+ / go through controller init seq. mov $icons,r2 1: --- 103,109 ---- / RA initialize controller / mov $RASTEP1,r0 ! mov raip,r1 clr (r1)+ / go through controller init seq. mov $icons,r2 1: *************** *** 124,130 **** mov $ra+RACMDREF,*$ra+RACMDL mov $RASTCON,r0 jsr pc,racmd ! mov $unit,*$ra+RAUNIT / bring boot unit online mov $RAONLIN,r0 jsr pc,racmd --- 116,122 ---- mov $ra+RACMDREF,*$ra+RACMDL mov $RASTCON,r0 jsr pc,racmd ! mov unit,*$ra+RAUNIT / bring boot unit online mov $RAONLIN,r0 jsr pc,racmd *************** *** 214,221 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 jmp restart --- 206,215 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov unit, r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov raip,r1 jsr pc,*$0 jmp restart *************** *** 285,297 **** / racmd: movb r0,*$ra+RAOPCODE / fill in command type ! mov $MSCPSIZE,r0 ! mov r0,*$ra+RARSPS / give controller struct sizes ! mov r0,*$ra+RACMDS ! mov $RASEMAP,r0 ! mov r0,*$ra+RARSPH / set mscp semaphores ! mov r0,*$ra+RACMDH ! mov raip,r0 / tap controllers shoulder mov $ra+RACMDI,r0 1: tst (r0) --- 279,289 ---- / racmd: movb r0,*$ra+RAOPCODE / fill in command type ! mov $MSCPSIZE,*$ra+RARSPS / give controller struct sizes ! mov $MSCPSIZE,*$ra+RACMDS ! mov $RASEMAP,*$ra+RARSPH / set mscp semaphores ! mov $RASEMAP,*$ra+RACMDH ! mov *raip,r0 / tap controllers shoulder mov $ra+RACMDI,r0 1: tst (r0) *************** *** 310,315 **** --- 302,309 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 / unit number from ROMs + raip: 0 / csr address from ROMs end: inod = ..-512.-BSIZE / room for inod, buf, stack *************** *** 317,320 **** buf = inod+INOSIZ bno = buf+BSIZE dno = bno+2 ! ra = dno+2 / ra mscp communications area (BIG!) --- 311,314 ---- buf = inod+INOSIZ bno = buf+BSIZE dno = bno+2 ! ra = dno + 2 / ra mscp communications area (BIG!) *** /usr/src/sys/mdec.old/rkuboot.s Wed May 23 13:00:47 1990 --- /usr/src/sys/mdec/rkuboot.s Wed Apr 24 10:08:22 1991 *************** *** 1,3 **** --- 1,5 ---- + MAJOR = 6 / major # from bdevsw[] + / RK05 bootstrap. / / disk boot program to load and transfer *************** *** 38,44 **** --- 40,51 ---- / establish sp, copy / program up to end of core. + + nop / These two lines must be present or DEC + br start / boot ROMs will refuse to run boot block! start: + mov r0,unit + mov r1,csr mov $..,sp mov sp,r1 clr r0 *************** *** 50,58 **** / On error, restart from here. restart: - - / clear core to make things clean clr r0 2: clr (r0)+ cmp r0,sp --- 57,64 ---- / On error, restart from here. restart: clr r0 + / clear core to make things clean 2: clr (r0)+ cmp r0,sp *************** *** 59,65 **** blo 2b / initialize rk ! mov $reset+go,*$rkcs / reset controller mov $bootnm, r1 mov $2,r0 / ROOTINO --- 65,72 ---- blo 2b / initialize rk ! mov csr,r1 ! mov $reset+go,rkcs(r1) / reset controller mov $bootnm, r1 mov $2,r0 / ROOTINO *************** *** 147,154 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 br restart --- 154,163 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov unit,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 br restart *************** *** 193,202 **** reset = 0 go = 1 ! rkcs = 177404 ! rkda = 177412 ! rkwc = 177406 ! rkba = 177410 / rk05 disk driver. / low order address in dno, / high order in r0. --- 202,211 ---- reset = 0 go = 1 ! rkcs = 0 / offset from base csr ! rkwc = 2 ! rkba = 4 ! rkda = 6 / rk05 disk driver. / low order address in dno, / high order in r0. *************** *** 209,220 **** div $12.,r0 ash $4,r0 bis r1,r0 ! mov r0,*$rkda / stuff disc address ! mov $buf,*$rkba / where to put it. ! mov $WC,*$rkwc / yes sir, yes sir, three bags full ! mov $read+go,*$rkcs / press the button 1: ! tstb *$rkcs bge 1b mov (sp)+,r1 rts pc --- 218,233 ---- div $12.,r0 ash $4,r0 bis r1,r0 ! mov unit,r3 ! ash $13.,r3 ! bis r3,r0 ! mov csr,r3 ! mov r0,rkda(r3) / stuff disc address ! mov $buf,rkba(r3) / where to put it. ! mov $WC,rkwc(r3) / yes sir, yes sir, three bags full ! mov $read+go,(r3) / rkcs - press the button 1: ! tstb (r3) / rkcs bge 1b mov (sp)+,r1 rts pc *************** *** 221,226 **** --- 234,241 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack *** /usr/src/sys/mdec.old/rluboot.s Wed May 23 13:00:55 1990 --- /usr/src/sys/mdec/rluboot.s Wed Apr 24 10:08:33 1991 *************** *** 1,3 **** --- 1,5 ---- + MAJOR = 7 / major # from bdevsw[] + / RL01/02 bootstrap. / / disk boot program to load and transfer *************** *** 11,18 **** / the keyboard had to be removed to make room for the / code which understands the new directory structure on disc - mxvboot= 1 / 0->normal, 1->adds check done by MXV11 boot ROMS - / constants: CLSIZE = 2. / physical disk blocks per logical block CLSHFT = 1. / shift to multiply by CLSIZE --- 13,18 ---- *************** *** 38,51 **** / entry is made by jsr pc,*$0 / so return can be rts pc ! .if mxvboot ! 0240 / These two lines must be present or DEC MXV-11 br start / boot ROMs will refuse to run boot block! - .endif / establish sp, copy / program up to end of core. start: mov $..,sp mov sp,r1 clr r0 --- 38,51 ---- / entry is made by jsr pc,*$0 / so return can be rts pc ! nop / These two lines must be present or DEC MXV-11 br start / boot ROMs will refuse to run boot block! / establish sp, copy / program up to end of core. start: + movb r0,unit+1 / unit # in high byte + mov r1,csr mov $..,sp mov sp,r1 clr r0 *************** *** 57,65 **** / On error, restart from here. restart: - - / clear core to make things clean clr r0 2: clr (r0)+ cmp r0,sp --- 57,64 ---- / On error, restart from here. restart: clr r0 + / clear core to make things clean 2: clr (r0)+ cmp r0,sp *************** *** 160,167 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 br restart --- 159,168 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! movb unit+1,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 br restart *************** *** 218,229 **** / buf: buffer to read data into / / Register usage: ! / r1,r2,r3: used, but saved ! / r0,r4 used and clobbered ! rlcs = 174400 ! rlba = 174402 ! rlda = 174404 ! rlmp = 174406 READ = 14 SEEK = 6 --- 219,230 ---- / buf: buffer to read data into / / Register usage: ! / r1,r2: used, but saved ! / r0,r3,r4 used and clobbered ! rlcs = 0 / offset from base csr ! rlba = 2 ! rlda = 4 ! rlmp = 6 READ = 14 SEEK = 6 *************** *** 236,243 **** rblk: mov r1,-(sp) mov r2,-(sp) ! mov r3,-(sp) ! mov $rlcs,r4 / point to controller mov dno,r1 .if CLSIZE-1 ashc $CLSHFT,r0 / multiply by CLSIZE --- 237,243 ---- rblk: mov r1,-(sp) mov r2,-(sp) ! mov csr,r4 mov dno,r1 .if CLSIZE-1 ashc $CLSHFT,r0 / multiply by CLSIZE *************** *** 244,253 **** .endif div $RLSECT,r0 / cylinder number - surface asl r1 / sector number ! mov $RDHDR,(r4) / find where the heads are now ! 7: bit $CRDY,(r4) / wait for the STUPID!!! controller ! beq 7b ! mov *$rlmp,r2 ash $-7,r2 bic $!777,r2 / we are at this cylinder now mov r0,r3 --- 244,255 ---- .endif div $RLSECT,r0 / cylinder number - surface asl r1 / sector number ! mov unit,-(sp) ! bis $RDHDR,(sp) ! mov (sp)+,(r4) / find where the heads are now ! 7: tstb (r4) / wait for the STUPID!!! controller (CRDY=200) ! bpl 7b ! mov rlmp(r4),r2 ash $-7,r2 bic $!777,r2 / we are at this cylinder now mov r0,r3 *************** *** 259,290 **** bis $SEEKHI,r2 / up br 2f 1: ash $7,r2 ! bis $SEEKLO,r2 / down 2: mov r0,r3 / compute desired disk surface bic $!1,r3 ash $4,r3 bis r3,r2 ! mov r2,*$rlda / disk address for seek ! mov $SEEK,(r4) / do the seek ! 7: bit $CRDY,(r4) / wait for the STUPID!!! controller ! beq 7b ash $6,r0 / compute disk address for read bis r1,r0 ! add $6,r4 / point to rlmp mov $WC,(r4) / word count for read mov r0,-(r4) / disk address for read mov $buf,-(r4) / buffer address for read ! mov $READ,-(r4) / do the read ! 7: bit $CRDY,(r4) / wait for the STUPID!!! controller ! beq 7b ! mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 - 9: rts pc bootnm: bootlen = 4 / strlen(bootnm) end: inod = ..-512.-BSIZE / room for inod, buf, stack --- 261,296 ---- bis $SEEKHI,r2 / up br 2f 1: ash $7,r2 ! inc r2 / down (SEEKLO = 1, so just do 'inc') 2: mov r0,r3 / compute desired disk surface bic $!1,r3 ash $4,r3 bis r3,r2 ! mov r2,rlda(r4) / disk address for seek ! mov unit,-(sp) ! bis $SEEK,(sp) ! mov (sp)+,(r4) / do the seek ! 7: tstb (r4) / wait for the STUPID!!! controller ! bpl 7b ash $6,r0 / compute disk address for read bis r1,r0 ! add $rlmp,r4 / point to rlmp mov $WC,(r4) / word count for read mov r0,-(r4) / disk address for read mov $buf,-(r4) / buffer address for read ! mov unit,-(sp) ! bis $READ,(sp) ! mov (sp)+,-(r4) / do the read ! 7: tstb (r4) / wait for the STUPID!!! controller ! bpl 7b mov (sp)+,r2 mov (sp)+,r1 rts pc bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack *** /usr/src/sys/mdec.old/rm03uboot.s Wed May 23 13:01:02 1990 --- /usr/src/sys/mdec/rm03uboot.s Wed Apr 24 10:08:36 1991 *************** *** 1,3 **** --- 1,5 ---- + MAJOR = 10. / major # from bdevsw[] + / RM02/03/05 bootstrap / / disk boot program to load and transfer *************** *** 8,15 **** / must be removed RM05 = 0 / 0-> RM02/03, 1-> RM05 - drive = 0 / unit to boot from - cyl = 0. / cylinder offset of filesys to read from / options: none. all options of reading an alternate name or echoing to / the keyboard had to be removed to make room for the --- 10,15 ---- *************** *** 42,48 **** --- 42,53 ---- / establish sp, copy / program up to end of core. + + nop / These two lines must be present or DEC + br start / boot ROMs will refuse to run boot block! start: + mov r0,unit + mov r1,csr mov $..,sp mov sp,r1 clr r0 *************** *** 54,62 **** / On error, restart from here. restart: - - / clear core to make things clean clr r0 2: clr (r0)+ cmp r0,sp --- 59,66 ---- / On error, restart from here. restart: clr r0 + / clear core to make things clean 2: clr (r0)+ cmp r0,sp *************** *** 63,71 **** blo 2b / initialize disk ! mov $drive,*$rmcs2 ! mov $preset+go,*$rmcs1 ! mov $fmt22,*$rmof mov $bootnm, r1 mov $2,r0 / ROOTINO --- 67,76 ---- blo 2b / initialize disk ! mov csr,r1 ! mov unit,rmcs2(r1) ! mov $preset+go,rmcs1(r1) ! mov $fmt22,rmof(r1) mov $bootnm, r1 mov $2,r0 / ROOTINO *************** *** 153,160 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 br restart --- 158,167 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov unit,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 br restart *************** *** 207,213 **** NTRAK = 5. / RM02/03 .endif ! rmcs1 = 176700 rmda = rmcs1+6 rmcs2 = rmcs1+10 rmds = rmcs1+12 --- 214,220 ---- NTRAK = 5. / RM02/03 .endif ! rmcs1 = 0 rmda = rmcs1+6 rmcs2 = rmcs1+10 rmds = rmcs1+12 *************** *** 224,244 **** ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $NSECT*NTRAK,r0 ! .if cyl ! add $cyl,r0 ! .endif ! mov r0,*$rmca clr r0 div $NSECT,r0 swab r0 bis r1,r0 ! mov $rmda,r1 ! mov r0,(r1) ! mov $buf,-(r1) ! mov $WC,-(r1) ! mov $read+go,-(r1) 1: ! tstb (r1) bge 1b mov (sp)+,r1 rts pc --- 231,250 ---- ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $NSECT*NTRAK,r0 ! mov csr,r3 ! mov r0,rmca(r3) clr r0 div $NSECT,r0 swab r0 bis r1,r0 ! add $rmcs2,r3 ! mov unit,(r3) ! mov r0,-(r3) ! mov $buf,-(r3) ! mov $WC,-(r3) ! mov $read+go,-(r3) 1: ! tstb (r3) bge 1b mov (sp)+,r1 rts pc *************** *** 245,250 **** --- 251,258 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack *** /usr/src/sys/mdec.old/rm05uboot.s Wed May 23 13:01:08 1990 --- /usr/src/sys/mdec/rm05uboot.s Wed Apr 24 10:08:46 1991 *************** *** 1,3 **** --- 1,4 ---- + MAJOR = 10. / major # from bdevsw[] / RM02/03/05 bootstrap / *************** *** 9,16 **** / must be removed RM05 = 1 / 0-> RM02/03, 1-> RM05 - drive = 0 / unit to boot from - cyl = 0. / cylinder offset of filesys to read from / options: none. all options of reading an alternate name or echoing to / the keyboard had to be removed to make room for the --- 10,15 ---- *************** *** 43,49 **** --- 42,53 ---- / establish sp, copy / program up to end of core. + + nop / These two lines must be present or DEC + br start / boot ROMs will refuse to run boot block! start: + mov r0,unit + mov r1,csr mov $..,sp mov sp,r1 clr r0 *************** *** 55,63 **** / On error, restart from here. restart: - - / clear core to make things clean clr r0 2: clr (r0)+ cmp r0,sp --- 59,66 ---- / On error, restart from here. restart: clr r0 + / clear core to make things clean 2: clr (r0)+ cmp r0,sp *************** *** 64,72 **** blo 2b / initialize disk ! mov $drive,*$rmcs2 ! mov $preset+go,*$rmcs1 ! mov $fmt22,*$rmof mov $bootnm, r1 mov $2,r0 / ROOTINO --- 67,76 ---- blo 2b / initialize disk ! mov csr,r1 ! mov unit,rmcs2(r1) ! mov $preset+go,rmcs1(r1) ! mov $fmt22,rmof(r1) mov $bootnm, r1 mov $2,r0 / ROOTINO *************** *** 154,161 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 br restart --- 158,167 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov unit,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 br restart *************** *** 208,214 **** NTRAK = 5. / RM02/03 .endif ! rmcs1 = 176700 rmda = rmcs1+6 rmcs2 = rmcs1+10 rmds = rmcs1+12 --- 214,220 ---- NTRAK = 5. / RM02/03 .endif ! rmcs1 = 0 rmda = rmcs1+6 rmcs2 = rmcs1+10 rmds = rmcs1+12 *************** *** 225,245 **** ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $NSECT*NTRAK,r0 ! .if cyl ! add $cyl,r0 ! .endif ! mov r0,*$rmca clr r0 div $NSECT,r0 swab r0 bis r1,r0 ! mov $rmda,r1 ! mov r0,(r1) ! mov $buf,-(r1) ! mov $WC,-(r1) ! mov $read+go,-(r1) 1: ! tstb (r1) bge 1b mov (sp)+,r1 rts pc --- 231,250 ---- ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $NSECT*NTRAK,r0 ! mov csr,r3 ! mov r0,rmca(r3) clr r0 div $NSECT,r0 swab r0 bis r1,r0 ! add $rmcs2,r3 ! mov unit,(r3) ! mov r0,-(r3) ! mov $buf,-(r3) ! mov $WC,-(r3) ! mov $read+go,-(r3) 1: ! tstb (r3) bge 1b mov (sp)+,r1 rts pc *************** *** 246,251 **** --- 251,258 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack *** /usr/src/sys/mdec.old/si51uboot.s Wed May 23 13:01:20 1990 --- /usr/src/sys/mdec/si51uboot.s Wed Apr 24 10:08:49 1991 *************** *** 1,3 **** --- 1,5 ---- + MAJOR = 10. / major # from bdevsw[] + / Fujitsu Eagle (2351A) on SI 6100 Controller bootstrap / Actually just a small modification of the RM02/03/05 bootstrap / *************** *** 8,17 **** / assembled size must be <= 512; if > 494, the 16-byte a.out header / must be removed - drive = 0 / unit to boot from - cyl = 0. / cylinder offset of filesys to read from - address = 176700 - / options: none. all options of reading an alternate name or echoing to / the keyboard had to be removed to make room for the / code which understands the new directory structure on disc --- 10,15 ---- *************** *** 43,49 **** --- 41,52 ---- / establish sp, copy / program up to end of core. + + nop / These two lines must be present or DEC + br start / boot ROMs will refuse to run boot block! start: + mov r0,unit + mov r1,csr mov $..,sp mov sp,r1 clr r0 *************** *** 55,63 **** / On error, restart from here. restart: - - / clear core to make things clean clr r0 2: clr (r0)+ cmp r0,sp --- 58,65 ---- / On error, restart from here. restart: clr r0 + / clear core to make things clean 2: clr (r0)+ cmp r0,sp *************** *** 64,72 **** blo 2b / initialize disk ! mov $drive,*$rmcs2 ! mov $preset+go,*$rmcs1 ! mov $fmt22,*$rmof mov $bootnm, r1 mov $2,r0 / ROOTINO --- 66,75 ---- blo 2b / initialize disk ! mov csr,r1 ! mov unit,rmcs2(r1) ! mov $preset+go,rmcs1(r1) ! mov $fmt22,rmof(r1) mov $bootnm, r1 mov $2,r0 / ROOTINO *************** *** 154,161 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 br restart --- 157,166 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov unit,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 br restart *************** *** 203,209 **** NSECT = 48. NTRAK = 20. / SI 6100 with Fujitsu 2351A ! rmcs1 = address rmda = rmcs1+6 rmcs2 = rmcs1+10 rmds = rmcs1+12 --- 208,214 ---- NSECT = 48. NTRAK = 20. / SI 6100 with Fujitsu 2351A ! rmcs1 = 0 rmda = rmcs1+6 rmcs2 = rmcs1+10 rmds = rmcs1+12 *************** *** 220,240 **** ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $NSECT*NTRAK,r0 ! .if cyl ! add $cyl,r0 ! .endif ! mov r0,*$rmca clr r0 div $NSECT,r0 swab r0 bis r1,r0 ! mov $rmda,r1 ! mov r0,(r1) ! mov $buf,-(r1) ! mov $WC,-(r1) ! mov $read+go,-(r1) 1: ! tstb (r1) bge 1b mov (sp)+,r1 rts pc --- 225,244 ---- ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $NSECT*NTRAK,r0 ! mov csr,r3 ! mov r0,rmca(r3) clr r0 div $NSECT,r0 swab r0 bis r1,r0 ! add $rmcs2,r3 ! mov unit,(r3) ! mov r0,-(r3) ! mov $buf,-(r3) ! mov $WC,-(r3) ! mov $read+go,-(r3) 1: ! tstb (r3) bge 1b mov (sp)+,r1 rts pc *************** *** 241,246 **** --- 245,252 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack *** /usr/src/sys/mdec.old/si94uboot.s Wed May 23 13:01:27 1990 --- /usr/src/sys/mdec/si94uboot.s Wed Apr 24 10:08:53 1991 *************** *** 1,3 **** --- 1,5 ---- + MAJOR = 10. / major # from bdevsw[] + / Fujitsu 160 on SI 9400 or Emulex SC01B Controller bootstrap / Actually just a small modification of the RM02/03/05 bootstrap / *************** *** 8,17 **** / assembled size must be <= 512; if > 494, the 16-byte a.out header / must be removed - drive = 0 / unit to boot from - cyl = 0. / cylinder offset of filesys to read from - address = 176700 - / options: none. all options of reading an alternate name or echoing to / the keyboard had to be removed to make room for the / code which understands the new directory structure on disc --- 10,15 ---- *************** *** 43,49 **** --- 41,52 ---- / establish sp, copy / program up to end of core. + + nop / These two lines must be present or DEC + br start / boot ROMs will refuse to run boot block! start: + mov r0,unit + mov r1,csr mov $..,sp mov sp,r1 clr r0 *************** *** 55,63 **** / On error, restart from here. restart: - - / clear core to make things clean clr r0 2: clr (r0)+ cmp r0,sp --- 58,65 ---- / On error, restart from here. restart: clr r0 + / clear core to make things clean 2: clr (r0)+ cmp r0,sp *************** *** 64,72 **** blo 2b / initialize disk ! mov $drive,*$rmcs2 ! mov $preset+go,*$rmcs1 ! mov $fmt22,*$rmof mov $bootnm, r1 mov $2,r0 / ROOTINO --- 66,75 ---- blo 2b / initialize disk ! mov csr,r1 ! mov unit,rmcs2(r1) ! mov $preset+go,rmcs1(r1) ! mov $fmt22,rmof(r1) mov $bootnm, r1 mov $2,r0 / ROOTINO *************** *** 154,161 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 br restart --- 157,166 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov unit,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 br restart *************** *** 203,209 **** NSECT = 32. NTRAK = 10. / SI 9400 with Fujitsu 160 ! rmcs1 = address rmda = rmcs1+6 rmcs2 = rmcs1+10 rmds = rmcs1+12 --- 208,214 ---- NSECT = 32. NTRAK = 10. / SI 9400 with Fujitsu 160 ! rmcs1 = 0 rmda = rmcs1+6 rmcs2 = rmcs1+10 rmds = rmcs1+12 *************** *** 220,240 **** ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $NSECT*NTRAK,r0 ! .if cyl ! add $cyl,r0 ! .endif ! mov r0,*$rmca clr r0 div $NSECT,r0 swab r0 bis r1,r0 ! mov $rmda,r1 ! mov r0,(r1) ! mov $buf,-(r1) ! mov $WC,-(r1) ! mov $read+go,-(r1) 1: ! tstb (r1) bge 1b mov (sp)+,r1 rts pc --- 225,244 ---- ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $NSECT*NTRAK,r0 ! mov csr,r3 ! mov r0,rmca(r3) clr r0 div $NSECT,r0 swab r0 bis r1,r0 ! add $rmcs2,r3 ! mov unit,(r3) ! mov r0,-(r3) ! mov $buf,-(r3) ! mov $WC,-(r3) ! mov $read+go,-(r3) 1: ! tstb (r3) bge 1b mov (sp)+,r1 rts pc *************** *** 241,246 **** --- 245,252 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack *** /usr/src/sys/mdec.old/si95uboot.s Wed May 23 13:01:34 1990 --- /usr/src/sys/mdec/si95uboot.s Wed Apr 24 10:09:02 1991 *************** *** 1,3 **** --- 1,5 ---- + MAJOR = 9. / major # from bdevsw[] + / CDC 9766 disk on SI 9500 Controller bootstrap / / disk boot program to load and transfer *************** *** 7,15 **** / assembled size must be <= 512; if > 494, the 16-byte a.out header / must be removed - drive = 0 / unit to boot from - cyl = 0. / cylinder offset of filesys to read from - / options: none. all options of reading an alternate name or echoing to / the keyboard had to be removed to make room for the / code which understands the new directory structure on disc --- 9,14 ---- *************** *** 43,49 **** --- 42,53 ---- / establish sp, copy / program up to end of core. + + nop / These two lines must be present or DEC + br start / boot ROMs will refuse to run boot block! start: + mov r0,unit + mov r1,csr mov $..,sp mov sp,r1 clr r0 *************** *** 55,63 **** / On error, restart from here. restart: - - / clear core to make things clean clr r0 2: clr (r0)+ cmp r0,sp --- 59,66 ---- / On error, restart from here. restart: clr r0 + / clear core to make things clean 2: clr (r0)+ cmp r0,sp *************** *** 64,70 **** blo 2b / initialize disk ! mov $reset,*$sicnr mov $bootnm, r1 mov $2,r0 / ROOTINO --- 67,74 ---- blo 2b / initialize disk ! mov csr,r1 ! mov $reset,sicnr(r1) mov $bootnm, r1 mov $2,r0 / ROOTINO *************** *** 152,159 **** / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov ENDCORE-BOOTDEV, r3 mov ENDCORE-CHECKWORD, r2 jsr pc,*$0 br restart --- 156,165 ---- / restart if return 2: mov ENDCORE-BOOTOPTS, r4 ! mov unit,r3 ! bis $MAJOR\<8.,r3 mov ENDCORE-CHECKWORD, r2 + mov csr,r1 jsr pc,*$0 br restart *************** *** 200,206 **** NSECT = 32. NTRAK = 19. / 9766 ! sicnr = 176700 siwcr = sicnr+2 sipcr = sicnr+4 sihsr = sicnr+6 --- 206,212 ---- NSECT = 32. NTRAK = 19. / 9766 ! sicnr = 0 siwcr = sicnr+2 sipcr = sicnr+4 sihsr = sicnr+6 *************** *** 218,258 **** ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $NSECT*NTRAK,r0 ! .if cyl ! add $cyl,r0 ! .endif .if shared mov r0,-(sp) / push onto stack ! mov *$siscr,r0 / load shared computer register bit $200,r0 / see if grant bit set bne 1f / if so, is dual ported ! mov *$sierr,r0 / move error register to r0 bic $037777,r0 / clear all but top two bits cmp $140000,r0 / see if contention error bne 2f / if not, not dual ported 1: ! bit $200,*$siscr / test for grant bne 2f / if set, go do command ! clr *$sicnr / issue logic master clear ! mov $1,*$siscr / request grant br 1b / loop until grant 2: mov (sp)+,r0 / pop off stack .endif ! mov r0,*$sipcr ! mov $drive,r0 ash $10.,r0 ! add r0,*$sipcr / port and cylinder clr r0 div $NSECT,r0 ash $5.,r0 bis r0,r1 ! mov r1,*$sihsr / head and sector ! mov $buf,*$simar / buffer address ! mov $WC,*$siwcr / word count ! mov $read+go,*$sicnr / read it 1: ! tstb *$sicnr bge 1b mov (sp)+,r1 rts pc --- 224,262 ---- ashc $CLSHFT,r0 / multiply by CLSIZE .endif div $NSECT*NTRAK,r0 ! mov csr,r3 .if shared mov r0,-(sp) / push onto stack ! mov siscr(r3),r0 / load shared computer register bit $200,r0 / see if grant bit set bne 1f / if so, is dual ported ! mov sierr(r3),r0 / move error register to r0 bic $037777,r0 / clear all but top two bits cmp $140000,r0 / see if contention error bne 2f / if not, not dual ported 1: ! bit $200,siscr(r3) / test for grant bne 2f / if set, go do command ! clr sicnr(r3) / issue logic master clear ! mov $1,siscr(r3) / request grant br 1b / loop until grant 2: mov (sp)+,r0 / pop off stack .endif ! mov r0,sipcr(r3) / port and cylinder ! mov unit,r0 ash $10.,r0 ! add r0,sipcr(r3) / add in unit number clr r0 div $NSECT,r0 ash $5.,r0 bis r0,r1 ! mov r1,sihsr(r3) / head and sector ! mov $buf,simar(r3) / buffer address ! mov $WC,siwcr(r3) / word count ! mov $read+go,sicnr(r3) / read it 1: ! tstb sicnr(r3) bge 1b mov (sp)+,r1 rts pc *************** *** 259,264 **** --- 263,270 ---- bootnm: bootlen = 4 / strlen(bootnm) + unit: 0 + csr: 0 end: inod = ..-512.-BSIZE / room for inod, buf, stack