From 5ae755e1bfee20aa12ddf5da03789b6ef79951c6 Mon Sep 17 00:00:00 2001 From: ragge Date: Mon, 10 Jul 2000 10:42:27 +0000 Subject: [PATCH] Save registers for eventually later usage. Use REI to clear pipes after code copy. --- sys/arch/vax/boot/common/srt0.s | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/arch/vax/boot/common/srt0.s b/sys/arch/vax/boot/common/srt0.s index 2383e7eded0c..25f320940765 100644 --- a/sys/arch/vax/boot/common/srt0.s +++ b/sys/arch/vax/boot/common/srt0.s @@ -1,4 +1,4 @@ -/* $NetBSD: srt0.s,v 1.4 2000/05/24 19:53:11 ragge Exp $ */ +/* $NetBSD: srt0.s,v 1.5 2000/07/10 10:42:27 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -48,6 +48,7 @@ nisse: .set nisse,0 # pass -e nisse to ld gives OK start addr JSBENTRY(_start) nop;nop; movl $_start, sp # Probably safe place for stack + pushr $0x1fff # save for later usage subl3 $_start, $_edata, r0 movab _start, r1 @@ -56,16 +57,16 @@ JSBENTRY(_start) subl3 $_edata, $_end, r2 movc5 $0,(r3),$0,r2,(r3) # Nolla bss också. - jsb 1f -1: movl $relocated, (sp) # return-address on top of stack - rsb # can be replaced with new address -relocated: # now relocation is done !!! - pushl r11 # RPB is copied here. - - calls $1, _Xmain # Were here! + movpsl -(sp) + movl $relocated, -(sp) + rei +relocated: # now relocation is done !!! + movl sp,_bootregs # *bootregs + calls $0, _Xmain # Were here! halt # no return ENTRY(machdep_start, 0) + calls $0,_niclose # Evil hack to shutdown DEBNA. mtpr $0x1f,$0x12 # Block all interrupts mtpr $0,$0x18 # stop real time interrupt clock movl 4(ap), r6