From f33330c0ff90adad8855250877a4a3d0a407bba4 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Mon, 2 Apr 2012 15:11:21 +0200 Subject: arm: factor all exception handlers out of the crt0.S files Remove the implementations of all exceptions handlers from the various crt0.S files and have a single implementation in system-arm.h The new implementation is weak so that it can be overwritten by some specific code (like the unwinder) Change-Id: Ib3e041ed6037376bbe0e79286057e1051640dd90 Reviewed-on: http://gerrit.rockbox.org/205 Reviewed-by: Marcin Bukat --- firmware/target/arm/crt0.S | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'firmware/target/arm/crt0.S') diff --git a/firmware/target/arm/crt0.S b/firmware/target/arm/crt0.S index 7befecb593..b9cc27f5c5 100644 --- a/firmware/target/arm/crt0.S +++ b/firmware/target/arm/crt0.S @@ -137,38 +137,6 @@ newstart: ldr ip, =main @ make sure we are using the virtual address bx ip -/* All illegal exceptions call into UIE with exception address as first - * parameter. This is calculated differently depending on which exception - * we're in. Second parameter is exception number, used for a string lookup - * in UIE. */ -undef_instr_handler: - sub r0, lr, #4 @ r0 points to the faulty ARM instruction -#ifdef USE_THUMB - mrs r1, spsr - tst r1, #(1<<5) @ T bit set ? - subne r0, lr, #2 @ if yes, r0 points to the faulty THUMB instruction -#endif /* USE_THUMB */ - mov r1, #0 - b UIE - -/* We run sys mode most of the time, and should never see a software - * exception being thrown. Make it illegal and call UIE. */ -software_int_handler: -reserved_handler: - sub r0, lr, #4 - mov r1, #4 - b UIE - -prefetch_abort_handler: - sub r0, lr, #4 - mov r1, #1 - b UIE - -data_abort_handler: - sub r0, lr, #8 - mov r1, #2 - b UIE - /* Cache-align interrupt stacks */ .balign 32 -- cgit v1.2.3