diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-04-02 15:11:21 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-04-06 13:46:32 +0200 |
commit | f33330c0ff90adad8855250877a4a3d0a407bba4 (patch) | |
tree | 6b5ad86aeb2e6b0a57f78965e59c618b4a26f30f /firmware/target/arm/imx233/crt0.S | |
parent | bb0e4cc543e4c7bed6dff3a41d092b6867632535 (diff) | |
download | rockbox-f33330c0ff90adad8855250877a4a3d0a407bba4.tar.gz rockbox-f33330c0ff90adad8855250877a4a3d0a407bba4.zip |
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 <marcin.bukat@gmail.com>
Diffstat (limited to 'firmware/target/arm/imx233/crt0.S')
-rw-r--r-- | firmware/target/arm/imx233/crt0.S | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/firmware/target/arm/imx233/crt0.S b/firmware/target/arm/imx233/crt0.S index 4ae083ccb2..ffc58d56fc 100644 --- a/firmware/target/arm/imx233/crt0.S +++ b/firmware/target/arm/imx233/crt0.S | |||
@@ -161,38 +161,6 @@ remap: | |||
161 | 1: | 161 | 1: |
162 | b 1b | 162 | b 1b |
163 | 163 | ||
164 | /* All illegal exceptions call into UIE with exception address as first | ||
165 | * parameter. This is calculated differently depending on which exception | ||
166 | * we're in. Second parameter is exception number, used for a string lookup | ||
167 | * in UIE. */ | ||
168 | undef_instr_handler: | ||
169 | sub r0, lr, #4 @ r0 points to the faulty ARM instruction | ||
170 | #ifdef USE_THUMB | ||
171 | mrs r1, spsr | ||
172 | tst r1, #(1<<5) @ T bit set ? | ||
173 | subne r0, lr, #2 @ if yes, r0 points to the faulty THUMB instruction | ||
174 | #endif /* USE_THUMB */ | ||
175 | mov r1, #0 | ||
176 | b UIE | ||
177 | |||
178 | /* We run sys mode most of the time, and should never see a software | ||
179 | * exception being thrown. Make it illegal and call UIE. */ | ||
180 | software_int_handler: | ||
181 | reserved_handler: | ||
182 | sub r0, lr, #4 | ||
183 | mov r1, #4 | ||
184 | b UIE | ||
185 | |||
186 | prefetch_abort_handler: | ||
187 | sub r0, lr, #4 | ||
188 | mov r1, #1 | ||
189 | b UIE | ||
190 | |||
191 | data_abort_handler: | ||
192 | sub r0, lr, #8 | ||
193 | mov r1, #2 | ||
194 | b UIE | ||
195 | |||
196 | /* 256 words of IRQ stack */ | 164 | /* 256 words of IRQ stack */ |
197 | .space 256*4 | 165 | .space 256*4 |
198 | irq_stack: | 166 | irq_stack: |