From 11d0caa61487eacff89044efed4e19579b9e0a5e Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Sat, 25 Jan 2025 13:34:03 +0530 Subject: [PATCH] Fix the context array size for MPU ports (#1230) Fix the context array size for MPU ports Ensure the saved context location falls within the reserved context area rather than overlapping with the next MPU_SETTINGS structure member. This never caused a problem because actual read/write operations start from one word before the saved context location. Signed-off-by: Gaurav Aggarwal --- .github/workflows/kernel-demos.yml | 4 ++-- portable/ARMv8M/non_secure/portmacrocommon.h | 16 ++++++++-------- .../GCC/ARM_CM23/non_secure/portmacrocommon.h | 16 ++++++++-------- .../ARM_CM23_NTZ/non_secure/portmacrocommon.h | 16 ++++++++-------- .../GCC/ARM_CM33/non_secure/portmacrocommon.h | 16 ++++++++-------- .../ARM_CM33_NTZ/non_secure/portmacrocommon.h | 16 ++++++++-------- .../GCC/ARM_CM35P/non_secure/portmacrocommon.h | 16 ++++++++-------- .../ARM_CM35P_NTZ/non_secure/portmacrocommon.h | 16 ++++++++-------- portable/GCC/ARM_CM3_MPU/portmacro.h | 8 ++++++++ portable/GCC/ARM_CM4_MPU/portmacro.h | 11 ++++++++++- .../GCC/ARM_CM55/non_secure/portmacrocommon.h | 16 ++++++++-------- .../ARM_CM55_NTZ/non_secure/portmacrocommon.h | 16 ++++++++-------- .../GCC/ARM_CM85/non_secure/portmacrocommon.h | 16 ++++++++-------- .../ARM_CM85_NTZ/non_secure/portmacrocommon.h | 16 ++++++++-------- .../IAR/ARM_CM23/non_secure/portmacrocommon.h | 16 ++++++++-------- .../ARM_CM23_NTZ/non_secure/portmacrocommon.h | 16 ++++++++-------- .../IAR/ARM_CM33/non_secure/portmacrocommon.h | 16 ++++++++-------- .../ARM_CM33_NTZ/non_secure/portmacrocommon.h | 16 ++++++++-------- .../IAR/ARM_CM35P/non_secure/portmacrocommon.h | 16 ++++++++-------- .../ARM_CM35P_NTZ/non_secure/portmacrocommon.h | 16 ++++++++-------- portable/IAR/ARM_CM4F_MPU/portmacro.h | 11 ++++++++++- .../IAR/ARM_CM55/non_secure/portmacrocommon.h | 16 ++++++++-------- .../ARM_CM55_NTZ/non_secure/portmacrocommon.h | 16 ++++++++-------- .../IAR/ARM_CM85/non_secure/portmacrocommon.h | 16 ++++++++-------- .../ARM_CM85_NTZ/non_secure/portmacrocommon.h | 16 ++++++++-------- portable/RVDS/ARM_CM4_MPU/portmacro.h | 11 ++++++++++- 26 files changed, 208 insertions(+), 173 deletions(-) diff --git a/.github/workflows/kernel-demos.yml b/.github/workflows/kernel-demos.yml index f81ae33f3..404c602b5 100644 --- a/.github/workflows/kernel-demos.yml +++ b/.github/workflows/kernel-demos.yml @@ -268,12 +268,12 @@ jobs: fetch-depth: 1 - env: - stepName: Fetch Community-Supported-Demos Submodule + stepName: Fetch Dependencies shell: bash run: | # ${{ env.stepName }} echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" - git submodule update --checkout --init --depth 1 FreeRTOS/Demo/ThirdParty/Community-Supported-Demos + git submodule update --checkout --init --depth 1 FreeRTOS/Demo/ThirdParty/Community-Supported-Demos FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" # Checkout user pull request changes diff --git a/portable/ARMv8M/non_secure/portmacrocommon.h b/portable/ARMv8M/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/ARMv8M/non_secure/portmacrocommon.h +++ b/portable/ARMv8M/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/GCC/ARM_CM23/non_secure/portmacrocommon.h b/portable/GCC/ARM_CM23/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/GCC/ARM_CM23/non_secure/portmacrocommon.h +++ b/portable/GCC/ARM_CM23/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/GCC/ARM_CM23_NTZ/non_secure/portmacrocommon.h b/portable/GCC/ARM_CM23_NTZ/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/GCC/ARM_CM23_NTZ/non_secure/portmacrocommon.h +++ b/portable/GCC/ARM_CM23_NTZ/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/GCC/ARM_CM33/non_secure/portmacrocommon.h b/portable/GCC/ARM_CM33/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/GCC/ARM_CM33/non_secure/portmacrocommon.h +++ b/portable/GCC/ARM_CM33/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/GCC/ARM_CM33_NTZ/non_secure/portmacrocommon.h b/portable/GCC/ARM_CM33_NTZ/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/GCC/ARM_CM33_NTZ/non_secure/portmacrocommon.h +++ b/portable/GCC/ARM_CM33_NTZ/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/GCC/ARM_CM35P/non_secure/portmacrocommon.h b/portable/GCC/ARM_CM35P/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/GCC/ARM_CM35P/non_secure/portmacrocommon.h +++ b/portable/GCC/ARM_CM35P/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/GCC/ARM_CM35P_NTZ/non_secure/portmacrocommon.h b/portable/GCC/ARM_CM35P_NTZ/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/GCC/ARM_CM35P_NTZ/non_secure/portmacrocommon.h +++ b/portable/GCC/ARM_CM35P_NTZ/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/GCC/ARM_CM3_MPU/portmacro.h b/portable/GCC/ARM_CM3_MPU/portmacro.h index fb2c53832..a2e6883c0 100644 --- a/portable/GCC/ARM_CM3_MPU/portmacro.h +++ b/portable/GCC/ARM_CM3_MPU/portmacro.h @@ -125,6 +125,14 @@ typedef struct MPU_REGION_SETTINGS #endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */ +/* + * +------------------------------+-------------------------------+-----+ + * | CONTROL, r4-r11, EXC_RETURN | PSP, r0-r3, r12, LR, PC, xPSR | | + * +------------------------------+-------------------------------+-----+ + * + * <-----------------------------><-------------------------------><----> + * 10 9 1 + */ #define MAX_CONTEXT_SIZE ( 20 ) /* Size of an Access Control List (ACL) entry in bits. */ diff --git a/portable/GCC/ARM_CM4_MPU/portmacro.h b/portable/GCC/ARM_CM4_MPU/portmacro.h index 0c40ac624..581b09d5c 100644 --- a/portable/GCC/ARM_CM4_MPU/portmacro.h +++ b/portable/GCC/ARM_CM4_MPU/portmacro.h @@ -219,7 +219,16 @@ typedef struct MPU_REGION_SETTINGS #endif /* configUSE_MPU_WRAPPERS_V1 == 0 */ -#define MAX_CONTEXT_SIZE ( 52 ) +/* + * +---------+---------------+-----------------+-----------------+-----+ + * | s16-s31 | s0-s15, FPSCR | CONTROL, r4-r11 | PSP, r0-r3, r12 | | + * | | | EXC_RETURN | LR, PC, xPSR | | + * +---------+---------------+-----------------+-----------------+-----+ + * + * <--------><---------------><----------------><----------------><----> + * 16 17 10 9 1 + */ +#define MAX_CONTEXT_SIZE ( 53 ) /* Size of an Access Control List (ACL) entry in bits. */ #define portACL_ENTRY_SIZE_BITS ( 32U ) diff --git a/portable/GCC/ARM_CM55/non_secure/portmacrocommon.h b/portable/GCC/ARM_CM55/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/GCC/ARM_CM55/non_secure/portmacrocommon.h +++ b/portable/GCC/ARM_CM55/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/GCC/ARM_CM55_NTZ/non_secure/portmacrocommon.h b/portable/GCC/ARM_CM55_NTZ/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/GCC/ARM_CM55_NTZ/non_secure/portmacrocommon.h +++ b/portable/GCC/ARM_CM55_NTZ/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/GCC/ARM_CM85/non_secure/portmacrocommon.h b/portable/GCC/ARM_CM85/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/GCC/ARM_CM85/non_secure/portmacrocommon.h +++ b/portable/GCC/ARM_CM85/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/GCC/ARM_CM85_NTZ/non_secure/portmacrocommon.h b/portable/GCC/ARM_CM85_NTZ/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/GCC/ARM_CM85_NTZ/non_secure/portmacrocommon.h +++ b/portable/GCC/ARM_CM85_NTZ/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/IAR/ARM_CM23/non_secure/portmacrocommon.h b/portable/IAR/ARM_CM23/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/IAR/ARM_CM23/non_secure/portmacrocommon.h +++ b/portable/IAR/ARM_CM23/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/IAR/ARM_CM23_NTZ/non_secure/portmacrocommon.h b/portable/IAR/ARM_CM23_NTZ/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/IAR/ARM_CM23_NTZ/non_secure/portmacrocommon.h +++ b/portable/IAR/ARM_CM23_NTZ/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/IAR/ARM_CM33/non_secure/portmacrocommon.h b/portable/IAR/ARM_CM33/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/IAR/ARM_CM33/non_secure/portmacrocommon.h +++ b/portable/IAR/ARM_CM33/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/IAR/ARM_CM33_NTZ/non_secure/portmacrocommon.h b/portable/IAR/ARM_CM33_NTZ/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/IAR/ARM_CM33_NTZ/non_secure/portmacrocommon.h +++ b/portable/IAR/ARM_CM33_NTZ/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/IAR/ARM_CM35P/non_secure/portmacrocommon.h b/portable/IAR/ARM_CM35P/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/IAR/ARM_CM35P/non_secure/portmacrocommon.h +++ b/portable/IAR/ARM_CM35P/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/IAR/ARM_CM35P_NTZ/non_secure/portmacrocommon.h b/portable/IAR/ARM_CM35P_NTZ/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/IAR/ARM_CM35P_NTZ/non_secure/portmacrocommon.h +++ b/portable/IAR/ARM_CM35P_NTZ/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/IAR/ARM_CM4F_MPU/portmacro.h b/portable/IAR/ARM_CM4F_MPU/portmacro.h index 08f849992..6b7600c15 100644 --- a/portable/IAR/ARM_CM4F_MPU/portmacro.h +++ b/portable/IAR/ARM_CM4F_MPU/portmacro.h @@ -221,7 +221,16 @@ typedef struct MPU_REGION_SETTINGS #endif /* configUSE_MPU_WRAPPERS_V1 == 0 */ -#define MAX_CONTEXT_SIZE ( 52 ) +/* + * +---------+---------------+-----------------+-----------------+-----+ + * | s16-s31 | s0-s15, FPSCR | CONTROL, r4-r11 | PSP, r0-r3, r12 | | + * | | | EXC_RETURN | LR, PC, xPSR | | + * +---------+---------------+-----------------+-----------------+-----+ + * + * <--------><---------------><----------------><----------------><----> + * 16 17 10 9 1 + */ +#define MAX_CONTEXT_SIZE ( 53 ) /* Size of an Access Control List (ACL) entry in bits. */ #define portACL_ENTRY_SIZE_BITS ( 32U ) diff --git a/portable/IAR/ARM_CM55/non_secure/portmacrocommon.h b/portable/IAR/ARM_CM55/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/IAR/ARM_CM55/non_secure/portmacrocommon.h +++ b/portable/IAR/ARM_CM55/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/IAR/ARM_CM55_NTZ/non_secure/portmacrocommon.h b/portable/IAR/ARM_CM55_NTZ/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/IAR/ARM_CM55_NTZ/non_secure/portmacrocommon.h +++ b/portable/IAR/ARM_CM55_NTZ/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/IAR/ARM_CM85/non_secure/portmacrocommon.h b/portable/IAR/ARM_CM85/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/IAR/ARM_CM85/non_secure/portmacrocommon.h +++ b/portable/IAR/ARM_CM85/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/IAR/ARM_CM85_NTZ/non_secure/portmacrocommon.h b/portable/IAR/ARM_CM85_NTZ/non_secure/portmacrocommon.h index e74fa8257..ec14d467d 100644 --- a/portable/IAR/ARM_CM85_NTZ/non_secure/portmacrocommon.h +++ b/portable/IAR/ARM_CM85_NTZ/non_secure/portmacrocommon.h @@ -251,9 +251,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><-----------><----> - * 16 16 8 8 5 16 1 + * 16 17 8 8 5 16 1 */ - #define MAX_CONTEXT_SIZE 70 + #define MAX_CONTEXT_SIZE 71 #elif ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 0 ) ) @@ -264,9 +264,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+------------------------------+-----+ * * <-----------><--------------><---------><----------------><-----------------------------><----> - * 16 16 8 8 5 1 + * 16 17 8 8 5 1 */ - #define MAX_CONTEXT_SIZE 54 + #define MAX_CONTEXT_SIZE 55 #elif ( ( configENABLE_TRUSTZONE == 0 ) && ( configENABLE_PAC == 1 ) ) @@ -277,9 +277,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><-----------><----> - * 16 16 8 8 4 16 1 + * 16 17 8 8 4 16 1 */ - #define MAX_CONTEXT_SIZE 69 + #define MAX_CONTEXT_SIZE 70 #else /* if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ @@ -290,9 +290,9 @@ extern void vClearInterruptMask( uint32_t ulMask ) /* __attribute__(( naked )) P * +-----------+---------------+----------+-----------------+----------------------+-----+ * * <-----------><--------------><---------><----------------><---------------------><----> - * 16 16 8 8 4 1 + * 16 17 8 8 4 1 */ - #define MAX_CONTEXT_SIZE 53 + #define MAX_CONTEXT_SIZE 54 #endif /* #if ( ( configENABLE_TRUSTZONE == 1 ) && ( configENABLE_PAC == 1 ) ) */ diff --git a/portable/RVDS/ARM_CM4_MPU/portmacro.h b/portable/RVDS/ARM_CM4_MPU/portmacro.h index 5977f3f88..8e682ba74 100644 --- a/portable/RVDS/ARM_CM4_MPU/portmacro.h +++ b/portable/RVDS/ARM_CM4_MPU/portmacro.h @@ -218,7 +218,16 @@ typedef struct MPU_REGION_SETTINGS #endif /* #if ( configUSE_MPU_WRAPPERS_V1 == 0 ) */ -#define MAX_CONTEXT_SIZE ( 52 ) +/* + * +---------+---------------+-----------------+-----------------+-----+ + * | s16-s31 | s0-s15, FPSCR | CONTROL, r4-r11 | PSP, r0-r3, r12 | | + * | | | EXC_RETURN | LR, PC, xPSR | | + * +---------+---------------+-----------------+-----------------+-----+ + * + * <--------><---------------><----------------><----------------><----> + * 16 17 10 9 1 + */ +#define MAX_CONTEXT_SIZE ( 53 ) /* Size of an Access Control List (ACL) entry in bits. */ #define portACL_ENTRY_SIZE_BITS ( 32U )