mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Add support for running FreeRTOS on Secure Side only in Cortex M33 port. Also, change spaces to tabs.
This commit is contained in:
parent
c3c9c12ce2
commit
5849459c65
|
@ -47,6 +47,25 @@
|
|||
#endif /* configENABLE_TRUSTZONE */
|
||||
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
/**
|
||||
* The FreeRTOS Cortex M33 port can be configured to run on the Secure Side only
|
||||
* i.e. the processor boots as secure and never jumps to the non-secure side.
|
||||
* The Trust Zone support in the port must be disabled in order to run FreeRTOS
|
||||
* on the secure side. The following are the valid configuration seetings:
|
||||
*
|
||||
* 1. Run FreeRTOS on the Secure Side:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 1 and configENABLE_TRUSTZONE = 0
|
||||
*
|
||||
* 2. Run FreeRTOS on the Non-Secure Side with Secure Side function call support:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 1
|
||||
*
|
||||
* 3. Run FreeRTOS on the Non-Secure Side only i.e. no Secure Side function call support:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 0
|
||||
*/
|
||||
#if( ( configRUN_FREERTOS_SECURE_ONLY == 1 ) && ( configENABLE_TRUSTZONE == 1 ) )
|
||||
#error Trust Zone needs to be disabled in order to run FreeRTOS on the Secure Side.
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
|
@ -164,6 +183,23 @@
|
|||
*/
|
||||
#define portINITIAL_XPSR ( 0x01000000 )
|
||||
|
||||
#if( configRUN_FREERTOS_SECURE_ONLY == 1 )
|
||||
/**
|
||||
* @brief Initial EXC_RETURN value.
|
||||
*
|
||||
* FF FF FF FD
|
||||
* 1111 1111 1111 1111 1111 1111 1111 1101
|
||||
*
|
||||
* Bit[6] - 1 --> The exception was taken from the Secure state.
|
||||
* Bit[5] - 1 --> Do not skip stacking of additional state context.
|
||||
* Bit[4] - 1 --> The PE did not allocate space on the stack for FP context.
|
||||
* Bit[3] - 1 --> Return to the Thread mode.
|
||||
* Bit[2] - 1 --> Restore registers from the process stack.
|
||||
* Bit[1] - 0 --> Reserved, 0.
|
||||
* Bit[0] - 1 --> The exception was taken to the Secure state.
|
||||
*/
|
||||
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||
#else
|
||||
/**
|
||||
* @brief Initial EXC_RETURN value.
|
||||
*
|
||||
|
@ -179,6 +215,7 @@
|
|||
* Bit[0] - 0 --> The exception was taken to the Non-Secure state.
|
||||
*/
|
||||
#define portINITIAL_EXC_RETURN ( 0xffffffbc )
|
||||
#endif /* configRUN_FREERTOS_SECURE_ONLY */
|
||||
|
||||
/**
|
||||
* @brief CONTROL register privileged bit mask.
|
||||
|
|
|
@ -42,6 +42,19 @@ extern "C" {
|
|||
*------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef configENABLE_FPU
|
||||
#error configENABLE_FPU must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_FPU */
|
||||
|
||||
#ifndef configENABLE_MPU
|
||||
#error configENABLE_MPU must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_MPU */
|
||||
|
||||
#ifndef configENABLE_TRUSTZONE
|
||||
#error configENABLE_TRUSTZONE must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_TRUSTZONE */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @brief Type definitions.
|
||||
*/
|
||||
|
|
|
@ -47,6 +47,25 @@
|
|||
#endif /* configENABLE_TRUSTZONE */
|
||||
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
/**
|
||||
* The FreeRTOS Cortex M33 port can be configured to run on the Secure Side only
|
||||
* i.e. the processor boots as secure and never jumps to the non-secure side.
|
||||
* The Trust Zone support in the port must be disabled in order to run FreeRTOS
|
||||
* on the secure side. The following are the valid configuration seetings:
|
||||
*
|
||||
* 1. Run FreeRTOS on the Secure Side:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 1 and configENABLE_TRUSTZONE = 0
|
||||
*
|
||||
* 2. Run FreeRTOS on the Non-Secure Side with Secure Side function call support:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 1
|
||||
*
|
||||
* 3. Run FreeRTOS on the Non-Secure Side only i.e. no Secure Side function call support:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 0
|
||||
*/
|
||||
#if( ( configRUN_FREERTOS_SECURE_ONLY == 1 ) && ( configENABLE_TRUSTZONE == 1 ) )
|
||||
#error Trust Zone needs to be disabled in order to run FreeRTOS on the Secure Side.
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
|
@ -164,6 +183,23 @@
|
|||
*/
|
||||
#define portINITIAL_XPSR ( 0x01000000 )
|
||||
|
||||
#if( configRUN_FREERTOS_SECURE_ONLY == 1 )
|
||||
/**
|
||||
* @brief Initial EXC_RETURN value.
|
||||
*
|
||||
* FF FF FF FD
|
||||
* 1111 1111 1111 1111 1111 1111 1111 1101
|
||||
*
|
||||
* Bit[6] - 1 --> The exception was taken from the Secure state.
|
||||
* Bit[5] - 1 --> Do not skip stacking of additional state context.
|
||||
* Bit[4] - 1 --> The PE did not allocate space on the stack for FP context.
|
||||
* Bit[3] - 1 --> Return to the Thread mode.
|
||||
* Bit[2] - 1 --> Restore registers from the process stack.
|
||||
* Bit[1] - 0 --> Reserved, 0.
|
||||
* Bit[0] - 1 --> The exception was taken to the Secure state.
|
||||
*/
|
||||
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||
#else
|
||||
/**
|
||||
* @brief Initial EXC_RETURN value.
|
||||
*
|
||||
|
@ -179,6 +215,7 @@
|
|||
* Bit[0] - 0 --> The exception was taken to the Non-Secure state.
|
||||
*/
|
||||
#define portINITIAL_EXC_RETURN ( 0xffffffbc )
|
||||
#endif /* configRUN_FREERTOS_SECURE_ONLY */
|
||||
|
||||
/**
|
||||
* @brief CONTROL register privileged bit mask.
|
||||
|
|
|
@ -42,6 +42,19 @@ extern "C" {
|
|||
*------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef configENABLE_FPU
|
||||
#error configENABLE_FPU must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_FPU */
|
||||
|
||||
#ifndef configENABLE_MPU
|
||||
#error configENABLE_MPU must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_MPU */
|
||||
|
||||
#ifndef configENABLE_TRUSTZONE
|
||||
#error configENABLE_TRUSTZONE must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_TRUSTZONE */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @brief Type definitions.
|
||||
*/
|
||||
|
|
|
@ -47,6 +47,25 @@
|
|||
#endif /* configENABLE_TRUSTZONE */
|
||||
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
/**
|
||||
* The FreeRTOS Cortex M33 port can be configured to run on the Secure Side only
|
||||
* i.e. the processor boots as secure and never jumps to the non-secure side.
|
||||
* The Trust Zone support in the port must be disabled in order to run FreeRTOS
|
||||
* on the secure side. The following are the valid configuration seetings:
|
||||
*
|
||||
* 1. Run FreeRTOS on the Secure Side:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 1 and configENABLE_TRUSTZONE = 0
|
||||
*
|
||||
* 2. Run FreeRTOS on the Non-Secure Side with Secure Side function call support:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 1
|
||||
*
|
||||
* 3. Run FreeRTOS on the Non-Secure Side only i.e. no Secure Side function call support:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 0
|
||||
*/
|
||||
#if( ( configRUN_FREERTOS_SECURE_ONLY == 1 ) && ( configENABLE_TRUSTZONE == 1 ) )
|
||||
#error Trust Zone needs to be disabled in order to run FreeRTOS on the Secure Side.
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
|
@ -164,6 +183,23 @@
|
|||
*/
|
||||
#define portINITIAL_XPSR ( 0x01000000 )
|
||||
|
||||
#if( configRUN_FREERTOS_SECURE_ONLY == 1 )
|
||||
/**
|
||||
* @brief Initial EXC_RETURN value.
|
||||
*
|
||||
* FF FF FF FD
|
||||
* 1111 1111 1111 1111 1111 1111 1111 1101
|
||||
*
|
||||
* Bit[6] - 1 --> The exception was taken from the Secure state.
|
||||
* Bit[5] - 1 --> Do not skip stacking of additional state context.
|
||||
* Bit[4] - 1 --> The PE did not allocate space on the stack for FP context.
|
||||
* Bit[3] - 1 --> Return to the Thread mode.
|
||||
* Bit[2] - 1 --> Restore registers from the process stack.
|
||||
* Bit[1] - 0 --> Reserved, 0.
|
||||
* Bit[0] - 1 --> The exception was taken to the Secure state.
|
||||
*/
|
||||
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||
#else
|
||||
/**
|
||||
* @brief Initial EXC_RETURN value.
|
||||
*
|
||||
|
@ -179,6 +215,7 @@
|
|||
* Bit[0] - 0 --> The exception was taken to the Non-Secure state.
|
||||
*/
|
||||
#define portINITIAL_EXC_RETURN ( 0xffffffbc )
|
||||
#endif /* configRUN_FREERTOS_SECURE_ONLY */
|
||||
|
||||
/**
|
||||
* @brief CONTROL register privileged bit mask.
|
||||
|
|
|
@ -42,6 +42,19 @@ extern "C" {
|
|||
*------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef configENABLE_FPU
|
||||
#error configENABLE_FPU must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_FPU */
|
||||
|
||||
#ifndef configENABLE_MPU
|
||||
#error configENABLE_MPU must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_MPU */
|
||||
|
||||
#ifndef configENABLE_TRUSTZONE
|
||||
#error configENABLE_TRUSTZONE must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_TRUSTZONE */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @brief Type definitions.
|
||||
*/
|
||||
|
|
|
@ -47,6 +47,25 @@
|
|||
#endif /* configENABLE_TRUSTZONE */
|
||||
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
/**
|
||||
* The FreeRTOS Cortex M33 port can be configured to run on the Secure Side only
|
||||
* i.e. the processor boots as secure and never jumps to the non-secure side.
|
||||
* The Trust Zone support in the port must be disabled in order to run FreeRTOS
|
||||
* on the secure side. The following are the valid configuration seetings:
|
||||
*
|
||||
* 1. Run FreeRTOS on the Secure Side:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 1 and configENABLE_TRUSTZONE = 0
|
||||
*
|
||||
* 2. Run FreeRTOS on the Non-Secure Side with Secure Side function call support:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 1
|
||||
*
|
||||
* 3. Run FreeRTOS on the Non-Secure Side only i.e. no Secure Side function call support:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 0
|
||||
*/
|
||||
#if( ( configRUN_FREERTOS_SECURE_ONLY == 1 ) && ( configENABLE_TRUSTZONE == 1 ) )
|
||||
#error Trust Zone needs to be disabled in order to run FreeRTOS on the Secure Side.
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
|
@ -164,6 +183,23 @@
|
|||
*/
|
||||
#define portINITIAL_XPSR ( 0x01000000 )
|
||||
|
||||
#if( configRUN_FREERTOS_SECURE_ONLY == 1 )
|
||||
/**
|
||||
* @brief Initial EXC_RETURN value.
|
||||
*
|
||||
* FF FF FF FD
|
||||
* 1111 1111 1111 1111 1111 1111 1111 1101
|
||||
*
|
||||
* Bit[6] - 1 --> The exception was taken from the Secure state.
|
||||
* Bit[5] - 1 --> Do not skip stacking of additional state context.
|
||||
* Bit[4] - 1 --> The PE did not allocate space on the stack for FP context.
|
||||
* Bit[3] - 1 --> Return to the Thread mode.
|
||||
* Bit[2] - 1 --> Restore registers from the process stack.
|
||||
* Bit[1] - 0 --> Reserved, 0.
|
||||
* Bit[0] - 1 --> The exception was taken to the Secure state.
|
||||
*/
|
||||
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||
#else
|
||||
/**
|
||||
* @brief Initial EXC_RETURN value.
|
||||
*
|
||||
|
@ -179,6 +215,7 @@
|
|||
* Bit[0] - 0 --> The exception was taken to the Non-Secure state.
|
||||
*/
|
||||
#define portINITIAL_EXC_RETURN ( 0xffffffbc )
|
||||
#endif /* configRUN_FREERTOS_SECURE_ONLY */
|
||||
|
||||
/**
|
||||
* @brief CONTROL register privileged bit mask.
|
||||
|
|
|
@ -42,6 +42,19 @@ extern "C" {
|
|||
*------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef configENABLE_FPU
|
||||
#error configENABLE_FPU must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_FPU */
|
||||
|
||||
#ifndef configENABLE_MPU
|
||||
#error configENABLE_MPU must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_MPU */
|
||||
|
||||
#ifndef configENABLE_TRUSTZONE
|
||||
#error configENABLE_TRUSTZONE must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_TRUSTZONE */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @brief Type definitions.
|
||||
*/
|
||||
|
|
|
@ -47,6 +47,25 @@
|
|||
#endif /* configENABLE_TRUSTZONE */
|
||||
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
/**
|
||||
* The FreeRTOS Cortex M33 port can be configured to run on the Secure Side only
|
||||
* i.e. the processor boots as secure and never jumps to the non-secure side.
|
||||
* The Trust Zone support in the port must be disabled in order to run FreeRTOS
|
||||
* on the secure side. The following are the valid configuration seetings:
|
||||
*
|
||||
* 1. Run FreeRTOS on the Secure Side:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 1 and configENABLE_TRUSTZONE = 0
|
||||
*
|
||||
* 2. Run FreeRTOS on the Non-Secure Side with Secure Side function call support:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 1
|
||||
*
|
||||
* 3. Run FreeRTOS on the Non-Secure Side only i.e. no Secure Side function call support:
|
||||
* configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 0
|
||||
*/
|
||||
#if( ( configRUN_FREERTOS_SECURE_ONLY == 1 ) && ( configENABLE_TRUSTZONE == 1 ) )
|
||||
#error Trust Zone needs to be disabled in order to run FreeRTOS on the Secure Side.
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
|
@ -164,6 +183,23 @@
|
|||
*/
|
||||
#define portINITIAL_XPSR ( 0x01000000 )
|
||||
|
||||
#if( configRUN_FREERTOS_SECURE_ONLY == 1 )
|
||||
/**
|
||||
* @brief Initial EXC_RETURN value.
|
||||
*
|
||||
* FF FF FF FD
|
||||
* 1111 1111 1111 1111 1111 1111 1111 1101
|
||||
*
|
||||
* Bit[6] - 1 --> The exception was taken from the Secure state.
|
||||
* Bit[5] - 1 --> Do not skip stacking of additional state context.
|
||||
* Bit[4] - 1 --> The PE did not allocate space on the stack for FP context.
|
||||
* Bit[3] - 1 --> Return to the Thread mode.
|
||||
* Bit[2] - 1 --> Restore registers from the process stack.
|
||||
* Bit[1] - 0 --> Reserved, 0.
|
||||
* Bit[0] - 1 --> The exception was taken to the Secure state.
|
||||
*/
|
||||
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
|
||||
#else
|
||||
/**
|
||||
* @brief Initial EXC_RETURN value.
|
||||
*
|
||||
|
@ -179,6 +215,7 @@
|
|||
* Bit[0] - 0 --> The exception was taken to the Non-Secure state.
|
||||
*/
|
||||
#define portINITIAL_EXC_RETURN ( 0xffffffbc )
|
||||
#endif /* configRUN_FREERTOS_SECURE_ONLY */
|
||||
|
||||
/**
|
||||
* @brief CONTROL register privileged bit mask.
|
||||
|
|
|
@ -42,6 +42,19 @@ extern "C" {
|
|||
*------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef configENABLE_FPU
|
||||
#error configENABLE_FPU must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_FPU */
|
||||
|
||||
#ifndef configENABLE_MPU
|
||||
#error configENABLE_MPU must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_MPU */
|
||||
|
||||
#ifndef configENABLE_TRUSTZONE
|
||||
#error configENABLE_TRUSTZONE must be defined in FreeRTOSConfig.h.
|
||||
#endif /* configENABLE_TRUSTZONE */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @brief Type definitions.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue