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
This commit is contained in:
parent
6844116ae2
commit
520c13bcc8
|
@ -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 @@ Dec_Diskboot:
|
|||
.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 @@ start:
|
|||
#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
|
||||
|
|
Loading…
Reference in New Issue