summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx/start.S
diff options
context:
space:
mode:
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>2010-01-19 14:41:55 +0100
committerWolfgang Denk <wd@denx.de>2010-01-26 19:30:12 +0100
commitfc4e188789b01dc9f18c80869c43fdd7d1a51378 (patch)
treebff9ddbb66b0e5946f1bf73da1021f3ce1befc0d /cpu/ppc4xx/start.S
parent2903ad33a71251a3a87485b5b185852c8998f209 (diff)
downloadu-boot-imx-fc4e188789b01dc9f18c80869c43fdd7d1a51378.zip
u-boot-imx-fc4e188789b01dc9f18c80869c43fdd7d1a51378.tar.gz
u-boot-imx-fc4e188789b01dc9f18c80869c43fdd7d1a51378.tar.bz2
ppc: Loose GOT access in IRQ
Using the GOT in IRQ handlers requires r14 to be -ffixed-r14. Avoid this by relocatate transfer_to_handler too. This will allow to free up r14 later on. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Diffstat (limited to 'cpu/ppc4xx/start.S')
-rw-r--r--cpu/ppc4xx/start.S33
1 files changed, 3 insertions, 30 deletions
diff --git a/cpu/ppc4xx/start.S b/cpu/ppc4xx/start.S
index 46f65aa..2eb21fa 100644
--- a/cpu/ppc4xx/start.S
+++ b/cpu/ppc4xx/start.S
@@ -574,28 +574,15 @@ Alignment:
mfspr r5,DSISR
stw r5,_DSISR(r21)
addi r3,r1,STACK_FRAME_OVERHEAD
- li r20,MSR_KERNEL
- rlwimi r20,r23,0,16,16 /* copy EE bit from saved MSR */
- lwz r6,GOT(transfer_to_handler)
- mtlr r6
- blrl
-.L_Alignment:
- .long AlignmentException - _start + _START_OFFSET
- .long int_return - _start + _START_OFFSET
+ EXC_XFER_TEMPLATE(Alignment, AlignmentException, MSR_KERNEL, COPY_EE)
/* Program check exception */
. = 0x700
ProgramCheck:
EXCEPTION_PROLOG(SRR0, SRR1)
addi r3,r1,STACK_FRAME_OVERHEAD
- li r20,MSR_KERNEL
- rlwimi r20,r23,0,16,16 /* copy EE bit from saved MSR */
- lwz r6,GOT(transfer_to_handler)
- mtlr r6
- blrl
-.L_ProgramCheck:
- .long ProgramCheckException - _start + _START_OFFSET
- .long int_return - _start + _START_OFFSET
+ EXC_XFER_TEMPLATE(ProgramCheck, ProgramCheckException,
+ MSR_KERNEL, COPY_EE)
#ifdef CONFIG_440
STD_EXCEPTION(0x800, FPUnavailable, UnknownException)
@@ -1742,20 +1729,6 @@ __440_msr_continue:
mtlr r4 /* restore link register */
blr
- /*
- * Function: relocate entries for one exception vector
- */
-trap_reloc:
- lwz r0, 0(r7) /* hdlr ... */
- add r0, r0, r3 /* ... += dest_addr */
- stw r0, 0(r7)
-
- lwz r0, 4(r7) /* int_return ... */
- add r0, r0, r3 /* ... += dest_addr */
- stw r0, 4(r7)
-
- blr
-
#if defined(CONFIG_440)
/*----------------------------------------------------------------------------+
| dcbz_area.