This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM HAL exception handling


Andrew Lunn wrote:
Hi folks

I don't know enough about thumb to deal with this patch. Please can
someone else take a look.

Mark's the expert on this stuff AFAIK, but firstly it mostly only affects #ifdef CYGHWR_HAL_ARM_DUMP_EXCEPTIONS stuff, so can't be too problematic. Clearly the current stuff doesn't grok thumb at all. The change looks reasonable.


Jifl

        Thanks
                Andrew

On Mon, Oct 13, 2003 at 06:18:30PM +0200, Thomas Koeller wrote:

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

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



--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]