Skip to content

Commit

Permalink
Fix the MMU TLB miss handlers so that they no longer crash when build…
Browse files Browse the repository at this point in the history
…ing SPARC64 with -O0.

This patch allocates an extra 192 bytes of stack space required by unoptimised gcc builds for saving arguments to the stack. As 
suggested by Igor previously (see http://lists.openbios.org/pipermail/openbios/2009-July/003762.html and SVN r508).

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@887 f158a5a8-5612-0410-a976-696ce0be7e32
  • Loading branch information
Mark Cave-Ayland authored and mcayland committed Oct 5, 2010
1 parent 44af623 commit a5eb733
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions arch/sparc64/vectors.S
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,9 @@ reload_DMMU_tlb:

SAVE_CPU_STATE(dtlb)

/* Switch to TLB locked stack space */
add %g1, -STACK_BIAS, %sp
/* Switch to TLB locked stack space (note we add an additional 192 bytes required for
gcc to save its arguments when building with -O0) */
add %g1, -STACK_BIAS - 192, %sp

/* Enable interrupts for window spill/fill traps */
rdpr %pstate, %g7
Expand All @@ -581,8 +582,9 @@ reload_IMMU_tlb:

SAVE_CPU_STATE(itlb)

/* Switch to TLB locked stack space */
add %g1, -STACK_BIAS, %sp
/* Switch to TLB locked stack space (note we add an additional 192 bytes required for
gcc to save its arguments when building with -O0) */
add %g1, -STACK_BIAS - 192, %sp

/* Enable interrupts for window spill/fill traps */
rdpr %pstate, %g7
Expand Down

0 comments on commit a5eb733

Please sign in to comment.