Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/pmax/stand/lib Fix an off-by-32 error - space was p...
details: https://anonhg.NetBSD.org/src/rev/ff33bc706473
branches: trunk
changeset: 471815:ff33bc706473
user: simonb <simonb%NetBSD.org@localhost>
date: Mon Apr 12 03:53:13 1999 +0000
description:
Fix an off-by-32 error - space was padded out to the 96th byte for the
DEC disk boot block header, but it's only 64 bytes long. Gives us
another 32 bytes in the first stage.
Don't use a roll-your-own START_FRAME size and offsets for the stack
and ra - use the <mips/asm.h> provided CALLFRAME_SIZ, CALLFRAME_RA and
CALLFRAME_SP
diffstat:
sys/arch/pmax/stand/lib/start.S | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diffs (49 lines):
diff -r 8c696ef19392 -r ff33bc706473 sys/arch/pmax/stand/lib/start.S
--- a/sys/arch/pmax/stand/lib/start.S Mon Apr 12 01:53:06 1999 +0000
+++ b/sys/arch/pmax/stand/lib/start.S Mon Apr 12 03:53:13 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: start.S,v 1.13 1999/04/11 04:27:53 simonb Exp $ */
+/* $NetBSD: start.S,v 1.14 1999/04/12 03:53:13 simonb Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -107,22 +107,18 @@
.word Dec_Diskboot /* loadAddr */
.word start /* execAddr */
.word 16, 0 /* map[0] numBlocks, startBlock */
- .word 0,0, 0,0, 0,0, 0,0
- .word 0,0, 0,0, 0,0, 0,0
+ .word 0,0, 0,0, 0,0, 0,0 /* pad to 64 bytes (start of label) */
Label_goes_here:
- .word 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0
- .word 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0
+ .word 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 /* 276 bytes for ... */
+ .word 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 /* ... BSD label */
.word 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0
.word 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0
.word 0,0, 0,0, 0
#endif
.extern callv, 4
-/*
- * Amount to take off of the stack for the benefit of the debugger.
- */
-#define START_FRAME ((4 * 4) + 4 + 4)
+
.globl start
start:
@@ -130,9 +126,9 @@
#ifdef __GP_SUPPORT__
la gp, _C_LABEL (_gp)
#endif
- la sp, start - START_FRAME
- sw zero, START_FRAME - 4(sp) # Zero out old ra for debugger
- sw zero, START_FRAME - 8(sp) # Zero out old fp for debugger
+ la sp, start - CALLFRAME_SIZ
+ sw zero, CALLFRAME_RA(sp) # Zero out old ra for debugger
+ sw zero, CALLFRAME_SP(sp) # Zero out old fp for debugger
move s0, a0 # save argc
move s1, a1 # save argv
beq a2, DEC_REX_MAGIC, 1f # jump if boot from DS5000
Home |
Main Index |
Thread Index |
Old Index