]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/RVDS/ARM_CM4_MPU/portmacro.h
Updates to CM4_MPU RCDS port
[freertos] / FreeRTOS / Source / portable / RVDS / ARM_CM4_MPU / portmacro.h
index 3ec3c1fd1dc37be7dd8bf1739095d1e82e8c865f..bd9e1c9a3963e5d6452016ceffa80f588323db71 100644 (file)
@@ -73,12 +73,13 @@ typedef unsigned long UBaseType_t;
 #define portUSING_MPU_WRAPPERS         1\r
 #define portPRIVILEGE_BIT                      ( 0x80000000UL )\r
 \r
-#define portMPU_REGION_READ_WRITE                              ( 0x03UL << 24UL )\r
-#define portMPU_REGION_PRIVILEGED_READ_ONLY            ( 0x05UL << 24UL )\r
-#define portMPU_REGION_READ_ONLY                               ( 0x06UL << 24UL )\r
-#define portMPU_REGION_PRIVILEGED_READ_WRITE   ( 0x01UL << 24UL )\r
-#define portMPU_REGION_CACHEABLE_BUFFERABLE            ( 0x07UL << 16UL )\r
-#define portMPU_REGION_EXECUTE_NEVER                   ( 0x01UL << 28UL )\r
+#define portMPU_REGION_READ_WRITE                                                              ( 0x03UL << 24UL )\r
+#define portMPU_REGION_PRIVILEGED_READ_ONLY                                            ( 0x05UL << 24UL )\r
+#define portMPU_REGION_READ_ONLY                                                               ( 0x06UL << 24UL )\r
+#define portMPU_REGION_PRIVILEGED_READ_WRITE                                   ( 0x01UL << 24UL )\r
+#define portMPU_REGION_PRIVILEGED_READ_WRITE_UNPRIV_READ_ONLY  ( 0x02UL << 24UL )\r
+#define portMPU_REGION_CACHEABLE_BUFFERABLE                                            ( 0x07UL << 16UL )\r
+#define portMPU_REGION_EXECUTE_NEVER                                                   ( 0x01UL << 28UL )\r
 \r
 #define portUNPRIVILEGED_FLASH_REGION          ( 0UL )\r
 #define portPRIVILEGED_FLASH_REGION                    ( 1UL )\r
@@ -301,6 +302,12 @@ BaseType_t xReturn;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+#ifndef configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY\r
+       #warning "configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY is not defined. We recommend defining it to 1 in FreeRTOSConfig.h for better security."\r
+       #define configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY 0\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
 #ifdef __cplusplus\r
 }\r
 #endif\r