-/* get cpu type and find the first uba */
- mfpr $SID,r0
- extzv $24,$8,r0,r0 /* get cpu type */
- ashl $2,r0,r1
- movab physUBA,r2 /* get physUBA[cpu] */
- addl2 r1,r2
- movl (r2),r9
- movab physUMEM,r2 /* get physUMEM[cpu] */
- addl2 r1,r2
- movl (r2),r10
-/* if 780, init uba */
- cmpl r0,$1
- bneq 2f
- movl $UBAinit,UBA_CR(r9)
-1:
- bbc $pUBIC,UBA_CNFGR(r9),1b
-2:
- movl $5000000,r0
-1:
- sobgtr r0,1b
-/* init up, set vv in drive 0; if any errors, give up */
- movw $UPCS2_CLR,UP_cs2(r10)
- movw $UP_DCLR+UP_GO,UP_cs1(r10)
- movw $UP_PRESET+UP_GO,UP_cs1(r10)
- movw $UP_FMT22,UP_of(r10)
+ movl $MAJOR,r10 /* major("/dev/xx0a") */
+ extzv $18,$1,r1,r9 /* get UBA number from R1 */
+ xorb2 $0x01,r9 /* complement bit */
+ insv r9,$24,$8,r10 /* set UBA number */
+ insv r3,$16,$8,r10 /* drive number */
+ extzv $12,$4,r5,r4 /* get partition from r5 */
+ bicw2 $0xf000,r5 /* remove from r5 */
+ insv r4,$8,$8,r10 /* set partition */
+ movl r5,r11 /* boot flags */
+ movl physUBA[r9],r9 /* UNIBUS adaptor address */
+ movl r2,r8 /* boot device CSR */
+ movl r3,r7 /* unit number */
+
+ movl $RELOC,sp
+ moval init,r4
+ movc3 $end,(r4),(sp)
+ movl r9,r1 /* UNIBUS I/O page address */
+ movl r8,r2 /* boot device CSR */
+ movl r7,r3 /* unit number */
+/* init up, set vv in drive; if any errors, give up */
+ bisw3 r7,$UPCS2_CLR,UP_cs2(r8)
+ movw $UP_DCLR+UP_GO,UP_cs1(r8)
+ movw $UP_PRESET+UP_GO,UP_cs1(r8)
+ movw $UP_FMT22,UP_of(r8)