Skip to content

Commit d20b8aa

Browse files
RTX5: Added TrustZone Module Identifier configuration for Idle and Timer Thread (#252)
1 parent c002aa9 commit d20b8aa

File tree

4 files changed

+35
-8
lines changed

4 files changed

+35
-8
lines changed

ARM.CMSIS.pdsc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,7 +2496,7 @@ and 8-bit Java bytecodes in Jazelle state.
24962496
<file category="header" name="CMSIS/RTOS2/RTX/Include/rtx_os.h"/>
24972497

24982498
<!-- RTX configuration -->
2499-
<file category="header" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.h" version="5.1.0"/>
2499+
<file category="header" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.h" version="5.2.0"/>
25002500
<file category="source" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.c" version="5.1.0"/>
25012501

25022502
<!-- RTX templates -->
@@ -2566,7 +2566,7 @@ and 8-bit Java bytecodes in Jazelle state.
25662566
<file category="header" name="CMSIS/RTOS2/RTX/Include/rtx_os.h"/>
25672567

25682568
<!-- RTX configuration -->
2569-
<file category="header" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.h" version="5.1.0"/>
2569+
<file category="header" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.h" version="5.2.0"/>
25702570
<file category="source" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.c" version="5.1.0"/>
25712571

25722572
<!-- RTX templates -->
@@ -2617,7 +2617,7 @@ and 8-bit Java bytecodes in Jazelle state.
26172617
<file category="header" name="CMSIS/RTOS2/RTX/Include/rtx_os.h"/>
26182618

26192619
<!-- RTX configuration -->
2620-
<file category="header" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.h" version="5.1.0"/>
2620+
<file category="header" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.h" version="5.2.0"/>
26212621
<file category="source" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.c" version="5.1.0"/>
26222622

26232623
<!-- RTX templates -->
@@ -2700,7 +2700,7 @@ and 8-bit Java bytecodes in Jazelle state.
27002700
<file category="header" name="CMSIS/RTOS2/RTX/Include/rtx_os.h"/>
27012701

27022702
<!-- RTX configuration -->
2703-
<file category="header" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.h" version="5.1.0"/>
2703+
<file category="header" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.h" version="5.2.0"/>
27042704
<file category="source" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.c" version="5.1.0"/>
27052705

27062706
<file category="source" attr="config" name="CMSIS/RTOS2/RTX/Config/handlers.c" version="5.1.0"/>
@@ -2758,7 +2758,7 @@ and 8-bit Java bytecodes in Jazelle state.
27582758
<file category="header" name="CMSIS/RTOS2/RTX/Include/rtx_os.h"/>
27592759

27602760
<!-- RTX configuration -->
2761-
<file category="header" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.h" version="5.1.0"/>
2761+
<file category="header" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.h" version="5.2.0"/>
27622762
<file category="source" attr="config" name="CMSIS/RTOS2/RTX/Config/RTX_Config.c" version="5.1.0"/>
27632763

27642764
<!-- RTX templates -->

CMSIS/DoxyGen/RTOS2/src/cmsis_os2.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ File/Folder | Content
164164
<td>V5.2.3</td>
165165
<td>
166166
- Based on CMSIS-RTOS API V2.1.2.
167+
- Added TrustZone Module Identifier configuration for Idle and Timer Thread.
167168
- Moved SVC/PendSV handler priority setup from osKernelInitialize to osKernelStart (User Priority Grouping can be updated after osKernelInitialize but before osKernelStart).
168169
- Corrected SysTick and PendSV handlers for ARMv8-M Baseline.
169170
- Corrected memory allocation for stack and data when "Object specific Memory allocation" configuration is used.

CMSIS/RTOS2/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
@@ -179,6 +179,14 @@
179179
#define OS_IDLE_THREAD_STACK_SIZE 200
180180
#endif
181181

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

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

CMSIS/RTOS2/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)