]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/RVDS/ARM_CA9/portASM.s
Update version number to 9.0.0rc2.
[freertos] / FreeRTOS / Source / portable / RVDS / ARM_CA9 / portASM.s
index ac4b39ad286a30b227ef0d063a26ae9a904c7758..f6027adaa54d7dea8820334c56287ef0c2bf808e 100644 (file)
@@ -1,5 +1,6 @@
 ;/*\r
-;    FreeRTOS V7.4.2 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+;    FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.\r
+;    All rights reserved\r
 ;\r
 ;\r
 ;    ***************************************************************************\r
@@ -70,7 +71,7 @@
 \r
 \r
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
-; SVC handler is used to start the scheduler and yield a task.\r
+; SVC handler is used to yield a task.\r
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 FreeRTOS_SWI_Handler\r
 \r
@@ -80,11 +81,16 @@ FreeRTOS_SWI_Handler
        portSAVE_CONTEXT\r
        LDR R0, =vTaskSwitchContext\r
        BLX     R0\r
+       portRESTORE_CONTEXT\r
 \r
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
+; vPortRestoreTaskContext is used to start the scheduler.\r
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 vPortRestoreTaskContext\r
+       ; Switch to system mode\r
+       CPS             #SYS_MODE\r
        portRESTORE_CONTEXT\r
 \r
-\r
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 ; PL390 GIC interrupt handler\r
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
@@ -125,12 +131,13 @@ FreeRTOS_IRQ_Handler
 \r
        ; Call the interrupt handler\r
        PUSH    {r0-r3, lr}\r
-       BL              vApplicationIRQHandler\r
+       LDR             r1, =vApplicationIRQHandler\r
+       BLX             r1\r
        POP             {r0-r3, lr}\r
        ADD             sp, sp, r2\r
 \r
        CPSID   i\r
-       \r
+\r
        ; Write the value read from ICCIAR to ICCEOIR\r
        LDR     r4, =ulICCEOIR\r
        STR             r0, [r4]\r
@@ -179,7 +186,8 @@ switch_before_exit
        ; vTaskSwitchContext() if vTaskSwitchContext() uses LDRD or STRD\r
        ; instructions, or 8 byte aligned stack allocated data.  LR does not need\r
        ; saving as a new LR will be loaded by portRESTORE_CONTEXT anyway.\r
-       BL              vTaskSwitchContext\r
+       LDR             r0, =vTaskSwitchContext\r
+       BLX             r0\r
 \r
        ; Restore the context of, and branch to, the task selected to execute next.\r
        portRESTORE_CONTEXT\r