]> git.sur5r.net Git - freertos/commitdiff
Interrupt nesting and cache support added.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 10 Aug 2008 21:14:08 +0000 (21:14 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 10 Aug 2008 21:14:08 +0000 (21:14 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@442 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/GCC/ColdFire_V2/portasm.S
Source/portable/GCC/ColdFire_V2/portmacro.h

index a80f3bd51ce0c29b49ea16c3a7be2590f401b85d..7229c52cb91e7e79ddf6c9e6bf05f0b8e57587ec 100644 (file)
@@ -9,8 +9,8 @@
  */\r
 \r
     .global ulPortSetIPL\r
+    .global mcf5xxx_wr_cacr\r
     .global __cs3_isr_interrupt_127\r
-    .global __cs3_isr_interrupt_119\r
     .global vPortStartFirstTask\r
 \r
     .text\r
@@ -25,9 +25,8 @@
        .endm\r
 \r
 .macro portRESTORE_CONTEXT\r
-\r
-       move.l          pxCurrentTCB, %sp\r
-       move.l          (%sp), %sp\r
+       move.l          pxCurrentTCB, %a0\r
+       move.l          (%a0), %sp\r
        movem.l         (%sp), %d0-%fp\r
        lea.l           %sp@(60), %sp\r
        rte\r
@@ -67,6 +66,13 @@ ulPortSetIPL:
     lea     8(SP),SP\r
     unlk    A6\r
     rts\r
+/********************************************************************/\r
+\r
+mcf5xxx_wr_cacr:\r
+    move.l  4(sp),d0\r
+    .long   0x4e7b0002      /* movec d0,cacr   */\r
+    nop\r
+    rts\r
 \r
 /********************************************************************/\r
 \r
index 3615da74332f4f0990761fbaa4f802333f217b0e..3b0024239ebd871a976394cc98151b9f6256247d 100644 (file)
@@ -84,7 +84,7 @@ extern "C" {
 \r
 /* Hardware specifics. */\r
 #define portBYTE_ALIGNMENT                     4\r
-#define portSTACK_GROWTH                       -4\r
+#define portSTACK_GROWTH                       -1\r
 #define portTICK_RATE_MS                       ( ( portTickType ) 1000 / configTICK_RATE_HZ )\r
 /*-----------------------------------------------------------*/\r
 unsigned portLONG ulPortSetIPL( unsigned portLONG );\r
@@ -106,7 +106,7 @@ extern void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE );
 \r
 /* Task utilities. */\r
 \r
-#define portYIELD()                    MCF_INTC0_INTFRCH |= ( 1UL << ( configYIELD_INTERRUPT_VECTOR - 32UL ) ); portNOP(); portNOP(); portNOP(); /* -32 as we are using the high word of the 64bit mask. */\r
+#define portYIELD()                    MCF_INTC0_INTFRCH |= ( 1UL << ( configYIELD_INTERRUPT_VECTOR - 32UL ) ); portNOP(); portNOP(); portNOP() /* -32 as we are using the high word of the 64bit mask. */\r
 \r
 \r
 \r
@@ -119,9 +119,9 @@ extern void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE );
 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
 /*-----------------------------------------------------------*/\r
 \r
-#define portEND_SWITCHING_ISR( xSwitchRequired )       if( xSwitchRequired )   \\r
-                                                                                                       {                                               \\r
-                                                                                                               portYIELD();            \\r
+#define portEND_SWITCHING_ISR( xSwitchRequired )       if( xSwitchRequired != pdFALSE )        \\r
+                                                                                                       {                                                                       \\r
+                                                                                                               portYIELD();                                    \\r
                                                                                                        }\r
 \r
 \r