Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/vax/boot/xxboot Rearrange primary bootstrap slightl...



details:   https://anonhg.NetBSD.org/src/rev/85878f0cf88c
branches:  trunk
changeset: 785878:85878f0cf88c
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Apr 04 12:48:07 2013 +0000

description:
Rearrange primary bootstrap slightly to free up all space between the disk
label and the uVAX rom boot parameter block.

diffstat:

 sys/arch/vax/boot/xxboot/start.S |  39 ++++++++++++++++++++++-----------------
 1 files changed, 22 insertions(+), 17 deletions(-)

diffs (82 lines):

diff -r 6befa6c5926c -r 85878f0cf88c sys/arch/vax/boot/xxboot/start.S
--- a/sys/arch/vax/boot/xxboot/start.S  Thu Apr 04 12:21:12 2013 +0000
+++ b/sys/arch/vax/boot/xxboot/start.S  Thu Apr 04 12:48:07 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: start.S,v 1.4 2005/12/11 12:19:34 christos Exp $ */
+/*     $NetBSD: start.S,v 1.5 2013/04/04 12:48:07 martin Exp $ */
 /*
  * Copyright (c) 1995 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -38,6 +38,7 @@
 
 #define _LOCORE
 
+#define        __HAVE_OLD_DISKLABEL    /* not automatically added due to _LOCORE */
 #define OMIT_DKTYPENUMS
 #define OMIT_FSTYPENUMS
 #include "sys/disklabel.h"
@@ -55,8 +56,12 @@
 .org   0x00                    # uVAX booted from TK50 starts here
        brb     from_0x00       # continue behind dispatch-block
 
+# At offset 0x02 we have a dual used area: VMB.EXE starts execution here,
+# and uVAX-ROM looks for a pointer to a parameter block. We arrange for
+# the parameter block offset to disassmble as a CASEL instructions which
+# falls through to 0x08.
 .org   0x02                    # information used by uVAX-ROM
-       .byte   0xcf            # offset in words to identification area 
+       .byte   0xcf            # offset in words to identification area
        .byte   1               # this byte must be 1
        .word   0               # logical block number (word swapped) 
        .word   0               # of the secondary image
@@ -74,20 +79,6 @@
 
 from_0x08:                     # Any machine from VMB
        movzbl  $4,_C_LABEL(from)               # Booted from full VMB
-       brw     start_vmb
-
-# the complete area reserved for label
-# must be empty (i.e. filled with zeroes).
-# disklabel(8) checks that before installing
-# the bootblocks over existing label.
-
-.org   LABELOFFSET
-       .globl  _C_LABEL(romlabel)
-_C_LABEL(romlabel):
-       .long   0
-
-.org   LABELOFFSET + d_end_
-start_vmb:
        /*
         * Read in block 1-15.
         */
@@ -102,6 +93,20 @@
        calls   $6, (%r6)       # call the qio-routine
        brw     start_uvax
 
+# the complete area reserved for label
+# must be empty (i.e. filled with zeroes).
+# disklabel(8) checks that before installing
+# the bootblocks over existing label.
+
+.org   LABELOFFSET
+       .globl  _C_LABEL(romlabel)
+_C_LABEL(romlabel):
+       .long   0
+
+.org   LABELOFFSET + d_end_
+# Make sure the parameter block is past the disklabel.
+# If not, the next .org would try to move backwards.
+
 /*
  * Parameter block for uVAX boot.
  */
@@ -110,7 +115,7 @@
 #define SILOAD         0       /* load offset (usually 0) from the default */
 #define SIOFF          0x200   /* byte offset into secondary image */
 
-.org   0x19e
+.org   0x19e   # do not move, see comment earlier about CASEL
        .byte   0x18            # must be 0x18 
        .byte   0x00            # must be 0x00 (MBZ) 
        .byte   0x00            # any value 



Home | Main Index | Thread Index | Old Index