blob: eb51fe8881837d62fe4e9615836450261d2bbea6 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Joakim Tjernlundfc4e1882010-01-19 14:41:55 +01002/*
3 * Copyright (C) 2009 Wolfgang Denk <wd@denx.de>
Joakim Tjernlundfc4e1882010-01-19 14:41:55 +01004 */
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
17trap_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