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