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/common New arguments to the rom routines. ...



details:   https://anonhg.NetBSD.org/src/rev/afe16fe50528
branches:  trunk
changeset: 486367:afe16fe50528
user:      ragge <ragge%NetBSD.org@localhost>
date:      Sat May 20 13:22:39 2000 +0000

description:
New arguments to the rom routines. Adapt srt0 to new world also.

diffstat:

 sys/arch/vax/boot/common/romread.s |  36 +++++++++++++++++-------------------
 sys/arch/vax/boot/common/srt0.s    |  37 ++++++++++++-------------------------
 2 files changed, 29 insertions(+), 44 deletions(-)

diffs (131 lines):

diff -r 6b05cb9bcce5 -r afe16fe50528 sys/arch/vax/boot/common/romread.s
--- a/sys/arch/vax/boot/common/romread.s        Sat May 20 13:21:29 2000 +0000
+++ b/sys/arch/vax/boot/common/romread.s        Sat May 20 13:22:39 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: romread.s,v 1.1 1999/03/06 16:36:06 ragge Exp $ */
+/*     $NetBSD: romread.s,v 1.2 2000/05/20 13:22:39 ragge Exp $ */
 /*
  * Copyright (c) 1995 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -58,36 +58,34 @@
        ret
 
 /*
- * romread_uvax (int lbn, int size, void *buf, int *regs)
+ * romread_uvax (int lbn, int size, void *buf, struct rpb *rpb)
  */
 ENTRY(romread_uvax, 0xFFE)
-       movl    16(ap), r11     # array of bootregs
-       movl    44(r11), r11    # restore boot-contents of r11 (rpb)
+       movl    16(ap),r11      # restore boot-contents of r11 (rpb)
        movl    52(r11), r7     # load iovec/bqo into r7
        addl3   (r7), r7, r6    # load qio into r6
-       pushl   r11                     # base of rpb
-       pushl   $0                      # virtual-flag 
-       pushl   $33                     # read-logical-block
-       pushl   4(ap)                   # lbn to start reading
-       pushl   8(ap)                   # number of bytes to read
-       pushl   12(ap)                  # buffer-address 
+       pushl   r11             # base of rpb
+       pushl   $0              # virtual-flag 
+       pushl   $33             # read-logical-block
+       pushl   4(ap)           # lbn to start reading
+       pushl   8(ap)           # number of bytes to read
+       pushl   12(ap)          # buffer-address 
        calls   $6, (r6)        # call the qio-routine
        ret                     # r0 holds the result
 
 /*
- * romwrite_uvax (int lbn, int size, void *buf, int *regs)
+ * romwrite_uvax (int lbn, int size, void *buf, struct rpb *rpb)
  */
 ENTRY(romwrite_uvax, 0xFFE)
-       movl    16(ap), r11     # array of bootregs
-       movl    44(r11), r11    # restore boot-contents of r11 (rpb)
+       movl    16(ap), r11     # restore boot-contents of r11 (rpb)
        movl    52(r11), r7     # load iovec/bqo into r7
        addl3   (r7), r7, r6    # load qio into r6
-       pushl   r11                     # base of rpb
-       pushl   $0                      # virtual-flag 
-       pushl   $32                     # write-logical-block
-       pushl   4(ap)                   # lbn to start reading
-       pushl   8(ap)                   # number of bytes to read
-       pushl   12(ap)                  # buffer-address 
+       pushl   r11             # base of rpb
+       pushl   $0              # virtual-flag 
+       pushl   $32             # write-logical-block
+       pushl   4(ap)           # lbn to start reading
+       pushl   8(ap)           # number of bytes to read
+       pushl   12(ap)          # buffer-address 
        calls   $6, (r6)        # call the qio-routine
        ret                     # r0 holds the result
 
diff -r 6b05cb9bcce5 -r afe16fe50528 sys/arch/vax/boot/common/srt0.s
--- a/sys/arch/vax/boot/common/srt0.s   Sat May 20 13:21:29 2000 +0000
+++ b/sys/arch/vax/boot/common/srt0.s   Sat May 20 13:22:39 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: srt0.s,v 1.2 1999/05/23 21:58:19 ragge Exp $ */
+/*     $NetBSD: srt0.s,v 1.3 2000/05/20 13:22:39 ragge Exp $ */
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -32,6 +32,8 @@
  /* All bugs are subject to removal without further notice */
 
 #include "../include/asm.h"
+
+#define JSBENTRY(x)     .globl x ; .align 2 ; x :
 /*
  * Auto-moving startup code for standalone programs. Can be loaded
  * (almost) anywhere in memory but moves itself to the position
@@ -43,18 +45,9 @@
 nisse: .set    nisse,0         # pass -e nisse to ld gives OK start addr
        .globl  nisse
 
-_start:        .globl  _start
-       nop;nop;                # If we get called by calls, or something
-
-       movl    r8, _memsz      # If we come from disk, save memsize
-       cmpl    ap, $-1         # Check if we are net-booted. XXX - kludge
-       beql    2f              # jump if not
-       ashl    $9,76(r11),_memsz # got memsize from rpb
-       movzbl  102(r11), r10   # Get bootdev from rpb.
-       movzwl  48(r11), r11    # Get howto
-
-2:     movl    $_start, sp     # Probably safe place for stack
-       subl2   $52, sp         # do not overwrite saved boot-registers
+JSBENTRY(_start)
+       nop;nop;
+       movl    $_start, sp     # Probably safe place for stack
 
        subl3   $_start, $_edata, r0
        movab   _start, r1
@@ -67,22 +60,16 @@
 1:     movl    $relocated, (sp)   # return-address on top of stack
        rsb                        # can be replaced with new address
 relocated:                        # now relocation is done !!!
-       movl    r10,_bootdev    # Save bootdev early
-       movl    r11,_howto      # howto also...
-       movl    sp, _bootregs
-       calls   $0, _Xmain      # Were here!
+       pushl   r11             # RPB is copied here.
+
+       calls   $1, _Xmain      # Were here!
        halt                    # no return
 
 ENTRY(machdep_start, 0)
        mtpr    $0x1f,$0x12     # Block all interrupts
        mtpr    $0,$0x18        # stop real time interrupt clock
        movl    4(ap), r6
-       movl    _howto, r11
-       movl    _opendev, r10
-       movl    20(ap), r9
-       movl    _memsz, r8
-       calls   $0,(r6)
+       movl    20(ap), r9      # end of symbol table
+       movab   _bootrpb,-(sp)
+       calls   $1,(r6)
        ret
-
-       .globl  _memsz
-_memsz:        .long   0x0



Home | Main Index | Thread Index | Old Index