Skip to content

Commit

Permalink
powerpc: Stack Pointer not properly aligned
Browse files Browse the repository at this point in the history
The code first aligns the SP to 16 then subtract 8, making it
8 bytes aligned. Furthermore the initial stack frame not
quite correct either.

Signed-off-by: Joakim Tjernlund <[email protected]>
Signed-off-by: Andy Fleming <[email protected]>
  • Loading branch information
joakim-tjernlund authored and Andy Fleming committed Aug 22, 2012
1 parent 89f4289 commit 7de8a71
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/powerpc/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,8 @@ void board_init_f(ulong bootflag)
addr_sp -= 16;
addr_sp &= ~0xF;
s = (ulong *) addr_sp;
*s-- = 0;
*s-- = 0;
addr_sp = (ulong) s;
*s = 0; /* Terminate back chain */
*++s = 0; /* NULL return address */
debug("Stack Pointer at: %08lx\n", addr_sp);

/*
Expand Down

0 comments on commit 7de8a71

Please sign in to comment.