Skip to content

Commit 342e3ca

Browse files
authored
Merge pull request #6045 from deepikabhavnani/thread_tzoption
RTX changes pulled in from d20b8aa
2 parents f95730f + 9fa0a52 commit 342e3ca

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

rtos/TARGET_CORTEX/mbed_rtx_conf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,7 @@
5454
# define OS_PRIVILEGE_MODE 0
5555
#endif
5656

57+
#define OS_IDLE_THREAD_TZ_MOD_ID 1
58+
#define OS_TIMER_THREAD_TZ_MOD_ID 1
59+
5760
#endif /* MBED_RTX_CONF_H */

rtos/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* -----------------------------------------------------------------------------
1919
*
20-
* $Revision: V5.1.0
20+
* $Revision: V5.2.0
2121
*
2222
* Project: CMSIS-RTOS RTX
2323
* Title: RTX Configuration definitions
@@ -181,6 +181,14 @@
181181
#define OS_IDLE_THREAD_STACK_SIZE 200
182182
#endif
183183

184+
// <o>Idle Thread TrustZone Module Identifier
185+
// <i> Defines TrustZone Thread Context Management Identifier.
186+
// <i> Applies only to cores with TrustZone technology.
187+
// <i> Default: 0 (not used)
188+
#ifndef OS_IDLE_THREAD_TZ_MOD_ID
189+
#define OS_IDLE_THREAD_TZ_MOD_ID 0
190+
#endif
191+
184192
// <q>Stack overrun checking
185193
// <i> Enable stack overrun checks at thread switch.
186194
// <i> Enabling this option increases slightly the execution time of a thread switch.
@@ -242,6 +250,14 @@
242250
#define OS_TIMER_THREAD_STACK_SIZE 200
243251
#endif
244252

253+
// <o>Timer Thread TrustZone Module Identifier
254+
// <i> Defines TrustZone Thread Context Management Identifier.
255+
// <i> Applies only to cores with TrustZone technology.
256+
// <i> Default: 0 (not used)
257+
#ifndef OS_TIMER_THREAD_TZ_MOD_ID
258+
#define OS_TIMER_THREAD_TZ_MOD_ID 0
259+
#endif
260+
245261
// <o>Timer Callback Queue entries <0-256>
246262
// <i> Number of concurrent active timer callback functions.
247263
// <i> May be set to 0 when timers are not used.

rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ static const osThreadAttr_t os_idle_thread_attr = {
128128
&os_idle_thread_stack,
129129
(uint32_t)sizeof(os_idle_thread_stack),
130130
osPriorityIdle,
131-
0U, 0U
131+
#if defined(OS_IDLE_THREAD_TZ_MOD_ID)
132+
(uint32_t)OS_IDLE_THREAD_TZ_MOD_ID,
133+
#else
134+
0U,
135+
#endif
136+
0U
132137
};
133138

134139

@@ -176,7 +181,12 @@ static const osThreadAttr_t os_timer_thread_attr = {
176181
&os_timer_thread_stack,
177182
(uint32_t)sizeof(os_timer_thread_stack),
178183
(osPriority_t)OS_TIMER_THREAD_PRIO,
179-
0U, 0U
184+
#if defined(OS_TIMER_THREAD_TZ_MOD_ID)
185+
(uint32_t)OS_TIMER_THREAD_TZ_MOD_ID,
186+
#else
187+
0U,
188+
#endif
189+
0U
180190
};
181191

182192
// Timer Message Queue Control Block

0 commit comments

Comments
 (0)