* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
/* "%W% (Berkeley) %G%" */
#define PARTITION /* Partition is in bits 12 to 15 of R5
* RP??/RM?? 1st level boot program: loads next 7.5Kbytes from
* boot sector of file system and sets it up to run.
* Reads from the controller and drive passed in from the boot
* R1: address of the boot devices's adapter
* R2: controller number of the boot device
* R3: unit number of the boot device
* R5: software boot control flags
* R6: address of driver subroutine from ROM
* SP: base address of usable memory + 0x200
.set BOOTLAST,15 /* last boot sector */
.set RPBPSECT,512 /* bytes per sector */
.word 0 /* entry mask for DEC monitor */
nop;nop;nop;nop;nop;nop;nop;nop /* some no-ops for 750 boot to skip */
clrl r10 /* major("/dev/hp0a") */
extzv $13,$2,r1,r4 /* get MBA number from R1 */
insv r4,$24,$8,r10 /* set MBA 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,$4,r10 /* set partition */
movl r5,r11 /* Save software boot control flags */
/* Save register during move */
movl r1,r7 /* MBA adapter address */
movl r2,r8 /* controller number */
movl r3,r9 /* unit number */
movl r7,r1 /* MBA adapter address */
movl r8,r2 /* controller number */
movl r9,r3 /* unit number */
/* now running relocated */
/* bring in the boot program */
start2: /* running relocated */
pushr $0xffff /* BEGIN FIREWALL */
movl $1,r4 /* first boot sector */
clrl r5 /* transfer address */
clrl -(sp) /* transfer address */
movl r4,r8 /* requested sector # */
jsb (r6) /* call ROM-based driver */
addl2 $RPBPSECT,r5 /* bump address */
.set PROGSIZE,(BOOTLAST*RPBPSECT)
tstl (sp)+ /* pop address */
popr $0xffff /* END FIREWALL */
/* clear core and execute program */