Joakim Tjernlund | fc4e188 | 2010-01-19 14:41:55 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 Wolfgang Denk <wd@denx.de> |
| 3 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Joakim Tjernlund | fc4e188 | 2010-01-19 14:41:55 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <ppc_asm.tmpl> |
| 8 | |
| 9 | .file "reloc.S" |
| 10 | |
| 11 | .text |
| 12 | #ifndef CONFIG_NAND_SPL |
| 13 | /* |
| 14 | * Function: relocate entries for one exception vector |
| 15 | */ |
| 16 | .globl trap_reloc |
| 17 | .type trap_reloc, @function |
| 18 | trap_reloc: |
| 19 | lwz r0, 0(r7) /* hdlr ... */ |
| 20 | add r0, r0, r3 /* ... += dest_addr */ |
| 21 | stw r0, 0(r7) |
| 22 | |
| 23 | lwz r0, 4(r7) /* int_return ... */ |
| 24 | add r0, r0, r3 /* ... += dest_addr */ |
| 25 | stw r0, 4(r7) |
| 26 | |
| 27 | lwz r0, 8(r7) /* transfer_to_handler ...*/ |
| 28 | add r0, r0, r3 /* ... += dest_addr */ |
| 29 | stw r0, 8(r7) |
| 30 | |
| 31 | blr |
| 32 | .size trap_reloc, .-trap_reloc |
| 33 | #endif |