Skip to content

Commit 4e1cc0f

Browse files
committed
doc: update RTOS documentation with common interrupt assignment and memory barrier note
Update rtos.rst Overview to document common interrupt assignment (SysTimer for tick, SysTimer Software Interrupt for task switch) used by all RTOS ports. Add note about `__RWMB()` memory barriers placed after interrupt enable/disable and CSR operations in all RTOS ports to ensure proper synchronization on SMP systems. Also update changelog to reflect these documentation changes. Signed-off-by: Huaqi Fang <578567190@qq.com>
1 parent 9cf86c4 commit 4e1cc0f

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

doc/source/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ This is release version of ``0.9.0`` of Nuclei SDK.
192192

193193
* Documentation
194194

195+
- Update :ref:`design_rtos` to document common interrupt assignment for all RTOS ports (SysTimer for tick, SysTimer Software Interrupt for task switch) and memory barrier usage in RTOS ports
195196
- Fix typo ``reuqests`` to ``requires`` in ``app.rst``
196197
- Update ``rtos.rst`` to mention about recent bugfix for RTOS porting, and other RTOSes supported but not in Nuclei SDK
197198
- Update the expected output of ``cpuinfo`` in ``app.rst``

doc/source/design/rtos.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ In Nuclei SDK, we have support four most-used RTOSes in the world,
1414
Our RTOS port require Nuclei ECLIC interrupt controller, please make sure
1515
your Nuclei CPU is configured with ECLIC present.
1616

17+
All RTOS ports use the same interrupt assignment:
18+
19+
- ``SysTimer Interrupt`` is used as the RTOS SysTick for periodic tick
20+
- ``SysTimer Software Interrupt`` is used to do task switch
21+
1722
If you want to use RTOS in your application, you can choose one
1823
of the supported RTOSes.
1924

@@ -24,6 +29,10 @@ of the supported RTOSes.
2429
- When you want to develop RTOS application in Nuclei SDK, please
2530
don't reconfigure ``SysTimer`` and ``SysTimer Software Interrupt``,
2631
since it is already used by RTOS portable code.
32+
- In all RTOS ports, ``__RWMB()`` memory barriers are placed after interrupt
33+
enable/disable and CSR operations to ensure the CSR write completes before
34+
subsequent instructions execute. This is especially important for SMP systems
35+
to prevent CPU/compiler reordering issues.
2736

2837
.. _design_rtos_freertos:
2938

0 commit comments

Comments
 (0)