From 94a64e1a90f8b845e8c5e52a6cc5cd0796251ca4 Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Fri, 26 Jun 2020 08:35:21 -0700 Subject: [PATCH] Place privileged symbols correctly Some of the privileged symbols were not going in their respective section. This commit addresses those and places them in privileged_functions or privileged_data section. Signed-off-by: Gaurav Aggarwal --- list.c | 14 ++++++++++++- portable/ARMv8M/non_secure/port.c | 10 +++++----- portable/GCC/ARM_CM23/non_secure/port.c | 10 +++++----- portable/GCC/ARM_CM23_NTZ/non_secure/port.c | 10 +++++----- portable/GCC/ARM_CM33/non_secure/port.c | 10 +++++----- portable/GCC/ARM_CM33_NTZ/non_secure/port.c | 10 +++++----- portable/IAR/ARM_CM23/non_secure/port.c | 10 +++++----- portable/IAR/ARM_CM23_NTZ/non_secure/port.c | 10 +++++----- portable/IAR/ARM_CM33/non_secure/port.c | 10 +++++----- portable/IAR/ARM_CM33_NTZ/non_secure/port.c | 10 +++++----- portable/MemMang/heap_4.c | 22 ++++++++++----------- tasks.c | 4 ++-- timers.c | 4 ++-- 13 files changed, 73 insertions(+), 61 deletions(-) diff --git a/list.c b/list.c index 0e0e72d82..ab62b97e3 100644 --- a/list.c +++ b/list.c @@ -25,11 +25,23 @@ * 1 tab == 4 spaces! */ - +/* Standard includes. */ #include + +/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining +all the API functions to use the MPU wrappers. That should only be done when +task.h is included from an application file. */ +#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE + #include "FreeRTOS.h" #include "list.h" +/* Lint e9021, e961 and e750 are suppressed as a MISRA exception justified +because the MPU ports require MPU_WRAPPERS_INCLUDED_FROM_API_FILE to be defined +for the header files above, but not in this file, in order to generate the +correct privileged Vs unprivileged linkage and placement. */ +#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE /*lint !e961 !e750 !e9021. */ + /*----------------------------------------------------------- * PUBLIC LIST API documented in list.h *----------------------------------------------------------*/ diff --git a/portable/ARMv8M/non_secure/port.c b/portable/ARMv8M/non_secure/port.c index ba6bd2602..e5465940c 100644 --- a/portable/ARMv8M/non_secure/port.c +++ b/portable/ARMv8M/non_secure/port.c @@ -345,33 +345,33 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVI * @brief Each task maintains its own interrupt status in the critical nesting * variable. */ -static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; +PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; #if( configENABLE_TRUSTZONE == 1 ) /** * @brief Saved as part of the task context to indicate which context the * task is using on the secure side. */ - portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; + PRIVILEGED_DATA portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; #endif /* configENABLE_TRUSTZONE */ #if( configUSE_TICKLESS_IDLE == 1 ) /** * @brief The number of SysTick increments that make up one tick period. */ - static uint32_t ulTimerCountsForOneTick = 0; + PRIVILEGED_DATA static uint32_t ulTimerCountsForOneTick = 0; /** * @brief The maximum number of tick periods that can be suppressed is * limited by the 24 bit resolution of the SysTick timer. */ - static uint32_t xMaximumPossibleSuppressedTicks = 0; + PRIVILEGED_DATA static uint32_t xMaximumPossibleSuppressedTicks = 0; /** * @brief Compensate for the CPU cycles that pass while the SysTick is * stopped (low power functionality only). */ - static uint32_t ulStoppedTimerCompensation = 0; + PRIVILEGED_DATA static uint32_t ulStoppedTimerCompensation = 0; #endif /* configUSE_TICKLESS_IDLE */ /*-----------------------------------------------------------*/ diff --git a/portable/GCC/ARM_CM23/non_secure/port.c b/portable/GCC/ARM_CM23/non_secure/port.c index ba6bd2602..e5465940c 100644 --- a/portable/GCC/ARM_CM23/non_secure/port.c +++ b/portable/GCC/ARM_CM23/non_secure/port.c @@ -345,33 +345,33 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVI * @brief Each task maintains its own interrupt status in the critical nesting * variable. */ -static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; +PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; #if( configENABLE_TRUSTZONE == 1 ) /** * @brief Saved as part of the task context to indicate which context the * task is using on the secure side. */ - portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; + PRIVILEGED_DATA portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; #endif /* configENABLE_TRUSTZONE */ #if( configUSE_TICKLESS_IDLE == 1 ) /** * @brief The number of SysTick increments that make up one tick period. */ - static uint32_t ulTimerCountsForOneTick = 0; + PRIVILEGED_DATA static uint32_t ulTimerCountsForOneTick = 0; /** * @brief The maximum number of tick periods that can be suppressed is * limited by the 24 bit resolution of the SysTick timer. */ - static uint32_t xMaximumPossibleSuppressedTicks = 0; + PRIVILEGED_DATA static uint32_t xMaximumPossibleSuppressedTicks = 0; /** * @brief Compensate for the CPU cycles that pass while the SysTick is * stopped (low power functionality only). */ - static uint32_t ulStoppedTimerCompensation = 0; + PRIVILEGED_DATA static uint32_t ulStoppedTimerCompensation = 0; #endif /* configUSE_TICKLESS_IDLE */ /*-----------------------------------------------------------*/ diff --git a/portable/GCC/ARM_CM23_NTZ/non_secure/port.c b/portable/GCC/ARM_CM23_NTZ/non_secure/port.c index ba6bd2602..e5465940c 100644 --- a/portable/GCC/ARM_CM23_NTZ/non_secure/port.c +++ b/portable/GCC/ARM_CM23_NTZ/non_secure/port.c @@ -345,33 +345,33 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVI * @brief Each task maintains its own interrupt status in the critical nesting * variable. */ -static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; +PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; #if( configENABLE_TRUSTZONE == 1 ) /** * @brief Saved as part of the task context to indicate which context the * task is using on the secure side. */ - portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; + PRIVILEGED_DATA portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; #endif /* configENABLE_TRUSTZONE */ #if( configUSE_TICKLESS_IDLE == 1 ) /** * @brief The number of SysTick increments that make up one tick period. */ - static uint32_t ulTimerCountsForOneTick = 0; + PRIVILEGED_DATA static uint32_t ulTimerCountsForOneTick = 0; /** * @brief The maximum number of tick periods that can be suppressed is * limited by the 24 bit resolution of the SysTick timer. */ - static uint32_t xMaximumPossibleSuppressedTicks = 0; + PRIVILEGED_DATA static uint32_t xMaximumPossibleSuppressedTicks = 0; /** * @brief Compensate for the CPU cycles that pass while the SysTick is * stopped (low power functionality only). */ - static uint32_t ulStoppedTimerCompensation = 0; + PRIVILEGED_DATA static uint32_t ulStoppedTimerCompensation = 0; #endif /* configUSE_TICKLESS_IDLE */ /*-----------------------------------------------------------*/ diff --git a/portable/GCC/ARM_CM33/non_secure/port.c b/portable/GCC/ARM_CM33/non_secure/port.c index ba6bd2602..e5465940c 100644 --- a/portable/GCC/ARM_CM33/non_secure/port.c +++ b/portable/GCC/ARM_CM33/non_secure/port.c @@ -345,33 +345,33 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVI * @brief Each task maintains its own interrupt status in the critical nesting * variable. */ -static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; +PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; #if( configENABLE_TRUSTZONE == 1 ) /** * @brief Saved as part of the task context to indicate which context the * task is using on the secure side. */ - portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; + PRIVILEGED_DATA portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; #endif /* configENABLE_TRUSTZONE */ #if( configUSE_TICKLESS_IDLE == 1 ) /** * @brief The number of SysTick increments that make up one tick period. */ - static uint32_t ulTimerCountsForOneTick = 0; + PRIVILEGED_DATA static uint32_t ulTimerCountsForOneTick = 0; /** * @brief The maximum number of tick periods that can be suppressed is * limited by the 24 bit resolution of the SysTick timer. */ - static uint32_t xMaximumPossibleSuppressedTicks = 0; + PRIVILEGED_DATA static uint32_t xMaximumPossibleSuppressedTicks = 0; /** * @brief Compensate for the CPU cycles that pass while the SysTick is * stopped (low power functionality only). */ - static uint32_t ulStoppedTimerCompensation = 0; + PRIVILEGED_DATA static uint32_t ulStoppedTimerCompensation = 0; #endif /* configUSE_TICKLESS_IDLE */ /*-----------------------------------------------------------*/ diff --git a/portable/GCC/ARM_CM33_NTZ/non_secure/port.c b/portable/GCC/ARM_CM33_NTZ/non_secure/port.c index ba6bd2602..e5465940c 100644 --- a/portable/GCC/ARM_CM33_NTZ/non_secure/port.c +++ b/portable/GCC/ARM_CM33_NTZ/non_secure/port.c @@ -345,33 +345,33 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVI * @brief Each task maintains its own interrupt status in the critical nesting * variable. */ -static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; +PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; #if( configENABLE_TRUSTZONE == 1 ) /** * @brief Saved as part of the task context to indicate which context the * task is using on the secure side. */ - portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; + PRIVILEGED_DATA portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; #endif /* configENABLE_TRUSTZONE */ #if( configUSE_TICKLESS_IDLE == 1 ) /** * @brief The number of SysTick increments that make up one tick period. */ - static uint32_t ulTimerCountsForOneTick = 0; + PRIVILEGED_DATA static uint32_t ulTimerCountsForOneTick = 0; /** * @brief The maximum number of tick periods that can be suppressed is * limited by the 24 bit resolution of the SysTick timer. */ - static uint32_t xMaximumPossibleSuppressedTicks = 0; + PRIVILEGED_DATA static uint32_t xMaximumPossibleSuppressedTicks = 0; /** * @brief Compensate for the CPU cycles that pass while the SysTick is * stopped (low power functionality only). */ - static uint32_t ulStoppedTimerCompensation = 0; + PRIVILEGED_DATA static uint32_t ulStoppedTimerCompensation = 0; #endif /* configUSE_TICKLESS_IDLE */ /*-----------------------------------------------------------*/ diff --git a/portable/IAR/ARM_CM23/non_secure/port.c b/portable/IAR/ARM_CM23/non_secure/port.c index ba6bd2602..e5465940c 100644 --- a/portable/IAR/ARM_CM23/non_secure/port.c +++ b/portable/IAR/ARM_CM23/non_secure/port.c @@ -345,33 +345,33 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVI * @brief Each task maintains its own interrupt status in the critical nesting * variable. */ -static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; +PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; #if( configENABLE_TRUSTZONE == 1 ) /** * @brief Saved as part of the task context to indicate which context the * task is using on the secure side. */ - portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; + PRIVILEGED_DATA portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; #endif /* configENABLE_TRUSTZONE */ #if( configUSE_TICKLESS_IDLE == 1 ) /** * @brief The number of SysTick increments that make up one tick period. */ - static uint32_t ulTimerCountsForOneTick = 0; + PRIVILEGED_DATA static uint32_t ulTimerCountsForOneTick = 0; /** * @brief The maximum number of tick periods that can be suppressed is * limited by the 24 bit resolution of the SysTick timer. */ - static uint32_t xMaximumPossibleSuppressedTicks = 0; + PRIVILEGED_DATA static uint32_t xMaximumPossibleSuppressedTicks = 0; /** * @brief Compensate for the CPU cycles that pass while the SysTick is * stopped (low power functionality only). */ - static uint32_t ulStoppedTimerCompensation = 0; + PRIVILEGED_DATA static uint32_t ulStoppedTimerCompensation = 0; #endif /* configUSE_TICKLESS_IDLE */ /*-----------------------------------------------------------*/ diff --git a/portable/IAR/ARM_CM23_NTZ/non_secure/port.c b/portable/IAR/ARM_CM23_NTZ/non_secure/port.c index ba6bd2602..e5465940c 100644 --- a/portable/IAR/ARM_CM23_NTZ/non_secure/port.c +++ b/portable/IAR/ARM_CM23_NTZ/non_secure/port.c @@ -345,33 +345,33 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVI * @brief Each task maintains its own interrupt status in the critical nesting * variable. */ -static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; +PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; #if( configENABLE_TRUSTZONE == 1 ) /** * @brief Saved as part of the task context to indicate which context the * task is using on the secure side. */ - portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; + PRIVILEGED_DATA portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; #endif /* configENABLE_TRUSTZONE */ #if( configUSE_TICKLESS_IDLE == 1 ) /** * @brief The number of SysTick increments that make up one tick period. */ - static uint32_t ulTimerCountsForOneTick = 0; + PRIVILEGED_DATA static uint32_t ulTimerCountsForOneTick = 0; /** * @brief The maximum number of tick periods that can be suppressed is * limited by the 24 bit resolution of the SysTick timer. */ - static uint32_t xMaximumPossibleSuppressedTicks = 0; + PRIVILEGED_DATA static uint32_t xMaximumPossibleSuppressedTicks = 0; /** * @brief Compensate for the CPU cycles that pass while the SysTick is * stopped (low power functionality only). */ - static uint32_t ulStoppedTimerCompensation = 0; + PRIVILEGED_DATA static uint32_t ulStoppedTimerCompensation = 0; #endif /* configUSE_TICKLESS_IDLE */ /*-----------------------------------------------------------*/ diff --git a/portable/IAR/ARM_CM33/non_secure/port.c b/portable/IAR/ARM_CM33/non_secure/port.c index ba6bd2602..e5465940c 100644 --- a/portable/IAR/ARM_CM33/non_secure/port.c +++ b/portable/IAR/ARM_CM33/non_secure/port.c @@ -345,33 +345,33 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVI * @brief Each task maintains its own interrupt status in the critical nesting * variable. */ -static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; +PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; #if( configENABLE_TRUSTZONE == 1 ) /** * @brief Saved as part of the task context to indicate which context the * task is using on the secure side. */ - portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; + PRIVILEGED_DATA portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; #endif /* configENABLE_TRUSTZONE */ #if( configUSE_TICKLESS_IDLE == 1 ) /** * @brief The number of SysTick increments that make up one tick period. */ - static uint32_t ulTimerCountsForOneTick = 0; + PRIVILEGED_DATA static uint32_t ulTimerCountsForOneTick = 0; /** * @brief The maximum number of tick periods that can be suppressed is * limited by the 24 bit resolution of the SysTick timer. */ - static uint32_t xMaximumPossibleSuppressedTicks = 0; + PRIVILEGED_DATA static uint32_t xMaximumPossibleSuppressedTicks = 0; /** * @brief Compensate for the CPU cycles that pass while the SysTick is * stopped (low power functionality only). */ - static uint32_t ulStoppedTimerCompensation = 0; + PRIVILEGED_DATA static uint32_t ulStoppedTimerCompensation = 0; #endif /* configUSE_TICKLESS_IDLE */ /*-----------------------------------------------------------*/ diff --git a/portable/IAR/ARM_CM33_NTZ/non_secure/port.c b/portable/IAR/ARM_CM33_NTZ/non_secure/port.c index ba6bd2602..e5465940c 100644 --- a/portable/IAR/ARM_CM33_NTZ/non_secure/port.c +++ b/portable/IAR/ARM_CM33_NTZ/non_secure/port.c @@ -345,33 +345,33 @@ portDONT_DISCARD void vPortSVCHandler_C( uint32_t *pulCallerStackAddress ) PRIVI * @brief Each task maintains its own interrupt status in the critical nesting * variable. */ -static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; +PRIVILEGED_DATA static volatile uint32_t ulCriticalNesting = 0xaaaaaaaaUL; #if( configENABLE_TRUSTZONE == 1 ) /** * @brief Saved as part of the task context to indicate which context the * task is using on the secure side. */ - portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; + PRIVILEGED_DATA portDONT_DISCARD volatile SecureContextHandle_t xSecureContext = portNO_SECURE_CONTEXT; #endif /* configENABLE_TRUSTZONE */ #if( configUSE_TICKLESS_IDLE == 1 ) /** * @brief The number of SysTick increments that make up one tick period. */ - static uint32_t ulTimerCountsForOneTick = 0; + PRIVILEGED_DATA static uint32_t ulTimerCountsForOneTick = 0; /** * @brief The maximum number of tick periods that can be suppressed is * limited by the 24 bit resolution of the SysTick timer. */ - static uint32_t xMaximumPossibleSuppressedTicks = 0; + PRIVILEGED_DATA static uint32_t xMaximumPossibleSuppressedTicks = 0; /** * @brief Compensate for the CPU cycles that pass while the SysTick is * stopped (low power functionality only). */ - static uint32_t ulStoppedTimerCompensation = 0; + PRIVILEGED_DATA static uint32_t ulStoppedTimerCompensation = 0; #endif /* configUSE_TICKLESS_IDLE */ /*-----------------------------------------------------------*/ diff --git a/portable/MemMang/heap_4.c b/portable/MemMang/heap_4.c index ade9e4782..0b8aec5bf 100644 --- a/portable/MemMang/heap_4.c +++ b/portable/MemMang/heap_4.c @@ -61,7 +61,7 @@ task.h is included from an application file. */ heap - probably so it can be placed in a special segment or address. */ extern uint8_t ucHeap[ configTOTAL_HEAP_SIZE ]; #else - static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ]; + PRIVILEGED_DATA static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ]; #endif /* configAPPLICATION_ALLOCATED_HEAP */ /* Define the linked list structure. This is used to link free blocks in order @@ -80,13 +80,13 @@ typedef struct A_BLOCK_LINK * the block in front it and/or the block behind it if the memory blocks are * adjacent to each other. */ -static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ); +static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) PRIVILEGED_FUNCTION; /* * Called automatically to setup the required heap structures the first time * pvPortMalloc() is called. */ -static void prvHeapInit( void ); +static void prvHeapInit( void ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ @@ -95,20 +95,20 @@ block must by correctly byte aligned. */ static const size_t xHeapStructSize = ( sizeof( BlockLink_t ) + ( ( size_t ) ( portBYTE_ALIGNMENT - 1 ) ) ) & ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); /* Create a couple of list links to mark the start and end of the list. */ -static BlockLink_t xStart, *pxEnd = NULL; +PRIVILEGED_DATA static BlockLink_t xStart, *pxEnd = NULL; /* Keeps track of the number of calls to allocate and free memory as well as the number of free bytes remaining, but says nothing about fragmentation. */ -static size_t xFreeBytesRemaining = 0U; -static size_t xMinimumEverFreeBytesRemaining = 0U; -static size_t xNumberOfSuccessfulAllocations = 0; -static size_t xNumberOfSuccessfulFrees = 0; +PRIVILEGED_DATA static size_t xFreeBytesRemaining = 0U; +PRIVILEGED_DATA static size_t xMinimumEverFreeBytesRemaining = 0U; +PRIVILEGED_DATA static size_t xNumberOfSuccessfulAllocations = 0; +PRIVILEGED_DATA static size_t xNumberOfSuccessfulFrees = 0; /* Gets set to the top bit of an size_t type. When this bit in the xBlockSize member of an BlockLink_t structure is set then the block belongs to the application. When the bit is free the block is still part of the free heap space. */ -static size_t xBlockAllocatedBit = 0; +PRIVILEGED_DATA static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ @@ -330,7 +330,7 @@ void vPortInitialiseBlocks( void ) } /*-----------------------------------------------------------*/ -static void prvHeapInit( void ) +static void prvHeapInit( void ) /* PRIVILEGED_FUNCTION */ { BlockLink_t *pxFirstFreeBlock; uint8_t *pucAlignedHeap; @@ -378,7 +378,7 @@ size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; } /*-----------------------------------------------------------*/ -static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) +static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) /* PRIVILEGED_FUNCTION */ { BlockLink_t *pxIterator; uint8_t *puc; diff --git a/tasks.c b/tasks.c index 41b976b2f..940fddf0a 100644 --- a/tasks.c +++ b/tasks.c @@ -450,7 +450,7 @@ static void prvInitialiseTaskLists( void ) PRIVILEGED_FUNCTION; * void prvIdleTask( void *pvParameters ); * */ -static portTASK_FUNCTION_PROTO( prvIdleTask, pvParameters ); +static portTASK_FUNCTION_PROTO( prvIdleTask, pvParameters ) PRIVILEGED_FUNCTION; /* * Utility to free all memory allocated by the scheduler to hold a TCB, @@ -532,7 +532,7 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseT * Set xNextTaskUnblockTime to the time at which the next Blocked state task * will exit the Blocked state. */ -static void prvResetNextTaskUnblockTime( void ); +static void prvResetNextTaskUnblockTime( void ) PRIVILEGED_FUNCTION; #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) ) diff --git a/timers.c b/timers.c index d10c83208..86413c1da 100644 --- a/timers.c +++ b/timers.c @@ -956,8 +956,8 @@ static void prvCheckForValidListAndQueue( void ) { /* The timer queue is allocated statically in case configSUPPORT_DYNAMIC_ALLOCATION is 0. */ - static StaticQueue_t xStaticTimerQueue; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */ - static uint8_t ucStaticTimerQueueStorage[ ( size_t ) configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ]; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */ + PRIVILEGED_DATA static StaticQueue_t xStaticTimerQueue; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */ + PRIVILEGED_DATA static uint8_t ucStaticTimerQueueStorage[ ( size_t ) configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ]; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */ xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue ); }