]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/IAR/ARM_CM4F_MPU/port.c
First Official Release of ARMV8M Support. This release removes Pre-Release from all...
[freertos] / FreeRTOS / Source / portable / IAR / ARM_CM4F_MPU / port.c
index a347d1754fcc0f8dfcee3bae9ee79d21bb456a91..65973335a9caa09afaef759d5bce956aacf71550 100644 (file)
@@ -153,13 +153,6 @@ static void prvSetupMPU( void ) PRIVILEGED_FUNCTION;
  */\r
 static uint32_t prvGetMPURegionSizeSetting( uint32_t ulActualSizeInBytes ) PRIVILEGED_FUNCTION;\r
 \r
-/*\r
- * Checks to see if being called from the context of an unprivileged task, and\r
- * if so raises the privilege level and returns false - otherwise does nothing\r
- * other than return true.\r
- */\r
-extern BaseType_t xPortRaisePrivilege( void );\r
-\r
 /*\r
  * Setup the timer to generate the tick interrupts.  The implementation in this\r
  * file is weak to allow application writers to change the timer used to\r
@@ -192,6 +185,18 @@ void vPortSVCHandler_C( uint32_t *pulParam );
  */\r
 extern void vPortRestoreContextOfFirstTask( void ) PRIVILEGED_FUNCTION;\r
 \r
+/**\r
+ * @brief Calls the port specific code to raise the privilege.\r
+ *\r
+ * @return pdFALSE if privilege was raised, pdTRUE otherwise.\r
+ */\r
+extern BaseType_t xPortRaisePrivilege( void );\r
+\r
+/**\r
+ * @brief If xRunningPrivileged is not pdTRUE, calls the port specific\r
+ * code to reset the privilege, otherwise does nothing.\r
+ */\r
+extern void vPortResetPrivilege( BaseType_t xRunningPrivileged );\r
 /*-----------------------------------------------------------*/\r
 \r
 /* Each task maintains its own interrupt status in the critical nesting\r
@@ -564,18 +569,6 @@ uint32_t ulRegionSize, ulReturnValue = 4;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-void vPortResetPrivilege( BaseType_t xRunningPrivileged )\r
-{\r
-       if( xRunningPrivileged != pdTRUE )\r
-       {\r
-               __asm volatile ( " mrs r0, control      \n" \\r
-                                                " orr r0, r0, #1       \n" \\r
-                                                " msr control, r0      \n"     \\r
-                                                :::"r0", "memory" );\r
-       }\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
 void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, StackType_t *pxBottomOfStack, uint32_t ulStackDepth )\r
 {\r
 extern uint32_t __SRAM_segment_start__[];\r