BSD 4_4 release
[unix-history] / usr / src / sys / vax / mdec / upboot.c
index d5fb786..f8c598f 100644 (file)
@@ -1,10 +1,11 @@
 /*
 /*
- * Copyright (c) 1980 Regents of the University of California.
+ * Copyright (c) 1980, 1986 Regents of the University of California.
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  */
 
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  */
 
-/* "@(#)upboot.c       6.4 (Berkeley) %G%" */
+/* "@(#)upboot.c       7.3 (Berkeley) 2/21/87" */
+#include <sys/disklabel.h>
 
        .set    MAJOR,2                 /* major("/dev/up0a") */
 
 
        .set    MAJOR,2                 /* major("/dev/up0a") */
 
@@ -54,17 +55,26 @@ init:
        bicw2   $0xf000,r5              /* remove from r5 */
        insv    r4,$8,$8,r10            /* set partition */
        movl    r5,r11                  /* boot flags */
        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    r2,r8                   /* boot device CSR */
-       movl    r3,r7                   /* unit number */
+       brw     start0
 
 
+/*
+ * Leave space for pack label.
+ */
+pad:
+       .space  LABELOFFSET - (pad - init)
+packlabel:
+       .space  d_end_
+
+start0:
+       movl    physUBA[r9],r9          /* UNIBUS adaptor address */
+       movl    r3,r7                   /* unit number */
        movl    $RELOC,sp
        moval   init,r4
        movc3   $end,(r4),(sp)
        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 */
 /* init up, set vv in drive; if any errors, give up */
+/* probably unneeded: rom should have already done this */
        bisw3   r7,$UPCS2_CLR,UP_cs2(r8)
        movw    $UP_DCLR+UP_GO,UP_cs1(r8)
        movw    $UP_PRESET+UP_GO,UP_cs1(r8)
        bisw3   r7,$UPCS2_CLR,UP_cs2(r8)
        movw    $UP_DCLR+UP_GO,UP_cs1(r8)
        movw    $UP_PRESET+UP_GO,UP_cs1(r8)
@@ -74,7 +84,6 @@ init:
        bbc     $UP_pRDY,r0,1b
 /* relocate to high core */
 start:
        bbc     $UP_pRDY,r0,1b
 /* relocate to high core */
 start:
-       movl    r5,r11                  /* boot flags */
        movl    $RELOC,sp
        moval   init,r6
        movc3   $end,(r6),(sp)
        movl    $RELOC,sp
        moval   init,r6
        movc3   $end,(r6),(sp)