changeset 2952:996c69429643

* include/hal_intr.h (HAL_INTERRUPT_STACK_CALL_PENDING_DSRS): * src/hal_misc.c (hal_reset_vsr): Add 0 argument to SWI. * src/vectors.S (hal_switch_state_vsr): Eliminate "msr psp,sp", which is now deprecated. (hal_pendable_svc_vsr): Add 0 argument to SWI.
author nickg
date Mon, 17 May 2010 11:38:29 +0000
parents ecbc3608d513
children 2651da7b1e83
files packages/hal/cortexm/arch/current/ChangeLog packages/hal/cortexm/arch/current/include/hal_intr.h packages/hal/cortexm/arch/current/src/hal_misc.c packages/hal/cortexm/arch/current/src/vectors.S
diffstat 4 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/packages/hal/cortexm/arch/current/ChangeLog
+++ b/packages/hal/cortexm/arch/current/ChangeLog
@@ -1,3 +1,12 @@
+2010-05-17  Spencer Oliver <spen@spen-soft.co.uk>
+
+	* include/hal_intr.h (HAL_INTERRUPT_STACK_CALL_PENDING_DSRS):
+	* src/hal_misc.c (hal_reset_vsr): Add 0 argument to SWI.
+
+	* src/vectors.S (hal_switch_state_vsr): Eliminate "msr psp,sp",
+	which is now deprecated.
+	(hal_pendable_svc_vsr): Add 0 argument to SWI.
+
 2009-02-27  Simon Kallweit  <simon.kallweit@intefo.ch>
 
 	* include/hal_io.h: Added system control register definitions 
--- a/packages/hal/cortexm/arch/current/include/hal_intr.h
+++ b/packages/hal/cortexm/arch/current/include/hal_intr.h
@@ -298,7 +298,7 @@ typedef cyg_uint32  CYG_INTERRUPT_STATE;
 {                                                       \
     __asm__ volatile (                                  \
         "ldr     r3,=hal_call_dsrs_vsr          \n"     \
-        "swi                                    \n"     \
+        "swi 0                                  \n"     \
         :                                               \
         :                                               \
         : "r3"                                          \
--- a/packages/hal/cortexm/arch/current/src/hal_misc.c
+++ b/packages/hal/cortexm/arch/current/src/hal_misc.c
@@ -185,7 +185,7 @@ void hal_reset_vsr( void )
 
     hal_vsr_table[CYGNUM_HAL_VECTOR_SERVICE] = (CYG_ADDRESS)hal_switch_state_vsr;    
 
-    __asm__ volatile( "swi" );
+    __asm__ volatile( "swi 0" );
 
     hal_vsr_table[CYGNUM_HAL_VECTOR_SERVICE] = (CYG_ADDRESS)hal_default_svc_vsr;
     
--- a/packages/hal/cortexm/arch/current/src/vectors.S
+++ b/packages/hal/cortexm/arch/current/src/vectors.S
@@ -130,7 +130,8 @@ hal_switch_state_vsr:
         msr     control,r0
         isb                             // Insert a barrier
         
-        msr     psp,sp                  // Copy SP to PSP
+        mov     r0,sp
+        msr     psp,r0                  // Copy SP to PSP
 
 #if !defined(CYGPKG_KERNEL)
         sub     sp,#(CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE/2)
@@ -274,7 +275,7 @@ hal_pendable_svc_vsr:
 hal_interrupt_end_done:
 
         ldr     r3,=hal_interrupt_end_vsr
-        swi
+        swi 0
         
 //==========================================================================        
 // Interrupt end VSR