ARM HAL exception handling

Thomas Koeller thomas.koeller@baslerweb.com
Mon Oct 13 16:15:00 GMT 2003


Exception handling in the ARM architectural HAL does not quite work
when running in THUMB mode. Patch attached.

diff -ru packages-orig/hal/arm/arch/current/ChangeLog packages/hal/arm/arch/current/ChangeLog
--- packages-orig/hal/arm/arch/current/ChangeLog	2003-06-30 14:16:16.000000000 +0200
+++ packages/hal/arm/arch/current/ChangeLog	2003-10-13 18:12:41.000000000 +0200
@@ -1,3 +1,7 @@
+2003-10-13  Thomas Koeller  <thomas.koeller@baslerweb.com>
+
+	* src/vectors.S: Fixed broken thumb mode exception handling.
+
 2003-06-30  Mark Salter  <msalter@redhat.com>
 
 	* src/vectors.S: Fix CYGOPT_HAL_ARM_PRESERVE_SVC_SPSR handling.
diff -ru packages-orig/hal/arm/arch/current/src/vectors.S packages/hal/arm/arch/current/src/vectors.S
--- packages-orig/hal/arm/arch/current/src/vectors.S	2003-06-30 14:16:16.000000000 +0200
+++ packages/hal/arm/arch/current/src/vectors.S	2003-10-13 17:52:49.000000000 +0200
@@ -622,13 +622,16 @@
         mov     r0,sp
         ldr     r1,.__dump_procs
         ldr     r2,[sp,#armreg_vector]
+        ldr     r1,[r1,r2,lsl #2]
+        THUMB_MODE(r9,10)
         mov     lr,pc
-        ldr     pc,[r1,r2,lsl #2]
+        mov     pc,r1
+#else
+        THUMB_MODE(r9,10)
 #endif
 
         // call exception handler
         mov     r0,sp
-        THUMB_MODE(r9,10)
         bl      exception_handler
 
 #ifdef  CYGHWR_HAL_ARM_DUMP_EXCEPTIONS

--------------------------------------------------

Thomas Koeller, Software Development

Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg
Germany

Tel +49 (4102) 463-162
Fax +49 (4102) 463-239

mailto:thomas.koeller@baslerweb.com
http://www.baslerweb.com

==============================



More information about the Ecos-patches mailing list