X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=debug%2Fprograms%2Fentry.S;h=3acd786cc226d367ddc109cb03a53e11f2601b45;hb=a96f32d19d65123a5cf4e43aa25e503530f910b9;hp=a2ea955a2707ed93d1283b066d801fc46ac2d398;hpb=a7238f6f683705a92a3216562d91cfc8979c75ed;p=riscv-tests.git diff --git a/debug/programs/entry.S b/debug/programs/entry.S index a2ea955..3acd786 100755 --- a/debug/programs/entry.S +++ b/debug/programs/entry.S @@ -1,8 +1,6 @@ #include "encoding.h" -// Enough stack to store every register in case a trap handler is executed, -// plus 33 more values. -#define STACK_SIZE (64 * XLEN / 8) +#define STACK_SIZE (90 * XLEN / 8) #if XLEN == 64 # define LREG ld @@ -108,6 +106,7 @@ wait_until_initialized: # Wait for hart 0 to perform initialization. j _init +.align 2 trap_entry: addi sp, sp, -32*REGBYTES @@ -192,6 +191,7 @@ loop_forever: j loop_forever // Fill the stack with data so we can see if it was overrun. + .section .data .align 4 stack_bottom: .fill NHARTS * STACK_SIZE/4, 4, 0x22446688