Skip to content

Commit

Permalink
openrisc: avoid using function parameter regs in reset vector
Browse files Browse the repository at this point in the history
The kernel might be invoked through the reset vector, so to
preserve parameters passed to it, temp regs that are not
in the function parameter range needs to be used.

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Jonas Bonn <jonas@southpole.se>
  • Loading branch information
Stefan Kristiansson authored and Jonas Bonn committed Feb 10, 2013
1 parent 1dd2ad7 commit 54bd7c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/openrisc/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@
/* Jump to .init code at _start which lives in the .head section
* and will be discarded after boot.
*/
LOAD_SYMBOL_2_GPR(r4, _start)
tophys (r3,r4) /* MMU disabled */
l.jr r3
LOAD_SYMBOL_2_GPR(r15, _start)
tophys (r13,r15) /* MMU disabled */
l.jr r13
l.nop

/* ---[ 0x200: BUS exception ]------------------------------------------- */
Expand Down

0 comments on commit 54bd7c5

Please sign in to comment.