* RK07 disk boot program to load "/boot" from
* a UNIX filesystem (starting at block 1 on pack on
* drive 0) into low core and to execute that file.
* This program can only read regular small 1k byte (3bsd+) files
* from the root of a UNIX filesystem.
.set BLKSIZ,1024 /* file system block size */
.set INOSIZ,64 /* no. bytes/inode entry */
.set INOBLK,BLKSIZ/INOSIZ /* no. inodes/disc block */
.set INOMSK,0xfffffff0 /* changes with inode size */
.set NAMSIZ,14 /* bytes in directory name */
.set ENTADR,024 /* offset to entry addr in a.out */
.set DIRSIZ,16 /* size of directory entry, bytes */
.set ROOTINO,2 /* root dir inode no. */
.set SID,62 /* system ID register */
.set UBA_CNFGR,0 /* UBA configuration register */
.set UBA_CR,4 /* UBA control register offset */
.set UBA_MAP,0x800 /* UBA offset to map reg's */
.set UBAinit,1 /* UBA init bit in UBA control reg */
.set pUBIC,16 /* Unibus init complete */
/* RK611 registers and bits */
.set HK,0177440-0160000 /* address of RK611 */
.set HK_cs1,HK+0 /* control and status */
.set HK_wc,HK+2 /* word count */
.set HK_ba,HK+4 /* bus address */
.set HK_da,HK+6 /* disk address */
.set HK_dc,HK+020 /* desired cylinder */
.set HK_GO,1 /* go bit */
.set HK_PACK,2 /* pack acknowledge */
.set HK_RCOM,020 /* read command */
.set HK_SEL7,02000 /* select RK07 disk */
.set HK_pRDY,7 /* position of ready bit */
.set HK_pERR,15 /* position of error bit */
.word 0 /* entry mask for dec monitor */
nop;nop;nop;nop;nop;nop;nop;nop /* some no-ops for 750 boot to skip */
/* get cpu type and find the first uba */
extzv $24,$8,r0,r0 /* get cpu type */
movab physUBA,r2 /* get physUBA[cpu] */
movab physUMEM,r2 /* get physUMEM[cpu] */
bbc $pUBIC,UBA_CNFGR(r9),1b
/* init rk611, set vv in drive 0; if any errors, give up */
movw $HK_SEL7+HK_GO,HK_cs1(r10)
movw $HK_SEL7+HK_PACK+HK_GO,HK_cs1(r10)
/* relocate to high core */
movl r5,r11 /* boot flags */
/* now running relocated */
/* search for ``boot'' in root inode */
acbl $buf+BLKSIZ-1,$DIRSIZ,r7,nxtent
/* found inode for desired file... read it in */
movl $3,r10 /* major("/dev/hk0a") */
/* iget: get inode block whose # is in r0 */
addl3 $(INOBLK*(NBOO+NSUP))-1,r0,r8
movc3 $time-inode,(r8),*$inode
/* rmblk: read in bno into addr */
/* this boot assumes only small files (<=20 blocks) */
/* rblk: read disk block whose number is in r4 */
movw $-BLKSIZ/2,HK_wc(r10)
bisl3 $0x80000000,r0,UBA_MAP(r9)
bisl3 $0x80000000,r0,UBA_MAP+4(r9)
movw $HK_SEL7+HK_RCOM+HK_GO,HK_cs1(r10)
names: .byte 'b,'o,'o,'t,0,0,0,0,0,0,0,0,0,0
.long 0x20006000 /* 11/780 */
.long 0xf30000 /* 11/750 */
.long 0xf26000 /* 11/7ZZ */
.long 0x2013e000 /* 11/780 */
.long 0xffe000 /* 11/750 */
.long 0xffe000 /* 11/7ZZ */