1 /* 2 * Copyright (c) 1980 Regents of the University of California. 3 * All rights reserved. The Berkeley software License Agreement 4 * specifies the terms and conditions for redistribution. 5 */ 6 7 /* "@(#)raboot.c 6.3 (Berkeley) 06/26/85" */ 8 9 /* 10 * UDA50 1st level boot program: loads next 7.5Kbytes from 11 * boot sector of file system and sets it up to run. 12 */ 13 .set RELOC,0x50000 14 .set BOOTLAST,15 /* last boot sector */ 15 .set RABPSECT,512 /* bytes per sector */ 16 17 init: 18 .word 0 /* entry mask for dec monitor */ 19 nop;nop;nop;nop;nop;nop;nop;nop /* some no-ops for 750 boot to skip */ 20 nop;nop; 21 start: 22 movl r1,r7 /* UNIBUS I/O page address */ 23 movl r2,r8 /* boot device CSR */ 24 movl r3,r9 /* unit number */ 25 movl r5,r11 /* boot flags */ 26 movl $RELOC,sp 27 moval init,r10 28 movc3 $end,(r10),(sp) 29 movl r7,r1 /* UNIBUS I/O page address */ 30 movl r8,r2 /* boot device CSR */ 31 movl r9,r3 /* unit number */ 32 jmp *$RELOC+start2 33 /* now running relocated */ 34 /* bring in the boot program */ 35 start2: /* running relocated */ 36 pushr $0xffff /* BEGIN FIREWALL */ 37 movl $1,r4 /* first boot sector */ 38 clrl r5 /* transfer address */ 39 clrl -(sp) /* transfer address */ 40 1: 41 movl r4,r8 /* requested sector # */ 42 jsb (r6) /* call ROM-based driver */ 43 blbs r0,2f 44 halt /* read error */ 45 2: 46 addl2 $RABPSECT,r5 /* bump address */ 47 movl r5,(sp) 48 aobleq $BOOTLAST,r4,1b 49 50 .set PROGSIZE,((BOOTLAST-1)*RABPSECT) 51 done: 52 tstl (sp)+ /* pop address */ 53 popr $0xffff /* END FIREWALL */ 54 movl $PROGSIZE,r3 55 clrcor: 56 clrq (r3) 57 acbl $RELOC,$8,r3,clrcor 58 /* start loaded program */ 59 movl $9,r10 /* major("/dev/ra0a") */ 60 calls $0,*$0 61 brw start2 62 end: 63